From 60bc603d6d45cbc13d2dd8718908b63ba6b838ec Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sun, 6 May 2012 22:54:49 +0100 Subject: A couple of simple Gtk3 fixes (bzr r11342) --- src/extension/prefdialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 4fd5680aa..761126bd5 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -41,7 +41,11 @@ namespace Extension { them. It also places the passed in widgets into the dialog. */ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * controls, Effect * effect) : +#if WITH_GTKMM_3_0 + Gtk::Dialog::Dialog(_(name.c_str()), true), +#else Gtk::Dialog::Dialog(_(name.c_str()), true, true), +#endif _help(help), _name(name), _button_ok(NULL), @@ -97,7 +101,11 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co Gtk::Box * hbox = dynamic_cast(_button_preview); if (hbox != NULL) { +#if WITH_GTKMM_3_0 + Gtk::Widget * back = hbox->get_children().back(); +#else Gtk::Widget * back = hbox->children().back().get_widget(); +#endif Gtk::CheckButton * cb = dynamic_cast(back); _checkbox_preview = cb; } -- cgit v1.2.3 From 702011260ba4e0cfd819c2c00b14064273395b5e Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 10 Sep 2012 11:57:18 +0900 Subject: Fix for 649441 : Extension dialogs without live preview should not be modal (bzr r11660) --- src/extension/prefdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 761126bd5..94f128a42 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -114,6 +114,11 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co _signal_preview.connect(sigc::mem_fun(this, &PrefDialog::preview_toggle)); } + // Set window modality for effects that don't use live preview + if (_effect != NULL && _effect->no_live_preview) { + set_modal(false); + } + GtkWidget *dlg = GTK_WIDGET(gobj()); sp_transientize(dlg); -- cgit v1.2.3 From 162b892e2dd76ff4a028b9f0239eb6d8b1aa9452 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sun, 14 Oct 2012 00:12:23 +0100 Subject: GTK+ 3: Fix crash with live-preview checkbox in extensions dialog Fixed bugs: - https://launchpad.net/bugs/1012741 (bzr r11792) --- src/extension/prefdialog.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 94f128a42..2d2604c7f 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -32,13 +32,13 @@ namespace Extension { /** \brief Creates a new preference dialog for extension preferences - \param name Name of the Extension who's dialog this is + \param name Name of the Extension whose dialog this is \param help The help string for the extension (NULL if none) \param controls The extension specific widgets in the dialog This function initializes the dialog with the name of the extension in the title. It adds a few buttons and sets up handlers for - them. It also places the passed in widgets into the dialog. + them. It also places the passed-in widgets into the dialog. */ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * controls, Effect * effect) : #if WITH_GTKMM_3_0 @@ -102,12 +102,10 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co Gtk::Box * hbox = dynamic_cast(_button_preview); if (hbox != NULL) { #if WITH_GTKMM_3_0 - Gtk::Widget * back = hbox->get_children().back(); + _checkbox_preview = dynamic_cast(hbox->get_children().front()); #else - Gtk::Widget * back = hbox->children().back().get_widget(); + _checkbox_preview = dynamic_cast(hbox->children().back().get_widget()); #endif - Gtk::CheckButton * cb = dynamic_cast(back); - _checkbox_preview = cb; } preview_toggle(); -- cgit v1.2.3 From ded9e1f5728b8fd32586e7d28c962526bba23d26 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sun, 16 Dec 2012 12:49:16 +0000 Subject: GTK+ 3: Use orientable widgets (bzr r11959) --- src/extension/prefdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 2d2604c7f..649dc398a 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -88,7 +88,12 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co _param_preview = Parameter::make(doc->root(), _effect); } +#if WITH_GTKMM_3_0 + Gtk::Separator * sep = Gtk::manage(new Gtk::Separator()); +#else Gtk::HSeparator * sep = Gtk::manage(new Gtk::HSeparator()); +#endif + sep->show(); this->get_vbox()->pack_start(*sep, true, true, 4); -- cgit v1.2.3 From 1d3f07d09370bf8fefa7968706375ae3669dbd1c Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Fri, 8 Mar 2013 01:44:43 +0000 Subject: Drop deprecated get_vbox method in Gtk::Dialog (bzr r12181) --- src/extension/prefdialog.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 649dc398a..f3c6508af 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -67,7 +67,12 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co hbox->pack_start(*controls, true, true, 6); hbox->show(); + +#if WITH_GTKMM_3_0 + this->get_content_area()->pack_start(*hbox, true, true, 6); +#else this->get_vbox()->pack_start(*hbox, true, true, 6); +#endif /* Gtk::Button * help_button = add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP); @@ -95,14 +100,24 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co #endif sep->show(); + +#if WITH_GTKMM_3_0 + this->get_content_area()->pack_start(*sep, true, true, 4); +#else this->get_vbox()->pack_start(*sep, true, true, 4); +#endif hbox = Gtk::manage(new Gtk::HBox()); _button_preview = _param_preview->get_widget(NULL, NULL, &_signal_preview); _button_preview->show(); hbox->pack_start(*_button_preview, true, true,6); hbox->show(); + +#if WITH_GTKMM_3_0 + this->get_content_area()->pack_start(*hbox, true, true, 6); +#else this->get_vbox()->pack_start(*hbox, true, true, 6); +#endif Gtk::Box * hbox = dynamic_cast(_button_preview); if (hbox != NULL) { -- cgit v1.2.3 From 23eef073797d1dcca437e25a248be959c3b2d121 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Mon, 24 Mar 2014 21:54:07 +0100 Subject: Patch for base constructor calls. (bzr r13202) --- src/extension/prefdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index f3c6508af..1b657f644 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -42,9 +42,9 @@ namespace Extension { */ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * controls, Effect * effect) : #if WITH_GTKMM_3_0 - Gtk::Dialog::Dialog(_(name.c_str()), true), + Gtk::Dialog(_(name.c_str()), true), #else - Gtk::Dialog::Dialog(_(name.c_str()), true, true), + Gtk::Dialog(_(name.c_str()), true, true), #endif _help(help), _name(name), -- cgit v1.2.3