gtk+ r20169 - in trunk: . docs/reference docs/reference/gtk gtk



Author: matthiasc
Date: Mon May 26 04:05:17 2008
New Revision: 20169
URL: http://svn.gnome.org/viewvc/gtk+?rev=20169&view=rev

Log:
2008-05-26  Matthias Clasen  <mclasen redhat com>

        * gtk/gtkshow.[hc]: Formatting fixes

        * gtk/gtkmountoperation.c: Add docs



Modified:
   trunk/ChangeLog
   trunk/docs/reference/ChangeLog
   trunk/docs/reference/gtk/gtk-docs.sgml
   trunk/docs/reference/gtk/gtk-sections.txt
   trunk/gtk/gtkmountoperation.c
   trunk/gtk/gtkshow.c
   trunk/gtk/gtkshow.h

Modified: trunk/docs/reference/gtk/gtk-docs.sgml
==============================================================================
--- trunk/docs/reference/gtk/gtk-docs.sgml	(original)
+++ trunk/docs/reference/gtk/gtk-docs.sgml	Mon May 26 04:05:17 2008
@@ -234,6 +234,7 @@
 <!ENTITY gtk-builder-convert SYSTEM "gtk-builder-convert.xml">
 <!ENTITY gtk-glossary SYSTEM "xml/glossary.xml">
 <!ENTITY gtk-Testing SYSTEM "xml/gtktesting.xml">
+<!ENTITY gtk-Filesystem SYSTEM "xml/filesystem.xml">
 ]>
 <book id="index">
   <bookinfo>
@@ -350,6 +351,7 @@
     &gtk-Signals;
     &gtk-Types;
     &gtk-Testing;
+    &gtk-Filesystem;
   </part>
 
   <part id="gtkobjects">

Modified: trunk/docs/reference/gtk/gtk-sections.txt
==============================================================================
--- trunk/docs/reference/gtk/gtk-sections.txt	(original)
+++ trunk/docs/reference/gtk/gtk-sections.txt	Mon May 26 04:05:17 2008
@@ -6755,3 +6755,21 @@
 gtk_test_widget_click
 gtk_test_widget_send_key
 </SECTION>
+
+<SECTION>
+<FILE>filesystem</FILE>
+<TITLE>Filesystem utilities</TITLE>
+GtkMountOperation
+gtk_mount_operation_new
+gtk_mount_operation_is_showing
+gtk_mount_operation_set_parent
+gtk_mount_operation_get_parent
+gtk_mount_operation_set_screen
+gtk_mount_operation_get_screen
+gtk_show_uri
+<SUBSECTION Standard>
+GtkMountOperationClass
+<SUBSECTION Private>
+gtk_mount_operation_get_type
+GtkMountOperationPrivate
+</SECTION>

Modified: trunk/gtk/gtkmountoperation.c
==============================================================================
--- trunk/gtk/gtkmountoperation.c	(original)
+++ trunk/gtk/gtkmountoperation.c	Mon May 26 04:05:17 2008
@@ -46,6 +46,28 @@
 #include "gtkwindow.h"
 #include "gtkalias.h"
 
+/**
+ * SECTION:filesystem
+ * @short_description: Functions for working with GIO
+ *
+ * The functions and objects described here make working with GTK+ and
+ * GIO more convenient. #GtkMountOperation is needed when mounting volumes
+ * and gtk_show_uri() is a convenient way to launch applications for URIs.
+ * Another object that is worth mentioning in this context is 
+ * #GdkAppLaunchContext, which provides visual feedback when lauching
+ * applications.
+ */
+
+/** 
+ * GtkMountOperation:
+ *
+ * #GtkMountOperation is an implementation of #GMountOperation that 
+ * can be used with GIO functions for mounting volumes such as
+ * g_file_mount_enclosing_volume() or g_file_mount_mountable().
+ *
+ * When necessary, #GtkMountOperation shows dialogs to ask for passwords.
+ */
+
 /* GObject, GtkObject methods
  */
 static void   gtk_mount_operation_set_property (GObject          *object,
@@ -160,10 +182,10 @@
 
 
 static void
-gtk_mount_operation_set_property (GObject         *object,
-                                  guint            prop_id,
-                                  const GValue    *value,
-                                  GParamSpec      *pspec)
+gtk_mount_operation_set_property (GObject      *object,
+                                  guint         prop_id,
+                                  const GValue *value,
+                                  GParamSpec   *pspec)
 {
   GtkMountOperation *operation;
   gpointer tmp;
@@ -190,10 +212,10 @@
 }
 
 static void
-gtk_mount_operation_get_property (GObject         *object,
-                                  guint            prop_id,
-                                  GValue          *value,
-                                  GParamSpec      *pspec)
+gtk_mount_operation_get_property (GObject    *object,
+                                  guint       prop_id,
+                                  GValue     *value,
+                                  GParamSpec *pspec)
 {
   GtkMountOperationPrivate *priv;
   GtkMountOperation *operation;
@@ -688,6 +710,16 @@
   g_object_ref (op);
 }
 
+/**
+ * gtk_mount_operation_new:
+ * @parent: transient parent of the window, or %NULL
+ *
+ * Creates a new #GtkMountOperation
+ *
+ * Returns: a new #GtkMountOperation
+ *
+ * Since: 2.14
+ */
 GMountOperation *
 gtk_mount_operation_new (GtkWindow *parent)
 {
@@ -699,6 +731,17 @@
   return mount_operation;
 }
 
+/**
+ * gtk_mount_operation_is_showing:
+ * @op: a #GtkMountOperation
+ *
+ * Returns whether the #GtkMountOperation is currently displaying
+ * a window.
+ *
+ * Returns: %TRUE if @op is currently displaying a window
+ *
+ * Since: 2.14
+ */
 gboolean
 gtk_mount_operation_is_showing (GtkMountOperation *op)
 {
@@ -707,6 +750,14 @@
   return op->priv->dialog != NULL;
 }
 
+/**
+ * gtk_mount_operation_set_parent:
+ * @op: a #GtkMountOperation
+ * @parent: transient parent of the window, or %NULL
+ *
+ * Sets the transient parent for windows shown by the
+ * #GtkMountOperation.
+ */
 void
 gtk_mount_operation_set_parent (GtkMountOperation *op,
                                 GtkWindow         *parent)
@@ -744,6 +795,16 @@
   g_object_notify (G_OBJECT (op), "parent");
 }
 
+/**
+ * gtk_mount_operation_get_parent:
+ * @op: a #GtkMountOperation
+ *
+ * Gets the transient parent used by the #GtkMountOperation
+ *
+ * Returns: the transient parent for windows shown by @op
+ *
+ * Since: 2.14
+ */
 GtkWindow *
 gtk_mount_operation_get_parent (GtkMountOperation *op)
 {
@@ -752,6 +813,15 @@
   return op->priv->parent_window;
 }
 
+/**
+ * gtk_mount_operation_set_screen:
+ * @op: a #GtkMountOperation
+ * @screen: a #GdkScreen
+ *
+ * Sets the screen to show windows of the #GtkMountOperation on.
+ *
+ * Since: 2.14
+ */
 void
 gtk_mount_operation_set_screen (GtkMountOperation *op,
                                 GdkScreen         *screen)
@@ -777,6 +847,17 @@
   g_object_notify (G_OBJECT (op), "screen");
 }
 
+/**
+ * gtk_mount_operation_get_screen:
+ * @op: a #GtkMountOperation
+ *
+ * Gets the screen on which windows of the #GtkMountOperation 
+ * will be shown.
+ *
+ * Returns: the screen on which windows of @op are shown
+ *
+ * Since: 2.14
+ */
 GdkScreen *
 gtk_mount_operation_get_screen (GtkMountOperation *op)
 {

Modified: trunk/gtk/gtkshow.c
==============================================================================
--- trunk/gtk/gtkshow.c	(original)
+++ trunk/gtk/gtkshow.c	Mon May 26 04:05:17 2008
@@ -29,33 +29,40 @@
 
 #include "gtkshow.h"
 
+#include "gtkalias.h"
+
 
 /**
  * gtk_show_uri:
- * @screen: screen to show the uri on or NULL for the default screen
+ * @screen: screen to show the uri on or %NULL for the default screen
  * @uri: the uri to show
  * @timestamp: a timestamp to prevent focus stealing. 
  * @error: a #GError that is returned in case of errors
  *
- * This is a convenience function for launching the default application to show 
- * the uri. The uri can amongst others (depending on support in gio/gvfs) take 
- * the following forms:
- * "file:///home/gnome/pict.jpg",
- * "http://www.gnome.org";,
- * "mailto:me gnome org",
- * "ghelp:eog".
- * Ideally the timestamp is taken from the event triggering gtk_show_uri. 
- * If timestamp is not known you can take %GDK_CURRENT_TIME
+ * This is a convenience function for launching the default application 
+ * to show the uri. The uri must be of a form understood by GIO. Typical
+ * examples are 
+ * <simplelist>
+ *   <member><filename>file:///home/gnome/pict.jpg</filename></member>
+ *   <member><filename>http://www.gnome.org</filename></member>
+ *   <member><filename>mailto:me&commat;gnome.org</filename></member>
+ * </simplelist>
+ * Ideally the timestamp is taken from the event triggering 
+ * the gtk_show_uri() call. If timestamp is not known you can take 
+ * %GDK_CURRENT_TIME.
+ *
+ * This function can be used as a replacement for gnome_vfs_url_show() 
+ * and gnome_url_show().
  *
  * Returns: %TRUE on success, %FALSE on error.
  *
  * Since: 2.14
  */
 gboolean
-gtk_show_uri (GdkScreen *screen, 
-              const char* uri, 
-              guint32 timestamp, 
-              GError **error)
+gtk_show_uri (GdkScreen    *screen, 
+              const gchar  *uri, 
+              guint32       timestamp, 
+              GError      **error)
 {
   GdkAppLaunchContext *context;
   gboolean ret;
@@ -63,9 +70,7 @@
   g_return_val_if_fail (uri != NULL, FALSE);
 
   context = gdk_app_launch_context_new ();
-
   gdk_app_launch_context_set_screen (context, screen);
-  
   gdk_app_launch_context_set_timestamp (context, timestamp);
 
   ret = g_app_info_launch_default_for_uri (uri, (GAppLaunchContext*)context, error);
@@ -73,3 +78,7 @@
 
   return ret;
 }
+
+
+#define __GTK_SHOW_C__
+#include "gtkaliasdef.c"

Modified: trunk/gtk/gtkshow.h
==============================================================================
--- trunk/gtk/gtkshow.h	(original)
+++ trunk/gtk/gtkshow.h	Mon May 26 04:05:17 2008
@@ -27,10 +27,10 @@
 
 G_BEGIN_DECLS
 
-gboolean gtk_show_uri  (GdkScreen *screen, 
-                        const char* uri, 
-                        guint32 timestamp, 
-                        GError **error);
+gboolean gtk_show_uri  (GdkScreen   *screen, 
+                        const gchar *uri, 
+                        guint32      timestamp, 
+                        GError     **error);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]