summaryrefslogtreecommitdiffstats
path: root/src/widgets/ink-comboboxentry-action.cpp
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2019-06-05 18:52:19 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2019-06-05 18:52:19 +0000
commit9dab826d0dd88cc29a87619e753deb23ef377d82 (patch)
treedc1834753dbb138d3bbdad6182683ef97918c251 /src/widgets/ink-comboboxentry-action.cpp
parentComboBoxToolItem: Rebase on ToolItem (diff)
downloadinkscape-9dab826d0dd88cc29a87619e753deb23ef377d82.tar.gz
inkscape-9dab826d0dd88cc29a87619e753deb23ef377d82.zip
TextToolbar: Migrate FontSize widget
Diffstat (limited to 'src/widgets/ink-comboboxentry-action.cpp')
-rw-r--r--src/widgets/ink-comboboxentry-action.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/widgets/ink-comboboxentry-action.cpp b/src/widgets/ink-comboboxentry-action.cpp
index e6145241a..10b6b708e 100644
--- a/src/widgets/ink-comboboxentry-action.cpp
+++ b/src/widgets/ink-comboboxentry-action.cpp
@@ -46,7 +46,6 @@ namespace Widget {
ComboBoxEntryToolItem::ComboBoxEntryToolItem(Glib::ustring name,
Glib::ustring label,
Glib::ustring tooltip,
- Glib::ustring stock_id,
GtkTreeModel *model,
gint entry_width,
gint extra_width,
@@ -54,7 +53,6 @@ ComboBoxEntryToolItem::ComboBoxEntryToolItem(Glib::ustring name,
void *separator_func,
GtkWidget *focusWidget)
: _label(std::move(label)),
- _stock_id(std::move(stock_id)),
_tooltip(std::move(tooltip)),
_model(model),
_entry_width(entry_width),
@@ -79,8 +77,6 @@ ComboBoxEntryToolItem::ComboBoxEntryToolItem(Glib::ustring name,
{
set_name(name);
- GtkWidget* item = nullptr;
-
gchar *action_name = g_strdup( get_name().c_str() );
gchar *combobox_name = g_strjoin( nullptr, action_name, "_combobox", NULL );
gchar *entry_name = g_strjoin( nullptr, action_name, "_entry", NULL );
@@ -167,6 +163,8 @@ ComboBoxEntryToolItem::ComboBoxEntryToolItem(Glib::ustring name,
g_signal_connect( G_OBJECT(child), "key-press-event", G_CALLBACK(keypress_cb), this );
}
+ set_tooltip(tooltip.c_str());
+
show_all();
}
@@ -373,13 +371,13 @@ ComboBoxEntryToolItem::popup_disable()
void
ComboBoxEntryToolItem::set_tooltip(const gchar* tooltip)
{
+ set_tooltip_text(tooltip);
+ gtk_widget_set_tooltip_text ( GTK_WIDGET(_combobox), tooltip);
+
// Widget may not have been created....
if( _entry ) {
gtk_widget_set_tooltip_text ( GTK_WIDGET(_entry), tooltip);
}
- if( _combobox ) {
- gtk_widget_set_tooltip_text ( GTK_WIDGET(_combobox), tooltip);
- }
}
void