Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: Frank Lanitz frank@frank.uvena.de Date: Sat, 09 Jun 2012 09:01:25 Commit: b56fcd1beabc9a6a575d58c83ef7b9dcdf7f0dec https://github.com/geany/geany-plugins/commit/b56fcd1beabc9a6a575d58c83ef7b9...
Log Message: ----------- Merge pull request #37 from b4n/fixes/codenav
A few fixes for the CodeNav plugin Didn't do any detailed check - due to trust ;)
Modified Paths: -------------- codenav/src/codenavigation.c codenav/src/codenavigation.h codenav/src/goto_file.c codenav/src/goto_file.h codenav/src/switch_head_impl.c codenav/src/switch_head_impl.h
Modified: codenav/src/codenavigation.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -85,10 +85,10 @@ void plugin_init(GeanyData *data) */ GtkWidget *plugin_configure(GtkDialog *dialog) { - log_func(); - GtkWidget *vbox;
+ log_func(); + vbox = gtk_vbox_new(FALSE, 6);
/* Switch header/implementation widget */
Modified: codenav/src/codenavigation.h 5 files changed, 2 insertions(+), 3 deletions(-) =================================================================== @@ -62,11 +62,10 @@ static void log_debug(const gchar* s, ...) va_end(l); }
-#define log_func() g_print("[CODENAV FUNC] : %s", __func__) /* NB : this needs the C99 standard, but is only - used when debugging, so no problem :) */ +#define log_func() g_print("[CODENAV FUNC] : %s", G_STRFUNC) #else static void log_debug(const gchar* s, ...) {} -static void log_func() {} +#define log_func() {} #endif
/* IDs for keybindings */
Modified: codenav/src/goto_file.c 13 files changed, 8 insertions(+), 5 deletions(-) =================================================================== @@ -45,11 +45,13 @@ * --------------------------------------------------------------------- */ void -goto_file_init() +goto_file_init(void) { + GtkWidget* edit_menu; + log_func();
- GtkWidget* edit_menu = ui_lookup_widget(geany->main_widgets->window, "edit1_menu"); + edit_menu = ui_lookup_widget(geany->main_widgets->window, "edit1_menu");
/* Add the menu item, sensitive only when a document is opened */ menu_item = gtk_menu_item_new_with_mnemonic(_("Goto file")); @@ -75,7 +77,7 @@ * --------------------------------------------------------------------- */ void -goto_file_cleanup() +goto_file_cleanup(void) { log_func();
@@ -89,11 +91,12 @@ static void menu_item_activate(guint key_id) { + GtkWidget *dialog; + log_func();
/* TODO */ - - GtkWidget *dialog = gtk_message_dialog_new( + dialog = gtk_message_dialog_new( GTK_WINDOW(geany->main_widgets->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO,
Modified: codenav/src/goto_file.h 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -27,10 +27,10 @@
/* Initialization */ void -goto_file_init(); +goto_file_init(void);
/* Cleanup */ void -goto_file_cleanup(); +goto_file_cleanup(void);
#endif /* GOTO_FILE_H */
Modified: codenav/src/switch_head_impl.c 18 files changed, 11 insertions(+), 7 deletions(-) =================================================================== @@ -54,7 +54,7 @@ /********************** Functions for the feature *********************/
static void -fill_default_languages_list(); +fill_default_languages_list(void);
static void menu_item_activate(guint key_id); @@ -73,11 +73,13 @@ * --------------------------------------------------------------------- */ void -switch_head_impl_init() +switch_head_impl_init(void) { + GtkWidget* edit_menu; + log_func();
- GtkWidget* edit_menu = ui_lookup_widget(geany->main_widgets->window, "edit1_menu"); + edit_menu = ui_lookup_widget(geany->main_widgets->window, "edit1_menu");
/* Add the menu item and make it sensitive only when a document is opened */ menu_item = gtk_menu_item_new_with_mnemonic(_("Switch header/implementation")); @@ -106,7 +108,7 @@ * --------------------------------------------------------------------- */ void -switch_head_impl_cleanup() +switch_head_impl_cleanup(void) { GSList* iter = NULL;
@@ -134,7 +136,7 @@ * --------------------------------------------------------------------- */ static void -fill_default_languages_list() +fill_default_languages_list(void) { Language* lang = NULL;
@@ -356,9 +358,11 @@
/* Third : if not found, ask the user if he wants to create it or not. */ { + GtkWidget* dialog; + p_str = g_strdup_printf("%s.%s", basename_no_extension, (const gchar*)(p_extensions_to_test->data));
- GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(geany_data->main_widgets->window), + dialog = gtk_message_dialog_new( GTK_WINDOW(geany_data->main_widgets->window), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, @@ -441,7 +445,7 @@
/* ----- Finally, the configuration widget ----- */ GtkWidget* -switch_head_impl_config_widget() +switch_head_impl_config_widget(void) { GtkWidget *frame, *vbox, *tree_view; GtkWidget *hbox_buttons, *add_button, *remove_button;
Modified: codenav/src/switch_head_impl.h 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -27,15 +27,15 @@
/* Initialization */ void -switch_head_impl_init(); +switch_head_impl_init(void);
/* Cleanup */ void -switch_head_impl_cleanup(); +switch_head_impl_cleanup(void);
/* Configuration widget */ GtkWidget* -switch_head_impl_config_widget(); +switch_head_impl_config_widget(void);
/* Write the configuration of the feature */ void
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).