forked from AuroraMiddleware/gtk
Deprecate gtk_file_chooser_*_new_with_backend(), since GIO is already used
2008-08-04 Carlos Garnacho <carlos@imendio.com> * gtk/gtk.symbols: * gtk/gtkfilechooserbutton.[ch]: * gtk/gtkfilechooserdefault.[ch]: * gtk/gtkfilechooserdialog.[ch]: * gtk/gtkfilechooserwidget.[ch]: Deprecate gtk_file_chooser_*_new_with_backend(), since GIO is already used directly. Fixes #545976. svn path=/trunk/; revision=20972
This commit is contained in:
parent
02c65db5c0
commit
7e439efc92
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2008-08-04 Carlos Garnacho <carlos@imendio.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
* gtk/gtkfilechooserbutton.[ch]:
|
||||
* gtk/gtkfilechooserdefault.[ch]:
|
||||
* gtk/gtkfilechooserdialog.[ch]:
|
||||
* gtk/gtkfilechooserwidget.[ch]: Deprecate
|
||||
gtk_file_chooser_*_new_with_backend(), since GIO is already used
|
||||
directly. Fixes #545976.
|
||||
|
||||
2008-08-04 Carlos Garnacho <carlos@imendio.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
|
@ -1446,17 +1446,21 @@ gtk_file_chooser_unselect_uri
|
||||
#if IN_FILE(__GTK_FILE_CHOOSER_DIALOG_C__)
|
||||
gtk_file_chooser_dialog_get_type G_GNUC_CONST
|
||||
gtk_file_chooser_dialog_new
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_file_chooser_dialog_new_with_backend
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_FILE_CHOOSER_WIDGET_H__)
|
||||
#if IN_FILE(__GTK_FILE_CHOOSER_WIDGET_C__)
|
||||
gtk_file_chooser_widget_get_type G_GNUC_CONST
|
||||
gtk_file_chooser_widget_new
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_file_chooser_widget_new_with_backend
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_FILE_CHOOSER_BUTTON_H__)
|
||||
#if IN_FILE(__GTK_FILE_CHOOSER_BUTTON_C__)
|
||||
@ -1464,7 +1468,9 @@ gtk_file_chooser_button_get_title
|
||||
gtk_file_chooser_button_get_type G_GNUC_CONST
|
||||
gtk_file_chooser_button_get_width_chars
|
||||
gtk_file_chooser_button_new
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_file_chooser_button_new_with_backend
|
||||
#endif
|
||||
gtk_file_chooser_button_new_with_dialog
|
||||
gtk_file_chooser_button_set_title
|
||||
gtk_file_chooser_button_set_width_chars
|
||||
|
@ -137,7 +137,6 @@ struct _GtkFileChooserButtonPrivate
|
||||
GtkTreeModel *model;
|
||||
GtkTreeModel *filter_model;
|
||||
|
||||
gchar *backend;
|
||||
GtkFileSystem *fs;
|
||||
GFile *old_file;
|
||||
|
||||
@ -646,23 +645,13 @@ gtk_file_chooser_button_constructor (GType type,
|
||||
|
||||
if (!priv->dialog)
|
||||
{
|
||||
if (priv->backend)
|
||||
priv->dialog = gtk_file_chooser_dialog_new_with_backend (NULL, NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
priv->backend,
|
||||
GTK_STOCK_CANCEL,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN,
|
||||
GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
else
|
||||
priv->dialog = gtk_file_chooser_dialog_new (NULL, NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN,
|
||||
GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
priv->dialog = gtk_file_chooser_dialog_new (NULL, NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN,
|
||||
GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (priv->dialog),
|
||||
GTK_RESPONSE_ACCEPT);
|
||||
@ -685,9 +674,6 @@ gtk_file_chooser_button_constructor (GType type,
|
||||
g_free (current_folder);
|
||||
}
|
||||
|
||||
g_free (priv->backend);
|
||||
priv->backend = NULL;
|
||||
|
||||
g_signal_connect (priv->dialog, "delete_event",
|
||||
G_CALLBACK (dialog_delete_event_cb), object);
|
||||
g_signal_connect (priv->dialog, "response",
|
||||
@ -834,8 +820,7 @@ gtk_file_chooser_button_set_property (GObject *object,
|
||||
break;
|
||||
|
||||
case GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND:
|
||||
/* Construct-only */
|
||||
priv->backend = g_value_dup_string (value);
|
||||
/* Ignore property */
|
||||
break;
|
||||
|
||||
case GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE:
|
||||
@ -2755,6 +2740,7 @@ gtk_file_chooser_button_new (const gchar *title,
|
||||
* Returns: a new button widget.
|
||||
*
|
||||
* Since: 2.6
|
||||
* Deprecated: 2.14
|
||||
**/
|
||||
GtkWidget *
|
||||
gtk_file_chooser_button_new_with_backend (const gchar *title,
|
||||
@ -2767,7 +2753,6 @@ gtk_file_chooser_button_new_with_backend (const gchar *title,
|
||||
return g_object_new (GTK_TYPE_FILE_CHOOSER_BUTTON,
|
||||
"action", action,
|
||||
"title", (title ? title : _(DEFAULT_TITLE)),
|
||||
"file-system-backend", backend,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -69,9 +69,13 @@ struct _GtkFileChooserButtonClass
|
||||
GType gtk_file_chooser_button_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget * gtk_file_chooser_button_new (const gchar *title,
|
||||
GtkFileChooserAction action);
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
GtkWidget * gtk_file_chooser_button_new_with_backend (const gchar *title,
|
||||
GtkFileChooserAction action,
|
||||
const gchar *backend);
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
GtkWidget * gtk_file_chooser_button_new_with_dialog (GtkWidget *dialog);
|
||||
G_CONST_RETURN gchar *gtk_file_chooser_button_get_title (GtkFileChooserButton *button);
|
||||
void gtk_file_chooser_button_set_title (GtkFileChooserButton *button,
|
||||
|
@ -11010,11 +11010,9 @@ list_mtime_data_func (GtkTreeViewColumn *tree_column,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
_gtk_file_chooser_default_new (const char *file_system)
|
||||
_gtk_file_chooser_default_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_FILE_CHOOSER_DEFAULT,
|
||||
"file-system-backend", file_system,
|
||||
NULL);
|
||||
return g_object_new (GTK_TYPE_FILE_CHOOSER_DEFAULT, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -33,7 +33,7 @@ G_BEGIN_DECLS
|
||||
typedef struct _GtkFileChooserDefault GtkFileChooserDefault;
|
||||
|
||||
GType _gtk_file_chooser_default_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget *_gtk_file_chooser_default_new (const char *file_system);
|
||||
GtkWidget *_gtk_file_chooser_default_new (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -466,7 +466,6 @@ gtk_file_chooser_dialog_new_valist (const gchar *title,
|
||||
result = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG,
|
||||
"title", title,
|
||||
"action", action,
|
||||
"file-system-backend", backend,
|
||||
NULL);
|
||||
|
||||
if (parent)
|
||||
@ -533,6 +532,7 @@ gtk_file_chooser_dialog_new (const gchar *title,
|
||||
* Return value: a new #GtkFileChooserDialog
|
||||
*
|
||||
* Since: 2.4
|
||||
* Deprecated: 2.14
|
||||
**/
|
||||
GtkWidget *
|
||||
gtk_file_chooser_dialog_new_with_backend (const gchar *title,
|
||||
|
@ -59,12 +59,15 @@ GtkWidget *gtk_file_chooser_dialog_new (const gchar *title
|
||||
GtkFileChooserAction action,
|
||||
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
|
||||
|
||||
|
@ -100,7 +100,7 @@ gtk_file_chooser_widget_constructor (GType type,
|
||||
|
||||
gtk_widget_push_composite_child ();
|
||||
|
||||
priv->impl = _gtk_file_chooser_default_new (priv->file_system);
|
||||
priv->impl = _gtk_file_chooser_default_new ();
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (object), priv->impl, TRUE, TRUE, 0);
|
||||
gtk_widget_show (priv->impl);
|
||||
@ -181,6 +181,7 @@ gtk_file_chooser_widget_new (GtkFileChooserAction action)
|
||||
* Return value: a new #GtkFileChooserWidget
|
||||
*
|
||||
* Since: 2.4
|
||||
* Deprecated: 2.14
|
||||
**/
|
||||
GtkWidget *
|
||||
gtk_file_chooser_widget_new_with_backend (GtkFileChooserAction action,
|
||||
@ -188,7 +189,6 @@ gtk_file_chooser_widget_new_with_backend (GtkFileChooserAction action,
|
||||
{
|
||||
return g_object_new (GTK_TYPE_FILE_CHOOSER_WIDGET,
|
||||
"action", action,
|
||||
"file-system-backend", backend,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -55,8 +55,13 @@ 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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user