From c6abec61b0f12746d76704c208a57f70eafcb6c2 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Wed, 26 Jul 2006 14:27:24 +0000 Subject: [PATCH] Don't add .c extension for All files filter. Only set open tool dialog path if it exists git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@635 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/win32.c b/src/win32.c index b71e4a79..ef1ca562 100644 --- a/src/win32.c +++ b/src/win32.c @@ -110,7 +110,7 @@ void win32_show_file_dialog(gboolean file_open) of.nMaxFile = 2048; of.lpstrFileTitle = NULL; of.lpstrTitle = NULL; - of.lpstrDefExt = "c"; + of.lpstrDefExt = ""; if (file_open) { of.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST | OFN_EXPLORER; @@ -258,7 +258,7 @@ void win32_show_pref_file_dialog(GtkEntry *item) // cut the options from the command line field = g_strsplit(gtk_entry_get_text(GTK_ENTRY(item)), " ", 2); - if (field[0]) + if (field[0] && g_file_test(field[0], G_FILE_TEST_EXISTS)) { filename = g_find_program_in_path(field[0]); strcpy(fname, filename);