Doh. Fixed stupid bug where the classification buttons were not being set
1998-11-16 Federico Mena Quintero <federico@nuclecu.unam.mx> * eventedit.c (ee_classification_widgets): Doh. Fixed stupid bug where the classification buttons were not being set correctly. (ee_store_general_values_to_ical): Take into account the fact that radio group lists are stored in reverse order of insertion. * gncal-todo.c (gncal_todo_init): Use a scrolled window to put the clist into. svn path=/trunk/; revision=475
This commit is contained in:

committed by
Arturo Espinosa

parent
0a730e6874
commit
a24713d8b3
@ -1,5 +1,10 @@
|
|||||||
1998-11-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1998-11-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* eventedit.c (ee_classification_widgets): Doh. Fixed stupid bug
|
||||||
|
where the classification buttons were not being set correctly.
|
||||||
|
(ee_store_general_values_to_ical): Take into account the fact that
|
||||||
|
radio group lists are stored in reverse order of insertion.
|
||||||
|
|
||||||
* gncal-todo.c (gncal_todo_init): Use a scrolled window to put the
|
* gncal-todo.c (gncal_todo_init): Use a scrolled window to put the
|
||||||
clist into.
|
clist into.
|
||||||
|
|
||||||
|
@ -404,11 +404,11 @@ ee_classification_widgets (EventEditor *ee)
|
|||||||
gtk_box_pack_start (GTK_BOX (hbox), rpriv, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), rpriv, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), rconf, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), rconf, FALSE, FALSE, 0);
|
||||||
|
|
||||||
if (strcmp (ee->ical->class, class_names[0]))
|
if (strcmp (ee->ical->class, class_names[0]) == 0)
|
||||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpub), TRUE);
|
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpub), TRUE);
|
||||||
else if (strcmp (ee->ical->class, class_names[1]))
|
else if (strcmp (ee->ical->class, class_names[1]) == 0)
|
||||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpriv), TRUE);
|
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpriv), TRUE);
|
||||||
else if (strcmp (ee->ical->class, class_names[2]))
|
else if (strcmp (ee->ical->class, class_names[2]) == 0)
|
||||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rconf), TRUE);
|
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rconf), TRUE);
|
||||||
|
|
||||||
ee->general_radios = rpub;
|
ee->general_radios = rpub;
|
||||||
@ -478,11 +478,12 @@ ee_store_general_values_to_ical (EventEditor *ee)
|
|||||||
ee_store_alarm (&ical->palarm, ALARM_PROGRAM);
|
ee_store_alarm (&ical->palarm, ALARM_PROGRAM);
|
||||||
ee_store_alarm (&ical->malarm, ALARM_MAIL);
|
ee_store_alarm (&ical->malarm, ALARM_MAIL);
|
||||||
|
|
||||||
for (idx = 0; list; list = list->next) {
|
for (idx = 2; list; list = list->next) {
|
||||||
if (GTK_TOGGLE_BUTTON (list->data)->active)
|
if (GTK_TOGGLE_BUTTON (list->data)->active)
|
||||||
break;
|
break;
|
||||||
idx++;
|
idx--; /* The group is stored in reverse order of insertion */
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (ical->class);
|
g_free (ical->class);
|
||||||
ical->class = g_strdup (class_names [idx]);
|
ical->class = g_strdup (class_names [idx]);
|
||||||
}
|
}
|
||||||
|
@ -404,11 +404,11 @@ ee_classification_widgets (EventEditor *ee)
|
|||||||
gtk_box_pack_start (GTK_BOX (hbox), rpriv, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), rpriv, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), rconf, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), rconf, FALSE, FALSE, 0);
|
||||||
|
|
||||||
if (strcmp (ee->ical->class, class_names[0]))
|
if (strcmp (ee->ical->class, class_names[0]) == 0)
|
||||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpub), TRUE);
|
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpub), TRUE);
|
||||||
else if (strcmp (ee->ical->class, class_names[1]))
|
else if (strcmp (ee->ical->class, class_names[1]) == 0)
|
||||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpriv), TRUE);
|
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpriv), TRUE);
|
||||||
else if (strcmp (ee->ical->class, class_names[2]))
|
else if (strcmp (ee->ical->class, class_names[2]) == 0)
|
||||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rconf), TRUE);
|
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rconf), TRUE);
|
||||||
|
|
||||||
ee->general_radios = rpub;
|
ee->general_radios = rpub;
|
||||||
@ -478,11 +478,12 @@ ee_store_general_values_to_ical (EventEditor *ee)
|
|||||||
ee_store_alarm (&ical->palarm, ALARM_PROGRAM);
|
ee_store_alarm (&ical->palarm, ALARM_PROGRAM);
|
||||||
ee_store_alarm (&ical->malarm, ALARM_MAIL);
|
ee_store_alarm (&ical->malarm, ALARM_MAIL);
|
||||||
|
|
||||||
for (idx = 0; list; list = list->next) {
|
for (idx = 2; list; list = list->next) {
|
||||||
if (GTK_TOGGLE_BUTTON (list->data)->active)
|
if (GTK_TOGGLE_BUTTON (list->data)->active)
|
||||||
break;
|
break;
|
||||||
idx++;
|
idx--; /* The group is stored in reverse order of insertion */
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (ical->class);
|
g_free (ical->class);
|
||||||
ical->class = g_strdup (class_names [idx]);
|
ical->class = g_strdup (class_names [idx]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user