/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include "misc3_callbacks.h" #include "misc3_interface.h" #include "support.h" #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) GtkWidget* create_window_bets (void) { GtkWidget *window_bets; GtkWidget *vbox1; GtkWidget *label1; GtkWidget *hseparator1; GtkWidget *hbox1; GtkWidget *checkbutton_bet_all_leagues; GtkWidget *checkbutton_bet_cups; GtkWidget *checkbutton_bet_user_recent; GtkWidget *hseparator2; GtkWidget *scrolledwindow1; GtkWidget *treeview_bets; GtkWidget *button_bet_close; GtkAccelGroup *accel_group; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); accel_group = gtk_accel_group_new (); window_bets = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width (GTK_CONTAINER (window_bets), 5); gtk_window_set_position (GTK_WINDOW (window_bets), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (window_bets), TRUE); gtk_window_set_default_size (GTK_WINDOW (window_bets), 600, 700); vbox1 = gtk_vbox_new (FALSE, 3); gtk_widget_show (vbox1); gtk_container_add (GTK_CONTAINER (window_bets), vbox1); label1 = gtk_label_new (_("Betting -- Left click on odd to place or remove bet")); gtk_widget_show (label1); gtk_box_pack_start (GTK_BOX (vbox1), label1, FALSE, FALSE, 0); hseparator1 = gtk_hseparator_new (); gtk_widget_show (hseparator1); gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 0); gtk_widget_set_size_request (hseparator1, 1, 10); hbox1 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); checkbutton_bet_all_leagues = gtk_check_button_new_with_mnemonic (_("Show matches from all leagues")); gtk_widget_show (checkbutton_bet_all_leagues); gtk_box_pack_start (GTK_BOX (hbox1), checkbutton_bet_all_leagues, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, checkbutton_bet_all_leagues, _("Whether to show matches of all leagues. Use the options window to toggle permanently."), NULL); checkbutton_bet_cups = gtk_check_button_new_with_mnemonic (_("Show matches from cups")); gtk_widget_show (checkbutton_bet_cups); gtk_box_pack_start (GTK_BOX (hbox1), checkbutton_bet_cups, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, checkbutton_bet_cups, _("Whether to show cup matches. Use the options window to toggle permanently."), NULL); checkbutton_bet_user_recent = gtk_check_button_new_with_mnemonic (_("Show only my recent bets")); gtk_widget_show (checkbutton_bet_user_recent); gtk_box_pack_start (GTK_BOX (hbox1), checkbutton_bet_user_recent, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, checkbutton_bet_user_recent, _("Whether to show only your bets in the recent bets list"), NULL); hseparator2 = gtk_hseparator_new (); gtk_widget_show (hseparator2); gtk_box_pack_start (GTK_BOX (vbox1), hseparator2, FALSE, FALSE, 0); gtk_widget_set_size_request (hseparator2, 1, 10); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow1, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_IN); treeview_bets = gtk_tree_view_new (); gtk_widget_show (treeview_bets); gtk_container_add (GTK_CONTAINER (scrolledwindow1), treeview_bets); button_bet_close = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (button_bet_close); gtk_box_pack_start (GTK_BOX (vbox1), button_bet_close, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_bet_close, _("Esc"), NULL); gtk_widget_add_accelerator (button_bet_close, "clicked", accel_group, GDK_Escape, (GdkModifierType) 0, GTK_ACCEL_VISIBLE); g_signal_connect ((gpointer) window_bets, "delete_event", G_CALLBACK (on_window_bets_delete_event), NULL); g_signal_connect ((gpointer) checkbutton_bet_all_leagues, "button_press_event", G_CALLBACK (on_checkbutton_bet_all_leagues_button_press_event), NULL); g_signal_connect ((gpointer) checkbutton_bet_cups, "button_press_event", G_CALLBACK (on_checkbutton_bet_cups_button_press_event), NULL); g_signal_connect ((gpointer) checkbutton_bet_user_recent, "button_press_event", G_CALLBACK (on_checkbutton_bet_user_recent_button_press_event), NULL); g_signal_connect ((gpointer) treeview_bets, "button_press_event", G_CALLBACK (on_treeview_bets_button_press_event), NULL); g_signal_connect ((gpointer) button_bet_close, "clicked", G_CALLBACK (on_button_bet_close_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (window_bets, window_bets, "window_bets"); GLADE_HOOKUP_OBJECT (window_bets, vbox1, "vbox1"); GLADE_HOOKUP_OBJECT (window_bets, label1, "label1"); GLADE_HOOKUP_OBJECT (window_bets, hseparator1, "hseparator1"); GLADE_HOOKUP_OBJECT (window_bets, hbox1, "hbox1"); GLADE_HOOKUP_OBJECT (window_bets, checkbutton_bet_all_leagues, "checkbutton_bet_all_leagues"); GLADE_HOOKUP_OBJECT (window_bets, checkbutton_bet_cups, "checkbutton_bet_cups"); GLADE_HOOKUP_OBJECT (window_bets, checkbutton_bet_user_recent, "checkbutton_bet_user_recent"); GLADE_HOOKUP_OBJECT (window_bets, hseparator2, "hseparator2"); GLADE_HOOKUP_OBJECT (window_bets, scrolledwindow1, "scrolledwindow1"); GLADE_HOOKUP_OBJECT (window_bets, treeview_bets, "treeview_bets"); GLADE_HOOKUP_OBJECT (window_bets, button_bet_close, "button_bet_close"); GLADE_HOOKUP_OBJECT_NO_REF (window_bets, tooltips, "tooltips"); gtk_window_add_accel_group (GTK_WINDOW (window_bets), accel_group); return window_bets; } GtkWidget* create_window_splash (void) { GtkWidget *window_splash; GtkWidget *vbox2; GtkWidget *notebook1; GtkWidget *image1; GtkWidget *label2; GtkWidget *scrolledwindow2; GtkWidget *treeview_splash_contributors; GtkWidget *label3; GtkWidget *hseparator3; GtkWidget *vbox3; GtkWidget *hbox2; GtkWidget *image2; GtkWidget *label4; GtkWidget *label_splash_hintcounter; GtkWidget *label_splash_hint; GtkWidget *hbox10; GtkWidget *button_splash_hint_back; GtkWidget *alignment4; GtkWidget *hbox8; GtkWidget *image6; GtkWidget *label11; GtkWidget *button_splash_hint_next; GtkWidget *alignment5; GtkWidget *hbox9; GtkWidget *image7; GtkWidget *label12; GtkWidget *hseparator4; GtkWidget *hbox3; GtkWidget *button_splash_new_game; GtkWidget *alignment1; GtkWidget *hbox4; GtkWidget *image3; GtkWidget *label7; GtkWidget *button_splash_load_game; GtkWidget *alignment2; GtkWidget *hbox5; GtkWidget *image4; GtkWidget *label8; GtkWidget *button_splash_resume_game; GtkWidget *alignment3; GtkWidget *hbox6; GtkWidget *image5; GtkWidget *label9; GtkWidget *button_splash_quit; GtkWidget *hbox7; GtkWidget *label_splash_progress; GtkWidget *progressbar_splash; GtkAccelGroup *accel_group; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); accel_group = gtk_accel_group_new (); window_splash = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width (GTK_CONTAINER (window_splash), 5); gtk_window_set_position (GTK_WINDOW (window_splash), GTK_WIN_POS_CENTER_ALWAYS); vbox2 = gtk_vbox_new (FALSE, 3); gtk_widget_show (vbox2); gtk_container_add (GTK_CONTAINER (window_splash), vbox2); notebook1 = gtk_notebook_new (); gtk_widget_show (notebook1); gtk_box_pack_start (GTK_BOX (vbox2), notebook1, TRUE, TRUE, 0); image1 = create_pixmap (window_splash, "bygfoot_splash.png"); gtk_widget_show (image1); gtk_container_add (GTK_CONTAINER (notebook1), image1); label2 = gtk_label_new (" "); gtk_widget_show (label2); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label2); scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow2); gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow2); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_SHADOW_IN); treeview_splash_contributors = gtk_tree_view_new (); gtk_widget_show (treeview_splash_contributors); gtk_container_add (GTK_CONTAINER (scrolledwindow2), treeview_splash_contributors); label3 = gtk_label_new (_("Contributors")); gtk_widget_show (label3); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label3); hseparator3 = gtk_hseparator_new (); gtk_widget_show (hseparator3); gtk_box_pack_start (GTK_BOX (vbox2), hseparator3, FALSE, FALSE, 0); gtk_widget_set_size_request (hseparator3, 1, 10); vbox3 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox3); gtk_box_pack_start (GTK_BOX (vbox2), vbox3, TRUE, TRUE, 0); hbox2 = gtk_hbox_new (FALSE, 3); gtk_widget_show (hbox2); gtk_box_pack_start (GTK_BOX (vbox3), hbox2, FALSE, FALSE, 0); image2 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_DND); gtk_widget_show (image2); gtk_box_pack_start (GTK_BOX (hbox2), image2, FALSE, FALSE, 0); /* Splash screen hint question. */ label4 = gtk_label_new (_("Did you know?")); gtk_widget_show (label4); gtk_box_pack_start (GTK_BOX (hbox2), label4, FALSE, FALSE, 0); gtk_label_set_use_markup (GTK_LABEL (label4), TRUE); label_splash_hintcounter = gtk_label_new (""); gtk_widget_show (label_splash_hintcounter); gtk_box_pack_end (GTK_BOX (hbox2), label_splash_hintcounter, FALSE, FALSE, 0); label_splash_hint = gtk_label_new (""); gtk_widget_show (label_splash_hint); gtk_box_pack_start (GTK_BOX (vbox3), label_splash_hint, FALSE, FALSE, 0); gtk_widget_set_size_request (label_splash_hint, -1, 90); gtk_label_set_line_wrap (GTK_LABEL (label_splash_hint), TRUE); gtk_misc_set_padding (GTK_MISC (label_splash_hint), 0, 5); hbox10 = gtk_hbox_new (FALSE, 3); gtk_widget_show (hbox10); gtk_box_pack_start (GTK_BOX (vbox3), hbox10, FALSE, FALSE, 0); button_splash_hint_back = gtk_button_new (); gtk_widget_show (button_splash_hint_back); gtk_box_pack_start (GTK_BOX (hbox10), button_splash_hint_back, TRUE, TRUE, 0); alignment4 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment4); gtk_container_add (GTK_CONTAINER (button_splash_hint_back), alignment4); hbox8 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox8); gtk_container_add (GTK_CONTAINER (alignment4), hbox8); image6 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image6); gtk_box_pack_start (GTK_BOX (hbox8), image6, FALSE, FALSE, 0); label11 = gtk_label_new_with_mnemonic (_("Previous")); gtk_widget_show (label11); gtk_box_pack_start (GTK_BOX (hbox8), label11, FALSE, FALSE, 0); button_splash_hint_next = gtk_button_new (); gtk_widget_show (button_splash_hint_next); gtk_box_pack_start (GTK_BOX (hbox10), button_splash_hint_next, TRUE, TRUE, 0); alignment5 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment5); gtk_container_add (GTK_CONTAINER (button_splash_hint_next), alignment5); hbox9 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox9); gtk_container_add (GTK_CONTAINER (alignment5), hbox9); image7 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image7); gtk_box_pack_start (GTK_BOX (hbox9), image7, FALSE, FALSE, 0); label12 = gtk_label_new_with_mnemonic (_("Next")); gtk_widget_show (label12); gtk_box_pack_start (GTK_BOX (hbox9), label12, FALSE, FALSE, 0); hseparator4 = gtk_hseparator_new (); gtk_widget_show (hseparator4); gtk_box_pack_start (GTK_BOX (vbox2), hseparator4, FALSE, FALSE, 0); gtk_widget_set_size_request (hseparator4, 1, 10); hbox3 = gtk_hbox_new (FALSE, 3); gtk_widget_show (hbox3); gtk_box_pack_start (GTK_BOX (vbox2), hbox3, TRUE, TRUE, 0); button_splash_new_game = gtk_button_new (); gtk_widget_show (button_splash_new_game); gtk_box_pack_start (GTK_BOX (hbox3), button_splash_new_game, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_splash_new_game, _("Ctrl-N"), NULL); gtk_widget_add_accelerator (button_splash_new_game, "clicked", accel_group, GDK_n, (GdkModifierType) GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment1); gtk_container_add (GTK_CONTAINER (button_splash_new_game), alignment1); hbox4 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox4); gtk_container_add (GTK_CONTAINER (alignment1), hbox4); image3 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image3); gtk_box_pack_start (GTK_BOX (hbox4), image3, FALSE, FALSE, 0); label7 = gtk_label_new_with_mnemonic (_("Start _new game")); gtk_widget_show (label7); gtk_box_pack_start (GTK_BOX (hbox4), label7, FALSE, FALSE, 0); button_splash_load_game = gtk_button_new (); gtk_widget_show (button_splash_load_game); gtk_box_pack_start (GTK_BOX (hbox3), button_splash_load_game, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_splash_load_game, _("Ctrl-O"), NULL); gtk_widget_add_accelerator (button_splash_load_game, "clicked", accel_group, GDK_o, (GdkModifierType) GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment2); gtk_container_add (GTK_CONTAINER (button_splash_load_game), alignment2); hbox5 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox5); gtk_container_add (GTK_CONTAINER (alignment2), hbox5); image4 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image4); gtk_box_pack_start (GTK_BOX (hbox5), image4, FALSE, FALSE, 0); label8 = gtk_label_new_with_mnemonic (_("_Load game")); gtk_widget_show (label8); gtk_box_pack_start (GTK_BOX (hbox5), label8, FALSE, FALSE, 0); button_splash_resume_game = gtk_button_new (); gtk_widget_show (button_splash_resume_game); gtk_box_pack_start (GTK_BOX (hbox3), button_splash_resume_game, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, button_splash_resume_game, _("Ctrl-R"), NULL); gtk_widget_add_accelerator (button_splash_resume_game, "clicked", accel_group, GDK_r, (GdkModifierType) GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment3); gtk_container_add (GTK_CONTAINER (button_splash_resume_game), alignment3); hbox6 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox6); gtk_container_add (GTK_CONTAINER (alignment3), hbox6); image5 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image5); gtk_box_pack_start (GTK_BOX (hbox6), image5, FALSE, FALSE, 0); label9 = gtk_label_new_with_mnemonic (_("_Resume game")); gtk_widget_show (label9); gtk_box_pack_start (GTK_BOX (hbox6), label9, FALSE, FALSE, 0); button_splash_quit = gtk_button_new_from_stock ("gtk-quit"); gtk_widget_show (button_splash_quit); gtk_box_pack_start (GTK_BOX (hbox3), button_splash_quit, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, button_splash_quit, _("Esc"), NULL); gtk_widget_add_accelerator (button_splash_quit, "clicked", accel_group, GDK_Escape, (GdkModifierType) 0, GTK_ACCEL_VISIBLE); hbox7 = gtk_hbox_new (FALSE, 5); gtk_widget_show (hbox7); gtk_box_pack_start (GTK_BOX (vbox2), hbox7, TRUE, TRUE, 0); label_splash_progress = gtk_label_new (_("Ready")); gtk_widget_show (label_splash_progress); gtk_box_pack_start (GTK_BOX (hbox7), label_splash_progress, FALSE, FALSE, 0); gtk_widget_set_size_request (label_splash_progress, 400, -1); gtk_misc_set_alignment (GTK_MISC (label_splash_progress), 0, 0.5); progressbar_splash = gtk_progress_bar_new (); gtk_widget_show (progressbar_splash); gtk_box_pack_end (GTK_BOX (hbox7), progressbar_splash, FALSE, FALSE, 0); gtk_widget_set_size_request (progressbar_splash, -1, 10); g_signal_connect ((gpointer) window_splash, "delete_event", G_CALLBACK (on_window_splash_delete_event), NULL); g_signal_connect ((gpointer) button_splash_hint_back, "clicked", G_CALLBACK (on_button_splash_hint_back_clicked), NULL); g_signal_connect ((gpointer) button_splash_hint_next, "clicked", G_CALLBACK (on_button_splash_hint_next_clicked), NULL); g_signal_connect ((gpointer) button_splash_new_game, "clicked", G_CALLBACK (on_button_splash_new_game_clicked), NULL); g_signal_connect ((gpointer) button_splash_load_game, "clicked", G_CALLBACK (on_button_splash_load_game_clicked), NULL); g_signal_connect ((gpointer) button_splash_resume_game, "clicked", G_CALLBACK (on_button_splash_resume_game_clicked), NULL); g_signal_connect ((gpointer) button_splash_quit, "clicked", G_CALLBACK (on_button_splash_quit_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (window_splash, window_splash, "window_splash"); GLADE_HOOKUP_OBJECT (window_splash, vbox2, "vbox2"); GLADE_HOOKUP_OBJECT (window_splash, notebook1, "notebook1"); GLADE_HOOKUP_OBJECT (window_splash, image1, "image1"); GLADE_HOOKUP_OBJECT (window_splash, label2, "label2"); GLADE_HOOKUP_OBJECT (window_splash, scrolledwindow2, "scrolledwindow2"); GLADE_HOOKUP_OBJECT (window_splash, treeview_splash_contributors, "treeview_splash_contributors"); GLADE_HOOKUP_OBJECT (window_splash, label3, "label3"); GLADE_HOOKUP_OBJECT (window_splash, hseparator3, "hseparator3"); GLADE_HOOKUP_OBJECT (window_splash, vbox3, "vbox3"); GLADE_HOOKUP_OBJECT (window_splash, hbox2, "hbox2"); GLADE_HOOKUP_OBJECT (window_splash, image2, "image2"); GLADE_HOOKUP_OBJECT (window_splash, label4, "label4"); GLADE_HOOKUP_OBJECT (window_splash, label_splash_hintcounter, "label_splash_hintcounter"); GLADE_HOOKUP_OBJECT (window_splash, label_splash_hint, "label_splash_hint"); GLADE_HOOKUP_OBJECT (window_splash, hbox10, "hbox10"); GLADE_HOOKUP_OBJECT (window_splash, button_splash_hint_back, "button_splash_hint_back"); GLADE_HOOKUP_OBJECT (window_splash, alignment4, "alignment4"); GLADE_HOOKUP_OBJECT (window_splash, hbox8, "hbox8"); GLADE_HOOKUP_OBJECT (window_splash, image6, "image6"); GLADE_HOOKUP_OBJECT (window_splash, label11, "label11"); GLADE_HOOKUP_OBJECT (window_splash, button_splash_hint_next, "button_splash_hint_next"); GLADE_HOOKUP_OBJECT (window_splash, alignment5, "alignment5"); GLADE_HOOKUP_OBJECT (window_splash, hbox9, "hbox9"); GLADE_HOOKUP_OBJECT (window_splash, image7, "image7"); GLADE_HOOKUP_OBJECT (window_splash, label12, "label12"); GLADE_HOOKUP_OBJECT (window_splash, hseparator4, "hseparator4"); GLADE_HOOKUP_OBJECT (window_splash, hbox3, "hbox3"); GLADE_HOOKUP_OBJECT (window_splash, button_splash_new_game, "button_splash_new_game"); GLADE_HOOKUP_OBJECT (window_splash, alignment1, "alignment1"); GLADE_HOOKUP_OBJECT (window_splash, hbox4, "hbox4"); GLADE_HOOKUP_OBJECT (window_splash, image3, "image3"); GLADE_HOOKUP_OBJECT (window_splash, label7, "label7"); GLADE_HOOKUP_OBJECT (window_splash, button_splash_load_game, "button_splash_load_game"); GLADE_HOOKUP_OBJECT (window_splash, alignment2, "alignment2"); GLADE_HOOKUP_OBJECT (window_splash, hbox5, "hbox5"); GLADE_HOOKUP_OBJECT (window_splash, image4, "image4"); GLADE_HOOKUP_OBJECT (window_splash, label8, "label8"); GLADE_HOOKUP_OBJECT (window_splash, button_splash_resume_game, "button_splash_resume_game"); GLADE_HOOKUP_OBJECT (window_splash, alignment3, "alignment3"); GLADE_HOOKUP_OBJECT (window_splash, hbox6, "hbox6"); GLADE_HOOKUP_OBJECT (window_splash, image5, "image5"); GLADE_HOOKUP_OBJECT (window_splash, label9, "label9"); GLADE_HOOKUP_OBJECT (window_splash, button_splash_quit, "button_splash_quit"); GLADE_HOOKUP_OBJECT (window_splash, hbox7, "hbox7"); GLADE_HOOKUP_OBJECT (window_splash, label_splash_progress, "label_splash_progress"); GLADE_HOOKUP_OBJECT (window_splash, progressbar_splash, "progressbar_splash"); GLADE_HOOKUP_OBJECT_NO_REF (window_splash, tooltips, "tooltips"); gtk_window_add_accel_group (GTK_WINDOW (window_splash), accel_group); return window_splash; } GtkWidget* create_window_alr (void) { GtkWidget *window_alr; GtkWidget *vbox5; GtkWidget *label22; GtkWidget *table2; GtkWidget *label23; GtkWidget *label24; GtkWidget *label_current_start_week; GtkWidget *label_current_weekly_installment; GtkWidget *hseparator5; GtkWidget *label25; GtkWidget *table1; GtkWidget *label17; GtkWidget *label18; GtkWidget *button_calculate_installment; GtkWidget *alignment6; GtkWidget *hbox15; GtkWidget *image8; GtkWidget *label20; GtkWidget *button_calculate_start_week; GtkWidget *alignment7; GtkWidget *hbox16; GtkWidget *image9; GtkWidget *label21; GtkObject *spinbutton_start_week_adj; GtkWidget *spinbutton_start_week; GtkObject *spinbutton_weekly_installment_adj; GtkWidget *spinbutton_weekly_installment; GtkWidget *hseparator6; GtkWidget *hbox11; GtkWidget *button_alr_confirm; GtkWidget *button_alr_cancel; GtkAccelGroup *accel_group; accel_group = gtk_accel_group_new (); window_alr = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window_alr), _("Automatic loan repayment")); gtk_window_set_modal (GTK_WINDOW (window_alr), TRUE); vbox5 = gtk_vbox_new (FALSE, 7); gtk_widget_show (vbox5); gtk_container_add (GTK_CONTAINER (window_alr), vbox5); gtk_container_set_border_width (GTK_CONTAINER (vbox5), 5); label22 = gtk_label_new (_("Current settings:")); gtk_widget_show (label22); gtk_box_pack_start (GTK_BOX (vbox5), label22, FALSE, FALSE, 0); gtk_misc_set_alignment (GTK_MISC (label22), 0, 0.5); table2 = gtk_table_new (2, 2, FALSE); gtk_widget_show (table2); gtk_box_pack_start (GTK_BOX (vbox5), table2, FALSE, FALSE, 0); label23 = gtk_label_new (_("Start in week:")); gtk_widget_show (label23); gtk_table_attach (GTK_TABLE (table2), label23, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label23), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label23), 5, 0); label24 = gtk_label_new (_("Weekly installment:")); gtk_widget_show (label24); gtk_table_attach (GTK_TABLE (table2), label24, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label24), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label24), 5, 0); label_current_start_week = gtk_label_new (_("label26")); gtk_widget_show (label_current_start_week); gtk_table_attach (GTK_TABLE (table2), label_current_start_week, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label_current_start_week), 0, 0.5); label_current_weekly_installment = gtk_label_new (_("label27")); gtk_widget_show (label_current_weekly_installment); gtk_table_attach (GTK_TABLE (table2), label_current_weekly_installment, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label_current_weekly_installment), 0, 0.5); hseparator5 = gtk_hseparator_new (); gtk_widget_show (hseparator5); gtk_box_pack_start (GTK_BOX (vbox5), hseparator5, FALSE, FALSE, 0); gtk_widget_set_size_request (hseparator5, -1, 10); label25 = gtk_label_new (_("New settings:")); gtk_widget_show (label25); gtk_box_pack_start (GTK_BOX (vbox5), label25, FALSE, FALSE, 0); gtk_misc_set_alignment (GTK_MISC (label25), 0, 0.5); table1 = gtk_table_new (2, 3, FALSE); gtk_widget_show (table1); gtk_box_pack_start (GTK_BOX (vbox5), table1, FALSE, FALSE, 0); gtk_table_set_row_spacings (GTK_TABLE (table1), 5); gtk_table_set_col_spacings (GTK_TABLE (table1), 10); label17 = gtk_label_new (_("Start in week")); gtk_widget_show (label17); gtk_table_attach (GTK_TABLE (table1), label17, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label17), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label17), 3, 0); label18 = gtk_label_new (_("Weekly installment")); gtk_widget_show (label18); gtk_table_attach (GTK_TABLE (table1), label18, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label18), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label18), 3, 0); button_calculate_installment = gtk_button_new (); gtk_widget_show (button_calculate_installment); gtk_table_attach (GTK_TABLE (table1), button_calculate_installment, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); alignment6 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment6); gtk_container_add (GTK_CONTAINER (button_calculate_installment), alignment6); hbox15 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox15); gtk_container_add (GTK_CONTAINER (alignment6), hbox15); image8 = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image8); gtk_box_pack_start (GTK_BOX (hbox15), image8, FALSE, FALSE, 0); label20 = gtk_label_new_with_mnemonic (_("Calculate weekly installment")); gtk_widget_show (label20); gtk_box_pack_start (GTK_BOX (hbox15), label20, FALSE, FALSE, 0); button_calculate_start_week = gtk_button_new (); gtk_widget_show (button_calculate_start_week); gtk_table_attach (GTK_TABLE (table1), button_calculate_start_week, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); alignment7 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment7); gtk_container_add (GTK_CONTAINER (button_calculate_start_week), alignment7); hbox16 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox16); gtk_container_add (GTK_CONTAINER (alignment7), hbox16); image9 = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image9); gtk_box_pack_start (GTK_BOX (hbox16), image9, FALSE, FALSE, 0); label21 = gtk_label_new_with_mnemonic (_("Calculate start week")); gtk_widget_show (label21); gtk_box_pack_start (GTK_BOX (hbox16), label21, FALSE, FALSE, 0); spinbutton_start_week_adj = gtk_adjustment_new (0, 0, 0, 1, 10, 0); spinbutton_start_week = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_start_week_adj), 1, 0); gtk_widget_show (spinbutton_start_week); gtk_table_attach (GTK_TABLE (table1), spinbutton_start_week, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (0), 0, 0); spinbutton_weekly_installment_adj = gtk_adjustment_new (1, 0, 0, 1, 10, 0); spinbutton_weekly_installment = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_weekly_installment_adj), 1, 0); gtk_widget_show (spinbutton_weekly_installment); gtk_table_attach (GTK_TABLE (table1), spinbutton_weekly_installment, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (0), 0, 0); hseparator6 = gtk_hseparator_new (); gtk_widget_show (hseparator6); gtk_box_pack_start (GTK_BOX (vbox5), hseparator6, FALSE, FALSE, 0); gtk_widget_set_size_request (hseparator6, -1, 10); hbox11 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox11); gtk_box_pack_start (GTK_BOX (vbox5), hbox11, FALSE, TRUE, 3); button_alr_confirm = gtk_button_new_from_stock ("gtk-apply"); gtk_widget_show (button_alr_confirm); gtk_box_pack_start (GTK_BOX (hbox11), button_alr_confirm, TRUE, TRUE, 0); button_alr_cancel = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (button_alr_cancel); gtk_box_pack_start (GTK_BOX (hbox11), button_alr_cancel, TRUE, TRUE, 0); gtk_widget_add_accelerator (button_alr_cancel, "clicked", accel_group, GDK_Escape, (GdkModifierType) 0, GTK_ACCEL_VISIBLE); g_signal_connect ((gpointer) window_alr, "delete_event", G_CALLBACK (on_window_alr_delete_event), NULL); g_signal_connect ((gpointer) button_calculate_installment, "clicked", G_CALLBACK (on_button_calculate_installment_clicked), NULL); g_signal_connect ((gpointer) button_calculate_start_week, "clicked", G_CALLBACK (on_button_calculate_start_week_clicked), NULL); g_signal_connect ((gpointer) button_alr_confirm, "clicked", G_CALLBACK (on_button_alr_confirm_clicked), NULL); g_signal_connect ((gpointer) button_alr_cancel, "clicked", G_CALLBACK (on_button_alr_cancel_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (window_alr, window_alr, "window_alr"); GLADE_HOOKUP_OBJECT (window_alr, vbox5, "vbox5"); GLADE_HOOKUP_OBJECT (window_alr, label22, "label22"); GLADE_HOOKUP_OBJECT (window_alr, table2, "table2"); GLADE_HOOKUP_OBJECT (window_alr, label23, "label23"); GLADE_HOOKUP_OBJECT (window_alr, label24, "label24"); GLADE_HOOKUP_OBJECT (window_alr, label_current_start_week, "label_current_start_week"); GLADE_HOOKUP_OBJECT (window_alr, label_current_weekly_installment, "label_current_weekly_installment"); GLADE_HOOKUP_OBJECT (window_alr, hseparator5, "hseparator5"); GLADE_HOOKUP_OBJECT (window_alr, label25, "label25"); GLADE_HOOKUP_OBJECT (window_alr, table1, "table1"); GLADE_HOOKUP_OBJECT (window_alr, label17, "label17"); GLADE_HOOKUP_OBJECT (window_alr, label18, "label18"); GLADE_HOOKUP_OBJECT (window_alr, button_calculate_installment, "button_calculate_installment"); GLADE_HOOKUP_OBJECT (window_alr, alignment6, "alignment6"); GLADE_HOOKUP_OBJECT (window_alr, hbox15, "hbox15"); GLADE_HOOKUP_OBJECT (window_alr, image8, "image8"); GLADE_HOOKUP_OBJECT (window_alr, label20, "label20"); GLADE_HOOKUP_OBJECT (window_alr, button_calculate_start_week, "button_calculate_start_week"); GLADE_HOOKUP_OBJECT (window_alr, alignment7, "alignment7"); GLADE_HOOKUP_OBJECT (window_alr, hbox16, "hbox16"); GLADE_HOOKUP_OBJECT (window_alr, image9, "image9"); GLADE_HOOKUP_OBJECT (window_alr, label21, "label21"); GLADE_HOOKUP_OBJECT (window_alr, spinbutton_start_week, "spinbutton_start_week"); GLADE_HOOKUP_OBJECT (window_alr, spinbutton_weekly_installment, "spinbutton_weekly_installment"); GLADE_HOOKUP_OBJECT (window_alr, hseparator6, "hseparator6"); GLADE_HOOKUP_OBJECT (window_alr, hbox11, "hbox11"); GLADE_HOOKUP_OBJECT (window_alr, button_alr_confirm, "button_alr_confirm"); GLADE_HOOKUP_OBJECT (window_alr, button_alr_cancel, "button_alr_cancel"); gtk_window_add_accel_group (GTK_WINDOW (window_alr), accel_group); return window_alr; }