From b6c589d017483131f599764f65b1c48f950d6c61 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 4 May 2019 17:42:32 +0200 Subject: Styling fixes and remove a crash --- src/ui/widget/ink-flow-box.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ui/widget/ink-flow-box.cpp') diff --git a/src/ui/widget/ink-flow-box.cpp b/src/ui/widget/ink-flow-box.cpp index d102ceb6c..c753a41da 100644 --- a/src/ui/widget/ink-flow-box.cpp +++ b/src/ui/widget/ink-flow-box.cpp @@ -28,6 +28,7 @@ InkFlowBox::InkFlowBox(const gchar *name) _flowbox.set_activate_on_single_click(true); Gtk::ToggleButton *tbutton = new Gtk::ToggleButton("", false); tbutton->set_always_show_image(true); + _flowbox.set_selection_mode(Gtk::SelectionMode::SELECTION_NONE); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); tbutton->set_active(prefs->getBool(Glib::ustring("/dialogs/") + get_name() + Glib::ustring("/flowbox/lock"), true)); Glib::ustring iconname = "object-unlocked"; -- cgit v1.2.3 From 1dcbdd9b9d6f1db457878515fe041bf360ead042 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Wed, 29 May 2019 15:44:16 +0200 Subject: Add CSS and remove XML toggler button --- src/ui/widget/ink-flow-box.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/widget/ink-flow-box.cpp') diff --git a/src/ui/widget/ink-flow-box.cpp b/src/ui/widget/ink-flow-box.cpp index c753a41da..5b108ebb6 100644 --- a/src/ui/widget/ink-flow-box.cpp +++ b/src/ui/widget/ink-flow-box.cpp @@ -30,7 +30,7 @@ InkFlowBox::InkFlowBox(const gchar *name) tbutton->set_always_show_image(true); _flowbox.set_selection_mode(Gtk::SelectionMode::SELECTION_NONE); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - tbutton->set_active(prefs->getBool(Glib::ustring("/dialogs/") + get_name() + Glib::ustring("/flowbox/lock"), true)); + tbutton->set_active(true);// commented for furter use prefs->getBool(Glib::ustring("/dialogs/") + get_name() + Glib::ustring("/flowbox/lock"), true)); Glib::ustring iconname = "object-unlocked"; if (tbutton->get_active()) { iconname = "object-locked"; @@ -38,8 +38,8 @@ InkFlowBox::InkFlowBox(const gchar *name) tbutton->set_image(*sp_get_icon_image(iconname, Gtk::ICON_SIZE_MENU)); tbutton->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &InkFlowBox::on_global_toggle), tbutton)); - _controller.pack_start(*tbutton); - tbutton->show(); + //_controller.pack_start(*tbutton); + //tbutton->show(); showing = 0; sensitive = true; } -- cgit v1.2.3 From 4ee33795749b46cd4e0b8c84ab336b7cb8d18faa Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Wed, 29 May 2019 15:46:40 +0200 Subject: fix coding style --- src/ui/widget/ink-flow-box.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ui/widget/ink-flow-box.cpp') diff --git a/src/ui/widget/ink-flow-box.cpp b/src/ui/widget/ink-flow-box.cpp index 5b108ebb6..6b2530429 100644 --- a/src/ui/widget/ink-flow-box.cpp +++ b/src/ui/widget/ink-flow-box.cpp @@ -30,7 +30,8 @@ InkFlowBox::InkFlowBox(const gchar *name) tbutton->set_always_show_image(true); _flowbox.set_selection_mode(Gtk::SelectionMode::SELECTION_NONE); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - tbutton->set_active(true);// commented for furter use prefs->getBool(Glib::ustring("/dialogs/") + get_name() + Glib::ustring("/flowbox/lock"), true)); + tbutton->set_active(true); // commented for furter use prefs->getBool(Glib::ustring("/dialogs/") + get_name() + + // Glib::ustring("/flowbox/lock"), true)); Glib::ustring iconname = "object-unlocked"; if (tbutton->get_active()) { iconname = "object-locked"; @@ -39,7 +40,7 @@ InkFlowBox::InkFlowBox(const gchar *name) tbutton->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &InkFlowBox::on_global_toggle), tbutton)); //_controller.pack_start(*tbutton); - //tbutton->show(); + // tbutton->show(); showing = 0; sensitive = true; } -- cgit v1.2.3 From dbc354261d4cdb3f8431d15a45c092ed608ad246 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Wed, 29 May 2019 15:56:34 +0200 Subject: Remove lock button from XML dialog --- src/ui/widget/ink-flow-box.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/ui/widget/ink-flow-box.cpp') diff --git a/src/ui/widget/ink-flow-box.cpp b/src/ui/widget/ink-flow-box.cpp index 6b2530429..728d720a3 100644 --- a/src/ui/widget/ink-flow-box.cpp +++ b/src/ui/widget/ink-flow-box.cpp @@ -30,8 +30,10 @@ InkFlowBox::InkFlowBox(const gchar *name) tbutton->set_always_show_image(true); _flowbox.set_selection_mode(Gtk::SelectionMode::SELECTION_NONE); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - tbutton->set_active(true); // commented for furter use prefs->getBool(Glib::ustring("/dialogs/") + get_name() + - // Glib::ustring("/flowbox/lock"), true)); + prefs->setBool(Glib::ustring("/dialogs/") + get_name() + + Glib::ustring("/flowbox/lock"), false); + tbutton->set_active(prefs->getBool(Glib::ustring("/dialogs/") + get_name() + + Glib::ustring("/flowbox/lock"), true)); Glib::ustring iconname = "object-unlocked"; if (tbutton->get_active()) { iconname = "object-locked"; @@ -39,8 +41,9 @@ InkFlowBox::InkFlowBox(const gchar *name) tbutton->set_image(*sp_get_icon_image(iconname, Gtk::ICON_SIZE_MENU)); tbutton->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &InkFlowBox::on_global_toggle), tbutton)); - //_controller.pack_start(*tbutton); - // tbutton->show(); + _controller.pack_start(*tbutton); + tbutton->hide(); + tbutton->set_no_show_all(true); showing = 0; sensitive = true; } -- cgit v1.2.3 From e8cc89a8433af94c38db86f765565e912cc878c7 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 2 Jun 2019 12:20:33 +0200 Subject: Fixing coding style --- src/ui/widget/ink-flow-box.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/ui/widget/ink-flow-box.cpp') diff --git a/src/ui/widget/ink-flow-box.cpp b/src/ui/widget/ink-flow-box.cpp index 728d720a3..8485dd932 100644 --- a/src/ui/widget/ink-flow-box.cpp +++ b/src/ui/widget/ink-flow-box.cpp @@ -30,10 +30,8 @@ InkFlowBox::InkFlowBox(const gchar *name) tbutton->set_always_show_image(true); _flowbox.set_selection_mode(Gtk::SelectionMode::SELECTION_NONE); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setBool(Glib::ustring("/dialogs/") + get_name() + - Glib::ustring("/flowbox/lock"), false); - tbutton->set_active(prefs->getBool(Glib::ustring("/dialogs/") + get_name() + - Glib::ustring("/flowbox/lock"), true)); + prefs->setBool(Glib::ustring("/dialogs/") + get_name() + Glib::ustring("/flowbox/lock"), false); + tbutton->set_active(prefs->getBool(Glib::ustring("/dialogs/") + get_name() + Glib::ustring("/flowbox/lock"), true)); Glib::ustring iconname = "object-unlocked"; if (tbutton->get_active()) { iconname = "object-locked"; -- cgit v1.2.3