From cebbe5b970cba85a5e21f8347f0a20e78351d394 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 28 Jul 2016 11:22:07 +0100 Subject: extensions: Drop GTKMM2 fallbacks (bzr r15023.2.5) --- src/extension/prefdialog.cpp | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 2521dc1de..1ca590e85 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -41,11 +41,7 @@ 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(_(name.c_str()), true), -#else - Gtk::Dialog(_(name.c_str()), true, true), -#endif _help(help), _name(name), _button_ok(NULL), @@ -68,11 +64,7 @@ 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); @@ -97,19 +89,10 @@ 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 - + auto sep = Gtk::manage(new Gtk::Separator()); 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); @@ -117,19 +100,11 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co 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) { -#if WITH_GTKMM_3_0 _checkbox_preview = dynamic_cast(hbox->get_children().front()); -#else - _checkbox_preview = dynamic_cast(hbox->children().back().get_widget()); -#endif } preview_toggle(); -- cgit v1.2.3 From 9e177c7e5303ef24f23eb87037f7089b57813523 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 26 Dec 2016 17:04:49 +0000 Subject: Fix Gtkmm deprecations in extensions (bzr r15359) --- src/extension/prefdialog.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 1ca590e85..5ce2f69cc 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -71,11 +71,8 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co if (_help == NULL) help_button->set_sensitive(false); */ - _button_cancel = add_button(_effect == NULL ? Gtk::Stock::CANCEL : Gtk::Stock::CLOSE, Gtk::RESPONSE_CANCEL); - _button_cancel->set_use_stock(true); - - _button_ok = add_button(_effect == NULL ? Gtk::Stock::OK : Gtk::Stock::APPLY, Gtk::RESPONSE_OK); - _button_ok->set_use_stock(true); + _button_cancel = add_button(_effect == NULL ? _("_Cancel") : _("_Close"), Gtk::RESPONSE_CANCEL); + _button_ok = add_button(_effect == NULL ? _("_OK") : _("_Apply"), Gtk::RESPONSE_OK); set_default_response(Gtk::RESPONSE_OK); _button_ok->grab_focus(); -- cgit v1.2.3 From 2e8438d76a5f26719d381843cd3ce3fa694809fb Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 27 Dec 2016 15:49:22 +0000 Subject: Rm remaining Gtk::Stock usage (bzr r15368) --- src/extension/prefdialog.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 5ce2f69cc..fcc88853d 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -8,7 +8,6 @@ */ #include "prefdialog.h" -#include #include #include #include -- cgit v1.2.3 From 2295a47ec000543b6316213e54f715dc4d1e64c9 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 12 Feb 2017 19:51:27 +0100 Subject: Extensions: Harmonize appearance and try to simplify layouting a bit (bzr r15509) --- src/extension/prefdialog.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index fcc88853d..e98d88b2d 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -59,11 +59,10 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co controls = _effect->get_imp()->prefs_effect(_effect, SP_ACTIVE_DESKTOP, &_signal_param_change, NULL); _signal_param_change.connect(sigc::mem_fun(this, &PrefDialog::param_change)); } - - hbox->pack_start(*controls, true, true, 6); + hbox->pack_start(*controls, true, true, 0); hbox->show(); - this->get_content_area()->pack_start(*hbox, true, true, 6); + this->get_content_area()->pack_start(*hbox, true, true, 0); /* Gtk::Button * help_button = add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP); @@ -88,15 +87,16 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co auto sep = Gtk::manage(new Gtk::Separator()); sep->show(); - this->get_content_area()->pack_start(*sep, true, true, 4); + this->get_content_area()->pack_start(*sep, false, false, Parameter::GUI_BOX_SPACING); hbox = Gtk::manage(new Gtk::HBox()); + hbox->set_border_width(Parameter::GUI_BOX_MARGIN); _button_preview = _param_preview->get_widget(NULL, NULL, &_signal_preview); _button_preview->show(); - hbox->pack_start(*_button_preview, true, true,6); + hbox->pack_start(*_button_preview, true, true, 0); hbox->show(); - this->get_content_area()->pack_start(*hbox, true, true, 6); + this->get_content_area()->pack_start(*hbox, false, false, 0); Gtk::Box * hbox = dynamic_cast(_button_preview); if (hbox != NULL) { -- cgit v1.2.3 From a2e57d792590665163dd07eb5e926017e40ccb90 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Mon, 13 Feb 2017 02:46:19 +0100 Subject: Extensions: Work around gtk3 width/height calculation bug for long labels Also use constants for most dimensions so they can easily be chaned in future. (bzr r15511) --- src/extension/prefdialog.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index e98d88b2d..2bdbb081e 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -50,6 +50,8 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co _effect(effect), _exEnv(NULL) { + this->set_default_size(0,0); // we want the window to be as small as possible instead of clobbering up space + Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox()); if (controls == NULL) { if (_effect == NULL) { -- cgit v1.2.3 From f0ad38f6fd0d18f48d92df4b55ff8352747e6b2c Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 9 Apr 2017 15:39:40 +0200 Subject: Remove unused field "scope" (bzr r15633.1.2) --- src/extension/prefdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/extension/prefdialog.cpp') diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 2bdbb081e..92ddd3050 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -246,7 +246,7 @@ PrefDialog::on_response (int signal) { #include "internal/clear-n_.h" -const char * PrefDialog::live_param_xml = "false"; +const char * PrefDialog::live_param_xml = "false"; }; }; /* namespace Inkscape, Extension */ -- cgit v1.2.3