Kaydet (Commit) 98e6efb3 authored tarafından Nick Treleaven's avatar Nick Treleaven

Add msgwin_set_messages_dir() to API (patch by Jiří Techet, thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5237 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 8b6bcf6d
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,6 +11,19 @@
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>
......
......@@ -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 \
......
......@@ -86,6 +86,16 @@ void msgwin_show_hide_tabs(void)
}
/** 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 @@ void msgwin_init(void)
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_init(void)
void msgwin_finalize(void)
{
g_free(msgwindow.find_in_files_dir);
g_free(msgwindow.messages_dir);
}
......@@ -1058,8 +1068,8 @@ static void msgwin_parse_grep_line(const gchar *string, gchar **filename, gint *
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);
}
......
......@@ -62,7 +62,7 @@ typedef struct
GtkWidget *popup_msg_menu;
GtkWidget *popup_compiler_menu;
GtkWidget *notebook;
gchar *find_in_files_dir;
gchar *messages_dir;
} MessageWindow;
extern MessageWindow msgwindow;
......@@ -91,6 +91,8 @@ void msgwin_status_add(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
void msgwin_show_hide_tabs(void);
void msgwin_set_messages_dir(const gchar *messages_dir);
void msgwin_menu_add_common_items(GtkMenu *menu);
......
......@@ -493,6 +493,7 @@ typedef struct MsgWinFuncs
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;
......
......@@ -259,7 +259,8 @@ static MsgWinFuncs msgwin_funcs = {
&msgwin_compiler_add,
&msgwin_msg_add,
&msgwin_clear_tab,
&msgwin_switch_tab
&msgwin_switch_tab,
&msgwin_set_messages_dir
};
static EncodingFuncs encoding_funcs = {
......
......@@ -1478,8 +1478,7 @@ search_find_in_files(const gchar *utf8_search_text, const gchar *dir, const gcha
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,
......
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