| version 1.2, 2005/03/12 12:36:57 | version 1.5, 2011/01/15 16:01:52 | 
| Line 95  ok_button_clicked(GtkButton *b, gpointer | Line 95  ok_button_clicked(GtkButton *b, gpointer | 
 | BYTE val; | BYTE val; | 
 | int i; | int i; | 
 |  |  | 
 | UNUSED(b); |  | 
 |  |  | 
 | renewal = FALSE; | renewal = FALSE; | 
 | if (np2cfg.calendar != calendar_kind) { | if (np2cfg.calendar != calendar_kind) { | 
 | renewal = TRUE; | renewal = TRUE; | 
| Line 134  static void | Line 132  static void | 
 | dialog_destroy(GtkWidget *w, GtkWidget **wp) | dialog_destroy(GtkWidget *w, GtkWidget **wp) | 
 | { | { | 
 |  |  | 
 | UNUSED(wp); |  | 
 |  |  | 
 | install_idle_process(); | install_idle_process(); | 
 | gtk_widget_destroy(w); | gtk_widget_destroy(w); | 
 | } | } | 
| Line 165  static void | Line 161  static void | 
 | now_button_clicked(GtkButton *b, gpointer d) | now_button_clicked(GtkButton *b, gpointer d) | 
 | { | { | 
 |  |  | 
 | UNUSED(b); |  | 
 | UNUSED(d); |  | 
 |  |  | 
 | set_virtual_calendar(FALSE); | set_virtual_calendar(FALSE); | 
 | } | } | 
 |  |  | 
| Line 177  calendar_radiobutton_clicked(GtkButton * | Line 170  calendar_radiobutton_clicked(GtkButton * | 
 | gint virtual = (gint)d; | gint virtual = (gint)d; | 
 | int i; | int i; | 
 |  |  | 
 | UNUSED(b); |  | 
 |  |  | 
 | calendar_kind = virtual ? 0 : 1; | calendar_kind = virtual ? 0 : 1; | 
 |  |  | 
 | for (i = 0; i < NELEMENTS(vircal); i++) { | for (i = 0; i < NELEMENTS(vircal); i++) { | 
| Line 209  create_calendar_dialog(void) | Line 200  create_calendar_dialog(void) | 
 | gtk_container_set_border_width(GTK_CONTAINER(calendar_dialog), 5); | gtk_container_set_border_width(GTK_CONTAINER(calendar_dialog), 5); | 
 |  |  | 
 | g_signal_connect(GTK_OBJECT(calendar_dialog), "destroy", | g_signal_connect(GTK_OBJECT(calendar_dialog), "destroy", | 
| GTK_SIGNAL_FUNC(dialog_destroy), NULL); | G_CALLBACK(dialog_destroy), NULL); | 
 |  |  | 
 | main_widget = gtk_table_new(4, 6, FALSE); | main_widget = gtk_table_new(4, 6, FALSE); | 
 | gtk_widget_show(main_widget); | gtk_widget_show(main_widget); | 
| Line 223  create_calendar_dialog(void) | Line 214  create_calendar_dialog(void) | 
 | gtk_widget_show(calendar_radiobutton[i]); | gtk_widget_show(calendar_radiobutton[i]); | 
 | gtk_table_attach_defaults(GTK_TABLE(main_widget), | gtk_table_attach_defaults(GTK_TABLE(main_widget), | 
 | calendar_radiobutton[i], 0, 3, i, i+1); | calendar_radiobutton[i], 0, 3, i, i+1); | 
| GTK_WIDGET_UNSET_FLAGS(calendar_radiobutton[i], GTK_CAN_FOCUS); | gtk_widget_set_can_focus(calendar_radiobutton[i], FALSE); | 
 | g_signal_connect(GTK_OBJECT(calendar_radiobutton[i]), | g_signal_connect(GTK_OBJECT(calendar_radiobutton[i]), | 
| "clicked", GTK_SIGNAL_FUNC(calendar_radiobutton_clicked), | "clicked", G_CALLBACK(calendar_radiobutton_clicked), | 
 | (gpointer)i); | (gpointer)i); | 
 | } | } | 
 |  |  | 
| Line 269  create_calendar_dialog(void) | Line 260  create_calendar_dialog(void) | 
 | gtk_table_attach_defaults(GTK_TABLE(calendar_widget), now_button, | gtk_table_attach_defaults(GTK_TABLE(calendar_widget), now_button, | 
 | 6, 7, 1, 2); | 6, 7, 1, 2); | 
 | g_signal_connect(GTK_OBJECT(now_button), "clicked", | g_signal_connect(GTK_OBJECT(now_button), "clicked", | 
| GTK_SIGNAL_FUNC(now_button_clicked), NULL); | G_CALLBACK(now_button_clicked), NULL); | 
 |  |  | 
 | /* update to current state */ | /* update to current state */ | 
 | set_virtual_calendar(TRUE); | set_virtual_calendar(TRUE); | 
| Line 282  create_calendar_dialog(void) | Line 273  create_calendar_dialog(void) | 
 | gtk_widget_show(ok_button); | gtk_widget_show(ok_button); | 
 | gtk_container_set_border_width(GTK_CONTAINER(ok_button), 2); | gtk_container_set_border_width(GTK_CONTAINER(ok_button), 2); | 
 | gtk_table_attach_defaults(GTK_TABLE(main_widget),ok_button, 4, 6, 0, 1); | gtk_table_attach_defaults(GTK_TABLE(main_widget),ok_button, 4, 6, 0, 1); | 
| GTK_WIDGET_SET_FLAGS(ok_button, GTK_CAN_DEFAULT); | gtk_widget_set_can_default(ok_button, TRUE); | 
| GTK_WIDGET_SET_FLAGS(ok_button, GTK_HAS_DEFAULT); | gtk_widget_has_default(ok_button); | 
 | g_signal_connect(GTK_OBJECT(ok_button), "clicked", | g_signal_connect(GTK_OBJECT(ok_button), "clicked", | 
| GTK_SIGNAL_FUNC(ok_button_clicked), (gpointer)calendar_dialog); | G_CALLBACK(ok_button_clicked), (gpointer)calendar_dialog); | 
 | gtk_widget_grab_default(ok_button); | gtk_widget_grab_default(ok_button); | 
 |  |  | 
 | cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); | cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); | 
| Line 294  create_calendar_dialog(void) | Line 285  create_calendar_dialog(void) | 
 | gtk_table_attach_defaults(GTK_TABLE(main_widget), cancel_button, | gtk_table_attach_defaults(GTK_TABLE(main_widget), cancel_button, | 
 | 4, 6, 1, 2); | 4, 6, 1, 2); | 
 | g_signal_connect_swapped(GTK_OBJECT(cancel_button), "clicked", | g_signal_connect_swapped(GTK_OBJECT(cancel_button), "clicked", | 
| GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(calendar_dialog)); | G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(calendar_dialog)); | 
 |  |  | 
 | gtk_widget_show_all(calendar_dialog); | gtk_widget_show_all(calendar_dialog); | 
 | } | } |