mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-02-11 17:10:40 +01:00
User management. Preview.
This commit is contained in:
parent
61c771bbc3
commit
27efe36a8f
107
bygfoot.glade
107
bygfoot.glade
@ -110,7 +110,7 @@
|
|||||||
<accelerator key="p" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
<accelerator key="p" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||||
|
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image258">
|
<widget class="GtkImage" id="image261">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-preferences</property>
|
<property name="stock">gtk-preferences</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
@ -248,7 +248,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">All Out Defend</property>
|
<property name="label" translatable="yes">All Out Defend</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:16:56 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:16:56 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
@ -258,7 +258,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Defend</property>
|
<property name="label" translatable="yes">Defend</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<property name="group">menu_all_out_defend</property>
|
<property name="group">menu_all_out_defend</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:17:07 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:17:07 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -269,7 +269,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Balanced</property>
|
<property name="label" translatable="yes">Balanced</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<property name="group">menu_all_out_defend</property>
|
<property name="group">menu_all_out_defend</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:17:14 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:17:14 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -280,7 +280,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Attack</property>
|
<property name="label" translatable="yes">Attack</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<property name="group">menu_all_out_defend</property>
|
<property name="group">menu_all_out_defend</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:17:20 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:17:20 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -315,7 +315,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Best</property>
|
<property name="label" translatable="yes">Best</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:15:47 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:15:47 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
@ -325,7 +325,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Good</property>
|
<property name="label" translatable="yes">Good</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<property name="group">menu_scout_best</property>
|
<property name="group">menu_scout_best</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:15:35 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:15:35 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -336,7 +336,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Average</property>
|
<property name="label" translatable="yes">Average</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<property name="group">menu_scout_best</property>
|
<property name="group">menu_scout_best</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:15:54 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:15:54 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -371,7 +371,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Best</property>
|
<property name="label" translatable="yes">Best</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:16:14 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:16:14 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
@ -381,7 +381,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Good</property>
|
<property name="label" translatable="yes">Good</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<property name="group">menu_physio_best</property>
|
<property name="group">menu_physio_best</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:16:21 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:16:21 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -392,7 +392,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Average</property>
|
<property name="label" translatable="yes">Average</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<property name="group">menu_physio_best</property>
|
<property name="group">menu_physio_best</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:16:28 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Mon, 28 Feb 2005 08:16:28 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -427,7 +427,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">On</property>
|
<property name="label" translatable="yes">On</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Tue, 08 Mar 2005 16:37:57 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Tue, 08 Mar 2005 16:37:57 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
@ -437,7 +437,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Off</property>
|
<property name="label" translatable="yes">Off</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">False</property>
|
<property name="active">True</property>
|
||||||
<property name="group">menu_boost_on</property>
|
<property name="group">menu_boost_on</property>
|
||||||
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Tue, 08 Mar 2005 16:37:48 GMT"/>
|
<signal name="button_press_event" handler="on_menu_team_button_press_event" last_modification_time="Tue, 08 Mar 2005 16:37:48 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -548,6 +548,21 @@
|
|||||||
<signal name="activate" handler="on_menu_shoots_penalties_activate" last_modification_time="Sun, 02 Jan 2005 15:42:09 GMT"/>
|
<signal name="activate" handler="on_menu_shoots_penalties_activate" last_modification_time="Sun, 02 Jan 2005 15:42:09 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="trennlinie10">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="menu_browse_players">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Browse players</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<signal name="activate" handler="on_menu_browse_players_activate" last_modification_time="Sat, 26 Mar 2005 09:42:31 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
@ -596,7 +611,7 @@
|
|||||||
<accelerator key="F9" modifiers="0" signal="activate"/>
|
<accelerator key="F9" modifiers="0" signal="activate"/>
|
||||||
|
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image259">
|
<widget class="GtkImage" id="image262">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-go-forward</property>
|
<property name="stock">gtk-go-forward</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
@ -618,7 +633,7 @@
|
|||||||
<accelerator key="F8" modifiers="0" signal="activate"/>
|
<accelerator key="F8" modifiers="0" signal="activate"/>
|
||||||
|
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image260">
|
<widget class="GtkImage" id="image263">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-go-back</property>
|
<property name="stock">gtk-go-back</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
@ -640,7 +655,7 @@
|
|||||||
<accelerator key="F12" modifiers="0" signal="activate"/>
|
<accelerator key="F12" modifiers="0" signal="activate"/>
|
||||||
|
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image261">
|
<widget class="GtkImage" id="image264">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-justify-fill</property>
|
<property name="stock">gtk-justify-fill</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
@ -899,11 +914,10 @@
|
|||||||
<widget class="GtkButton" id="button_preview">
|
<widget class="GtkButton" id="button_preview">
|
||||||
<property name="border_width">2</property>
|
<property name="border_width">2</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="tooltip" translatable="yes">Show my last games and a preview of my next games (P or F1)</property>
|
<property name="tooltip" translatable="yes">Show my last games and a preview of my next games (F1)</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<signal name="clicked" handler="on_button_preview_clicked" last_modification_time="Wed, 04 Feb 2004 13:24:35 GMT"/>
|
<signal name="clicked" handler="on_button_preview_clicked" last_modification_time="Wed, 04 Feb 2004 13:24:35 GMT"/>
|
||||||
<accelerator key="p" modifiers="0" signal="clicked"/>
|
|
||||||
<accelerator key="F1" modifiers="0" signal="clicked"/>
|
<accelerator key="F1" modifiers="0" signal="clicked"/>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
@ -1822,4 +1836,61 @@
|
|||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
<widget class="GtkMenu" id="menu_player">
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="player_menu_show_info">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Show info</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<signal name="activate" handler="on_player_menu_show_info_activate" last_modification_time="Sat, 26 Mar 2005 08:47:31 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="player_menu_put_on_transfer_list">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Put on transfer list</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<signal name="activate" handler="on_player_menu_put_on_transfer_list_activate" last_modification_time="Sat, 26 Mar 2005 08:47:31 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="player_menu_remove_from_transfer_list">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Remove from transfer list</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<signal name="activate" handler="on_player_menu_remove_from_transfer_list_activate" last_modification_time="Sat, 26 Mar 2005 08:47:31 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="player_menu_offer_new_contract">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Offer new contract</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<signal name="activate" handler="on_player_menu_offer_new_contract_activate" last_modification_time="Sat, 26 Mar 2005 08:47:31 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="player_menu_fire">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Fire</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<signal name="activate" handler="on_player_menu_fire_activate" last_modification_time="Sat, 26 Mar 2005 08:47:31 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="player_menu_shoots_penalties">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Shoots penalties</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<signal name="activate" handler="on_player_menu_shoots_penalties_activate" last_modification_time="Sat, 26 Mar 2005 08:47:31 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
</glade-interface>
|
</glade-interface>
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
<widget class="GtkWindow" id="window_startup">
|
<widget class="GtkWindow" id="window_startup">
|
||||||
<property name="border_width">6</property>
|
<property name="border_width">6</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes">Select team and country</property>
|
<property name="title" translatable="yes"></property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
||||||
<property name="modal">False</property>
|
<property name="modal">False</property>
|
||||||
<property name="default_width">500</property>
|
<property name="default_width">550</property>
|
||||||
<property name="default_height">600</property>
|
<property name="default_height">600</property>
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="destroy_with_parent">False</property>
|
<property name="destroy_with_parent">False</property>
|
||||||
@ -23,13 +23,46 @@
|
|||||||
<property name="spacing">0</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
<widget class="GtkHPaned" id="hpaned1">
|
||||||
<property name="border_width">6</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="position">200</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkScrolledWindow" id="scrolledwindow10">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||||
|
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTreeView" id="treeview_users">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">Click on a player to remove him</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="headers_visible">True</property>
|
||||||
|
<property name="rules_hint">False</property>
|
||||||
|
<property name="reorderable">False</property>
|
||||||
|
<property name="enable_search">True</property>
|
||||||
|
<signal name="button_press_event" handler="on_treeview_users_button_press_event" last_modification_time="Fri, 25 Feb 2005 19:29:22 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="shrink">True</property>
|
||||||
|
<property name="resize">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
|
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
@ -46,6 +79,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="shrink">True</property>
|
||||||
|
<property name="resize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
@ -1431,43 +1470,6 @@
|
|||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget class="GtkWindow" id="window_startup_users">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="title" translatable="yes">Players</property>
|
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
|
||||||
<property name="modal">False</property>
|
|
||||||
<property name="default_width">250</property>
|
|
||||||
<property name="default_height">200</property>
|
|
||||||
<property name="resizable">True</property>
|
|
||||||
<property name="destroy_with_parent">False</property>
|
|
||||||
<signal name="delete_event" handler="on_window_startup_users_delete_event" last_modification_time="Thu, 24 Mar 2005 08:56:42 GMT"/>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkScrolledWindow" id="scrolledwindow10">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
|
||||||
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
|
||||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
|
||||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkTreeView" id="treeview_users">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="tooltip" translatable="yes">Click on a player to remove him</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="headers_visible">True</property>
|
|
||||||
<property name="rules_hint">False</property>
|
|
||||||
<property name="reorderable">False</property>
|
|
||||||
<property name="enable_search">True</property>
|
|
||||||
<signal name="button_press_event" handler="on_treeview_users_button_press_event" last_modification_time="Fri, 25 Feb 2005 19:29:22 GMT"/>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
|
|
||||||
<widget class="GtkWindow" id="window_stadium">
|
<widget class="GtkWindow" id="window_stadium">
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -1432,4 +1432,312 @@
|
|||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
<widget class="GtkWindow" id="window_user_management">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">window1</property>
|
||||||
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
|
<property name="window_position">GTK_WIN_POS_CENTER</property>
|
||||||
|
<property name="modal">False</property>
|
||||||
|
<property name="default_width">600</property>
|
||||||
|
<property name="default_height">550</property>
|
||||||
|
<property name="resizable">True</property>
|
||||||
|
<property name="destroy_with_parent">False</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox19">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox23">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHPaned" id="hpaned1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="position">200</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox20">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label47">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Users -- click to remove</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkScrolledWindow" id="scrolledwindow2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||||
|
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||||
|
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkViewport" id="viewport1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTreeView" id="treeview_user_management_users">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="headers_visible">True</property>
|
||||||
|
<property name="rules_hint">False</property>
|
||||||
|
<property name="reorderable">False</property>
|
||||||
|
<property name="enable_search">True</property>
|
||||||
|
<signal name="button_press_event" handler="on_treeview_user_management_users_button_press_event" last_modification_time="Sat, 26 Mar 2005 20:34:41 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="shrink">True</property>
|
||||||
|
<property name="resize">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox21">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label46">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Available teams</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkScrolledWindow" id="scrolledwindow3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||||
|
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||||
|
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTreeView" id="treeview_user_management_teams">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="headers_visible">True</property>
|
||||||
|
<property name="rules_hint">False</property>
|
||||||
|
<property name="reorderable">False</property>
|
||||||
|
<property name="enable_search">True</property>
|
||||||
|
<signal name="row_activated" handler="on_treeview_user_management_teams_row_activated" last_modification_time="Sun, 27 Mar 2005 15:27:36 GMT"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="shrink">True</property>
|
||||||
|
<property name="resize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox21">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="entry_user_management">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char" translatable="yes">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
<signal name="activate" handler="on_entry_user_management_activate" last_modification_time="Sat, 26 Mar 2005 20:33:15 GMT"/>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button_user_management_add">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<signal name="clicked" handler="on_button_user_management_add_clicked" last_modification_time="Sat, 26 Mar 2005 20:33:21 GMT"/>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkAlignment" id="alignment7">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xscale">0</property>
|
||||||
|
<property name="yscale">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox22">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">2</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImage" id="image11">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="stock">gtk-add</property>
|
||||||
|
<property name="icon_size">4</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label45">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Add user</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHSeparator" id="hseparator9">
|
||||||
|
<property name="width_request">1</property>
|
||||||
|
<property name="height_request">10</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button_user_management_close">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label">gtk-close</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<signal name="clicked" handler="on_button_user_management_close_clicked" last_modification_time="Sat, 26 Mar 2005 20:33:31 GMT"/>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
</glade-interface>
|
</glade-interface>
|
||||||
|
@ -350,28 +350,6 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkEntry" id="entry_constants_file">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="tooltip" translatable="yes">File containing settings which determine a lot of aspects of the game behaviour. DON'T CHANGE THIS UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">True</property>
|
|
||||||
<property name="visibility">True</property>
|
|
||||||
<property name="max_length">0</property>
|
|
||||||
<property name="text" translatable="yes"></property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="invisible_char" translatable="yes">*</property>
|
|
||||||
<property name="activates_default">False</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
<property name="bottom_attach">4</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="button_font_name">
|
<widget class="GtkButton" id="button_font_name">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -465,6 +443,113 @@
|
|||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox8">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="entry_constants_file">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">File containing settings which determine a lot of aspects of the game behaviour. DON'T CHANGE THIS UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char" translatable="yes">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button_reload_constants">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">Reload the constants file</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<signal name="clicked" handler="on_button_reload_constants_clicked" last_modification_time="Sun, 27 Mar 2005 15:40:44 GMT"/>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkAlignment" id="alignment2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xscale">0</property>
|
||||||
|
<property name="yscale">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox9">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">2</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImage" id="image2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="stock">gtk-refresh</property>
|
||||||
|
<property name="icon_size">4</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label35">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Reload</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
<property name="bottom_attach">4</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options">fill</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
@ -10,7 +10,7 @@ bin_PROGRAMS = bygfoot
|
|||||||
|
|
||||||
bygfoot_SOURCES = \
|
bygfoot_SOURCES = \
|
||||||
callback_func.c callback_func.h callbacks.h cup.h finance.h fixture.h game_gui.h league.h live_game.h maths.h misc.h option.h player.h start_end.h team.h transfer.h treeview.h user.h window.h \
|
callback_func.c callback_func.h callbacks.h cup.h finance.h fixture.h game_gui.h league.h live_game.h maths.h misc.h option.h player.h start_end.h team.h transfer.h treeview.h user.h window.h \
|
||||||
callbacks.c callbacks.h callback_func.h game_gui.h main.h option.h team.h transfer.h treeview.h user.h window.h \
|
callbacks.c callbacks.h callback_func.h game_gui.h main.h option.h player.h team.h transfer.h treeview.h user.h window.h \
|
||||||
cup.c cup.h free.h main.h maths.h misc.h team.h variables.h xml_league.h \
|
cup.c cup.h free.h main.h maths.h misc.h team.h variables.h xml_league.h \
|
||||||
file.c file.h free.h main.h misc.h option.h support.h variables.h \
|
file.c file.h free.h main.h misc.h option.h support.h variables.h \
|
||||||
finance.c callbacks.h finance.h game_gui.h maths.h option.h player.h team.h user.h \
|
finance.c callbacks.h finance.h game_gui.h maths.h option.h player.h team.h user.h \
|
||||||
@ -29,22 +29,22 @@ bygfoot_SOURCES = \
|
|||||||
misc_callbacks.c free.h misc_callback_func.h misc_callbacks.h \
|
misc_callbacks.c free.h misc_callback_func.h misc_callbacks.h \
|
||||||
misc_callback_func.c misc_callback_func.h start_end.h support.h team.h treeview.h user.h variables.h xml_country.h \
|
misc_callback_func.c misc_callback_func.h start_end.h support.h team.h treeview.h user.h variables.h xml_country.h \
|
||||||
misc_interface.c misc_interface.h misc_callbacks.h support.h \
|
misc_interface.c misc_interface.h misc_callbacks.h support.h \
|
||||||
misc2_callbacks.c finance.h game_gui.h main.h misc2_callbacks.h misc2_callback_func.h misc2_interface.h support.h transfer.h user.h window.h \
|
misc2_callbacks.c finance.h game_gui.h main.h misc2_callbacks.h misc2_callback_func.h misc2_interface.h player.h support.h transfer.h treeview.h user.h window.h \
|
||||||
misc2_callback_func.c finance.h game_gui.h maths.h misc2_callback_func.h option.h player.h support.h team.h treeview.h transfer.h user.h window.h \
|
misc2_callback_func.c file.h finance.h game_gui.h maths.h misc2_callback_func.h option.h player.h support.h team.h treeview.h transfer.h user.h window.h \
|
||||||
misc2_interface.c misc2_interface.h misc2_callbacks.h support.h \
|
misc2_interface.c misc2_interface.h misc2_callbacks.h support.h \
|
||||||
option.c option.h variables.h \
|
option.c option.h variables.h \
|
||||||
option_gui.c file.h option_gui.h option.h support.h user.h variables.h \
|
option_gui.c file.h option_gui.h option.h support.h user.h variables.h \
|
||||||
options_callbacks.c options_callbacks.h option_gui.h \
|
options_callbacks.c file.h options_callbacks.h options_interface.h option_gui.h support.h variables.h window.h \
|
||||||
options_interface.c options_interface.h options_callbacks.h support.h \
|
options_interface.c options_interface.h options_callbacks.h support.h \
|
||||||
player.c cup.h free.h game_gui.h league.h maths.h misc.h option.h player.h team.h user.h \
|
player.c cup.h free.h game_gui.h league.h maths.h misc.h option.h player.h team.h user.h \
|
||||||
start_end.c cup.h file.h finance.h fixture.h game_gui.h gui.h league.h live_game.h main.h maths.h start_end.h table.h team.h transfer.h user.h variables.h xml_name.h \
|
start_end.c cup.h file.h finance.h fixture.h game_gui.h gui.h league.h live_game.h main.h maths.h start_end.h table.h team.h transfer.h user.h variables.h xml_name.h \
|
||||||
support.c support.h \
|
support.c support.h \
|
||||||
table.c cup.h league.h table.h variables.h \
|
table.c cup.h league.h table.h variables.h \
|
||||||
team.c cup.h fixture.h game.h game_gui.h league.h maths.h misc.h option.h player.h team.h transfer.h user.h \
|
team.c cup.h fixture.h game.h game_gui.h league.h maths.h misc.h option.h player.h team.h transfer.h user.h \
|
||||||
transfer.c finance.h free.h maths.h option.h player.h team.h transfer.h user.h \
|
transfer.c finance.h free.h game_gui.h maths.h option.h player.h support.h team.h transfer.h treeview.h user.h \
|
||||||
treeview.c cup.h file.h finance.h fixture.h free.h game.h league.h live_game.h maths.h misc.h player.h option.h support.h team.h transfer.h treeview.h treeview_cell.h user.h \
|
treeview.c cup.h file.h finance.h fixture.h free.h game.h league.h live_game.h maths.h misc.h player.h option.h support.h team.h transfer.h treeview.h treeview_cell.h user.h \
|
||||||
treeview_cell.c misc.h option.h player.h team.h treeview.h treeview_cell.h user.h variables.h \
|
treeview_cell.c misc.h option.h player.h team.h treeview.h treeview_cell.h user.h variables.h \
|
||||||
user.c fixture.h free.h game_gui.h maths.h misc.h option.h player.h transfer.h user.h window.h \
|
user.c fixture.h free.h game_gui.h maths.h misc.h option.h player.h team.h transfer.h user.h window.h \
|
||||||
window.c file.h finance.h free.h game_gui.h gui.h interface.h misc_interface.h misc2_interface.h option.h support.h user.h window.h \
|
window.c file.h finance.h free.h game_gui.h gui.h interface.h misc_interface.h misc2_interface.h option.h support.h user.h window.h \
|
||||||
xml_cup.c cup.h file.h misc.h xml_cup.h \
|
xml_cup.c cup.h file.h misc.h xml_cup.h \
|
||||||
xml_country.c file.h free.h misc.h variables.h xml_cup.h xml_country.h xml_league.h \
|
xml_country.c file.h free.h misc.h variables.h xml_cup.h xml_country.h xml_league.h \
|
||||||
|
@ -87,7 +87,6 @@ typedef struct
|
|||||||
{
|
{
|
||||||
GtkWidget *main,
|
GtkWidget *main,
|
||||||
*startup,
|
*startup,
|
||||||
*startup_users,
|
|
||||||
*live,
|
*live,
|
||||||
*warning,
|
*warning,
|
||||||
*progress,
|
*progress,
|
||||||
@ -97,7 +96,9 @@ typedef struct
|
|||||||
*yesno,
|
*yesno,
|
||||||
*options,
|
*options,
|
||||||
*font_sel,
|
*font_sel,
|
||||||
*contract;
|
*contract,
|
||||||
|
*menu_player,
|
||||||
|
*user_management;
|
||||||
} Windows;
|
} Windows;
|
||||||
|
|
||||||
/** A struct representing an option or a constant. */
|
/** A struct representing an option or a constant. */
|
||||||
|
@ -70,8 +70,6 @@ callback_show_next_live_game(void)
|
|||||||
void
|
void
|
||||||
callback_player_clicked(gint idx, GdkEventButton *event)
|
callback_player_clicked(gint idx, GdkEventButton *event)
|
||||||
{
|
{
|
||||||
gchar buf[SMALL];
|
|
||||||
|
|
||||||
/* Only accept single-clicks right now. */
|
/* Only accept single-clicks right now. */
|
||||||
if(event->type != GDK_BUTTON_PRESS)
|
if(event->type != GDK_BUTTON_PRESS)
|
||||||
return;
|
return;
|
||||||
@ -100,6 +98,7 @@ callback_player_clicked(gint idx, GdkEventButton *event)
|
|||||||
selected_row[0] = -1;
|
selected_row[0] = -1;
|
||||||
|
|
||||||
treeview_show_user_player_list();
|
treeview_show_user_player_list();
|
||||||
|
if(stat0 == STATUS_MAIN)
|
||||||
treeview_show_next_opponent();
|
treeview_show_next_opponent();
|
||||||
}
|
}
|
||||||
else if(event->button == 3)
|
else if(event->button == 3)
|
||||||
@ -107,22 +106,12 @@ callback_player_clicked(gint idx, GdkEventButton *event)
|
|||||||
if(stat0 == STATUS_SHOW_TRANSFER_LIST)
|
if(stat0 == STATUS_SHOW_TRANSFER_LIST)
|
||||||
{
|
{
|
||||||
selected_row[0] = -1;
|
selected_row[0] = -1;
|
||||||
|
transfer_add_remove_user_player(player_of(current_user.tm, idx));
|
||||||
if(!query_transfer_player_is_on_list(player_of(current_user.tm, idx)))
|
|
||||||
{
|
|
||||||
transfer_add_player(player_of(current_user.tm, idx),
|
|
||||||
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
|
||||||
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
|
||||||
sprintf(buf, _("%s has been added to the transfer list for %d weeks."),
|
|
||||||
player_of(current_user.tm, idx)->name->str,
|
|
||||||
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
|
||||||
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
|
||||||
game_gui_print_message(buf);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
transfer_remove_player_ptr(player_of(current_user.tm, idx));
|
{
|
||||||
|
window_show_menu_player((GdkEvent*)event);
|
||||||
treeview_show_transfer_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")));
|
selected_row[0] = idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,9 +339,7 @@ callback_show_team(gint type)
|
|||||||
else
|
else
|
||||||
stat2 = league_cup_get_previous_clid(stat2);
|
stat2 = league_cup_get_previous_clid(stat2);
|
||||||
|
|
||||||
statp = (gpointer)(stat2 < ID_CUP_START) ?
|
statp = (gpointer)league_cup_get_teams(stat2);
|
||||||
league_from_clid(stat2)->teams :
|
|
||||||
cup_from_clid(stat2)->teams;
|
|
||||||
|
|
||||||
stat1 = 0;
|
stat1 = 0;
|
||||||
tm = &g_array_index((GArray*)statp, Team, stat1);
|
tm = &g_array_index((GArray*)statp, Team, stat1);
|
||||||
@ -360,12 +347,52 @@ callback_show_team(gint type)
|
|||||||
|
|
||||||
stat0 = STATUS_BROWSE_TEAMS;
|
stat0 = STATUS_BROWSE_TEAMS;
|
||||||
stat2 = tm->clid;
|
stat2 = tm->clid;
|
||||||
statp = (gpointer)(tm->clid < ID_CUP_START) ?
|
statp = (gpointer)league_cup_get_teams(tm->clid);
|
||||||
league_from_clid(tm->clid)->teams :
|
|
||||||
cup_from_clid(tm->clid)->teams;
|
|
||||||
|
|
||||||
if(tm != current_user.tm)
|
if(tm != current_user.tm)
|
||||||
treeview_show_player_list_team(treeview_right, tm, current_user.scout % 10);
|
treeview_show_player_list_team(treeview_right, tm, current_user.scout % 10);
|
||||||
else
|
else
|
||||||
callback_show_team((type == SHOW_PREVIOUS) ? SHOW_PREVIOUS : SHOW_NEXT);
|
callback_show_team((type == SHOW_PREVIOUS) ? SHOW_PREVIOUS : SHOW_NEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Show a sortable list of all players in a league or cup. */
|
||||||
|
void
|
||||||
|
callback_show_player_list(gint type)
|
||||||
|
{
|
||||||
|
GArray *teams = NULL;
|
||||||
|
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
case SHOW_CURRENT:
|
||||||
|
stat1 = current_user.tm->clid;
|
||||||
|
break;
|
||||||
|
case SHOW_NEXT_LEAGUE:
|
||||||
|
stat1 = league_cup_get_next_clid(stat1);
|
||||||
|
break;
|
||||||
|
case SHOW_PREVIOUS_LEAGUE:
|
||||||
|
stat1 = league_cup_get_previous_clid(stat1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
teams = league_cup_get_teams(stat1);
|
||||||
|
|
||||||
|
treeview_show_all_players(teams);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Fire a player. */
|
||||||
|
void
|
||||||
|
callback_fire_player(gint idx)
|
||||||
|
{
|
||||||
|
gchar buf[SMALL], buf2[SMALL];
|
||||||
|
Player *pl = player_of(current_user.tm, idx);
|
||||||
|
|
||||||
|
stat0 = STATUS_FIRE_PLAYER;
|
||||||
|
stat1 = idx;
|
||||||
|
stat2 = (gint)rint(pl->wage * const_float("float_player_fire_wage_factor") * pl->contract);
|
||||||
|
|
||||||
|
misc_print_grouped_int(stat2, buf2, FALSE);
|
||||||
|
|
||||||
|
sprintf(buf, _("You want to fire %s. Since his contract expires in %.1f years, he demands a compensation of %s. Do you accept?"), pl->name->str, pl->contract, buf2);
|
||||||
|
|
||||||
|
window_show_yesno(buf, FALSE);
|
||||||
|
}
|
||||||
|
@ -33,4 +33,10 @@ callback_offer_new_contract(gint idx);
|
|||||||
void
|
void
|
||||||
callback_show_team(gint type);
|
callback_show_team(gint type);
|
||||||
|
|
||||||
|
void
|
||||||
|
callback_show_player_list(gint type);
|
||||||
|
|
||||||
|
void
|
||||||
|
callback_fire_player(gint idx);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
231
src/callbacks.c
231
src/callbacks.c
@ -3,6 +3,7 @@
|
|||||||
#include "game_gui.h"
|
#include "game_gui.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "option.h"
|
#include "option.h"
|
||||||
|
#include "player.h"
|
||||||
#include "team.h"
|
#include "team.h"
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
#include "treeview.h"
|
#include "treeview.h"
|
||||||
@ -106,7 +107,8 @@ void
|
|||||||
on_button_preview_clicked (GtkButton *button,
|
on_button_preview_clicked (GtkButton *button,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
stat0 = STATUS_SHOW_PREVIEW;
|
||||||
|
treeview_show_preview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -133,7 +135,7 @@ on_player_list1_button_press_event (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
gint idx = -1;
|
gint idx = -1;
|
||||||
|
|
||||||
treeview_select_row(GTK_TREE_VIEW(widget), event);
|
if(treeview_select_row(GTK_TREE_VIEW(widget), event))
|
||||||
idx = treeview_get_index(GTK_TREE_VIEW(widget), 0);
|
idx = treeview_get_index(GTK_TREE_VIEW(widget), 0);
|
||||||
|
|
||||||
if(idx < 0 || idx - 1 == selected_row[0])
|
if(idx < 0 || idx - 1 == selected_row[0])
|
||||||
@ -194,6 +196,9 @@ on_button_cl_back_clicked (GtkButton *button,
|
|||||||
case STATUS_BROWSE_TEAMS:
|
case STATUS_BROWSE_TEAMS:
|
||||||
callback_show_team(SHOW_PREVIOUS_LEAGUE);
|
callback_show_team(SHOW_PREVIOUS_LEAGUE);
|
||||||
break;
|
break;
|
||||||
|
case STATUS_SHOW_PLAYER_LIST:
|
||||||
|
callback_show_player_list(SHOW_PREVIOUS_LEAGUE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,6 +218,9 @@ on_button_cl_forward_clicked (GtkButton *button,
|
|||||||
case STATUS_BROWSE_TEAMS:
|
case STATUS_BROWSE_TEAMS:
|
||||||
callback_show_team(SHOW_NEXT_LEAGUE);
|
callback_show_team(SHOW_NEXT_LEAGUE);
|
||||||
break;
|
break;
|
||||||
|
case STATUS_SHOW_PLAYER_LIST:
|
||||||
|
callback_show_player_list(SHOW_NEXT_LEAGUE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,7 +277,15 @@ void
|
|||||||
on_menu_put_on_transfer_list_activate (GtkMenuItem *menuitem,
|
on_menu_put_on_transfer_list_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
if(selected_row[0] == -1)
|
||||||
|
game_gui_print_message(_("You haven't selected a player."));
|
||||||
|
else if(query_transfer_player_is_on_list(player_of(current_user.tm, selected_row[0])))
|
||||||
|
game_gui_print_message(_("The player is already on the list."));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
transfer_add_remove_user_player(player_of(current_user.tm, selected_row[0]));
|
||||||
|
selected_row[0] = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -277,7 +293,15 @@ void
|
|||||||
on_menu_remove_from_transfer_list_activate (GtkMenuItem *menuitem,
|
on_menu_remove_from_transfer_list_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
if(selected_row[0] == -1)
|
||||||
|
game_gui_print_message(_("You haven't selected a player."));
|
||||||
|
else if(!query_transfer_player_is_on_list(player_of(current_user.tm, selected_row[0])))
|
||||||
|
game_gui_print_message(_("The player is not on the list."));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
transfer_add_remove_user_player(player_of(current_user.tm, selected_row[0]));
|
||||||
|
selected_row[0] = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -285,7 +309,13 @@ void
|
|||||||
on_menu_fire_activate (GtkMenuItem *menuitem,
|
on_menu_fire_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
if(selected_row[0] == -1)
|
||||||
|
game_gui_print_message(_("You haven't selected a player."));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
callback_fire_player(selected_row[0]);
|
||||||
|
selected_row[0] = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -293,114 +323,30 @@ void
|
|||||||
on_menu_shoots_penalties_activate (GtkMenuItem *menuitem,
|
on_menu_shoots_penalties_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
gchar buf[SMALL];
|
||||||
|
|
||||||
}
|
if(selected_row[0] == -1)
|
||||||
|
game_gui_print_message(_("You haven't selected a player."));
|
||||||
|
else if(player_of(current_user.tm, selected_row[0])->id ==
|
||||||
void
|
opt_user_int("int_opt_user_penalty_shooter"))
|
||||||
on_menu_all_out_defend_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
{
|
||||||
|
opt_user_set_int("int_opt_user_penalty_shooter", -1);
|
||||||
|
game_gui_print_message(_("Penalty/free kick shooter deselected."));
|
||||||
|
treeview_show_user_player_list();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_defend_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
{
|
||||||
|
sprintf(buf, "%s will shoot penalties and free kicks when he plays.",
|
||||||
|
player_of(current_user.tm, selected_row[0])->name->str);
|
||||||
|
opt_user_set_int("int_opt_user_penalty_shooter",
|
||||||
|
player_of(current_user.tm, selected_row[0])->id);
|
||||||
|
game_gui_print_message(buf);
|
||||||
|
treeview_show_user_player_list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selected_row[0] = -1;
|
||||||
void
|
|
||||||
on_menu_balanced_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_attack_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_all_out_attack_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_scout_best_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_scout_good_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_scout_average_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_scout_bad_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_physio_best_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_physio_good_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_physio_average_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_physio_bad_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_menu_my_league_results_activate (GtkMenuItem *menuitem,
|
on_menu_my_league_results_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
@ -430,8 +376,10 @@ on_treeview_right_button_press_event (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
gint idx;
|
gint idx;
|
||||||
|
|
||||||
treeview_select_row(GTK_TREE_VIEW(widget), event);
|
if(treeview_select_row(GTK_TREE_VIEW(widget), event))
|
||||||
idx = treeview_get_index(GTK_TREE_VIEW(widget), 0);
|
idx = treeview_get_index(GTK_TREE_VIEW(widget), 0);
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
switch(stat0)
|
switch(stat0)
|
||||||
{
|
{
|
||||||
@ -517,7 +465,11 @@ void
|
|||||||
on_menu_manage_users_activate (GtkMenuItem *menuitem,
|
on_menu_manage_users_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
stat0 = STATUS_USER_MANAGEMENT;
|
||||||
|
window_create(WINDOW_USER_MANAGEMENT);
|
||||||
|
treeview_show_users(GTK_TREE_VIEW(lookup_widget(window.user_management, "treeview_user_management_users")));
|
||||||
|
treeview_show_team_list(GTK_TREE_VIEW(lookup_widget(window.user_management, "treeview_user_management_teams")),
|
||||||
|
FALSE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -562,6 +514,8 @@ on_eventbox_style_button_press_event (GtkWidget *widget,
|
|||||||
|
|
||||||
game_gui_write_meters();
|
game_gui_write_meters();
|
||||||
game_gui_write_radio_items();
|
game_gui_write_radio_items();
|
||||||
|
|
||||||
|
if(stat0 == STATUS_MAIN)
|
||||||
treeview_show_next_opponent();
|
treeview_show_next_opponent();
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -591,6 +545,8 @@ on_eventbox_boost_button_press_event (GtkWidget *widget,
|
|||||||
|
|
||||||
game_gui_write_meters();
|
game_gui_write_meters();
|
||||||
game_gui_write_radio_items();
|
game_gui_write_radio_items();
|
||||||
|
|
||||||
|
if(stat0 == STATUS_MAIN)
|
||||||
treeview_show_next_opponent();
|
treeview_show_next_opponent();
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -650,5 +606,66 @@ on_menu_offer_new_contract_activate (GtkMenuItem *menuitem,
|
|||||||
}
|
}
|
||||||
|
|
||||||
callback_offer_new_contract(selected_row[0]);
|
callback_offer_new_contract(selected_row[0]);
|
||||||
|
selected_row[0] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_show_info_activate (GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_put_on_transfer_list_activate
|
||||||
|
(GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
on_menu_put_on_transfer_list_activate(NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_remove_from_transfer_list_activate
|
||||||
|
(GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
on_menu_remove_from_transfer_list_activate(NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_offer_new_contract_activate
|
||||||
|
(GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
on_menu_offer_new_contract_activate(NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_fire_activate (GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
on_menu_fire_activate(NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_shoots_penalties_activate
|
||||||
|
(GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
on_menu_shoots_penalties_activate(NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
on_menu_browse_players_activate (GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
callback_show_player_list(SHOW_CURRENT);
|
||||||
|
stat0 = STATUS_SHOW_PLAYER_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,58 +119,6 @@ void
|
|||||||
on_menu_shoots_penalties_activate (GtkMenuItem *menuitem,
|
on_menu_shoots_penalties_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_all_out_defend_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_defend_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_balanced_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_attack_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_all_out_attack_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_scout_best_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_scout_good_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_scout_average_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_scout_bad_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_physio_best_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_physio_good_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_physio_average_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_menu_physio_bad_activate (GtkMenuItem *menuitem,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_menu_my_league_results_activate (GtkMenuItem *menuitem,
|
on_menu_my_league_results_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
@ -254,7 +202,6 @@ gboolean
|
|||||||
on_menu_check_button_press_event (GtkWidget *widget,
|
on_menu_check_button_press_event (GtkWidget *widget,
|
||||||
GdkEventButton *event,
|
GdkEventButton *event,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_menu_live_game_activate (GtkMenuItem *menuitem,
|
on_menu_live_game_activate (GtkMenuItem *menuitem,
|
||||||
@ -263,3 +210,36 @@ on_menu_live_game_activate (GtkMenuItem *menuitem,
|
|||||||
void
|
void
|
||||||
on_menu_offer_new_contract_activate (GtkMenuItem *menuitem,
|
on_menu_offer_new_contract_activate (GtkMenuItem *menuitem,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_show_info_activate (GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_put_on_transfer_list_activate
|
||||||
|
(GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_remove_from_transfer_list_activate
|
||||||
|
(GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_offer_new_contract_activate
|
||||||
|
(GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_fire_activate (GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_player_menu_shoots_penalties_activate
|
||||||
|
(GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
on_menu_browse_players_activate (GtkMenuItem *menuitem,
|
||||||
|
gpointer user_data);
|
||||||
|
@ -68,6 +68,10 @@ enum Status0Value
|
|||||||
STATUS_CUSTOM_STRUCTURE,
|
STATUS_CUSTOM_STRUCTURE,
|
||||||
STATUS_SHOW_LEAGUE_RESULTS,
|
STATUS_SHOW_LEAGUE_RESULTS,
|
||||||
STATUS_CONTRACT_OFFER,
|
STATUS_CONTRACT_OFFER,
|
||||||
|
STATUS_SHOW_PLAYER_LIST,
|
||||||
|
STATUS_FIRE_PLAYER,
|
||||||
|
STATUS_USER_MANAGEMENT,
|
||||||
|
STATUS_SHOW_PREVIEW,
|
||||||
STATUS_END
|
STATUS_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -664,9 +664,7 @@ gboolean
|
|||||||
query_fixture_in_week_round(gint clid, gint week_number, gint week_round_number)
|
query_fixture_in_week_round(gint clid, gint week_number, gint week_round_number)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GArray *fixtures = (clid < ID_CUP_START) ?
|
GArray *fixtures = league_cup_get_fixtures(clid);
|
||||||
league_from_clid(clid)->fixtures : cup_from_clid(clid)->fixtures;
|
|
||||||
|
|
||||||
|
|
||||||
for(i=0;i<fixtures->len;i++)
|
for(i=0;i<fixtures->len;i++)
|
||||||
if(g_array_index(fixtures, Fixture, i).week_number == week_number &&
|
if(g_array_index(fixtures, Fixture, i).week_number == week_number &&
|
||||||
@ -707,9 +705,7 @@ GPtrArray*
|
|||||||
fixture_get_week_round_list(gint clid, gint week_number, gint week_round_number)
|
fixture_get_week_round_list(gint clid, gint week_number, gint week_round_number)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GArray *fixtures = (clid < ID_CUP_START) ?
|
GArray *fixtures = league_cup_get_fixtures(clid);
|
||||||
league_from_clid(clid)->fixtures :
|
|
||||||
cup_from_clid(clid)->fixtures;
|
|
||||||
GPtrArray *fixtures_array = g_ptr_array_new();
|
GPtrArray *fixtures_array = g_ptr_array_new();
|
||||||
|
|
||||||
for(i=0;i<fixtures->len;i++)
|
for(i=0;i<fixtures->len;i++)
|
||||||
@ -785,9 +781,7 @@ Fixture*
|
|||||||
fixture_get_next(gint clid, gint week_number, gint week_round_number)
|
fixture_get_next(gint clid, gint week_number, gint week_round_number)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GArray *fixtures = (clid < ID_CUP_START) ?
|
GArray *fixtures = league_cup_get_fixtures(clid);
|
||||||
league_from_clid(clid)->fixtures :
|
|
||||||
cup_from_clid(clid)->fixtures;
|
|
||||||
|
|
||||||
for(i=0;i<fixtures->len;i++)
|
for(i=0;i<fixtures->len;i++)
|
||||||
if(g_array_index(fixtures, Fixture, i).week_number > week_number ||
|
if(g_array_index(fixtures, Fixture, i).week_number > week_number ||
|
||||||
@ -807,9 +801,7 @@ Fixture*
|
|||||||
fixture_get_previous(gint clid, gint week_number, gint week_round_number)
|
fixture_get_previous(gint clid, gint week_number, gint week_round_number)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GArray *fixtures = (clid < ID_CUP_START) ?
|
GArray *fixtures = league_cup_get_fixtures(clid);
|
||||||
league_from_clid(clid)->fixtures :
|
|
||||||
cup_from_clid(clid)->fixtures;
|
|
||||||
|
|
||||||
for(i=fixtures->len - 1;i>=0;i--)
|
for(i=fixtures->len - 1;i>=0;i--)
|
||||||
if(g_array_index(fixtures, Fixture, i).week_number < week_number ||
|
if(g_array_index(fixtures, Fixture, i).week_number < week_number ||
|
||||||
@ -923,6 +915,40 @@ fixture_get_latest(const Team *tm)
|
|||||||
return latest;
|
return latest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return an array with the next fixtures of the team. */
|
||||||
|
GPtrArray*
|
||||||
|
fixture_get_coming(const Team *tm)
|
||||||
|
{
|
||||||
|
gint i, j;
|
||||||
|
GPtrArray *coming = g_ptr_array_new();
|
||||||
|
|
||||||
|
for(i=0;i<ligs->len;i++)
|
||||||
|
if(lig(i).id == tm->clid)
|
||||||
|
{
|
||||||
|
for(j=lig(i).fixtures->len - 1; j >= 0; j--)
|
||||||
|
if(g_array_index(lig(i).fixtures, Fixture, j).attendance != -1)
|
||||||
|
break;
|
||||||
|
else if(g_array_index(lig(i).fixtures, Fixture, j).teams[0] == tm ||
|
||||||
|
g_array_index(lig(i).fixtures, Fixture, j).teams[1] == tm)
|
||||||
|
g_ptr_array_add(coming, &g_array_index(lig(i).fixtures, Fixture, j));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(query_is_in_international_cups(tm))
|
||||||
|
for(i=0;i<cps->len;i++)
|
||||||
|
{
|
||||||
|
for(j=cp(i).fixtures->len - 1; j >= 0; j--)
|
||||||
|
if(g_array_index(cp(i).fixtures, Fixture, j).attendance != -1)
|
||||||
|
break;
|
||||||
|
else if(g_array_index(cp(i).fixtures, Fixture, j).teams[0] == tm ||
|
||||||
|
g_array_index(cp(i).fixtures, Fixture, j).teams[1] == tm)
|
||||||
|
g_ptr_array_add(coming, &g_array_index(cp(i).fixtures, Fixture, j));
|
||||||
|
}
|
||||||
|
|
||||||
|
g_ptr_array_sort_with_data(coming, fixture_compare_func, GINT_TO_POINTER(FIXTURE_COMPARE_DATE));
|
||||||
|
|
||||||
|
return coming;
|
||||||
|
}
|
||||||
|
|
||||||
/** Return a pointer array with all the matches featuring the two teams. */
|
/** Return a pointer array with all the matches featuring the two teams. */
|
||||||
GPtrArray*
|
GPtrArray*
|
||||||
fixture_get_matches(const Team *tm1, const Team *tm2)
|
fixture_get_matches(const Team *tm1, const Team *tm2)
|
||||||
|
@ -106,4 +106,7 @@ fixture_get_matches(const Team *tm1, const Team *tm2);
|
|||||||
GPtrArray*
|
GPtrArray*
|
||||||
fixture_get_league_matches(const Team *tm1, const Team *tm2);
|
fixture_get_league_matches(const Team *tm1, const Team *tm2);
|
||||||
|
|
||||||
|
GPtrArray*
|
||||||
|
fixture_get_coming(const Team *tm);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -947,9 +947,9 @@ game_update_stats(gpointer live_game, gconstpointer live_game_unit)
|
|||||||
stats->values[unit->event.values[LIVE_GAME_EVENT_VALUE_TEAM]][LIVE_GAME_STAT_VALUE_REDS]++;
|
stats->values[unit->event.values[LIVE_GAME_EVENT_VALUE_TEAM]][LIVE_GAME_STAT_VALUE_REDS]++;
|
||||||
game_update_stats_player(live_game, live_game_unit);
|
game_update_stats_player(live_game, live_game_unit);
|
||||||
}
|
}
|
||||||
else if(unit->event.type == LIVE_GAME_EVENT_GOAL &&
|
else if(unit->event.type == LIVE_GAME_EVENT_GOAL)
|
||||||
live_game_unit_before(unit, -1)->event.type != LIVE_GAME_EVENT_PENALTY)
|
|
||||||
{
|
{
|
||||||
|
if(live_game_unit_before(unit, -1)->event.type != LIVE_GAME_EVENT_PENALTY)
|
||||||
stats->values[unit->event.values[LIVE_GAME_EVENT_VALUE_TEAM]][LIVE_GAME_STAT_VALUE_GOALS_REGULAR]++;
|
stats->values[unit->event.values[LIVE_GAME_EVENT_VALUE_TEAM]][LIVE_GAME_STAT_VALUE_GOALS_REGULAR]++;
|
||||||
game_update_stats_player(live_game, live_game_unit);
|
game_update_stats_player(live_game, live_game_unit);
|
||||||
}
|
}
|
||||||
|
141
src/interface.c
141
src/interface.c
@ -44,7 +44,7 @@ create_main_window (void)
|
|||||||
GtkWidget *menu_options;
|
GtkWidget *menu_options;
|
||||||
GtkWidget *menu_options_menu;
|
GtkWidget *menu_options_menu;
|
||||||
GtkWidget *menu_preferences;
|
GtkWidget *menu_preferences;
|
||||||
GtkWidget *image258;
|
GtkWidget *image261;
|
||||||
GtkWidget *trennlinie7;
|
GtkWidget *trennlinie7;
|
||||||
GtkWidget *menu_job_offers;
|
GtkWidget *menu_job_offers;
|
||||||
GtkWidget *menu_live_game;
|
GtkWidget *menu_live_game;
|
||||||
@ -97,17 +97,19 @@ create_main_window (void)
|
|||||||
GtkWidget *menu_offer_new_contract;
|
GtkWidget *menu_offer_new_contract;
|
||||||
GtkWidget *menu_fire;
|
GtkWidget *menu_fire;
|
||||||
GtkWidget *menu_shoots_penalties;
|
GtkWidget *menu_shoots_penalties;
|
||||||
|
GtkWidget *trennlinie10;
|
||||||
|
GtkWidget *menu_browse_players;
|
||||||
GtkWidget *menu_user;
|
GtkWidget *menu_user;
|
||||||
GtkWidget *menu_user_menu;
|
GtkWidget *menu_user_menu;
|
||||||
GtkWidget *menu_user_show_last_match;
|
GtkWidget *menu_user_show_last_match;
|
||||||
GtkWidget *menu_user_show_last_stats;
|
GtkWidget *menu_user_show_last_stats;
|
||||||
GtkWidget *trennlinie9;
|
GtkWidget *trennlinie9;
|
||||||
GtkWidget *menu_next_user;
|
GtkWidget *menu_next_user;
|
||||||
GtkWidget *image259;
|
GtkWidget *image262;
|
||||||
GtkWidget *menu_previous_user;
|
GtkWidget *menu_previous_user;
|
||||||
GtkWidget *image260;
|
GtkWidget *image263;
|
||||||
GtkWidget *menu_manage_users;
|
GtkWidget *menu_manage_users;
|
||||||
GtkWidget *image261;
|
GtkWidget *image264;
|
||||||
GtkWidget *menu_finances_stadium;
|
GtkWidget *menu_finances_stadium;
|
||||||
GtkWidget *menu_finances_stadium_menu;
|
GtkWidget *menu_finances_stadium_menu;
|
||||||
GtkWidget *menu_show_finances;
|
GtkWidget *menu_show_finances;
|
||||||
@ -261,9 +263,9 @@ create_main_window (void)
|
|||||||
GDK_p, GDK_CONTROL_MASK,
|
GDK_p, GDK_CONTROL_MASK,
|
||||||
GTK_ACCEL_VISIBLE);
|
GTK_ACCEL_VISIBLE);
|
||||||
|
|
||||||
image258 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
|
image261 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
|
||||||
gtk_widget_show (image258);
|
gtk_widget_show (image261);
|
||||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image258);
|
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_preferences), image261);
|
||||||
|
|
||||||
trennlinie7 = gtk_menu_item_new ();
|
trennlinie7 = gtk_menu_item_new ();
|
||||||
gtk_widget_show (trennlinie7);
|
gtk_widget_show (trennlinie7);
|
||||||
@ -336,21 +338,25 @@ create_main_window (void)
|
|||||||
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_all_out_defend));
|
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_all_out_defend));
|
||||||
gtk_widget_show (menu_all_out_defend);
|
gtk_widget_show (menu_all_out_defend);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_all_out_defend);
|
gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_all_out_defend);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_all_out_defend), TRUE);
|
||||||
|
|
||||||
menu_defend = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Defend"));
|
menu_defend = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Defend"));
|
||||||
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_defend));
|
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_defend));
|
||||||
gtk_widget_show (menu_defend);
|
gtk_widget_show (menu_defend);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_defend);
|
gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_defend);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_defend), TRUE);
|
||||||
|
|
||||||
menu_balanced = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Balanced"));
|
menu_balanced = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Balanced"));
|
||||||
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_balanced));
|
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_balanced));
|
||||||
gtk_widget_show (menu_balanced);
|
gtk_widget_show (menu_balanced);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_balanced);
|
gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_balanced);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_balanced), TRUE);
|
||||||
|
|
||||||
menu_attack = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Attack"));
|
menu_attack = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("Attack"));
|
||||||
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_attack));
|
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_attack));
|
||||||
gtk_widget_show (menu_attack);
|
gtk_widget_show (menu_attack);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_attack);
|
gtk_container_add (GTK_CONTAINER (menu_playing_style_menu), menu_attack);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_attack), TRUE);
|
||||||
|
|
||||||
menu_all_out_attack = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("All Out Attack"));
|
menu_all_out_attack = gtk_radio_menu_item_new_with_mnemonic (menu_all_out_defend_group, _("All Out Attack"));
|
||||||
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_all_out_attack));
|
menu_all_out_defend_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_all_out_attack));
|
||||||
@ -369,16 +375,19 @@ create_main_window (void)
|
|||||||
menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_best));
|
menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_best));
|
||||||
gtk_widget_show (menu_scout_best);
|
gtk_widget_show (menu_scout_best);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_best);
|
gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_best);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_scout_best), TRUE);
|
||||||
|
|
||||||
menu_scout_good = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Good"));
|
menu_scout_good = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Good"));
|
||||||
menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_good));
|
menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_good));
|
||||||
gtk_widget_show (menu_scout_good);
|
gtk_widget_show (menu_scout_good);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_good);
|
gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_good);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_scout_good), TRUE);
|
||||||
|
|
||||||
menu_scout_average = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Average"));
|
menu_scout_average = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Average"));
|
||||||
menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_average));
|
menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_average));
|
||||||
gtk_widget_show (menu_scout_average);
|
gtk_widget_show (menu_scout_average);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_average);
|
gtk_container_add (GTK_CONTAINER (menu_scout_menu), menu_scout_average);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_scout_average), TRUE);
|
||||||
|
|
||||||
menu_scout_bad = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Bad"));
|
menu_scout_bad = gtk_radio_menu_item_new_with_mnemonic (menu_scout_best_group, _("Bad"));
|
||||||
menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_bad));
|
menu_scout_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_scout_bad));
|
||||||
@ -397,16 +406,19 @@ create_main_window (void)
|
|||||||
menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_best));
|
menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_best));
|
||||||
gtk_widget_show (menu_physio_best);
|
gtk_widget_show (menu_physio_best);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_best);
|
gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_best);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_physio_best), TRUE);
|
||||||
|
|
||||||
menu_physio_good = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Good"));
|
menu_physio_good = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Good"));
|
||||||
menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_good));
|
menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_good));
|
||||||
gtk_widget_show (menu_physio_good);
|
gtk_widget_show (menu_physio_good);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_good);
|
gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_good);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_physio_good), TRUE);
|
||||||
|
|
||||||
menu_physio_average = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Average"));
|
menu_physio_average = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Average"));
|
||||||
menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_average));
|
menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_average));
|
||||||
gtk_widget_show (menu_physio_average);
|
gtk_widget_show (menu_physio_average);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_average);
|
gtk_container_add (GTK_CONTAINER (menu_physio_menu), menu_physio_average);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_physio_average), TRUE);
|
||||||
|
|
||||||
menu_physio_bad = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Bad"));
|
menu_physio_bad = gtk_radio_menu_item_new_with_mnemonic (menu_physio_best_group, _("Bad"));
|
||||||
menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_bad));
|
menu_physio_best_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_physio_bad));
|
||||||
@ -425,11 +437,13 @@ create_main_window (void)
|
|||||||
menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_on));
|
menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_on));
|
||||||
gtk_widget_show (menu_boost_on);
|
gtk_widget_show (menu_boost_on);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_boost_menu), menu_boost_on);
|
gtk_container_add (GTK_CONTAINER (menu_boost_menu), menu_boost_on);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_boost_on), TRUE);
|
||||||
|
|
||||||
menu_boost_off = gtk_radio_menu_item_new_with_mnemonic (menu_boost_on_group, _("Off"));
|
menu_boost_off = gtk_radio_menu_item_new_with_mnemonic (menu_boost_on_group, _("Off"));
|
||||||
menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_off));
|
menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_off));
|
||||||
gtk_widget_show (menu_boost_off);
|
gtk_widget_show (menu_boost_off);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_boost_menu), menu_boost_off);
|
gtk_container_add (GTK_CONTAINER (menu_boost_menu), menu_boost_off);
|
||||||
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_boost_off), TRUE);
|
||||||
|
|
||||||
menu_boost_anti = gtk_radio_menu_item_new_with_mnemonic (menu_boost_on_group, _("Anti"));
|
menu_boost_anti = gtk_radio_menu_item_new_with_mnemonic (menu_boost_on_group, _("Anti"));
|
||||||
menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_anti));
|
menu_boost_on_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_boost_anti));
|
||||||
@ -481,6 +495,15 @@ create_main_window (void)
|
|||||||
gtk_widget_show (menu_shoots_penalties);
|
gtk_widget_show (menu_shoots_penalties);
|
||||||
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_shoots_penalties);
|
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_shoots_penalties);
|
||||||
|
|
||||||
|
trennlinie10 = gtk_menu_item_new ();
|
||||||
|
gtk_widget_show (trennlinie10);
|
||||||
|
gtk_container_add (GTK_CONTAINER (menu_player_menu), trennlinie10);
|
||||||
|
gtk_widget_set_sensitive (trennlinie10, FALSE);
|
||||||
|
|
||||||
|
menu_browse_players = gtk_menu_item_new_with_mnemonic (_("Browse players"));
|
||||||
|
gtk_widget_show (menu_browse_players);
|
||||||
|
gtk_container_add (GTK_CONTAINER (menu_player_menu), menu_browse_players);
|
||||||
|
|
||||||
menu_user = gtk_menu_item_new_with_mnemonic (_("User"));
|
menu_user = gtk_menu_item_new_with_mnemonic (_("User"));
|
||||||
gtk_widget_show (menu_user);
|
gtk_widget_show (menu_user);
|
||||||
gtk_container_add (GTK_CONTAINER (menubar1), menu_user);
|
gtk_container_add (GTK_CONTAINER (menubar1), menu_user);
|
||||||
@ -511,9 +534,9 @@ create_main_window (void)
|
|||||||
GDK_F9, 0,
|
GDK_F9, 0,
|
||||||
GTK_ACCEL_VISIBLE);
|
GTK_ACCEL_VISIBLE);
|
||||||
|
|
||||||
image259 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU);
|
image262 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU);
|
||||||
gtk_widget_show (image259);
|
gtk_widget_show (image262);
|
||||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image259);
|
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_next_user), image262);
|
||||||
|
|
||||||
menu_previous_user = gtk_image_menu_item_new_with_mnemonic (_("Previous user"));
|
menu_previous_user = gtk_image_menu_item_new_with_mnemonic (_("Previous user"));
|
||||||
gtk_widget_show (menu_previous_user);
|
gtk_widget_show (menu_previous_user);
|
||||||
@ -522,9 +545,9 @@ create_main_window (void)
|
|||||||
GDK_F8, 0,
|
GDK_F8, 0,
|
||||||
GTK_ACCEL_VISIBLE);
|
GTK_ACCEL_VISIBLE);
|
||||||
|
|
||||||
image260 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU);
|
image263 = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU);
|
||||||
gtk_widget_show (image260);
|
gtk_widget_show (image263);
|
||||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image260);
|
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_previous_user), image263);
|
||||||
|
|
||||||
menu_manage_users = gtk_image_menu_item_new_with_mnemonic (_("Manage users"));
|
menu_manage_users = gtk_image_menu_item_new_with_mnemonic (_("Manage users"));
|
||||||
gtk_widget_show (menu_manage_users);
|
gtk_widget_show (menu_manage_users);
|
||||||
@ -533,9 +556,9 @@ create_main_window (void)
|
|||||||
GDK_F12, 0,
|
GDK_F12, 0,
|
||||||
GTK_ACCEL_VISIBLE);
|
GTK_ACCEL_VISIBLE);
|
||||||
|
|
||||||
image261 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU);
|
image264 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_MENU);
|
||||||
gtk_widget_show (image261);
|
gtk_widget_show (image264);
|
||||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image261);
|
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_manage_users), image264);
|
||||||
|
|
||||||
menu_finances_stadium = gtk_menu_item_new_with_mnemonic (_("FinStad"));
|
menu_finances_stadium = gtk_menu_item_new_with_mnemonic (_("FinStad"));
|
||||||
gtk_widget_show (menu_finances_stadium);
|
gtk_widget_show (menu_finances_stadium);
|
||||||
@ -649,10 +672,7 @@ create_main_window (void)
|
|||||||
gtk_widget_show (button_preview);
|
gtk_widget_show (button_preview);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox1), button_preview, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox1), button_preview, FALSE, FALSE, 0);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (button_preview), 2);
|
gtk_container_set_border_width (GTK_CONTAINER (button_preview), 2);
|
||||||
gtk_tooltips_set_tip (tooltips, button_preview, _("Show my last games and a preview of my next games (P or F1)"), NULL);
|
gtk_tooltips_set_tip (tooltips, button_preview, _("Show my last games and a preview of my next games (F1)"), NULL);
|
||||||
gtk_widget_add_accelerator (button_preview, "clicked", accel_group,
|
|
||||||
GDK_p, 0,
|
|
||||||
GTK_ACCEL_VISIBLE);
|
|
||||||
gtk_widget_add_accelerator (button_preview, "clicked", accel_group,
|
gtk_widget_add_accelerator (button_preview, "clicked", accel_group,
|
||||||
GDK_F1, 0,
|
GDK_F1, 0,
|
||||||
GTK_ACCEL_VISIBLE);
|
GTK_ACCEL_VISIBLE);
|
||||||
@ -1088,6 +1108,9 @@ create_main_window (void)
|
|||||||
g_signal_connect ((gpointer) menu_shoots_penalties, "activate",
|
g_signal_connect ((gpointer) menu_shoots_penalties, "activate",
|
||||||
G_CALLBACK (on_menu_shoots_penalties_activate),
|
G_CALLBACK (on_menu_shoots_penalties_activate),
|
||||||
NULL);
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) menu_browse_players, "activate",
|
||||||
|
G_CALLBACK (on_menu_browse_players_activate),
|
||||||
|
NULL);
|
||||||
g_signal_connect ((gpointer) menu_user_show_last_match, "activate",
|
g_signal_connect ((gpointer) menu_user_show_last_match, "activate",
|
||||||
G_CALLBACK (on_menu_user_show_last_match_activate),
|
G_CALLBACK (on_menu_user_show_last_match_activate),
|
||||||
NULL);
|
NULL);
|
||||||
@ -1179,7 +1202,7 @@ create_main_window (void)
|
|||||||
GLADE_HOOKUP_OBJECT (main_window, menu_options, "menu_options");
|
GLADE_HOOKUP_OBJECT (main_window, menu_options, "menu_options");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_options_menu, "menu_options_menu");
|
GLADE_HOOKUP_OBJECT (main_window, menu_options_menu, "menu_options_menu");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_preferences, "menu_preferences");
|
GLADE_HOOKUP_OBJECT (main_window, menu_preferences, "menu_preferences");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, image258, "image258");
|
GLADE_HOOKUP_OBJECT (main_window, image261, "image261");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie7, "trennlinie7");
|
GLADE_HOOKUP_OBJECT (main_window, trennlinie7, "trennlinie7");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_job_offers, "menu_job_offers");
|
GLADE_HOOKUP_OBJECT (main_window, menu_job_offers, "menu_job_offers");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_live_game, "menu_live_game");
|
GLADE_HOOKUP_OBJECT (main_window, menu_live_game, "menu_live_game");
|
||||||
@ -1228,17 +1251,19 @@ create_main_window (void)
|
|||||||
GLADE_HOOKUP_OBJECT (main_window, menu_offer_new_contract, "menu_offer_new_contract");
|
GLADE_HOOKUP_OBJECT (main_window, menu_offer_new_contract, "menu_offer_new_contract");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_fire, "menu_fire");
|
GLADE_HOOKUP_OBJECT (main_window, menu_fire, "menu_fire");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_shoots_penalties, "menu_shoots_penalties");
|
GLADE_HOOKUP_OBJECT (main_window, menu_shoots_penalties, "menu_shoots_penalties");
|
||||||
|
GLADE_HOOKUP_OBJECT (main_window, trennlinie10, "trennlinie10");
|
||||||
|
GLADE_HOOKUP_OBJECT (main_window, menu_browse_players, "menu_browse_players");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_user, "menu_user");
|
GLADE_HOOKUP_OBJECT (main_window, menu_user, "menu_user");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_user_menu, "menu_user_menu");
|
GLADE_HOOKUP_OBJECT (main_window, menu_user_menu, "menu_user_menu");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_match, "menu_user_show_last_match");
|
GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_match, "menu_user_show_last_match");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_stats, "menu_user_show_last_stats");
|
GLADE_HOOKUP_OBJECT (main_window, menu_user_show_last_stats, "menu_user_show_last_stats");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, trennlinie9, "trennlinie9");
|
GLADE_HOOKUP_OBJECT (main_window, trennlinie9, "trennlinie9");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_next_user, "menu_next_user");
|
GLADE_HOOKUP_OBJECT (main_window, menu_next_user, "menu_next_user");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, image259, "image259");
|
GLADE_HOOKUP_OBJECT (main_window, image262, "image262");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_previous_user, "menu_previous_user");
|
GLADE_HOOKUP_OBJECT (main_window, menu_previous_user, "menu_previous_user");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, image260, "image260");
|
GLADE_HOOKUP_OBJECT (main_window, image263, "image263");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_manage_users, "menu_manage_users");
|
GLADE_HOOKUP_OBJECT (main_window, menu_manage_users, "menu_manage_users");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, image261, "image261");
|
GLADE_HOOKUP_OBJECT (main_window, image264, "image264");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium, "menu_finances_stadium");
|
GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium, "menu_finances_stadium");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium_menu, "menu_finances_stadium_menu");
|
GLADE_HOOKUP_OBJECT (main_window, menu_finances_stadium_menu, "menu_finances_stadium_menu");
|
||||||
GLADE_HOOKUP_OBJECT (main_window, menu_show_finances, "menu_show_finances");
|
GLADE_HOOKUP_OBJECT (main_window, menu_show_finances, "menu_show_finances");
|
||||||
@ -1328,3 +1353,71 @@ create_main_window (void)
|
|||||||
return main_window;
|
return main_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
create_menu_player (void)
|
||||||
|
{
|
||||||
|
GtkWidget *menu_player;
|
||||||
|
GtkWidget *player_menu_show_info;
|
||||||
|
GtkWidget *player_menu_put_on_transfer_list;
|
||||||
|
GtkWidget *player_menu_remove_from_transfer_list;
|
||||||
|
GtkWidget *player_menu_offer_new_contract;
|
||||||
|
GtkWidget *player_menu_fire;
|
||||||
|
GtkWidget *player_menu_shoots_penalties;
|
||||||
|
|
||||||
|
menu_player = gtk_menu_new ();
|
||||||
|
|
||||||
|
player_menu_show_info = gtk_menu_item_new_with_mnemonic (_("Show info"));
|
||||||
|
gtk_widget_show (player_menu_show_info);
|
||||||
|
gtk_container_add (GTK_CONTAINER (menu_player), player_menu_show_info);
|
||||||
|
|
||||||
|
player_menu_put_on_transfer_list = gtk_menu_item_new_with_mnemonic (_("Put on transfer list"));
|
||||||
|
gtk_widget_show (player_menu_put_on_transfer_list);
|
||||||
|
gtk_container_add (GTK_CONTAINER (menu_player), player_menu_put_on_transfer_list);
|
||||||
|
|
||||||
|
player_menu_remove_from_transfer_list = gtk_menu_item_new_with_mnemonic (_("Remove from transfer list"));
|
||||||
|
gtk_widget_show (player_menu_remove_from_transfer_list);
|
||||||
|
gtk_container_add (GTK_CONTAINER (menu_player), player_menu_remove_from_transfer_list);
|
||||||
|
|
||||||
|
player_menu_offer_new_contract = gtk_menu_item_new_with_mnemonic (_("Offer new contract"));
|
||||||
|
gtk_widget_show (player_menu_offer_new_contract);
|
||||||
|
gtk_container_add (GTK_CONTAINER (menu_player), player_menu_offer_new_contract);
|
||||||
|
|
||||||
|
player_menu_fire = gtk_menu_item_new_with_mnemonic (_("Fire"));
|
||||||
|
gtk_widget_show (player_menu_fire);
|
||||||
|
gtk_container_add (GTK_CONTAINER (menu_player), player_menu_fire);
|
||||||
|
|
||||||
|
player_menu_shoots_penalties = gtk_menu_item_new_with_mnemonic (_("Shoots penalties"));
|
||||||
|
gtk_widget_show (player_menu_shoots_penalties);
|
||||||
|
gtk_container_add (GTK_CONTAINER (menu_player), player_menu_shoots_penalties);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) player_menu_show_info, "activate",
|
||||||
|
G_CALLBACK (on_player_menu_show_info_activate),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) player_menu_put_on_transfer_list, "activate",
|
||||||
|
G_CALLBACK (on_player_menu_put_on_transfer_list_activate),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) player_menu_remove_from_transfer_list, "activate",
|
||||||
|
G_CALLBACK (on_player_menu_remove_from_transfer_list_activate),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) player_menu_offer_new_contract, "activate",
|
||||||
|
G_CALLBACK (on_player_menu_offer_new_contract_activate),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) player_menu_fire, "activate",
|
||||||
|
G_CALLBACK (on_player_menu_fire_activate),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) player_menu_shoots_penalties, "activate",
|
||||||
|
G_CALLBACK (on_player_menu_shoots_penalties_activate),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
|
GLADE_HOOKUP_OBJECT_NO_REF (menu_player, menu_player, "menu_player");
|
||||||
|
GLADE_HOOKUP_OBJECT (menu_player, player_menu_show_info, "player_menu_show_info");
|
||||||
|
GLADE_HOOKUP_OBJECT (menu_player, player_menu_put_on_transfer_list, "player_menu_put_on_transfer_list");
|
||||||
|
GLADE_HOOKUP_OBJECT (menu_player, player_menu_remove_from_transfer_list, "player_menu_remove_from_transfer_list");
|
||||||
|
GLADE_HOOKUP_OBJECT (menu_player, player_menu_offer_new_contract, "player_menu_offer_new_contract");
|
||||||
|
GLADE_HOOKUP_OBJECT (menu_player, player_menu_fire, "player_menu_fire");
|
||||||
|
GLADE_HOOKUP_OBJECT (menu_player, player_menu_shoots_penalties, "player_menu_shoots_penalties");
|
||||||
|
|
||||||
|
return menu_player;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -3,3 +3,4 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
GtkWidget* create_main_window (void);
|
GtkWidget* create_main_window (void);
|
||||||
|
GtkWidget* create_menu_player (void);
|
||||||
|
12
src/league.c
12
src/league.c
@ -210,9 +210,7 @@ Fixture*
|
|||||||
league_cup_get_next_fixture(gint clid, gint week_number, gint week_round_number)
|
league_cup_get_next_fixture(gint clid, gint week_number, gint week_round_number)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GArray *fixtures = (clid < ID_CUP_START) ?
|
GArray *fixtures = league_cup_get_fixtures(clid);
|
||||||
league_from_clid(clid)->fixtures :
|
|
||||||
cup_from_clid(clid)->fixtures;
|
|
||||||
|
|
||||||
for(i=0;i<fixtures->len;i++)
|
for(i=0;i<fixtures->len;i++)
|
||||||
if(g_array_index(fixtures, Fixture, i).week_number > week_number ||
|
if(g_array_index(fixtures, Fixture, i).week_number > week_number ||
|
||||||
@ -230,9 +228,7 @@ Fixture*
|
|||||||
league_cup_get_previous_fixture(gint clid, gint week_number, gint week_round_number)
|
league_cup_get_previous_fixture(gint clid, gint week_number, gint week_round_number)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GArray *fixtures = (clid < ID_CUP_START) ?
|
GArray *fixtures = league_cup_get_fixtures(clid);
|
||||||
league_from_clid(clid)->fixtures :
|
|
||||||
cup_from_clid(clid)->fixtures;
|
|
||||||
|
|
||||||
for(i=fixtures->len - 1;i>=0;i--)
|
for(i=fixtures->len - 1;i>=0;i--)
|
||||||
if(g_array_index(fixtures, Fixture, i).week_number < week_number ||
|
if(g_array_index(fixtures, Fixture, i).week_number < week_number ||
|
||||||
@ -266,9 +262,7 @@ league_cup_average_capacity(gint clid)
|
|||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
gfloat sum = 0;
|
gfloat sum = 0;
|
||||||
const GArray *teams = (clid < ID_CUP_START) ?
|
const GArray *teams = league_cup_get_teams(clid);
|
||||||
league_from_clid(clid)->teams :
|
|
||||||
cup_from_clid(clid)->teams;
|
|
||||||
|
|
||||||
for(i=0;i<teams->len;i++)
|
for(i=0;i<teams->len;i++)
|
||||||
if(team_is_user(&g_array_index(teams, Team, i)) == -1)
|
if(team_is_user(&g_array_index(teams, Team, i)) == -1)
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
#include "league_struct.h"
|
#include "league_struct.h"
|
||||||
#include "fixture_struct.h"
|
#include "fixture_struct.h"
|
||||||
|
|
||||||
|
#define league_cup_get_teams(clid) (clid < ID_CUP_START) ? league_from_clid(clid)->teams : cup_from_clid(clid)->teams
|
||||||
|
#define league_cup_get_fixtures(clid) (clid < ID_CUP_START) ? league_from_clid(clid)->fixtures : cup_from_clid(clid)->fixtures
|
||||||
|
|
||||||
League
|
League
|
||||||
league_new(void);
|
league_new(void);
|
||||||
|
|
||||||
|
@ -568,7 +568,9 @@ live_game_event_penalty(void)
|
|||||||
|
|
||||||
if(team_is_user(tm[last_unit.possession]) != -1 &&
|
if(team_is_user(tm[last_unit.possession]) != -1 &&
|
||||||
option_int("int_opt_user_penalty_shooter",
|
option_int("int_opt_user_penalty_shooter",
|
||||||
&usr(team_is_user(tm[last_unit.possession])).options) != -1)
|
&usr(team_is_user(tm[last_unit.possession])).options) != -1 &&
|
||||||
|
player_of_id(tm[last_unit.possession], option_int("int_opt_user_penalty_shooter",
|
||||||
|
&usr(team_is_user(tm[last_unit.possession])).options)) != NULL)
|
||||||
last_unit.event.values[LIVE_GAME_EVENT_VALUE_PLAYER] =
|
last_unit.event.values[LIVE_GAME_EVENT_VALUE_PLAYER] =
|
||||||
option_int("int_opt_user_penalty_shooter",
|
option_int("int_opt_user_penalty_shooter",
|
||||||
&usr(team_is_user(tm[last_unit.possession])).options);
|
&usr(team_is_user(tm[last_unit.possession])).options);
|
||||||
@ -721,10 +723,12 @@ live_game_event_free_kick(void)
|
|||||||
new.event.commentary = g_string_new("freekick");
|
new.event.commentary = g_string_new("freekick");
|
||||||
if(team_is_user(tm[new.possession]) != -1 &&
|
if(team_is_user(tm[new.possession]) != -1 &&
|
||||||
option_int("int_opt_user_penalty_shooter",
|
option_int("int_opt_user_penalty_shooter",
|
||||||
&usr(team_is_user(tm[last_unit.possession])).options) != -1)
|
&usr(team_is_user(tm[last_unit.possession])).options) != -1 &&
|
||||||
|
player_of_id(tm[new.possession], option_int("int_opt_user_penalty_shooter",
|
||||||
|
&usr(team_is_user(tm[new.possession])).options)) != NULL)
|
||||||
new.event.values[LIVE_GAME_EVENT_VALUE_PLAYER] =
|
new.event.values[LIVE_GAME_EVENT_VALUE_PLAYER] =
|
||||||
option_int("int_opt_user_penalty_shooter",
|
option_int("int_opt_user_penalty_shooter",
|
||||||
&usr(team_is_user(tm[last_unit.possession])).options);
|
&usr(team_is_user(tm[new.possession])).options);
|
||||||
else
|
else
|
||||||
new.event.values[LIVE_GAME_EVENT_VALUE_PLAYER] =
|
new.event.values[LIVE_GAME_EVENT_VALUE_PLAYER] =
|
||||||
game_get_player(tm[new.possession], new.area, 0, -1, TRUE);
|
game_get_player(tm[new.possession], new.area, 0, -1, TRUE);
|
||||||
@ -1115,7 +1119,7 @@ live_game_unit_before(const LiveGameUnit* unit, gint gap)
|
|||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
if(gap < 0)
|
if(gap > 0)
|
||||||
{
|
{
|
||||||
for(i=unis->len - 1;i>=0;i--)
|
for(i=unis->len - 1;i>=0;i--)
|
||||||
if(&uni(i) == unit)
|
if(&uni(i) == unit)
|
||||||
@ -1131,7 +1135,7 @@ live_game_unit_before(const LiveGameUnit* unit, gint gap)
|
|||||||
for(i=unis->len - 1;i>=0;i--)
|
for(i=unis->len - 1;i>=0;i--)
|
||||||
if(&uni(i) == unit)
|
if(&uni(i) == unit)
|
||||||
{
|
{
|
||||||
if(i + gap < unis->len)
|
if(i + gap < unis->len - 1)
|
||||||
return &uni(i + gap);
|
return &uni(i + gap);
|
||||||
else
|
else
|
||||||
g_warning("live_game_unit_before: no unit found for gap %d\n", gap);
|
g_warning("live_game_unit_before: no unit found for gap %d\n", gap);
|
||||||
|
12
src/main.c
12
src/main.c
@ -24,8 +24,11 @@ main_init_variables(void)
|
|||||||
transfer_list = NULL;
|
transfer_list = NULL;
|
||||||
player_names = NULL;
|
player_names = NULL;
|
||||||
|
|
||||||
window.main = window.startup = window.startup_users =
|
window.main = window.startup =
|
||||||
window.live = window.warning = NULL;
|
window.live = window.warning = window.progress = window.digits =
|
||||||
|
window.stadium = window.job_offer = window.yesno =
|
||||||
|
window.options = window.font_sel = window.contract =
|
||||||
|
window.menu_player = window.user_management = NULL;
|
||||||
|
|
||||||
live_game_temp.units = NULL;
|
live_game_temp.units = NULL;
|
||||||
|
|
||||||
@ -78,7 +81,6 @@ main_init(gint argc, gchar *argv[])
|
|||||||
gint
|
gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
gint x_pos, y_pos;
|
|
||||||
|
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
|
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
|
||||||
@ -91,15 +93,11 @@ main (gint argc, gchar *argv[])
|
|||||||
|
|
||||||
main_init(argc, argv);
|
main_init(argc, argv);
|
||||||
|
|
||||||
window_create(WINDOW_STARTUP_USERS);
|
|
||||||
window_show_startup();
|
window_show_startup();
|
||||||
gtk_window_get_position(GTK_WINDOW(window.startup), &x_pos, &y_pos);
|
|
||||||
gtk_window_move(GTK_WINDOW(window.startup_users), x_pos, y_pos);
|
|
||||||
stat0 = STATUS_TEAM_SELECTION;
|
stat0 = STATUS_TEAM_SELECTION;
|
||||||
/*d*/
|
/*d*/
|
||||||
on_button_add_player_clicked(NULL, NULL);
|
on_button_add_player_clicked(NULL, NULL);
|
||||||
|
|
||||||
|
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
|
|
||||||
main_exit_program(EXIT_OK, NULL);
|
main_exit_program(EXIT_OK, NULL);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "file.h"
|
||||||
#include "finance.h"
|
#include "finance.h"
|
||||||
#include "game_gui.h"
|
#include "game_gui.h"
|
||||||
#include "maths.h"
|
#include "maths.h"
|
||||||
@ -107,7 +108,7 @@ misc2_callback_contract_offer(void)
|
|||||||
{
|
{
|
||||||
pl->contract += (i + 1);
|
pl->contract += (i + 1);
|
||||||
pl->wage = value;
|
pl->wage = value;
|
||||||
sprintf(buf, _("%s has accepted your offer."), pl->name->str);
|
sprintf(buf, _("%s accepts your offer."), pl->name->str);
|
||||||
game_gui_print_message(buf);
|
game_gui_print_message(buf);
|
||||||
window_destroy(&window.contract, FALSE);
|
window_destroy(&window.contract, FALSE);
|
||||||
}
|
}
|
||||||
@ -134,3 +135,30 @@ misc2_callback_contract_offer(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Add a user to the users array. */
|
||||||
|
void
|
||||||
|
misc2_callback_add_user(void)
|
||||||
|
{
|
||||||
|
GtkTreeView *treeview_user_management_teams =
|
||||||
|
GTK_TREE_VIEW(lookup_widget(window.user_management, "treeview_user_management_teams"));
|
||||||
|
GtkEntry *entry_user_management =
|
||||||
|
GTK_ENTRY(lookup_widget(window.user_management, "entry_user_management"));
|
||||||
|
const gchar *user_name = gtk_entry_get_text(entry_user_management);
|
||||||
|
User new_user = user_new();
|
||||||
|
|
||||||
|
if(strlen(user_name) > 0)
|
||||||
|
g_string_printf(new_user.name, "%s", user_name);
|
||||||
|
|
||||||
|
gtk_entry_set_text(entry_user_management, "");
|
||||||
|
|
||||||
|
new_user.tm = treeview_get_pointer(treeview_user_management_teams, 2);
|
||||||
|
|
||||||
|
g_array_append_val(users, new_user);
|
||||||
|
|
||||||
|
user_set_up_team(&usr(users->len - 1));
|
||||||
|
file_load_user_conf_file(&usr(users->len - 1));
|
||||||
|
|
||||||
|
treeview_show_users(GTK_TREE_VIEW(lookup_widget(window.user_management, "treeview_user_management_users")));
|
||||||
|
treeview_show_team_list(treeview_user_management_teams, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
@ -12,5 +12,8 @@ misc2_callback_change_structure(gint structure);
|
|||||||
void
|
void
|
||||||
misc2_callback_contract_offer(void);
|
misc2_callback_contract_offer(void);
|
||||||
|
|
||||||
|
void
|
||||||
|
misc2_callback_add_user(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
#include "misc2_callbacks.h"
|
#include "misc2_callbacks.h"
|
||||||
#include "misc2_callback_func.h"
|
#include "misc2_callback_func.h"
|
||||||
#include "misc2_interface.h"
|
#include "misc2_interface.h"
|
||||||
|
#include "player.h"
|
||||||
#include "support.h"
|
#include "support.h"
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
|
#include "treeview.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|
||||||
@ -122,6 +124,7 @@ on_window_yesno_delete_event (GtkWidget *widget,
|
|||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
on_button_yesno_no_clicked(NULL, NULL);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -147,8 +150,22 @@ on_button_yesno_yes_clicked (GtkButton *button,
|
|||||||
case STATUS_TRANSFER_OFFER:
|
case STATUS_TRANSFER_OFFER:
|
||||||
misc2_callback_transfer_user_player();
|
misc2_callback_transfer_user_player();
|
||||||
break;
|
break;
|
||||||
|
case STATUS_FIRE_PLAYER:
|
||||||
|
player_remove_from_team(current_user.tm, stat1);
|
||||||
|
current_user.money -= stat2;
|
||||||
|
current_user.money_out[1][MON_OUT_COMPENSATIONS] -= stat2;
|
||||||
|
treeview_show_user_player_list();
|
||||||
|
break;
|
||||||
|
case STATUS_USER_MANAGEMENT:
|
||||||
|
user_remove(stat1, TRUE);
|
||||||
|
treeview_show_users(GTK_TREE_VIEW(lookup_widget(window.user_management,
|
||||||
|
"treeview_user_management_users")));
|
||||||
|
treeview_show_team_list(GTK_TREE_VIEW(lookup_widget(window.user_management,
|
||||||
|
"treeview_user_management_teams")),
|
||||||
|
FALSE, FALSE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
/*d*/
|
|
||||||
window_destroy(&window.yesno, TRUE);
|
window_destroy(&window.yesno, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,3 +194,65 @@ on_window_contract_delete_event (GtkWidget *widget,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_entry_user_management_activate (GtkEntry *entry,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
on_button_user_management_add_clicked(NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_button_user_management_add_clicked (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
misc2_callback_add_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_button_user_management_close_clicked
|
||||||
|
(GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
window_destroy(&window.user_management, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
on_treeview_user_management_users_button_press_event
|
||||||
|
(GtkWidget *widget,
|
||||||
|
GdkEventButton *event,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
gchar buf[SMALL];
|
||||||
|
gint idx = -1;
|
||||||
|
|
||||||
|
if(!treeview_select_row(GTK_TREE_VIEW(widget), event))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
idx = treeview_get_index(GTK_TREE_VIEW(widget), 0) - 1;
|
||||||
|
|
||||||
|
if(users->len == 1)
|
||||||
|
{
|
||||||
|
game_gui_show_warning("You can't play Bygfoot with 0 users!");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
stat1 = idx;
|
||||||
|
sprintf(buf, "Remove user %s from the game?", usr(idx).name->str);
|
||||||
|
window_show_yesno(buf, FALSE);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
on_treeview_user_management_teams_row_activated
|
||||||
|
(GtkTreeView *treeview,
|
||||||
|
GtkTreePath *path,
|
||||||
|
GtkTreeViewColumn *column,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
on_button_user_management_add_clicked(NULL, NULL);
|
||||||
|
}
|
||||||
|
@ -62,3 +62,29 @@ gboolean
|
|||||||
on_window_contract_delete_event (GtkWidget *widget,
|
on_window_contract_delete_event (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_entry_user_management_activate (GtkEntry *entry,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_button_user_management_add_clicked (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_button_user_management_close_clicked
|
||||||
|
(GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
on_treeview_user_management_users_button_press_event
|
||||||
|
(GtkWidget *widget,
|
||||||
|
GdkEventButton *event,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_treeview_user_management_teams_row_activated
|
||||||
|
(GtkTreeView *treeview,
|
||||||
|
GtkTreePath *path,
|
||||||
|
GtkTreeViewColumn *column,
|
||||||
|
gpointer user_data);
|
||||||
|
@ -766,3 +766,167 @@ create_window_contract (void)
|
|||||||
return window_contract;
|
return window_contract;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
create_window_user_management (void)
|
||||||
|
{
|
||||||
|
GtkWidget *window_user_management;
|
||||||
|
GtkWidget *vbox19;
|
||||||
|
GtkWidget *hbox23;
|
||||||
|
GtkWidget *hpaned1;
|
||||||
|
GtkWidget *vbox20;
|
||||||
|
GtkWidget *label47;
|
||||||
|
GtkWidget *scrolledwindow2;
|
||||||
|
GtkWidget *viewport1;
|
||||||
|
GtkWidget *treeview_user_management_users;
|
||||||
|
GtkWidget *vbox21;
|
||||||
|
GtkWidget *label46;
|
||||||
|
GtkWidget *scrolledwindow3;
|
||||||
|
GtkWidget *treeview_user_management_teams;
|
||||||
|
GtkWidget *hbox21;
|
||||||
|
GtkWidget *entry_user_management;
|
||||||
|
GtkWidget *button_user_management_add;
|
||||||
|
GtkWidget *alignment7;
|
||||||
|
GtkWidget *hbox22;
|
||||||
|
GtkWidget *image11;
|
||||||
|
GtkWidget *label45;
|
||||||
|
GtkWidget *hseparator9;
|
||||||
|
GtkWidget *button_user_management_close;
|
||||||
|
|
||||||
|
window_user_management = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (window_user_management), 5);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (window_user_management), _("window1"));
|
||||||
|
gtk_window_set_position (GTK_WINDOW (window_user_management), GTK_WIN_POS_CENTER);
|
||||||
|
gtk_window_set_default_size (GTK_WINDOW (window_user_management), 600, 550);
|
||||||
|
|
||||||
|
vbox19 = gtk_vbox_new (FALSE, 5);
|
||||||
|
gtk_widget_show (vbox19);
|
||||||
|
gtk_container_add (GTK_CONTAINER (window_user_management), vbox19);
|
||||||
|
|
||||||
|
hbox23 = gtk_hbox_new (FALSE, 0);
|
||||||
|
gtk_widget_show (hbox23);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox19), hbox23, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
hpaned1 = gtk_hpaned_new ();
|
||||||
|
gtk_widget_show (hpaned1);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox23), hpaned1, TRUE, TRUE, 0);
|
||||||
|
gtk_paned_set_position (GTK_PANED (hpaned1), 200);
|
||||||
|
|
||||||
|
vbox20 = gtk_vbox_new (FALSE, 0);
|
||||||
|
gtk_widget_show (vbox20);
|
||||||
|
gtk_paned_pack1 (GTK_PANED (hpaned1), vbox20, FALSE, TRUE);
|
||||||
|
|
||||||
|
label47 = gtk_label_new (_("Users -- click to remove"));
|
||||||
|
gtk_widget_show (label47);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox20), label47, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label47), GTK_JUSTIFY_LEFT);
|
||||||
|
|
||||||
|
scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
|
||||||
|
gtk_widget_show (scrolledwindow2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox20), scrolledwindow2, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
viewport1 = gtk_viewport_new (NULL, NULL);
|
||||||
|
gtk_widget_show (viewport1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (scrolledwindow2), viewport1);
|
||||||
|
|
||||||
|
treeview_user_management_users = gtk_tree_view_new ();
|
||||||
|
gtk_widget_show (treeview_user_management_users);
|
||||||
|
gtk_container_add (GTK_CONTAINER (viewport1), treeview_user_management_users);
|
||||||
|
|
||||||
|
vbox21 = gtk_vbox_new (FALSE, 0);
|
||||||
|
gtk_widget_show (vbox21);
|
||||||
|
gtk_paned_pack2 (GTK_PANED (hpaned1), vbox21, TRUE, TRUE);
|
||||||
|
|
||||||
|
label46 = gtk_label_new (_("Available teams"));
|
||||||
|
gtk_widget_show (label46);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox21), label46, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label46), GTK_JUSTIFY_LEFT);
|
||||||
|
|
||||||
|
scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
|
||||||
|
gtk_widget_show (scrolledwindow3);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox21), scrolledwindow3, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
treeview_user_management_teams = gtk_tree_view_new ();
|
||||||
|
gtk_widget_show (treeview_user_management_teams);
|
||||||
|
gtk_container_add (GTK_CONTAINER (scrolledwindow3), treeview_user_management_teams);
|
||||||
|
|
||||||
|
hbox21 = gtk_hbox_new (FALSE, 5);
|
||||||
|
gtk_widget_show (hbox21);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox19), hbox21, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
entry_user_management = gtk_entry_new ();
|
||||||
|
gtk_widget_show (entry_user_management);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox21), entry_user_management, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
button_user_management_add = gtk_button_new ();
|
||||||
|
gtk_widget_show (button_user_management_add);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox21), button_user_management_add, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
alignment7 = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||||
|
gtk_widget_show (alignment7);
|
||||||
|
gtk_container_add (GTK_CONTAINER (button_user_management_add), alignment7);
|
||||||
|
|
||||||
|
hbox22 = gtk_hbox_new (FALSE, 2);
|
||||||
|
gtk_widget_show (hbox22);
|
||||||
|
gtk_container_add (GTK_CONTAINER (alignment7), hbox22);
|
||||||
|
|
||||||
|
image11 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_BUTTON);
|
||||||
|
gtk_widget_show (image11);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox22), image11, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
label45 = gtk_label_new_with_mnemonic (_("Add user"));
|
||||||
|
gtk_widget_show (label45);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox22), label45, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label45), GTK_JUSTIFY_LEFT);
|
||||||
|
|
||||||
|
hseparator9 = gtk_hseparator_new ();
|
||||||
|
gtk_widget_show (hseparator9);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox19), hseparator9, FALSE, FALSE, 0);
|
||||||
|
gtk_widget_set_size_request (hseparator9, 1, 10);
|
||||||
|
|
||||||
|
button_user_management_close = gtk_button_new_from_stock ("gtk-close");
|
||||||
|
gtk_widget_show (button_user_management_close);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox19), button_user_management_close, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) treeview_user_management_users, "button_press_event",
|
||||||
|
G_CALLBACK (on_treeview_user_management_users_button_press_event),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) treeview_user_management_teams, "row_activated",
|
||||||
|
G_CALLBACK (on_treeview_user_management_teams_row_activated),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) entry_user_management, "activate",
|
||||||
|
G_CALLBACK (on_entry_user_management_activate),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) button_user_management_add, "clicked",
|
||||||
|
G_CALLBACK (on_button_user_management_add_clicked),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) button_user_management_close, "clicked",
|
||||||
|
G_CALLBACK (on_button_user_management_close_clicked),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
|
GLADE_HOOKUP_OBJECT_NO_REF (window_user_management, window_user_management, "window_user_management");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, vbox19, "vbox19");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, hbox23, "hbox23");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, hpaned1, "hpaned1");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, vbox20, "vbox20");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, label47, "label47");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, scrolledwindow2, "scrolledwindow2");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, viewport1, "viewport1");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, treeview_user_management_users, "treeview_user_management_users");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, vbox21, "vbox21");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, label46, "label46");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, scrolledwindow3, "scrolledwindow3");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, treeview_user_management_teams, "treeview_user_management_teams");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, hbox21, "hbox21");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, entry_user_management, "entry_user_management");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, button_user_management_add, "button_user_management_add");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, alignment7, "alignment7");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, hbox22, "hbox22");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, image11, "image11");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, label45, "label45");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, hseparator9, "hseparator9");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_user_management, button_user_management_close, "button_user_management_close");
|
||||||
|
|
||||||
|
return window_user_management;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -8,3 +8,4 @@ GtkWidget* create_window_warning (void);
|
|||||||
GtkWidget* create_window_digits (void);
|
GtkWidget* create_window_digits (void);
|
||||||
GtkWidget* create_window_yesno (void);
|
GtkWidget* create_window_yesno (void);
|
||||||
GtkWidget* create_window_contract (void);
|
GtkWidget* create_window_contract (void);
|
||||||
|
GtkWidget* create_window_user_management (void);
|
||||||
|
@ -68,7 +68,6 @@ misc_callback_start_game(void)
|
|||||||
user_set_up_team_new_game(&usr(i));
|
user_set_up_team_new_game(&usr(i));
|
||||||
|
|
||||||
window_destroy(&window.startup, TRUE);
|
window_destroy(&window.startup, TRUE);
|
||||||
window_destroy(&window.startup_users, TRUE);
|
|
||||||
|
|
||||||
window_create(WINDOW_MAIN);
|
window_create(WINDOW_MAIN);
|
||||||
|
|
||||||
@ -83,7 +82,9 @@ misc_callback_add_player(void)
|
|||||||
GTK_TOGGLE_BUTTON(lookup_widget(window.startup, "team_selection_radio1"));
|
GTK_TOGGLE_BUTTON(lookup_widget(window.startup, "team_selection_radio1"));
|
||||||
GtkToggleButton *team_selection_radio2 =
|
GtkToggleButton *team_selection_radio2 =
|
||||||
GTK_TOGGLE_BUTTON(lookup_widget(window.startup, "team_selection_radio2"));
|
GTK_TOGGLE_BUTTON(lookup_widget(window.startup, "team_selection_radio2"));
|
||||||
GtkTreeView *treeview =
|
GtkTreeView *treeview_users =
|
||||||
|
GTK_TREE_VIEW(lookup_widget(window.startup, "treeview_users"));
|
||||||
|
GtkTreeView *treeview_startup =
|
||||||
GTK_TREE_VIEW(lookup_widget(window.startup, "treeview_startup"));
|
GTK_TREE_VIEW(lookup_widget(window.startup, "treeview_startup"));
|
||||||
GtkEntry *entry_player_name =
|
GtkEntry *entry_player_name =
|
||||||
GTK_ENTRY(lookup_widget(window.startup, "entry_player_name"));
|
GTK_ENTRY(lookup_widget(window.startup, "entry_player_name"));
|
||||||
@ -102,14 +103,13 @@ misc_callback_add_player(void)
|
|||||||
else
|
else
|
||||||
new_user.scout = -1;
|
new_user.scout = -1;
|
||||||
|
|
||||||
new_user.tm = treeview_get_pointer(treeview, 2);
|
new_user.tm = treeview_get_pointer(treeview_startup, 2);
|
||||||
|
|
||||||
g_array_append_val(users, new_user);
|
g_array_append_val(users, new_user);
|
||||||
|
|
||||||
treeview_show_users_startup();
|
treeview_show_users(treeview_users);
|
||||||
|
|
||||||
treeview_show_team_list(GTK_TREE_VIEW(lookup_widget(window.startup, "treeview_startup")),
|
treeview_show_team_list(treeview_startup, FALSE, FALSE);
|
||||||
FALSE, FALSE);
|
|
||||||
|
|
||||||
if(users->len == 1)
|
if(users->len == 1)
|
||||||
{
|
{
|
||||||
@ -124,13 +124,14 @@ void
|
|||||||
misc_callback_remove_user(GdkEventButton *event)
|
misc_callback_remove_user(GdkEventButton *event)
|
||||||
{
|
{
|
||||||
GtkTreeView *treeview =
|
GtkTreeView *treeview =
|
||||||
GTK_TREE_VIEW(lookup_widget(window.startup_users, "treeview_users"));
|
GTK_TREE_VIEW(lookup_widget(window.startup, "treeview_users"));
|
||||||
|
|
||||||
treeview_select_row(treeview, event);
|
if(!treeview_select_row(treeview, event))
|
||||||
|
return;
|
||||||
|
|
||||||
user_remove(treeview_get_index(treeview, 0) - 1, FALSE);
|
user_remove(treeview_get_index(treeview, 0) - 1, FALSE);
|
||||||
|
|
||||||
treeview_show_users_startup();
|
treeview_show_users(treeview);
|
||||||
|
|
||||||
if(users->len == 0)
|
if(users->len == 0)
|
||||||
{
|
{
|
||||||
|
@ -50,15 +50,6 @@ on_team_selection_tv_row_activated (GtkTreeView *treeview,
|
|||||||
on_button_add_player_clicked(NULL, NULL);
|
on_button_add_player_clicked(NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_radiobutton_country_toggled (GtkToggleButton *togglebutton,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_button_select_country_file_clicked (GtkButton *button,
|
on_button_select_country_file_clicked (GtkButton *button,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
@ -66,31 +57,6 @@ on_button_select_country_file_clicked (GtkButton *button,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_checkbutton_load_randomly_toggled (GtkToggleButton *togglebutton,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_checkbutton_only_names_toggled (GtkToggleButton *togglebutton,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
on_button_start_editor_clicked (GtkButton *button,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_team_selection_load_clicked (GtkButton *button,
|
on_team_selection_load_clicked (GtkButton *button,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
@ -312,13 +278,3 @@ on_spinbutton_capacity_button_press_event (GtkWidget *widget,
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
on_window_startup_users_delete_event (GtkWidget *widget,
|
|
||||||
GdkEvent *event,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -14,27 +14,10 @@ on_team_selection_tv_row_activated (GtkTreeView *treeview,
|
|||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
void
|
|
||||||
on_radiobutton_country_toggled (GtkToggleButton *togglebutton,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_button_select_country_file_clicked (GtkButton *button,
|
on_button_select_country_file_clicked (GtkButton *button,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
void
|
|
||||||
on_checkbutton_load_randomly_toggled (GtkToggleButton *togglebutton,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_checkbutton_only_names_toggled (GtkToggleButton *togglebutton,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
|
||||||
on_button_start_editor_clicked (GtkButton *button,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_team_selection_ok_clicked (GtkButton *button,
|
on_team_selection_ok_clicked (GtkButton *button,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
@ -135,8 +118,3 @@ on_spinbutton_capacity_button_press_event
|
|||||||
GdkEventButton *event,
|
GdkEventButton *event,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gboolean
|
|
||||||
on_window_startup_users_delete_event (GtkWidget *widget,
|
|
||||||
GdkEvent *event,
|
|
||||||
gpointer user_data);
|
|
||||||
|
@ -31,6 +31,9 @@ create_window_startup (void)
|
|||||||
{
|
{
|
||||||
GtkWidget *window_startup;
|
GtkWidget *window_startup;
|
||||||
GtkWidget *vbox2;
|
GtkWidget *vbox2;
|
||||||
|
GtkWidget *hpaned1;
|
||||||
|
GtkWidget *scrolledwindow10;
|
||||||
|
GtkWidget *treeview_users;
|
||||||
GtkWidget *scrolledwindow1;
|
GtkWidget *scrolledwindow1;
|
||||||
GtkWidget *treeview_startup;
|
GtkWidget *treeview_startup;
|
||||||
GtkWidget *hseparator10;
|
GtkWidget *hseparator10;
|
||||||
@ -88,19 +91,34 @@ create_window_startup (void)
|
|||||||
|
|
||||||
window_startup = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window_startup = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (window_startup), 6);
|
gtk_container_set_border_width (GTK_CONTAINER (window_startup), 6);
|
||||||
gtk_window_set_title (GTK_WINDOW (window_startup), _("Select team and country"));
|
|
||||||
gtk_window_set_position (GTK_WINDOW (window_startup), GTK_WIN_POS_CENTER);
|
gtk_window_set_position (GTK_WINDOW (window_startup), GTK_WIN_POS_CENTER);
|
||||||
gtk_window_set_default_size (GTK_WINDOW (window_startup), 500, 600);
|
gtk_window_set_default_size (GTK_WINDOW (window_startup), 550, 600);
|
||||||
|
|
||||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||||
gtk_widget_show (vbox2);
|
gtk_widget_show (vbox2);
|
||||||
gtk_container_add (GTK_CONTAINER (window_startup), vbox2);
|
gtk_container_add (GTK_CONTAINER (window_startup), vbox2);
|
||||||
|
|
||||||
|
hpaned1 = gtk_hpaned_new ();
|
||||||
|
gtk_widget_show (hpaned1);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), hpaned1, TRUE, TRUE, 0);
|
||||||
|
gtk_paned_set_position (GTK_PANED (hpaned1), 200);
|
||||||
|
|
||||||
|
scrolledwindow10 = gtk_scrolled_window_new (NULL, NULL);
|
||||||
|
gtk_widget_show (scrolledwindow10);
|
||||||
|
gtk_paned_pack1 (GTK_PANED (hpaned1), scrolledwindow10, FALSE, TRUE);
|
||||||
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow10), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||||
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow10), GTK_SHADOW_IN);
|
||||||
|
|
||||||
|
treeview_users = gtk_tree_view_new ();
|
||||||
|
gtk_widget_show (treeview_users);
|
||||||
|
gtk_container_add (GTK_CONTAINER (scrolledwindow10), treeview_users);
|
||||||
|
gtk_tooltips_set_tip (tooltips, treeview_users, _("Click on a player to remove him"), NULL);
|
||||||
|
|
||||||
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
|
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_widget_show (scrolledwindow1);
|
gtk_widget_show (scrolledwindow1);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow1, TRUE, TRUE, 0);
|
gtk_paned_pack2 (GTK_PANED (hpaned1), scrolledwindow1, TRUE, TRUE);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow1), 6);
|
|
||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
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_startup = gtk_tree_view_new ();
|
treeview_startup = gtk_tree_view_new ();
|
||||||
gtk_widget_show (treeview_startup);
|
gtk_widget_show (treeview_startup);
|
||||||
@ -339,6 +357,9 @@ create_window_startup (void)
|
|||||||
g_signal_connect ((gpointer) window_startup, "delete_event",
|
g_signal_connect ((gpointer) window_startup, "delete_event",
|
||||||
G_CALLBACK (on_team_selection_cancel_clicked),
|
G_CALLBACK (on_team_selection_cancel_clicked),
|
||||||
NULL);
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) treeview_users, "button_press_event",
|
||||||
|
G_CALLBACK (on_treeview_users_button_press_event),
|
||||||
|
NULL);
|
||||||
g_signal_connect ((gpointer) treeview_startup, "row_activated",
|
g_signal_connect ((gpointer) treeview_startup, "row_activated",
|
||||||
G_CALLBACK (on_team_selection_tv_row_activated),
|
G_CALLBACK (on_team_selection_tv_row_activated),
|
||||||
NULL);
|
NULL);
|
||||||
@ -367,6 +388,9 @@ create_window_startup (void)
|
|||||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
GLADE_HOOKUP_OBJECT_NO_REF (window_startup, window_startup, "window_startup");
|
GLADE_HOOKUP_OBJECT_NO_REF (window_startup, window_startup, "window_startup");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, vbox2, "vbox2");
|
GLADE_HOOKUP_OBJECT (window_startup, vbox2, "vbox2");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_startup, hpaned1, "hpaned1");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow10, "scrolledwindow10");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_startup, treeview_users, "treeview_users");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow1, "scrolledwindow1");
|
GLADE_HOOKUP_OBJECT (window_startup, scrolledwindow1, "scrolledwindow1");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, treeview_startup, "treeview_startup");
|
GLADE_HOOKUP_OBJECT (window_startup, treeview_startup, "treeview_startup");
|
||||||
GLADE_HOOKUP_OBJECT (window_startup, hseparator10, "hseparator10");
|
GLADE_HOOKUP_OBJECT (window_startup, hseparator10, "hseparator10");
|
||||||
@ -877,45 +901,6 @@ create_help_window (void)
|
|||||||
return help_window;
|
return help_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget*
|
|
||||||
create_window_startup_users (void)
|
|
||||||
{
|
|
||||||
GtkWidget *window_startup_users;
|
|
||||||
GtkWidget *scrolledwindow10;
|
|
||||||
GtkWidget *treeview_users;
|
|
||||||
GtkTooltips *tooltips;
|
|
||||||
|
|
||||||
tooltips = gtk_tooltips_new ();
|
|
||||||
|
|
||||||
window_startup_users = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_title (GTK_WINDOW (window_startup_users), _("Players"));
|
|
||||||
gtk_window_set_default_size (GTK_WINDOW (window_startup_users), 250, 200);
|
|
||||||
|
|
||||||
scrolledwindow10 = gtk_scrolled_window_new (NULL, NULL);
|
|
||||||
gtk_widget_show (scrolledwindow10);
|
|
||||||
gtk_container_add (GTK_CONTAINER (window_startup_users), scrolledwindow10);
|
|
||||||
|
|
||||||
treeview_users = gtk_tree_view_new ();
|
|
||||||
gtk_widget_show (treeview_users);
|
|
||||||
gtk_container_add (GTK_CONTAINER (scrolledwindow10), treeview_users);
|
|
||||||
gtk_tooltips_set_tip (tooltips, treeview_users, _("Click on a player to remove him"), NULL);
|
|
||||||
|
|
||||||
g_signal_connect ((gpointer) window_startup_users, "delete_event",
|
|
||||||
G_CALLBACK (on_window_startup_users_delete_event),
|
|
||||||
NULL);
|
|
||||||
g_signal_connect ((gpointer) treeview_users, "button_press_event",
|
|
||||||
G_CALLBACK (on_treeview_users_button_press_event),
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
|
||||||
GLADE_HOOKUP_OBJECT_NO_REF (window_startup_users, window_startup_users, "window_startup_users");
|
|
||||||
GLADE_HOOKUP_OBJECT (window_startup_users, scrolledwindow10, "scrolledwindow10");
|
|
||||||
GLADE_HOOKUP_OBJECT (window_startup_users, treeview_users, "treeview_users");
|
|
||||||
GLADE_HOOKUP_OBJECT_NO_REF (window_startup_users, tooltips, "tooltips");
|
|
||||||
|
|
||||||
return window_startup_users;
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkWidget*
|
GtkWidget*
|
||||||
create_window_stadium (void)
|
create_window_stadium (void)
|
||||||
{
|
{
|
||||||
|
@ -7,5 +7,4 @@ GtkWidget* create_fsel_window (void);
|
|||||||
GtkWidget* create_window_font_sel (void);
|
GtkWidget* create_window_font_sel (void);
|
||||||
GtkWidget* create_window_live (void);
|
GtkWidget* create_window_live (void);
|
||||||
GtkWidget* create_help_window (void);
|
GtkWidget* create_help_window (void);
|
||||||
GtkWidget* create_window_startup_users (void);
|
|
||||||
GtkWidget* create_window_stadium (void);
|
GtkWidget* create_window_stadium (void);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "file.h"
|
||||||
#include "options_callbacks.h"
|
#include "options_callbacks.h"
|
||||||
#include "options_interface.h"
|
#include "options_interface.h"
|
||||||
#include "option_gui.h"
|
#include "option_gui.h"
|
||||||
@ -36,3 +37,14 @@ on_button_font_name_clicked (GtkButton *button,
|
|||||||
window_create(WINDOW_FONT_SEL);
|
window_create(WINDOW_FONT_SEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
on_button_reload_constants_clicked (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
const gchar *constants_file =
|
||||||
|
gtk_entry_get_text(GTK_ENTRY(lookup_widget(window.options, "entry_constants_file")));
|
||||||
|
|
||||||
|
file_load_constants_file(constants_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -11,3 +11,7 @@ on_button_options_cancel_clicked (GtkButton *button,
|
|||||||
void
|
void
|
||||||
on_button_font_name_clicked (GtkButton *button,
|
on_button_font_name_clicked (GtkButton *button,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
on_button_reload_constants_clicked (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
@ -53,13 +53,19 @@ create_window_options (void)
|
|||||||
GtkObject *spinbutton_refresh_adj;
|
GtkObject *spinbutton_refresh_adj;
|
||||||
GtkWidget *spinbutton_refresh;
|
GtkWidget *spinbutton_refresh;
|
||||||
GtkWidget *label10;
|
GtkWidget *label10;
|
||||||
GtkWidget *entry_constants_file;
|
|
||||||
GtkWidget *button_font_name;
|
GtkWidget *button_font_name;
|
||||||
GtkWidget *alignment1;
|
GtkWidget *alignment1;
|
||||||
GtkWidget *hbox7;
|
GtkWidget *hbox7;
|
||||||
GtkWidget *image1;
|
GtkWidget *image1;
|
||||||
GtkWidget *label34;
|
GtkWidget *label34;
|
||||||
GtkWidget *entry_font_name;
|
GtkWidget *entry_font_name;
|
||||||
|
GtkWidget *hbox8;
|
||||||
|
GtkWidget *entry_constants_file;
|
||||||
|
GtkWidget *button_reload_constants;
|
||||||
|
GtkWidget *alignment2;
|
||||||
|
GtkWidget *hbox9;
|
||||||
|
GtkWidget *image2;
|
||||||
|
GtkWidget *label35;
|
||||||
GtkWidget *label1;
|
GtkWidget *label1;
|
||||||
GtkWidget *hbox4;
|
GtkWidget *hbox4;
|
||||||
GtkWidget *vbox4;
|
GtkWidget *vbox4;
|
||||||
@ -276,13 +282,6 @@ create_window_options (void)
|
|||||||
gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_LEFT);
|
gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_LEFT);
|
||||||
gtk_misc_set_alignment (GTK_MISC (label10), 1, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label10), 1, 0.5);
|
||||||
|
|
||||||
entry_constants_file = gtk_entry_new ();
|
|
||||||
gtk_widget_show (entry_constants_file);
|
|
||||||
gtk_table_attach (GTK_TABLE (table1), entry_constants_file, 1, 2, 3, 4,
|
|
||||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
|
||||||
gtk_tooltips_set_tip (tooltips, entry_constants_file, _("File containing settings which determine a lot of aspects of the game behaviour. DON'T CHANGE THIS UNLESS YOU REALLY KNOW WHAT YOU ARE DOING."), NULL);
|
|
||||||
|
|
||||||
button_font_name = gtk_button_new ();
|
button_font_name = gtk_button_new ();
|
||||||
gtk_widget_show (button_font_name);
|
gtk_widget_show (button_font_name);
|
||||||
gtk_table_attach (GTK_TABLE (table1), button_font_name, 0, 1, 4, 5,
|
gtk_table_attach (GTK_TABLE (table1), button_font_name, 0, 1, 4, 5,
|
||||||
@ -312,6 +311,39 @@ create_window_options (void)
|
|||||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||||
(GtkAttachOptions) (0), 0, 0);
|
(GtkAttachOptions) (0), 0, 0);
|
||||||
|
|
||||||
|
hbox8 = gtk_hbox_new (FALSE, 0);
|
||||||
|
gtk_widget_show (hbox8);
|
||||||
|
gtk_table_attach (GTK_TABLE (table1), hbox8, 1, 2, 3, 4,
|
||||||
|
(GtkAttachOptions) (GTK_FILL),
|
||||||
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
||||||
|
|
||||||
|
entry_constants_file = gtk_entry_new ();
|
||||||
|
gtk_widget_show (entry_constants_file);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox8), entry_constants_file, TRUE, TRUE, 0);
|
||||||
|
gtk_tooltips_set_tip (tooltips, entry_constants_file, _("File containing settings which determine a lot of aspects of the game behaviour. DON'T CHANGE THIS UNLESS YOU REALLY KNOW WHAT YOU ARE DOING."), NULL);
|
||||||
|
|
||||||
|
button_reload_constants = gtk_button_new ();
|
||||||
|
gtk_widget_show (button_reload_constants);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox8), button_reload_constants, FALSE, FALSE, 0);
|
||||||
|
gtk_tooltips_set_tip (tooltips, button_reload_constants, _("Reload the constants file"), NULL);
|
||||||
|
|
||||||
|
alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0);
|
||||||
|
gtk_widget_show (alignment2);
|
||||||
|
gtk_container_add (GTK_CONTAINER (button_reload_constants), alignment2);
|
||||||
|
|
||||||
|
hbox9 = gtk_hbox_new (FALSE, 2);
|
||||||
|
gtk_widget_show (hbox9);
|
||||||
|
gtk_container_add (GTK_CONTAINER (alignment2), hbox9);
|
||||||
|
|
||||||
|
image2 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
|
||||||
|
gtk_widget_show (image2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox9), image2, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
label35 = gtk_label_new_with_mnemonic (_("Reload"));
|
||||||
|
gtk_widget_show (label35);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox9), label35, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label35), GTK_JUSTIFY_LEFT);
|
||||||
|
|
||||||
label1 = gtk_label_new (_("Global"));
|
label1 = gtk_label_new (_("Global"));
|
||||||
gtk_widget_show (label1);
|
gtk_widget_show (label1);
|
||||||
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1);
|
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1);
|
||||||
@ -866,6 +898,9 @@ create_window_options (void)
|
|||||||
g_signal_connect ((gpointer) button_font_name, "clicked",
|
g_signal_connect ((gpointer) button_font_name, "clicked",
|
||||||
G_CALLBACK (on_button_font_name_clicked),
|
G_CALLBACK (on_button_font_name_clicked),
|
||||||
NULL);
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) button_reload_constants, "clicked",
|
||||||
|
G_CALLBACK (on_button_reload_constants_clicked),
|
||||||
|
NULL);
|
||||||
g_signal_connect ((gpointer) button_ok, "clicked",
|
g_signal_connect ((gpointer) button_ok, "clicked",
|
||||||
G_CALLBACK (on_button_options_ok_clicked),
|
G_CALLBACK (on_button_options_ok_clicked),
|
||||||
NULL);
|
NULL);
|
||||||
@ -895,13 +930,19 @@ create_window_options (void)
|
|||||||
GLADE_HOOKUP_OBJECT (window_options, spinbutton_precision, "spinbutton_precision");
|
GLADE_HOOKUP_OBJECT (window_options, spinbutton_precision, "spinbutton_precision");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, spinbutton_refresh, "spinbutton_refresh");
|
GLADE_HOOKUP_OBJECT (window_options, spinbutton_refresh, "spinbutton_refresh");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, label10, "label10");
|
GLADE_HOOKUP_OBJECT (window_options, label10, "label10");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, entry_constants_file, "entry_constants_file");
|
|
||||||
GLADE_HOOKUP_OBJECT (window_options, button_font_name, "button_font_name");
|
GLADE_HOOKUP_OBJECT (window_options, button_font_name, "button_font_name");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, alignment1, "alignment1");
|
GLADE_HOOKUP_OBJECT (window_options, alignment1, "alignment1");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, hbox7, "hbox7");
|
GLADE_HOOKUP_OBJECT (window_options, hbox7, "hbox7");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, image1, "image1");
|
GLADE_HOOKUP_OBJECT (window_options, image1, "image1");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, label34, "label34");
|
GLADE_HOOKUP_OBJECT (window_options, label34, "label34");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, entry_font_name, "entry_font_name");
|
GLADE_HOOKUP_OBJECT (window_options, entry_font_name, "entry_font_name");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_options, hbox8, "hbox8");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_options, entry_constants_file, "entry_constants_file");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_options, button_reload_constants, "button_reload_constants");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_options, alignment2, "alignment2");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_options, hbox9, "hbox9");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_options, image2, "image2");
|
||||||
|
GLADE_HOOKUP_OBJECT (window_options, label35, "label35");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, label1, "label1");
|
GLADE_HOOKUP_OBJECT (window_options, label1, "label1");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, hbox4, "hbox4");
|
GLADE_HOOKUP_OBJECT (window_options, hbox4, "hbox4");
|
||||||
GLADE_HOOKUP_OBJECT (window_options, vbox4, "vbox4");
|
GLADE_HOOKUP_OBJECT (window_options, vbox4, "vbox4");
|
||||||
|
@ -114,16 +114,12 @@ table_element_compare_func(gconstpointer a,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
clid = GPOINTER_TO_INT(clid_pointer);
|
clid = GPOINTER_TO_INT(clid_pointer);
|
||||||
|
|
||||||
|
fixtures = league_cup_get_fixtures(clid);
|
||||||
if(clid < ID_CUP_START)
|
if(clid < ID_CUP_START)
|
||||||
{
|
|
||||||
cup_round = -1;
|
cup_round = -1;
|
||||||
fixtures = league_from_clid(clid)->fixtures;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
cup_round = g_array_index(cup_from_clid(clid)->tables, Table, 0).round;
|
cup_round = g_array_index(cup_from_clid(clid)->tables, Table, 0).round;
|
||||||
fixtures = cup_from_clid(clid)->fixtures;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*todo use misc_int_compare*/
|
/*todo use misc_int_compare*/
|
||||||
if(element1->values[TABLE_PTS] > element2->values[TABLE_PTS])
|
if(element1->values[TABLE_PTS] > element2->values[TABLE_PTS])
|
||||||
|
@ -362,9 +362,9 @@ Team*
|
|||||||
team_get_pointer_from_ids(gint clid, gint id)
|
team_get_pointer_from_ids(gint clid, gint id)
|
||||||
{
|
{
|
||||||
if(clid < ID_CUP_START)
|
if(clid < ID_CUP_START)
|
||||||
return &g_array_index(lig(clid % 1000).teams, Team, id);
|
return &g_array_index(lig(league_cup_get_index_from_clid(clid)).teams, Team, id);
|
||||||
else
|
else
|
||||||
return &g_array_index(cp(clid % 1000).teams, Team, id);
|
return &g_array_index(cp(league_cup_get_index_from_clid(clid)).teams, Team, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the players of the team in a pointer array.
|
/** Return the players of the team in a pointer array.
|
||||||
@ -903,9 +903,7 @@ gint
|
|||||||
team_get_index(const Team *tm)
|
team_get_index(const Team *tm)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GArray *teams = (tm->clid < ID_CUP_START) ?
|
GArray *teams = league_cup_get_teams(tm->clid);
|
||||||
league_from_clid(tm->clid)->teams :
|
|
||||||
cup_from_clid(tm->clid)->teams;
|
|
||||||
|
|
||||||
for(i=0;i<teams->len;i++)
|
for(i=0;i<teams->len;i++)
|
||||||
if(&g_array_index(teams, Team, i) == tm)
|
if(&g_array_index(teams, Team, i) == tm)
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
#include "finance.h"
|
#include "finance.h"
|
||||||
#include "free.h"
|
#include "free.h"
|
||||||
|
#include "game_gui.h"
|
||||||
#include "maths.h"
|
#include "maths.h"
|
||||||
#include "option.h"
|
#include "option.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
#include "support.h"
|
||||||
#include "team.h"
|
#include "team.h"
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
|
#include "treeview.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
|
|
||||||
/** Weekly update of the transfer list. */
|
/** Weekly update of the transfer list. */
|
||||||
@ -174,13 +177,6 @@ transfer_evaluate_offers(void)
|
|||||||
|
|
||||||
if(idx != -1)
|
if(idx != -1)
|
||||||
{
|
{
|
||||||
/*d*/
|
|
||||||
printf("%s val %d wa %d fee %d wag %d\n",
|
|
||||||
player_of_id(trans(i).tm, trans(i).id)->name->str,
|
|
||||||
player_of_id(trans(i).tm, trans(i).id)->value,
|
|
||||||
player_of_id(trans(i).tm, trans(i).id)->wage, transoff(i, idx).fee,
|
|
||||||
transoff(i, idx).wage);
|
|
||||||
|
|
||||||
for(j=idx + 1;j<trans(i).offers->len;j++)
|
for(j=idx + 1;j<trans(i).offers->len;j++)
|
||||||
user_event_add(user_from_team(transoff(i, j).tm),
|
user_event_add(user_from_team(transoff(i, j).tm),
|
||||||
EVENT_TYPE_TRANSFER_OFFER_REJECTED, -1, -1,
|
EVENT_TYPE_TRANSFER_OFFER_REJECTED, -1, -1,
|
||||||
@ -396,3 +392,26 @@ transfer_remove_offer(gint idx, const Team *tm)
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Add or remove a user player from the transfer list. */
|
||||||
|
void
|
||||||
|
transfer_add_remove_user_player(Player *pl)
|
||||||
|
{
|
||||||
|
gchar buf[SMALL];
|
||||||
|
|
||||||
|
if(!query_transfer_player_is_on_list(pl))
|
||||||
|
{
|
||||||
|
transfer_add_player(pl,
|
||||||
|
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
||||||
|
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
||||||
|
sprintf(buf, _("%s has been added to the transfer list for %d weeks."),
|
||||||
|
pl->name->str,
|
||||||
|
(gint)rint(((gfloat)const_int("int_transfer_time_lower") +
|
||||||
|
(gfloat)const_int("int_transfer_time_upper")) / 2));
|
||||||
|
game_gui_print_message(buf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
transfer_remove_player_ptr(pl);
|
||||||
|
|
||||||
|
treeview_show_transfer_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")));
|
||||||
|
}
|
||||||
|
@ -56,4 +56,7 @@ transfer_team_get_new(void);
|
|||||||
gint
|
gint
|
||||||
transfer_get_index(const Team *tm, gint id);
|
transfer_get_index(const Team *tm, gint id);
|
||||||
|
|
||||||
|
void
|
||||||
|
transfer_add_remove_user_player(Player *pl);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
207
src/treeview.c
207
src/treeview.c
@ -18,7 +18,7 @@
|
|||||||
#include "user.h"
|
#include "user.h"
|
||||||
|
|
||||||
/** Select the row that's been clicked on. */
|
/** Select the row that's been clicked on. */
|
||||||
void
|
gboolean
|
||||||
treeview_select_row(GtkTreeView *treeview, GdkEventButton *event)
|
treeview_select_row(GtkTreeView *treeview, GdkEventButton *event)
|
||||||
{
|
{
|
||||||
GtkTreeSelection *selection =
|
GtkTreeSelection *selection =
|
||||||
@ -28,10 +28,12 @@ treeview_select_row(GtkTreeView *treeview, GdkEventButton *event)
|
|||||||
if(!gtk_tree_view_get_path_at_pos(treeview,
|
if(!gtk_tree_view_get_path_at_pos(treeview,
|
||||||
event->x, event->y,
|
event->x, event->y,
|
||||||
&path, NULL, NULL, NULL))
|
&path, NULL, NULL, NULL))
|
||||||
return;
|
return FALSE;
|
||||||
|
|
||||||
gtk_tree_selection_select_path(selection, path);
|
gtk_tree_selection_select_path(selection, path);
|
||||||
gtk_tree_path_free(path);
|
gtk_tree_path_free(path);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the number in the 'column'th column of the currently
|
/** Return the number in the 'column'th column of the currently
|
||||||
@ -247,7 +249,8 @@ treeview_team_compare(GtkTreeModel *model,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
gint type = GPOINTER_TO_INT(user_data);
|
gint type = GPOINTER_TO_INT(user_data);
|
||||||
gpointer *tm1, *tm2;
|
Team *tm1, *tm2;
|
||||||
|
gint return_value = 0;
|
||||||
|
|
||||||
gtk_tree_model_get(model, a, 4, &tm1, -1);
|
gtk_tree_model_get(model, a, 4, &tm1, -1);
|
||||||
gtk_tree_model_get(model, b, 4, &tm2, -1);
|
gtk_tree_model_get(model, b, 4, &tm2, -1);
|
||||||
@ -258,12 +261,12 @@ treeview_team_compare(GtkTreeModel *model,
|
|||||||
g_warning("treeview_team_compare: unknown type %d.\n", type);
|
g_warning("treeview_team_compare: unknown type %d.\n", type);
|
||||||
break;
|
break;
|
||||||
case TEAM_COMPARE_AV_SKILL:
|
case TEAM_COMPARE_AV_SKILL:
|
||||||
return misc_float_compare(team_get_average_skill((Team*)tm1, FALSE),
|
return_value = misc_float_compare(team_get_average_skill(tm1, FALSE),
|
||||||
team_get_average_skill((Team*)tm2, FALSE));
|
team_get_average_skill(tm2, FALSE));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return return_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -434,6 +437,62 @@ treeview_show_team_list(GtkTreeView *treeview, gboolean show_cup_teams,
|
|||||||
g_object_unref(team_list);
|
g_object_unref(team_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Compare two players in a treeview. */
|
||||||
|
gint
|
||||||
|
treeview_player_compare(GtkTreeModel *model,
|
||||||
|
GtkTreeIter *a,
|
||||||
|
GtkTreeIter *b,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
gint type = GPOINTER_TO_INT(user_data);
|
||||||
|
Player *pl1, *pl2;
|
||||||
|
gint return_value = 0;
|
||||||
|
|
||||||
|
gtk_tree_model_get(model, a, 4, &pl1, -1);
|
||||||
|
gtk_tree_model_get(model, b, 4, &pl2, -1);
|
||||||
|
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
g_warning("treeview_player_compare: unknown type %d.\n", type);
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_POS:
|
||||||
|
return_value = misc_int_compare(pl1->pos, pl2->pos);
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_GOALS:
|
||||||
|
return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_GOALS),
|
||||||
|
player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_GOALS));
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_SHOTS:
|
||||||
|
return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_SHOTS),
|
||||||
|
player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_SHOTS));
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_GAMES:
|
||||||
|
return_value = misc_int_compare(player_games_goals_get(pl1, pl1->team->clid, PLAYER_VALUE_GAMES),
|
||||||
|
player_games_goals_get(pl2, pl2->team->clid, PLAYER_VALUE_GAMES));
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_SKILL:
|
||||||
|
return_value = misc_float_compare(pl1->skill, pl2->skill);
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_AGE:
|
||||||
|
return_value = misc_float_compare(pl1->age, pl2->age);
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_ETAL:
|
||||||
|
return_value = misc_float_compare(pl1->etal[current_user.scout % 10],
|
||||||
|
pl2->etal[current_user.scout % 10]);
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_VALUE:
|
||||||
|
return_value = misc_int_compare(pl1->value, pl2->value);
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_WAGE:
|
||||||
|
return_value = misc_int_compare(pl1->wage, pl2->wage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return return_value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/** Create the list store for a player list.
|
/** Create the list store for a player list.
|
||||||
@param players The array containing the players.
|
@param players The array containing the players.
|
||||||
@param attributes An array containing the attributes we show.
|
@param attributes An array containing the attributes we show.
|
||||||
@ -472,12 +531,29 @@ treeview_create_player_list(GPtrArray *players, gint *attributes, gint max, gboo
|
|||||||
gtk_list_store_set(liststore, &iter, j + 1, g_ptr_array_index(players, i), -1);
|
gtk_list_store_set(liststore, &iter, j + 1, g_ptr_array_index(players, i), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!show_separator)
|
||||||
|
{
|
||||||
|
for(i=0;i<max;i++)
|
||||||
|
if(attributes[i] == PLAYER_LIST_ATTRIBUTE_POS ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_SKILL ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_GOALS ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_SHOTS ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_GAMES ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_AGE ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_ETAL ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_VALUE ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_WAGE)
|
||||||
|
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(liststore), i + 1,
|
||||||
|
treeview_player_compare, GINT_TO_POINTER(attributes[i]), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
return (GtkTreeModel*)liststore;
|
return (GtkTreeModel*)liststore;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set up the tree view for a player list */
|
/** Set up the tree view for a player list */
|
||||||
void
|
void
|
||||||
treeview_set_up_player_list (GtkTreeView *treeview, gint *attributes, gint max)
|
treeview_set_up_player_list (GtkTreeView *treeview, gint *attributes, gint max,
|
||||||
|
gboolean show_separator)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GtkTreeViewColumn *col;
|
GtkTreeViewColumn *col;
|
||||||
@ -536,6 +612,18 @@ treeview_set_up_player_list (GtkTreeView *treeview, gint *attributes, gint max)
|
|||||||
g_object_set(renderer, "xalign", 0.5,
|
g_object_set(renderer, "xalign", 0.5,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!show_separator &&
|
||||||
|
(attributes[i] == PLAYER_LIST_ATTRIBUTE_POS ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_SKILL ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_GOALS ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_SHOTS ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_GAMES ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_AGE ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_ETAL ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_VALUE ||
|
||||||
|
attributes[i] == PLAYER_LIST_ATTRIBUTE_WAGE))
|
||||||
|
gtk_tree_view_column_set_sort_column_id(col, i + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -561,7 +649,7 @@ treeview_show_player_list(GtkTreeView *treeview, GPtrArray *players, PlayerListA
|
|||||||
if(attribute.on_off[i])
|
if(attribute.on_off[i])
|
||||||
attributes[cnt++] = i;
|
attributes[cnt++] = i;
|
||||||
|
|
||||||
treeview_set_up_player_list(treeview, attributes, columns);
|
treeview_set_up_player_list(treeview, attributes, columns, show_separator);
|
||||||
|
|
||||||
model = treeview_create_player_list(players, attributes, columns, show_separator);
|
model = treeview_create_player_list(players, attributes, columns, show_separator);
|
||||||
|
|
||||||
@ -814,7 +902,7 @@ treeview_live_game_show_result(const LiveGameUnit *unit)
|
|||||||
|
|
||||||
/** Fill a tree model with the users. */
|
/** Fill a tree model with the users. */
|
||||||
GtkTreeModel*
|
GtkTreeModel*
|
||||||
treeview_create_users_startup(void)
|
treeview_create_users(void)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GtkListStore *liststore;
|
GtkListStore *liststore;
|
||||||
@ -853,7 +941,7 @@ treeview_create_users_startup(void)
|
|||||||
/** Set up the users treeview.
|
/** Set up the users treeview.
|
||||||
@param treeview The treeview we use. */
|
@param treeview The treeview we use. */
|
||||||
void
|
void
|
||||||
treeview_set_up_users_startup(GtkTreeView *treeview)
|
treeview_set_up_users(GtkTreeView *treeview)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GtkTreeViewColumn *col;
|
GtkTreeViewColumn *col;
|
||||||
@ -862,7 +950,7 @@ treeview_set_up_users_startup(GtkTreeView *treeview)
|
|||||||
{"",
|
{"",
|
||||||
_("Name"),
|
_("Name"),
|
||||||
_("Team"),
|
_("Team"),
|
||||||
_("Start in")};
|
_("League")};
|
||||||
|
|
||||||
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(treeview),
|
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(treeview),
|
||||||
GTK_SELECTION_SINGLE);
|
GTK_SELECTION_SINGLE);
|
||||||
@ -875,7 +963,7 @@ treeview_set_up_users_startup(GtkTreeView *treeview)
|
|||||||
gtk_tree_view_column_set_title(col, titles[i]);
|
gtk_tree_view_column_set_title(col, titles[i]);
|
||||||
gtk_tree_view_append_column(treeview, col);
|
gtk_tree_view_append_column(treeview, col);
|
||||||
renderer = treeview_cell_renderer_text_new();
|
renderer = treeview_cell_renderer_text_new();
|
||||||
gtk_tree_view_column_pack_start(col, renderer, TRUE);
|
gtk_tree_view_column_pack_start(col, renderer, (i != 3));
|
||||||
gtk_tree_view_column_add_attribute(col, renderer,
|
gtk_tree_view_column_add_attribute(col, renderer,
|
||||||
"text", i);
|
"text", i);
|
||||||
}
|
}
|
||||||
@ -884,16 +972,14 @@ treeview_set_up_users_startup(GtkTreeView *treeview)
|
|||||||
/** Show the list of users at startup.
|
/** Show the list of users at startup.
|
||||||
@param treeview The treeview we use. */
|
@param treeview The treeview we use. */
|
||||||
void
|
void
|
||||||
treeview_show_users_startup(void)
|
treeview_show_users(GtkTreeView *treeview)
|
||||||
{
|
{
|
||||||
GtkTreeView *treeview =
|
|
||||||
GTK_TREE_VIEW(lookup_widget(window.startup_users, "treeview_users"));
|
|
||||||
GtkTreeModel *model = NULL;
|
GtkTreeModel *model = NULL;
|
||||||
|
|
||||||
treeview_clear(treeview);
|
treeview_clear(treeview);
|
||||||
|
|
||||||
treeview_set_up_users_startup(treeview);
|
treeview_set_up_users(treeview);
|
||||||
model = treeview_create_users_startup();
|
model = treeview_create_users();
|
||||||
gtk_tree_view_set_model(treeview, model);
|
gtk_tree_view_set_model(treeview, model);
|
||||||
g_object_unref(model);
|
g_object_unref(model);
|
||||||
}
|
}
|
||||||
@ -1063,9 +1149,10 @@ treeview_show_game_stats(GtkTreeView *treeview, LiveGame *live_game)
|
|||||||
/** Write some general information like cup/league name,
|
/** Write some general information like cup/league name,
|
||||||
week etc. into a liststore.
|
week etc. into a liststore.
|
||||||
@param fix A 'sample' fixture.
|
@param fix A 'sample' fixture.
|
||||||
@param liststore The liststore we edit. */
|
@param liststore The liststore we edit.
|
||||||
|
@param blank_line Whether to draw a blank line after the header. */
|
||||||
void
|
void
|
||||||
treeview_create_fixtures_header(const Fixture *fix, GtkListStore *liststore)
|
treeview_create_fixtures_header(const Fixture *fix, GtkListStore *liststore, gboolean blank_line)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GdkPixbuf *symbol = NULL;
|
GdkPixbuf *symbol = NULL;
|
||||||
@ -1101,8 +1188,11 @@ treeview_create_fixtures_header(const Fixture *fix, GtkListStore *liststore)
|
|||||||
gtk_list_store_append(liststore, &iter);
|
gtk_list_store_append(liststore, &iter);
|
||||||
gtk_list_store_set(liststore, &iter, 0, symbol, 1, buf, 2, "", 3, buf2, 4, symbol, -1);
|
gtk_list_store_set(liststore, &iter, 0, symbol, 1, buf, 2, "", 3, buf2, 4, symbol, -1);
|
||||||
|
|
||||||
|
if(blank_line)
|
||||||
|
{
|
||||||
gtk_list_store_append(liststore, &iter);
|
gtk_list_store_append(liststore, &iter);
|
||||||
gtk_list_store_set(liststore, &iter, 0, NULL, 1, "", 2, "", 3, "", 4, NULL, -1);
|
gtk_list_store_set(liststore, &iter, 0, NULL, 1, "", 2, "", 3, "", 4, NULL, -1);
|
||||||
|
}
|
||||||
|
|
||||||
if(symbol != NULL)
|
if(symbol != NULL)
|
||||||
g_object_unref(symbol);
|
g_object_unref(symbol);
|
||||||
@ -1191,12 +1281,12 @@ treeview_create_fixtures(gint clid, gint week_number, gint week_round_number)
|
|||||||
GDK_TYPE_PIXBUF);
|
GDK_TYPE_PIXBUF);
|
||||||
|
|
||||||
treeview_create_fixtures_header((Fixture*)g_ptr_array_index(fixtures, 0),
|
treeview_create_fixtures_header((Fixture*)g_ptr_array_index(fixtures, 0),
|
||||||
liststore);
|
liststore, TRUE);
|
||||||
|
|
||||||
for(i=0;i<fixtures->len;i++)
|
for(i=0;i<fixtures->len;i++)
|
||||||
treeview_create_fixture((Fixture*)g_ptr_array_index(fixtures, i), liststore);
|
treeview_create_fixture((Fixture*)g_ptr_array_index(fixtures, i), liststore);
|
||||||
|
|
||||||
free_g_ptr_array(&fixtures);
|
g_ptr_array_free(fixtures, TRUE);
|
||||||
|
|
||||||
return GTK_TREE_MODEL(liststore);
|
return GTK_TREE_MODEL(liststore);
|
||||||
}
|
}
|
||||||
@ -1210,7 +1300,7 @@ treeview_set_up_fixtures(GtkTreeView *treeview)
|
|||||||
|
|
||||||
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(treeview),
|
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(treeview),
|
||||||
GTK_SELECTION_NONE);
|
GTK_SELECTION_NONE);
|
||||||
gtk_tree_view_set_rules_hint(treeview, TRUE);
|
gtk_tree_view_set_rules_hint(treeview, FALSE);
|
||||||
gtk_tree_view_set_headers_visible(treeview, FALSE);
|
gtk_tree_view_set_headers_visible(treeview, FALSE);
|
||||||
|
|
||||||
col = gtk_tree_view_column_new();
|
col = gtk_tree_view_column_new();
|
||||||
@ -1528,7 +1618,8 @@ treeview_create_finances(const User* user)
|
|||||||
_("Scout"),
|
_("Scout"),
|
||||||
_("Journey costs"),
|
_("Journey costs"),
|
||||||
_("Stadium improvements"),
|
_("Stadium improvements"),
|
||||||
_("Stadium bills")};
|
_("Stadium bills"),
|
||||||
|
_("Compensations")};
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkListStore *liststore =
|
GtkListStore *liststore =
|
||||||
gtk_list_store_new(3,
|
gtk_list_store_new(3,
|
||||||
@ -1997,3 +2088,73 @@ treeview_show_league_results(GtkTreeView *treeview)
|
|||||||
gtk_tree_view_set_model(treeview, model);
|
gtk_tree_view_set_model(treeview, model);
|
||||||
g_object_unref(model);
|
g_object_unref(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Show a list of all players in the teams. */
|
||||||
|
void
|
||||||
|
treeview_show_all_players(GArray *teams)
|
||||||
|
{
|
||||||
|
gint i, j;
|
||||||
|
GPtrArray *players = g_ptr_array_new();
|
||||||
|
|
||||||
|
for(i=0;i<teams->len;i++)
|
||||||
|
if(&g_array_index(teams, Team, i) != current_user.tm)
|
||||||
|
for(j=0;j<g_array_index(teams, Team, i).players->len;j++)
|
||||||
|
g_ptr_array_add(players, &g_array_index(g_array_index(teams, Team, i).players,
|
||||||
|
Player, j));
|
||||||
|
|
||||||
|
treeview_show_player_list(GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right")),
|
||||||
|
players,
|
||||||
|
treeview_get_attributes_from_scout(current_user.scout), FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkTreeModel*
|
||||||
|
treeview_create_preview(void)
|
||||||
|
{
|
||||||
|
gint i;
|
||||||
|
GtkListStore *liststore;
|
||||||
|
GPtrArray *fixtures = fixture_get_coming(current_user.tm);
|
||||||
|
gint max = MIN(const_int("int_treeview_coming_matches"), fixtures->len);
|
||||||
|
GtkTreeIter iter;
|
||||||
|
|
||||||
|
if(fixtures->len == 0)
|
||||||
|
{
|
||||||
|
free_g_ptr_array(&fixtures);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
liststore = gtk_list_store_new(5,
|
||||||
|
GDK_TYPE_PIXBUF,
|
||||||
|
G_TYPE_STRING,
|
||||||
|
G_TYPE_STRING,
|
||||||
|
G_TYPE_STRING,
|
||||||
|
GDK_TYPE_PIXBUF);
|
||||||
|
|
||||||
|
for(i=0;i<max;i++)
|
||||||
|
{
|
||||||
|
treeview_create_fixtures_header((Fixture*)g_ptr_array_index(fixtures, i),
|
||||||
|
liststore, FALSE);
|
||||||
|
treeview_create_fixture((Fixture*)g_ptr_array_index(fixtures, i), liststore);
|
||||||
|
|
||||||
|
gtk_list_store_append(liststore, &iter);
|
||||||
|
gtk_list_store_set(liststore, &iter, 0, NULL, 1, "", 2, "", 3, "", 4, NULL, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_ptr_array_free(fixtures, TRUE);
|
||||||
|
|
||||||
|
return GTK_TREE_MODEL(liststore);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Show a preview of the current user's next games. */
|
||||||
|
void
|
||||||
|
treeview_show_preview(void)
|
||||||
|
{
|
||||||
|
GtkTreeView *treeview = GTK_TREE_VIEW(lookup_widget(window.main, "treeview_right"));
|
||||||
|
GtkTreeModel *model = NULL;
|
||||||
|
|
||||||
|
treeview_clear(treeview);
|
||||||
|
|
||||||
|
treeview_set_up_fixtures(treeview);
|
||||||
|
model = treeview_create_preview();
|
||||||
|
gtk_tree_view_set_model(treeview, model);
|
||||||
|
g_object_unref(model);
|
||||||
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "user_struct.h"
|
#include "user_struct.h"
|
||||||
#include "table_struct.h"
|
#include "table_struct.h"
|
||||||
|
|
||||||
void
|
gboolean
|
||||||
treeview_select_row(GtkTreeView *treeview, GdkEventButton *event);
|
treeview_select_row(GtkTreeView *treeview, GdkEventButton *event);
|
||||||
|
|
||||||
GdkPixbuf*
|
GdkPixbuf*
|
||||||
@ -46,7 +46,7 @@ GtkTreeModel*
|
|||||||
treeview_create_player_list(GPtrArray *players, gint *attributes, gint max, gboolean show_separator);
|
treeview_create_player_list(GPtrArray *players, gint *attributes, gint max, gboolean show_separator);
|
||||||
|
|
||||||
void
|
void
|
||||||
treeview_set_up_player_list (GtkTreeView *treeview, gint *attributes, gint max);
|
treeview_set_up_player_list (GtkTreeView *treeview, gint *attributes, gint max, gboolean show_separator);
|
||||||
|
|
||||||
void
|
void
|
||||||
treeview_show_player_list(GtkTreeView *treeview, GPtrArray *players, PlayerListAttribute attribute,
|
treeview_show_player_list(GtkTreeView *treeview, GPtrArray *players, PlayerListAttribute attribute,
|
||||||
@ -80,13 +80,13 @@ void
|
|||||||
treeview_live_game_show_result(const LiveGameUnit *unit);
|
treeview_live_game_show_result(const LiveGameUnit *unit);
|
||||||
|
|
||||||
void
|
void
|
||||||
treeview_show_users_startup(void);
|
treeview_show_users(GtkTreeView *treeview);
|
||||||
|
|
||||||
GtkTreeModel*
|
GtkTreeModel*
|
||||||
treeview_create_users_startup(void);
|
treeview_create_users(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
treeview_set_up_users_startup(GtkTreeView *treeview);
|
treeview_set_up_users(GtkTreeView *treeview);
|
||||||
|
|
||||||
GtkTreeModel*
|
GtkTreeModel*
|
||||||
treeview_create_game_stats(LiveGame *live_game);
|
treeview_create_game_stats(LiveGame *live_game);
|
||||||
@ -108,7 +108,7 @@ GtkTreeModel*
|
|||||||
treeview_create_fixtures(gint clid, gint week_number, gint week_round_number);
|
treeview_create_fixtures(gint clid, gint week_number, gint week_round_number);
|
||||||
|
|
||||||
void
|
void
|
||||||
treeview_create_fixtures_header(const Fixture *fix, GtkListStore *liststore);
|
treeview_create_fixtures_header(const Fixture *fix, GtkListStore *liststore, gboolean blank_line);
|
||||||
|
|
||||||
void
|
void
|
||||||
treeview_create_fixture(const Fixture *fix, GtkListStore *liststore);
|
treeview_create_fixture(const Fixture *fix, GtkListStore *liststore);
|
||||||
@ -183,4 +183,19 @@ treeview_team_compare(GtkTreeModel *model,
|
|||||||
GtkTreeIter *b,
|
GtkTreeIter *b,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
treeview_show_all_players(GArray *teams);
|
||||||
|
|
||||||
|
gint
|
||||||
|
treeview_player_compare(GtkTreeModel *model,
|
||||||
|
GtkTreeIter *a,
|
||||||
|
GtkTreeIter *b,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
GtkTreeModel*
|
||||||
|
treeview_create_preview(void);
|
||||||
|
|
||||||
|
void
|
||||||
|
treeview_show_preview(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,7 +82,13 @@ treeview_cell_player_to_cell(GtkTreeViewColumn *col,
|
|||||||
switch(attribute)
|
switch(attribute)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
g_warning("treeview_cell_player_to_cell: unknown attribute %d.\n", attribute);
|
||||||
|
break;
|
||||||
|
case PLAYER_LIST_ATTRIBUTE_NAME:
|
||||||
strcpy(buf, pl->name->str);
|
strcpy(buf, pl->name->str);
|
||||||
|
if(pl->team == current_user.tm &&
|
||||||
|
opt_user_int("int_opt_user_penalty_shooter") == pl->id)
|
||||||
|
strcat(buf, _(" (P)"));
|
||||||
break;
|
break;
|
||||||
case PLAYER_LIST_ATTRIBUTE_CPOS:
|
case PLAYER_LIST_ATTRIBUTE_CPOS:
|
||||||
treeview_cell_player_pos_to_cell(renderer, buf, pl->cpos);
|
treeview_cell_player_pos_to_cell(renderer, buf, pl->cpos);
|
||||||
|
13
src/user.c
13
src/user.c
@ -5,6 +5,7 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "option.h"
|
#include "option.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
#include "team.h"
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
@ -125,10 +126,18 @@ user_set_up_finances(User *user)
|
|||||||
void
|
void
|
||||||
user_remove(gint idx, gboolean regenerate_team)
|
user_remove(gint idx, gboolean regenerate_team)
|
||||||
{
|
{
|
||||||
|
gint i;
|
||||||
|
|
||||||
|
if(regenerate_team)
|
||||||
|
{
|
||||||
|
for(i=0;i<usr(idx).tm->players->len;i++)
|
||||||
|
free_player(&g_array_index(usr(idx).tm->players, Player, i));
|
||||||
|
|
||||||
|
team_generate_players_stadium(usr(idx).tm);
|
||||||
|
}
|
||||||
|
|
||||||
free_user(&usr(idx));
|
free_user(&usr(idx));
|
||||||
g_array_remove_index(users, idx);
|
g_array_remove_index(users, idx);
|
||||||
|
|
||||||
/*todo regenerate*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -26,6 +26,7 @@ enum MonOut
|
|||||||
MON_OUT_JOURNEY,
|
MON_OUT_JOURNEY,
|
||||||
MON_OUT_STADIUM_IMPROVEMENT,
|
MON_OUT_STADIUM_IMPROVEMENT,
|
||||||
MON_OUT_STADIUM_BILLS,
|
MON_OUT_STADIUM_BILLS,
|
||||||
|
MON_OUT_COMPENSATIONS,
|
||||||
MON_OUT_TRANSFERS,
|
MON_OUT_TRANSFERS,
|
||||||
MON_OUT_END
|
MON_OUT_END
|
||||||
};
|
};
|
||||||
@ -41,7 +42,6 @@ enum CounterValue
|
|||||||
COUNT_USER_WARNING, /**< Whether there was already a warning about rumours (new coach). */
|
COUNT_USER_WARNING, /**< Whether there was already a warning about rumours (new coach). */
|
||||||
COUNT_USER_INC_CAP, /**< How many weeks until the stadium capacity is increased. */
|
COUNT_USER_INC_CAP, /**< How many weeks until the stadium capacity is increased. */
|
||||||
COUNT_USER_INC_SAF, /**< How often the stadium safety was increased (in a week). */
|
COUNT_USER_INC_SAF, /**< How often the stadium safety was increased (in a week). */
|
||||||
COUNT_USER_AUTOSAVE, /**< How often the game is autosaved. */
|
|
||||||
COUNT_USER_STADIUM_CAPACITY, /**< Counter for building stadium seats. */
|
COUNT_USER_STADIUM_CAPACITY, /**< Counter for building stadium seats. */
|
||||||
COUNT_USER_STADIUM_SAFETY, /**< Counter for increasing stadium safety. */
|
COUNT_USER_STADIUM_SAFETY, /**< Counter for increasing stadium safety. */
|
||||||
COUNT_USER_OLD_WAGE1,
|
COUNT_USER_OLD_WAGE1,
|
||||||
|
43
src/window.c
43
src/window.c
@ -42,7 +42,6 @@ window_show_startup(void)
|
|||||||
free_g_string_array(&dir_contents);
|
free_g_string_array(&dir_contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Show the options window. */
|
/** Show the options window. */
|
||||||
void
|
void
|
||||||
window_show_options(void)
|
window_show_options(void)
|
||||||
@ -52,6 +51,19 @@ window_show_options(void)
|
|||||||
option_gui_set_up_window();
|
option_gui_set_up_window();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Show the player list context menu, triggered by 'event'. */
|
||||||
|
void
|
||||||
|
window_show_menu_player(GdkEvent *event)
|
||||||
|
{
|
||||||
|
if(window.menu_player != NULL)
|
||||||
|
window_destroy(&window.menu_player, FALSE);
|
||||||
|
|
||||||
|
window.menu_player = create_menu_player();
|
||||||
|
|
||||||
|
gtk_menu_popup(GTK_MENU(window.menu_player), NULL, NULL, NULL, NULL,
|
||||||
|
((GdkEventButton*)event)->button, gdk_event_get_time(event));
|
||||||
|
}
|
||||||
|
|
||||||
/** Show the digits window with the labels and values set
|
/** Show the digits window with the labels and values set
|
||||||
according to the arguments. */
|
according to the arguments. */
|
||||||
void
|
void
|
||||||
@ -155,6 +167,14 @@ window_show_stadium(void)
|
|||||||
gtk_label_set_text(label_stadium_status, _("No improvements currently in progress."));
|
gtk_label_set_text(label_stadium_status, _("No improvements currently in progress."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
window_show(gpointer window)
|
||||||
|
{
|
||||||
|
gtk_widget_show((GtkWidget*)window);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/** Show the window where the user can select between yes and no.
|
/** Show the window where the user can select between yes and no.
|
||||||
@param text The text shown in the window.
|
@param text The text shown in the window.
|
||||||
@param checkbutton Whether to show the checkbutton. */
|
@param checkbutton Whether to show the checkbutton. */
|
||||||
@ -226,17 +246,6 @@ window_create(gint window_type)
|
|||||||
GTK_SPIN_BUTTON(lookup_widget(wind, "spinbutton_speed")),
|
GTK_SPIN_BUTTON(lookup_widget(wind, "spinbutton_speed")),
|
||||||
(gfloat)option_int("int_opt_user_live_game_speed", &usr(stat2).options));
|
(gfloat)option_int("int_opt_user_live_game_speed", &usr(stat2).options));
|
||||||
break;
|
break;
|
||||||
case WINDOW_STARTUP_USERS:
|
|
||||||
if(window.startup_users != NULL)
|
|
||||||
g_warning("window_create: called on already existing window\n");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
popups_active++;
|
|
||||||
window.startup_users = create_window_startup_users();
|
|
||||||
}
|
|
||||||
strcpy(buf, "Users");
|
|
||||||
wind = window.startup_users;
|
|
||||||
break;
|
|
||||||
case WINDOW_WARNING:
|
case WINDOW_WARNING:
|
||||||
if(window.warning != NULL)
|
if(window.warning != NULL)
|
||||||
g_warning("window_create: called on already existing window\n");
|
g_warning("window_create: called on already existing window\n");
|
||||||
@ -324,10 +333,18 @@ window_create(gint window_type)
|
|||||||
wind = window.contract;
|
wind = window.contract;
|
||||||
strcpy(buf, "Contract offer");
|
strcpy(buf, "Contract offer");
|
||||||
break;
|
break;
|
||||||
|
case WINDOW_USER_MANAGEMENT:
|
||||||
|
if(window.user_management != NULL)
|
||||||
|
g_warning("window_create: called on already existing window\n");
|
||||||
|
else
|
||||||
|
window.user_management = create_window_user_management();
|
||||||
|
wind = window.user_management;
|
||||||
|
strcpy(buf, "User management");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_window_set_title(GTK_WINDOW(wind), buf);
|
gtk_window_set_title(GTK_WINDOW(wind), buf);
|
||||||
gtk_widget_show(wind);
|
g_timeout_add(20, (GSourceFunc)window_show, (gpointer)wind);
|
||||||
|
|
||||||
if(popups_active != old_popups_active &&
|
if(popups_active != old_popups_active &&
|
||||||
window.main != NULL)
|
window.main != NULL)
|
||||||
|
@ -10,7 +10,6 @@ enum Windows
|
|||||||
WINDOW_MAIN = 0,
|
WINDOW_MAIN = 0,
|
||||||
WINDOW_STARTUP,
|
WINDOW_STARTUP,
|
||||||
WINDOW_LIVE,
|
WINDOW_LIVE,
|
||||||
WINDOW_STARTUP_USERS,
|
|
||||||
WINDOW_WARNING,
|
WINDOW_WARNING,
|
||||||
WINDOW_PROGRESS,
|
WINDOW_PROGRESS,
|
||||||
WINDOW_DIGITS,
|
WINDOW_DIGITS,
|
||||||
@ -20,6 +19,7 @@ enum Windows
|
|||||||
WINDOW_OPTIONS,
|
WINDOW_OPTIONS,
|
||||||
WINDOW_FONT_SEL,
|
WINDOW_FONT_SEL,
|
||||||
WINDOW_CONTRACT,
|
WINDOW_CONTRACT,
|
||||||
|
WINDOW_USER_MANAGEMENT,
|
||||||
WINDOW_END
|
WINDOW_END
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -44,4 +44,7 @@ window_show_yesno(gchar *text, gboolean checkbutton);
|
|||||||
void
|
void
|
||||||
window_show_options(void);
|
window_show_options(void);
|
||||||
|
|
||||||
|
void
|
||||||
|
window_show_menu_player(GdkEvent *event);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -159,6 +159,10 @@ float_treeview_cell_limit_player_contract_below1 10000
|
|||||||
float_treeview_cell_limit_player_contract_below2 7000
|
float_treeview_cell_limit_player_contract_below2 7000
|
||||||
float_treeview_cell_limit_player_contract_below3 4000
|
float_treeview_cell_limit_player_contract_below3 4000
|
||||||
|
|
||||||
|
# the factor that determines how much money the user has to pay
|
||||||
|
# if he fires a player
|
||||||
|
float_player_fire_wage_factor 100000
|
||||||
|
|
||||||
# the integer that the cell data functions will interpret as an empty string.
|
# the integer that the cell data functions will interpret as an empty string.
|
||||||
int_treeview_cell_int_empty -5
|
int_treeview_cell_int_empty -5
|
||||||
|
|
||||||
@ -166,6 +170,9 @@ int_treeview_cell_int_empty -5
|
|||||||
# info
|
# info
|
||||||
int_treeview_latest_results 10
|
int_treeview_latest_results 10
|
||||||
|
|
||||||
|
# number of matches shown in the preview
|
||||||
|
int_treeview_coming_matches 4
|
||||||
|
|
||||||
# number of |'s for an ideal 442 team in the opponent preview
|
# number of |'s for an ideal 442 team in the opponent preview
|
||||||
int_treeview_max_pipes 50
|
int_treeview_max_pipes 50
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user