cheese r1137 - in trunk: . src
- From: jhaitsma svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r1137 - in trunk: . src
- Date: Sat, 15 Nov 2008 14:53:47 +0000 (UTC)
Author: jhaitsma
Date: Sat Nov 15 14:53:47 2008
New Revision: 1137
URL: http://svn.gnome.org/viewvc/cheese?rev=1137&view=rev
Log:
Use gtk_show_uri to open files and xdg-open i.s.o. gnome-open which is part of libgnome and is deprecated
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/src/cheese-window.c
trunk/wscript
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Nov 15 14:53:47 2008
@@ -59,8 +59,8 @@
GLIB_REQUIRED=2.16.0
GOBJECT_REQUIRED=2.12.0
GIO_REQUIRED=2.16.0
-GTK_REQUIRED=2.10.0
-GDK_REQUIRED=2.12.0
+GTK_REQUIRED=2.14.0
+GDK_REQUIRED=2.14.0
LIBGNOMEDESKTOP_REQUIRED=2.25.1
GCONF_REQUIRED=2.16.0
GSTREAMER_REQUIRED=0.10.20
Modified: trunk/src/cheese-window.c
==============================================================================
--- trunk/src/cheese-window.c (original)
+++ trunk/src/cheese-window.c Sat Nov 15 14:53:47 2008
@@ -191,10 +191,11 @@
{
GError *error = NULL;
GtkWidget *error_dialog;
- gboolean ret;
+ GdkScreen *screen;
- ret = g_app_info_launch_default_for_uri (url, NULL, &error);
- if (ret == FALSE)
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
+ gtk_show_uri (screen, url, gtk_get_current_event_time (), &error);
+ if (error != NULL)
{
error_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog),
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -213,12 +214,13 @@
char *uri;
GError *error = NULL;
GtkWidget *error_dialog;
- gboolean ret;
+ GdkScreen *screen;
uri = g_strconcat ("mailto:", email, NULL);
- ret = g_app_info_launch_default_for_uri (uri, NULL, &error);
- if (ret == FALSE)
+ screen = gtk_widget_get_screen (GTK_WIDGET (dialog));
+ gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error);
+ if (error != NULL)
{
error_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog),
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -451,17 +453,19 @@
{
char *uri;
char *filename;
- gboolean ret;
GError *error = NULL;
GtkWidget *dialog;
+ GdkScreen *screen;
filename = cheese_thumb_view_get_selected_image (CHEESE_THUMB_VIEW (cheese_window->thumb_view));
g_return_if_fail (filename);
uri = g_filename_to_uri (filename, NULL, NULL);
g_free (filename);
- ret = g_app_info_launch_default_for_uri (uri, NULL, &error);
- if (ret == FALSE)
+ screen = gtk_widget_get_screen (GTK_WIDGET (cheese_window->window));
+ gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error);
+
+ if (error != NULL)
{
dialog = gtk_message_dialog_new (GTK_WINDOW (cheese_window->window),
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -866,7 +870,7 @@
if (strcmp (action_name, "SendByMail") == 0)
{
char *path;
- command_line = g_strdup_printf ("gnome-open mailto:?subject='%s'", _("Media files"));
+ command_line = g_strdup_printf ("xdg-open mailto:?subject='%s'", _("Media files"));
for (l = files; l != NULL; l = l->next)
{
path = g_file_get_path (l->data);
@@ -929,11 +933,12 @@
cheese_window_cmd_help_contents (GtkAction *action, CheeseWindow *cheese_window)
{
GError *error = NULL;
- gboolean ret;
+ GdkScreen *screen;
- ret = g_app_info_launch_default_for_uri ("ghelp:cheese", NULL, &error);
+ screen = gtk_widget_get_screen (GTK_WIDGET (cheese_window));
+ gtk_show_uri (screen, "ghelp:cheese", gtk_get_current_event_time (), &error);
- if (ret == FALSE)
+ if (error != NULL)
{
GtkWidget *d;
d = gtk_message_dialog_new (GTK_WINDOW (cheese_window->window),
@@ -1730,7 +1735,7 @@
}
else
{
- path = g_find_program_in_path ("gnome-open");
+ path = g_find_program_in_path ("xdg-open");
gtk_action_group_set_visible (cheese_window->actions_mail, path != NULL);
gtk_action_group_set_visible (cheese_window->actions_sendto, FALSE);
}
Modified: trunk/wscript
==============================================================================
--- trunk/wscript (original)
+++ trunk/wscript Sat Nov 15 14:53:47 2008
@@ -36,8 +36,8 @@
conf.check_pkg('glib-2.0', destvar='GLIB', vnum='2.16.0', mandatory=True)
conf.check_pkg('gobject-2.0', destvar='GOBJECT', vnum='2.12.0', mandatory=True)
conf.check_pkg('gio-2.0', destvar='GIO', vnum='2.16.0', mandatory=True)
- conf.check_pkg('gtk+-2.0', destvar='GTK', vnum='2.10.0', mandatory=True)
- conf.check_pkg('gdk-2.0', destvar='GDK', vnum='2.12.0', mandatory=True)
+ conf.check_pkg('gtk+-2.0', destvar='GTK', vnum='2.14.0', mandatory=True)
+ conf.check_pkg('gdk-2.0', destvar='GDK', vnum='2.14.0', mandatory=True)
conf.check_pkg('gnome-desktop-2.0', destvar='LIBGNOMEDESKTOP', vnum='2.25.1', mandatory=True)
conf.check_pkg('gconf-2.0', destvar='GCONF', vnum='2.16.0', mandatory=True)
conf.check_pkg('gstreamer-0.10', destvar='GSTREAMER', vnum='0.10.20', mandatory=True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]