Prevent using Find in files for unnamed files
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@599 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
978a6fee93
commit
b625529c8b
@ -1,3 +1,8 @@
|
|||||||
|
2006-07-21 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||||
|
|
||||||
|
* src/dialogs.c: Prevent using Find in files for unnamed files.
|
||||||
|
|
||||||
|
|
||||||
2006-07-21 Enrico Tröger <enrico.troeger@uvena.de>
|
2006-07-21 Enrico Tröger <enrico.troeger@uvena.de>
|
||||||
|
|
||||||
* src/geany.h, src/main.c, src/callbacks.c:
|
* src/geany.h, src/main.c, src/callbacks.c:
|
||||||
|
@ -1032,6 +1032,13 @@ void dialogs_show_find_in_files(void)
|
|||||||
|
|
||||||
if (idx == -1 || ! doc_list[idx].is_valid) return;
|
if (idx == -1 || ! doc_list[idx].is_valid) return;
|
||||||
|
|
||||||
|
cur_dir = utils_get_current_file_dir();
|
||||||
|
if (cur_dir == NULL)
|
||||||
|
{
|
||||||
|
utils_set_statusbar(_("Invalid directory for find in files."), FALSE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (app->find_in_files_dialog == NULL)
|
if (app->find_in_files_dialog == NULL)
|
||||||
{
|
{
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
@ -1086,10 +1093,9 @@ void dialogs_show_find_in_files(void)
|
|||||||
g_free(sel);
|
g_free(sel);
|
||||||
gtk_widget_grab_focus(entry);
|
gtk_widget_grab_focus(entry);
|
||||||
|
|
||||||
cur_dir = utils_get_current_file_dir();
|
|
||||||
dirtext = g_strdup_printf(_("Current directory: %s"), cur_dir);
|
dirtext = g_strdup_printf(_("Current directory: %s"), cur_dir);
|
||||||
g_free(cur_dir);
|
|
||||||
gtk_label_set_text(GTK_LABEL(dirlabel), dirtext);
|
gtk_label_set_text(GTK_LABEL(dirlabel), dirtext);
|
||||||
|
g_free(cur_dir);
|
||||||
g_free(dirtext);
|
g_free(dirtext);
|
||||||
|
|
||||||
gtk_widget_show(app->find_in_files_dialog);
|
gtk_widget_show(app->find_in_files_dialog);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user