From d21bf0c1ec07c28d412286ee534da11e69a32b8d Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 7 Oct 2009 18:29:01 +0200 Subject: [PATCH] Remove deprecated GtkFileChooser functions --- gtk/gtkfilechooserbutton.c | 32 --------------------------- gtk/gtkfilechooserdefault.c | 4 ---- gtk/gtkfilechooserdialog.c | 43 ------------------------------------- gtk/gtkfilechooserdialog.h | 9 -------- gtk/gtkfilechooserutils.c | 3 --- gtk/gtkfilechooserutils.h | 2 +- gtk/gtkfilechooserwidget.c | 29 ------------------------- gtk/gtkfilechooserwidget.h | 6 ------ 8 files changed, 1 insertion(+), 127 deletions(-) diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index b7227a0be..439e3ded6 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -820,10 +820,6 @@ gtk_file_chooser_button_set_property (GObject *object, fs_bookmarks_changed_cb (priv->fs, button); break; - case GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND: - /* Ignore property */ - break; - case GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE: g_warning ("%s: Choosers of type `%s` do not support selecting multiple files.", G_STRFUNC, G_OBJECT_TYPE_NAME (object)); @@ -856,7 +852,6 @@ gtk_file_chooser_button_get_property (GObject *object, case PROP_TITLE: case GTK_FILE_CHOOSER_PROP_ACTION: - case GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND: case GTK_FILE_CHOOSER_PROP_FILTER: case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY: case GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET: @@ -2738,33 +2733,6 @@ gtk_file_chooser_button_new (const gchar *title, NULL); } -/** - * gtk_file_chooser_button_new_with_backend: - * @title: the title of the browse dialog. - * @action: the open mode for the widget. - * @backend: the name of the #GtkFileSystem backend to use. - * - * Creates a new file-selecting button widget using @backend. - * - * Returns: a new button widget. - * - * Since: 2.6 - * Deprecated: 2.14: Use gtk_file_chooser_button_new() instead. - **/ -GtkWidget * -gtk_file_chooser_button_new_with_backend (const gchar *title, - GtkFileChooserAction action, - const gchar *backend) -{ - g_return_val_if_fail (action == GTK_FILE_CHOOSER_ACTION_OPEN || - action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, NULL); - - return g_object_new (GTK_TYPE_FILE_CHOOSER_BUTTON, - "action", action, - "title", (title ? title : _(DEFAULT_TITLE)), - NULL); -} - /** * gtk_file_chooser_button_new_with_dialog: * @dialog: the widget to use as dialog diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 429e8c4df..114e37109 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -5440,10 +5440,6 @@ gtk_file_chooser_default_set_property (GObject *object, } break; - case GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND: - /* Ignore property */ - break; - case GTK_FILE_CHOOSER_PROP_FILTER: set_current_filter (impl, g_value_get_object (value)); break; diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c index 43a11ce03..327b865d6 100644 --- a/gtk/gtkfilechooserdialog.c +++ b/gtk/gtkfilechooserdialog.c @@ -308,10 +308,6 @@ gtk_file_chooser_dialog_set_property (GObject *object, switch (prop_id) { - case GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND: - g_free (priv->file_system); - priv->file_system = g_value_dup_string (value); - break; default: g_object_set_property (G_OBJECT (priv->widget), pspec->name, value); break; @@ -468,44 +464,5 @@ gtk_file_chooser_dialog_new (const gchar *title, return result; } -/** - * gtk_file_chooser_dialog_new_with_backend: - * @title: (allow-none): Title of the dialog, or %NULL - * @parent: (allow-none): Transient parent of the dialog, or %NULL - * @action: Open or save mode for the dialog - * @backend: The name of the specific filesystem backend to use. - * @first_button_text: (allow-none): stock ID or text to go in the first button, or %NULL - * @Varargs: response ID for the first button, then additional (button, id) pairs, ending with %NULL - * - * Creates a new #GtkFileChooserDialog with a specified backend. This is - * especially useful if you use gtk_file_chooser_set_local_only() to allow - * non-local files and you use a more expressive vfs, such as gnome-vfs, - * to load files. - * - * Return value: a new #GtkFileChooserDialog - * - * Since: 2.4 - * Deprecated: 2.14: Use gtk_file_chooser_dialog_new() instead. - **/ -GtkWidget * -gtk_file_chooser_dialog_new_with_backend (const gchar *title, - GtkWindow *parent, - GtkFileChooserAction action, - const gchar *backend, - const gchar *first_button_text, - ...) -{ - GtkWidget *result; - va_list varargs; - - va_start (varargs, first_button_text); - result = gtk_file_chooser_dialog_new_valist (title, parent, action, - backend, first_button_text, - varargs); - va_end (varargs); - - return result; -} - #define __GTK_FILE_CHOOSER_DIALOG_C__ #include "gtkaliasdef.c" diff --git a/gtk/gtkfilechooserdialog.h b/gtk/gtkfilechooserdialog.h index d79f6f89a..12b90e0c7 100644 --- a/gtk/gtkfilechooserdialog.h +++ b/gtk/gtkfilechooserdialog.h @@ -60,15 +60,6 @@ GtkWidget *gtk_file_chooser_dialog_new (const gchar *title const gchar *first_button_text, ...) G_GNUC_NULL_TERMINATED; -#ifndef GTK_DISABLE_DEPRECATED -GtkWidget *gtk_file_chooser_dialog_new_with_backend (const gchar *title, - GtkWindow *parent, - GtkFileChooserAction action, - const gchar *backend, - const gchar *first_button_text, - ...) G_GNUC_NULL_TERMINATED; -#endif /* GTK_DISABLE_DEPRECATED */ - G_END_DECLS #endif /* __GTK_FILE_CHOOSER_DIALOG_H__ */ diff --git a/gtk/gtkfilechooserutils.c b/gtk/gtkfilechooserutils.c index 69c71d111..1f0847bf9 100644 --- a/gtk/gtkfilechooserutils.c +++ b/gtk/gtkfilechooserutils.c @@ -90,9 +90,6 @@ _gtk_file_chooser_install_properties (GObjectClass *klass) g_object_class_override_property (klass, GTK_FILE_CHOOSER_PROP_EXTRA_WIDGET, "extra-widget"); - g_object_class_override_property (klass, - GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND, - "file-system-backend"); g_object_class_override_property (klass, GTK_FILE_CHOOSER_PROP_FILTER, "filter"); diff --git a/gtk/gtkfilechooserutils.h b/gtk/gtkfilechooserutils.h index a590cccd1..2aff40639 100644 --- a/gtk/gtkfilechooserutils.h +++ b/gtk/gtkfilechooserutils.h @@ -31,7 +31,7 @@ G_BEGIN_DECLS typedef enum { GTK_FILE_CHOOSER_PROP_FIRST = 0x1000, GTK_FILE_CHOOSER_PROP_ACTION = GTK_FILE_CHOOSER_PROP_FIRST, - GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND, + /* GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND, */ GTK_FILE_CHOOSER_PROP_FILTER, GTK_FILE_CHOOSER_PROP_LOCAL_ONLY, GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET, diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index d69d8542b..ca37b1793 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -126,10 +126,6 @@ gtk_file_chooser_widget_set_property (GObject *object, switch (prop_id) { - case GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND: - g_free (priv->file_system); - priv->file_system = g_value_dup_string (value); - break; default: g_object_set_property (G_OBJECT (priv->impl), pspec->name, value); break; @@ -167,30 +163,5 @@ gtk_file_chooser_widget_new (GtkFileChooserAction action) NULL); } -/** - * gtk_file_chooser_widget_new_with_backend: - * @action: Open or save mode for the widget - * @backend: The name of the specific filesystem backend to use. - * - * Creates a new #GtkFileChooserWidget with a specified backend. This is - * especially useful if you use gtk_file_chooser_set_local_only() to allow - * non-local files. This is a file chooser widget that can be embedded in - * custom windows and it is the same widget that is used by - * #GtkFileChooserDialog. - * - * Return value: a new #GtkFileChooserWidget - * - * Since: 2.4 - * Deprecated: 2.14: Use gtk_file_chooser_widget_new() instead. - **/ -GtkWidget * -gtk_file_chooser_widget_new_with_backend (GtkFileChooserAction action, - const gchar *backend) -{ - return g_object_new (GTK_TYPE_FILE_CHOOSER_WIDGET, - "action", action, - NULL); -} - #define __GTK_FILE_CHOOSER_WIDGET_C__ #include "gtkaliasdef.c" diff --git a/gtk/gtkfilechooserwidget.h b/gtk/gtkfilechooserwidget.h index 333531f57..3b970f309 100644 --- a/gtk/gtkfilechooserwidget.h +++ b/gtk/gtkfilechooserwidget.h @@ -56,12 +56,6 @@ struct _GtkFileChooserWidgetClass GType gtk_file_chooser_widget_get_type (void) G_GNUC_CONST; GtkWidget *gtk_file_chooser_widget_new (GtkFileChooserAction action); - -#ifndef GTK_DISABLE_DEPRECATED -GtkWidget *gtk_file_chooser_widget_new_with_backend (GtkFileChooserAction action, - const gchar *backend); -#endif /* GTK_DISABLE_DEPRECATED */ - G_END_DECLS #endif /* __GTK_FILE_CHOOSER_WIDGET_H__ */ -- 2.43.2