1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-01-31 07:54:50 +01:00

"Free corrections."

This commit is contained in:
gyboth 2005-05-16 07:09:53 +00:00
parent 8ec8bb6611
commit 1fc1ea7829
9 changed files with 54 additions and 5 deletions

View File

@ -1003,7 +1003,7 @@
<widget class="GtkButton" id="button_preview">
<property name="border_width">2</property>
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Show my last games and a preview of my next games (F1)</property>
<property name="tooltip" translatable="yes">Show a preview of my next games (F1)</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@ -1801,6 +1801,7 @@
<child>
<widget class="GtkButton" id="button_cl_back">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="tooltip" translatable="yes">Previous league/cup (1)</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
@ -1830,6 +1831,7 @@
<child>
<widget class="GtkButton" id="button_cl_forward">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="tooltip" translatable="yes">Next league/cup (2)</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
@ -1859,6 +1861,7 @@
<child>
<widget class="GtkButton" id="button_browse_back">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="tooltip" translatable="yes">Previous (Q)</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
@ -1888,6 +1891,7 @@
<child>
<widget class="GtkButton" id="button_browse_forward">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="tooltip" translatable="yes">Next (W)</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>

View File

@ -681,6 +681,7 @@
<child>
<widget class="GtkButton" id="button_startup_resume">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Load the last game that was saved or loaded.</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@ -1329,6 +1330,7 @@
<child>
<widget class="GtkSpinButton" id="spinbutton_speed">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Change live game speed. The lower the value the faster the live game.</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>

View File

@ -18,6 +18,7 @@
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<signal name="delete_event" handler="on_window_job_offer_delete_event" last_modification_time="Sun, 15 May 2005 14:52:33 GMT"/>
<child>
<widget class="GtkVBox" id="vbox5">
@ -801,6 +802,7 @@
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<signal name="delete_event" handler="on_window_digits_delete_event" last_modification_time="Sun, 15 May 2005 14:52:21 GMT"/>
<child>
<widget class="GtkVBox" id="vbox14">
@ -1483,6 +1485,7 @@
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<signal name="delete_event" handler="on_window_user_management_delete_event" last_modification_time="Sun, 15 May 2005 14:52:50 GMT"/>
<child>
<widget class="GtkVBox" id="vbox19">
@ -1546,6 +1549,7 @@
<child>
<widget class="GtkTreeView" id="treeview_user_management_users">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Click on a user to remove him from the game.</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
<property name="rules_hint">False</property>

View File

@ -10,12 +10,25 @@ void
free_memory(void)
{
free_variables();
free_transfer_list();
free_country(FALSE);
free_users(FALSE);
free_live_game(&live_game_temp);
free_support_dirs();
}
/** Free the transfer list. */
void
free_transfer_list(void)
{
gint i, j;
for(i=0;i<transfer_list->len;i++)
g_array_free(g_array_index(transfer_list, Transfer, i).offers, TRUE);
free_g_array(&transfer_list);
}
/** Free the memory occupied by the season stats. */
void
free_season_stats(gboolean reset)
@ -55,6 +68,9 @@ free_season_stats(gboolean reset)
g_array_index(
g_array_index(season_stats, SeasonStat, i).cup_champs, ChampStat, j).team_name, TRUE);
}
g_array_free(g_array_index(season_stats, SeasonStat, i).cup_champs, TRUE);
g_array_free(g_array_index(season_stats, SeasonStat, i).league_champs, TRUE);
}
free_g_array(&season_stats);
@ -196,6 +212,7 @@ free_country(gboolean reset)
free_leagues_array(&ligs, reset);
free_cups_array(&cps, reset);
free_g_ptr_array(&acps);
if(reset)
acps = g_ptr_array_new();
}
@ -428,14 +445,14 @@ free_variables(void)
{
free_g_string_array(&player_names);
free_g_array(&transfer_list);
free_option_list(&options, FALSE);
free_option_list(&constants, FALSE);
free_option_list(&constants_app, FALSE);
free_g_string(&save_file);
g_rand_free(rand_generator);
free_season_stats(FALSE);
}

View File

@ -84,4 +84,7 @@ free_league_stats(LeagueStat *stats);
void
free_season_stats(gboolean reset);
void
free_transfer_list(void);
#endif

View File

@ -734,7 +734,7 @@ create_main_window (void)
gtk_widget_show (button_preview);
gtk_box_pack_start (GTK_BOX (hbox1), button_preview, FALSE, FALSE, 0);
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 (F1)"), NULL);
gtk_tooltips_set_tip (tooltips, button_preview, _("Show a preview of my next games (F1)"), NULL);
gtk_widget_add_accelerator (button_preview, "clicked", accel_group,
GDK_F1, 0,
GTK_ACCEL_VISIBLE);

View File

@ -247,6 +247,9 @@ create_window_job_offer (void)
gtk_widget_show (label30);
gtk_box_pack_start (GTK_BOX (hbox8), label30, FALSE, FALSE, 0);
g_signal_connect ((gpointer) window_job_offer, "delete_event",
G_CALLBACK (on_window_job_offer_delete_event),
NULL);
g_signal_connect ((gpointer) button_ok, "clicked",
G_CALLBACK (on_button_offer_ok_clicked),
NULL);
@ -464,6 +467,9 @@ create_window_digits (void)
GDK_Escape, 0,
GTK_ACCEL_VISIBLE);
g_signal_connect ((gpointer) window_digits, "delete_event",
G_CALLBACK (on_window_digits_delete_event),
NULL);
g_signal_connect ((gpointer) button_digits_ok, "clicked",
G_CALLBACK (on_button_digits_ok_clicked),
NULL);
@ -756,6 +762,9 @@ create_window_user_management (void)
GtkWidget *label45;
GtkWidget *hseparator9;
GtkWidget *button_user_management_close;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
window_user_management = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window_user_management), 5);
@ -795,6 +804,7 @@ create_window_user_management (void)
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);
gtk_tooltips_set_tip (tooltips, treeview_user_management_users, _("Click on a user to remove him from the game."), NULL);
vbox21 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox21);
@ -849,6 +859,9 @@ create_window_user_management (void)
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) window_user_management, "delete_event",
G_CALLBACK (on_window_user_management_delete_event),
NULL);
g_signal_connect ((gpointer) treeview_user_management_users, "button_press_event",
G_CALLBACK (on_treeview_user_management_users_button_press_event),
NULL);
@ -888,6 +901,7 @@ create_window_user_management (void)
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");
GLADE_HOOKUP_OBJECT_NO_REF (window_user_management, tooltips, "tooltips");
return window_user_management;
}

View File

@ -319,4 +319,3 @@ on_combo_country_changed (GtkComboBox *combobox,
misc_callback_show_team_list(GTK_WIDGET(combobox), buf);
g_free(buf);
}

View File

@ -310,6 +310,7 @@ create_window_startup (void)
button_startup_resume = gtk_button_new ();
gtk_widget_show (button_startup_resume);
gtk_box_pack_start (GTK_BOX (vbox2), button_startup_resume, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button_startup_resume, _("Load the last game that was saved or loaded."), NULL);
alignment21 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment21);
@ -564,6 +565,9 @@ create_window_live (void)
GtkObject *spinbutton_speed_adj;
GtkWidget *spinbutton_speed;
GtkAccelGroup *accel_group;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
accel_group = gtk_accel_group_new ();
@ -716,6 +720,7 @@ create_window_live (void)
spinbutton_speed = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_speed_adj), 1, 0);
gtk_widget_show (spinbutton_speed);
gtk_box_pack_end (GTK_BOX (hbox48), spinbutton_speed, FALSE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, spinbutton_speed, _("Change live game speed. The lower the value the faster the live game."), NULL);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton_speed), TRUE);
g_signal_connect ((gpointer) window_live, "delete_event",
@ -768,6 +773,7 @@ create_window_live (void)
GLADE_HOOKUP_OBJECT (window_live, label73, "label73");
GLADE_HOOKUP_OBJECT (window_live, button_live_close, "button_live_close");
GLADE_HOOKUP_OBJECT (window_live, spinbutton_speed, "spinbutton_speed");
GLADE_HOOKUP_OBJECT_NO_REF (window_live, tooltips, "tooltips");
gtk_window_add_accel_group (GTK_WINDOW (window_live), accel_group);