Revision: 5237 http://geany.svn.sourceforge.net/geany/?rev=5237&view=rev Author: ntrel Date: 2010-09-16 15:31:23 +0000 (Thu, 16 Sep 2010)
Log Message: ----------- Add msgwin_set_messages_dir() to API (patch by Ji?\197?\153?\195?\173 Techet, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/geanyfunctions.h trunk/src/msgwindow.c trunk/src/msgwindow.h trunk/src/plugindata.h trunk/src/plugins.c trunk/src/search.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-16 15:18:56 UTC (rev 5236) +++ trunk/ChangeLog 2010-09-16 15:31:23 UTC (rev 5237) @@ -1,11 +1,5 @@ -2010-09-15 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> +2010-09-16 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
- * src/keyfile.c: - Save document indent width with the session. - * src/ui_utils.h, src/socket.c, src/ui_utils.c, doc/geany.txt, - doc/geany.html, TODO: - Use a separate socket per workspace on X (patch by Erik de Castro - Lopo, thanks). * src/callbacks.c: Prompt for reloading if the document has an undo stack to avoid losing undo ability on accidental reloading (patch by Colomban @@ -17,8 +11,21 @@ notebook tab (patch by Jiří Techet, thanks). * src/ui_utils.h, src/plugindata.h, src/main.c: Add main_widgets.project_menu to API (patch by Jiří Techet, thanks). + * src/plugindata.h, src/msgwindow.c, src/msgwindow.h, src/search.c, + src/plugins.c, plugins/geanyfunctions.h: + Add msgwin_set_messages_dir() to API (patch by Jiří Techet, thanks).
+2010-09-15 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/keyfile.c: + Save document indent width with the session. + * src/ui_utils.h, src/socket.c, src/ui_utils.c, doc/geany.txt, + doc/geany.html, TODO: + Use a separate socket per workspace on X (patch by Erik de Castro + Lopo, thanks). + + 2010-09-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/main.c:
Modified: trunk/plugins/geanyfunctions.h =================================================================== --- trunk/plugins/geanyfunctions.h 2010-09-16 15:18:56 UTC (rev 5236) +++ trunk/plugins/geanyfunctions.h 2010-09-16 15:31:23 UTC (rev 5237) @@ -296,6 +296,8 @@ geany_functions->p_msgwin->msgwin_clear_tab #define msgwin_switch_tab \ geany_functions->p_msgwin->msgwin_switch_tab +#define msgwin_set_messages_dir \ + geany_functions->p_msgwin->msgwin_set_messages_dir #define encodings_convert_to_utf8 \ geany_functions->p_encodings->encodings_convert_to_utf8 #define encodings_convert_to_utf8_from_charset \
Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2010-09-16 15:18:56 UTC (rev 5236) +++ trunk/src/msgwindow.c 2010-09-16 15:31:23 UTC (rev 5237) @@ -86,6 +86,16 @@ }
+/** Sets the Messages path for opening any parsed filenames without absolute path + * from message lines. + * @param messages_dir The directory. **/ +void msgwin_set_messages_dir(const gchar *messages_dir) +{ + g_free(msgwindow.messages_dir); + msgwindow.messages_dir = g_strdup(messages_dir); +} + + void msgwin_init(void) { msgwindow.notebook = ui_lookup_widget(main_widgets.window, "notebook_info"); @@ -93,7 +103,7 @@ msgwindow.tree_msg = ui_lookup_widget(main_widgets.window, "treeview4"); msgwindow.tree_compiler = ui_lookup_widget(main_widgets.window, "treeview5"); msgwindow.scribble = ui_lookup_widget(main_widgets.window, "textview_scribble"); - msgwindow.find_in_files_dir = NULL; + msgwindow.messages_dir = NULL;
prepare_status_tree_view(); prepare_msg_tree_view(); @@ -109,7 +119,7 @@
void msgwin_finalize(void) { - g_free(msgwindow.find_in_files_dir); + g_free(msgwindow.messages_dir); }
@@ -1058,8 +1068,8 @@ parse_file_line(&data, filename, line);
/* FIF dir should be set, but a plugin might not have set it */ - if (msgwindow.find_in_files_dir != NULL) - make_absolute(filename, msgwindow.find_in_files_dir); + if (msgwindow.messages_dir != NULL) + make_absolute(filename, msgwindow.messages_dir); }
Modified: trunk/src/msgwindow.h =================================================================== --- trunk/src/msgwindow.h 2010-09-16 15:18:56 UTC (rev 5236) +++ trunk/src/msgwindow.h 2010-09-16 15:31:23 UTC (rev 5237) @@ -62,7 +62,7 @@ GtkWidget *popup_msg_menu; GtkWidget *popup_compiler_menu; GtkWidget *notebook; - gchar *find_in_files_dir; + gchar *messages_dir; } MessageWindow;
extern MessageWindow msgwindow; @@ -91,7 +91,9 @@
void msgwin_show_hide_tabs(void);
+void msgwin_set_messages_dir(const gchar *messages_dir);
+ void msgwin_menu_add_common_items(GtkMenu *menu);
gboolean msgwin_goto_compiler_file_line(guint keyval);
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2010-09-16 15:18:56 UTC (rev 5236) +++ trunk/src/plugindata.h 2010-09-16 15:31:23 UTC (rev 5237) @@ -493,6 +493,7 @@ const gchar *format, ...) G_GNUC_PRINTF (4, 5); void (*msgwin_clear_tab) (gint tabnum); void (*msgwin_switch_tab) (gint tabnum, gboolean show); + void (*msgwin_set_messages_dir) (const gchar *messages_dir); } MsgWinFuncs;
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2010-09-16 15:18:56 UTC (rev 5236) +++ trunk/src/plugins.c 2010-09-16 15:31:23 UTC (rev 5237) @@ -259,7 +259,8 @@ &msgwin_compiler_add, &msgwin_msg_add, &msgwin_clear_tab, - &msgwin_switch_tab + &msgwin_switch_tab, + &msgwin_set_messages_dir };
static EncodingFuncs encoding_funcs = {
Modified: trunk/src/search.c =================================================================== --- trunk/src/search.c 2010-09-16 15:18:56 UTC (rev 5236) +++ trunk/src/search.c 2010-09-16 15:31:23 UTC (rev 5237) @@ -1478,8 +1478,7 @@
ui_progress_bar_start(_("Searching..."));
- g_free(msgwindow.find_in_files_dir); - msgwindow.find_in_files_dir = g_strdup(dir); + msgwin_set_messages_dir(dir); /* we can pass 'enc' without strdup'ing it here because it's a global const string and * always exits longer than the lifetime of this function */ utils_set_up_io_channel(stdout_fd, G_IO_IN | G_IO_PRI | G_IO_ERR | G_IO_HUP | G_IO_NVAL,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.