#ifndef _MAIN_H #define _MAIN_H #ifdef HAVE_CONFIG_H #include "../config.h" #endif #include #include #include #include #include #include #include #include #include #define BUF_LEN 255 #define GSE_CONFIG_FILE "/gsubedit" #define CFG_DETECT_BY_CONTENT 1 #define CFG_DETECT_BY_EXT 2 #define GSE_ACTION_REOPEN 1 #define GSE_ACTION_UNDO 2 #define GSE_ACTION_QUIT 3 #define GSE_ACTION_OPEN_SUB 4 #define GSE_ACTION_SAVE_SUB 5 #define GSE_ACTION_OPEN_MOVIE 6 #define GSE_SUBT_UNKNOWN 0x00 #define GSE_SUBT_MICRODVD 0x02 #define GSE_SUBT_SUBRIPPER 0x04 #define GSE_START_STOP_ENTRY_MAX 15 #define GSE_RADIO_TIME 1 #define GSE_RADIO_FRAME 2 #define GSE_DIRECTION_UP 1 #define GSE_DIRECTION_DOWN 2 #define GSE_INFOBOX_NO_FILE_OPEN _("Unable to save. No file is currently open") #define CFG_NUM_PRE_FPS 4 #define GSE_DROP_URL 1 #define GSE_DROP_TEXT_PLAIN 2 #define GSE_DROP_STRING 3 #define GSE_FILE_NO_ERRORS 1 #define GSE_FILE_ERROR_OPEN_R -1 #define GSE_FILE_ERROR_OPEN_W -2 #define GSE_FILE_CORRECTED_VALUES -3 #define GSE_FILE_UNKNOWN_TYPE -4 #define GSE_FILE_ERROR_APPEND_FTYPE -5 #define GSE_NO_SPLIT -1 #define GSE_UNTITLED_FILE "Untitled" typedef struct { gchar *last_open_dir; gchar *last_save_dir; gint detect_file_by; gboolean auto_update_clist, save_after_conversion; gboolean hi_rm_at, hi_rm_bracket, hi_rm_custom; gint toolbar_style; gchar *predef_fps[CFG_NUM_PRE_FPS]; gchar *isp_cmd, *isp_opt; gboolean isp_ask; gint isp_langcount; gchar **lang_list; } cfg_struct; typedef struct { gchar *filename; gint filetype, size, lines; gdouble fps; gchar *lang; gboolean changed; } open_fl_struct; typedef struct { GtkWidget *entry; GtkWidget *lbl; } entry_lbl_struct; struct infobox { GtkWidget *fsize, *lines, *fps, *combo; }; extern GdkColor light_red, white; extern open_fl_struct cur_open_file; extern struct infobox infobox; extern cfg_struct cfg; gchar *current_open_file; extern gdouble glob_fps; extern GList *lang_list; /* Some global widgets */ GtkWidget *main_window, *mwin_statusbar, *mwin_clist, *mwin_combo_fps; GtkWidget *mwin_entry_start, *mwin_entry_end, *mwin_text_sub; GtkWidget *mwin_radio_frame, *mwin_radio_time; #include "cfg.h" #include "gui.h" #include "fileio.h" #include "search.h" #include "spell_check.h" #endif /* _MAIN_H */