index 13ce20abe8fcd453e330ac08327b9445b1251474..6f3df89da3dcf4dc36a8ae572de2104885f6844e 100644 (file)
Behavior(dialog),
_dock_item(*SP_ACTIVE_DESKTOP->getDock(),
Inkscape::Verb::get(dialog._verb_num)->get_id(), dialog._title.c_str(),
- (Inkscape::Verb::get(dialog._verb_num)->get_image() ?
+ (Inkscape::Verb::get(dialog._verb_num)->get_image() ?
Inkscape::Verb::get(dialog._verb_num)->get_image() : ""),
static_cast<Widget::DockItem::State>(
- prefs_get_int_attribute (_dialog._prefs_path, "state",
+ prefs_get_int_attribute (_dialog._prefs_path, "state",
UI::Widget::DockItem::DOCKED_STATE)))
{
// Connect signals
}
void
-DockBehavior::present()
+DockBehavior::present()
{
bool was_attached = _dock_item.isAttached();
}
void
-DockBehavior::show()
-{
+DockBehavior::show()
+{
_dock_item.show();
}
-void
+void
DockBehavior::show_all_children()
{
get_vbox()->show_all_children();
}
-void
+void
DockBehavior::get_position(int &x, int &y)
-{
+{
_dock_item.get_position(x, y);
}
-void
+void
DockBehavior::get_size(int &width, int &height)
-{
+{
_dock_item.get_size(width, height);
}
void
-DockBehavior::resize(int width, int height)
+DockBehavior::resize(int width, int height)
{
_dock_item.resize(width, height);
}
_dock_item.set_size_request(width, height);
}
-void
+void
DockBehavior::size_request(Gtk::Requisition &requisition)
-{
+{
_dock_item.size_request(requisition);
}
void
DockBehavior::set_sensitive(bool sensitive)
{
+ // TODO check this. Seems to be bad that we ignore the parameter
get_vbox()->set_sensitive();
}
}
void
-DockBehavior::_onStateChanged(Widget::DockItem::State prev_state,
+DockBehavior::_onStateChanged(Widget::DockItem::State /*prev_state*/,
Widget::DockItem::State new_state)
{
+// TODO probably need to avoid window calls unless the state is different. Check.
prefs_set_int_attribute (_dialog._prefs_path, "state", new_state);
if (new_state == Widget::DockItem::FLOATING_STATE) {
{
gint transient_policy = prefs_get_int_attribute_limited ( "options.transientpolicy", "value", 1, 0, 2);
-#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
- if (prefs_get_int_attribute ( "options.dialogsontopwin32", "value", 0))
- transient_policy = 2;
- else
- return;
-#endif
+#ifdef WIN32 // Win32 special code to enable transient dialogs
+ transient_policy = 2;
+#endif
- if (!transient_policy)
+ if (!transient_policy)
return;
Gtk::Window *floating_win = _dock_item.getWindow();
if (GtkWindow *dialog_win = floating_win->gobj()) {
_dialog.retransientize_suppress = true; // disallow other attempts to retranzientize this dialog
-
+
desktop->setWindowTransient (dialog_win);
/*
/* Signal wrappers */
-Glib::SignalProxy0<void>
+Glib::SignalProxy0<void>
DockBehavior::signal_show() { return _dock_item.signal_show(); }
-Glib::SignalProxy0<void>
+Glib::SignalProxy0<void>
DockBehavior::signal_hide() { return _dock_item.signal_hide(); }
-Glib::SignalProxy1<bool, GdkEventAny *>
+Glib::SignalProxy1<bool, GdkEventAny *>
DockBehavior::signal_delete_event() { return _dock_item.signal_delete_event(); }
Glib::SignalProxy0<void>