summaryrefslogtreecommitdiffstats
path: root/src/widgets/ege-select-one-action.cpp
diff options
context:
space:
mode:
authorMoritz Eberl <moritz@semiodesk.com>2016-04-13 14:05:30 +0000
committerMoritz Eberl <moritz@semiodesk.com>2016-04-13 14:05:30 +0000
commit3a1aa63dc5df1aaebe89226e484f49289cae5f7c (patch)
tree4afa9d90d2650f27f0411bc52ef608dca5e5a88b /src/widgets/ege-select-one-action.cpp
parentMerge (diff)
parentgimpcolorwheel: Fix deprecated gtk_widget_style_attach #Hackfest2016 (diff)
downloadinkscape-3a1aa63dc5df1aaebe89226e484f49289cae5f7c.tar.gz
inkscape-3a1aa63dc5df1aaebe89226e484f49289cae5f7c.zip
Merge and fixed CMake build
(bzr r14761.1.5)
Diffstat (limited to 'src/widgets/ege-select-one-action.cpp')
-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) ) {