From 0b116bda491538a6f74600fbf508ada946a7ccee Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Tue, 8 Aug 2006 00:42:53 +0000 Subject: Only executable files can be selected in external programs dialog git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-30 --- mixgtk/mixgtk_external.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mixgtk') diff --git a/mixgtk/mixgtk_external.c b/mixgtk/mixgtk_external.c index 182bad6..3922066 100644 --- a/mixgtk/mixgtk_external.c +++ b/mixgtk/mixgtk_external.c @@ -89,6 +89,9 @@ void init_widgets_ (void) { gint k; + GtkFileFilter *filter = gtk_file_filter_new (); + + g_assert (filter); ext_dlg_ = mixgtk_widget_factory_get_dialog (MIXGTK_EXTERNPROG_DIALOG); g_assert (ext_dlg_ != NULL); @@ -99,6 +102,12 @@ init_widgets_ (void) (MIXGTK_EXTERNPROG_DIALOG, ext_wdg_names_[k]); g_assert (ext_wdg_[k]); } + + gtk_file_filter_add_mime_type (filter, "application/x-executable"); + gtk_file_chooser_set_filter + (GTK_FILE_CHOOSER (ext_wdg_[ext_wdg_asm_chooser]), filter); + gtk_file_chooser_set_filter + (GTK_FILE_CHOOSER (ext_wdg_[ext_wdg_ed_chooser]), filter); } void -- cgit v1.2.3