From 6ed36be9f01f34d8701fde2cde599e369dc1c3fe Mon Sep 17 00:00:00 2001 From: joncruz Date: Sun, 15 Apr 2007 05:22:28 +0000 Subject: [PATCH] Work-around code for GTK+ 2.8 compatibility (gtk+ 2.10 required RSN) --- src/ege-select-one-action.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ege-select-one-action.cpp b/src/ege-select-one-action.cpp index 9c4ee2689..636da6e4b 100644 --- a/src/ege-select-one-action.cpp +++ b/src/ege-select-one-action.cpp @@ -617,7 +617,19 @@ void resync_active( EgeSelectOneAction* act, gint active ) GtkRadioAction* oneAction = GTK_RADIO_ACTION(group->data); gint hot = gtk_radio_action_get_current_value( oneAction ); if ( hot != active ) { - gtk_radio_action_set_current_value( oneAction, active ); + /*gtk_radio_action_set_current_value( oneAction, active );*/ + gint value = 0; + while ( group ) { + GtkRadioAction* possible = GTK_RADIO_ACTION(group->data); + g_object_get( G_OBJECT(possible), "value", &value, NULL ); + if ( value == active ) { + /* Found the group member to set active */ + gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(possible), TRUE ); + break; + } + + group = g_slist_next(group); + } } } } -- 2.30.2