From b6e24d9758eede89eea7066fc8ec6b0af93396b6 Mon Sep 17 00:00:00 2001 From: gyboth Date: Tue, 16 Dec 2008 12:59:55 +0000 Subject: [PATCH] Options for news. --- bygfoot_options.glade | 745 ++++++++++++++++++++------------ src/option_gui.c | 45 +- src/options_interface.c | 277 +++++++----- support_files/bygfoot_user.conf | 33 +- 4 files changed, 716 insertions(+), 384 deletions(-) diff --git a/bygfoot_options.glade b/bygfoot_options.glade index e00d6266..7072bdfc 100644 --- a/bygfoot_options.glade +++ b/bygfoot_options.glade @@ -18,7 +18,6 @@ GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True - False @@ -813,6 +812,271 @@ + + + True + False + 0 + + + + True + False + 0 + + + + True + Whether a confirmation popup is shown when you kick out a youth from your academy + True + Confirm removing youths + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + Whether to show job offers when a user is successful + True + Show job offers + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + Set to 0 to switch off warning + True + False + + + + True + False + 0 + + + + True + Show warning if a player contract gets below + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 1 0 24 1 10 0 + + + 0 + False + False + + + + + + True + months + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + 0 + False + False + + + + + + True + Whether in the weekly fixture view all leagues or only the user league is shown + True + Show all leagues in the fixture view + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + + 10 + 1 + True + + + 0 + False + False + + + + + + True + False + 0 + + + + True + Whether swapping two players automatically adapts the team structure to the player positions + True + Swap adapts structure + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + Whether to show the player games/goals value in all competitions + True + Show overall games/goals + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + False + True + + + + + + True + Gameplay + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + True @@ -1123,271 +1387,6 @@ - - - True - False - 0 - - - - True - False - 0 - - - - True - Whether a confirmation popup is shown when you kick out a youth from your academy - True - Confirm removing youths - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - Whether to show job offers when a user is successful - True - Show job offers - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - Set to 0 to switch off warning - True - False - - - - True - False - 0 - - - - True - Show warning if a player contract gets below - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 1 0 24 1 10 0 - - - 0 - False - False - - - - - - True - months - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - 0 - False - False - - - - - - True - Whether in the weekly fixture view all leagues or only the user league is shown - True - Show all leagues in the fixture view - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - - 10 - 1 - True - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Whether swapping two players automatically adapts the team structure to the player positions - True - Swap adapts structure - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - Whether to show the player games/goals value in all competitions - True - Show overall games/goals - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - False - True - - - - - - True - Misc. - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - True @@ -2989,14 +2988,6 @@ True - - - - - - - - False @@ -3270,6 +3261,212 @@ tab + + + + True + False + 4 + + + + True + False + 5 + + + + True + True + Create user news + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Create cup news + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Create league news + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + False + False + + + + + + True + True + Show only recent news + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + False + 5 + + + + True + True + No automatic popup + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + Show news window after a matchday when new user news was created + True + Popup for user news + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton_news_popup_no + + + 0 + False + False + + + + + + True + Always show news window after a matchday + True + Automatic popup + True + GTK_RELIEF_NORMAL + True + False + False + True + radiobutton_news_popup_no + + + 0 + False + False + + + + + 0 + False + False + + + + + + + + + + + + + False + True + + + + + + True + News + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + 0 diff --git a/src/option_gui.c b/src/option_gui.c index eeefaee9..b4ea8eaf 100644 --- a/src/option_gui.c +++ b/src/option_gui.c @@ -62,6 +62,10 @@ enum BooleanOptions BOOL_OPT_BET_SHOW_ALL_LEAGUES, BOOL_OPT_BET_SHOW_CUPS, BOOL_OPT_BET_SHOW_MY_RECENT, + BOOL_OPT_NEWS_USER, + BOOL_OPT_NEWS_CUP, + BOOL_OPT_NEWS_LEAGUE, + BOOL_OPT_NEWS_RECENT, BOOL_OPT_PL1_ATT_NAME, BOOL_OPT_PL1_ATT_CPOS, BOOL_OPT_PL1_ATT_POS, @@ -199,6 +203,22 @@ option_gui_write_bool_widgets(gint **bool_options, GtkToggleButton **bool_widget GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_bet_show_only_recent")); bool_options[BOOL_OPT_BET_SHOW_MY_RECENT] = opt_user_intp("int_opt_user_bet_show_my_recent"); + bool_widgets[BOOL_OPT_NEWS_USER] = + GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_news_user")); + bool_options[BOOL_OPT_NEWS_USER] = opt_user_intp("int_opt_user_news_create_user"); + + bool_widgets[BOOL_OPT_NEWS_CUP] = + GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_news_cup")); + bool_options[BOOL_OPT_NEWS_CUP] = opt_user_intp("int_opt_user_news_create_cup"); + + bool_widgets[BOOL_OPT_NEWS_LEAGUE] = + GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_news_league")); + bool_options[BOOL_OPT_NEWS_LEAGUE] = opt_user_intp("int_opt_user_news_create_league"); + + bool_widgets[BOOL_OPT_NEWS_RECENT] = + GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton_news_recent")); + bool_options[BOOL_OPT_NEWS_RECENT] = opt_user_intp("int_opt_user_news_show_recent"); + bool_widgets[BOOL_OPT_PL1_ATT_NAME] = GTK_TOGGLE_BUTTON(lookup_widget(window.options, "checkbutton1")); bool_options[BOOL_OPT_PL1_ATT_NAME] = opt_user_intp("int_opt_user_pl1_att_name"); @@ -423,7 +443,6 @@ option_gui_write_spin_widgets(gint **spin_options, GtkSpinButton **spin_widgets) (gdouble)tmp); } - /** Text entries. */ enum EntryOptions { @@ -469,6 +488,11 @@ option_gui_set_up_window(void) GtkEntry *entry_widgets[ENTRY_OPT_END]; gchar **entry_options[ENTRY_OPT_END]; + GtkToggleButton *news_popup_buttons[3] = + {GTK_TOGGLE_BUTTON(lookup_widget(window.options, "radiobutton_news_popup_no")), + GTK_TOGGLE_BUTTON(lookup_widget(window.options, "radiobutton_news_popup_user")), + GTK_TOGGLE_BUTTON(lookup_widget(window.options, "radiobutton_news_popup_always"))}; + treeview_show_language_combo(); treeview_show_training_hotels_combo(); @@ -477,8 +501,8 @@ option_gui_set_up_window(void) option_gui_write_entry_widgets(entry_options, entry_widgets); for(i=0;i