summaryrefslogtreecommitdiffstats
path: root/src/ink-comboboxentry-action.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-04-10 20:21:08 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-04-10 20:21:08 +0000
commite30be1920be10cc0d9a79c244c890785c72f37bb (patch)
tree087727d0cd8ae9392797faeabbc2dd08a636648b /src/ink-comboboxentry-action.cpp
parent2geom: sbasis multiplication never returns sbasis of at least order a+b (diff)
downloadinkscape-e30be1920be10cc0d9a79c244c890785c72f37bb.tar.gz
inkscape-e30be1920be10cc0d9a79c244c890785c72f37bb.zip
Replace deprecated gtk_vbox_new and gtk_widget_size_request
(bzr r11213)
Diffstat (limited to 'src/ink-comboboxentry-action.cpp')
-rw-r--r--src/ink-comboboxentry-action.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ink-comboboxentry-action.cpp b/src/ink-comboboxentry-action.cpp
index b9dac24e9..6b5266709 100644
--- a/src/ink-comboboxentry-action.cpp
+++ b/src/ink-comboboxentry-action.cpp
@@ -378,7 +378,11 @@ GtkWidget* create_tool_item( GtkAction* action )
// Optionally widen the combobox width... which widens the drop-down list in list mode.
if( ink_comboboxentry_action->extra_width > 0 ) {
GtkRequisition req;
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_get_preferred_size(GTK_WIDGET(ink_comboboxentry_action->combobox), &req, NULL);
+#else
gtk_widget_size_request( GTK_WIDGET( ink_comboboxentry_action->combobox ), &req );
+#endif
gtk_widget_set_size_request( GTK_WIDGET( ink_comboboxentry_action->combobox ),
req.width + ink_comboboxentry_action->extra_width, -1 );
}
@@ -527,7 +531,11 @@ void ink_comboboxentry_action_set_extra_width( Ink_ComboBoxEntry_Action* action,
// Widget may not have been created....
if( action->combobox ) {
GtkRequisition req;
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_get_preferred_size(GTK_WIDGET(action->combobox), &req, NULL);
+#else
gtk_widget_size_request( GTK_WIDGET( action->combobox ), &req );
+#endif
gtk_widget_set_size_request( GTK_WIDGET( action->combobox ), req.width + action->extra_width, -1 );
}
}