[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: PCB: Change default file-filter in open-dialog
Hello,
I wondered, why the file-filter at the open-dialogs of pcb is not
selected by default. For me, it is more comfortable if there are just
the files shown, which can be loaded by this programm/function. I have
also looked at other software and most of them do this this way (the
only one I found which shows all files by default is OpenOffice.org).
I appended a patch which changes this behaviour.
Any comments are welcome!
Felix
@The main developers: I do not send this patch to the
sourceforge-patch-tracker now because I think, this Patch is not really
essential. If it is easier for you if I send all my patches to the
tracker, please send me a message and I will add this one (and all later
patches)!
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index ec91233..6671758 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -280,13 +280,6 @@ ghid_dialog_file_select_open (gchar * title, gchar ** path, gchar * shortcuts)
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
- /* add a default filter for not filtering files */
- no_filter = gtk_file_filter_new ();
- gtk_file_filter_set_name (no_filter, "all");
- gtk_file_filter_add_pattern (no_filter, "*.*");
- gtk_file_filter_add_pattern (no_filter, "*");
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), no_filter);
-
/* in case we have a dialog for loading a footprint file */
if (strcmp (title, _("Load element to buffer")) == 0)
{
@@ -326,6 +319,13 @@ ghid_dialog_file_select_open (gchar * title, gchar ** path, gchar * shortcuts)
gtk_file_filter_add_pattern (net_filter, "*.NET");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), net_filter);
}
+
+ /* add a default filter for not filtering files */
+ no_filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name (no_filter, "all");
+ gtk_file_filter_add_pattern (no_filter, "*.*");
+ gtk_file_filter_add_pattern (no_filter, "*");
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), no_filter);
if (path && *path)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), *path);
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user