summaryrefslogtreecommitdiff
path: root/gtk/gtkshow.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2008-05-26 04:05:17 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-05-26 04:05:17 +0000
commit4d734c0e6a8ae9ed2fe623c563047626f9ddec62 (patch)
treeb7094d493966e06b24863e19aa0397b0cf6b9ce5 /gtk/gtkshow.c
parentd46b2c14a8dd543d7ced4c83face8e61516b6329 (diff)
downloadgtk+-4d734c0e6a8ae9ed2fe623c563047626f9ddec62.tar.gz
Formatting fixes
2008-05-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkshow.[hc]: Formatting fixes * gtk/gtkmountoperation.c: Add docs svn path=/trunk/; revision=20169
Diffstat (limited to 'gtk/gtkshow.c')
-rw-r--r--gtk/gtkshow.c41
1 files changed, 25 insertions, 16 deletions
diff --git a/gtk/gtkshow.c b/gtk/gtkshow.c
index 8c916181ab..949f67b6e6 100644
--- a/gtk/gtkshow.c
+++ b/gtk/gtkshow.c
@@ -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 @@ gtk_show_uri (GdkScreen *screen,
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 @@ gtk_show_uri (GdkScreen *screen,
return ret;
}
+
+
+#define __GTK_SHOW_C__
+#include "gtkaliasdef.c"