Lines 113-118
Link Here
|
113 |
int default_show_only_configured_games; |
113 |
int default_show_only_configured_games; |
114 |
char* default_icontheme; |
114 |
char* default_icontheme; |
115 |
|
115 |
|
|
|
116 |
// ---- Copy+ format string patch |
117 |
char* default_copyplusformat; |
118 |
// --end-- Copy+ format string patch |
119 |
|
116 |
int maxretries; |
120 |
int maxretries; |
117 |
int maxsimultaneous; |
121 |
int maxsimultaneous; |
118 |
char* qstat_srcip; |
122 |
char* qstat_srcip; |
Lines 195-200
Link Here
|
195 |
static GtkWidget *show_only_configured_games_check_button; |
199 |
static GtkWidget *show_only_configured_games_check_button; |
196 |
static GtkWidget *use_custom_gtkrc_check_button; |
200 |
static GtkWidget *use_custom_gtkrc_check_button; |
197 |
|
201 |
|
|
|
202 |
// --begin-- Copy+ format string patch |
203 |
static GtkWidget *copyplusformat_entry; |
204 |
// --end-- Copy+ format string patch |
205 |
|
198 |
static GtkWidget *pushlatency_mode_radio_buttons[3]; |
206 |
static GtkWidget *pushlatency_mode_radio_buttons[3]; |
199 |
static GtkWidget *pushlatency_value_spinner; |
207 |
static GtkWidget *pushlatency_value_spinner; |
200 |
|
208 |
|
Lines 379-384
Link Here
|
379 |
NULL |
387 |
NULL |
380 |
}; |
388 |
}; |
381 |
|
389 |
|
|
|
390 |
// --begin-- Copy+ format string patch |
391 |
void appearance_copyplusformat_default_callback(); |
392 |
// --end-- Copy+ format string patch |
393 |
|
382 |
static void game_file_dialog(enum server_type type); |
394 |
static void game_file_dialog(enum server_type type); |
383 |
static void game_dir_dialog(enum server_type type); |
395 |
static void game_dir_dialog(enum server_type type); |
384 |
static void game_file_activate_callback(enum server_type type); |
396 |
static void game_file_activate_callback(enum server_type type); |
Lines 1051-1056
Link Here
|
1051 |
if (i != use_custom_gtkrc) |
1063 |
if (i != use_custom_gtkrc) |
1052 |
config_set_bool ("use custom gtkrc", use_custom_gtkrc = i); |
1064 |
config_set_bool ("use custom gtkrc", use_custom_gtkrc = i); |
1053 |
|
1065 |
|
|
|
1066 |
// --begin-- Copy+ format string patch |
1067 |
default_copyplusformat = strdup_strip (gtk_entry_get_text (GTK_ENTRY (copyplusformat_entry))); |
1068 |
config_set_string ("copyplusformat", (default_copyplusformat)? default_copyplusformat : "bla"); |
1069 |
// --end-- Copy+ format string patch |
1070 |
|
1054 |
config_pop_prefix (); |
1071 |
config_pop_prefix (); |
1055 |
|
1072 |
|
1056 |
/* General */ |
1073 |
/* General */ |
Lines 3999-4004
Link Here
|
3999 |
GtkWidget *frame; |
4016 |
GtkWidget *frame; |
4000 |
GtkWidget *hbox; |
4017 |
GtkWidget *hbox; |
4001 |
GtkWidget *vbox; |
4018 |
GtkWidget *vbox; |
|
|
4019 |
|
4020 |
// --begin-- Copy+ format string patch |
4021 |
GtkWidget *button; |
4022 |
GtkWidget *label; |
4023 |
// --end-- Copy+ format string patch |
4024 |
|
4002 |
GSList *group = NULL; |
4025 |
GSList *group = NULL; |
4003 |
static const char *toolbar_styles[] = { N_("Icons"), N_("Text"), N_("Both") }; |
4026 |
static const char *toolbar_styles[] = { N_("Icons"), N_("Text"), N_("Both") }; |
4004 |
int i; |
4027 |
int i; |
Lines 4189-4194
Link Here
|
4189 |
|
4212 |
|
4190 |
gtk_widget_show (page_vbox); |
4213 |
gtk_widget_show (page_vbox); |
4191 |
|
4214 |
|
|
|
4215 |
// --begin-- Copy+ format string patch |
4216 |
frame = gtk_frame_new (_("Copy+ format")); |
4217 |
gtk_box_pack_start (GTK_BOX (page_vbox), frame, FALSE, FALSE, 0); |
4218 |
|
4219 |
vbox = gtk_vbox_new (FALSE, 4); |
4220 |
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); |
4221 |
gtk_container_add (GTK_CONTAINER (frame), vbox); |
4222 |
|
4223 |
hbox = gtk_hbox_new (FALSE, 4); |
4224 |
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); |
4225 |
|
4226 |
copyplusformat_entry = gtk_entry_new (); |
4227 |
if(default_copyplusformat) { |
4228 |
gtk_entry_set_text (GTK_ENTRY (copyplusformat_entry), default_copyplusformat); |
4229 |
} else { |
4230 |
// set default format string |
4231 |
appearance_copyplusformat_default_callback(); |
4232 |
} |
4233 |
|
4234 |
button = gtk_button_new_with_label (_("Default")); |
4235 |
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", |
4236 |
GTK_SIGNAL_FUNC (appearance_copyplusformat_default_callback), 0); |
4237 |
|
4238 |
gtk_box_pack_start (GTK_BOX (hbox), copyplusformat_entry, TRUE, TRUE, 0); |
4239 |
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); |
4240 |
|
4241 |
label = gtk_label_new(_("Possible tags:")); |
4242 |
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); |
4243 |
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); |
4244 |
gtk_widget_show (label); |
4245 |
|
4246 |
label = gtk_label_new("<ping> <ip> <port> <servername> <map> <players> <maxplayers> <game> <gametype>"); |
4247 |
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); |
4248 |
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); |
4249 |
gtk_widget_show (label); |
4250 |
|
4251 |
|
4252 |
gtk_widget_show (button); |
4253 |
gtk_widget_show (label); |
4254 |
gtk_widget_show (copyplusformat_entry); |
4255 |
gtk_widget_show (vbox); |
4256 |
gtk_widget_show (hbox); |
4257 |
gtk_widget_show (frame); |
4258 |
|
4259 |
gtk_widget_show (page_vbox); |
4260 |
// --end-- Copy+ format string patch |
4261 |
|
4262 |
|
4192 |
return page_vbox; |
4263 |
return page_vbox; |
4193 |
} |
4264 |
} |
4194 |
|
4265 |
|
Lines 4276-4282
Link Here
|
4276 |
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); |
4347 |
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); |
4277 |
gtk_misc_set_padding(GTK_MISC(GTK_BIN(button)->child),4,0); |
4348 |
gtk_misc_set_padding(GTK_MISC(GTK_BIN(button)->child),4,0); |
4278 |
gtk_signal_connect (GTK_OBJECT (button), "clicked", |
4349 |
gtk_signal_connect (GTK_OBJECT (button), "clicked", |
4279 |
GTK_SIGNAL_FUNC (scan_maps_callback), NULL); |
4350 |
GTK_SIGNAL_FUNC (scan_maps_callback), NULL); |
4280 |
gtk_widget_show (button); |
4351 |
gtk_widget_show (button); |
4281 |
} |
4352 |
} |
4282 |
|
4353 |
|
Lines 5558-5563
Link Here
|
5558 |
default_resolve_on_update = config_get_bool ("resolve on update=false"); |
5629 |
default_resolve_on_update = config_get_bool ("resolve on update=false"); |
5559 |
default_show_only_configured_games = config_get_bool ("show only configured games=false"); |
5630 |
default_show_only_configured_games = config_get_bool ("show only configured games=false"); |
5560 |
default_icontheme = config_get_string ("icontheme"); |
5631 |
default_icontheme = config_get_string ("icontheme"); |
|
|
5632 |
default_copyplusformat = config_get_string ("copyplusformat"); |
5561 |
|
5633 |
|
5562 |
set_style(); |
5634 |
set_style(); |
5563 |
|
5635 |
|
Lines 5657-5662
Link Here
|
5657 |
} |
5729 |
} |
5658 |
*/ |
5730 |
*/ |
5659 |
|
5731 |
|
|
|
5732 |
// --begin-- Copy+ format string patch |
5733 |
void appearance_copyplusformat_default_callback() |
5734 |
{ |
5735 |
gtk_entry_set_text(GTK_ENTRY(copyplusformat_entry), |
5736 |
"<servername> | <ip>:<port> | <map> | <players>/<maxplayers> players"); |
5737 |
} |
5738 |
// --end-- Copy+ format string patch |
5739 |
|
5660 |
void game_file_dialog_ok_callback (GtkWidget *ok_button, gpointer data) |
5740 |
void game_file_dialog_ok_callback (GtkWidget *ok_button, gpointer data) |
5661 |
{ |
5741 |
{ |
5662 |
enum server_type type; |
5742 |
enum server_type type; |