summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2006-08-08 00:42:53 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2006-08-08 00:42:53 +0000
commit0b116bda491538a6f74600fbf508ada946a7ccee (patch)
treebae560c0b3e85a8509155082bb4b529ce14c317f
parent5f88879fa424d49f33bb321783d4db8736fe0faa (diff)
downloadmdk-0b116bda491538a6f74600fbf508ada946a7ccee.tar.gz
mdk-0b116bda491538a6f74600fbf508ada946a7ccee.tar.bz2
Only executable files can be selected in external programs dialog
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-30
-rw-r--r--mixgtk/mixgtk_external.c9
1 files changed, 9 insertions, 0 deletions
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