- add "clear servers" menu item for master servers
- delete HL WON servers as they are switched off git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@671 d2ac09be-c843-0410-8b1f-f8a84130e0ec
This commit is contained in:
parent
bcdd858be5
commit
13815c4499
@ -1,6 +1,8 @@
|
||||
Nov 01, 2004: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||
- add country statistics
|
||||
- use an empty flag for countries without flag for proper alignment
|
||||
- add "clear servers" menu item for master servers
|
||||
- delete HL WON servers as they are switched off
|
||||
|
||||
Oct 17, 2004: Ludwig Nussel <l-n@users.sourceforge.net>
|
||||
- UT2004 master server support, needs qstat from CVS
|
||||
|
@ -1062,8 +1062,8 @@ static char *builtin_masters_update_info[] = {
|
||||
"ADD SNS http://www.gameaholic.com/servers/qspy-sin Gameaholic.Com",
|
||||
"ADD SNS http://asp.planetquake.com/sinserverlist/servers.txt PlanetQuake",
|
||||
|
||||
"ADD HLS master://half-life.east.won.net WON East",
|
||||
"ADD HLS master://half-life.west.won.net WON West",
|
||||
"DELETE HLS master://half-life.east.won.net WON East", // switched off
|
||||
"DELETE HLS master://half-life.west.won.net WON West", // switched off
|
||||
|
||||
"ADD HLS,-stm master://steam1.steampowered.com Steam 1",
|
||||
"ADD HLS,-stm master://steam2.steampowered.com Steam 2",
|
||||
|
@ -156,6 +156,7 @@ static GtkWidget *edit_update_master_gslist_menu_item = NULL;
|
||||
static GtkWidget *edit_add_master_menu_item = NULL;
|
||||
static GtkWidget *edit_edit_master_menu_item = NULL;
|
||||
static GtkWidget *edit_delete_master_menu_item = NULL;
|
||||
static GtkWidget *edit_clear_master_servers_menu_item = NULL;
|
||||
static GtkWidget *edit_find_player_menu_item = NULL;
|
||||
static GtkWidget *edit_find_again_menu_item = NULL;
|
||||
|
||||
@ -163,6 +164,7 @@ static GtkWidget *edit_find_again_menu_item = NULL;
|
||||
static GtkWidget *source_add_master_menu_item = NULL;
|
||||
static GtkWidget *source_edit_master_menu_item = NULL;
|
||||
static GtkWidget *source_delete_master_menu_item = NULL;
|
||||
static GtkWidget *source_clear_master_servers_menu_item = NULL;
|
||||
|
||||
static GtkWidget *view_refresh_menu_item = NULL;
|
||||
static GtkWidget *view_refrsel_menu_item = NULL;
|
||||
@ -616,7 +618,9 @@ void set_widgets_sensitivity (void) {
|
||||
sens = (!stat_process && masters_to_delete);
|
||||
|
||||
gtk_widget_set_sensitive (edit_delete_master_menu_item, sens);
|
||||
gtk_widget_set_sensitive (edit_clear_master_servers_menu_item, sens);
|
||||
gtk_widget_set_sensitive (source_delete_master_menu_item, sens);
|
||||
gtk_widget_set_sensitive (source_clear_master_servers_menu_item, sens);
|
||||
|
||||
// you can only edit one server a time, no groups and no favorites
|
||||
sens = (cur_source && cur_source->next == NULL
|
||||
@ -2385,6 +2389,30 @@ static void source_ctree_selection_changed_callback (GtkWidget *widget,
|
||||
source_selection_changed ();
|
||||
}
|
||||
|
||||
static void source_selection_clear_master_servers (void) {
|
||||
struct master *m;
|
||||
GSList* source = NULL;
|
||||
|
||||
for (source = cur_source; source; source=source->next) {
|
||||
m = (struct master *) source->data;
|
||||
|
||||
if (m == favorites || m->isgroup)
|
||||
continue;
|
||||
|
||||
server_list_free(m->servers);
|
||||
m->servers = NULL;
|
||||
}
|
||||
|
||||
update_server_lists_from_selected_source ();
|
||||
server_clist_set_list (cur_server_list);
|
||||
|
||||
reset_main_status_bar();
|
||||
}
|
||||
|
||||
static void clear_master_servers_callback (GtkWidget *widget,
|
||||
int row, int column, GdkEvent *event, GtkWidget *button) {
|
||||
source_selection_clear_master_servers ();
|
||||
}
|
||||
|
||||
static void add_to_player_filter_callback (GtkWidget *widget, unsigned mask) {
|
||||
GList *selection = player_clist->selection;
|
||||
@ -2660,6 +2688,11 @@ static const struct menuitem source_ctree_popup_menu[] = {
|
||||
GTK_SIGNAL_FUNC (del_master_callback), NULL,
|
||||
&source_delete_master_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, N_("_Clear Servers"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (clear_master_servers_callback), NULL,
|
||||
&source_clear_master_servers_menu_item
|
||||
},
|
||||
|
||||
{ MENU_END, NULL, 0, 0, NULL, NULL, NULL }
|
||||
};
|
||||
@ -2720,6 +2753,11 @@ static const struct menuitem edit_menu_items[] = {
|
||||
GTK_SIGNAL_FUNC (del_master_callback), NULL,
|
||||
&edit_delete_master_menu_item
|
||||
},
|
||||
{
|
||||
MENU_ITEM, N_("_Clear Servers"), 0, 0,
|
||||
GTK_SIGNAL_FUNC (clear_master_servers_callback), NULL,
|
||||
&edit_clear_master_servers_menu_item
|
||||
},
|
||||
|
||||
{ MENU_SEPARATOR, NULL, 0, 0, NULL, NULL, NULL },
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user