diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-05-28 16:38:25 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-05-28 16:38:25 +0000 |
| commit | 10b1aecd8d885414229807196018cd32582bb085 (patch) | |
| tree | 2a4b868ef1ca3f1a401394c738af33f6d4fbf3bb /src | |
| parent | Hackfest2019: Drop deprecated prep-method for toolbars (diff) | |
| download | inkscape-10b1aecd8d885414229807196018cd32582bb085.tar.gz inkscape-10b1aecd8d885414229807196018cd32582bb085.zip | |
Hackfest2019: Add an entry to ComboBoxToolItem
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/widget/combo-tool-item.cpp | 10 | ||||
| -rw-r--r-- | src/ui/widget/combo-tool-item.h | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/ui/widget/combo-tool-item.cpp b/src/ui/widget/combo-tool-item.cpp index a9952fce6..b8638ba72 100644 --- a/src/ui/widget/combo-tool-item.cpp +++ b/src/ui/widget/combo-tool-item.cpp @@ -34,15 +34,17 @@ ComboToolItem* ComboToolItem::create(const Glib::ustring &group_label, const Glib::ustring &tooltip, const Glib::ustring &stock_id, - Glib::RefPtr<Gtk::ListStore> store ) + Glib::RefPtr<Gtk::ListStore> store, + bool has_entry) { - return new ComboToolItem(group_label, tooltip, stock_id, store); + return new ComboToolItem(group_label, tooltip, stock_id, store, has_entry); } ComboToolItem::ComboToolItem(Glib::ustring group_label, Glib::ustring tooltip, Glib::ustring stock_id, - Glib::RefPtr<Gtk::ListStore> store ) : + Glib::RefPtr<Gtk::ListStore> store, + bool has_entry) : _group_label(std::move( group_label )), _tooltip(std::move( tooltip )), _stock_id(std::move( stock_id )), @@ -63,7 +65,7 @@ ComboToolItem::ComboToolItem(Glib::ustring group_label, } // Create combobox - _combobox = Gtk::manage (new Gtk::ComboBox()); + _combobox = Gtk::manage (new Gtk::ComboBox(has_entry)); _combobox->set_model(_store); populate_combobox(); diff --git a/src/ui/widget/combo-tool-item.h b/src/ui/widget/combo-tool-item.h index 8ace006a1..d2ca874f0 100644 --- a/src/ui/widget/combo-tool-item.h +++ b/src/ui/widget/combo-tool-item.h @@ -54,7 +54,8 @@ public: static ComboToolItem* create(const Glib::ustring &label, const Glib::ustring &tooltip, const Glib::ustring &stock_id, - Glib::RefPtr<Gtk::ListStore> store ); + Glib::RefPtr<Gtk::ListStore> store, + bool has_entry = false); /* Style of combobox */ void use_label( bool use_label ); @@ -109,7 +110,8 @@ private: ComboToolItem(Glib::ustring group_label, Glib::ustring tooltip, Glib::ustring stock_id, - Glib::RefPtr<Gtk::ListStore> store ); + Glib::RefPtr<Gtk::ListStore> store, + bool has_entry = false); }; } } |
