Save FIF extra options string in the keyfile.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1451 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2007-04-15 15:59:57 +00:00
parent 2a3f6d00f7
commit 1545968ce3
4 changed files with 25 additions and 1 deletions

View File

@ -7,6 +7,8 @@
* tagmanager/tm_workspace.c:
Add tm_tag_function_t tags in global tags files, so that inline C++
methods (and D functions) get parsed.
* src/keyfile.c, src/search.c, src/search.h:
Save FIF extra options string in the keyfile.
2007-04-13 Enrico Tröger <enrico.troeger@uvena.de>

View File

@ -46,6 +46,7 @@
#include "vte.h"
#include "main.h"
#include "msgwindow.h"
#include "search.h"
static gchar *scribble_text = NULL;
@ -201,7 +202,9 @@ void configuration_save()
g_key_file_set_string(config, "tools", "term_cmd", app->tools_term_cmd ? app->tools_term_cmd : "");
g_key_file_set_string(config, "tools", "browser_cmd", app->tools_browser_cmd ? app->tools_browser_cmd : "");
g_key_file_set_string(config, "tools", "print_cmd", app->tools_print_cmd ? app->tools_print_cmd : "");
g_key_file_set_string(config, "tools", "grep_cmd", app->tools_grep_cmd? app->tools_grep_cmd: "");
g_key_file_set_string(config, "tools", "grep_cmd", app->tools_grep_cmd ? app->tools_grep_cmd : "");
g_key_file_set_string(config, "search", "fif_extra_options", search_prefs.fif_extra_options ? search_prefs.fif_extra_options : "");
for (i = 0; i < app->mru_length; i++)
{
@ -474,6 +477,8 @@ gboolean configuration_load()
app->tools_grep_cmd = utils_get_setting_string(config, "tools", "grep_cmd", tmp_string);
g_free(tmp_string);
search_prefs.fif_extra_options = utils_get_setting_string(config, "search", "fif_extra_options", "");
recent_files = g_key_file_get_string_list(config, "files", "recent_files", &len, NULL);
if (recent_files != NULL)
{

View File

@ -63,6 +63,8 @@ enum {
GeanySearchData search_data;
SearchPrefs search_prefs = {NULL};
static struct
{
GtkWidget *find_dialog;
@ -678,6 +680,8 @@ void search_show_find_in_files_dialog()
gtk_button_set_focus_on_click(GTK_BUTTON(check_extra), FALSE);
entry_extra = gtk_entry_new();
if (search_prefs.fif_extra_options)
gtk_entry_set_text(GTK_ENTRY(entry_extra), search_prefs.fif_extra_options);
g_object_set_data_full(G_OBJECT(widgets.find_in_files_dialog), "entry_extra",
gtk_widget_ref(entry_extra), (GDestroyNotify)gtk_widget_unref);
g_signal_connect(G_OBJECT(entry_extra), "key-press-event",
@ -1106,6 +1110,11 @@ on_find_in_files_dialog_response(GtkDialog *dialog, gint response, gpointer user
const gchar *utf8_dir =
gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(dir_combo))));
// update extra options pref
g_free(search_prefs.fif_extra_options);
search_prefs.fif_extra_options = g_strdup(gtk_entry_get_text(GTK_ENTRY(
lookup_widget(widgets.find_in_files_dialog, "entry_extra"))));
if (utf8_dir == NULL || utils_str_equal(utf8_dir, ""))
ui_set_statusbar(_("Invalid directory for find in files."));
else if (search_text && *search_text)

View File

@ -36,6 +36,14 @@ typedef struct
extern GeanySearchData search_data;
typedef struct
{
gchar *fif_extra_options;
} SearchPrefs;
extern SearchPrefs search_prefs;
void search_init();
void search_finalize();