summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-09-12 06:31:44 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-09-12 06:31:44 +0000
commitc7f3577f6c28f0a4f452b194a39e910cdb193e02 (patch)
tree18d2304f57aae41b3e8bb4d7b628e3fe57958e2e /src/ui/widget
parentRemove a lonly header noticed by Maren (diff)
downloadinkscape-c7f3577f6c28f0a4f452b194a39e910cdb193e02.tar.gz
inkscape-c7f3577f6c28f0a4f452b194a39e910cdb193e02.zip
Fix non changing value on combobox. This can also be used in other toolbars
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/combo-box-entry-tool-item.cpp8
-rw-r--r--src/ui/widget/combo-box-entry-tool-item.h1
-rw-r--r--src/ui/widget/combo-tool-item.cpp9
-rw-r--r--src/ui/widget/combo-tool-item.h1
4 files changed, 17 insertions, 2 deletions
diff --git a/src/ui/widget/combo-box-entry-tool-item.cpp b/src/ui/widget/combo-box-entry-tool-item.cpp
index 48f9cb856..f3786c6f6 100644
--- a/src/ui/widget/combo-box-entry-tool-item.cpp
+++ b/src/ui/widget/combo-box-entry-tool-item.cpp
@@ -335,6 +335,14 @@ ComboBoxEntryToolItem::set_extra_width( gint extra_width )
}
void
+ComboBoxEntryToolItem::focus_on_click( bool focus_on_click )
+{
+ if (_combobox) {
+ gtk_widget_set_focus_on_click(GTK_WIDGET(_combobox), focus_on_click);
+ }
+}
+
+void
ComboBoxEntryToolItem::popup_enable()
{
_popup = true;
diff --git a/src/ui/widget/combo-box-entry-tool-item.h b/src/ui/widget/combo-box-entry-tool-item.h
index 2c2b71542..3d6440aff 100644
--- a/src/ui/widget/combo-box-entry-tool-item.h
+++ b/src/ui/widget/combo-box-entry-tool-item.h
@@ -102,6 +102,7 @@ public:
void popup_enable();
void popup_disable();
+ void focus_on_click( bool focus_on_click );
void set_info( const gchar* info );
void set_info_cb( gpointer info_cb );
diff --git a/src/ui/widget/combo-tool-item.cpp b/src/ui/widget/combo-tool-item.cpp
index c3adf921f..ce366d0fc 100644
--- a/src/ui/widget/combo-tool-item.cpp
+++ b/src/ui/widget/combo-tool-item.cpp
@@ -58,7 +58,6 @@ ComboToolItem::ComboToolItem(Glib::ustring group_label,
{
Gtk::Box* box = Gtk::manage(new Gtk::Box());
add(*box);
-
if (_use_group_label) {
Gtk::Label *group_label = Gtk::manage (new Gtk::Label( _group_label + ": " ));
box->add( *group_label );
@@ -72,13 +71,19 @@ ComboToolItem::ComboToolItem(Glib::ustring group_label,
_combobox->signal_changed().connect(
sigc::mem_fun(*this, &ComboToolItem::on_changed_combobox));
-
box->add (*_combobox);
show_all();
}
void
+ComboToolItem::focus_on_click( bool focus_on_click )
+{
+ _combobox->set_focus_on_click(focus_on_click);
+}
+
+
+void
ComboToolItem::use_label(bool use_label)
{
_use_label = use_label;
diff --git a/src/ui/widget/combo-tool-item.h b/src/ui/widget/combo-tool-item.h
index 6a612256f..125208239 100644
--- a/src/ui/widget/combo-tool-item.h
+++ b/src/ui/widget/combo-tool-item.h
@@ -62,6 +62,7 @@ public:
/* Style of combobox */
void use_label( bool use_label );
void use_icon( bool use_icon );
+ void focus_on_click( bool focus_on_click );
void use_pixbuf( bool use_pixbuf );
void use_group_label( bool use_group_label ) { _use_group_label = use_group_label; }