1 /*
2 * DO NOT EDIT THIS FILE - it is generated by Glade.
3 */
4
5 #ifdef HAVE_CONFIG_H
6 # include <config.h>
7 #endif
8
9 #include <sys/types.h>
10 #include <sys/stat.h>
11 #include <unistd.h>
12 #include <string.h>
13 #include <stdio.h>
14
15 #include <gdk/gdkkeysyms.h>
16 #include <gtk/gtk.h>
17
18 #include "callbacks.h"
19 #include "interface.h"
20 #include "support.h"
21
22 #define GLADE_HOOKUP_OBJECT(component,widget,name) \
23 g_object_set_data_full (G_OBJECT (component), name, \
24 gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
25
26 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
27 g_object_set_data (G_OBJECT (component), name, widget)
28
29 GtkWidget*
create_UMarkDlg(void)30 create_UMarkDlg (void)
31 {
32 GtkWidget *UMarkDlg;
33 GdkPixbuf *UMarkDlg_icon_pixbuf;
34 GtkWidget *frmMain;
35 GtkWidget *hbMainOuter;
36 GtkWidget *vbMainOuter;
37 GtkWidget *umark_banner;
38 GtkWidget *ProgressBatch;
39 GtkWidget *tblMainOptions;
40 GtkWidget *frmOptBench;
41 GtkWidget *tblOptBench;
42 GtkObject *spnBots_adj;
43 GtkWidget *spnBots;
44 GtkWidget *label2;
45 GtkWidget *CmbMaps;
46 GtkWidget *hbOptBench;
47 GtkWidget *label24;
48 GtkWidget *chkTimeDemo;
49 GtkWidget *label3;
50 GtkWidget *vbbMainButtons;
51 GtkWidget *btnBenchmark;
52 GtkWidget *alignment1;
53 GtkWidget *hbox2;
54 GtkWidget *image2;
55 GtkWidget *label4;
56 GtkWidget *btnResults;
57 GtkWidget *alignment2;
58 GtkWidget *hbox3;
59 GtkWidget *image3;
60 GtkWidget *label5;
61 GtkWidget *btnAbout;
62 GtkWidget *alignment14;
63 GtkWidget *hbox15;
64 GtkWidget *image14;
65 GtkWidget *label23;
66 GtkWidget *btnQuit;
67 GtkWidget *frmOptVersion;
68 GtkWidget *vbVersion;
69 GtkWidget *CmbVersion;
70 GtkWidget *chkFullScr;
71 GtkWidget *label6;
72 GtkWidget *frmOptRes;
73 GtkWidget *vbOptRes;
74 GtkWidget *chk640;
75 GtkWidget *chk800;
76 GtkWidget *chk1024;
77 GtkWidget *chk1280;
78 GtkWidget *chk1600;
79 GtkWidget *label7;
80 GtkWidget *frmOptDetail;
81 GtkWidget *vbOptDetail;
82 GtkWidget *radDtlLow;
83 GSList *radDtlLow_group = NULL;
84 GtkWidget *radDtlHigh;
85 GtkWidget *radDtlCurrent;
86 GtkWidget *radDtlCustom;
87 GtkWidget *btnUMarkConf;
88 GtkWidget *alignment17;
89 GtkWidget *hbox17;
90 GtkWidget *image17;
91 GtkWidget *label29;
92 GtkWidget *label8;
93 GtkWidget *btnArrow;
94 GtkWidget *vbbBatchControls;
95 GtkWidget *btnPresets;
96 GtkWidget *alignment3;
97 GtkWidget *hbox4;
98 GtkWidget *image4;
99 GtkWidget *label9;
100 GtkWidget *btnMoveTop;
101 GtkWidget *alignment4;
102 GtkWidget *hbox5;
103 GtkWidget *image5;
104 GtkWidget *label10;
105 GtkWidget *btnMoveBottom;
106 GtkWidget *alignment5;
107 GtkWidget *hbox6;
108 GtkWidget *image6;
109 GtkWidget *label11;
110 GtkWidget *btnAdd;
111 GtkWidget *btnRemove;
112 GtkWidget *btnClear;
113 GtkWidget *alignment6;
114 GtkWidget *hbox7;
115 GtkWidget *image7;
116 GtkWidget *label12;
117 GtkWidget *btnLoadList;
118 GtkWidget *alignment7;
119 GtkWidget *hbox8;
120 GtkWidget *image8;
121 GtkWidget *label13;
122 GtkWidget *btnSaveList;
123 GtkWidget *alignment8;
124 GtkWidget *hbox9;
125 GtkWidget *image9;
126 GtkWidget *label14;
127 GtkWidget *vbBatchList;
128 GtkWidget *label15;
129 GtkWidget *swBatchList;
130 GtkWidget *tvBatchList;
131 GtkWidget *label16;
132 GtkTooltips *tooltips;
133
134 tooltips = gtk_tooltips_new ();
135
136 UMarkDlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);
137 gtk_window_set_title (GTK_WINDOW (UMarkDlg), "UMark v2.0.0 (Unreal Tournament 200x Benchmark)");
138 gtk_window_set_position (GTK_WINDOW (UMarkDlg), GTK_WIN_POS_CENTER);
139 gtk_window_set_resizable (GTK_WINDOW (UMarkDlg), FALSE);
140 UMarkDlg_icon_pixbuf = create_pixbuf ("umark_icon.png");
141 if (UMarkDlg_icon_pixbuf)
142 {
143 gtk_window_set_icon (GTK_WINDOW (UMarkDlg), UMarkDlg_icon_pixbuf);
144 gdk_pixbuf_unref (UMarkDlg_icon_pixbuf);
145 }
146
147 frmMain = gtk_frame_new (NULL);
148 gtk_widget_show (frmMain);
149 gtk_container_add (GTK_CONTAINER (UMarkDlg), frmMain);
150 gtk_container_set_border_width (GTK_CONTAINER (frmMain), 5);
151
152 hbMainOuter = gtk_hbox_new (FALSE, 0);
153 gtk_widget_show (hbMainOuter);
154 gtk_container_add (GTK_CONTAINER (frmMain), hbMainOuter);
155 gtk_container_set_border_width (GTK_CONTAINER (hbMainOuter), 3);
156
157 vbMainOuter = gtk_vbox_new (FALSE, 0);
158 gtk_widget_show (vbMainOuter);
159 gtk_box_pack_start (GTK_BOX (hbMainOuter), vbMainOuter, FALSE, FALSE, 0);
160
161 umark_banner = create_pixmap (UMarkDlg, "umark.png");
162 gtk_widget_show (umark_banner);
163 gtk_box_pack_start (GTK_BOX (vbMainOuter), umark_banner, FALSE, FALSE, 3);
164 gtk_misc_set_padding (GTK_MISC (umark_banner), 1, 1);
165
166 ProgressBatch = gtk_progress_bar_new ();
167 gtk_widget_show (ProgressBatch);
168 gtk_box_pack_start (GTK_BOX (vbMainOuter), ProgressBatch, FALSE, FALSE, 6);
169
170 tblMainOptions = gtk_table_new (2, 3, FALSE);
171 gtk_widget_show (tblMainOptions);
172 gtk_box_pack_start (GTK_BOX (vbMainOuter), tblMainOptions, TRUE, TRUE, 0);
173
174 frmOptBench = gtk_frame_new (NULL);
175 gtk_widget_show (frmOptBench);
176 gtk_table_attach (GTK_TABLE (tblMainOptions), frmOptBench, 1, 3, 0, 1,
177 (GtkAttachOptions) (GTK_FILL),
178 (GtkAttachOptions) (GTK_FILL), 2, 2);
179
180 tblOptBench = gtk_table_new (2, 2, FALSE);
181 gtk_widget_show (tblOptBench);
182 gtk_container_add (GTK_CONTAINER (frmOptBench), tblOptBench);
183 gtk_container_set_border_width (GTK_CONTAINER (tblOptBench), 5);
184
185 spnBots_adj = gtk_adjustment_new (12, 0, 16, 1, 10, 10);
186 spnBots = gtk_spin_button_new (GTK_ADJUSTMENT (spnBots_adj), 1, 0);
187 gtk_widget_show (spnBots);
188 gtk_table_attach (GTK_TABLE (tblOptBench), spnBots, 0, 1, 1, 2,
189 (GtkAttachOptions) (GTK_FILL),
190 (GtkAttachOptions) (0), 3, 0);
191 gtk_tooltips_set_tip (tooltips, spnBots, "Number of bots (0 for flyby)", NULL);
192 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spnBots), TRUE);
193 gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spnBots), GTK_UPDATE_IF_VALID);
194
195 label2 = gtk_label_new ("Bots:");
196 gtk_widget_show (label2);
197 gtk_table_attach (GTK_TABLE (tblOptBench), label2, 0, 1, 0, 1,
198 (GtkAttachOptions) (GTK_FILL),
199 (GtkAttachOptions) (0), 3, 0);
200 gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
201
202 CmbMaps = gtk_combo_box_entry_new_text ();
203 gtk_widget_show (CmbMaps);
204 gtk_table_attach (GTK_TABLE (tblOptBench), CmbMaps, 1, 2, 1, 2,
205 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
206 (GtkAttachOptions) (GTK_FILL), 0, 0);
207 gtk_combo_box_append_text (GTK_COMBO_BOX (CmbMaps), "Please select UT200x version first.");
208
209 hbOptBench = gtk_hbox_new (FALSE, 0);
210 gtk_widget_show (hbOptBench);
211 gtk_table_attach (GTK_TABLE (tblOptBench), hbOptBench, 1, 2, 0, 1,
212 (GtkAttachOptions) (GTK_FILL),
213 (GtkAttachOptions) (GTK_FILL), 0, 0);
214
215 label24 = gtk_label_new ("Choose a Map:");
216 gtk_widget_show (label24);
217 gtk_box_pack_start (GTK_BOX (hbOptBench), label24, FALSE, FALSE, 0);
218
219 chkTimeDemo = gtk_check_button_new_with_mnemonic ("Timedemo");
220 gtk_widget_show (chkTimeDemo);
221 gtk_box_pack_end (GTK_BOX (hbOptBench), chkTimeDemo, FALSE, FALSE, 0);
222 gtk_tooltips_set_tip (tooltips, chkTimeDemo, "Benchmark Timedemos", NULL);
223
224 label3 = gtk_label_new ("Botmatch Options");
225 gtk_widget_show (label3);
226 gtk_frame_set_label_widget (GTK_FRAME (frmOptBench), label3);
227
228 vbbMainButtons = gtk_vbutton_box_new ();
229 gtk_widget_show (vbbMainButtons);
230 gtk_table_attach (GTK_TABLE (tblMainOptions), vbbMainButtons, 2, 3, 1, 2,
231 (GtkAttachOptions) (GTK_FILL),
232 (GtkAttachOptions) (GTK_FILL), 3, 0);
233 gtk_button_box_set_layout (GTK_BUTTON_BOX (vbbMainButtons), GTK_BUTTONBOX_SPREAD);
234
235 btnBenchmark = gtk_button_new ();
236 gtk_widget_show (btnBenchmark);
237 gtk_container_add (GTK_CONTAINER (vbbMainButtons), btnBenchmark);
238 GTK_WIDGET_SET_FLAGS (btnBenchmark, GTK_CAN_DEFAULT);
239
240 alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
241 gtk_widget_show (alignment1);
242 gtk_container_add (GTK_CONTAINER (btnBenchmark), alignment1);
243
244 hbox2 = gtk_hbox_new (FALSE, 2);
245 gtk_widget_show (hbox2);
246 gtk_container_add (GTK_CONTAINER (alignment1), hbox2);
247
248 image2 = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_BUTTON);
249 gtk_widget_show (image2);
250 gtk_box_pack_start (GTK_BOX (hbox2), image2, FALSE, FALSE, 0);
251
252 label4 = gtk_label_new_with_mnemonic ("_Bench!");
253 gtk_widget_show (label4);
254 gtk_box_pack_start (GTK_BOX (hbox2), label4, FALSE, FALSE, 0);
255
256 btnResults = gtk_button_new ();
257 gtk_widget_show (btnResults);
258 gtk_container_add (GTK_CONTAINER (vbbMainButtons), btnResults);
259 GTK_WIDGET_SET_FLAGS (btnResults, GTK_CAN_DEFAULT);
260
261 alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0);
262 gtk_widget_show (alignment2);
263 gtk_container_add (GTK_CONTAINER (btnResults), alignment2);
264
265 hbox3 = gtk_hbox_new (FALSE, 2);
266 gtk_widget_show (hbox3);
267 gtk_container_add (GTK_CONTAINER (alignment2), hbox3);
268
269 image3 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_BUTTON);
270 gtk_widget_show (image3);
271 gtk_box_pack_start (GTK_BOX (hbox3), image3, FALSE, FALSE, 0);
272
273 label5 = gtk_label_new_with_mnemonic ("_Results...");
274 gtk_widget_show (label5);
275 gtk_box_pack_start (GTK_BOX (hbox3), label5, FALSE, FALSE, 0);
276
277 btnAbout = gtk_button_new ();
278 gtk_widget_show (btnAbout);
279 gtk_container_add (GTK_CONTAINER (vbbMainButtons), btnAbout);
280 GTK_WIDGET_SET_FLAGS (btnAbout, GTK_CAN_DEFAULT);
281
282 alignment14 = gtk_alignment_new (0.5, 0.5, 0, 0);
283 gtk_widget_show (alignment14);
284 gtk_container_add (GTK_CONTAINER (btnAbout), alignment14);
285
286 hbox15 = gtk_hbox_new (FALSE, 2);
287 gtk_widget_show (hbox15);
288 gtk_container_add (GTK_CONTAINER (alignment14), hbox15);
289
290 image14 = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
291 gtk_widget_show (image14);
292 gtk_box_pack_start (GTK_BOX (hbox15), image14, FALSE, FALSE, 0);
293
294 label23 = gtk_label_new_with_mnemonic ("About...");
295 gtk_widget_show (label23);
296 gtk_box_pack_start (GTK_BOX (hbox15), label23, FALSE, FALSE, 0);
297
298 btnQuit = gtk_button_new_from_stock ("gtk-quit");
299 gtk_widget_show (btnQuit);
300 gtk_container_add (GTK_CONTAINER (vbbMainButtons), btnQuit);
301 GTK_WIDGET_SET_FLAGS (btnQuit, GTK_CAN_DEFAULT);
302
303 frmOptVersion = gtk_frame_new (NULL);
304 gtk_widget_show (frmOptVersion);
305 gtk_table_attach (GTK_TABLE (tblMainOptions), frmOptVersion, 0, 1, 0, 1,
306 (GtkAttachOptions) (GTK_FILL),
307 (GtkAttachOptions) (GTK_FILL), 2, 2);
308
309 vbVersion = gtk_vbox_new (FALSE, 0);
310 gtk_widget_show (vbVersion);
311 gtk_container_add (GTK_CONTAINER (frmOptVersion), vbVersion);
312 gtk_container_set_border_width (GTK_CONTAINER (vbVersion), 5);
313
314 CmbVersion = gtk_combo_box_entry_new_text ();
315 gtk_widget_show (CmbVersion);
316 gtk_box_pack_start (GTK_BOX (vbVersion), CmbVersion, FALSE, FALSE, 0);
317 gtk_widget_set_size_request (CmbVersion, 116, 20);
318 gtk_combo_box_append_text (GTK_COMBO_BOX (CmbVersion), "Uninitialized");
319
320 chkFullScr = gtk_check_button_new_with_mnemonic ("Run _Fullscreen");
321 gtk_widget_show (chkFullScr);
322 gtk_box_pack_start (GTK_BOX (vbVersion), chkFullScr, FALSE, FALSE, 0);
323 gtk_tooltips_set_tip (tooltips, chkFullScr, "Benchmark in fullscreen mode", NULL);
324 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chkFullScr), TRUE);
325
326 label6 = gtk_label_new ("UT200x Version");
327 gtk_widget_show (label6);
328 gtk_frame_set_label_widget (GTK_FRAME (frmOptVersion), label6);
329
330 frmOptRes = gtk_frame_new (NULL);
331 gtk_widget_show (frmOptRes);
332 gtk_table_attach (GTK_TABLE (tblMainOptions), frmOptRes, 0, 1, 1, 2,
333 (GtkAttachOptions) (GTK_FILL),
334 (GtkAttachOptions) (GTK_FILL), 2, 2);
335
336 vbOptRes = gtk_vbox_new (TRUE, 0);
337 gtk_widget_show (vbOptRes);
338 gtk_container_add (GTK_CONTAINER (frmOptRes), vbOptRes);
339 gtk_container_set_border_width (GTK_CONTAINER (vbOptRes), 5);
340
341 chk640 = gtk_check_button_new_with_mnemonic ("640x_480");
342 gtk_widget_show (chk640);
343 gtk_box_pack_start (GTK_BOX (vbOptRes), chk640, FALSE, FALSE, 0);
344
345 chk800 = gtk_check_button_new_with_mnemonic ("800x_600");
346 gtk_widget_show (chk800);
347 gtk_box_pack_start (GTK_BOX (vbOptRes), chk800, FALSE, FALSE, 0);
348
349 chk1024 = gtk_check_button_new_with_mnemonic ("1024x_768");
350 gtk_widget_show (chk1024);
351 gtk_box_pack_start (GTK_BOX (vbOptRes), chk1024, FALSE, FALSE, 0);
352
353 chk1280 = gtk_check_button_new_with_mnemonic ("1280x_1024");
354 gtk_widget_show (chk1280);
355 gtk_box_pack_start (GTK_BOX (vbOptRes), chk1280, FALSE, FALSE, 0);
356
357 chk1600 = gtk_check_button_new_with_mnemonic ("1600x1_200");
358 gtk_widget_show (chk1600);
359 gtk_box_pack_start (GTK_BOX (vbOptRes), chk1600, FALSE, FALSE, 0);
360
361 label7 = gtk_label_new ("Resolution");
362 gtk_widget_show (label7);
363 gtk_frame_set_label_widget (GTK_FRAME (frmOptRes), label7);
364
365 frmOptDetail = gtk_frame_new (NULL);
366 gtk_widget_show (frmOptDetail);
367 gtk_table_attach (GTK_TABLE (tblMainOptions), frmOptDetail, 1, 2, 1, 2,
368 (GtkAttachOptions) (GTK_FILL),
369 (GtkAttachOptions) (GTK_FILL), 2, 2);
370
371 vbOptDetail = gtk_vbox_new (FALSE, 0);
372 gtk_widget_show (vbOptDetail);
373 gtk_container_add (GTK_CONTAINER (frmOptDetail), vbOptDetail);
374 gtk_container_set_border_width (GTK_CONTAINER (vbOptDetail), 5);
375
376 radDtlLow = gtk_radio_button_new_with_mnemonic (NULL, "High _Performance");
377 gtk_widget_show (radDtlLow);
378 gtk_box_pack_start (GTK_BOX (vbOptDetail), radDtlLow, FALSE, FALSE, 0);
379 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radDtlLow), radDtlLow_group);
380 radDtlLow_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radDtlLow));
381
382 radDtlHigh = gtk_radio_button_new_with_mnemonic (NULL, "High Image _Quality");
383 gtk_widget_show (radDtlHigh);
384 gtk_box_pack_start (GTK_BOX (vbOptDetail), radDtlHigh, FALSE, FALSE, 0);
385 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radDtlHigh), radDtlLow_group);
386 radDtlLow_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radDtlHigh));
387
388 radDtlCurrent = gtk_radio_button_new_with_mnemonic (NULL, "_Current Settings");
389 gtk_widget_show (radDtlCurrent);
390 gtk_box_pack_start (GTK_BOX (vbOptDetail), radDtlCurrent, FALSE, FALSE, 0);
391 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radDtlCurrent), radDtlLow_group);
392 radDtlLow_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radDtlCurrent));
393 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radDtlCurrent), TRUE);
394
395 radDtlCustom = gtk_radio_button_new_with_mnemonic (NULL, "Custom ._ini Files:");
396 gtk_widget_show (radDtlCustom);
397 gtk_box_pack_start (GTK_BOX (vbOptDetail), radDtlCustom, FALSE, FALSE, 0);
398 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radDtlCustom), radDtlLow_group);
399 radDtlLow_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radDtlCustom));
400
401 btnUMarkConf = gtk_button_new ();
402 gtk_widget_show (btnUMarkConf);
403 gtk_box_pack_start (GTK_BOX (vbOptDetail), btnUMarkConf, FALSE, FALSE, 0);
404
405 alignment17 = gtk_alignment_new (0.5, 0.5, 0, 0);
406 gtk_widget_show (alignment17);
407 gtk_container_add (GTK_CONTAINER (btnUMarkConf), alignment17);
408
409 hbox17 = gtk_hbox_new (FALSE, 2);
410 gtk_widget_show (hbox17);
411 gtk_container_add (GTK_CONTAINER (alignment17), hbox17);
412
413 image17 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_BUTTON);
414 gtk_widget_show (image17);
415 gtk_box_pack_start (GTK_BOX (hbox17), image17, FALSE, FALSE, 0);
416
417 label29 = gtk_label_new_with_mnemonic (" Configure .ini Files..");
418 gtk_widget_show (label29);
419 gtk_box_pack_start (GTK_BOX (hbox17), label29, FALSE, FALSE, 0);
420
421 label8 = gtk_label_new ("Detail Level");
422 gtk_widget_show (label8);
423 gtk_frame_set_label_widget (GTK_FRAME (frmOptDetail), label8);
424
425 btnArrow = gtk_button_new_with_mnemonic (">");
426 gtk_widget_show (btnArrow);
427 gtk_box_pack_start (GTK_BOX (hbMainOuter), btnArrow, FALSE, FALSE, 3);
428 gtk_tooltips_set_tip (tooltips, btnArrow, "Add map to list", NULL);
429
430 vbbBatchControls = gtk_vbutton_box_new ();
431 gtk_widget_show (vbbBatchControls);
432 gtk_box_pack_start (GTK_BOX (hbMainOuter), vbbBatchControls, FALSE, FALSE, 3);
433
434 btnPresets = gtk_button_new ();
435 gtk_widget_show (btnPresets);
436 gtk_container_add (GTK_CONTAINER (vbbBatchControls), btnPresets);
437 GTK_WIDGET_SET_FLAGS (btnPresets, GTK_CAN_DEFAULT);
438 gtk_tooltips_set_tip (tooltips, btnPresets, "Preset map lists", NULL);
439
440 alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0);
441 gtk_widget_show (alignment3);
442 gtk_container_add (GTK_CONTAINER (btnPresets), alignment3);
443
444 hbox4 = gtk_hbox_new (FALSE, 2);
445 gtk_widget_show (hbox4);
446 gtk_container_add (GTK_CONTAINER (alignment3), hbox4);
447
448 image4 = gtk_image_new_from_stock ("gtk-justify-left", GTK_ICON_SIZE_BUTTON);
449 gtk_widget_show (image4);
450 gtk_box_pack_start (GTK_BOX (hbox4), image4, FALSE, FALSE, 0);
451
452 label9 = gtk_label_new_with_mnemonic ("Presets");
453 gtk_widget_show (label9);
454 gtk_box_pack_start (GTK_BOX (hbox4), label9, FALSE, FALSE, 0);
455
456 btnMoveTop = gtk_button_new ();
457 gtk_widget_show (btnMoveTop);
458 gtk_container_add (GTK_CONTAINER (vbbBatchControls), btnMoveTop);
459 GTK_WIDGET_SET_FLAGS (btnMoveTop, GTK_CAN_DEFAULT);
460 gtk_tooltips_set_tip (tooltips, btnMoveTop, "You may also drag items for sorting", NULL);
461
462 alignment4 = gtk_alignment_new (0.5, 0.5, 0, 0);
463 gtk_widget_show (alignment4);
464 gtk_container_add (GTK_CONTAINER (btnMoveTop), alignment4);
465
466 hbox5 = gtk_hbox_new (FALSE, 2);
467 gtk_widget_show (hbox5);
468 gtk_container_add (GTK_CONTAINER (alignment4), hbox5);
469
470 image5 = gtk_image_new_from_stock ("gtk-go-up", GTK_ICON_SIZE_BUTTON);
471 gtk_widget_show (image5);
472 gtk_box_pack_start (GTK_BOX (hbox5), image5, FALSE, FALSE, 0);
473
474 label10 = gtk_label_new_with_mnemonic ("Top");
475 gtk_widget_show (label10);
476 gtk_box_pack_start (GTK_BOX (hbox5), label10, FALSE, FALSE, 0);
477
478 btnMoveBottom = gtk_button_new ();
479 gtk_widget_show (btnMoveBottom);
480 gtk_container_add (GTK_CONTAINER (vbbBatchControls), btnMoveBottom);
481 GTK_WIDGET_SET_FLAGS (btnMoveBottom, GTK_CAN_DEFAULT);
482 gtk_tooltips_set_tip (tooltips, btnMoveBottom, "You may also drag items for sorting", NULL);
483
484 alignment5 = gtk_alignment_new (0.5, 0.5, 0, 0);
485 gtk_widget_show (alignment5);
486 gtk_container_add (GTK_CONTAINER (btnMoveBottom), alignment5);
487
488 hbox6 = gtk_hbox_new (FALSE, 2);
489 gtk_widget_show (hbox6);
490 gtk_container_add (GTK_CONTAINER (alignment5), hbox6);
491
492 image6 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_BUTTON);
493 gtk_widget_show (image6);
494 gtk_box_pack_start (GTK_BOX (hbox6), image6, FALSE, FALSE, 0);
495
496 label11 = gtk_label_new_with_mnemonic ("Bottom");
497 gtk_widget_show (label11);
498 gtk_box_pack_start (GTK_BOX (hbox6), label11, FALSE, FALSE, 0);
499
500 btnAdd = gtk_button_new_from_stock ("gtk-add");
501 gtk_widget_show (btnAdd);
502 gtk_container_add (GTK_CONTAINER (vbbBatchControls), btnAdd);
503 GTK_WIDGET_SET_FLAGS (btnAdd, GTK_CAN_DEFAULT);
504
505 btnRemove = gtk_button_new_from_stock ("gtk-remove");
506 gtk_widget_show (btnRemove);
507 gtk_container_add (GTK_CONTAINER (vbbBatchControls), btnRemove);
508 GTK_WIDGET_SET_FLAGS (btnRemove, GTK_CAN_DEFAULT);
509
510 btnClear = gtk_button_new ();
511 gtk_widget_show (btnClear);
512 gtk_container_add (GTK_CONTAINER (vbbBatchControls), btnClear);
513 GTK_WIDGET_SET_FLAGS (btnClear, GTK_CAN_DEFAULT);
514
515 alignment6 = gtk_alignment_new (0.5, 0.5, 0, 0);
516 gtk_widget_show (alignment6);
517 gtk_container_add (GTK_CONTAINER (btnClear), alignment6);
518
519 hbox7 = gtk_hbox_new (FALSE, 2);
520 gtk_widget_show (hbox7);
521 gtk_container_add (GTK_CONTAINER (alignment6), hbox7);
522
523 image7 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_BUTTON);
524 gtk_widget_show (image7);
525 gtk_box_pack_start (GTK_BOX (hbox7), image7, FALSE, FALSE, 0);
526
527 label12 = gtk_label_new_with_mnemonic ("Clear");
528 gtk_widget_show (label12);
529 gtk_box_pack_start (GTK_BOX (hbox7), label12, FALSE, FALSE, 0);
530
531 btnLoadList = gtk_button_new ();
532 gtk_widget_show (btnLoadList);
533 gtk_container_add (GTK_CONTAINER (vbbBatchControls), btnLoadList);
534 GTK_WIDGET_SET_FLAGS (btnLoadList, GTK_CAN_DEFAULT);
535
536 alignment7 = gtk_alignment_new (0.5, 0.5, 0, 0);
537 gtk_widget_show (alignment7);
538 gtk_container_add (GTK_CONTAINER (btnLoadList), alignment7);
539
540 hbox8 = gtk_hbox_new (FALSE, 2);
541 gtk_widget_show (hbox8);
542 gtk_container_add (GTK_CONTAINER (alignment7), hbox8);
543
544 image8 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON);
545 gtk_widget_show (image8);
546 gtk_box_pack_start (GTK_BOX (hbox8), image8, FALSE, FALSE, 0);
547
548 label13 = gtk_label_new_with_mnemonic ("_Load...");
549 gtk_widget_show (label13);
550 gtk_box_pack_start (GTK_BOX (hbox8), label13, FALSE, FALSE, 0);
551
552 btnSaveList = gtk_button_new ();
553 gtk_widget_show (btnSaveList);
554 gtk_container_add (GTK_CONTAINER (vbbBatchControls), btnSaveList);
555 GTK_WIDGET_SET_FLAGS (btnSaveList, GTK_CAN_DEFAULT);
556
557 alignment8 = gtk_alignment_new (0.5, 0.5, 0, 0);
558 gtk_widget_show (alignment8);
559 gtk_container_add (GTK_CONTAINER (btnSaveList), alignment8);
560
561 hbox9 = gtk_hbox_new (FALSE, 2);
562 gtk_widget_show (hbox9);
563 gtk_container_add (GTK_CONTAINER (alignment8), hbox9);
564
565 image9 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_BUTTON);
566 gtk_widget_show (image9);
567 gtk_box_pack_start (GTK_BOX (hbox9), image9, FALSE, FALSE, 0);
568
569 label14 = gtk_label_new_with_mnemonic ("_Save...");
570 gtk_widget_show (label14);
571 gtk_box_pack_start (GTK_BOX (hbox9), label14, FALSE, FALSE, 0);
572
573 vbBatchList = gtk_vbox_new (FALSE, 0);
574 gtk_widget_show (vbBatchList);
575 gtk_box_pack_start (GTK_BOX (hbMainOuter), vbBatchList, TRUE, TRUE, 0);
576 gtk_container_set_border_width (GTK_CONTAINER (vbBatchList), 5);
577
578 label15 = gtk_label_new ("Batch Benchmark");
579 gtk_widget_show (label15);
580 gtk_box_pack_start (GTK_BOX (vbBatchList), label15, FALSE, TRUE, 3);
581
582 swBatchList = gtk_scrolled_window_new (NULL, NULL);
583 gtk_widget_show (swBatchList);
584 gtk_box_pack_start (GTK_BOX (vbBatchList), swBatchList, TRUE, TRUE, 3);
585 gtk_widget_set_size_request (swBatchList, 204, -1);
586 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swBatchList), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
587 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (swBatchList), GTK_SHADOW_ETCHED_IN);
588
589 tvBatchList = gtk_tree_view_new ();
590 gtk_widget_show (tvBatchList);
591 gtk_container_add (GTK_CONTAINER (swBatchList), tvBatchList);
592 gtk_widget_set_size_request (tvBatchList, 200, -1);
593 gtk_tooltips_set_tip (tooltips, tvBatchList, "List of maps to benchmark", NULL);
594 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (tvBatchList), TRUE);
595
596 label16 = gtk_label_new ("<b>UMark</b> version 2.0.0 for Linux");
597 gtk_widget_show (label16);
598 gtk_frame_set_label_widget (GTK_FRAME (frmMain), label16);
599 gtk_label_set_use_markup (GTK_LABEL (label16), TRUE);
600
601 g_signal_connect ((gpointer) spnBots, "changed",
602 G_CALLBACK (on_spnbots_changed),
603 NULL);
604 g_signal_connect ((gpointer) CmbMaps, "changed",
605 G_CALLBACK (on_maps_changed),
606 NULL);
607 g_signal_connect ((gpointer) chkTimeDemo, "clicked",
608 G_CALLBACK (on_chkTimeDemo_clicked),
609 NULL);
610 g_signal_connect ((gpointer) btnBenchmark, "clicked",
611 G_CALLBACK (on_btnbenchmark_clicked),
612 NULL);
613 g_signal_connect ((gpointer) btnResults, "clicked",
614 G_CALLBACK (on_btnresults_clicked),
615 NULL);
616 g_signal_connect ((gpointer) btnAbout, "clicked",
617 G_CALLBACK (on_btnabout_clicked),
618 NULL);
619 g_signal_connect ((gpointer) btnQuit, "clicked",
620 G_CALLBACK (on_btnquit_clicked),
621 NULL);
622 g_signal_connect ((gpointer) CmbVersion, "changed",
623 G_CALLBACK (on_version_changed),
624 NULL);
625 g_signal_connect ((gpointer) chkFullScr, "toggled",
626 G_CALLBACK (on_chkfullscr_toggled),
627 NULL);
628 g_signal_connect ((gpointer) chk640, "toggled",
629 G_CALLBACK (on_chkres640_toggled),
630 NULL);
631 g_signal_connect ((gpointer) chk800, "toggled",
632 G_CALLBACK (on_chkres800_toggled),
633 NULL);
634 g_signal_connect ((gpointer) chk1024, "toggled",
635 G_CALLBACK (on_chkres1024_toggled),
636 NULL);
637 g_signal_connect ((gpointer) chk1280, "toggled",
638 G_CALLBACK (on_chkres1280_toggled),
639 NULL);
640 g_signal_connect ((gpointer) chk1600, "toggled",
641 G_CALLBACK (on_chkres1600_toggled),
642 NULL);
643 g_signal_connect ((gpointer) radDtlLow, "clicked",
644 G_CALLBACK (on_raddtllow_clicked),
645 NULL);
646 g_signal_connect ((gpointer) radDtlHigh, "clicked",
647 G_CALLBACK (on_raddtlhigh_clicked),
648 NULL);
649 g_signal_connect ((gpointer) radDtlCurrent, "clicked",
650 G_CALLBACK (on_raddtlcurrent_clicked),
651 NULL);
652 g_signal_connect ((gpointer) radDtlCustom, "clicked",
653 G_CALLBACK (on_raddtlcustom_clicked),
654 NULL);
655 g_signal_connect ((gpointer) btnUMarkConf, "clicked",
656 G_CALLBACK (on_btnUMarkConf_clicked),
657 NULL);
658 g_signal_connect ((gpointer) btnArrow, "clicked",
659 G_CALLBACK (on_btnarrow_clicked),
660 NULL);
661 g_signal_connect ((gpointer) btnPresets, "clicked",
662 G_CALLBACK (on_btnpreset_clicked),
663 NULL);
664 g_signal_connect ((gpointer) btnMoveTop, "clicked",
665 G_CALLBACK (on_btnmoveup_clicked),
666 NULL);
667 g_signal_connect ((gpointer) btnMoveBottom, "clicked",
668 G_CALLBACK (on_btnmovedown_clicked),
669 NULL);
670 g_signal_connect ((gpointer) btnAdd, "clicked",
671 G_CALLBACK (on_btnadd_clicked),
672 NULL);
673 g_signal_connect ((gpointer) btnRemove, "clicked",
674 G_CALLBACK (on_btnremove_clicked),
675 NULL);
676 g_signal_connect ((gpointer) btnClear, "clicked",
677 G_CALLBACK (on_btnclear_clicked),
678 NULL);
679 g_signal_connect ((gpointer) btnLoadList, "clicked",
680 G_CALLBACK (on_btnloadlist_clicked),
681 NULL);
682 g_signal_connect ((gpointer) btnSaveList, "clicked",
683 G_CALLBACK (on_btnsavelist_clicked),
684 NULL);
685
686 /* Store pointers to all widgets, for use by lookup_widget(). */
687 GLADE_HOOKUP_OBJECT_NO_REF (UMarkDlg, UMarkDlg, "UMarkDlg");
688 GLADE_HOOKUP_OBJECT (UMarkDlg, frmMain, "frmMain");
689 GLADE_HOOKUP_OBJECT (UMarkDlg, hbMainOuter, "hbMainOuter");
690 GLADE_HOOKUP_OBJECT (UMarkDlg, vbMainOuter, "vbMainOuter");
691 GLADE_HOOKUP_OBJECT (UMarkDlg, umark_banner, "umark_banner");
692 GLADE_HOOKUP_OBJECT (UMarkDlg, ProgressBatch, "ProgressBatch");
693 GLADE_HOOKUP_OBJECT (UMarkDlg, tblMainOptions, "tblMainOptions");
694 GLADE_HOOKUP_OBJECT (UMarkDlg, frmOptBench, "frmOptBench");
695 GLADE_HOOKUP_OBJECT (UMarkDlg, tblOptBench, "tblOptBench");
696 GLADE_HOOKUP_OBJECT (UMarkDlg, spnBots, "spnBots");
697 GLADE_HOOKUP_OBJECT (UMarkDlg, label2, "label2");
698 GLADE_HOOKUP_OBJECT (UMarkDlg, CmbMaps, "CmbMaps");
699 GLADE_HOOKUP_OBJECT (UMarkDlg, hbOptBench, "hbOptBench");
700 GLADE_HOOKUP_OBJECT (UMarkDlg, label24, "label24");
701 GLADE_HOOKUP_OBJECT (UMarkDlg, chkTimeDemo, "chkTimeDemo");
702 GLADE_HOOKUP_OBJECT (UMarkDlg, label3, "label3");
703 GLADE_HOOKUP_OBJECT (UMarkDlg, vbbMainButtons, "vbbMainButtons");
704 GLADE_HOOKUP_OBJECT (UMarkDlg, btnBenchmark, "btnBenchmark");
705 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment1, "alignment1");
706 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox2, "hbox2");
707 GLADE_HOOKUP_OBJECT (UMarkDlg, image2, "image2");
708 GLADE_HOOKUP_OBJECT (UMarkDlg, label4, "label4");
709 GLADE_HOOKUP_OBJECT (UMarkDlg, btnResults, "btnResults");
710 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment2, "alignment2");
711 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox3, "hbox3");
712 GLADE_HOOKUP_OBJECT (UMarkDlg, image3, "image3");
713 GLADE_HOOKUP_OBJECT (UMarkDlg, label5, "label5");
714 GLADE_HOOKUP_OBJECT (UMarkDlg, btnAbout, "btnAbout");
715 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment14, "alignment14");
716 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox15, "hbox15");
717 GLADE_HOOKUP_OBJECT (UMarkDlg, image14, "image14");
718 GLADE_HOOKUP_OBJECT (UMarkDlg, label23, "label23");
719 GLADE_HOOKUP_OBJECT (UMarkDlg, btnQuit, "btnQuit");
720 GLADE_HOOKUP_OBJECT (UMarkDlg, frmOptVersion, "frmOptVersion");
721 GLADE_HOOKUP_OBJECT (UMarkDlg, vbVersion, "vbVersion");
722 GLADE_HOOKUP_OBJECT (UMarkDlg, CmbVersion, "CmbVersion");
723 GLADE_HOOKUP_OBJECT (UMarkDlg, chkFullScr, "chkFullScr");
724 GLADE_HOOKUP_OBJECT (UMarkDlg, label6, "label6");
725 GLADE_HOOKUP_OBJECT (UMarkDlg, frmOptRes, "frmOptRes");
726 GLADE_HOOKUP_OBJECT (UMarkDlg, vbOptRes, "vbOptRes");
727 GLADE_HOOKUP_OBJECT (UMarkDlg, chk640, "chk640");
728 GLADE_HOOKUP_OBJECT (UMarkDlg, chk800, "chk800");
729 GLADE_HOOKUP_OBJECT (UMarkDlg, chk1024, "chk1024");
730 GLADE_HOOKUP_OBJECT (UMarkDlg, chk1280, "chk1280");
731 GLADE_HOOKUP_OBJECT (UMarkDlg, chk1600, "chk1600");
732 GLADE_HOOKUP_OBJECT (UMarkDlg, label7, "label7");
733 GLADE_HOOKUP_OBJECT (UMarkDlg, frmOptDetail, "frmOptDetail");
734 GLADE_HOOKUP_OBJECT (UMarkDlg, vbOptDetail, "vbOptDetail");
735 GLADE_HOOKUP_OBJECT (UMarkDlg, radDtlLow, "radDtlLow");
736 GLADE_HOOKUP_OBJECT (UMarkDlg, radDtlHigh, "radDtlHigh");
737 GLADE_HOOKUP_OBJECT (UMarkDlg, radDtlCurrent, "radDtlCurrent");
738 GLADE_HOOKUP_OBJECT (UMarkDlg, radDtlCustom, "radDtlCustom");
739 GLADE_HOOKUP_OBJECT (UMarkDlg, btnUMarkConf, "btnUMarkConf");
740 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment17, "alignment17");
741 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox17, "hbox17");
742 GLADE_HOOKUP_OBJECT (UMarkDlg, image17, "image17");
743 GLADE_HOOKUP_OBJECT (UMarkDlg, label29, "label29");
744 GLADE_HOOKUP_OBJECT (UMarkDlg, label8, "label8");
745 GLADE_HOOKUP_OBJECT (UMarkDlg, btnArrow, "btnArrow");
746 GLADE_HOOKUP_OBJECT (UMarkDlg, vbbBatchControls, "vbbBatchControls");
747 GLADE_HOOKUP_OBJECT (UMarkDlg, btnPresets, "btnPresets");
748 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment3, "alignment3");
749 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox4, "hbox4");
750 GLADE_HOOKUP_OBJECT (UMarkDlg, image4, "image4");
751 GLADE_HOOKUP_OBJECT (UMarkDlg, label9, "label9");
752 GLADE_HOOKUP_OBJECT (UMarkDlg, btnMoveTop, "btnMoveTop");
753 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment4, "alignment4");
754 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox5, "hbox5");
755 GLADE_HOOKUP_OBJECT (UMarkDlg, image5, "image5");
756 GLADE_HOOKUP_OBJECT (UMarkDlg, label10, "label10");
757 GLADE_HOOKUP_OBJECT (UMarkDlg, btnMoveBottom, "btnMoveBottom");
758 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment5, "alignment5");
759 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox6, "hbox6");
760 GLADE_HOOKUP_OBJECT (UMarkDlg, image6, "image6");
761 GLADE_HOOKUP_OBJECT (UMarkDlg, label11, "label11");
762 GLADE_HOOKUP_OBJECT (UMarkDlg, btnAdd, "btnAdd");
763 GLADE_HOOKUP_OBJECT (UMarkDlg, btnRemove, "btnRemove");
764 GLADE_HOOKUP_OBJECT (UMarkDlg, btnClear, "btnClear");
765 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment6, "alignment6");
766 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox7, "hbox7");
767 GLADE_HOOKUP_OBJECT (UMarkDlg, image7, "image7");
768 GLADE_HOOKUP_OBJECT (UMarkDlg, label12, "label12");
769 GLADE_HOOKUP_OBJECT (UMarkDlg, btnLoadList, "btnLoadList");
770 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment7, "alignment7");
771 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox8, "hbox8");
772 GLADE_HOOKUP_OBJECT (UMarkDlg, image8, "image8");
773 GLADE_HOOKUP_OBJECT (UMarkDlg, label13, "label13");
774 GLADE_HOOKUP_OBJECT (UMarkDlg, btnSaveList, "btnSaveList");
775 GLADE_HOOKUP_OBJECT (UMarkDlg, alignment8, "alignment8");
776 GLADE_HOOKUP_OBJECT (UMarkDlg, hbox9, "hbox9");
777 GLADE_HOOKUP_OBJECT (UMarkDlg, image9, "image9");
778 GLADE_HOOKUP_OBJECT (UMarkDlg, label14, "label14");
779 GLADE_HOOKUP_OBJECT (UMarkDlg, vbBatchList, "vbBatchList");
780 GLADE_HOOKUP_OBJECT (UMarkDlg, label15, "label15");
781 GLADE_HOOKUP_OBJECT (UMarkDlg, swBatchList, "swBatchList");
782 GLADE_HOOKUP_OBJECT (UMarkDlg, tvBatchList, "tvBatchList");
783 GLADE_HOOKUP_OBJECT (UMarkDlg, label16, "label16");
784 GLADE_HOOKUP_OBJECT_NO_REF (UMarkDlg, tooltips, "tooltips");
785
786 return UMarkDlg;
787 }
788
789 GtkWidget*
create_ResultsDlg(void)790 create_ResultsDlg (void)
791 {
792 GtkWidget *ResultsDlg;
793 GdkPixbuf *ResultsDlg_icon_pixbuf;
794 GtkWidget *frmResults;
795 GtkWidget *alignment9;
796 GtkWidget *vbResults;
797 GtkWidget *swResults;
798 GtkWidget *tvResults;
799 GtkWidget *hbResults;
800 GtkWidget *hbbResultsLeft;
801 GtkWidget *btnCompare;
802 GtkWidget *btnSubmit;
803 GtkWidget *hbbResultsRight;
804 GtkWidget *btnLoadLog;
805 GtkWidget *alignment10;
806 GtkWidget *hbox11;
807 GtkWidget *image10;
808 GtkWidget *label17;
809 GtkWidget *BtnSaveLog;
810 GtkWidget *alignment11;
811 GtkWidget *hbox12;
812 GtkWidget *image11;
813 GtkWidget *label18;
814 GtkWidget *btnDismissResults;
815 GtkWidget *alignment12;
816 GtkWidget *hbox13;
817 GtkWidget *image12;
818 GtkWidget *label19;
819 GtkWidget *label20;
820
821 ResultsDlg = gtk_window_new (GTK_WINDOW_TOPLEVEL);
822 gtk_widget_set_size_request (ResultsDlg, 696, 256);
823 gtk_window_set_title (GTK_WINDOW (ResultsDlg), "UMark Results");
824 gtk_window_set_position (GTK_WINDOW (ResultsDlg), GTK_WIN_POS_CENTER_ON_PARENT);
825 gtk_window_set_modal (GTK_WINDOW (ResultsDlg), TRUE);
826 ResultsDlg_icon_pixbuf = create_pixbuf ("umark_icon.png");
827 if (ResultsDlg_icon_pixbuf)
828 {
829 gtk_window_set_icon (GTK_WINDOW (ResultsDlg), ResultsDlg_icon_pixbuf);
830 gdk_pixbuf_unref (ResultsDlg_icon_pixbuf);
831 }
832
833 frmResults = gtk_frame_new (NULL);
834 gtk_widget_show (frmResults);
835 gtk_container_add (GTK_CONTAINER (ResultsDlg), frmResults);
836 gtk_container_set_border_width (GTK_CONTAINER (frmResults), 10);
837
838 alignment9 = gtk_alignment_new (0.5, 0.5, 1, 1);
839 gtk_widget_show (alignment9);
840 gtk_container_add (GTK_CONTAINER (frmResults), alignment9);
841 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment9), 0, 0, 12, 0);
842
843 vbResults = gtk_vbox_new (FALSE, 2);
844 gtk_widget_show (vbResults);
845 gtk_container_add (GTK_CONTAINER (alignment9), vbResults);
846 gtk_container_set_border_width (GTK_CONTAINER (vbResults), 5);
847
848 swResults = gtk_scrolled_window_new (NULL, NULL);
849 gtk_widget_show (swResults);
850 gtk_box_pack_start (GTK_BOX (vbResults), swResults, TRUE, TRUE, 3);
851
852 tvResults = gtk_tree_view_new ();
853 gtk_widget_show (tvResults);
854 gtk_container_add (GTK_CONTAINER (swResults), tvResults);
855 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (tvResults), TRUE);
856
857 hbResults = gtk_hbox_new (FALSE, 0);
858 gtk_widget_show (hbResults);
859 gtk_box_pack_start (GTK_BOX (vbResults), hbResults, FALSE, FALSE, 0);
860
861 hbbResultsLeft = gtk_hbutton_box_new ();
862 gtk_widget_show (hbbResultsLeft);
863 gtk_box_pack_start (GTK_BOX (hbResults), hbbResultsLeft, FALSE, TRUE, 0);
864
865 btnCompare = gtk_button_new_with_mnemonic ("_Compare Selected Maps");
866 gtk_widget_show (btnCompare);
867 gtk_container_add (GTK_CONTAINER (hbbResultsLeft), btnCompare);
868 GTK_WIDGET_SET_FLAGS (btnCompare, GTK_CAN_DEFAULT);
869
870 btnSubmit = gtk_button_new_with_mnemonic ("_View Graphs / Submit");
871 gtk_widget_show (btnSubmit);
872 gtk_container_add (GTK_CONTAINER (hbbResultsLeft), btnSubmit);
873 GTK_WIDGET_SET_FLAGS (btnSubmit, GTK_CAN_DEFAULT);
874
875 hbbResultsRight = gtk_hbutton_box_new ();
876 gtk_widget_show (hbbResultsRight);
877 gtk_box_pack_end (GTK_BOX (hbResults), hbbResultsRight, FALSE, FALSE, 0);
878
879 btnLoadLog = gtk_button_new ();
880 gtk_widget_show (btnLoadLog);
881 gtk_container_add (GTK_CONTAINER (hbbResultsRight), btnLoadLog);
882 GTK_WIDGET_SET_FLAGS (btnLoadLog, GTK_CAN_DEFAULT);
883
884 alignment10 = gtk_alignment_new (0.5, 0.5, 0, 0);
885 gtk_widget_show (alignment10);
886 gtk_container_add (GTK_CONTAINER (btnLoadLog), alignment10);
887
888 hbox11 = gtk_hbox_new (FALSE, 2);
889 gtk_widget_show (hbox11);
890 gtk_container_add (GTK_CONTAINER (alignment10), hbox11);
891
892 image10 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON);
893 gtk_widget_show (image10);
894 gtk_box_pack_start (GTK_BOX (hbox11), image10, FALSE, FALSE, 0);
895
896 label17 = gtk_label_new_with_mnemonic ("_Load...");
897 gtk_widget_show (label17);
898 gtk_box_pack_start (GTK_BOX (hbox11), label17, FALSE, FALSE, 0);
899
900 BtnSaveLog = gtk_button_new ();
901 gtk_widget_show (BtnSaveLog);
902 gtk_container_add (GTK_CONTAINER (hbbResultsRight), BtnSaveLog);
903 GTK_WIDGET_SET_FLAGS (BtnSaveLog, GTK_CAN_DEFAULT);
904
905 alignment11 = gtk_alignment_new (0.5, 0.5, 0, 0);
906 gtk_widget_show (alignment11);
907 gtk_container_add (GTK_CONTAINER (BtnSaveLog), alignment11);
908
909 hbox12 = gtk_hbox_new (FALSE, 2);
910 gtk_widget_show (hbox12);
911 gtk_container_add (GTK_CONTAINER (alignment11), hbox12);
912
913 image11 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_BUTTON);
914 gtk_widget_show (image11);
915 gtk_box_pack_start (GTK_BOX (hbox12), image11, FALSE, FALSE, 0);
916
917 label18 = gtk_label_new_with_mnemonic ("_Save...");
918 gtk_widget_show (label18);
919 gtk_box_pack_start (GTK_BOX (hbox12), label18, FALSE, FALSE, 0);
920
921 btnDismissResults = gtk_button_new ();
922 gtk_widget_show (btnDismissResults);
923 gtk_container_add (GTK_CONTAINER (hbbResultsRight), btnDismissResults);
924 GTK_WIDGET_SET_FLAGS (btnDismissResults, GTK_CAN_DEFAULT);
925
926 alignment12 = gtk_alignment_new (0.5, 0.5, 0, 0);
927 gtk_widget_show (alignment12);
928 gtk_container_add (GTK_CONTAINER (btnDismissResults), alignment12);
929
930 hbox13 = gtk_hbox_new (FALSE, 2);
931 gtk_widget_show (hbox13);
932 gtk_container_add (GTK_CONTAINER (alignment12), hbox13);
933
934 image12 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_BUTTON);
935 gtk_widget_show (image12);
936 gtk_box_pack_start (GTK_BOX (hbox13), image12, FALSE, FALSE, 0);
937
938 label19 = gtk_label_new_with_mnemonic ("_Dismiss");
939 gtk_widget_show (label19);
940 gtk_box_pack_start (GTK_BOX (hbox13), label19, FALSE, FALSE, 0);
941
942 label20 = gtk_label_new ("<b>UMark</b> Results");
943 gtk_widget_show (label20);
944 gtk_frame_set_label_widget (GTK_FRAME (frmResults), label20);
945 gtk_label_set_use_markup (GTK_LABEL (label20), TRUE);
946
947 g_signal_connect ((gpointer) btnCompare, "clicked",
948 G_CALLBACK (on_btncompare_clicked),
949 NULL);
950 g_signal_connect ((gpointer) btnSubmit, "clicked",
951 G_CALLBACK (on_btnsubmit_clicked),
952 NULL);
953 g_signal_connect ((gpointer) btnLoadLog, "clicked",
954 G_CALLBACK (on_btnloadlog_clicked),
955 NULL);
956 g_signal_connect ((gpointer) BtnSaveLog, "clicked",
957 G_CALLBACK (on_btnsavelog_clicked),
958 NULL);
959 g_signal_connect ((gpointer) btnDismissResults, "clicked",
960 G_CALLBACK (on_btndismissresults_clicked),
961 NULL);
962
963 /* Store pointers to all widgets, for use by lookup_widget(). */
964 GLADE_HOOKUP_OBJECT_NO_REF (ResultsDlg, ResultsDlg, "ResultsDlg");
965 GLADE_HOOKUP_OBJECT (ResultsDlg, frmResults, "frmResults");
966 GLADE_HOOKUP_OBJECT (ResultsDlg, alignment9, "alignment9");
967 GLADE_HOOKUP_OBJECT (ResultsDlg, vbResults, "vbResults");
968 GLADE_HOOKUP_OBJECT (ResultsDlg, swResults, "swResults");
969 GLADE_HOOKUP_OBJECT (ResultsDlg, tvResults, "tvResults");
970 GLADE_HOOKUP_OBJECT (ResultsDlg, hbResults, "hbResults");
971 GLADE_HOOKUP_OBJECT (ResultsDlg, hbbResultsLeft, "hbbResultsLeft");
972 GLADE_HOOKUP_OBJECT (ResultsDlg, btnCompare, "btnCompare");
973 GLADE_HOOKUP_OBJECT (ResultsDlg, btnSubmit, "btnSubmit");
974 GLADE_HOOKUP_OBJECT (ResultsDlg, hbbResultsRight, "hbbResultsRight");
975 GLADE_HOOKUP_OBJECT (ResultsDlg, btnLoadLog, "btnLoadLog");
976 GLADE_HOOKUP_OBJECT (ResultsDlg, alignment10, "alignment10");
977 GLADE_HOOKUP_OBJECT (ResultsDlg, hbox11, "hbox11");
978 GLADE_HOOKUP_OBJECT (ResultsDlg, image10, "image10");
979 GLADE_HOOKUP_OBJECT (ResultsDlg, label17, "label17");
980 GLADE_HOOKUP_OBJECT (ResultsDlg, BtnSaveLog, "BtnSaveLog");
981 GLADE_HOOKUP_OBJECT (ResultsDlg, alignment11, "alignment11");
982 GLADE_HOOKUP_OBJECT (ResultsDlg, hbox12, "hbox12");
983 GLADE_HOOKUP_OBJECT (ResultsDlg, image11, "image11");
984 GLADE_HOOKUP_OBJECT (ResultsDlg, label18, "label18");
985 GLADE_HOOKUP_OBJECT (ResultsDlg, btnDismissResults, "btnDismissResults");
986 GLADE_HOOKUP_OBJECT (ResultsDlg, alignment12, "alignment12");
987 GLADE_HOOKUP_OBJECT (ResultsDlg, hbox13, "hbox13");
988 GLADE_HOOKUP_OBJECT (ResultsDlg, image12, "image12");
989 GLADE_HOOKUP_OBJECT (ResultsDlg, label19, "label19");
990 GLADE_HOOKUP_OBJECT (ResultsDlg, label20, "label20");
991
992 return ResultsDlg;
993 }
994
995 GtkWidget*
create_PresetDlg(void)996 create_PresetDlg (void)
997 {
998 GtkWidget *PresetDlg;
999 GdkPixbuf *PresetDlg_icon_pixbuf;
1000 GtkWidget *vbDlgPreset;
1001 GtkWidget *frmDlgPreset;
1002 GtkWidget *vbPresetsChoice;
1003 GtkWidget *radPreBM;
1004 GSList *radPreBM_group = NULL;
1005 GtkWidget *radPreFB;
1006 GtkWidget *radPreDM;
1007 GtkWidget *radPreD4;
1008 GtkWidget *radPreDE;
1009 GtkWidget *radPreEg;
1010 GtkWidget *radPreU3;
1011 GtkWidget *radPreU4;
1012 GtkWidget *label22;
1013 GtkWidget *hbbDlgPreset;
1014 GtkWidget *btnPresetUse;
1015 GtkWidget *alignment13;
1016 GtkWidget *hbox14;
1017 GtkWidget *image13;
1018 GtkWidget *label21;
1019 GtkWidget *btnPresetAdd;
1020 GtkWidget *btnPresetCancel;
1021
1022 PresetDlg = gtk_dialog_new ();
1023 gtk_window_set_title (GTK_WINDOW (PresetDlg), "Preset Map Lists");
1024 gtk_window_set_position (GTK_WINDOW (PresetDlg), GTK_WIN_POS_CENTER_ON_PARENT);
1025 gtk_window_set_modal (GTK_WINDOW (PresetDlg), TRUE);
1026 gtk_window_set_resizable (GTK_WINDOW (PresetDlg), FALSE);
1027 PresetDlg_icon_pixbuf = create_pixbuf ("umark_icon.png");
1028 if (PresetDlg_icon_pixbuf)
1029 {
1030 gtk_window_set_icon (GTK_WINDOW (PresetDlg), PresetDlg_icon_pixbuf);
1031 gdk_pixbuf_unref (PresetDlg_icon_pixbuf);
1032 }
1033 gtk_window_set_type_hint (GTK_WINDOW (PresetDlg), GDK_WINDOW_TYPE_HINT_DIALOG);
1034
1035 vbDlgPreset = GTK_DIALOG (PresetDlg)->vbox;
1036 gtk_widget_show (vbDlgPreset);
1037
1038 frmDlgPreset = gtk_frame_new (NULL);
1039 gtk_widget_show (frmDlgPreset);
1040 gtk_box_pack_start (GTK_BOX (vbDlgPreset), frmDlgPreset, TRUE, TRUE, 0);
1041 gtk_container_set_border_width (GTK_CONTAINER (frmDlgPreset), 6);
1042
1043 vbPresetsChoice = gtk_vbox_new (FALSE, 0);
1044 gtk_widget_show (vbPresetsChoice);
1045 gtk_container_add (GTK_CONTAINER (frmDlgPreset), vbPresetsChoice);
1046 gtk_container_set_border_width (GTK_CONTAINER (vbPresetsChoice), 5);
1047
1048 radPreBM = gtk_radio_button_new_with_mnemonic (NULL, "Unreal Tournament 2003 _Botmatch");
1049 gtk_widget_show (radPreBM);
1050 gtk_box_pack_start (GTK_BOX (vbPresetsChoice), radPreBM, FALSE, FALSE, 0);
1051 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radPreBM), radPreBM_group);
1052 radPreBM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radPreBM));
1053 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radPreBM), TRUE);
1054
1055 radPreFB = gtk_radio_button_new_with_mnemonic (NULL, "Unreal Tournament 2003 _Flyby");
1056 gtk_widget_show (radPreFB);
1057 gtk_box_pack_start (GTK_BOX (vbPresetsChoice), radPreFB, FALSE, FALSE, 0);
1058 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radPreFB), radPreBM_group);
1059 radPreBM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radPreFB));
1060
1061 radPreDM = gtk_radio_button_new_with_mnemonic (NULL, "Unreal Tournament 200_3 Demo Maps");
1062 gtk_widget_show (radPreDM);
1063 gtk_box_pack_start (GTK_BOX (vbPresetsChoice), radPreDM, FALSE, FALSE, 0);
1064 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radPreDM), radPreBM_group);
1065 radPreBM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radPreDM));
1066
1067 radPreD4 = gtk_radio_button_new_with_mnemonic (NULL, "Unreal Tournament 200_4 Demo Maps");
1068 gtk_widget_show (radPreD4);
1069 gtk_box_pack_start (GTK_BOX (vbPresetsChoice), radPreD4, FALSE, FALSE, 0);
1070 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radPreD4), radPreBM_group);
1071 radPreBM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radPreD4));
1072
1073 radPreDE = gtk_radio_button_new_with_mnemonic (NULL, "Digital E_xtremes Bonus Pack Maps");
1074 gtk_widget_show (radPreDE);
1075 gtk_box_pack_start (GTK_BOX (vbPresetsChoice), radPreDE, FALSE, FALSE, 0);
1076 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radPreDE), radPreBM_group);
1077 radPreBM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radPreDE));
1078
1079 radPreEg = gtk_radio_button_new_with_mnemonic (NULL, "_Epic Games Bonus Pack Maps");
1080 gtk_widget_show (radPreEg);
1081 gtk_box_pack_start (GTK_BOX (vbPresetsChoice), radPreEg, FALSE, FALSE, 0);
1082 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radPreEg), radPreBM_group);
1083 radPreBM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radPreEg));
1084
1085 radPreU3 = gtk_radio_button_new_with_mnemonic (NULL, "The Official _UMark 2003 Test");
1086 gtk_widget_show (radPreU3);
1087 gtk_box_pack_start (GTK_BOX (vbPresetsChoice), radPreU3, FALSE, FALSE, 0);
1088 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radPreU3), radPreBM_group);
1089 radPreBM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radPreU3));
1090
1091 radPreU4 = gtk_radio_button_new_with_mnemonic (NULL, "The Official U_Mark 2004 Test");
1092 gtk_widget_show (radPreU4);
1093 gtk_box_pack_start (GTK_BOX (vbPresetsChoice), radPreU4, FALSE, FALSE, 0);
1094 gtk_radio_button_set_group (GTK_RADIO_BUTTON (radPreU4), radPreBM_group);
1095 radPreBM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radPreU4));
1096
1097 label22 = gtk_label_new ("<b>UMark</b> Preset Lists");
1098 gtk_widget_show (label22);
1099 gtk_frame_set_label_widget (GTK_FRAME (frmDlgPreset), label22);
1100 gtk_label_set_use_markup (GTK_LABEL (label22), TRUE);
1101
1102 hbbDlgPreset = GTK_DIALOG (PresetDlg)->action_area;
1103 gtk_widget_show (hbbDlgPreset);
1104 gtk_button_box_set_layout (GTK_BUTTON_BOX (hbbDlgPreset), GTK_BUTTONBOX_END);
1105
1106 btnPresetUse = gtk_button_new ();
1107 gtk_widget_show (btnPresetUse);
1108 gtk_dialog_add_action_widget (GTK_DIALOG (PresetDlg), btnPresetUse, GTK_RESPONSE_OK);
1109 GTK_WIDGET_SET_FLAGS (btnPresetUse, GTK_CAN_DEFAULT);
1110
1111 alignment13 = gtk_alignment_new (0.5, 0.5, 0, 0);
1112 gtk_widget_show (alignment13);
1113 gtk_container_add (GTK_CONTAINER (btnPresetUse), alignment13);
1114
1115 hbox14 = gtk_hbox_new (FALSE, 2);
1116 gtk_widget_show (hbox14);
1117 gtk_container_add (GTK_CONTAINER (alignment13), hbox14);
1118
1119 image13 = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON);
1120 gtk_widget_show (image13);
1121 gtk_box_pack_start (GTK_BOX (hbox14), image13, FALSE, FALSE, 0);
1122
1123 label21 = gtk_label_new_with_mnemonic ("_Use");
1124 gtk_widget_show (label21);
1125 gtk_box_pack_start (GTK_BOX (hbox14), label21, FALSE, FALSE, 0);
1126
1127 btnPresetAdd = gtk_button_new_from_stock ("gtk-add");
1128 gtk_widget_show (btnPresetAdd);
1129 gtk_dialog_add_action_widget (GTK_DIALOG (PresetDlg), btnPresetAdd, GTK_RESPONSE_OK);
1130 GTK_WIDGET_SET_FLAGS (btnPresetAdd, GTK_CAN_DEFAULT);
1131
1132 btnPresetCancel = gtk_button_new_from_stock ("gtk-cancel");
1133 gtk_widget_show (btnPresetCancel);
1134 gtk_dialog_add_action_widget (GTK_DIALOG (PresetDlg), btnPresetCancel, GTK_RESPONSE_CANCEL);
1135 GTK_WIDGET_SET_FLAGS (btnPresetCancel, GTK_CAN_DEFAULT);
1136
1137 g_signal_connect ((gpointer) radPreBM, "clicked",
1138 G_CALLBACK (on_radprebm_clicked),
1139 NULL);
1140 g_signal_connect ((gpointer) radPreFB, "clicked",
1141 G_CALLBACK (on_radprefb_clicked),
1142 NULL);
1143 g_signal_connect ((gpointer) radPreDM, "clicked",
1144 G_CALLBACK (on_radpredm_clicked),
1145 NULL);
1146 g_signal_connect ((gpointer) radPreD4, "clicked",
1147 G_CALLBACK (on_radpred4_clicked),
1148 NULL);
1149 g_signal_connect ((gpointer) radPreDE, "clicked",
1150 G_CALLBACK (on_radprede_clicked),
1151 NULL);
1152 g_signal_connect ((gpointer) radPreEg, "clicked",
1153 G_CALLBACK (on_radpreeg_clicked),
1154 NULL);
1155 g_signal_connect ((gpointer) radPreU3, "clicked",
1156 G_CALLBACK (on_radpreu3_clicked),
1157 NULL);
1158 g_signal_connect ((gpointer) radPreU4, "clicked",
1159 G_CALLBACK (on_radpreu4_clicked),
1160 NULL);
1161 g_signal_connect ((gpointer) btnPresetUse, "clicked",
1162 G_CALLBACK (on_BtnPresetUse_clicked),
1163 NULL);
1164 g_signal_connect ((gpointer) btnPresetAdd, "clicked",
1165 G_CALLBACK (on_BtnPresetAdd_clicked),
1166 NULL);
1167 g_signal_connect ((gpointer) btnPresetCancel, "clicked",
1168 G_CALLBACK (on_BtnPresetCancel_clicked),
1169 NULL);
1170
1171 /* Store pointers to all widgets, for use by lookup_widget(). */
1172 GLADE_HOOKUP_OBJECT_NO_REF (PresetDlg, PresetDlg, "PresetDlg");
1173 GLADE_HOOKUP_OBJECT_NO_REF (PresetDlg, vbDlgPreset, "vbDlgPreset");
1174 GLADE_HOOKUP_OBJECT (PresetDlg, frmDlgPreset, "frmDlgPreset");
1175 GLADE_HOOKUP_OBJECT (PresetDlg, vbPresetsChoice, "vbPresetsChoice");
1176 GLADE_HOOKUP_OBJECT (PresetDlg, radPreBM, "radPreBM");
1177 GLADE_HOOKUP_OBJECT (PresetDlg, radPreFB, "radPreFB");
1178 GLADE_HOOKUP_OBJECT (PresetDlg, radPreDM, "radPreDM");
1179 GLADE_HOOKUP_OBJECT (PresetDlg, radPreD4, "radPreD4");
1180 GLADE_HOOKUP_OBJECT (PresetDlg, radPreDE, "radPreDE");
1181 GLADE_HOOKUP_OBJECT (PresetDlg, radPreEg, "radPreEg");
1182 GLADE_HOOKUP_OBJECT (PresetDlg, radPreU3, "radPreU3");
1183 GLADE_HOOKUP_OBJECT (PresetDlg, radPreU4, "radPreU4");
1184 GLADE_HOOKUP_OBJECT (PresetDlg, label22, "label22");
1185 GLADE_HOOKUP_OBJECT_NO_REF (PresetDlg, hbbDlgPreset, "hbbDlgPreset");
1186 GLADE_HOOKUP_OBJECT (PresetDlg, btnPresetUse, "btnPresetUse");
1187 GLADE_HOOKUP_OBJECT (PresetDlg, alignment13, "alignment13");
1188 GLADE_HOOKUP_OBJECT (PresetDlg, hbox14, "hbox14");
1189 GLADE_HOOKUP_OBJECT (PresetDlg, image13, "image13");
1190 GLADE_HOOKUP_OBJECT (PresetDlg, label21, "label21");
1191 GLADE_HOOKUP_OBJECT (PresetDlg, btnPresetAdd, "btnPresetAdd");
1192 GLADE_HOOKUP_OBJECT (PresetDlg, btnPresetCancel, "btnPresetCancel");
1193
1194 return PresetDlg;
1195 }
1196
1197 GtkWidget*
create_MsgDlg(void)1198 create_MsgDlg (void)
1199 {
1200 GtkWidget *MsgDlg;
1201 GdkPixbuf *MsgDlg_icon_pixbuf;
1202 GtkWidget *vbMsgDlg;
1203 GtkWidget *hbMsgDlg;
1204 GtkWidget *imgMsgDlg;
1205 GtkWidget *lblMsgDlg;
1206 GtkWidget *daaMsgDlg;
1207 GtkWidget *btnMsgOK;
1208
1209 MsgDlg = gtk_dialog_new ();
1210 gtk_window_set_title (GTK_WINDOW (MsgDlg), "UMark Message Dialog");
1211 gtk_window_set_position (GTK_WINDOW (MsgDlg), GTK_WIN_POS_CENTER_ON_PARENT);
1212 gtk_window_set_modal (GTK_WINDOW (MsgDlg), TRUE);
1213 MsgDlg_icon_pixbuf = create_pixbuf ("umark_icon.png");
1214 if (MsgDlg_icon_pixbuf)
1215 {
1216 gtk_window_set_icon (GTK_WINDOW (MsgDlg), MsgDlg_icon_pixbuf);
1217 gdk_pixbuf_unref (MsgDlg_icon_pixbuf);
1218 }
1219 gtk_window_set_type_hint (GTK_WINDOW (MsgDlg), GDK_WINDOW_TYPE_HINT_DIALOG);
1220
1221 vbMsgDlg = GTK_DIALOG (MsgDlg)->vbox;
1222 gtk_widget_show (vbMsgDlg);
1223
1224 hbMsgDlg = gtk_hbox_new (FALSE, 0);
1225 gtk_widget_show (hbMsgDlg);
1226 gtk_box_pack_start (GTK_BOX (vbMsgDlg), hbMsgDlg, TRUE, TRUE, 0);
1227
1228 imgMsgDlg = create_pixmap (MsgDlg, "umark_icon.png");
1229 gtk_widget_show (imgMsgDlg);
1230 gtk_box_pack_start (GTK_BOX (hbMsgDlg), imgMsgDlg, FALSE, TRUE, 6);
1231
1232 lblMsgDlg = gtk_label_new ("<b>Umark</b> information/warning/error message dialog label.");
1233 gtk_widget_show (lblMsgDlg);
1234 gtk_box_pack_start (GTK_BOX (hbMsgDlg), lblMsgDlg, TRUE, FALSE, 0);
1235 GTK_WIDGET_SET_FLAGS (lblMsgDlg, GTK_CAN_FOCUS);
1236 gtk_label_set_use_markup (GTK_LABEL (lblMsgDlg), TRUE);
1237 gtk_label_set_line_wrap (GTK_LABEL (lblMsgDlg), TRUE);
1238 gtk_label_set_selectable (GTK_LABEL (lblMsgDlg), TRUE);
1239
1240 daaMsgDlg = GTK_DIALOG (MsgDlg)->action_area;
1241 gtk_widget_show (daaMsgDlg);
1242 gtk_button_box_set_layout (GTK_BUTTON_BOX (daaMsgDlg), GTK_BUTTONBOX_SPREAD);
1243
1244 btnMsgOK = gtk_button_new_from_stock ("gtk-ok");
1245 gtk_widget_show (btnMsgOK);
1246 gtk_dialog_add_action_widget (GTK_DIALOG (MsgDlg), btnMsgOK, GTK_RESPONSE_OK);
1247 GTK_WIDGET_SET_FLAGS (btnMsgOK, GTK_CAN_DEFAULT);
1248
1249 g_signal_connect ((gpointer) btnMsgOK, "clicked",
1250 G_CALLBACK (on_btnMsgOK_clicked),
1251 NULL);
1252
1253 /* Store pointers to all widgets, for use by lookup_widget(). */
1254 GLADE_HOOKUP_OBJECT_NO_REF (MsgDlg, MsgDlg, "MsgDlg");
1255 GLADE_HOOKUP_OBJECT_NO_REF (MsgDlg, vbMsgDlg, "vbMsgDlg");
1256 GLADE_HOOKUP_OBJECT (MsgDlg, hbMsgDlg, "hbMsgDlg");
1257 GLADE_HOOKUP_OBJECT (MsgDlg, imgMsgDlg, "imgMsgDlg");
1258 GLADE_HOOKUP_OBJECT (MsgDlg, lblMsgDlg, "lblMsgDlg");
1259 GLADE_HOOKUP_OBJECT_NO_REF (MsgDlg, daaMsgDlg, "daaMsgDlg");
1260 GLADE_HOOKUP_OBJECT (MsgDlg, btnMsgOK, "btnMsgOK");
1261
1262 return MsgDlg;
1263 }
1264
1265 GtkWidget*
create_UMarkConfDlg(void)1266 create_UMarkConfDlg (void)
1267 {
1268 GtkWidget *UMarkConfDlg;
1269 GdkPixbuf *UMarkConfDlg_icon_pixbuf;
1270 GtkWidget *dialog_vbox1;
1271 GtkWidget *frmUMarkConf;
1272 GtkWidget *alignment16;
1273 GtkWidget *tblUMarkConf;
1274 GtkWidget *label26;
1275 GtkWidget *entryIniFile;
1276 GtkWidget *btnBrowseIni;
1277 GtkWidget *label27;
1278 GtkWidget *entryIniUser;
1279 GtkWidget *btnBrowseUser;
1280 GtkWidget *labeliniconf;
1281 GtkWidget *dialog_action_area1;
1282 GtkWidget *btnConfCancel;
1283 GtkWidget *btnConfOK;
1284
1285 UMarkConfDlg = gtk_dialog_new ();
1286 gtk_window_set_title (GTK_WINDOW (UMarkConfDlg), "UMark Configuration");
1287 gtk_window_set_position (GTK_WINDOW (UMarkConfDlg), GTK_WIN_POS_CENTER_ON_PARENT);
1288 gtk_window_set_modal (GTK_WINDOW (UMarkConfDlg), TRUE);
1289 gtk_window_set_resizable (GTK_WINDOW (UMarkConfDlg), FALSE);
1290 UMarkConfDlg_icon_pixbuf = create_pixbuf ("umark_icon.png");
1291 if (UMarkConfDlg_icon_pixbuf)
1292 {
1293 gtk_window_set_icon (GTK_WINDOW (UMarkConfDlg), UMarkConfDlg_icon_pixbuf);
1294 gdk_pixbuf_unref (UMarkConfDlg_icon_pixbuf);
1295 }
1296 gtk_window_set_type_hint (GTK_WINDOW (UMarkConfDlg), GDK_WINDOW_TYPE_HINT_DIALOG);
1297
1298 dialog_vbox1 = GTK_DIALOG (UMarkConfDlg)->vbox;
1299 gtk_widget_show (dialog_vbox1);
1300
1301 frmUMarkConf = gtk_frame_new (NULL);
1302 gtk_widget_show (frmUMarkConf);
1303 gtk_box_pack_start (GTK_BOX (dialog_vbox1), frmUMarkConf, TRUE, TRUE, 3);
1304 gtk_container_set_border_width (GTK_CONTAINER (frmUMarkConf), 5);
1305
1306 alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1);
1307 gtk_widget_show (alignment16);
1308 gtk_container_add (GTK_CONTAINER (frmUMarkConf), alignment16);
1309 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment16), 0, 8, 8, 8);
1310
1311 tblUMarkConf = gtk_table_new (3, 3, FALSE);
1312 gtk_widget_show (tblUMarkConf);
1313 gtk_container_add (GTK_CONTAINER (alignment16), tblUMarkConf);
1314 gtk_table_set_row_spacings (GTK_TABLE (tblUMarkConf), 2);
1315 gtk_table_set_col_spacings (GTK_TABLE (tblUMarkConf), 2);
1316
1317 label26 = gtk_label_new ("Ini File:");
1318 gtk_widget_show (label26);
1319 gtk_table_attach (GTK_TABLE (tblUMarkConf), label26, 0, 1, 0, 1,
1320 (GtkAttachOptions) (GTK_FILL),
1321 (GtkAttachOptions) (0), 0, 0);
1322 gtk_misc_set_alignment (GTK_MISC (label26), 0, 0.5);
1323
1324 entryIniFile = gtk_entry_new ();
1325 gtk_widget_show (entryIniFile);
1326 gtk_table_attach (GTK_TABLE (tblUMarkConf), entryIniFile, 1, 2, 0, 1,
1327 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1328 (GtkAttachOptions) (0), 0, 0);
1329
1330 btnBrowseIni = gtk_button_new_with_mnemonic (" Browse... ");
1331 gtk_widget_show (btnBrowseIni);
1332 gtk_table_attach (GTK_TABLE (tblUMarkConf), btnBrowseIni, 2, 3, 0, 1,
1333 (GtkAttachOptions) (GTK_FILL),
1334 (GtkAttachOptions) (0), 0, 0);
1335
1336 label27 = gtk_label_new ("Ini User: ");
1337 gtk_widget_show (label27);
1338 gtk_table_attach (GTK_TABLE (tblUMarkConf), label27, 0, 1, 1, 2,
1339 (GtkAttachOptions) (GTK_FILL),
1340 (GtkAttachOptions) (0), 0, 0);
1341 gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);
1342
1343 entryIniUser = gtk_entry_new ();
1344 gtk_widget_show (entryIniUser);
1345 gtk_table_attach (GTK_TABLE (tblUMarkConf), entryIniUser, 1, 2, 1, 2,
1346 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1347 (GtkAttachOptions) (0), 0, 0);
1348
1349 btnBrowseUser = gtk_button_new_with_mnemonic (" Browse... ");
1350 gtk_widget_show (btnBrowseUser);
1351 gtk_table_attach (GTK_TABLE (tblUMarkConf), btnBrowseUser, 2, 3, 1, 2,
1352 (GtkAttachOptions) (GTK_FILL),
1353 (GtkAttachOptions) (0), 0, 0);
1354
1355 labeliniconf = gtk_label_new (" <b>UMark</b> Ini Configuration ");
1356 gtk_widget_show (labeliniconf);
1357 gtk_frame_set_label_widget (GTK_FRAME (frmUMarkConf), labeliniconf);
1358 gtk_label_set_use_markup (GTK_LABEL (labeliniconf), TRUE);
1359
1360 dialog_action_area1 = GTK_DIALOG (UMarkConfDlg)->action_area;
1361 gtk_widget_show (dialog_action_area1);
1362 gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
1363
1364 btnConfCancel = gtk_button_new_from_stock ("gtk-cancel");
1365 gtk_widget_show (btnConfCancel);
1366 gtk_dialog_add_action_widget (GTK_DIALOG (UMarkConfDlg), btnConfCancel, GTK_RESPONSE_CANCEL);
1367 GTK_WIDGET_SET_FLAGS (btnConfCancel, GTK_CAN_DEFAULT);
1368
1369 btnConfOK = gtk_button_new_from_stock ("gtk-ok");
1370 gtk_widget_show (btnConfOK);
1371 gtk_dialog_add_action_widget (GTK_DIALOG (UMarkConfDlg), btnConfOK, GTK_RESPONSE_OK);
1372 GTK_WIDGET_SET_FLAGS (btnConfOK, GTK_CAN_DEFAULT);
1373
1374 g_signal_connect ((gpointer) entryIniFile, "changed",
1375 G_CALLBACK (on_entryIniFile_changed),
1376 NULL);
1377 g_signal_connect ((gpointer) btnBrowseIni, "clicked",
1378 G_CALLBACK (on_btnBrowseIni_clicked),
1379 NULL);
1380 g_signal_connect ((gpointer) entryIniUser, "changed",
1381 G_CALLBACK (on_entryIniUser_changed),
1382 NULL);
1383 g_signal_connect ((gpointer) btnBrowseUser, "clicked",
1384 G_CALLBACK (on_btnBrowseUser_clicked),
1385 NULL);
1386 g_signal_connect ((gpointer) btnConfCancel, "clicked",
1387 G_CALLBACK (on_btnConfCancel_clicked),
1388 NULL);
1389 g_signal_connect ((gpointer) btnConfOK, "clicked",
1390 G_CALLBACK (on_btnConfOK_clicked),
1391 NULL);
1392
1393 /* Store pointers to all widgets, for use by lookup_widget(). */
1394 GLADE_HOOKUP_OBJECT_NO_REF (UMarkConfDlg, UMarkConfDlg, "UMarkConfDlg");
1395 GLADE_HOOKUP_OBJECT_NO_REF (UMarkConfDlg, dialog_vbox1, "dialog_vbox1");
1396 GLADE_HOOKUP_OBJECT (UMarkConfDlg, frmUMarkConf, "frmUMarkConf");
1397 GLADE_HOOKUP_OBJECT (UMarkConfDlg, alignment16, "alignment16");
1398 GLADE_HOOKUP_OBJECT (UMarkConfDlg, tblUMarkConf, "tblUMarkConf");
1399 GLADE_HOOKUP_OBJECT (UMarkConfDlg, label26, "label26");
1400 GLADE_HOOKUP_OBJECT (UMarkConfDlg, entryIniFile, "entryIniFile");
1401 GLADE_HOOKUP_OBJECT (UMarkConfDlg, btnBrowseIni, "btnBrowseIni");
1402 GLADE_HOOKUP_OBJECT (UMarkConfDlg, label27, "label27");
1403 GLADE_HOOKUP_OBJECT (UMarkConfDlg, entryIniUser, "entryIniUser");
1404 GLADE_HOOKUP_OBJECT (UMarkConfDlg, btnBrowseUser, "btnBrowseUser");
1405 GLADE_HOOKUP_OBJECT (UMarkConfDlg, labeliniconf, "labeliniconf");
1406 GLADE_HOOKUP_OBJECT_NO_REF (UMarkConfDlg, dialog_action_area1, "dialog_action_area1");
1407 GLADE_HOOKUP_OBJECT (UMarkConfDlg, btnConfCancel, "btnConfCancel");
1408 GLADE_HOOKUP_OBJECT (UMarkConfDlg, btnConfOK, "btnConfOK");
1409
1410 return UMarkConfDlg;
1411 }
1412
1413 GtkWidget*
create_AboutDlg(void)1414 create_AboutDlg (void)
1415 {
1416 GtkWidget *AboutDlg;
1417 GdkPixbuf *AboutDlg_icon_pixbuf;
1418 GtkWidget *vbAboutMain;
1419 GtkWidget *vbAboutContent;
1420 GtkWidget *imgAboutUMark;
1421 GtkWidget *label28;
1422 GtkWidget *daaAboutDlg;
1423 GtkWidget *btnAboutDocs;
1424 GtkWidget *btnAboutOnline;
1425 GtkWidget *alignment18;
1426 GtkWidget *hbox18;
1427 GtkWidget *image18;
1428 GtkWidget *label30;
1429 GtkWidget *btnAboutUpdates;
1430 GtkWidget *alignment19;
1431 GtkWidget *hbox19;
1432 GtkWidget *image19;
1433 GtkWidget *label31;
1434 GtkWidget *btnCloseAbout;
1435
1436 AboutDlg = gtk_dialog_new ();
1437 gtk_window_set_title (GTK_WINDOW (AboutDlg), "About UMark for Linux");
1438 gtk_window_set_position (GTK_WINDOW (AboutDlg), GTK_WIN_POS_CENTER_ON_PARENT);
1439 gtk_window_set_modal (GTK_WINDOW (AboutDlg), TRUE);
1440 gtk_window_set_resizable (GTK_WINDOW (AboutDlg), FALSE);
1441 AboutDlg_icon_pixbuf = create_pixbuf ("umark_icon.png");
1442 if (AboutDlg_icon_pixbuf)
1443 {
1444 gtk_window_set_icon (GTK_WINDOW (AboutDlg), AboutDlg_icon_pixbuf);
1445 gdk_pixbuf_unref (AboutDlg_icon_pixbuf);
1446 }
1447 gtk_window_set_type_hint (GTK_WINDOW (AboutDlg), GDK_WINDOW_TYPE_HINT_DIALOG);
1448
1449 vbAboutMain = GTK_DIALOG (AboutDlg)->vbox;
1450 gtk_widget_show (vbAboutMain);
1451
1452 vbAboutContent = gtk_vbox_new (FALSE, 0);
1453 gtk_widget_show (vbAboutContent);
1454 gtk_box_pack_start (GTK_BOX (vbAboutMain), vbAboutContent, TRUE, TRUE, 2);
1455
1456 imgAboutUMark = create_pixmap (AboutDlg, "umark.png");
1457 gtk_widget_show (imgAboutUMark);
1458 gtk_box_pack_start (GTK_BOX (vbAboutContent), imgAboutUMark, TRUE, TRUE, 0);
1459 gtk_misc_set_padding (GTK_MISC (imgAboutUMark), 6, 6);
1460
1461 label28 = gtk_label_new ("<b>UMark for Linux v2.0.0 Beta 3</b>\n<i>via www.unrealmark.net</i>\n \nCopyright (C)2004-2005 Jeffrey Bakker\nUnder the GNU General Public License\n ");
1462 gtk_widget_show (label28);
1463 gtk_box_pack_start (GTK_BOX (vbAboutContent), label28, FALSE, FALSE, 0);
1464 gtk_label_set_use_markup (GTK_LABEL (label28), TRUE);
1465 gtk_label_set_justify (GTK_LABEL (label28), GTK_JUSTIFY_CENTER);
1466
1467 daaAboutDlg = GTK_DIALOG (AboutDlg)->action_area;
1468 gtk_widget_show (daaAboutDlg);
1469 gtk_button_box_set_layout (GTK_BUTTON_BOX (daaAboutDlg), GTK_BUTTONBOX_SPREAD);
1470
1471 btnAboutDocs = gtk_button_new_from_stock ("gtk-help");
1472 gtk_widget_show (btnAboutDocs);
1473 gtk_dialog_add_action_widget (GTK_DIALOG (AboutDlg), btnAboutDocs, GTK_RESPONSE_HELP);
1474 GTK_WIDGET_SET_FLAGS (btnAboutDocs, GTK_CAN_DEFAULT);
1475
1476 btnAboutOnline = gtk_button_new ();
1477 gtk_widget_show (btnAboutOnline);
1478 gtk_dialog_add_action_widget (GTK_DIALOG (AboutDlg), btnAboutOnline, 0);
1479 GTK_WIDGET_SET_FLAGS (btnAboutOnline, GTK_CAN_DEFAULT);
1480
1481 alignment18 = gtk_alignment_new (0.5, 0.5, 0, 0);
1482 gtk_widget_show (alignment18);
1483 gtk_container_add (GTK_CONTAINER (btnAboutOnline), alignment18);
1484
1485 hbox18 = gtk_hbox_new (FALSE, 2);
1486 gtk_widget_show (hbox18);
1487 gtk_container_add (GTK_CONTAINER (alignment18), hbox18);
1488
1489 image18 = gtk_image_new_from_stock ("gtk-network", GTK_ICON_SIZE_BUTTON);
1490 gtk_widget_show (image18);
1491 gtk_box_pack_start (GTK_BOX (hbox18), image18, FALSE, FALSE, 0);
1492
1493 label30 = gtk_label_new_with_mnemonic ("Online");
1494 gtk_widget_show (label30);
1495 gtk_box_pack_start (GTK_BOX (hbox18), label30, FALSE, FALSE, 0);
1496
1497 btnAboutUpdates = gtk_button_new ();
1498 gtk_widget_show (btnAboutUpdates);
1499 gtk_dialog_add_action_widget (GTK_DIALOG (AboutDlg), btnAboutUpdates, 0);
1500 GTK_WIDGET_SET_FLAGS (btnAboutUpdates, GTK_CAN_DEFAULT);
1501
1502 alignment19 = gtk_alignment_new (0.5, 0.5, 0, 0);
1503 gtk_widget_show (alignment19);
1504 gtk_container_add (GTK_CONTAINER (btnAboutUpdates), alignment19);
1505
1506 hbox19 = gtk_hbox_new (FALSE, 2);
1507 gtk_widget_show (hbox19);
1508 gtk_container_add (GTK_CONTAINER (alignment19), hbox19);
1509
1510 image19 = gtk_image_new_from_stock ("gtk-go-up", GTK_ICON_SIZE_BUTTON);
1511 gtk_widget_show (image19);
1512 gtk_box_pack_start (GTK_BOX (hbox19), image19, FALSE, FALSE, 0);
1513
1514 label31 = gtk_label_new_with_mnemonic ("Updates");
1515 gtk_widget_show (label31);
1516 gtk_box_pack_start (GTK_BOX (hbox19), label31, FALSE, FALSE, 0);
1517
1518 btnCloseAbout = gtk_button_new_from_stock ("gtk-close");
1519 gtk_widget_show (btnCloseAbout);
1520 gtk_dialog_add_action_widget (GTK_DIALOG (AboutDlg), btnCloseAbout, GTK_RESPONSE_CLOSE);
1521 GTK_WIDGET_SET_FLAGS (btnCloseAbout, GTK_CAN_DEFAULT);
1522
1523 g_signal_connect ((gpointer) btnAboutDocs, "clicked",
1524 G_CALLBACK (on_btnAboutDocs_clicked),
1525 NULL);
1526 g_signal_connect ((gpointer) btnAboutOnline, "clicked",
1527 G_CALLBACK (on_btnAboutOnline_clicked),
1528 NULL);
1529 g_signal_connect ((gpointer) btnAboutUpdates, "clicked",
1530 G_CALLBACK (on_btnAboutUpdates_clicked),
1531 NULL);
1532 g_signal_connect ((gpointer) btnCloseAbout, "clicked",
1533 G_CALLBACK (on_btnCloseAbout_clicked),
1534 NULL);
1535
1536 /* Store pointers to all widgets, for use by lookup_widget(). */
1537 GLADE_HOOKUP_OBJECT_NO_REF (AboutDlg, AboutDlg, "AboutDlg");
1538 GLADE_HOOKUP_OBJECT_NO_REF (AboutDlg, vbAboutMain, "vbAboutMain");
1539 GLADE_HOOKUP_OBJECT (AboutDlg, vbAboutContent, "vbAboutContent");
1540 GLADE_HOOKUP_OBJECT (AboutDlg, imgAboutUMark, "imgAboutUMark");
1541 GLADE_HOOKUP_OBJECT (AboutDlg, label28, "label28");
1542 GLADE_HOOKUP_OBJECT_NO_REF (AboutDlg, daaAboutDlg, "daaAboutDlg");
1543 GLADE_HOOKUP_OBJECT (AboutDlg, btnAboutDocs, "btnAboutDocs");
1544 GLADE_HOOKUP_OBJECT (AboutDlg, btnAboutOnline, "btnAboutOnline");
1545 GLADE_HOOKUP_OBJECT (AboutDlg, alignment18, "alignment18");
1546 GLADE_HOOKUP_OBJECT (AboutDlg, hbox18, "hbox18");
1547 GLADE_HOOKUP_OBJECT (AboutDlg, image18, "image18");
1548 GLADE_HOOKUP_OBJECT (AboutDlg, label30, "label30");
1549 GLADE_HOOKUP_OBJECT (AboutDlg, btnAboutUpdates, "btnAboutUpdates");
1550 GLADE_HOOKUP_OBJECT (AboutDlg, alignment19, "alignment19");
1551 GLADE_HOOKUP_OBJECT (AboutDlg, hbox19, "hbox19");
1552 GLADE_HOOKUP_OBJECT (AboutDlg, image19, "image19");
1553 GLADE_HOOKUP_OBJECT (AboutDlg, label31, "label31");
1554 GLADE_HOOKUP_OBJECT (AboutDlg, btnCloseAbout, "btnCloseAbout");
1555
1556 return AboutDlg;
1557 }
1558
1559