From 217df92d8936b397884c72a2f5f3419f0c4a165f Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Fri, 22 Jun 2012 21:46:28 +0000 Subject: Version avec des ToggleButons (qui sont en fait des radiobuttons) qui marche Reste à intégrer mes GtkProgressBar... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///var/svn/2012-violon-leds/trunk@27 6be1fa4d-33ac-4c33-becc-79fcb3794bb6 --- tests/test7/gui.glade | 31 ++++++++++++++++++------------ tests/test7/test7.c | 52 +++++++++++++-------------------------------------- 2 files changed, 32 insertions(+), 51 deletions(-) (limited to 'tests/test7') diff --git a/tests/test7/gui.glade b/tests/test7/gui.glade index 67819e8..f91b0d7 100644 --- a/tests/test7/gui.glade +++ b/tests/test7/gui.glade @@ -809,21 +809,24 @@ copy of the Program in return for a fee. 2 2 - + True True - True + False action1 - + True + - + True True - True + False action2 - + True + radbut_func1 + 1 @@ -831,12 +834,14 @@ copy of the Program in return for a fee. - + True True - True + False action3 - + True + radbut_func1 + 1 @@ -844,12 +849,14 @@ copy of the Program in return for a fee. - + True True - True + False action4 - + True + radbut_func1 + 1 diff --git a/tests/test7/test7.c b/tests/test7/test7.c index 158ead2..7f557ca 100644 --- a/tests/test7/test7.c +++ b/tests/test7/test7.c @@ -6,6 +6,12 @@ GtkBuilder *builder=NULL; GtkToggleButton *buttons[FUNC_COUNT]={NULL}; +// Applicative actions +void switch_to_func(gint func_id) { + printf("switch_to_func(%i)\n", func_id); +} + +// GUI events void on_win_main_destroy(GtkObject *object, gpointer user_data) { gtk_main_quit(); } @@ -22,47 +28,15 @@ void on_mi_about_activate(GtkObject *object, gpointer user_data) { gtk_widget_show_all(GTK_WIDGET(dialog)); } -void switch_to_func(gint func_id) { - gint i; - // Toggle off all buttons but the active one - for (i=0;i