From 42f2371f5e073dc5afa591a7d63d81d39f8835b8 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Mon, 29 Apr 2019 17:05:11 +0200 Subject: Simplify UI for LPE add --- share/ui/dialog-livepatheffect-add-effect.ui | 269 --------------------------- share/ui/dialog-livepatheffect-add.ui | 264 ++++++++++++++++++++++++++ src/ui/dialog/livepatheffect-add.cpp | 9 +- 3 files changed, 268 insertions(+), 274 deletions(-) delete mode 100644 share/ui/dialog-livepatheffect-add-effect.ui diff --git a/share/ui/dialog-livepatheffect-add-effect.ui b/share/ui/dialog-livepatheffect-add-effect.ui deleted file mode 100644 index e1d85cebd..000000000 --- a/share/ui/dialog-livepatheffect-add-effect.ui +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - LPESelectorEffect - True - False - center - start - False - - - True - True - False - center - False - vertical - top - - - LPEOverlay - True - False - - - True - False - center - start - 60 - align-vertical-baseline - 6 - - - 1 - - - - - True - False - True - end - start - - - LPESelectorEffectFavTop - True - False - end - start - 20 - draw-star - 2 - - - - - - 2 - - - - - False - True - 0 - - - - - True - False - LPEName - center - True - end - 14 - 23 - - - - False - False - 1 - - - - - 200 - False - True - Description - True - center - True - - - False - False - 10 - 2 - - - - - Experimental - True - False - True - True - - - False - True - 3 - - - - - True - False - True - - - True - False - True - center - center - 5 - 5 - 5 - 5 - 16 - go-down - 2 - - - - - - False - True - 4 - - - - - True - False - center - start - top - center - - - LPESelectorEffectEventInfo - True - False - end - start - False - - - LPESelectorEffectInfo - False - end - start - 23 - infopop-outline - 2 - - - - - - False - True - end - 0 - True - - - - - LPESelectorEffectEventFav - True - False - center - start - False - - - LPESelectorEffectFav - False - center - start - 23 - draw-star-outline - 2 - - - - - - False - True - end - 1 - True - - - - - LPESelectorEffectEventApply - True - False - start - start - False - - - False - start - start - 23 - on - 2 - - - - - - False - True - end - 2 - True - - - - - True - True - 5 - - - - - - - diff --git a/share/ui/dialog-livepatheffect-add.ui b/share/ui/dialog-livepatheffect-add.ui index 7d21deca1..ebcbfba50 100644 --- a/share/ui/dialog-livepatheffect-add.ui +++ b/share/ui/dialog-livepatheffect-add.ui @@ -335,4 +335,268 @@ + + LPESelectorEffect + True + False + center + start + False + + + True + True + False + center + False + vertical + top + + + LPEOverlay + True + False + + + True + False + center + start + 60 + align-vertical-baseline + 6 + + + 1 + + + + + True + False + True + end + start + + + LPESelectorEffectFavTop + True + False + end + start + 20 + draw-star + 2 + + + + + + 2 + + + + + False + True + 0 + + + + + True + False + LPEName + center + True + end + 14 + 23 + + + + False + False + 1 + + + + + 200 + False + True + Description + True + center + True + + + False + False + 10 + 2 + + + + + Experimental + True + False + True + True + + + False + True + 3 + + + + + True + False + True + + + True + False + True + center + center + 5 + 5 + 5 + 5 + 16 + go-down + 2 + + + + + + False + True + 4 + + + + + True + False + center + start + top + center + + + LPESelectorEffectEventInfo + True + False + end + start + False + + + LPESelectorEffectInfo + False + end + start + 23 + infopop-outline + 2 + + + + + + False + True + end + 0 + True + + + + + LPESelectorEffectEventFav + True + False + center + start + False + + + LPESelectorEffectFav + False + center + start + 23 + draw-star-outline + 2 + + + + + + False + True + end + 1 + True + + + + + LPESelectorEffectEventApply + True + False + start + start + False + + + False + start + start + 23 + on + 2 + + + + + + False + True + end + 2 + True + + + + + True + True + 5 + + + + + + diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp index 8e4d7db15..737d1e5ff 100644 --- a/src/ui/dialog/livepatheffect-add.cpp +++ b/src/ui/dialog/livepatheffect-add.cpp @@ -101,11 +101,10 @@ LivePathEffectAdd::LivePathEffectAdd() _LPESelectorFlowBox->signal_child_activated().connect(sigc::mem_fun(*this, &LivePathEffectAdd::on_activate)); _LPEDialogSelector->add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK); - Glib::ustring effectgladefile = get_filename(Inkscape::IO::Resource::UIS, "dialog-livepatheffect-add-effect.ui"); for (int i = 0; i < static_cast(converter._length); ++i) { Glib::RefPtr builder_effect; try { - builder_effect = Gtk::Builder::create_from_file(effectgladefile); + builder_effect = Gtk::Builder::create_from_file(gladefile); } catch (const Glib::Error &ex) { g_warning("Glade file loading failed for filter effect dialog"); return; @@ -136,10 +135,10 @@ LivePathEffectAdd::LivePathEffectAdd() Gtk::Label *LPEDescription; builder_effect->get_widget("LPEDescription", LPEDescription); LPEDescription->set_text(converter.get_description(data->id)); - Gtk::ToggleButton *LPEExperimental; - builder_effect->get_widget("LPEExperimental", LPEExperimental); + Gtk::ToggleButton *LPEExperimentalToggle; + builder_effect->get_widget("LPEExperimentalToggle", LPEExperimentalToggle); bool active = converter.get_experimental(data->id) ? true : false; - LPEExperimental->set_active(active); + LPEExperimentalToggle->set_active(active); Gtk::Image *LPEIcon; builder_effect->get_widget("LPEIcon", LPEIcon); LPEIcon->set_from_icon_name(converter.get_icon(data->id), Gtk::BuiltinIconSize(Gtk::ICON_SIZE_DIALOG)); -- cgit v1.2.3