interface.c 67.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
 * DO NOT EDIT THIS FILE - it is generated by Glade.

#  include <config.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>

#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>

#include "callbacks.h"
#include "interface.h"
#include "support.h"

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)

#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
  g_object_set_data (G_OBJECT (component), name, widget)

create_pnee_pref (void)
  GtkWidget *pnee_pref;
  GtkWidget *main_notebook;
  GtkWidget *vbox1;
  GtkWidget *general_frame;
  GtkWidget *alignment5;
  GtkWidget *table1;
  GtkWidget *hbox9;
  GtkWidget *delay_check;
  GtkObject *spinbutton2_adj;
  GtkWidget *spinbutton2;
  GtkWidget *verbose_check;
  GtkWidget *general_label;
  GtkWidget *record_frame;
  GtkWidget *alignment4;
  GtkWidget *vbox4;
  GtkWidget *hbox4;
  GtkWidget *rec_file_label;
  GtkWidget *entry3;
  GtkWidget *rec_file_button;
  GtkWidget *hbox11;
  GtkWidget *hbox10;
  GtkWidget *nr_events_label;
  GtkObject *spinbutton3_adj;
  GtkWidget *spinbutton3;
  GtkWidget *hbox11b;
  GtkWidget *grab_label;
  GtkWidget *entry5;
  GtkWidget *record_label;
  GtkWidget *replay_frame;
  GtkWidget *alignment2;
  GtkWidget *vbox3;
  GtkWidget *hbox3;
  GtkWidget *repl_file_label;
  GtkWidget *rep_choose_but;
  GtkWidget *hbox5;
  GtkWidget *speed_check;
  GtkObject *spinbutton1_adj;
  GtkWidget *spinbutton1;
  GtkWidget *replay_label;
  GtkWidget *frame1;
  GtkWidget *alignment6;
  GtkWidget *hbox12;
  GtkWidget *log_label;
  GtkWidget *log_entry;
  GtkWidget *log_button;
  GtkWidget *log_frame;
  GtkWidget *setting_ok;
  GtkWidget *settings_label;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  pnee_pref = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (pnee_pref), "Pnee - Preferences");

  main_notebook = gtk_notebook_new ();
  gtk_widget_show (main_notebook);
  gtk_container_add (GTK_CONTAINER (pnee_pref), main_notebook);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (main_notebook), vbox1);

  general_frame = gtk_frame_new (NULL);
  gtk_widget_show (general_frame);
  gtk_box_pack_start (GTK_BOX (vbox1), general_frame, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (general_frame), GTK_SHADOW_NONE);

  alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment5);
  gtk_container_add (GTK_CONTAINER (general_frame), alignment5);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 0);

  table1 = gtk_table_new (2, 3, FALSE);
  gtk_widget_show (table1);
  gtk_container_add (GTK_CONTAINER (alignment5), table1);

  hbox9 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox9);
  gtk_table_attach (GTK_TABLE (table1), hbox9, 0, 1, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  delay_check = gtk_check_button_new_with_mnemonic ("Delay");
  gtk_widget_show (delay_check);
  gtk_box_pack_start (GTK_BOX (hbox9), delay_check, FALSE, FALSE, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (delay_check), TRUE);

  spinbutton2_adj = gtk_adjustment_new (3, 0, 10000, 1, 10, 10);
  spinbutton2 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton2_adj), 1, 0);
  gtk_widget_show (spinbutton2);
  gtk_box_pack_start (GTK_BOX (hbox9), spinbutton2, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, spinbutton2, "Delay start of record or replay. (seconds)", NULL);

  verbose_check = gtk_check_button_new_with_mnemonic ("verbose logging");
  gtk_widget_show (verbose_check);
  gtk_table_attach (GTK_TABLE (table1), verbose_check, 0, 1, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);

  general_label = gtk_label_new ("<b>General</b>");
  gtk_widget_show (general_label);
  gtk_frame_set_label_widget (GTK_FRAME (general_frame), general_label);
  gtk_label_set_use_markup (GTK_LABEL (general_label), TRUE);

  record_frame = gtk_frame_new (NULL);
  gtk_widget_show (record_frame);
  gtk_box_pack_start (GTK_BOX (vbox1), record_frame, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (record_frame), GTK_SHADOW_NONE);

  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment4);
  gtk_container_add (GTK_CONTAINER (record_frame), alignment4);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 12, 0);

  vbox4 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox4);
  gtk_container_add (GTK_CONTAINER (alignment4), vbox4);

  hbox4 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox4);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox4, TRUE, TRUE, 0);

  rec_file_label = gtk_label_new ("Record to file");
  gtk_widget_show (rec_file_label);
  gtk_box_pack_start (GTK_BOX (hbox4), rec_file_label, FALSE, FALSE, 0);

  entry3 = gtk_entry_new ();
  gtk_widget_show (entry3);
  gtk_box_pack_start (GTK_BOX (hbox4), entry3, TRUE, TRUE, 0);
  gtk_editable_set_editable (GTK_EDITABLE (entry3), FALSE);

  rec_file_button = gtk_button_new_with_mnemonic ("...");
  gtk_widget_show (rec_file_button);
  gtk_box_pack_start (GTK_BOX (hbox4), rec_file_button, FALSE, FALSE, 0);

  hbox11 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox11);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox11, TRUE, TRUE, 0);

  hbox10 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox10);
  gtk_box_pack_start (GTK_BOX (hbox11), hbox10, TRUE, TRUE, 0);

  nr_events_label = gtk_label_new ("Events to record");
  gtk_widget_show (nr_events_label);
  gtk_box_pack_start (GTK_BOX (hbox10), nr_events_label, FALSE, FALSE, 0);

  spinbutton3_adj = gtk_adjustment_new (200, -1, 10000, 1, 10, 10);
  spinbutton3 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton3_adj), 1, 0);
  gtk_widget_show (spinbutton3);
  gtk_box_pack_start (GTK_BOX (hbox10), spinbutton3, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, spinbutton3, "Number of events to record (-1 for ever).", NULL);

  hbox11b = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox11b);
  gtk_box_pack_start (GTK_BOX (vbox4), hbox11b, TRUE, TRUE, 0);

  grab_label = gtk_label_new ("Stop key");
  gtk_widget_show (grab_label);
  gtk_box_pack_start (GTK_BOX (hbox11b), grab_label, FALSE, FALSE, 0);

  entry5 = gtk_entry_new ();
  gtk_widget_show (entry5);
  gtk_box_pack_start (GTK_BOX (hbox11b), entry5, TRUE, TRUE, 0);
  gtk_widget_set_size_request (entry5, 4, -1);
  gtk_tooltips_set_tip (tooltips, entry5, "Grab a key to stop recording", NULL);
  gtk_entry_set_max_length (GTK_ENTRY (entry5), 5);
  gtk_entry_set_text (GTK_ENTRY (entry5), "F5");

  record_label = gtk_label_new ("<b>Record</b>");
  gtk_widget_show (record_label);
  gtk_frame_set_label_widget (GTK_FRAME (record_frame), record_label);
  gtk_label_set_use_markup (GTK_LABEL (record_label), TRUE);

  replay_frame = gtk_frame_new (NULL);
  gtk_widget_show (replay_frame);
  gtk_box_pack_start (GTK_BOX (vbox1), replay_frame, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (replay_frame), GTK_SHADOW_NONE);

  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment2);
  gtk_container_add (GTK_CONTAINER (replay_frame), alignment2);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 0, 0, 12, 0);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox3);
  gtk_container_add (GTK_CONTAINER (alignment2), vbox3);

  hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox3, TRUE, TRUE, 0);

  repl_file_label = gtk_label_new ("Replay from file");
  gtk_widget_show (repl_file_label);
  gtk_box_pack_start (GTK_BOX (hbox3), repl_file_label, FALSE, FALSE, 0);

  rep_choose_but = gtk_file_chooser_button_new ("V\303\244lj en fil", GTK_FILE_CHOOSER_ACTION_OPEN);
  gtk_widget_show (rep_choose_but);
  gtk_box_pack_start (GTK_BOX (hbox3), rep_choose_but, TRUE, TRUE, 0);
  g_object_set (rep_choose_but,
                "local-only", FALSE,

  hbox5 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox5);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox5, TRUE, TRUE, 0);

  speed_check = gtk_check_button_new_with_mnemonic ("Replay speed %");
  gtk_widget_show (speed_check);
  gtk_box_pack_start (GTK_BOX (hbox5), speed_check, FALSE, FALSE, 0);

  spinbutton1_adj = gtk_adjustment_new (100, 1, 10000, 1, 10, 10);
  spinbutton1 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton1_adj), 1, 0);
  gtk_widget_show (spinbutton1);
  gtk_box_pack_start (GTK_BOX (hbox5), spinbutton1, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, spinbutton1, "Set a different speed", NULL);

  replay_label = gtk_label_new ("<b>Replay</b>");
  gtk_widget_show (replay_label);
  gtk_frame_set_label_widget (GTK_FRAME (replay_frame), replay_label);
  gtk_label_set_use_markup (GTK_LABEL (replay_label), TRUE);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE);

  alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment6);
  gtk_container_add (GTK_CONTAINER (frame1), alignment6);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 0, 0, 12, 0);

  hbox12 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox12);
  gtk_container_add (GTK_CONTAINER (alignment6), hbox12);

  log_label = gtk_label_new ("Log to file");
  gtk_widget_show (log_label);
  gtk_box_pack_start (GTK_BOX (hbox12), log_label, FALSE, FALSE, 0);

  log_entry = gtk_entry_new ();
  gtk_widget_show (log_entry);
  gtk_box_pack_start (GTK_BOX (hbox12), log_entry, TRUE, TRUE, 0);

  log_button = gtk_button_new_with_mnemonic ("...");
  gtk_widget_show (log_button);
  gtk_box_pack_start (GTK_BOX (hbox12), log_button, FALSE, FALSE, 0);

  log_frame = gtk_label_new ("<b>Logging</b>");
  gtk_widget_show (log_frame);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), log_frame);
  gtk_label_set_use_markup (GTK_LABEL (log_frame), TRUE);

  setting_ok = gtk_button_new_with_mnemonic ("OK");
  gtk_widget_show (setting_ok);
  gtk_box_pack_start (GTK_BOX (vbox1), setting_ok, FALSE, FALSE, 0);

  settings_label = gtk_label_new ("Settings");
  gtk_widget_show (settings_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (main_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (main_notebook), 0), settings_label);

  g_signal_connect_swapped ((gpointer) delay_check, "toggled",
                            G_CALLBACK (on_delay_check_toggled),
                            GTK_OBJECT (delay_check));
  g_signal_connect_swapped ((gpointer) spinbutton2, "value_changed",
                            G_CALLBACK (on_spinbutton2_change_value),
                            GTK_OBJECT (spinbutton2));
  g_signal_connect_swapped ((gpointer) verbose_check, "toggled",
                            G_CALLBACK (on_verbose_check_toggled),
                            GTK_OBJECT (verbose_check));
  g_signal_connect_swapped ((gpointer) rec_file_button, "clicked",
                            G_CALLBACK (on_rec_file_button_clicked),
                            GTK_OBJECT (rec_file_button));
  g_signal_connect_swapped ((gpointer) spinbutton3, "value_changed",
                            G_CALLBACK (on_spinbutton3_value_changed),
                            GTK_OBJECT (spinbutton3));
  g_signal_connect_swapped ((gpointer) entry5, "changed",
                            G_CALLBACK (on_entry5_changed),
                            GTK_OBJECT (entry5));
  g_signal_connect_swapped ((gpointer) rep_choose_but, "file_activated",
                            G_CALLBACK (on_rep_choose_but_file_activated),
                            GTK_OBJECT (rep_choose_but));
  g_signal_connect_swapped ((gpointer) rep_choose_but, "selection_changed",
                            G_CALLBACK (on_rep_choose_but_file_activated),
                            GTK_OBJECT (rep_choose_but));
  g_signal_connect_swapped ((gpointer) speed_check, "toggled",
                            G_CALLBACK (on_speed_check_toggled),
                            GTK_OBJECT (speed_check));
  g_signal_connect_swapped ((gpointer) spinbutton1, "value_changed",
                            G_CALLBACK (on_spinbutton1_value_changed),
                            GTK_OBJECT (spinbutton1));
  g_signal_connect_swapped ((gpointer) log_button, "clicked",
                            G_CALLBACK (on_log_file_button_clicked),
                            GTK_OBJECT (log_button));
  g_signal_connect_swapped ((gpointer) setting_ok, "clicked",
                            G_CALLBACK (on_setting_ok_clicked),
                            GTK_OBJECT (pnee_pref));

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (pnee_pref, pnee_pref, "pnee_pref");
  GLADE_HOOKUP_OBJECT (pnee_pref, main_notebook, "main_notebook");
  GLADE_HOOKUP_OBJECT (pnee_pref, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (pnee_pref, general_frame, "general_frame");
  GLADE_HOOKUP_OBJECT (pnee_pref, alignment5, "alignment5");
  GLADE_HOOKUP_OBJECT (pnee_pref, table1, "table1");
  GLADE_HOOKUP_OBJECT (pnee_pref, hbox9, "hbox9");
  GLADE_HOOKUP_OBJECT (pnee_pref, delay_check, "delay_check");
  GLADE_HOOKUP_OBJECT (pnee_pref, spinbutton2, "spinbutton2");
  GLADE_HOOKUP_OBJECT (pnee_pref, verbose_check, "verbose_check");
  GLADE_HOOKUP_OBJECT (pnee_pref, general_label, "general_label");
  GLADE_HOOKUP_OBJECT (pnee_pref, record_frame, "record_frame");
  GLADE_HOOKUP_OBJECT (pnee_pref, alignment4, "alignment4");
  GLADE_HOOKUP_OBJECT (pnee_pref, vbox4, "vbox4");
  GLADE_HOOKUP_OBJECT (pnee_pref, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (pnee_pref, rec_file_label, "rec_file_label");
  GLADE_HOOKUP_OBJECT (pnee_pref, entry3, "entry3");
  GLADE_HOOKUP_OBJECT (pnee_pref, rec_file_button, "rec_file_button");
  GLADE_HOOKUP_OBJECT (pnee_pref, hbox11, "hbox11");
  GLADE_HOOKUP_OBJECT (pnee_pref, hbox10, "hbox10");
  GLADE_HOOKUP_OBJECT (pnee_pref, nr_events_label, "nr_events_label");
  GLADE_HOOKUP_OBJECT (pnee_pref, spinbutton3, "spinbutton3");
  GLADE_HOOKUP_OBJECT (pnee_pref, hbox11b, "hbox11b");
  GLADE_HOOKUP_OBJECT (pnee_pref, grab_label, "grab_label");
  GLADE_HOOKUP_OBJECT (pnee_pref, entry5, "entry5");
  GLADE_HOOKUP_OBJECT (pnee_pref, record_label, "record_label");
  GLADE_HOOKUP_OBJECT (pnee_pref, replay_frame, "replay_frame");
  GLADE_HOOKUP_OBJECT (pnee_pref, alignment2, "alignment2");
  GLADE_HOOKUP_OBJECT (pnee_pref, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (pnee_pref, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (pnee_pref, repl_file_label, "repl_file_label");
  GLADE_HOOKUP_OBJECT (pnee_pref, rep_choose_but, "rep_choose_but");
  GLADE_HOOKUP_OBJECT (pnee_pref, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (pnee_pref, speed_check, "speed_check");
  GLADE_HOOKUP_OBJECT (pnee_pref, spinbutton1, "spinbutton1");
  GLADE_HOOKUP_OBJECT (pnee_pref, replay_label, "replay_label");
  GLADE_HOOKUP_OBJECT (pnee_pref, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (pnee_pref, alignment6, "alignment6");
  GLADE_HOOKUP_OBJECT (pnee_pref, hbox12, "hbox12");
  GLADE_HOOKUP_OBJECT (pnee_pref, log_label, "log_label");
  GLADE_HOOKUP_OBJECT (pnee_pref, log_entry, "log_entry");
  GLADE_HOOKUP_OBJECT (pnee_pref, log_button, "log_button");
  GLADE_HOOKUP_OBJECT (pnee_pref, log_frame, "log_frame");
  GLADE_HOOKUP_OBJECT (pnee_pref, setting_ok, "setting_ok");
  GLADE_HOOKUP_OBJECT (pnee_pref, settings_label, "settings_label");
  GLADE_HOOKUP_OBJECT_NO_REF (pnee_pref, tooltips, "tooltips");

  return pnee_pref;

create_filechooserdialog1 (void)
  GtkWidget *filechooserdialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *dialog_action_area1;
  GtkWidget *f_c_button;
  GtkWidget *f_open_button;

  filechooserdialog1 = gtk_file_chooser_dialog_new ("", NULL, GTK_FILE_CHOOSER_ACTION_SAVE, NULL);
  g_object_set (filechooserdialog1,
                "local-only", FALSE,
                "show-hidden", TRUE,
  gtk_window_set_type_hint (GTK_WINDOW (filechooserdialog1), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = GTK_DIALOG (filechooserdialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  dialog_action_area1 = GTK_DIALOG (filechooserdialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  f_c_button = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (f_c_button);
  gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog1), f_c_button, GTK_RESPONSE_CANCEL);

  f_open_button = gtk_button_new_from_stock ("gtk-open");
  gtk_widget_show (f_open_button);
  gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog1), f_open_button, GTK_RESPONSE_OK);

  g_signal_connect_swapped ((gpointer) f_c_button, "clicked",
                            G_CALLBACK (on_f_c_button_clicked),
                            GTK_OBJECT (f_c_button));
  g_signal_connect_swapped ((gpointer) f_open_button, "clicked",
                            G_CALLBACK (on_f_open_button_clicked),
                            GTK_OBJECT (f_open_button));

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog1, filechooserdialog1, "filechooserdialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog1, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (filechooserdialog1, f_c_button, "f_c_button");
  GLADE_HOOKUP_OBJECT (filechooserdialog1, f_open_button, "f_open_button");

  gtk_widget_grab_default (f_open_button);
  return filechooserdialog1;

create_pnee_about (void)
  GtkWidget *pnee_about;
  const gchar *authors[] = {
    "Henrik Sandklef <>",
  const gchar *documenters[] = {
    "Xnee manual and other docs are written by Henrik Sandklef <>",
  const gchar *artists[] = {
    "Luis Santander <>",
  /* TRANSLATORS: Replace this string with your names, one name per line. */
  gchar *translators = "None, \nplease contact if you want to contribute";
  GdkPixbuf *pnee_about_logo_pixbuf;
  GtkWidget *dialog_vbox2;

  pnee_about = gtk_about_dialog_new ();
  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (pnee_about), VERSION);
  gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (pnee_about), "Pnee");
  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (pnee_about), "\302\251 2005, 2006 Henrik Sandklef <>\n\302\251 2006 Luis Santander <> (Xnee logo)");
  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (pnee_about), "Pnee is a Gnome Panel Applet for GNU Xnee  \n....for more features check out gnee and cnee\n");
  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (pnee_about), "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n \n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n  \n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<>.\n\n\n\n                   GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n  This version of the GNU Lesser General Public License incorporates\nthe terms and conditions of version 3 of the GNU General Public\nLicense, supplemented by the additional permissions listed below.\n\n  0. Additional Definitions. \n\n  As used herein, \"this License\" refers to version 3 of the GNU Lesser\nGeneral Public License, and the \"GNU GPL\" refers to version 3 of the GNU\nGeneral Public License.\n\n  \"The Library\" refers to a covered work governed by this License,\nother than an Application or a Combined Work as defined below.\n\n  An \"Application\" is any work that makes use of an interface provided\nby the Library, but which is not otherwise based on the Library.\nDefining a subclass of a class defined by the Library is deemed a mode\nof using an interface provided by the Library.\n\n  A \"Combined Work\" is a work produced by combining or linking an\nApplication with the Library.  The particular version of the Library\nwith which the Combined Work was made is also called the \"Linked\nVersion\".\n\n  The \"Minimal Corresponding Source\" for a Combined Work means the\nCorresponding Source for the Combined Work, excluding any source code\nfor portions of the Combined Work that, considered in isolation, are\nbased on the Application, and not on the Linked Version.\n\n  The \"Corresponding Application Code\" for a Combined Work means the\nobject code and/or source code for the Application, including any data\nand utility programs needed for reproducing the Combined Work from the\nApplication, but excluding the System Libraries of the Combined Work.\n\n  1. Exception to Section 3 of the GNU GPL.\n\n  You may convey a covered work under sections 3 and 4 of this License\nwithout being bound by section 3 of the GNU GPL.\n\n  2. Conveying Modified Versions.\n\n  If you modify a copy of the Library, and, in your modifications, a\nfacility refers to a function or data to be supplied by an Application\nthat uses the facility (other than as an argument passed when the\nfacility is invoked), then you may convey a copy of the modified\nversion:\n\n   a) under this License, provided that you make a good faith effort to\n   ensure that, in the event an Application does not supply the\n   function or data, the facility still operates, and performs\n   whatever part of its purpose remains meaningful, or\n\n   b) under the GNU GPL, with none of the additional permissions of\n   this License applicable to that copy.\n\n  3. Object Code Incorporating Material from Library Header Files.\n\n  The object code form of an Application may incorporate material from\na header file that is part of the Library.  You may convey such object\ncode under terms of your choice, provided that, if the incorporated\nmaterial is not limited to numerical parameters, data structure\nlayouts and accessors, or small macros, inline functions and templates\n(ten or fewer lines in length), you do both of the following:\n\n   a) Give prominent notice with each copy of the object code that the\n   Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the object code with a copy of the GNU GPL and this license\n   document.\n\n  4. Combined Works.\n\n  You may convey a Combined Work under terms of your choice that,\ntaken together, effectively do not restrict modification of the\nportions of the Library contained in the Combined Work and reverse\nengineering for debugging such modifications, if you also do each of\nthe following:\n\n   a) Give prominent notice with each copy of the Combined Work that\n   the Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the Combined Work with a copy of the GNU GPL and this license\n   document.\n\n   c) For a Combined Work that displays copyright notices during\n   execution, include the copyright notice for the Library among\n   these notices, as well as a reference directing the user to the\n   copies of the GNU GPL and this license document.\n\n   d) Do one of the following:\n\n       0) Convey the Minimal Corresponding Source under the terms of this\n       License, and the Corresponding Application Code in a form\n       suitable for, and under terms that permit, the user to\n       recombine or relink the Application with a modified version of\n       the Linked Version to produce a modified Combined Work, in the\n       manner specified by section 6 of the GNU GPL for conveying\n       Corresponding Source.\n\n       1) Use a suitable shared library mechanism for linking with the\n       Library.  A suitable mechanism is one that (a) uses at run time\n       a copy of the Library already present on the user's computer\n       system, and (b) will operate properly with a modified version\n       of the Library that is interface-compatible with the Linked\n       Version. \n\n   e) Provide Installation Information, but only if you would otherwise\n   be required to provide such information under section 6 of the\n   GNU GPL, and only to the extent that such information is\n   necessary to install and execute a modified version of the\n   Combined Work produced by recombining or relinking the\n   Application with a modified version of the Linked Version. (If\n   you use option 4d0, the Installation Information must accompany\n   the Minimal Corresponding Source and Corresponding Application\n   Code. If you use option 4d1, you must provide the Installation\n   Information in the manner specified by section 6 of the GNU GPL\n   for conveying Corresponding Source.)\n\n  5. Combined Libraries.\n\n  You may place library facilities that are a work based on the\nLibrary side by side in a single library together with other library\nfacilities that are not Applications and are not covered by this\nLicense, and convey such a combined library under terms of your\nchoice, if you do both of the following:\n\n   a) Accompany the combined library with a copy of the same work based\n   on the Library, uncombined with any other library facilities,\n   conveyed under the terms of this License.\n\n   b) Give prominent notice with the combined library that part of it\n   is a work based on the Library, and explaining where to find the\n   accompanying uncombined form of the same work.\n\n  6. Revised Versions of the GNU Lesser General Public License.\n\n  The Free Software Foundation may publish revised and/or new versions\nof the GNU Lesser General Public License from time to time. Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.\n\n  Each version is given a distinguishing version number. If the\nLibrary as you received it specifies that a certain numbered version\nof the GNU Lesser General Public License \"or any later version\"\napplies to it, you have the option of following the terms and\nconditions either of that published version or of any later version\npublished by the Free Software Foundation. If the Library as you\nreceived it does not specify a version number of the GNU Lesser\nGeneral Public License, you may choose any version of the GNU Lesser\nGeneral Public License ever published by the Free Software Foundation.\n\n  If the Library as you received it specifies that a proxy can decide\nwhether future versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is\npermanent authorization for you to choose that version for the\nLibrary.\n");
  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (pnee_about), "");
  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (pnee_about), authors);
  gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (pnee_about), documenters);
  gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG (pnee_about), artists);
  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (pnee_about), translators);
  pnee_about_logo_pixbuf = create_pixbuf ("xnee.xpm");
  gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (pnee_about), pnee_about_logo_pixbuf);

  dialog_vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_container_add (GTK_CONTAINER (pnee_about), dialog_vbox2);

  g_signal_connect_swapped ((gpointer) pnee_about, "response",
                            G_CALLBACK (on_pnee_about_response),
                            GTK_OBJECT (pnee_about));

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (pnee_about, pnee_about, "pnee_about");
  GLADE_HOOKUP_OBJECT (pnee_about, dialog_vbox2, "dialog_vbox2");

  return pnee_about;

create_delay (void)
  GtkWidget *delay;
  GtkWidget *del_progr_win;
  GtkWidget *delay_progr;

  delay = gtk_window_new (GTK_WINDOW_POPUP);
  gtk_container_set_border_width (GTK_CONTAINER (delay), 3);
  gtk_window_set_title (GTK_WINDOW (delay), "pnee delay");
  gtk_window_set_position (GTK_WINDOW (delay), GTK_WIN_POS_CENTER);

  del_progr_win = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (del_progr_win);
  gtk_container_add (GTK_CONTAINER (delay), del_progr_win);

  delay_progr = gtk_progress_bar_new ();
  gtk_widget_show (delay_progr);
  gtk_box_pack_start (GTK_BOX (del_progr_win), delay_progr, FALSE, FALSE, 0);
  gtk_progress_bar_set_text (GTK_PROGRESS_BAR (delay_progr), "Delayd start of pnee");

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (delay, delay, "delay");
  GLADE_HOOKUP_OBJECT (delay, del_progr_win, "del_progr_win");
  GLADE_HOOKUP_OBJECT (delay, delay_progr, "delay_progr");

  return delay;

create_error_dialog (void)
  GtkWidget *error_dialog;
  GtkWidget *vbox5;
  GtkWidget *vbox6;
  GtkWidget *vbox7;
  GtkWidget *table2;
  GtkWidget *err_nr_label;
  GtkWidget *err_sol_label;
  GtkWidget *err_descr_label;
  GtkWidget *label9;
  GtkWidget *label8;
  GtkWidget *label7;
  GtkWidget *error_ok;

  error_dialog = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (error_dialog), "pnee - error");
  gtk_window_set_default_size (GTK_WINDOW (error_dialog), 120, -1);

  vbox5 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox5);
  gtk_container_add (GTK_CONTAINER (error_dialog), vbox5);

  vbox6 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox6);
  gtk_box_pack_start (GTK_BOX (vbox5), vbox6, TRUE, TRUE, 0);

  vbox7 = gtk_vbox_new (FALSE, 12);
  gtk_widget_show (vbox7);
  gtk_box_pack_start (GTK_BOX (vbox6), vbox7, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (vbox7), 12);

  table2 = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (table2);
  gtk_box_pack_start (GTK_BOX (vbox7), table2, TRUE, TRUE, 0);

  err_nr_label = gtk_label_new ("");
  gtk_widget_show (err_nr_label);
  gtk_table_attach (GTK_TABLE (table2), err_nr_label, 1, 2, 2, 3,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (err_nr_label), 0, 0.5);

  err_sol_label = gtk_label_new ("");
  gtk_widget_show (err_sol_label);
  gtk_table_attach (GTK_TABLE (table2), err_sol_label, 1, 2, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (err_sol_label), 0, 0.5);

  err_descr_label = gtk_label_new ("");
  gtk_widget_show (err_descr_label);
  gtk_table_attach (GTK_TABLE (table2), err_descr_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (err_descr_label), 0, 0.5);

  label9 = gtk_label_new ("<b>Number</b>");
  gtk_widget_show (label9);
  gtk_table_attach (GTK_TABLE (table2), label9, 0, 1, 2, 3,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label9), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5);

  label8 = gtk_label_new ("<b>Solution</b>");
  gtk_widget_show (label8);
  gtk_table_attach (GTK_TABLE (table2), label8, 0, 1, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label8), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);

  label7 = gtk_label_new ("<b>Description</b>");
  gtk_widget_show (label7);
  gtk_table_attach (GTK_TABLE (table2), label7, 0, 1, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label7), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);

  error_ok = gtk_button_new_with_mnemonic ("OK");
  gtk_widget_show (error_ok);
  gtk_box_pack_start (GTK_BOX (vbox5), error_ok, FALSE, FALSE, 0);

  g_signal_connect_swapped ((gpointer) error_ok, "clicked",
                            G_CALLBACK (on_error_ok_clicked),
                            GTK_OBJECT (error_dialog));

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, error_dialog, "error_dialog");
  GLADE_HOOKUP_OBJECT (error_dialog, vbox5, "vbox5");
  GLADE_HOOKUP_OBJECT (error_dialog, vbox6, "vbox6");
  GLADE_HOOKUP_OBJECT (error_dialog, vbox7, "vbox7");
  GLADE_HOOKUP_OBJECT (error_dialog, table2, "table2");
  GLADE_HOOKUP_OBJECT (error_dialog, err_nr_label, "err_nr_label");
  GLADE_HOOKUP_OBJECT (error_dialog, err_sol_label, "err_sol_label");
  GLADE_HOOKUP_OBJECT (error_dialog, err_descr_label, "err_descr_label");
  GLADE_HOOKUP_OBJECT (error_dialog, label9, "label9");
  GLADE_HOOKUP_OBJECT (error_dialog, label8, "label8");
  GLADE_HOOKUP_OBJECT (error_dialog, label7, "label7");
  GLADE_HOOKUP_OBJECT (error_dialog, error_ok, "error_ok");

  return error_dialog;