00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <libheraia.h>
00026
00027 static void pref_window_close(GtkWidget *widget, gpointer data);
00028 static gboolean pref_window_delete(GtkWidget *widget, GdkEvent *event, gpointer data);
00029 static void main_pref_window_connect_signals(heraia_window_t *main_window);
00030
00031
00032 static void on_mp_tb_fp_bt_clicked(GtkToolButton *toolbutton, gpointer data);
00033
00034
00035
00036
00040 static gboolean pref_window_delete(GtkWidget *widget, GdkEvent *event, gpointer data)
00041 {
00042 heraia_window_t *main_window = (heraia_window_t *) data;
00043 GtkWidget *pref_window = NULL;
00044
00045 if (main_window != NULL && main_window->win_prop != NULL && main_window->win_prop->main_pref_window != NULL)
00046 {
00047 pref_window = heraia_get_widget(main_window->xmls->main, "main_preferences_window");
00048 save_main_preferences(main_window);
00049 record_and_hide_dialog_box(pref_window, main_window->win_prop->main_pref_window);
00050 }
00051
00052 return TRUE;
00053 }
00054
00058 static void main_pref_window_connect_signals(heraia_window_t *main_window)
00059 {
00060
00061 g_signal_connect(G_OBJECT(heraia_get_widget(main_window->xmls->main, "main_preferences_window")), "delete-event",
00062 G_CALLBACK(pref_window_delete), main_window);
00063
00064
00065 g_signal_connect(G_OBJECT(heraia_get_widget(main_window->xmls->main, "mp_tb_fp_bt")), "clicked",
00066 G_CALLBACK(on_mp_tb_fp_bt_clicked), main_window);
00067 }
00068
00069
00077 static void on_mp_tb_fp_bt_clicked(GtkToolButton *toolbutton, gpointer data)
00078 {
00079 heraia_window_t *main_window = (heraia_window_t *) data;
00080 GtkWidget *notebook = NULL;
00081
00082 if (main_window != NULL && main_window->xmls != NULL && main_window->xmls->main != NULL)
00083 {
00084 notebook = heraia_get_widget(main_window->xmls->main, "mp_first_notebook");
00085 gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 0);
00086 }
00087 }
00088
00089
00090
00091
00095 void main_pref_window_init_interface(heraia_window_t *main_window)
00096 {
00097 main_pref_window_connect_signals(main_window);
00098 }