Kaydet (Commit) 002503de authored tarafından Enrico Tröger's avatar Enrico Tröger

several bugfixes and improvements


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@281 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst c80b8a57
This diff is collapsed.
...@@ -26,34 +26,18 @@ ...@@ -26,34 +26,18 @@
#include "geany.h" #include "geany.h"
GPid build_make_c_file(gint idx, gboolean cust_target); GPid build_make_file(gint idx, gboolean cust_target);
GPid build_compile_c_file(gint idx); GPid build_compile_file(gint idx);
GPid build_link_file(gint idx);
GPid build_compile_tex_file(gint idx, gint mode); GPid build_compile_tex_file(gint idx, gint mode);
GPid build_view_tex_file(gint idx, gint mode); GPid build_view_tex_file(gint idx, gint mode);
GPid build_link_c_file(gint idx);
GPid build_compile_cpp_file(gint idx);
GPid build_link_cpp_file(gint idx);
GPid build_compile_java_file(gint idx);
GPid build_compile_pascal_file(gint idx);
GPid build_spawn_cmd(gint idx, gchar **cmd);
GPid build_run_cmd(gint idx); GPid build_run_cmd(gint idx);
void build_exit_cb (GPid child_pid, gint status, gpointer user_data); void build_exit_cb (GPid child_pid, gint status, gpointer user_data);
GIOChannel *build_set_up_io_channel (gint fd, GIOCondition cond, GIOFunc func, gpointer data);
gboolean build_iofunc(GIOChannel *ioc, GIOCondition cond, gpointer data);
gboolean build_create_shellscript(const gint idx, const gchar *fname, const gchar *exec, const gchar *args);
#endif #endif
This diff is collapsed.
...@@ -564,3 +564,7 @@ on_entry_goto_line_activate (GtkEntry *entry, ...@@ -564,3 +564,7 @@ on_entry_goto_line_activate (GtkEntry *entry,
void void
on_toolbutton_goto_clicked (GtkToolButton *toolbutton, on_toolbutton_goto_clicked (GtkToolButton *toolbutton,
gpointer user_data); gpointer user_data);
void
on_run_button_clicked (GtkToolButton *toolbutton,
gpointer user_data);
This diff is collapsed.
...@@ -26,29 +26,13 @@ ...@@ -26,29 +26,13 @@
#ifndef GEANY_DIALOGS_H #ifndef GEANY_DIALOGS_H
#define GEANY_DIALOGS_H 1 #define GEANY_DIALOGS_H 1
typedef struct
{
GtkWidget *menu;
GtkWidget *item_compile;
GtkWidget *item_link;
GtkWidget *item_exec;
} build_menus_items;
build_menus_items dialogs_build_menus_items;
typedef struct
{
build_menus_items menu_c;
build_menus_items menu_tex;
build_menus_items menu_misc;
} build_menus;
build_menus dialogs_build_menus;
/* This shows the file selection dialog to open a file. */ /* This shows the file selection dialog to open a file. */
void dialogs_show_open_file (void); void dialogs_show_open_file(void);
/* This shows the file selection dialog to save a file. */ /* This shows the file selection dialog to save a file. */
void dialogs_show_save_as (); void dialogs_show_save_as();
void dialogs_show_file_open_error(void); void dialogs_show_file_open_error(void);
...@@ -60,10 +44,6 @@ void dialogs_show_error(const gchar *text, ...); ...@@ -60,10 +44,6 @@ void dialogs_show_error(const gchar *text, ...);
gboolean dialogs_show_fifo_error(const gchar *text, ...); gboolean dialogs_show_fifo_error(const gchar *text, ...);
gboolean dialogs_show_reload_warning(const gchar *text);
gboolean dialogs_show_confirm_exit(void);
gboolean dialogs_show_unsaved_file(gint idx); gboolean dialogs_show_unsaved_file(gint idx);
/* This shows the font selection dialog to choose a font. */ /* This shows the font selection dialog to choose a font. */
...@@ -75,9 +55,9 @@ void dialogs_show_word_count(void); ...@@ -75,9 +55,9 @@ void dialogs_show_word_count(void);
void dialogs_show_color(void); void dialogs_show_color(void);
GtkWidget *dialogs_create_build_menu_gen(gboolean link, gboolean execute, build_menus_items *type); GtkWidget *dialogs_create_build_menu_gen(gint idx);
GtkWidget *dialogs_create_build_menu_tex(build_menus_items *type); GtkWidget *dialogs_create_build_menu_tex(gint idx);
void dialogs_show_make_target(void); void dialogs_show_make_target(void);
...@@ -87,7 +67,7 @@ void dialogs_show_replace(void); ...@@ -87,7 +67,7 @@ void dialogs_show_replace(void);
void dialogs_show_goto_line(void); void dialogs_show_goto_line(void);
void dialogs_show_includes_arguments_gen(gboolean link); void dialogs_show_includes_arguments_gen(void);
void dialogs_show_includes_arguments_tex(void); void dialogs_show_includes_arguments_tex(void);
...@@ -99,4 +79,8 @@ gboolean dialogs_show_mkcfgdir_error(gint error_nr); ...@@ -99,4 +79,8 @@ gboolean dialogs_show_mkcfgdir_error(gint error_nr);
void dialogs_show_file_properties(gint idx); void dialogs_show_file_properties(gint idx);
void dialogs_show_prefs_dialog(void);
gboolean dialogs_show_question(const gchar *text, ...);
#endif #endif
This diff is collapsed.
This diff is collapsed.
...@@ -27,38 +27,61 @@ ...@@ -27,38 +27,61 @@
enum enum
{ {
GEANY_FILETYPES_C = 0, GEANY_FILETYPES_C = 0, // 0
GEANY_FILETYPES_CPP, GEANY_FILETYPES_CPP, // 1
GEANY_FILETYPES_JAVA, GEANY_FILETYPES_JAVA, // 2
GEANY_FILETYPES_PERL, GEANY_FILETYPES_PERL, // 3
GEANY_FILETYPES_PHP, GEANY_FILETYPES_PHP, // 4
GEANY_FILETYPES_XML, GEANY_FILETYPES_XML, // 5
GEANY_FILETYPES_DOCBOOK, GEANY_FILETYPES_DOCBOOK, // 6
GEANY_FILETYPES_PYTHON, GEANY_FILETYPES_PYTHON, // 7
GEANY_FILETYPES_TEX, GEANY_FILETYPES_LATEX, // 8
GEANY_FILETYPES_PASCAL, GEANY_FILETYPES_PASCAL, // 9
GEANY_FILETYPES_SH, GEANY_FILETYPES_SH, // 10
GEANY_FILETYPES_MAKE, GEANY_FILETYPES_MAKE, // 11
GEANY_FILETYPES_CSS, GEANY_FILETYPES_CSS, // 12
GEANY_FILETYPES_CONF, GEANY_FILETYPES_CONF, // 13
GEANY_FILETYPES_ASM, GEANY_FILETYPES_ASM, // 14
GEANY_FILETYPES_SQL, GEANY_FILETYPES_SQL, // 15
GEANY_FILETYPES_CAML, GEANY_FILETYPES_CAML, // 16
GEANY_FILETYPES_OMS, GEANY_FILETYPES_OMS, // 17
GEANY_FILETYPES_ALL, GEANY_FILETYPES_ALL, // 18
GEANY_MAX_FILE_TYPES GEANY_MAX_FILE_TYPES // 19
}; };
struct build_menu_items
{
GtkWidget *menu;
GtkWidget *item_compile;
GtkWidget *item_link;
GtkWidget *item_exec;
gboolean can_compile;
gboolean can_link;
gboolean can_exec;
};
struct build_programs
{
gchar *compiler;
gchar *linker;
gchar *run_cmd;
gchar *run_cmd2;
};
typedef struct filetype typedef struct filetype
{ {
guint id; guint id;
gchar *name; // will be used as name for tagmanager gchar *name; // will be used as name for tagmanager
gboolean has_tags; // indicates whether there is a tag parser for it or not gboolean has_tags; // indicates whether there is a tag parser for it or not
gchar *title; // will be shown in the file open dialog gchar *title; // will be shown in the file open dialog
gchar *extension; gchar *extension;
gchar **pattern; gchar **pattern;
void (*style_func_ptr) (ScintillaObject*); gchar *comment_open;
gchar *comment_close;
gboolean comment_use_indent;
struct build_programs *programs;
struct build_menu_items *menu_items;
void (*style_func_ptr) (ScintillaObject*);
} filetype; } filetype;
filetype *filetypes[GEANY_MAX_FILE_TYPES]; filetype *filetypes[GEANY_MAX_FILE_TYPES];
...@@ -72,15 +95,11 @@ void filetypes_init_types(void); ...@@ -72,15 +95,11 @@ void filetypes_init_types(void);
/* simple filetype selection based on the filename extension */ /* simple filetype selection based on the filename extension */
filetype *filetypes_get_from_filename(const gchar *filename); filetype *filetypes_get_from_filename(const gchar *filename);
void filetypes_create_menu_item(GtkWidget *menu, gchar *label, filetype *ftype);
void filetypes_create_newmenu_item(GtkWidget *menu, gchar *label, filetype *ftype);
/* frees the array and all related pointers */ /* frees the array and all related pointers */
void filetypes_free_types(void); void filetypes_free_types(void);
gchar *filetypes_get_template(filetype *ft); gchar *filetypes_get_template(filetype *ft);
void filetypes_get_config(GKeyFile *config, gint ft);
#endif #endif
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#define GEANY_CODENAME "Nivers" #define GEANY_CODENAME "Nivers"
#define GEANY_HOMEPAGE "http://geany.uvena.de/" #define GEANY_HOMEPAGE "http://geany.uvena.de/"
#define GEANY_MAX_OPEN_FILES 25 #define GEANY_MAX_OPEN_FILES 25
#define GEANY_SESSION_FILES 15 #define GEANY_SESSION_FILES 25
#define GEANY_MAX_TAGS_COUNT 1000 #define GEANY_MAX_TAGS_COUNT 1000
#define GEANY_CHECK_FILE_DELAY 30 #define GEANY_CHECK_FILE_DELAY 30
#define GEANY_WORDCHARS "_#&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" #define GEANY_WORDCHARS "_#&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
...@@ -129,8 +129,10 @@ typedef struct MyApp ...@@ -129,8 +129,10 @@ typedef struct MyApp
gboolean fullscreen; gboolean fullscreen;
gboolean beep_on_errors; gboolean beep_on_errors;
gboolean switch_msgwin_pages; gboolean switch_msgwin_pages;
gboolean tab_order_ltr;
gboolean show_markers_margin; gboolean show_markers_margin;
gboolean show_linenumber_margin; gboolean show_linenumber_margin;
gboolean brace_match_ltgt;
gboolean main_window_realized; gboolean main_window_realized;
// I know, it is a bit confusing, but this line breaking is globally, // I know, it is a bit confusing, but this line breaking is globally,
// to change the default value at startup, I think // to change the default value at startup, I think
...@@ -151,7 +153,7 @@ typedef struct MyApp ...@@ -151,7 +153,7 @@ typedef struct MyApp
gboolean pref_main_confirm_exit; gboolean pref_main_confirm_exit;
gboolean pref_main_show_search; gboolean pref_main_show_search;
gboolean pref_main_show_goto; gboolean pref_main_show_goto;
gint cur_idx; // currently only used by he build system (build_spawn_cmd) gint cur_idx; // currently only used by the build system (build_spawn_cmd)
gint mru_length; gint mru_length;
gint long_line_column; gint long_line_column;
#ifdef HAVE_FIFO #ifdef HAVE_FIFO
...@@ -172,27 +174,14 @@ typedef struct MyApp ...@@ -172,27 +174,14 @@ typedef struct MyApp
gchar *configdir; gchar *configdir;
gchar *search_text; gchar *search_text;
gchar *terminal_settings; gchar *terminal_settings;
gchar *build_args_inc;
gchar *build_args_libs;
gchar *build_args_prog;
gchar build_make_custopt[256]; gchar build_make_custopt[256];
gchar *build_browser_cmd; gchar *build_browser_cmd;
gchar *build_c_cmd;
gchar *build_cpp_cmd;
/* I called it fpc (www.freepascal.org) to demonstrate I mean a pascal compiler,
* but feel free to use the GNU one as well */
gchar *build_fpc_cmd;
gchar *build_tex_dvi_cmd;
gchar *build_tex_pdf_cmd;
gchar *build_tex_view_dvi_cmd;
gchar *build_tex_view_pdf_cmd;
gchar *build_java_cmd;
gchar *build_javac_cmd;
gchar *build_make_cmd; gchar *build_make_cmd;
gchar *build_term_cmd; gchar *build_term_cmd;
gchar **recent_files; gchar **recent_files;
GtkIconSize toolbar_icon_size; GtkIconSize toolbar_icon_size;
GtkWidget *toolbar; GtkWidget *toolbar;
GtkWidget *run_button;
GtkWidget *compile_button; GtkWidget *compile_button;
GtkWidget *compile_button_image; GtkWidget *compile_button_image;
GtkWidget *tagbar; GtkWidget *tagbar;
...@@ -219,16 +208,13 @@ typedef struct MyApp ...@@ -219,16 +208,13 @@ typedef struct MyApp
GtkWidget *find_dialog; GtkWidget *find_dialog;
GtkWidget *replace_dialog; GtkWidget *replace_dialog;
GtkWidget *default_tag_tree; GtkWidget *default_tag_tree;
//GtkTreeStore *default_tag_store;
const TMWorkspace *tm_workspace; const TMWorkspace *tm_workspace;
GQueue *recent_queue; GQueue *recent_queue;
} MyApp; } MyApp;
MyApp *app; MyApp *app;
gint this_year;
gint this_month;
gint this_day;
// small struct to track tag name and type together // small struct to track tag name and type together
...@@ -275,4 +261,5 @@ extern langType getNamedLanguage(const char *const name); ...@@ -275,4 +261,5 @@ extern langType getNamedLanguage(const char *const name);
// implementation in main.c // implementation in main.c
void geany_debug(gchar const *format, ...); void geany_debug(gchar const *format, ...);
#endif #endif
This diff is collapsed.
...@@ -27,8 +27,9 @@ ...@@ -27,8 +27,9 @@
typedef struct typedef struct
{ {
gint styling[55][4]; gint styling[55][4];
gchar **keywords; gchar **keywords;
gchar *wordchars;
} style_set; } style_set;
...@@ -38,9 +39,11 @@ void styleset_common(ScintillaObject *sci, gint style_bits); ...@@ -38,9 +39,11 @@ void styleset_common(ScintillaObject *sci, gint style_bits);
void styleset_c(ScintillaObject *sci); void styleset_c(ScintillaObject *sci);
void styleset_cpp(ScintillaObject *sci);
void styleset_makefile(ScintillaObject *sci); void styleset_makefile(ScintillaObject *sci);
void styleset_tex(ScintillaObject *sci); void styleset_latex(ScintillaObject *sci);
void styleset_php(ScintillaObject *sci); void styleset_php(ScintillaObject *sci);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment