summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es>2018-07-24 18:01:31 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es>2018-07-24 18:01:31 +0000
commit47c013e4cbec8817025b3d362057e0d6e4616ead (patch)
tree8ddb6eb66d17c4c182a2cca5a86fe504e587f132 /src
parentAdd themes inkscape folder abailable by the app (diff)
downloadinkscape-47c013e4cbec8817025b3d362057e0d6e4616ead.tar.gz
inkscape-47c013e4cbec8817025b3d362057e0d6e4616ead.zip
Remove pointer
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp8
-rw-r--r--src/ui/dialog/inkscape-preferences.h3
-rw-r--r--src/ui/widget/preferences-widget.cpp5
-rw-r--r--src/ui/widget/preferences-widget.h6
4 files changed, 16 insertions, 6 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index bc940bbe2..d106e7355 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -885,11 +885,9 @@ void InkscapePreferences::initPageUI()
_page_theme.add_line(false, _("Secondary toolbar icon size:"), _misc_small_secondary, "",
_("Set the size for the icons in secondary toolbars to use (requires restart)"), false);
}
- Glib::ustring const label = _("Now");
- Glib::ustring const tooltip = _("A bit slow process");
- _apply_theme = new UI::Widget::Button(label, tooltip);
- _page_theme.add_line(false, _("Apply theme"), *_apply_theme, "", _("Apply theme"), false);
- _apply_theme->signal_clicked().connect(sigc::ptr_fun(sp_ui_reload));
+ _apply_theme.init(_("Now (slow)"));
+ _page_theme.add_line(false, _("Apply theme"), _apply_theme, "", _("Apply theme"), false);
+ _apply_theme.signal_clicked().connect(sigc::ptr_fun(sp_ui_reload));
this->AddPage(_page_theme, _("Theme"), iter_ui, PREFS_PAGE_UI_THEME);
// Windows
_win_save_geom.init ( _("Save and restore window geometry for each document"), "/options/savewindowgeometry/value", PREFS_WINDOW_GEOMETRY_FILE, true, nullptr);
diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h
index e43464633..759684905 100644
--- a/src/ui/dialog/inkscape-preferences.h
+++ b/src/ui/dialog/inkscape-preferences.h
@@ -248,7 +248,7 @@ protected:
UI::Widget::PrefCombo _misc_small_toolbar;
UI::Widget::PrefCombo _misc_small_secondary;
UI::Widget::PrefCombo _misc_small_tools;
- UI::Widget::Button *_apply_theme;
+ UI::Widget::PrefButton _apply_theme;
UI::Widget::PrefRadioButton _win_dockable;
UI::Widget::PrefRadioButton _win_floating;
@@ -353,6 +353,7 @@ protected:
UI::Widget::PrefCheckButton _misc_namedicon_delay;
// System page
+ // UI::Widget::Button *_apply_theme;
UI::Widget::PrefSpinButton _misc_latency_skew;
UI::Widget::PrefSpinButton _misc_simpl;
Gtk::Entry _sys_user_prefs;
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 7e9335a8a..108d621c7 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -176,6 +176,11 @@ void PrefCheckButton::on_toggled()
}
}
+void PrefButton::init(Glib::ustring const &label)
+{
+ this->set_label(label);
+}
+
void PrefRadioButton::init(Glib::ustring const &label, Glib::ustring const &prefs_path,
Glib::ustring const &string_value, bool default_value, PrefRadioButton* group_member)
{
diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h
index 5036a1c50..3c3c81020 100644
--- a/src/ui/widget/preferences-widget.h
+++ b/src/ui/widget/preferences-widget.h
@@ -58,6 +58,12 @@ protected:
void on_toggled() override;
};
+class PrefButton : public Gtk::Button
+{
+public:
+ void init(Glib::ustring const &label);
+};
+
class PrefRadioButton : public Gtk::RadioButton
{
public: