|
|
| version 1.3, 2009/03/05 11:50:39 | version 1.7, 2012/01/23 04:03:22 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ */ | |
| /* | /* |
| * Copyright (c) 2003 NONAKA Kimihiro | * Copyright (c) 2003 NONAKA Kimihiro |
| * All rights reserved. | * All rights reserved. |
| Line 95 ok_button_clicked(GtkButton *b, gpointer | Line 93 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 130 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 159 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); |
| } | } |
| static void | static void |
| calendar_radiobutton_clicked(GtkButton *b, gpointer d) | calendar_radiobutton_clicked(GtkButton *b, gpointer d) |
| { | { |
| gint virtual = (gint)d; | gint virtual = GPOINTER_TO_UINT(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 219 create_calendar_dialog(void) | Line 208 create_calendar_dialog(void) |
| * calendar kind radiobutton | * calendar kind radiobutton |
| */ | */ |
| for (i = 0; i < NELEMENTS(calendar_kind_str); i++) { | for (i = 0; i < NELEMENTS(calendar_kind_str); i++) { |
| calendar_radiobutton[i] = gtk_radio_button_new_with_label_from_widget(i > 0 ? GTK_RADIO_BUTTON(calendar_radiobutton[i-1]) : NULL, calendar_kind_str[i]); | calendar_radiobutton[i] = |
| gtk_radio_button_new_with_label_from_widget( | |
| (i > 0) ? GTK_RADIO_BUTTON(calendar_radiobutton[i-1]) | |
| : NULL, calendar_kind_str[i]); | |
| 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", G_CALLBACK(calendar_radiobutton_clicked), | "clicked", G_CALLBACK(calendar_radiobutton_clicked), |
| (gpointer)i); | GUINT_TO_POINTER(i)); |
| } | } |
| /* | /* |
| Line 282 create_calendar_dialog(void) | Line 274 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", |
| G_CALLBACK(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); |