summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2016-04-12 23:22:35 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2016-04-12 23:22:35 +0000
commit5d51cbdde8990a564d60e38ab121b31b97ba110d (patch)
treeecf7d683b4ebae73bcc67317e3079ce4a2304c9f
parentspw-utilities: Fix deprecated gtk_misc_set_alignment #Hackfest2016 (diff)
downloadinkscape-5d51cbdde8990a564d60e38ab121b31b97ba110d.tar.gz
inkscape-5d51cbdde8990a564d60e38ab121b31b97ba110d.zip
ege-select-one-action: Fix deprecated GtkAlignment #Hackfest2016
(bzr r14806)
-rw-r--r--src/widgets/ege-select-one-action.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/widgets/ege-select-one-action.cpp b/src/widgets/ege-select-one-action.cpp
index ab86c49f8..2e106154e 100644
--- a/src/widgets/ege-select-one-action.cpp
+++ b/src/widgets/ege-select-one-action.cpp
@@ -818,9 +818,14 @@ GtkWidget* create_tool_item( GtkAction* action )
gtk_box_pack_start( GTK_BOX(holder), normal, FALSE, FALSE, 0 );
{
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_halign(holder, GTK_ALIGN_START);
+ gtk_container_add(GTK_CONTAINER(item), holder);
+#else
GtkWidget *align = gtk_alignment_new(0, 0.5, 0, 0);
gtk_container_add( GTK_CONTAINER(align), holder);
gtk_container_add( GTK_CONTAINER(item), align );
+#endif
}
}
@@ -855,10 +860,14 @@ void resync_active( EgeSelectOneAction* act, gint active, gboolean override )
GList* children = gtk_container_get_children( GTK_CONTAINER(proxies->data) );
if ( children && children->data ) {
gpointer combodata = g_object_get_data( G_OBJECT(children->data), "ege-combo-box" );
+
+#if !GTK_CHECK_VERSION(3,0,0)
if (!combodata && GTK_IS_ALIGNMENT(children->data)) {
GList *other = gtk_container_get_children( GTK_CONTAINER(children->data) );
combodata = g_object_get_data( G_OBJECT(other->data), "ege-combo-box" );
}
+#endif
+
if ( GTK_IS_COMBO_BOX(combodata) ) {
GtkComboBox* combo = GTK_COMBO_BOX(combodata);
if ((active == -1) && (gtk_combo_box_get_has_entry(combo))) {
@@ -915,10 +924,14 @@ void resync_sensitive( EgeSelectOneAction* act )
GList* children = gtk_container_get_children( GTK_CONTAINER(proxies->data) );
if ( children && children->data ) {
gpointer combodata = g_object_get_data( G_OBJECT(children->data), "ege-combo-box" );
+
+#if !GTK_CHECK_VERSION(3,0,0)
if (!combodata && GTK_IS_ALIGNMENT(children->data)) {
GList *other = gtk_container_get_children( GTK_CONTAINER(children->data) );
combodata = g_object_get_data( G_OBJECT(other->data), "ege-combo-box" );
}
+#endif
+
if ( GTK_IS_COMBO_BOX(combodata) ) {
/* Not implemented */
} else if ( GTK_IS_BOX(children->data) ) {