/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include "callbacks.h" #include "interface.h" #include "support.h" GtkWidget *node_width_spinbutton; GtkWidget *node_height_spinbutton; GtkWidget *node_mass_spinbutton; GtkWidget *node_charge_spinbutton; GtkWidget *spring_length_spinbutton; GtkWidget *spring_constant_spinbutton; GtkWidget *max_sa_movement_spinbutton; GtkWidget *statusbar1; GtkWidget *drawingarea1; GtkWidget *scrolledwindow1; GtkWidget *draw_nodes_togglebutton; GtkWidget *draw_springs_togglebutton; GtkWidget *hide_layers_spinbutton; GtkWidget *notice_popup_window; GtkWidget* create_window1 (void) { GtkWidget *window1; GtkWidget *vbox1; GtkWidget *menubar1; GtkWidget *file1; GtkWidget *file1_menu; GtkAccelGroup *file1_menu_accels; GtkWidget *new1; GtkWidget *open1; GtkWidget *save1; GtkWidget *save_as1; GtkWidget *import1; GtkWidget *export_as_visio1; GtkWidget *export_as_postscript1; /* GtkWidget *export_as_gif1; */ GtkWidget *quit1; GtkWidget *handlebox1; GtkWidget *toolbar1; GtkWidget *tmp_toolbar_icon; GtkWidget *new_button; GtkWidget *open_button; GtkWidget *save_button; GtkWidget *saveas_button; GtkWidget *import_button; GtkWidget *savevisio_button; GtkWidget *saveps_button; /* GtkWidget *savegif_button; */ GtkWidget *quit_button; GtkWidget *hbox1; GtkWidget *handlebox2; GtkWidget *table1; GtkWidget *label3; GtkWidget *label2; GtkWidget *go_stop_button; GtkWidget *hseparator4; GtkObject *node_height_spinbutton_adj; GtkObject *node_mass_spinbutton_adj; GtkObject *spring_length_spinbutton_adj; GtkObject *spring_constant_spinbutton_adj; GtkObject *node_width_spinbutton_adj; GtkWidget *label4; GtkWidget *label5; GtkWidget *label6; GtkWidget *label7; GtkWidget *label8; GtkWidget *label9; GtkWidget *hseparator5; GtkWidget *hseparator7; GtkObject *node_charge_spinbutton_adj; GtkWidget *hseparator1; GtkWidget *label18; GtkWidget *label19; GtkObject *max_sa_movement_spinbutton_adj; GtkWidget *hseparator10; GtkWidget *label20; GtkObject *hide_layers_spinbutton_adj; GtkWidget *hseparator11; GtkWidget *alignment1; GtkWidget *alignment2; GtkWidget *viewport1; GtkAccelGroup *accel_group; accel_group = gtk_accel_group_new (); window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_object_set_data (GTK_OBJECT (window1), "window1", window1); gtk_window_set_title (GTK_WINDOW (window1), _("graphopt")); gtk_window_set_default_size (GTK_WINDOW (window1), 700, 564); gtk_window_set_policy (GTK_WINDOW (window1), TRUE, TRUE, TRUE); vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox1); gtk_object_set_data_full (GTK_OBJECT (window1), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox1); gtk_container_add (GTK_CONTAINER (window1), vbox1); menubar1 = gtk_menu_bar_new (); gtk_widget_ref (menubar1); gtk_object_set_data_full (GTK_OBJECT (window1), "menubar1", menubar1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menubar1); gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0); file1 = gtk_menu_item_new_with_label (_("File")); gtk_widget_ref (file1); gtk_object_set_data_full (GTK_OBJECT (window1), "file1", file1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (file1); gtk_container_add (GTK_CONTAINER (menubar1), file1); file1_menu = gtk_menu_new (); gtk_widget_ref (file1_menu); gtk_object_set_data_full (GTK_OBJECT (window1), "file1_menu", file1_menu, (GtkDestroyNotify) gtk_widget_unref); gtk_menu_item_set_submenu (GTK_MENU_ITEM (file1), file1_menu); file1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (file1_menu)); new1 = gtk_menu_item_new_with_label (_("New")); gtk_widget_ref (new1); gtk_object_set_data_full (GTK_OBJECT (window1), "new1", new1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (new1); gtk_container_add (GTK_CONTAINER (file1_menu), new1); gtk_widget_add_accelerator (new1, "activate", accel_group, GDK_N, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); open1 = gtk_menu_item_new_with_label (_("Open...")); gtk_widget_ref (open1); gtk_object_set_data_full (GTK_OBJECT (window1), "open1", open1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (open1); gtk_container_add (GTK_CONTAINER (file1_menu), open1); gtk_widget_add_accelerator (open1, "activate", accel_group, GDK_O, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); save1 = gtk_menu_item_new_with_label (_("Save")); gtk_widget_ref (save1); gtk_object_set_data_full (GTK_OBJECT (window1), "save1", save1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (save1); gtk_container_add (GTK_CONTAINER (file1_menu), save1); gtk_widget_add_accelerator (save1, "activate", accel_group, GDK_S, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); save_as1 = gtk_menu_item_new_with_label (_("Save As...")); gtk_widget_ref (save_as1); gtk_object_set_data_full (GTK_OBJECT (window1), "save_as1", save_as1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (save_as1); gtk_container_add (GTK_CONTAINER (file1_menu), save_as1); gtk_widget_add_accelerator (save_as1, "activate", accel_group, GDK_A, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); import1 = gtk_menu_item_new_with_label (_("Import dot file...")); gtk_widget_ref (import1); gtk_object_set_data_full (GTK_OBJECT (window1), "import1", import1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (import1); gtk_container_add (GTK_CONTAINER (file1_menu), import1); export_as_visio1 = gtk_menu_item_new_with_label (_("Export as Visio...")); gtk_widget_ref (export_as_visio1); gtk_object_set_data_full (GTK_OBJECT (window1), "export_as_visio1", export_as_visio1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (export_as_visio1); gtk_container_add (GTK_CONTAINER (file1_menu), export_as_visio1); export_as_postscript1 = gtk_menu_item_new_with_label (_("Export as Postscript...")); gtk_widget_ref (export_as_postscript1); gtk_object_set_data_full (GTK_OBJECT (window1), "export_as_postscript1", export_as_postscript1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (export_as_postscript1); gtk_container_add (GTK_CONTAINER (file1_menu), export_as_postscript1); /* export_as_gif1 = gtk_menu_item_new_with_label (_("Export as GIF...")); */ /* gtk_widget_ref (export_as_gif1); */ /* gtk_object_set_data_full (GTK_OBJECT (window1), "export_as_gif1", export_as_gif1, */ /* (GtkDestroyNotify) gtk_widget_unref); */ /* gtk_widget_show (export_as_gif1); */ /* gtk_container_add (GTK_CONTAINER (file1_menu), export_as_gif1); */ quit1 = gtk_menu_item_new_with_label (_("Quit")); gtk_widget_ref (quit1); gtk_object_set_data_full (GTK_OBJECT (window1), "quit1", quit1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (quit1); gtk_container_add (GTK_CONTAINER (file1_menu), quit1); gtk_widget_add_accelerator (quit1, "activate", accel_group, GDK_Q, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); handlebox1 = gtk_handle_box_new (); gtk_widget_ref (handlebox1); gtk_object_set_data_full (GTK_OBJECT (window1), "handlebox1", handlebox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (handlebox1); gtk_box_pack_start (GTK_BOX (vbox1), handlebox1, FALSE, TRUE, 0); toolbar1 = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); gtk_widget_ref (toolbar1); gtk_object_set_data_full (GTK_OBJECT (window1), "toolbar1", toolbar1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar1); gtk_container_add (GTK_CONTAINER (handlebox1), toolbar1); tmp_toolbar_icon = create_pixmap (window1, "new.xpm"); new_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("New"), _("New"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (new_button); gtk_object_set_data_full (GTK_OBJECT (window1), "new_button", new_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (new_button); tmp_toolbar_icon = create_pixmap (window1, "open.xpm"); open_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Open"), _("Open"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (open_button); gtk_object_set_data_full (GTK_OBJECT (window1), "open_button", open_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (open_button); tmp_toolbar_icon = create_pixmap (window1, "save.xpm"); save_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Save"), _("Save"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (save_button); gtk_object_set_data_full (GTK_OBJECT (window1), "save_button", save_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (save_button); tmp_toolbar_icon = create_pixmap (window1, "save_as.xpm"); saveas_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Save As"), _("Save As"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (saveas_button); gtk_object_set_data_full (GTK_OBJECT (window1), "saveas_button", saveas_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (saveas_button); tmp_toolbar_icon = create_pixmap (window1, "import.xpm"); import_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Import dot file"), _("Import dot file"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (import_button); gtk_object_set_data_full (GTK_OBJECT (window1), "import_button", import_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (import_button); tmp_toolbar_icon = create_pixmap (window1, "export.xpm"); savevisio_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Export to Visio"), _("Export to Visio"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (savevisio_button); gtk_object_set_data_full (GTK_OBJECT (window1), "savevisio_button", savevisio_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (savevisio_button); tmp_toolbar_icon = create_pixmap (window1, "export.xpm"); saveps_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Export as Postscript"), _("Export as Postscript"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (saveps_button); gtk_object_set_data_full (GTK_OBJECT (window1), "saveps_button", saveps_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (saveps_button); /* tmp_toolbar_icon = create_pixmap (window1, "export.xpm"); */ /* savegif_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), */ /* GTK_TOOLBAR_CHILD_BUTTON, */ /* NULL, */ /* _("Save As GIF"), */ /* _("Save As GIF"), NULL, */ /* tmp_toolbar_icon, NULL, NULL); */ /* gtk_widget_ref (savegif_button); */ /* gtk_object_set_data_full (GTK_OBJECT (window1), "savegif_button", savegif_button, */ /* (GtkDestroyNotify) gtk_widget_unref); */ /* gtk_widget_show (savegif_button); */ tmp_toolbar_icon = create_pixmap (window1, "quit.xpm"); quit_button = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Quit"), _("Quit"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (quit_button); gtk_object_set_data_full (GTK_OBJECT (window1), "quit_button", quit_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (quit_button); hbox1 = gtk_hbox_new (FALSE, 0); gtk_widget_ref (hbox1); gtk_object_set_data_full (GTK_OBJECT (window1), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0); handlebox2 = gtk_handle_box_new (); gtk_widget_ref (handlebox2); gtk_object_set_data_full (GTK_OBJECT (window1), "handlebox2", handlebox2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (handlebox2); gtk_box_pack_start (GTK_BOX (hbox1), handlebox2, FALSE, TRUE, 0); gtk_handle_box_set_snap_edge (GTK_HANDLE_BOX (handlebox2), GTK_POS_LEFT); table1 = gtk_table_new (20, 2, FALSE); gtk_widget_ref (table1); gtk_object_set_data_full (GTK_OBJECT (window1), "table1", table1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table1); gtk_container_add (GTK_CONTAINER (handlebox2), table1); gtk_container_set_border_width (GTK_CONTAINER (table1), 2); label3 = gtk_label_new (_("Spring Properties")); gtk_widget_ref (label3); gtk_object_set_data_full (GTK_OBJECT (window1), "label3", label3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label3); gtk_table_attach (GTK_TABLE (table1), label3, 0, 2, 7, 8, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); label2 = gtk_label_new (_("Node Properties")); gtk_widget_ref (label2); gtk_object_set_data_full (GTK_OBJECT (window1), "label2", label2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label2); gtk_table_attach (GTK_TABLE (table1), label2, 0, 2, 1, 2, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); go_stop_button = gtk_button_new_with_label (_("Go")); gtk_widget_ref (go_stop_button); gtk_object_set_data_full (GTK_OBJECT (window1), "go_stop_button", go_stop_button, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (go_stop_button); gtk_table_attach (GTK_TABLE (table1), go_stop_button, 0, 2, 18, 19, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); hseparator4 = gtk_hseparator_new (); gtk_widget_ref (hseparator4); gtk_object_set_data_full (GTK_OBJECT (window1), "hseparator4", hseparator4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hseparator4); gtk_table_attach (GTK_TABLE (table1), hseparator4, 0, 2, 19, 20, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_usize (hseparator4, -2, 20); node_height_spinbutton_adj = gtk_adjustment_new (15, 0, 100, 1, 10, 10); node_height_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (node_height_spinbutton_adj), 1e-05, 0); gtk_widget_ref (node_height_spinbutton); gtk_object_set_data_full (GTK_OBJECT (window1), "node_height_spinbutton", node_height_spinbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (node_height_spinbutton); gtk_table_attach (GTK_TABLE (table1), node_height_spinbutton, 1, 2, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (node_height_spinbutton), TRUE); node_mass_spinbutton_adj = gtk_adjustment_new (30, 0, 100, 0.1, 10, 10); node_mass_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (node_mass_spinbutton_adj), 0.001, 1); gtk_widget_ref (node_mass_spinbutton); gtk_object_set_data_full (GTK_OBJECT (window1), "node_mass_spinbutton", node_mass_spinbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (node_mass_spinbutton); gtk_table_attach (GTK_TABLE (table1), node_mass_spinbutton, 1, 2, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (node_mass_spinbutton), TRUE); spring_length_spinbutton_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10); spring_length_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (spring_length_spinbutton_adj), 0.001, 0); gtk_widget_ref (spring_length_spinbutton); gtk_object_set_data_full (GTK_OBJECT (window1), "spring_length_spinbutton", spring_length_spinbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (spring_length_spinbutton); gtk_table_attach (GTK_TABLE (table1), spring_length_spinbutton, 1, 2, 8, 9, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spring_length_spinbutton), TRUE); spring_constant_spinbutton_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10); spring_constant_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (spring_constant_spinbutton_adj), 0.001, 0); gtk_widget_ref (spring_constant_spinbutton); gtk_object_set_data_full (GTK_OBJECT (window1), "spring_constant_spinbutton", spring_constant_spinbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (spring_constant_spinbutton); gtk_table_attach (GTK_TABLE (table1), spring_constant_spinbutton, 1, 2, 9, 10, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spring_constant_spinbutton), TRUE); node_width_spinbutton_adj = gtk_adjustment_new (15, 0, 100, 1, 10, 10); node_width_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (node_width_spinbutton_adj), 1e-05, 0); gtk_widget_ref (node_width_spinbutton); gtk_object_set_data_full (GTK_OBJECT (window1), "node_width_spinbutton", node_width_spinbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (node_width_spinbutton); gtk_table_attach (GTK_TABLE (table1), node_width_spinbutton, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_usize (node_width_spinbutton, 45, -2); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (node_width_spinbutton), TRUE); label4 = gtk_label_new (_("Width")); gtk_widget_ref (label4); gtk_object_set_data_full (GTK_OBJECT (window1), "label4", label4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label4); gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label4), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label4), 5, 0); label5 = gtk_label_new (_("Height")); gtk_widget_ref (label5); gtk_object_set_data_full (GTK_OBJECT (window1), "label5", label5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label5); gtk_table_attach (GTK_TABLE (table1), label5, 0, 1, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label5), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label5), 5, 0); label6 = gtk_label_new (_("Mass")); gtk_widget_ref (label6); gtk_object_set_data_full (GTK_OBJECT (window1), "label6", label6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label6); gtk_table_attach (GTK_TABLE (table1), label6, 0, 1, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label6), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label6), 5, 0); label7 = gtk_label_new (_("Charge")); gtk_widget_ref (label7); gtk_object_set_data_full (GTK_OBJECT (window1), "label7", label7, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label7); gtk_table_attach (GTK_TABLE (table1), label7, 0, 1, 5, 6, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label7), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label7), 5, 0); label8 = gtk_label_new (_("Ideal Length")); gtk_widget_ref (label8); gtk_object_set_data_full (GTK_OBJECT (window1), "label8", label8, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label8); gtk_table_attach (GTK_TABLE (table1), label8, 0, 1, 8, 9, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label8), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label8), 5, 0); label9 = gtk_label_new (_("Constant")); gtk_widget_ref (label9); gtk_object_set_data_full (GTK_OBJECT (window1), "label9", label9, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label9); gtk_table_attach (GTK_TABLE (table1), label9, 0, 1, 9, 10, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label9), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label9), 5, 0); hseparator5 = gtk_hseparator_new (); gtk_widget_ref (hseparator5); gtk_object_set_data_full (GTK_OBJECT (window1), "hseparator5", hseparator5, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hseparator5); gtk_table_attach (GTK_TABLE (table1), hseparator5, 0, 2, 6, 7, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_usize (hseparator5, -2, 20); hseparator7 = gtk_hseparator_new (); gtk_widget_ref (hseparator7); gtk_object_set_data_full (GTK_OBJECT (window1), "hseparator7", hseparator7, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hseparator7); gtk_table_attach (GTK_TABLE (table1), hseparator7, 0, 2, 10, 11, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_usize (hseparator7, -2, 20); node_charge_spinbutton_adj = gtk_adjustment_new (0.001, 0, 100, 1e-04, 0.001, 10); node_charge_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (node_charge_spinbutton_adj), 0.001, 4); gtk_widget_ref (node_charge_spinbutton); gtk_object_set_data_full (GTK_OBJECT (window1), "node_charge_spinbutton", node_charge_spinbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (node_charge_spinbutton); gtk_table_attach (GTK_TABLE (table1), node_charge_spinbutton, 1, 2, 5, 6, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_widget_set_usize (node_charge_spinbutton, 63, -2); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (node_charge_spinbutton), TRUE); hseparator1 = gtk_hseparator_new (); gtk_widget_ref (hseparator1); gtk_object_set_data_full (GTK_OBJECT (window1), "hseparator1", hseparator1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hseparator1); gtk_table_attach (GTK_TABLE (table1), hseparator1, 0, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_usize (hseparator1, -2, 20); label18 = gtk_label_new (_("Maximum Single-Axis")); gtk_widget_ref (label18); gtk_object_set_data_full (GTK_OBJECT (window1), "label18", label18, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label18); gtk_table_attach (GTK_TABLE (table1), label18, 0, 2, 11, 12, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); label19 = gtk_label_new (_("Movement")); gtk_widget_ref (label19); gtk_object_set_data_full (GTK_OBJECT (window1), "label19", label19, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label19); gtk_table_attach (GTK_TABLE (table1), label19, 0, 1, 12, 13, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (label19), 1, 0.5); gtk_misc_set_padding (GTK_MISC (label19), 5, 0); max_sa_movement_spinbutton_adj = gtk_adjustment_new (5, 0, 100, 1, 10, 10); max_sa_movement_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (max_sa_movement_spinbutton_adj), 0.001, 0); gtk_widget_ref (max_sa_movement_spinbutton); gtk_object_set_data_full (GTK_OBJECT (window1), "max_sa_movement_spinbutton", max_sa_movement_spinbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (max_sa_movement_spinbutton); gtk_table_attach (GTK_TABLE (table1), max_sa_movement_spinbutton, 1, 2, 12, 13, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (max_sa_movement_spinbutton), TRUE); hseparator10 = gtk_hseparator_new (); gtk_widget_ref (hseparator10); gtk_object_set_data_full (GTK_OBJECT (window1), "hseparator10", hseparator10, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hseparator10); gtk_table_attach (GTK_TABLE (table1), hseparator10, 0, 2, 13, 14, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_usize (hseparator10, -2, 20); label20 = gtk_label_new (_("Hide Layers")); gtk_widget_ref (label20); gtk_object_set_data_full (GTK_OBJECT (window1), "label20", label20, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label20); gtk_table_attach (GTK_TABLE (table1), label20, 0, 1, 14, 15, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); hide_layers_spinbutton_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10); hide_layers_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (hide_layers_spinbutton_adj), 0.001, 0); gtk_widget_ref (hide_layers_spinbutton); gtk_object_set_data_full (GTK_OBJECT (window1), "hide_layers_spinbutton", hide_layers_spinbutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hide_layers_spinbutton); gtk_table_attach (GTK_TABLE (table1), hide_layers_spinbutton, 1, 2, 14, 15, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (hide_layers_spinbutton), TRUE); hseparator11 = gtk_hseparator_new (); gtk_widget_ref (hseparator11); gtk_object_set_data_full (GTK_OBJECT (window1), "hseparator11", hseparator11, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hseparator11); gtk_table_attach (GTK_TABLE (table1), hseparator11, 0, 2, 17, 18, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_widget_set_usize (hseparator11, -2, 20); alignment1 = gtk_alignment_new (0.500001, 0.5, 0, 1); gtk_widget_ref (alignment1); gtk_object_set_data_full (GTK_OBJECT (window1), "alignment1", alignment1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (alignment1); gtk_table_attach (GTK_TABLE (table1), alignment1, 0, 2, 15, 16, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); draw_nodes_togglebutton = gtk_check_button_new_with_label (_("Draw Nodes")); gtk_widget_ref (draw_nodes_togglebutton); gtk_object_set_data_full (GTK_OBJECT (window1), "draw_nodes_togglebutton", draw_nodes_togglebutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (draw_nodes_togglebutton); gtk_container_add (GTK_CONTAINER (alignment1), draw_nodes_togglebutton); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (draw_nodes_togglebutton), TRUE); alignment2 = gtk_alignment_new (0.5, 0.5, 0, 1); gtk_widget_ref (alignment2); gtk_object_set_data_full (GTK_OBJECT (window1), "alignment2", alignment2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (alignment2); gtk_table_attach (GTK_TABLE (table1), alignment2, 0, 2, 16, 17, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); draw_springs_togglebutton = gtk_check_button_new_with_label (_("Draw Springs")); gtk_widget_ref (draw_springs_togglebutton); gtk_object_set_data_full (GTK_OBJECT (window1), "draw_springs_togglebutton", draw_springs_togglebutton, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (draw_springs_togglebutton); gtk_container_add (GTK_CONTAINER (alignment2), draw_springs_togglebutton); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (draw_springs_togglebutton), TRUE); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow1); gtk_object_set_data_full (GTK_OBJECT (window1), "scrolledwindow1", scrolledwindow1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow1, TRUE, TRUE, 0); viewport1 = gtk_viewport_new (NULL, NULL); gtk_widget_ref (viewport1); gtk_object_set_data_full (GTK_OBJECT (window1), "viewport1", viewport1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (viewport1); gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); gtk_widget_set_usize (viewport1, 137, 137); drawingarea1 = gtk_drawing_area_new (); gtk_widget_ref (drawingarea1); gtk_object_set_data_full (GTK_OBJECT (window1), "drawingarea1", drawingarea1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (drawingarea1); gtk_container_add (GTK_CONTAINER (viewport1), drawingarea1); gtk_widget_set_usize (drawingarea1, 137, 137); statusbar1 = gtk_statusbar_new (); gtk_widget_ref (statusbar1); gtk_object_set_data_full (GTK_OBJECT (window1), "statusbar1", statusbar1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (statusbar1); gtk_box_pack_start (GTK_BOX (vbox1), statusbar1, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (window1), "destroy", GTK_SIGNAL_FUNC (on_window1_destroy), NULL); gtk_signal_connect (GTK_OBJECT (new1), "activate", GTK_SIGNAL_FUNC (on_new1_activate), NULL); gtk_signal_connect (GTK_OBJECT (open1), "activate", GTK_SIGNAL_FUNC (on_open1_activate), NULL); gtk_signal_connect (GTK_OBJECT (save1), "activate", GTK_SIGNAL_FUNC (on_save1_activate), NULL); gtk_signal_connect (GTK_OBJECT (save_as1), "activate", GTK_SIGNAL_FUNC (on_save_as1_activate), NULL); gtk_signal_connect (GTK_OBJECT (import1), "activate", GTK_SIGNAL_FUNC (on_import1_activate), NULL); gtk_signal_connect (GTK_OBJECT (export_as_visio1), "activate", GTK_SIGNAL_FUNC (on_export_as_visio1_activate), NULL); gtk_signal_connect (GTK_OBJECT (export_as_postscript1), "activate", GTK_SIGNAL_FUNC (on_export_as_postscript1_activate), NULL); /* gtk_signal_connect (GTK_OBJECT (export_as_gif1), "activate", */ /* GTK_SIGNAL_FUNC (on_export_as_gif1_activate), */ /* NULL); */ gtk_signal_connect (GTK_OBJECT (quit1), "activate", GTK_SIGNAL_FUNC (on_quit1_activate), NULL); gtk_signal_connect (GTK_OBJECT (new_button), "clicked", GTK_SIGNAL_FUNC (on_new_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (open_button), "clicked", GTK_SIGNAL_FUNC (on_open_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (save_button), "clicked", GTK_SIGNAL_FUNC (on_save_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (saveas_button), "clicked", GTK_SIGNAL_FUNC (on_saveas_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (import_button), "clicked", GTK_SIGNAL_FUNC (on_import_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (savevisio_button), "clicked", GTK_SIGNAL_FUNC (on_savevisio_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (saveps_button), "clicked", GTK_SIGNAL_FUNC (on_saveps_button_clicked), NULL); /* gtk_signal_connect (GTK_OBJECT (savegif_button), "clicked", */ /* GTK_SIGNAL_FUNC (on_savegif_button_clicked), */ /* NULL); */ gtk_signal_connect (GTK_OBJECT (quit_button), "clicked", GTK_SIGNAL_FUNC (on_quit_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (go_stop_button), "clicked", GTK_SIGNAL_FUNC (on_go_stop_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (node_height_spinbutton), "changed", GTK_SIGNAL_FUNC (on_node_height_spinbutton_changed), NULL); gtk_signal_connect (GTK_OBJECT (node_mass_spinbutton), "changed", GTK_SIGNAL_FUNC (on_node_mass_spinbutton_changed), NULL); gtk_signal_connect (GTK_OBJECT (spring_length_spinbutton), "changed", GTK_SIGNAL_FUNC (on_spring_length_spinbutton_changed), NULL); gtk_signal_connect (GTK_OBJECT (spring_constant_spinbutton), "changed", GTK_SIGNAL_FUNC (on_spring_constant_spinbutton_changed), NULL); gtk_signal_connect (GTK_OBJECT (node_width_spinbutton), "changed", GTK_SIGNAL_FUNC (on_node_width_spinbutton_changed), NULL); gtk_signal_connect (GTK_OBJECT (node_charge_spinbutton), "changed", GTK_SIGNAL_FUNC (on_node_charge_spinbutton_changed), NULL); gtk_signal_connect (GTK_OBJECT (max_sa_movement_spinbutton), "changed", GTK_SIGNAL_FUNC (on_max_sa_movement_spinbutton_changed), NULL); gtk_signal_connect (GTK_OBJECT (hide_layers_spinbutton), "changed", GTK_SIGNAL_FUNC (on_hide_layers_spinbutton_changed), NULL); gtk_signal_connect (GTK_OBJECT (draw_nodes_togglebutton), "toggled", GTK_SIGNAL_FUNC (on_draw_nodes_togglebutton_toggled), NULL); gtk_signal_connect (GTK_OBJECT (draw_springs_togglebutton), "toggled", GTK_SIGNAL_FUNC (on_draw_springs_togglebutton_toggled), NULL); gtk_signal_connect (GTK_OBJECT (viewport1), "button_press_event", GTK_SIGNAL_FUNC (on_viewport1_button_press_event), NULL); gtk_signal_connect (GTK_OBJECT (viewport1), "button_release_event", GTK_SIGNAL_FUNC (on_viewport1_button_release_event), NULL); gtk_signal_connect (GTK_OBJECT (viewport1), "motion_notify_event", GTK_SIGNAL_FUNC (on_viewport1_motion_notify_event), NULL); gtk_signal_connect (GTK_OBJECT (drawingarea1), "expose_event", GTK_SIGNAL_FUNC (on_drawingarea1_expose_event), NULL); gtk_signal_connect (GTK_OBJECT (drawingarea1), "button_press_event", GTK_SIGNAL_FUNC (on_drawingarea1_button_press_event), NULL); gtk_signal_connect (GTK_OBJECT (drawingarea1), "drag_begin", GTK_SIGNAL_FUNC (on_drawingarea1_drag_begin), NULL); gtk_signal_connect (GTK_OBJECT (drawingarea1), "drag_end", GTK_SIGNAL_FUNC (on_drawingarea1_drag_end), NULL); gtk_window_add_accel_group (GTK_WINDOW (window1), accel_group); return window1; } GtkWidget* create_open_fileselection (void) { GtkWidget *open_fileselection; GtkWidget *openfile_ok_button; GtkWidget *openfile_cancel_button; open_fileselection = gtk_file_selection_new (_("Open File")); gtk_object_set_data (GTK_OBJECT (open_fileselection), "open_fileselection", open_fileselection); gtk_container_set_border_width (GTK_CONTAINER (open_fileselection), 10); GTK_WINDOW (open_fileselection)->type = GTK_WINDOW_DIALOG; openfile_ok_button = GTK_FILE_SELECTION (open_fileselection)->ok_button; gtk_object_set_data (GTK_OBJECT (open_fileselection), "openfile_ok_button", openfile_ok_button); gtk_widget_show (openfile_ok_button); GTK_WIDGET_SET_FLAGS (openfile_ok_button, GTK_CAN_DEFAULT); openfile_cancel_button = GTK_FILE_SELECTION (open_fileselection)->cancel_button; gtk_object_set_data (GTK_OBJECT (open_fileselection), "openfile_cancel_button", openfile_cancel_button); gtk_widget_show (openfile_cancel_button); GTK_WIDGET_SET_FLAGS (openfile_cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (openfile_ok_button), "clicked", GTK_SIGNAL_FUNC (on_openfile_ok_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (openfile_cancel_button), "clicked", GTK_SIGNAL_FUNC (on_openfile_cancel_button_clicked), NULL); return open_fileselection; } GtkWidget* create_saveas_fileselection (void) { GtkWidget *saveas_fileselection; GtkWidget *saveasfile_ok_button; GtkWidget *saveasfile_cancel_button; saveas_fileselection = gtk_file_selection_new (_("Save As...")); gtk_object_set_data (GTK_OBJECT (saveas_fileselection), "saveas_fileselection", saveas_fileselection); gtk_container_set_border_width (GTK_CONTAINER (saveas_fileselection), 10); GTK_WINDOW (saveas_fileselection)->type = GTK_WINDOW_DIALOG; saveasfile_ok_button = GTK_FILE_SELECTION (saveas_fileselection)->ok_button; gtk_object_set_data (GTK_OBJECT (saveas_fileselection), "saveasfile_ok_button", saveasfile_ok_button); gtk_widget_show (saveasfile_ok_button); GTK_WIDGET_SET_FLAGS (saveasfile_ok_button, GTK_CAN_DEFAULT); saveasfile_cancel_button = GTK_FILE_SELECTION (saveas_fileselection)->cancel_button; gtk_object_set_data (GTK_OBJECT (saveas_fileselection), "saveasfile_cancel_button", saveasfile_cancel_button); gtk_widget_show (saveasfile_cancel_button); GTK_WIDGET_SET_FLAGS (saveasfile_cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (saveasfile_ok_button), "clicked", GTK_SIGNAL_FUNC (on_saveasfile_ok_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (saveasfile_cancel_button), "clicked", GTK_SIGNAL_FUNC (on_saveasfile_cancel_button_clicked), NULL); return saveas_fileselection; } GtkWidget* create_import_fileselection (void) { GtkWidget *import_fileselection; GtkWidget *importfile_ok_button; GtkWidget *importfile_cancel_button; import_fileselection = gtk_file_selection_new (_("Import File...")); gtk_object_set_data (GTK_OBJECT (import_fileselection), "import_fileselection", import_fileselection); gtk_container_set_border_width (GTK_CONTAINER (import_fileselection), 10); GTK_WINDOW (import_fileselection)->type = GTK_WINDOW_DIALOG; importfile_ok_button = GTK_FILE_SELECTION (import_fileselection)->ok_button; gtk_object_set_data (GTK_OBJECT (import_fileselection), "importfile_ok_button", importfile_ok_button); gtk_widget_show (importfile_ok_button); GTK_WIDGET_SET_FLAGS (importfile_ok_button, GTK_CAN_DEFAULT); importfile_cancel_button = GTK_FILE_SELECTION (import_fileselection)->cancel_button; gtk_object_set_data (GTK_OBJECT (import_fileselection), "importfile_cancel_button", importfile_cancel_button); gtk_widget_show (importfile_cancel_button); GTK_WIDGET_SET_FLAGS (importfile_cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (importfile_ok_button), "clicked", GTK_SIGNAL_FUNC (on_importfile_ok_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (importfile_cancel_button), "clicked", GTK_SIGNAL_FUNC (on_importfile_cancel_button_clicked), NULL); return import_fileselection; } GtkWidget* create_exportvisio_fileselection (void) { GtkWidget *exportvisio_fileselection; GtkWidget *exportvisiofile_ok_button; GtkWidget *exportvisiofile_cancel_button; exportvisio_fileselection = gtk_file_selection_new (_("Export to Visio")); gtk_object_set_data (GTK_OBJECT (exportvisio_fileselection), "exportvisio_fileselection", exportvisio_fileselection); gtk_container_set_border_width (GTK_CONTAINER (exportvisio_fileselection), 10); GTK_WINDOW (exportvisio_fileselection)->type = GTK_WINDOW_DIALOG; exportvisiofile_ok_button = GTK_FILE_SELECTION (exportvisio_fileselection)->ok_button; gtk_object_set_data (GTK_OBJECT (exportvisio_fileselection), "exportvisiofile_ok_button", exportvisiofile_ok_button); gtk_widget_show (exportvisiofile_ok_button); GTK_WIDGET_SET_FLAGS (exportvisiofile_ok_button, GTK_CAN_DEFAULT); exportvisiofile_cancel_button = GTK_FILE_SELECTION (exportvisio_fileselection)->cancel_button; gtk_object_set_data (GTK_OBJECT (exportvisio_fileselection), "exportvisiofile_cancel_button", exportvisiofile_cancel_button); gtk_widget_show (exportvisiofile_cancel_button); GTK_WIDGET_SET_FLAGS (exportvisiofile_cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (exportvisiofile_ok_button), "clicked", GTK_SIGNAL_FUNC (on_exportvisiofile_ok_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (exportvisiofile_cancel_button), "clicked", GTK_SIGNAL_FUNC (on_exportvisiofile_cancel_button_clicked), NULL); return exportvisio_fileselection; } GtkWidget* create_exportps_fileselection (void) { GtkWidget *exportps_fileselection; GtkWidget *exportpsfile_ok_button; GtkWidget *exportpsfile_cancel_button; exportps_fileselection = gtk_file_selection_new (_("Export as Postscript")); gtk_object_set_data (GTK_OBJECT (exportps_fileselection), "exportps_fileselection", exportps_fileselection); gtk_container_set_border_width (GTK_CONTAINER (exportps_fileselection), 10); GTK_WINDOW (exportps_fileselection)->type = GTK_WINDOW_DIALOG; exportpsfile_ok_button = GTK_FILE_SELECTION (exportps_fileselection)->ok_button; gtk_object_set_data (GTK_OBJECT (exportps_fileselection), "exportpsfile_ok_button", exportpsfile_ok_button); gtk_widget_show (exportpsfile_ok_button); GTK_WIDGET_SET_FLAGS (exportpsfile_ok_button, GTK_CAN_DEFAULT); exportpsfile_cancel_button = GTK_FILE_SELECTION (exportps_fileselection)->cancel_button; gtk_object_set_data (GTK_OBJECT (exportps_fileselection), "exportpsfile_cancel_button", exportpsfile_cancel_button); gtk_widget_show (exportpsfile_cancel_button); GTK_WIDGET_SET_FLAGS (exportpsfile_cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (exportpsfile_ok_button), "clicked", GTK_SIGNAL_FUNC (on_exportpsfile_ok_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (exportpsfile_cancel_button), "clicked", GTK_SIGNAL_FUNC (on_exportpsfile_cancel_button_clicked), NULL); return exportps_fileselection; } GtkWidget* create_exportgif_fileselection (void) { GtkWidget *exportgif_fileselection; GtkWidget *exportgiffile_ok_button; GtkWidget *exportgiffile_cancel_button; exportgif_fileselection = gtk_file_selection_new (_("Export as GIF")); gtk_object_set_data (GTK_OBJECT (exportgif_fileselection), "exportgif_fileselection", exportgif_fileselection); gtk_container_set_border_width (GTK_CONTAINER (exportgif_fileselection), 10); GTK_WINDOW (exportgif_fileselection)->type = GTK_WINDOW_DIALOG; exportgiffile_ok_button = GTK_FILE_SELECTION (exportgif_fileselection)->ok_button; gtk_object_set_data (GTK_OBJECT (exportgif_fileselection), "exportgiffile_ok_button", exportgiffile_ok_button); gtk_widget_show (exportgiffile_ok_button); GTK_WIDGET_SET_FLAGS (exportgiffile_ok_button, GTK_CAN_DEFAULT); exportgiffile_cancel_button = GTK_FILE_SELECTION (exportgif_fileselection)->cancel_button; gtk_object_set_data (GTK_OBJECT (exportgif_fileselection), "exportgiffile_cancel_button", exportgiffile_cancel_button); gtk_widget_show (exportgiffile_cancel_button); GTK_WIDGET_SET_FLAGS (exportgiffile_cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (exportgiffile_ok_button), "clicked", GTK_SIGNAL_FUNC (on_exportgiffile_ok_button_clicked), NULL); gtk_signal_connect (GTK_OBJECT (exportgiffile_cancel_button), "clicked", GTK_SIGNAL_FUNC (on_exportgiffile_cancel_button_clicked), NULL); return exportgif_fileselection; } GtkWidget* create_notice_popup_window (const char *label_text) { GtkWidget *notice_popup_window; GtkWidget *vbox2; GtkWidget *notice_popup_label; GtkWidget *button1; notice_popup_window = gtk_window_new (GTK_WINDOW_DIALOG); gtk_object_set_data (GTK_OBJECT (notice_popup_window), "notice_popup_window", notice_popup_window); gtk_window_set_title (GTK_WINDOW (notice_popup_window), _("notice")); gtk_window_set_policy (GTK_WINDOW (notice_popup_window), TRUE, TRUE, TRUE); vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox2); gtk_object_set_data_full (GTK_OBJECT (notice_popup_window), "vbox2", vbox2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox2); gtk_container_add (GTK_CONTAINER (notice_popup_window), vbox2); notice_popup_label = gtk_label_new (_(label_text)); gtk_widget_ref (notice_popup_label); gtk_object_set_data_full (GTK_OBJECT (notice_popup_window), "notice_popup_label", notice_popup_label, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (notice_popup_label); gtk_box_pack_start (GTK_BOX (vbox2), notice_popup_label, FALSE, FALSE, 19); gtk_misc_set_padding (GTK_MISC (notice_popup_label), 35, 0); button1 = gtk_button_new_with_label (_("Close")); gtk_widget_ref (button1); gtk_object_set_data_full (GTK_OBJECT (notice_popup_window), "button1", button1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button1); gtk_box_pack_start (GTK_BOX (vbox2), button1, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (button1), "clicked", GTK_SIGNAL_FUNC (on_button1_clicked), NULL); return notice_popup_window; }