[gedit] FileChooserDialog: remove add_pattern_filter() (now dead code)
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] FileChooserDialog: remove add_pattern_filter() (now dead code)
- Date: Wed, 3 Jun 2020 19:22:54 +0000 (UTC)
commit 4f5a5681badf32232cfe83a106ce07db2deea4ad
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Jun 3 21:14:20 2020 +0200
FileChooserDialog: remove add_pattern_filter() (now dead code)
It was used by the preferences dialog, but now the preferences dialog
uses GtkFileChooserNative.
gedit/gedit-file-chooser-dialog-gtk.c | 21 ---------------------
gedit/gedit-file-chooser-dialog.c | 17 -----------------
gedit/gedit-file-chooser-dialog.h | 8 --------
3 files changed, 46 deletions(-)
---
diff --git a/gedit/gedit-file-chooser-dialog-gtk.c b/gedit/gedit-file-chooser-dialog-gtk.c
index 5527b5119..c61b902f7 100644
--- a/gedit/gedit-file-chooser-dialog-gtk.c
+++ b/gedit/gedit-file-chooser-dialog-gtk.c
@@ -224,26 +224,6 @@ chooser_get_window (GeditFileChooserDialog *dialog)
return GTK_WINDOW (dialog);
}
-static void
-chooser_add_pattern_filter (GeditFileChooserDialog *dialog,
- const gchar *name,
- const gchar *pattern)
-{
- GtkFileFilter *filter;
-
- filter = gtk_file_filter_new ();
-
- gtk_file_filter_set_name (filter, name);
- gtk_file_filter_add_pattern (filter, pattern);
-
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
-
- if (gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (dialog)) == NULL)
- {
- gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
- }
-}
-
static void
gedit_file_chooser_dialog_gtk_chooser_init (gpointer g_iface,
gpointer iface_data)
@@ -266,7 +246,6 @@ gedit_file_chooser_dialog_gtk_chooser_init (gpointer g_iface,
iface->destroy = chooser_destroy;
iface->set_modal = chooser_set_modal;
iface->get_window = chooser_get_window;
- iface->add_pattern_filter = chooser_add_pattern_filter;
}
static void
diff --git a/gedit/gedit-file-chooser-dialog.c b/gedit/gedit-file-chooser-dialog.c
index 24459255d..d52cfaed3 100644
--- a/gedit/gedit-file-chooser-dialog.c
+++ b/gedit/gedit-file-chooser-dialog.c
@@ -293,21 +293,4 @@ gedit_file_chooser_dialog_get_window (GeditFileChooserDialog *dialog)
return NULL;
}
-void
-gedit_file_chooser_dialog_add_pattern_filter (GeditFileChooserDialog *dialog,
- const gchar *name,
- const gchar *pattern)
-{
- GeditFileChooserDialogInterface *iface;
-
- g_return_if_fail (GEDIT_IS_FILE_CHOOSER_DIALOG (dialog));
-
- iface = GEDIT_FILE_CHOOSER_DIALOG_GET_IFACE (dialog);
-
- if (iface->add_pattern_filter)
- {
- iface->add_pattern_filter (dialog, name, pattern);
- }
-}
-
/* ex:set ts=8 noet: */
diff --git a/gedit/gedit-file-chooser-dialog.h b/gedit/gedit-file-chooser-dialog.h
index 64686f2c6..4a2e7b767 100644
--- a/gedit/gedit-file-chooser-dialog.h
+++ b/gedit/gedit-file-chooser-dialog.h
@@ -73,10 +73,6 @@ struct _GeditFileChooserDialogInterface
GtkWindow *
(*get_window) (GeditFileChooserDialog *dialog);
-
- void (*add_pattern_filter) (GeditFileChooserDialog *dilaog,
- const gchar *name,
- const gchar *pattern);
};
typedef enum
@@ -136,10 +132,6 @@ void gedit_file_chooser_dialog_set_modal
(GeditFileChooserDialog *dialog,
GtkWindow *gedit_file_chooser_dialog_get_window (GeditFileChooserDialog *dialog);
-void gedit_file_chooser_dialog_add_pattern_filter (GeditFileChooserDialog *dialog,
- const gchar *name,
- const gchar *pattern);
-
G_END_DECLS
#endif /* GEDIT_FILE_CHOOSER_DIALOG_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]