control panel plugin - fix order of checkboxes
authorPali Rohár <pali.rohar@gmail.com>
Fri, 20 Jul 2012 09:38:29 +0000 (11:38 +0200)
committerPali Rohár <pali.rohar@gmail.com>
Fri, 20 Jul 2012 09:41:30 +0000 (11:41 +0200)
src/usr/lib/hildon-control-panel/libcallnotify.c

index 4d5754c..f0f2560 100644 (file)
@@ -42,12 +42,12 @@ osso_return_t execute(osso_context_t *osso, gpointer data, gboolean user_activat
        btnVisual = (GtkWidget*)hildon_check_button_new(HILDON_SIZE_FULLSCREEN_WIDTH | HILDON_SIZE_FINGER_HEIGHT);
        gtk_button_set_label (GTK_BUTTON (btnVisual), "Visual Notification");
 
-       btnVibrate = (GtkWidget*)hildon_check_button_new(HILDON_SIZE_FULLSCREEN_WIDTH | HILDON_SIZE_FINGER_HEIGHT);
-       gtk_button_set_label (GTK_BUTTON (btnVibrate), "Vibrate Notification");
-
        btnSound = (GtkWidget*)hildon_check_button_new(HILDON_SIZE_FULLSCREEN_WIDTH | HILDON_SIZE_FINGER_HEIGHT);
        gtk_button_set_label (GTK_BUTTON (btnSound), "Sound Notification");
 
+       btnVibrate = (GtkWidget*)hildon_check_button_new(HILDON_SIZE_FULLSCREEN_WIDTH | HILDON_SIZE_FINGER_HEIGHT);
+       gtk_button_set_label (GTK_BUTTON (btnVibrate), "Vibrate Notification");
+
        lblText = (GtkWidget*)gtk_label_new("Please select notification interval:");
 
 
@@ -55,8 +55,8 @@ osso_return_t execute(osso_context_t *osso, gpointer data, gboolean user_activat
        adj = gtk_range_get_adjustment(GTK_RANGE(slider));
 
        hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVisual), TRUE);
-       hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVibrate) , TRUE);
        hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnSound), TRUE);
+       hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVibrate) , TRUE);
 
        inputFilePtr = fopen("/home/user/.config/CallNotify/conf.txt", "r");
 
@@ -69,9 +69,9 @@ osso_return_t execute(osso_context_t *osso, gpointer data, gboolean user_activat
                if (fileContent[0]=='n')
                        hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVisual), FALSE);
                if (fileContent[2]=='n')
-                       hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVibrate) , FALSE);
-               if (fileContent[4]=='n')
                        hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnSound), FALSE);
+               if (fileContent[4]=='n')
+                       hildon_check_button_set_active (HILDON_CHECK_BUTTON(btnVibrate) , FALSE);
 
                (char*)strtok(fileContent, ";");
                (char*)strtok(NULL, ";");
@@ -98,8 +98,8 @@ osso_return_t execute(osso_context_t *osso, gpointer data, gboolean user_activat
        gtk_adjustment_set_value(adj, sldValue);
 
        gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),     btnVisual);
-       gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),     btnVibrate);
        gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),     btnSound);
+       gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),     btnVibrate);
        gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),     lblText);
        gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),     slider);
 
@@ -122,8 +122,8 @@ osso_return_t execute(osso_context_t *osso, gpointer data, gboolean user_activat
                if (inputFilePtr != NULL)
                {
                        a = hildon_check_button_get_active(HILDON_CHECK_BUTTON(btnVisual)) ? 'y' : 'n';
-                       b = hildon_check_button_get_active(HILDON_CHECK_BUTTON(btnVibrate)) ? 'y' : 'n';
-                       c = hildon_check_button_get_active(HILDON_CHECK_BUTTON(btnSound)) ? 'y' : 'n';
+                       b = hildon_check_button_get_active(HILDON_CHECK_BUTTON(btnSound)) ? 'y' : 'n';
+                       c = hildon_check_button_get_active(HILDON_CHECK_BUTTON(btnVibrate)) ? 'y' : 'n';
 
                        newValue = gtk_adjustment_get_value(adj);