Code

Work-around code for GTK+ 2.8 compatibility (gtk+ 2.10 required RSN)
authorjoncruz <joncruz@users.sourceforge.net>
Sun, 15 Apr 2007 05:22:28 +0000 (05:22 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Sun, 15 Apr 2007 05:22:28 +0000 (05:22 +0000)
src/ege-select-one-action.cpp

index 9c4ee268919fcd3eb487d607faad69545f7bda71..636da6e4b684d02f6f06f50c36c29bd6af944403 100644 (file)
@@ -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);
+                                }
                             }
                         }
                     }