#include "pixmaps/hi_remove_small.xpm" #include "pixmaps/hi_remove_medium.xpm" #include "pixmaps/split_file_small.xpm" #include "pixmaps/split_file_medium.xpm" /* The menubar */ static GnomeUIInfo file_menu [] = { GNOMEUIINFO_MENU_OPEN_ITEM (gse_cb_get_filename_from_user, GINT_TO_POINTER (GSE_ACTION_OPEN_SUB)), #define GSE_MENU_FILE_OPEN 0 GNOMEUIINFO_MENU_SAVE_ITEM (gse_cb_save_subtitle_same_file, NULL), #define GSE_MENU_FILE_SAVE 1 GNOMEUIINFO_MENU_SAVE_AS_ITEM (gse_cb_btn_clicked, GINT_TO_POINTER (GSE_ACTION_SAVE_SUB)), #define GSE_MENU_FILE_SAVE_AS 2 GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_REVERT_ITEM (gse_cb_btn_clicked, GINT_TO_POINTER (GSE_ACTION_REOPEN)), #define GSE_MENU_FILE_REVERT 4 GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_CLOSE_ITEM (gse_cb_close_file, NULL), #define GSE_MENU_FILE_CLOSE 6 GNOMEUIINFO_MENU_EXIT_ITEM (gse_delete_main_window, NULL), #define GSE_MENU_FILE_EXIT 7 GNOMEUIINFO_END }; static GnomeUIInfo help_menu [] = { GNOMEUIINFO_HELP ("gsubedit"), #define GSE_MENU_HELP_HELP 0 GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_ABOUT_ITEM (gse_about,NULL), #define GSE_MENU_HELP_ABOUT 2 GNOMEUIINFO_END }; static GnomeUIInfo action_menu [] = { GNOMEUIINFO_ITEM_STOCK (N_("Displace frames..."), N_("Displaces frames by a given offset"), gse_cb_displace_frames, GNOME_STOCK_MENU_JUMP_TO), #define GSE_MENU_ACTION_DISPLACE 0 GNOMEUIINFO_ITEM_STOCK (N_("Framerate convert..."), N_("Converts from one framerate to another"), gse_cb_convert_framrate, GNOME_STOCK_MENU_CONVERT), #define GSE_MENU_ACTION_FPSCONV 1 GNOMEUIINFO_ITEM (N_("Hearing impaired remove..."), N_("Removes text for hearing impaired"), gse_cb_rm_hearing_impaired, hi_remove_small_xpm), #define GSE_MENU_ACTION_HICLEAN 2 GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM (N_("Split file..."), N_("Splits the subtitle into two files"), gse_cb_split_file, split_file_small_xpm), #define GSE_MENU_ACTION_SPLIT 4 GNOMEUIINFO_ITEM (N_("Join files..."), N_("Joins two files into one new file"), gse_cb_join_files, split_file_small_xpm), #define GSE_MENU_ACTION_JOIN 5 GNOMEUIINFO_END }; static GnomeUIInfo settings_menu [] = { GNOMEUIINFO_MENU_PREFERENCES_ITEM (cfg_open_prefwin, NULL), #define GSE_MENU_SETTINGS_PREF 0 GNOMEUIINFO_END }; static GnomeUIInfo edit_menu [] = { GNOMEUIINFO_MENU_FIND_ITEM (gse_srch_show_find_dialog, NULL), #define GSE_MENU_EDIT_FIND 0 GNOMEUIINFO_MENU_REPLACE_ITEM (gse_srch_show_replace_dialog, NULL), #define GSE_MENU_EDIT_REPLACE 1 GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_STOCK (N_("Spell check"), N_("Spell checks the current open subtitle"), gse_spell_show_dialog, GNOME_STOCK_MENU_SPELLCHECK), #define GSE_MENU_EDIT_SPELL 3 GNOMEUIINFO_ITEM_STOCK (N_("Calculate FPS"), N_("Tries to calculate the FPS of the sub"), gse_cb_calc_fps, GNOME_STOCK_MENU_TIMER), #define GSE_MENU_EDIT_CALC_FPS 4 GNOMEUIINFO_END }; /* define the main menubar */ static GnomeUIInfo main_menu [] = { GNOMEUIINFO_MENU_FILE_TREE (file_menu), #define GSE_MENU_TREE_FILE 0 GNOMEUIINFO_MENU_EDIT_TREE (edit_menu), #define GSE_MENU_TREE_EDIT 1 GNOMEUIINFO_SUBTREE (N_("_Actions"), action_menu), #define GSE_MENU_TREE_ACTIONS 2 GNOMEUIINFO_MENU_SETTINGS_TREE (settings_menu), #define GSE_MENU_TREE_SETTINGS 3 GNOMEUIINFO_MENU_HELP_TREE (help_menu), #define GSE_MENU_TREE_HELP 4 GNOMEUIINFO_END }; /* And the toolbar */ static GnomeUIInfo main_toolbar[] = { GNOMEUIINFO_ITEM_STOCK (N_("Open"), N_("Open a new subtitle"), gse_cb_toolbar_open_file, GNOME_STOCK_PIXMAP_OPEN), #define GSE_TOOLBAR_OPEN 0 GNOMEUIINFO_ITEM_STOCK (N_("Close"), N_("Closes the open file"), gse_cb_close_file, GNOME_STOCK_PIXMAP_CLOSE), #define GSE_TOOLBAR_CLOSE 1 GNOMEUIINFO_SEPARATOR , GNOMEUIINFO_ITEM_STOCK (N_("Save"), N_("Saves the open file"), gse_cb_save_subtitle_same_file, GNOME_STOCK_PIXMAP_SAVE), #define GSE_TOOLBAR_SAVE 3 GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_STOCK (N_("Config"), N_("Opens the preferences window"), cfg_open_prefwin, GNOME_STOCK_PIXMAP_PREFERENCES), #define GSE_TOOLBAR_PREF 5 GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_STOCK (N_("Displace"), N_("Displaces frames by a given offset"), gse_cb_displace_frames, GNOME_STOCK_PIXMAP_JUMP_TO), #define GSE_TOOLBAR_DISPLACE 7 GNOMEUIINFO_ITEM_STOCK (N_("FPS Convert"), N_("Converts from one framerate to another"), gse_cb_convert_framrate, GNOME_STOCK_PIXMAP_CONVERT), #define GSE_TOOLBAR_FPSCONV 8 GNOMEUIINFO_ITEM (N_("H.I. clean"), N_("Removes text for hearing impaired"), gse_cb_rm_hearing_impaired, hi_remove_medium_xpm), #define GSE_TOOLBAR_HICLEAN 9 GNOMEUIINFO_ITEM (N_("Split file"), N_("Splits the current file into two parts"), gse_cb_split_file, split_file_medium_xpm), #define GSE_TOOLBAR_SPLIT 10 GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_STOCK (N_("Exit"), N_("Exits the program"), gse_delete_main_window, GNOME_STOCK_PIXMAP_EXIT), #define GSE_TOOLBAR_EXIT 12 GNOMEUIINFO_END }; /* The clist popup */ static GnomeUIInfo clist_popup_menu [] = { GNOMEUIINFO_ITEM_STOCK (N_("Delete line"), N_("Deletes the current line"), gse_cb_clist_delete_line, GNOME_STOCK_MENU_CLOSE), GNOMEUIINFO_ITEM_NONE (N_("Insert line"), N_("Inserts a line before the selected line"), gse_cb_clist_insert_line), GNOMEUIINFO_ITEM_STOCK (N_("Move up"), N_("Moves the selected row one step up"), gse_cb_clist_move_up, GNOME_STOCK_MENU_UP), GNOMEUIINFO_ITEM_STOCK (N_("Move down"), N_("Moves the selected row one step down"), gse_cb_clist_move_down, GNOME_STOCK_MENU_DOWN), GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_STOCK (N_("Re-index"), N_("Recalculates the index (first column of the list)"), gse_cb_clist_reindex, GNOME_STOCK_MENU_INDEX), GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_STOCK (N_("Goto line"), N_("Jumps to the specified line"), gse_cb_clist_jump_to_line, GNOME_STOCK_MENU_JUMP_TO), GNOMEUIINFO_MENU_FIND_ITEM (gse_srch_show_find_dialog, NULL), GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_STOCK (N_("Calculate FPS"), N_("Tries to calculate the FPS of the sub"), gse_cb_calc_fps, GNOME_STOCK_MENU_TIMER), GNOMEUIINFO_END }; gchar *mwin_clist_titles [4] = {N_("Num."), N_("Start"), N_("End"), N_("Text")};