/* * 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* create_main_window (void) { GtkWidget *main_window; GtkWidget *main_window_box; GtkWidget *menubar; guint tmp_key; GtkWidget *menu_file; GtkWidget *menu_file_menu; GtkAccelGroup *menu_file_menu_accels; GtkWidget *menu_file_open; GtkWidget *menu_file_save; GtkWidget *menu_file_clear; GtkWidget *menu_file_close; GtkWidget *menu_file_separator; GtkWidget *menu_file_exit; GtkWidget *menu_options; GtkWidget *menu_options_menu; GtkAccelGroup *menu_options_menu_accels; GtkWidget *menu_options_run_loop; GtkWidget *menu_options_auto_refresh; GtkWidget *menu_options_ignore_errors; GtkWidget *menu_options_drop_orphaned_frames; GtkWidget *separator1; GtkWidget *menu_options_preferences; GtkWidget *menu_help; GtkWidget *menu_help_menu; GtkAccelGroup *menu_help_menu_accels; GtkWidget *menu_help_about; GtkWidget *main_label_clips; GtkWidget *main_scrolledwindow; GtkWidget *main_clist; GtkWidget *main_clist_label_filename; GtkWidget *main_clist_label_first; GtkWidget *main_clist_label_last; GtkWidget *GOP_selector; GtkWidget *main_button_box; GtkWidget *button_start_mark; GtkWidget *main_label_mark; GtkWidget *button_end_mark; GtkWidget *vseparator1; GtkWidget *button_prev; GtkWidget *button_run; GtkWidget *button_next; GtkWidget *vbox2; GtkWidget *slider_run_speed; GtkWidget *label_run_speed; GtkWidget *button_refresh; GtkWidget *main_status_box; GtkWidget *main_statusbar; GtkWidget *main_progressbar; GtkAccelGroup *accel_group; accel_group = gtk_accel_group_new (); main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_name (main_window, "main_window"); gtk_object_set_data (GTK_OBJECT (main_window), "main_window", main_window); gtk_window_set_title (GTK_WINDOW (main_window), _("GOPchop")); main_window_box = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (main_window_box, "main_window_box"); gtk_widget_ref (main_window_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_window_box", main_window_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_window_box); gtk_container_add (GTK_CONTAINER (main_window), main_window_box); menubar = gtk_menu_bar_new (); gtk_widget_set_name (menubar, "menubar"); gtk_widget_ref (menubar); gtk_object_set_data_full (GTK_OBJECT (main_window), "menubar", menubar, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menubar); gtk_box_pack_start (GTK_BOX (main_window_box), menubar, FALSE, FALSE, 0); menu_file = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_file)->child), _("_File")); gtk_widget_add_accelerator (menu_file, "activate_item", accel_group, tmp_key, GDK_MOD1_MASK, (GtkAccelFlags) 0); gtk_widget_set_name (menu_file, "menu_file"); gtk_widget_ref (menu_file); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_file", menu_file, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_file); gtk_container_add (GTK_CONTAINER (menubar), menu_file); menu_file_menu = gtk_menu_new (); gtk_widget_set_name (menu_file_menu, "menu_file_menu"); gtk_widget_ref (menu_file_menu); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_file_menu", menu_file_menu, (GtkDestroyNotify) gtk_widget_unref); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_file), menu_file_menu); menu_file_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (menu_file_menu)); menu_file_open = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_file_open)->child), _("_Open")); gtk_widget_add_accelerator (menu_file_open, "activate_item", menu_file_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_file_open, "menu_file_open"); gtk_widget_ref (menu_file_open); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_file_open", menu_file_open, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_file_open); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_file_open); menu_file_save = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_file_save)->child), _("_Save Clips")); gtk_widget_add_accelerator (menu_file_save, "activate_item", menu_file_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_file_save, "menu_file_save"); gtk_widget_ref (menu_file_save); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_file_save", menu_file_save, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_file_save); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_file_save); gtk_widget_set_sensitive (menu_file_save, FALSE); menu_file_clear = gtk_menu_item_new_with_label (_("Clear Clips")); gtk_widget_set_name (menu_file_clear, "menu_file_clear"); gtk_widget_ref (menu_file_clear); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_file_clear", menu_file_clear, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_file_clear); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_file_clear); menu_file_close = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_file_close)->child), _("_Close")); gtk_widget_add_accelerator (menu_file_close, "activate_item", menu_file_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_file_close, "menu_file_close"); gtk_widget_ref (menu_file_close); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_file_close", menu_file_close, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_file_close); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_file_close); gtk_widget_set_sensitive (menu_file_close, FALSE); menu_file_separator = gtk_menu_item_new (); gtk_widget_set_name (menu_file_separator, "menu_file_separator"); gtk_widget_ref (menu_file_separator); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_file_separator", menu_file_separator, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_file_separator); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_file_separator); gtk_widget_set_sensitive (menu_file_separator, FALSE); menu_file_exit = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_file_exit)->child), _("E_xit")); gtk_widget_add_accelerator (menu_file_exit, "activate_item", menu_file_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_file_exit, "menu_file_exit"); gtk_widget_ref (menu_file_exit); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_file_exit", menu_file_exit, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_file_exit); gtk_container_add (GTK_CONTAINER (menu_file_menu), menu_file_exit); menu_options = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_options)->child), _("_Options")); gtk_widget_add_accelerator (menu_options, "activate_item", accel_group, tmp_key, GDK_MOD1_MASK, (GtkAccelFlags) 0); gtk_widget_set_name (menu_options, "menu_options"); gtk_widget_ref (menu_options); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_options", menu_options, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_options); gtk_container_add (GTK_CONTAINER (menubar), menu_options); menu_options_menu = gtk_menu_new (); gtk_widget_set_name (menu_options_menu, "menu_options_menu"); gtk_widget_ref (menu_options_menu); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_options_menu", menu_options_menu, (GtkDestroyNotify) gtk_widget_unref); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_options), menu_options_menu); menu_options_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (menu_options_menu)); menu_options_run_loop = gtk_check_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_options_run_loop)->child), _("Run _Loop")); gtk_widget_add_accelerator (menu_options_run_loop, "activate_item", menu_options_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_options_run_loop, "menu_options_run_loop"); gtk_widget_ref (menu_options_run_loop); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_options_run_loop", menu_options_run_loop, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_options_run_loop); gtk_container_add (GTK_CONTAINER (menu_options_menu), menu_options_run_loop); gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (menu_options_run_loop), TRUE); menu_options_auto_refresh = gtk_check_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_options_auto_refresh)->child), _("Auto _Refresh")); gtk_widget_add_accelerator (menu_options_auto_refresh, "activate_item", menu_options_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_options_auto_refresh, "menu_options_auto_refresh"); gtk_widget_ref (menu_options_auto_refresh); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_options_auto_refresh", menu_options_auto_refresh, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_options_auto_refresh); gtk_container_add (GTK_CONTAINER (menu_options_menu), menu_options_auto_refresh); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_options_auto_refresh), TRUE); gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (menu_options_auto_refresh), TRUE); menu_options_ignore_errors = gtk_check_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_options_ignore_errors)->child), _("Ignore _Errors")); gtk_widget_add_accelerator (menu_options_ignore_errors, "activate_item", menu_options_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_options_ignore_errors, "menu_options_ignore_errors"); gtk_widget_ref (menu_options_ignore_errors); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_options_ignore_errors", menu_options_ignore_errors, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_options_ignore_errors); gtk_container_add (GTK_CONTAINER (menu_options_menu), menu_options_ignore_errors); gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (menu_options_ignore_errors), TRUE); menu_options_drop_orphaned_frames = gtk_check_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_options_drop_orphaned_frames)->child), _("Drop _Orphaned Frames")); gtk_widget_add_accelerator (menu_options_drop_orphaned_frames, "activate_item", menu_options_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_options_drop_orphaned_frames, "menu_options_drop_orphaned_frames"); gtk_widget_ref (menu_options_drop_orphaned_frames); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_options_drop_orphaned_frames", menu_options_drop_orphaned_frames, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_options_drop_orphaned_frames); gtk_container_add (GTK_CONTAINER (menu_options_menu), menu_options_drop_orphaned_frames); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_options_drop_orphaned_frames), TRUE); gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (menu_options_drop_orphaned_frames), TRUE); separator1 = gtk_menu_item_new (); gtk_widget_set_name (separator1, "separator1"); gtk_widget_ref (separator1); gtk_object_set_data_full (GTK_OBJECT (main_window), "separator1", separator1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (separator1); gtk_container_add (GTK_CONTAINER (menu_options_menu), separator1); gtk_widget_set_sensitive (separator1, FALSE); menu_options_preferences = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_options_preferences)->child), _("_Preferences...")); gtk_widget_add_accelerator (menu_options_preferences, "activate_item", menu_options_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_options_preferences, "menu_options_preferences"); gtk_widget_ref (menu_options_preferences); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_options_preferences", menu_options_preferences, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_options_preferences); gtk_container_add (GTK_CONTAINER (menu_options_menu), menu_options_preferences); gtk_widget_set_sensitive (menu_options_preferences, FALSE); menu_help = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_help)->child), _("_Help")); gtk_widget_add_accelerator (menu_help, "activate_item", accel_group, tmp_key, GDK_MOD1_MASK, (GtkAccelFlags) 0); gtk_widget_set_name (menu_help, "menu_help"); gtk_widget_ref (menu_help); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_help", menu_help, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_help); gtk_container_add (GTK_CONTAINER (menubar), menu_help); gtk_menu_item_right_justify (GTK_MENU_ITEM (menu_help)); menu_help_menu = gtk_menu_new (); gtk_widget_set_name (menu_help_menu, "menu_help_menu"); gtk_widget_ref (menu_help_menu); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_help_menu", menu_help_menu, (GtkDestroyNotify) gtk_widget_unref); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_help), menu_help_menu); menu_help_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (menu_help_menu)); menu_help_about = gtk_menu_item_new_with_label (""); tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menu_help_about)->child), _("_About...")); gtk_widget_add_accelerator (menu_help_about, "activate_item", menu_help_menu_accels, tmp_key, 0, 0); gtk_widget_set_name (menu_help_about, "menu_help_about"); gtk_widget_ref (menu_help_about); gtk_object_set_data_full (GTK_OBJECT (main_window), "menu_help_about", menu_help_about, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (menu_help_about); gtk_container_add (GTK_CONTAINER (menu_help_menu), menu_help_about); main_label_clips = gtk_label_new (_("Clips: 0")); gtk_widget_set_name (main_label_clips, "main_label_clips"); gtk_widget_ref (main_label_clips); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_label_clips", main_label_clips, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_label_clips); gtk_box_pack_start (GTK_BOX (main_window_box), main_label_clips, FALSE, FALSE, 0); main_scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (main_scrolledwindow, "main_scrolledwindow"); gtk_widget_ref (main_scrolledwindow); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_scrolledwindow", main_scrolledwindow, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_scrolledwindow); gtk_box_pack_start (GTK_BOX (main_window_box), main_scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (main_scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); main_clist = gtk_clist_new (3); gtk_widget_set_name (main_clist, "main_clist"); gtk_widget_ref (main_clist); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_clist", main_clist, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_clist); gtk_container_add (GTK_CONTAINER (main_scrolledwindow), main_clist); gtk_widget_set_usize (main_clist, -2, 150); gtk_clist_set_column_width (GTK_CLIST (main_clist), 0, 300); gtk_clist_set_column_width (GTK_CLIST (main_clist), 1, 159); gtk_clist_set_column_width (GTK_CLIST (main_clist), 2, 80); gtk_clist_column_titles_show (GTK_CLIST (main_clist)); main_clist_label_filename = gtk_label_new (_("Filename")); gtk_widget_set_name (main_clist_label_filename, "main_clist_label_filename"); gtk_widget_ref (main_clist_label_filename); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_clist_label_filename", main_clist_label_filename, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_clist_label_filename); gtk_clist_set_column_widget (GTK_CLIST (main_clist), 0, main_clist_label_filename); main_clist_label_first = gtk_label_new (_("First GOP")); gtk_widget_set_name (main_clist_label_first, "main_clist_label_first"); gtk_widget_ref (main_clist_label_first); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_clist_label_first", main_clist_label_first, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_clist_label_first); gtk_clist_set_column_widget (GTK_CLIST (main_clist), 1, main_clist_label_first); gtk_label_set_justify (GTK_LABEL (main_clist_label_first), GTK_JUSTIFY_RIGHT); main_clist_label_last = gtk_label_new (_("Last GOP")); gtk_widget_set_name (main_clist_label_last, "main_clist_label_last"); gtk_widget_ref (main_clist_label_last); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_clist_label_last", main_clist_label_last, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_clist_label_last); gtk_clist_set_column_widget (GTK_CLIST (main_clist), 2, main_clist_label_last); gtk_label_set_justify (GTK_LABEL (main_clist_label_last), GTK_JUSTIFY_RIGHT); GOP_selector = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 0, 0, 0, 0))); gtk_widget_set_name (GOP_selector, "GOP_selector"); gtk_widget_ref (GOP_selector); gtk_object_set_data_full (GTK_OBJECT (main_window), "GOP_selector", GOP_selector, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_selector); gtk_box_pack_start (GTK_BOX (main_window_box), GOP_selector, FALSE, TRUE, 0); gtk_scale_set_digits (GTK_SCALE (GOP_selector), 0); main_button_box = gtk_hbox_new (TRUE, 0); gtk_widget_set_name (main_button_box, "main_button_box"); gtk_widget_ref (main_button_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_button_box", main_button_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_button_box); gtk_box_pack_start (GTK_BOX (main_window_box), main_button_box, FALSE, TRUE, 0); button_start_mark = gtk_toggle_button_new_with_label (_("Start Mark")); gtk_widget_set_name (button_start_mark, "button_start_mark"); gtk_widget_ref (button_start_mark); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_start_mark", button_start_mark, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_start_mark); gtk_box_pack_start (GTK_BOX (main_button_box), button_start_mark, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_start_mark), 4); main_label_mark = gtk_label_new (_("no mark set")); gtk_widget_set_name (main_label_mark, "main_label_mark"); gtk_widget_ref (main_label_mark); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_label_mark", main_label_mark, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_label_mark); gtk_box_pack_start (GTK_BOX (main_button_box), main_label_mark, FALSE, FALSE, 0); button_end_mark = gtk_button_new_with_label (_("End Mark")); gtk_widget_set_name (button_end_mark, "button_end_mark"); gtk_widget_ref (button_end_mark); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_end_mark", button_end_mark, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_end_mark); gtk_box_pack_start (GTK_BOX (main_button_box), button_end_mark, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_end_mark), 4); gtk_widget_set_sensitive (button_end_mark, FALSE); vseparator1 = gtk_vseparator_new (); gtk_widget_set_name (vseparator1, "vseparator1"); gtk_widget_ref (vseparator1); gtk_object_set_data_full (GTK_OBJECT (main_window), "vseparator1", vseparator1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vseparator1); gtk_box_pack_start (GTK_BOX (main_button_box), vseparator1, TRUE, TRUE, 0); button_prev = gtk_button_new_with_label (_("Prev")); gtk_widget_set_name (button_prev, "button_prev"); gtk_widget_ref (button_prev); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_prev", button_prev, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_prev); gtk_box_pack_start (GTK_BOX (main_button_box), button_prev, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_prev), 4); gtk_widget_set_sensitive (button_prev, FALSE); button_run = gtk_toggle_button_new_with_label (_("Run")); gtk_widget_set_name (button_run, "button_run"); gtk_widget_ref (button_run); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_run", button_run, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_run); gtk_box_pack_start (GTK_BOX (main_button_box), button_run, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_run), 4); gtk_widget_set_sensitive (button_run, FALSE); button_next = gtk_button_new_with_label (_("Next")); gtk_widget_set_name (button_next, "button_next"); gtk_widget_ref (button_next); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_next", button_next, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_next); gtk_box_pack_start (GTK_BOX (main_button_box), button_next, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_next), 4); gtk_widget_set_sensitive (button_next, FALSE); vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox2, "vbox2"); gtk_widget_ref (vbox2); gtk_object_set_data_full (GTK_OBJECT (main_window), "vbox2", vbox2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox2); gtk_box_pack_start (GTK_BOX (main_button_box), vbox2, TRUE, TRUE, 0); slider_run_speed = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 100, 1, 5, 25))); gtk_widget_set_name (slider_run_speed, "slider_run_speed"); gtk_widget_ref (slider_run_speed); gtk_object_set_data_full (GTK_OBJECT (main_window), "slider_run_speed", slider_run_speed, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (slider_run_speed); gtk_box_pack_start (GTK_BOX (vbox2), slider_run_speed, TRUE, TRUE, 0); gtk_scale_set_digits (GTK_SCALE (slider_run_speed), 0); label_run_speed = gtk_label_new (_("Run Speed")); gtk_widget_set_name (label_run_speed, "label_run_speed"); gtk_widget_ref (label_run_speed); gtk_object_set_data_full (GTK_OBJECT (main_window), "label_run_speed", label_run_speed, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label_run_speed); gtk_box_pack_start (GTK_BOX (vbox2), label_run_speed, FALSE, FALSE, 0); button_refresh = gtk_button_new_with_label (_("Refresh")); gtk_widget_set_name (button_refresh, "button_refresh"); gtk_widget_ref (button_refresh); gtk_object_set_data_full (GTK_OBJECT (main_window), "button_refresh", button_refresh, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_refresh); gtk_box_pack_start (GTK_BOX (main_button_box), button_refresh, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (button_refresh), 4); gtk_widget_set_sensitive (button_refresh, FALSE); main_status_box = gtk_hbox_new (FALSE, 0); gtk_widget_set_name (main_status_box, "main_status_box"); gtk_widget_ref (main_status_box); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_status_box", main_status_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_status_box); gtk_box_pack_start (GTK_BOX (main_window_box), main_status_box, FALSE, TRUE, 0); main_statusbar = gtk_statusbar_new (); gtk_widget_set_name (main_statusbar, "main_statusbar"); gtk_widget_ref (main_statusbar); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_statusbar", main_statusbar, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_statusbar); gtk_box_pack_start (GTK_BOX (main_status_box), main_statusbar, TRUE, TRUE, 0); gtk_widget_set_usize (main_statusbar, 150, -2); main_progressbar = gtk_progress_bar_new (); gtk_widget_set_name (main_progressbar, "main_progressbar"); gtk_widget_ref (main_progressbar); gtk_object_set_data_full (GTK_OBJECT (main_window), "main_progressbar", main_progressbar, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_progressbar); gtk_box_pack_start (GTK_BOX (main_status_box), main_progressbar, TRUE, TRUE, 0); gtk_widget_set_usize (main_progressbar, 300, -2); gtk_signal_connect (GTK_OBJECT (menu_file_open), "activate", GTK_SIGNAL_FUNC (on_menu_file_open_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_file_save), "activate", GTK_SIGNAL_FUNC (on_menu_file_save_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_file_clear), "activate", GTK_SIGNAL_FUNC (on_menu_file_clear_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_file_close), "activate", GTK_SIGNAL_FUNC (on_menu_file_close_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_file_exit), "activate", GTK_SIGNAL_FUNC (on_menu_file_exit_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_options_run_loop), "activate", GTK_SIGNAL_FUNC (on_menu_options_run_loop_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_options_auto_refresh), "activate", GTK_SIGNAL_FUNC (on_menu_options_auto_refresh_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_options_ignore_errors), "activate", GTK_SIGNAL_FUNC (on_menu_options_ignore_errors_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_options_drop_orphaned_frames), "activate", GTK_SIGNAL_FUNC (on_menu_options_drop_orphaned_frames_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_options_preferences), "activate", GTK_SIGNAL_FUNC (on_menu_options_preferences_activate), NULL); gtk_signal_connect (GTK_OBJECT (menu_help_about), "activate", GTK_SIGNAL_FUNC (on_menu_help_about_activate), NULL); gtk_signal_connect (GTK_OBJECT (main_clist), "key_press_event", GTK_SIGNAL_FUNC (on_main_clist_key_press_event), NULL); gtk_signal_connect (GTK_OBJECT (main_clist), "button_press_event", GTK_SIGNAL_FUNC (on_main_clist_button_press_event), NULL); gtk_signal_connect (GTK_OBJECT (main_clist), "select_row", GTK_SIGNAL_FUNC (on_main_clist_select_row), NULL); gtk_signal_connect (GTK_OBJECT (main_clist), "unselect_row", GTK_SIGNAL_FUNC (on_main_clist_unselect_row), NULL); gtk_signal_connect (GTK_OBJECT (button_start_mark), "toggled", GTK_SIGNAL_FUNC (on_button_start_mark_toggled), NULL); gtk_signal_connect (GTK_OBJECT (button_end_mark), "clicked", GTK_SIGNAL_FUNC (on_button_end_mark_clicked), NULL); gtk_signal_connect (GTK_OBJECT (button_prev), "clicked", GTK_SIGNAL_FUNC (on_button_prev_clicked), NULL); gtk_signal_connect (GTK_OBJECT (button_run), "toggled", GTK_SIGNAL_FUNC (on_button_run_toggled), NULL); gtk_signal_connect (GTK_OBJECT (button_next), "clicked", GTK_SIGNAL_FUNC (on_button_next_clicked), NULL); gtk_signal_connect (GTK_OBJECT (button_refresh), "clicked", GTK_SIGNAL_FUNC (on_button_refresh_clicked), NULL); gtk_window_add_accel_group (GTK_WINDOW (main_window), accel_group); return main_window; } GtkWidget* create_about_window (void) { GtkWidget *about_window; GtkWidget *about_box; GtkWidget *about_box_picture; GtkWidget *about_pixmap; GtkWidget *label1; GtkWidget *about_label_version; GtkWidget *about_label_cvsid; GtkWidget *about_label_gpl; GtkWidget *about_box_buttons; GtkWidget *about_button_cool; about_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_name (about_window, "about_window"); gtk_object_set_data (GTK_OBJECT (about_window), "about_window", about_window); gtk_window_set_title (GTK_WINDOW (about_window), _("About...")); about_box = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (about_box, "about_box"); gtk_widget_ref (about_box); gtk_object_set_data_full (GTK_OBJECT (about_window), "about_box", about_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (about_box); gtk_container_add (GTK_CONTAINER (about_window), about_box); gtk_container_set_border_width (GTK_CONTAINER (about_box), 4); about_box_picture = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (about_box_picture, "about_box_picture"); gtk_widget_ref (about_box_picture); gtk_object_set_data_full (GTK_OBJECT (about_window), "about_box_picture", about_box_picture, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (about_box_picture); gtk_box_pack_start (GTK_BOX (about_box), about_box_picture, TRUE, TRUE, 4); about_pixmap = create_pixmap (about_window, "about.xpm"); gtk_widget_set_name (about_pixmap, "about_pixmap"); gtk_widget_ref (about_pixmap); gtk_object_set_data_full (GTK_OBJECT (about_window), "about_pixmap", about_pixmap, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (about_pixmap); gtk_box_pack_start (GTK_BOX (about_box_picture), about_pixmap, FALSE, FALSE, 0); label1 = gtk_label_new (_("(Image from www.sciencephotography.com)")); gtk_widget_set_name (label1, "label1"); gtk_widget_ref (label1); gtk_object_set_data_full (GTK_OBJECT (about_window), "label1", label1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label1); gtk_box_pack_start (GTK_BOX (about_box_picture), label1, FALSE, FALSE, 0); about_label_version = gtk_label_new (_("GOPchop")); gtk_widget_set_name (about_label_version, "about_label_version"); gtk_widget_ref (about_label_version); gtk_object_set_data_full (GTK_OBJECT (about_window), "about_label_version", about_label_version, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (about_label_version); gtk_box_pack_start (GTK_BOX (about_box), about_label_version, FALSE, FALSE, 0); about_label_cvsid = gtk_label_new (_("CVS")); gtk_widget_set_name (about_label_cvsid, "about_label_cvsid"); gtk_widget_ref (about_label_cvsid); gtk_object_set_data_full (GTK_OBJECT (about_window), "about_label_cvsid", about_label_cvsid, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (about_label_cvsid); gtk_box_pack_start (GTK_BOX (about_box), about_label_cvsid, FALSE, FALSE, 0); about_label_gpl = gtk_label_new (_("Copyright 2001-2003\nKees Cook \n\nGOPchop is a GOP-accurate MPEG2-PS editor.\n\n\nGOPchop comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome\nto redistribute it under certain conditions;\nfor details visit:\n\nhttp://www.gnu.org/copyleft/gpl.html\n")); gtk_widget_set_name (about_label_gpl, "about_label_gpl"); gtk_widget_ref (about_label_gpl); gtk_object_set_data_full (GTK_OBJECT (about_window), "about_label_gpl", about_label_gpl, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (about_label_gpl); gtk_box_pack_start (GTK_BOX (about_box), about_label_gpl, FALSE, FALSE, 0); about_box_buttons = gtk_hbox_new (TRUE, 0); gtk_widget_set_name (about_box_buttons, "about_box_buttons"); gtk_widget_ref (about_box_buttons); gtk_object_set_data_full (GTK_OBJECT (about_window), "about_box_buttons", about_box_buttons, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (about_box_buttons); gtk_box_pack_start (GTK_BOX (about_box), about_box_buttons, FALSE, TRUE, 0); about_button_cool = gtk_button_new_with_label (_("Cool")); gtk_widget_set_name (about_button_cool, "about_button_cool"); gtk_widget_ref (about_button_cool); gtk_object_set_data_full (GTK_OBJECT (about_window), "about_button_cool", about_button_cool, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (about_button_cool); gtk_box_pack_start (GTK_BOX (about_box_buttons), about_button_cool, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (about_button_cool), 4); gtk_signal_connect (GTK_OBJECT (about_window), "destroy", GTK_SIGNAL_FUNC (on_about_window_destroy), NULL); gtk_signal_connect (GTK_OBJECT (about_button_cool), "clicked", GTK_SIGNAL_FUNC (on_about_button_cool_clicked), NULL); return about_window; } GtkWidget* create_fileselection_window (void) { GtkWidget *fileselection_window; GtkWidget *fileselection_button_ok; GtkWidget *fileselection_button_cancel; fileselection_window = gtk_file_selection_new (_("Load MPEG2")); gtk_widget_set_name (fileselection_window, "fileselection_window"); gtk_object_set_data (GTK_OBJECT (fileselection_window), "fileselection_window", fileselection_window); gtk_container_set_border_width (GTK_CONTAINER (fileselection_window), 10); gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (fileselection_window)); fileselection_button_ok = GTK_FILE_SELECTION (fileselection_window)->ok_button; gtk_widget_set_name (fileselection_button_ok, "fileselection_button_ok"); gtk_object_set_data (GTK_OBJECT (fileselection_window), "fileselection_button_ok", fileselection_button_ok); gtk_widget_show (fileselection_button_ok); GTK_WIDGET_SET_FLAGS (fileselection_button_ok, GTK_CAN_DEFAULT); fileselection_button_cancel = GTK_FILE_SELECTION (fileselection_window)->cancel_button; gtk_widget_set_name (fileselection_button_cancel, "fileselection_button_cancel"); gtk_object_set_data (GTK_OBJECT (fileselection_window), "fileselection_button_cancel", fileselection_button_cancel); gtk_widget_show (fileselection_button_cancel); GTK_WIDGET_SET_FLAGS (fileselection_button_cancel, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (fileselection_window), "destroy", GTK_SIGNAL_FUNC (on_fileselection_window_destroy), NULL); gtk_signal_connect (GTK_OBJECT (fileselection_button_ok), "clicked", GTK_SIGNAL_FUNC (on_fileselection_button_ok_clicked), NULL); gtk_signal_connect (GTK_OBJECT (fileselection_button_cancel), "clicked", GTK_SIGNAL_FUNC (on_fileselection_button_cancel_clicked), NULL); return fileselection_window; } GtkWidget* create_error_dialog (void) { GtkWidget *error_dialog; GtkWidget *error_box; GtkWidget *error_box_reason; GtkWidget *error_box_icon; GtkWidget *error_pixmap; GtkWidget *error_label_pixmap; GtkWidget *hseparator1; GtkWidget *error_scrolledwindow; GtkWidget *error_text_why; GtkWidget *error_box_buttons; GtkWidget *error_button_annoying; error_dialog = gtk_dialog_new (); gtk_widget_set_name (error_dialog, "error_dialog"); gtk_object_set_data (GTK_OBJECT (error_dialog), "error_dialog", error_dialog); gtk_window_set_title (GTK_WINDOW (error_dialog), _("Error")); gtk_window_set_policy (GTK_WINDOW (error_dialog), TRUE, TRUE, FALSE); error_box = GTK_DIALOG (error_dialog)->vbox; gtk_widget_set_name (error_box, "error_box"); gtk_object_set_data (GTK_OBJECT (error_dialog), "error_box", error_box); gtk_widget_show (error_box); error_box_reason = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (error_box_reason, "error_box_reason"); gtk_widget_ref (error_box_reason); gtk_object_set_data_full (GTK_OBJECT (error_dialog), "error_box_reason", error_box_reason, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (error_box_reason); gtk_box_pack_start (GTK_BOX (error_box), error_box_reason, TRUE, TRUE, 0); error_box_icon = gtk_hbox_new (FALSE, 4); gtk_widget_set_name (error_box_icon, "error_box_icon"); gtk_widget_ref (error_box_icon); gtk_object_set_data_full (GTK_OBJECT (error_dialog), "error_box_icon", error_box_icon, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (error_box_icon); gtk_box_pack_start (GTK_BOX (error_box_reason), error_box_icon, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (error_box_icon), 10); error_pixmap = create_pixmap (error_dialog, "error.xpm"); gtk_widget_set_name (error_pixmap, "error_pixmap"); gtk_widget_ref (error_pixmap); gtk_object_set_data_full (GTK_OBJECT (error_dialog), "error_pixmap", error_pixmap, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (error_pixmap); gtk_box_pack_start (GTK_BOX (error_box_icon), error_pixmap, FALSE, FALSE, 0); error_label_pixmap = gtk_label_new (_("\"You have 20 seconds to comply.\"")); gtk_widget_set_name (error_label_pixmap, "error_label_pixmap"); gtk_widget_ref (error_label_pixmap); gtk_object_set_data_full (GTK_OBJECT (error_dialog), "error_label_pixmap", error_label_pixmap, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (error_label_pixmap); gtk_box_pack_start (GTK_BOX (error_box_icon), error_label_pixmap, TRUE, TRUE, 0); hseparator1 = gtk_hseparator_new (); gtk_widget_set_name (hseparator1, "hseparator1"); gtk_widget_ref (hseparator1); gtk_object_set_data_full (GTK_OBJECT (error_dialog), "hseparator1", hseparator1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hseparator1); gtk_box_pack_start (GTK_BOX (error_box_reason), hseparator1, FALSE, FALSE, 0); error_scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (error_scrolledwindow, "error_scrolledwindow"); gtk_widget_ref (error_scrolledwindow); gtk_object_set_data_full (GTK_OBJECT (error_dialog), "error_scrolledwindow", error_scrolledwindow, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (error_scrolledwindow); gtk_box_pack_start (GTK_BOX (error_box_reason), error_scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (error_scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); error_text_why = gtk_text_new (NULL, NULL); gtk_widget_set_name (error_text_why, "error_text_why"); gtk_widget_ref (error_text_why); gtk_object_set_data_full (GTK_OBJECT (error_dialog), "error_text_why", error_text_why, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (error_text_why); gtk_container_add (GTK_CONTAINER (error_scrolledwindow), error_text_why); error_box_buttons = GTK_DIALOG (error_dialog)->action_area; gtk_widget_set_name (error_box_buttons, "error_box_buttons"); gtk_object_set_data (GTK_OBJECT (error_dialog), "error_box_buttons", error_box_buttons); gtk_widget_show (error_box_buttons); gtk_container_set_border_width (GTK_CONTAINER (error_box_buttons), 4); error_button_annoying = gtk_button_new_with_label (_("That's annoying!")); gtk_widget_set_name (error_button_annoying, "error_button_annoying"); gtk_widget_ref (error_button_annoying); gtk_object_set_data_full (GTK_OBJECT (error_dialog), "error_button_annoying", error_button_annoying, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (error_button_annoying); gtk_box_pack_start (GTK_BOX (error_box_buttons), error_button_annoying, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (error_button_annoying), "clicked", GTK_SIGNAL_FUNC (on_error_button_annoying_clicked), NULL); return error_dialog; } GtkWidget* create_GOP_window (void) { GtkWidget *GOP_window; GtkWidget *GOP_box; GtkWidget *GOP_label_filename; GtkWidget *GOP_hseparator; GtkWidget *GOP_label_GOP; GtkWidget *GOP_label_sequence_info; GtkWidget *GOP_scrolledwindow; GtkWidget *GOP_clist; GtkWidget *GOP_label_type; GtkWidget *GOP_label_offset; GtkWidget *GOP_label_size; GOP_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_name (GOP_window, "GOP_window"); gtk_object_set_data (GTK_OBJECT (GOP_window), "GOP_window", GOP_window); gtk_window_set_title (GTK_WINDOW (GOP_window), _("Info")); gtk_window_set_default_size (GTK_WINDOW (GOP_window), 400, 400); gtk_window_set_policy (GTK_WINDOW (GOP_window), TRUE, TRUE, FALSE); GOP_box = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (GOP_box, "GOP_box"); gtk_widget_ref (GOP_box); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_box", GOP_box, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_box); gtk_container_add (GTK_CONTAINER (GOP_window), GOP_box); GOP_label_filename = gtk_label_new (""); gtk_widget_set_name (GOP_label_filename, "GOP_label_filename"); gtk_widget_ref (GOP_label_filename); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_label_filename", GOP_label_filename, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_label_filename); gtk_box_pack_start (GTK_BOX (GOP_box), GOP_label_filename, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (GOP_label_filename), GTK_JUSTIFY_LEFT); gtk_misc_set_padding (GTK_MISC (GOP_label_filename), 4, 4); GOP_hseparator = gtk_hseparator_new (); gtk_widget_set_name (GOP_hseparator, "GOP_hseparator"); gtk_widget_ref (GOP_hseparator); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_hseparator", GOP_hseparator, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_hseparator); gtk_box_pack_start (GTK_BOX (GOP_box), GOP_hseparator, FALSE, TRUE, 0); GOP_label_GOP = gtk_label_new (_("Current GOP information:")); gtk_widget_set_name (GOP_label_GOP, "GOP_label_GOP"); gtk_widget_ref (GOP_label_GOP); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_label_GOP", GOP_label_GOP, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_label_GOP); gtk_box_pack_start (GTK_BOX (GOP_box), GOP_label_GOP, FALSE, FALSE, 0); GOP_label_sequence_info = gtk_label_new (_("No Sequence Info Found")); gtk_widget_set_name (GOP_label_sequence_info, "GOP_label_sequence_info"); gtk_widget_ref (GOP_label_sequence_info); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_label_sequence_info", GOP_label_sequence_info, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_label_sequence_info); gtk_box_pack_start (GTK_BOX (GOP_box), GOP_label_sequence_info, FALSE, FALSE, 0); GOP_scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (GOP_scrolledwindow, "GOP_scrolledwindow"); gtk_widget_ref (GOP_scrolledwindow); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_scrolledwindow", GOP_scrolledwindow, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_scrolledwindow); gtk_box_pack_start (GTK_BOX (GOP_box), GOP_scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (GOP_scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); GOP_clist = gtk_clist_new (3); gtk_widget_set_name (GOP_clist, "GOP_clist"); gtk_widget_ref (GOP_clist); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_clist", GOP_clist, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_clist); gtk_container_add (GTK_CONTAINER (GOP_scrolledwindow), GOP_clist); gtk_clist_set_column_width (GTK_CLIST (GOP_clist), 0, 183); gtk_clist_set_column_width (GTK_CLIST (GOP_clist), 1, 100); gtk_clist_set_column_width (GTK_CLIST (GOP_clist), 2, 80); gtk_clist_column_titles_show (GTK_CLIST (GOP_clist)); GOP_label_type = gtk_label_new (_("Item")); gtk_widget_set_name (GOP_label_type, "GOP_label_type"); gtk_widget_ref (GOP_label_type); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_label_type", GOP_label_type, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_label_type); gtk_clist_set_column_widget (GTK_CLIST (GOP_clist), 0, GOP_label_type); GOP_label_offset = gtk_label_new (_("Parent Offset")); gtk_widget_set_name (GOP_label_offset, "GOP_label_offset"); gtk_widget_ref (GOP_label_offset); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_label_offset", GOP_label_offset, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_label_offset); gtk_clist_set_column_widget (GTK_CLIST (GOP_clist), 1, GOP_label_offset); gtk_label_set_justify (GTK_LABEL (GOP_label_offset), GTK_JUSTIFY_RIGHT); GOP_label_size = gtk_label_new (_("Data Bytes")); gtk_widget_set_name (GOP_label_size, "GOP_label_size"); gtk_widget_ref (GOP_label_size); gtk_object_set_data_full (GTK_OBJECT (GOP_window), "GOP_label_size", GOP_label_size, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (GOP_label_size); gtk_clist_set_column_widget (GTK_CLIST (GOP_clist), 2, GOP_label_size); gtk_label_set_justify (GTK_LABEL (GOP_label_size), GTK_JUSTIFY_RIGHT); return GOP_window; } GtkWidget* create_main_popup (void) { GtkWidget *main_popup; GtkAccelGroup *main_popup_accels; GtkWidget *main_popup_delete; main_popup = gtk_menu_new (); gtk_widget_set_name (main_popup, "main_popup"); gtk_object_set_data (GTK_OBJECT (main_popup), "main_popup", main_popup); main_popup_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (main_popup)); main_popup_delete = gtk_menu_item_new_with_label (_("Delete")); gtk_widget_set_name (main_popup_delete, "main_popup_delete"); gtk_widget_ref (main_popup_delete); gtk_object_set_data_full (GTK_OBJECT (main_popup), "main_popup_delete", main_popup_delete, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (main_popup_delete); gtk_container_add (GTK_CONTAINER (main_popup), main_popup_delete); gtk_signal_connect (GTK_OBJECT (main_popup_delete), "activate", GTK_SIGNAL_FUNC (on_main_popup_delete_activate), NULL); return main_popup; } GtkWidget* create_saveselection_window (void) { GtkWidget *saveselection_window; GtkWidget *saveselection_button_ok; GtkWidget *saveselection_button_cancel; saveselection_window = gtk_file_selection_new (_("Save MPEG2")); gtk_widget_set_name (saveselection_window, "saveselection_window"); gtk_object_set_data (GTK_OBJECT (saveselection_window), "saveselection_window", saveselection_window); gtk_container_set_border_width (GTK_CONTAINER (saveselection_window), 10); gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (saveselection_window)); saveselection_button_ok = GTK_FILE_SELECTION (saveselection_window)->ok_button; gtk_widget_set_name (saveselection_button_ok, "saveselection_button_ok"); gtk_object_set_data (GTK_OBJECT (saveselection_window), "saveselection_button_ok", saveselection_button_ok); gtk_widget_show (saveselection_button_ok); GTK_WIDGET_SET_FLAGS (saveselection_button_ok, GTK_CAN_DEFAULT); saveselection_button_cancel = GTK_FILE_SELECTION (saveselection_window)->cancel_button; gtk_widget_set_name (saveselection_button_cancel, "saveselection_button_cancel"); gtk_object_set_data (GTK_OBJECT (saveselection_window), "saveselection_button_cancel", saveselection_button_cancel); gtk_widget_show (saveselection_button_cancel); GTK_WIDGET_SET_FLAGS (saveselection_button_cancel, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (saveselection_window), "destroy", GTK_SIGNAL_FUNC (on_saveselection_window_destroy), NULL); gtk_signal_connect (GTK_OBJECT (saveselection_button_ok), "clicked", GTK_SIGNAL_FUNC (on_saveselection_button_ok_clicked), NULL); gtk_signal_connect (GTK_OBJECT (saveselection_button_cancel), "clicked", GTK_SIGNAL_FUNC (on_saveselection_button_cancel_clicked), NULL); return saveselection_window; } GtkWidget* create_overwrite_dialog (void) { GtkWidget *overwrite_dialog; GtkWidget *dialog_vbox1; GtkWidget *vbox1; GtkWidget *overwrite_label_message; GtkWidget *overwrite_label_filename; GtkWidget *dialog_action_area1; GtkWidget *hbuttonbox1; GtkWidget *overwrite_button_ok; GtkWidget *overwrite_button_cancel; overwrite_dialog = gtk_dialog_new (); gtk_widget_set_name (overwrite_dialog, "overwrite_dialog"); gtk_object_set_data (GTK_OBJECT (overwrite_dialog), "overwrite_dialog", overwrite_dialog); gtk_window_set_title (GTK_WINDOW (overwrite_dialog), _("Overwrite?")); GTK_WINDOW (overwrite_dialog)->type = GTK_WINDOW_DIALOG; gtk_window_set_position (GTK_WINDOW (overwrite_dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (overwrite_dialog), TRUE); gtk_window_set_policy (GTK_WINDOW (overwrite_dialog), TRUE, TRUE, FALSE); dialog_vbox1 = GTK_DIALOG (overwrite_dialog)->vbox; gtk_widget_set_name (dialog_vbox1, "dialog_vbox1"); gtk_object_set_data (GTK_OBJECT (overwrite_dialog), "dialog_vbox1", dialog_vbox1); gtk_widget_show (dialog_vbox1); vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_set_name (vbox1, "vbox1"); gtk_widget_ref (vbox1); gtk_object_set_data_full (GTK_OBJECT (overwrite_dialog), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox1); gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0); overwrite_label_message = gtk_label_new (_("This file already exists.")); gtk_widget_set_name (overwrite_label_message, "overwrite_label_message"); gtk_widget_ref (overwrite_label_message); gtk_object_set_data_full (GTK_OBJECT (overwrite_dialog), "overwrite_label_message", overwrite_label_message, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (overwrite_label_message); gtk_box_pack_start (GTK_BOX (vbox1), overwrite_label_message, FALSE, FALSE, 0); overwrite_label_filename = gtk_label_new (_("filename")); gtk_widget_set_name (overwrite_label_filename, "overwrite_label_filename"); gtk_widget_ref (overwrite_label_filename); gtk_object_set_data_full (GTK_OBJECT (overwrite_dialog), "overwrite_label_filename", overwrite_label_filename, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (overwrite_label_filename); gtk_box_pack_start (GTK_BOX (vbox1), overwrite_label_filename, TRUE, TRUE, 0); dialog_action_area1 = GTK_DIALOG (overwrite_dialog)->action_area; gtk_widget_set_name (dialog_action_area1, "dialog_action_area1"); gtk_object_set_data (GTK_OBJECT (overwrite_dialog), "dialog_action_area1", dialog_action_area1); gtk_widget_show (dialog_action_area1); gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 10); hbuttonbox1 = gtk_hbutton_box_new (); gtk_widget_set_name (hbuttonbox1, "hbuttonbox1"); gtk_widget_ref (hbuttonbox1); gtk_object_set_data_full (GTK_OBJECT (overwrite_dialog), "hbuttonbox1", hbuttonbox1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbuttonbox1); gtk_box_pack_start (GTK_BOX (dialog_action_area1), hbuttonbox1, TRUE, TRUE, 0); overwrite_button_ok = gtk_button_new_with_label (_("Overwrite")); gtk_widget_set_name (overwrite_button_ok, "overwrite_button_ok"); gtk_widget_ref (overwrite_button_ok); gtk_object_set_data_full (GTK_OBJECT (overwrite_dialog), "overwrite_button_ok", overwrite_button_ok, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (overwrite_button_ok); gtk_container_add (GTK_CONTAINER (hbuttonbox1), overwrite_button_ok); GTK_WIDGET_SET_FLAGS (overwrite_button_ok, GTK_CAN_DEFAULT); overwrite_button_cancel = gtk_button_new_with_label (_("Cancel")); gtk_widget_set_name (overwrite_button_cancel, "overwrite_button_cancel"); gtk_widget_ref (overwrite_button_cancel); gtk_object_set_data_full (GTK_OBJECT (overwrite_dialog), "overwrite_button_cancel", overwrite_button_cancel, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (overwrite_button_cancel); gtk_container_add (GTK_CONTAINER (hbuttonbox1), overwrite_button_cancel); GTK_WIDGET_SET_FLAGS (overwrite_button_cancel, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (overwrite_button_ok), "clicked", GTK_SIGNAL_FUNC (on_overwrite_button_ok_clicked), NULL); gtk_signal_connect (GTK_OBJECT (overwrite_button_cancel), "clicked", GTK_SIGNAL_FUNC (on_overwrite_button_cancel_clicked), NULL); return overwrite_dialog; }