Revision: 599 Author: ntrel Date: 2006-07-21 12:35:33 -0700 (Fri, 21 Jul 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=599&view=rev
Log Message: ----------- Prevent using Find in files for unnamed files
Modified Paths: -------------- trunk/ChangeLog trunk/src/dialogs.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-07-21 11:41:33 UTC (rev 598) +++ trunk/ChangeLog 2006-07-21 19:35:33 UTC (rev 599) @@ -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
* src/geany.h, src/main.c, src/callbacks.c:
Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2006-07-21 11:41:33 UTC (rev 598) +++ trunk/src/dialogs.c 2006-07-21 19:35:33 UTC (rev 599) @@ -1032,6 +1032,13 @@
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) { GtkWidget *label; @@ -1086,10 +1093,9 @@ g_free(sel); gtk_widget_grab_focus(entry);
- cur_dir = utils_get_current_file_dir(); dirtext = g_strdup_printf(_("Current directory: %s"), cur_dir); + gtk_label_set_text(GTK_LABEL(dirlabel), dirtext); g_free(cur_dir); - gtk_label_set_text(GTK_LABEL(dirlabel), dirtext); g_free(dirtext);
gtk_widget_show(app->find_in_files_dialog);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.