]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkfilechooser.c
Fix https://bugzilla.novell.com/show_bug.cgi?id=184875 - make the location
[~andy/gtk] / gtk / gtkfilechooser.c
index 55689952b3a0e0e741b2c0d984629f5540b3b82c..13ca2681de8e3d69e3add4dcf56ca00157e5bb5f 100644 (file)
@@ -39,18 +39,12 @@ gtk_file_chooser_get_type (void)
 
   if (!file_chooser_type)
     {
-      static const GTypeInfo file_chooser_info =
-      {
-       sizeof (GtkFileChooserIface),  /* class_size */
-       NULL,                          /* base_init */
-       NULL,                          /* base_finalize */
-       (GClassInitFunc)gtk_file_chooser_class_init, /* class_init */
-      };
-
-      file_chooser_type = g_type_register_static (G_TYPE_INTERFACE,
-                                                 I_("GtkFileChooser"),
-                                                 &file_chooser_info, 0);
-
+      file_chooser_type = g_type_register_static_simple (G_TYPE_INTERFACE,
+                                                        I_("GtkFileChooser"),
+                                                        sizeof (GtkFileChooserIface),
+                                                        (GClassInitFunc) gtk_file_chooser_class_init,
+                                                        0, NULL, 0);
+      
       g_type_interface_add_prerequisite (file_chooser_type, GTK_TYPE_WIDGET);
     }
 
@@ -696,6 +690,14 @@ gtk_file_chooser_set_current_folder (GtkFileChooser *chooser,
  * 
  * Gets the current folder of @chooser as a local filename.
  * See gtk_file_chooser_set_current_folder().
+ *
+ * Note that this is the folder that the file chooser is currently displaying
+ * (e.g. "/home/username/Documents"), which is <emphasis>not the same</emphasis>
+ * as the currently-selected folder if the chooser is in
+ * #GTK_FILE_CHOOSER_SELECT_FOLDER mode
+ * (e.g. "/home/username/Documents/selected-folder/".  To get the
+ * currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
+ * usual way to get the selection.
  * 
  * Return value: the full path of the current folder, or %NULL if the current
  * path cannot be represented as a local filename.  Free with g_free().  This
@@ -1020,6 +1022,14 @@ gtk_file_chooser_set_current_folder_uri (GtkFileChooser *chooser,
  * 
  * Gets the current folder of @chooser as an URI.
  * See gtk_file_chooser_set_current_folder_uri().
+ *
+ * Note that this is the folder that the file chooser is currently displaying
+ * (e.g. "file:///home/username/Documents"), which is <emphasis>not the same</emphasis>
+ * as the currently-selected folder if the chooser is in
+ * #GTK_FILE_CHOOSER_SELECT_FOLDER mode
+ * (e.g. "file:///home/username/Documents/selected-folder/".  To get the
+ * currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
+ * usual way to get the selection.
  * 
  * Return value: the URI for the current folder.  Free with g_free().  This
  * function will also return %NULL if the file chooser was unable to load the