gtk+ r20972 - in trunk: . gtk
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20972 - in trunk: . gtk
- Date: Mon, 4 Aug 2008 14:43:53 +0000 (UTC)
Author: carlosg
Date: Mon Aug 4 14:43:53 2008
New Revision: 20972
URL: http://svn.gnome.org/viewvc/gtk+?rev=20972&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/gtk/gtk.symbols
trunk/gtk/gtkfilechooserbutton.c
trunk/gtk/gtkfilechooserbutton.h
trunk/gtk/gtkfilechooserdefault.c
trunk/gtk/gtkfilechooserdefault.h
trunk/gtk/gtkfilechooserdialog.c
trunk/gtk/gtkfilechooserdialog.h
trunk/gtk/gtkfilechooserwidget.c
trunk/gtk/gtkfilechooserwidget.h
Modified: trunk/gtk/gtk.symbols
==============================================================================
--- trunk/gtk/gtk.symbols (original)
+++ trunk/gtk/gtk.symbols Mon Aug 4 14:43:53 2008
@@ -1446,17 +1446,21 @@
#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_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
Modified: trunk/gtk/gtkfilechooserbutton.c
==============================================================================
--- trunk/gtk/gtkfilechooserbutton.c (original)
+++ trunk/gtk/gtkfilechooserbutton.c Mon Aug 4 14:43:53 2008
@@ -137,7 +137,6 @@
GtkTreeModel *model;
GtkTreeModel *filter_model;
- gchar *backend;
GtkFileSystem *fs;
GFile *old_file;
@@ -646,23 +645,13 @@
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 @@
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 @@
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 @@
* 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 @@
return g_object_new (GTK_TYPE_FILE_CHOOSER_BUTTON,
"action", action,
"title", (title ? title : _(DEFAULT_TITLE)),
- "file-system-backend", backend,
NULL);
}
Modified: trunk/gtk/gtkfilechooserbutton.h
==============================================================================
--- trunk/gtk/gtkfilechooserbutton.h (original)
+++ trunk/gtk/gtkfilechooserbutton.h Mon Aug 4 14:43:53 2008
@@ -69,9 +69,13 @@
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,
Modified: trunk/gtk/gtkfilechooserdefault.c
==============================================================================
--- trunk/gtk/gtkfilechooserdefault.c (original)
+++ trunk/gtk/gtkfilechooserdefault.c Mon Aug 4 14:43:53 2008
@@ -11010,11 +11010,9 @@
}
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
Modified: trunk/gtk/gtkfilechooserdefault.h
==============================================================================
--- trunk/gtk/gtkfilechooserdefault.h (original)
+++ trunk/gtk/gtkfilechooserdefault.h Mon Aug 4 14:43:53 2008
@@ -33,7 +33,7 @@
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
Modified: trunk/gtk/gtkfilechooserdialog.c
==============================================================================
--- trunk/gtk/gtkfilechooserdialog.c (original)
+++ trunk/gtk/gtkfilechooserdialog.c Mon Aug 4 14:43:53 2008
@@ -466,7 +466,6 @@
result = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG,
"title", title,
"action", action,
- "file-system-backend", backend,
NULL);
if (parent)
@@ -533,6 +532,7 @@
* Return value: a new #GtkFileChooserDialog
*
* Since: 2.4
+ * Deprecated: 2.14
**/
GtkWidget *
gtk_file_chooser_dialog_new_with_backend (const gchar *title,
Modified: trunk/gtk/gtkfilechooserdialog.h
==============================================================================
--- trunk/gtk/gtkfilechooserdialog.h (original)
+++ trunk/gtk/gtkfilechooserdialog.h Mon Aug 4 14:43:53 2008
@@ -59,12 +59,15 @@
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
Modified: trunk/gtk/gtkfilechooserwidget.c
==============================================================================
--- trunk/gtk/gtkfilechooserwidget.c (original)
+++ trunk/gtk/gtkfilechooserwidget.c Mon Aug 4 14:43:53 2008
@@ -100,7 +100,7 @@
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 @@
* 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 @@
{
return g_object_new (GTK_TYPE_FILE_CHOOSER_WIDGET,
"action", action,
- "file-system-backend", backend,
NULL);
}
Modified: trunk/gtk/gtkfilechooserwidget.h
==============================================================================
--- trunk/gtk/gtkfilechooserwidget.h (original)
+++ trunk/gtk/gtkfilechooserwidget.h Mon Aug 4 14:43:53 2008
@@ -55,8 +55,13 @@
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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]