Hello community,
here is the log from the commit of package frogr for openSUSE:Factory
checked in at Mon Aug 22 09:48:48 CEST 2011.
--------
--- frogr/frogr.changes 2011-08-14 00:00:26.000000000 +0200
+++ /mounts/work_src_done/STABLE/frogr/frogr.changes 2011-08-19 18:12:05.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Aug 19 17:59:49 CEST 2011 - dimstar@opensuse.org
+
+- Update to version 0.6.1:
+ + Fix a big memory leak loading pixbufs in details window.
+ + Fixed several mem leaks as reported by valgrind.
+ + Fixed segfault if using GTK < 2.24 when using combo boxes
+ + Fixed problems authorizing in the Mac version.
+ + Bigs fixed: bgo#656519.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
frogr-0.6.tar.bz2
New:
----
frogr-0.6.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ frogr.spec ++++++
--- /var/tmp/diff_new_pack.01f54y/_old 2011-08-22 09:48:12.000000000 +0200
+++ /var/tmp/diff_new_pack.01f54y/_new 2011-08-22 09:48:12.000000000 +0200
@@ -18,7 +18,7 @@
Name: frogr
-Version: 0.6
+Version: 0.6.1
Release: 1
License: GPLv3
Summary: Tool to Manage Flickr Accounts
++++++ frogr-0.6.tar.bz2 -> frogr-0.6.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/ChangeLog new/frogr-0.6.1/ChangeLog
--- old/frogr-0.6/ChangeLog 2011-08-13 02:11:45.000000000 +0200
+++ new/frogr-0.6.1/ChangeLog 2011-08-19 15:36:03.000000000 +0200
@@ -1,5 +1,135 @@
# Generated by Makefile. Do not edit.
+commit dca613c6af15bd156ed5ea6c5660e2c5810c53bb
+Author: Mario Sanchez Prada
+Date: Thu Aug 18 09:09:33 2011 +0200
+
+ Fix HUGE memory leak loading thumbnails for details window
+
+ src/frogr-details-dialog.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 13d0d459b3d7b4dc90dc8a1451de60b90b5156af
+Author: Christophe Fergeau
+Date: Sun Aug 14 16:12:06 2011 +0200
+
+ fix generation of default icon list (#656519)
+
+ frogr_main_view_init builds a list of icon to pass
+ to gtk_window_set_default_icon_list. The generation of this list
+ is incorrectly done, resulting in a series of 1-element lists
+ being generated, leaking the previous list every time.
+ This commit fixes the list generation.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=656519
+
+ src/frogr-main-view.c | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 76a6d18390cd071682d6fa4a1e47d7f6babd51b6
+Author: Christophe Fergeau
+Date: Sun Aug 14 16:10:05 2011 +0200
+
+ fix memory leaks (#656519)
+
+ Fix a few memory leaks found using
+ G_SLICE=always-malloc valgrind --log-file=frogr.log
+ --leak-check=full --num-callers=40 frogr
+ and then uploading a photo.
+
+ There are still a few leaks remaining, especially in code
+ interacting with libsoup
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=656519
+
+ src/flicksoup/fsp-session.c | 3 +++
+ src/frogr-main-view.c | 6 ++++++
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+commit 54f2d952e4fc15d108426eac0df7631f5acd3ad1
+Author: Christophe Fergeau
+Date: Sun Aug 14 15:02:39 2011 +0200
+
+ fix use after free in _fetch_account_info_cb (#656519)
+
+ valgrind reports
+ ==9225== Invalid read of size 1
+ ==9225== at 0x4A079D8: strcmp (mc_replace_strmem.c:538)
+ ==9225== by 0x41C9B6: _fetch_account_info_cb (frogr-controller.c:1503)
+ ==9225== by 0x344F464D98: complete_in_idle_cb (gsimpleasyncresult.c:757)
+ ==9225== by 0x344E0427EC: g_main_context_dispatch (gmain.c:2441)
+ ==9225== by 0x344E042FC7: g_main_context_iterate (gmain.c:3092)
+ ==9225== by 0x344E04360C: g_main_loop_run (gmain.c:3300)
+ ==9225== by 0x4D7D36C: gtk_main (in /usr/lib64/libgtk-3.so.0.0.12)
+ ==9225== by 0x41DE7D: frogr_controller_run_app (frogr-controller.c:2103)
+ ==9225== by 0x434A30: main (main.c:110)
+ ==9225== Address 0xd2d67b1 is 1 bytes inside a block of size 19 free'd
+ ==9225== at 0x4A055FE: free (vg_replace_malloc.c:366)
+ ==9225== by 0x344E049742: g_free (gmem.c:263)
+ ==9225== by 0x40FBF6: frogr_account_set_fullname (frogr-account.c:405)
+ ==9225== by 0x41C984: _fetch_account_info_cb (frogr-controller.c:1500)
+ ==9225== by 0x344F464D98: complete_in_idle_cb (gsimpleasyncresult.c:757)
+ ==9225== by 0x344E0427EC: g_main_context_dispatch (gmain.c:2441)
+ ==9225== by 0x344E042FC7: g_main_context_iterate (gmain.c:3092)
+ ==9225== by 0x344E04360C: g_main_loop_run (gmain.c:3300)
+ ==9225== by 0x4D7D36C: gtk_main (in /usr/lib64/libgtk-3.so.0.0.12)
+ ==9225== by 0x41DE7D: frogr_controller_run_app (frogr-controller.c:2103)
+ ==9225== by 0x434A30: main (main.c:110)
+ ==9225==
+
+ This is caused by _fetch_account_info_cb doing
+ old_username = frogr_account_get_username (priv->account);
+ frogr_account_set_username (priv->account, auth_token->username);
+ if (g_strcmp0 (old_username, auth_token->username))
+ ....
+
+ frogr_account_get_username doesn't return a copied string but a
+ direct pointer to the username string stored in the account.
+ frogr_account_set_username frees that string before setting the new
+ name, which will lead to the g_strcmp0 being done on already freed memory.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=656519
+
+ src/frogr-controller.c | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 0a523af4059cbbcb2cef7c3a589f72bbecf28107
+Author: Mario Sanchez Prada
+Date: Sat Aug 13 14:03:02 2011 +0200
+
+ Fixed typo
+
+ src/frogr-settings-dialog.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit dcba9aa741fda31be28cb9f677ee6ca8d495f901
+Author: Alberto Garcia
+Date: Sat Aug 13 13:47:09 2011 +0300
+
+ Create the license type combo box when using GTK+ < 2.24
+
+ src/frogr-details-dialog.c | 1 +
+ src/frogr-settings-dialog.c | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+commit bed28ed74eb1942e5f27f2ea3ad82d8cd7d12f41
+Author: Mario Sanchez Prada
+Date: Sat Aug 13 01:24:30 2011 +0200
+
+ Force the config directory to be named 'frogr'
+
+ src/frogr-config.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 9428c119241f74d0d46e709f6e2afc81caa06609
+Author: Mario Sanchez Prada
+Date: Sat Aug 13 01:20:01 2011 +0200
+
+ Just use 'open' always for opening URLs in the Mac
+
+ src/frogr-util.c | 42 +++++++++++++++++++++++++++++++++++-------
+ 1 files changed, 35 insertions(+), 7 deletions(-)
+
commit 4bc6bfb6664f1bcdbbcde24811219a960ad4be12
Author: Mario Sanchez Prada
Date: Sat Aug 13 00:40:43 2011 +0200
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/NEWS new/frogr-0.6.1/NEWS
--- old/frogr-0.6/NEWS 2011-08-13 02:07:59.000000000 +0200
+++ new/frogr-0.6.1/NEWS 2011-08-19 15:29:47.000000000 +0200
@@ -1,3 +1,16 @@
+0.6.1 (19 Aug 2011)
+===================
+
+ * Fix a big memory leak loading pixbufs in details window.
+ * Fixed several mem leaks as reported by valgrind. (Christophe Fergeau).
+ * Fixed segfault if using GTK < 2.24 when using combo boxes (Alberto Garcia)
+ * Fixed problems authorizing in the Mac version.
+
+Bug fixes:
+
+ * #656519: memleak fixes
+
+
0.6 (13 Aug 2011)
=================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/configure new/frogr-0.6.1/configure
--- old/frogr-0.6/configure 2011-08-13 02:08:17.000000000 +0200
+++ new/frogr-0.6.1/configure 2011-08-19 15:33:36.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for frogr 0.6.
+# Generated by GNU Autoconf 2.68 for frogr 0.6.1.
#
# Report bugs to .
#
@@ -560,8 +560,8 @@
# Identity of this package.
PACKAGE_NAME='frogr'
PACKAGE_TARNAME='frogr'
-PACKAGE_VERSION='0.6'
-PACKAGE_STRING='frogr 0.6'
+PACKAGE_VERSION='0.6.1'
+PACKAGE_STRING='frogr 0.6.1'
PACKAGE_BUGREPORT='msanchez@igalia.com'
PACKAGE_URL=''
@@ -1352,7 +1352,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures frogr 0.6 to adapt to many kinds of systems.
+\`configure' configures frogr 0.6.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1418,7 +1418,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of frogr 0.6:";;
+ short | recursive ) echo "Configuration of frogr 0.6.1:";;
esac
cat <<\_ACEOF
@@ -1550,7 +1550,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-frogr configure 0.6
+frogr configure 0.6.1
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1919,7 +1919,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by frogr $as_me 0.6, which was
+It was created by frogr $as_me 0.6.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2734,7 +2734,7 @@
# Define the identity of the package.
PACKAGE='frogr'
- VERSION='0.6'
+ VERSION='0.6.1'
cat >>confdefs.h <<_ACEOF
@@ -7944,7 +7944,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by frogr $as_me 0.6, which was
+This file was extended by frogr $as_me 0.6.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8010,7 +8010,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-frogr config.status 0.6
+frogr config.status 0.6.1
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/configure.ac new/frogr-0.6.1/configure.ac
--- old/frogr-0.6/configure.ac 2011-08-13 02:07:59.000000000 +0200
+++ new/frogr-0.6.1/configure.ac 2011-08-19 15:09:11.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([frogr], [0.6], [msanchez@igalia.com])
+AC_INIT([frogr], [0.6.1], [msanchez@igalia.com])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_PROG_RANLIB
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/src/flicksoup/fsp-session.c new/frogr-0.6.1/src/flicksoup/fsp-session.c
--- old/frogr-0.6/src/flicksoup/fsp-session.c 2011-08-03 16:41:12.000000000 +0200
+++ new/frogr-0.6.1/src/flicksoup/fsp-session.c 2011-08-19 15:09:11.000000000 +0200
@@ -544,6 +544,7 @@
NULL);
/* Check mimetype */
mime_type = g_strdup (g_file_info_get_content_type (file_info));
+ g_object_unref (G_OBJECT (file_info));
/* Init multipart container */
mpart = soup_multipart_new (SOUP_FORM_MIME_TYPE_MULTIPART);
@@ -1103,6 +1104,8 @@
/* Execute the callback */
g_simple_async_result_complete_in_idle (res);
+
+ g_object_unref (G_OBJECT (res));
}
gpointer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/src/frogr-config.c new/frogr-0.6.1/src/frogr-config.c
--- old/frogr-0.6/src/frogr-config.c 2011-08-13 02:07:59.000000000 +0200
+++ new/frogr-0.6.1/src/frogr-config.c 2011-08-19 15:09:11.000000000 +0200
@@ -663,8 +663,8 @@
_xml_add_bool_child (node, "use-gnome-proxy", priv->use_gnome_proxy);
xmlAddChild (root, node);
- xml_path = g_build_filename (g_get_user_config_dir (),
- g_get_prgname (), SETTINGS_FILENAME, NULL);
+ xml_path = g_build_filename (g_get_user_config_dir (), APP_SHORTNAME,
+ SETTINGS_FILENAME, NULL);
if (xmlSaveFormatFileEnc (xml_path, xml, "UTF-8", 1) == -1) {
g_critical ("Unable to open '%s' for saving", xml_path);
@@ -704,8 +704,8 @@
_save_account_xml (account, root);
}
- xml_path = g_build_filename (g_get_user_config_dir (),
- g_get_prgname (), ACCOUNTS_FILENAME, NULL);
+ xml_path = g_build_filename (g_get_user_config_dir (), APP_SHORTNAME,
+ ACCOUNTS_FILENAME, NULL);
if (xmlSaveFormatFileEnc (xml_path, xml, "UTF-8", 1) == -1) {
g_critical ("Unable to open '%s' for saving", xml_path);
@@ -916,7 +916,7 @@
priv->proxy_password = NULL;
/* Ensure that we have the config directory in place. */
- config_dir = g_build_filename (g_get_user_config_dir (), g_get_prgname (), NULL);
+ config_dir = g_build_filename (g_get_user_config_dir (), APP_SHORTNAME, NULL);
if (g_mkdir_with_parents (config_dir, 0777) != 0)
{
g_warning ("Could not create config directory '%s' (%s)",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/src/frogr-controller.c new/frogr-0.6.1/src/frogr-controller.c
--- old/frogr-0.6/src/frogr-controller.c 2011-08-12 17:54:40.000000000 +0200
+++ new/frogr-0.6.1/src/frogr-controller.c 2011-08-19 15:09:11.000000000 +0200
@@ -1396,18 +1396,23 @@
FrogrControllerPrivate *priv = NULL;
const gchar *old_username = NULL;
const gchar *old_fullname = NULL;
+ gboolean username_changed = FALSE;
priv = FROGR_CONTROLLER_GET_PRIVATE (controller);
/* Check for changes (only for fields that it makes sense) */
old_username = frogr_account_get_username (priv->account);
old_fullname = frogr_account_get_fullname (priv->account);
+ if (g_strcmp0 (old_username, auth_token->username)
+ || g_strcmp0 (old_fullname, auth_token->fullname))
+ {
+ username_changed = TRUE;
+ }
frogr_account_set_username (priv->account, auth_token->username);
frogr_account_set_fullname (priv->account, auth_token->fullname);
- if (g_strcmp0 (old_username, auth_token->username)
- || g_strcmp0 (old_fullname, auth_token->fullname))
+ if (username_changed)
{
/* Save to disk and emit signal if basic info changed */
frogr_config_save_accounts (priv->config);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/src/frogr-details-dialog.c new/frogr-0.6.1/src/frogr-details-dialog.c
--- old/frogr-0.6/src/frogr-details-dialog.c 2011-07-17 22:30:47.000000000 +0200
+++ new/frogr-0.6.1/src/frogr-details-dialog.c 2011-08-19 15:09:11.000000000 +0200
@@ -371,6 +371,7 @@
for (i = 0; license_descriptions[i]; i++)
gtk_combo_box_text_insert_text (GTK_COMBO_BOX_TEXT (widget), i, _(license_descriptions[i]));
#else
+ widget = gtk_combo_box_new_text ();
for (i = 0; license_descriptions[i]; i++)
gtk_combo_box_insert_text (GTK_COMBO_BOX (widget), i, _(license_descriptions[i]));
#endif
@@ -709,6 +710,8 @@
/* Everything should be fine by now, show it */
_place_picture_in_dialog_and_show (self);
}
+
+ g_object_unref (pixbuf_loader);
}
/* Show error to the user and finalize dialog if needed */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/src/frogr-main-view.c new/frogr-0.6.1/src/frogr-main-view.c
--- old/frogr-0.6/src/frogr-main-view.c 2011-08-07 00:17:13.000000000 +0200
+++ new/frogr-0.6.1/src/frogr-main-view.c 2011-08-19 15:09:11.000000000 +0200
@@ -375,6 +375,8 @@
gchar *fileuri = g_strdup (fileuris_array[i]);
if (fileuri && !g_str_equal (g_strstrip (fileuri), ""))
fileuris_list = g_slist_append (fileuris_list, fileuri);
+ else
+ g_free (fileuri);
}
/* Load pictures */
@@ -686,6 +688,7 @@
/* Free memory */
gtk_tree_path_free (path);
g_free (tooltip_str);
+ g_free (filesize);
g_free (filesize_str);
g_free (filesize_markup);
g_free (datetime_markup);
@@ -785,6 +788,7 @@
-1);
g_object_ref (picture);
+ g_object_unref (pixbuf);
/* Reorder if needed */
if (priv->sorting_criteria != SORT_AS_LOADED || priv->sorting_reversed)
@@ -1238,6 +1242,7 @@
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), value);
}
+ g_list_free (all_items);
}
}
@@ -1500,6 +1505,7 @@
gtk_widget_destroy (priv->pictures_ctxt_menu);
gtk_widget_destroy (GTK_WIDGET (priv->window));
+ g_object_unref (G_OBJECT (priv->builder));
G_OBJECT_CLASS(frogr_main_view_parent_class)->finalize (object);
}
@@ -1530,7 +1536,7 @@
GtkWidget *progress_label;
const gchar *icons_path;
gchar *full_path;
- GList *icons;
+ GList *icons = NULL;
#ifdef MAC_INTEGRATION
GtkOSXApplication *osx_app;
@@ -1549,27 +1555,27 @@
/* Provide a default icon list in several sizes */
icons_path = frogr_util_get_icons_dir ();
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("128x128"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("64x64"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("48x48"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("32x32"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("24x24"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("16x16"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
gtk_window_set_default_icon_list (icons);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/src/frogr-settings-dialog.c new/frogr-0.6.1/src/frogr-settings-dialog.c
--- old/frogr-0.6/src/frogr-settings-dialog.c 2011-07-17 08:47:12.000000000 +0200
+++ new/frogr-0.6.1/src/frogr-settings-dialog.c 2011-08-19 15:09:11.000000000 +0200
@@ -303,6 +303,7 @@
for (i = 0; license_descriptions[i]; i++)
gtk_combo_box_text_insert_text (GTK_COMBO_BOX_TEXT (combo), i, _(license_descriptions[i]));
#else
+ combo = gtk_combo_box_new_text ();
for (i = 0; license_descriptions[i]; i++)
gtk_combo_box_insert_text (GTK_COMBO_BOX (combo), i, _(license_descriptions[i]));
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/frogr-0.6/src/frogr-util.c new/frogr-0.6.1/src/frogr-util.c
--- old/frogr-0.6/src/frogr-util.c 2011-08-13 02:07:59.000000000 +0200
+++ new/frogr-0.6.1/src/frogr-util.c 2011-08-19 15:09:11.000000000 +0200
@@ -146,12 +146,7 @@
uris = _get_uris_string_from_list (uris_list);
-#ifdef MAC_INTEGRATION
- /* In MacOSX use 'open' instead of 'gnome-open' */
- command = g_strdup_printf ("open %s", uris);
-#else
command = g_strdup_printf ("gnome-open %s", uris);
-#endif
_spawn_command (command);
if (error)
@@ -165,8 +160,30 @@
}
}
-void
-frogr_util_open_uri (const gchar *uri)
+#ifdef MAC_INTEGRATION
+static void
+_open_uri_for_mac (const gchar *uri)
+{
+ GError *error = NULL;
+ gchar *command = NULL;
+
+ /* In MacOSX use 'open' instead of 'gnome-open' */
+ command = g_strdup_printf ("open %s", uri);
+ _spawn_command (command);
+
+ if (error)
+ {
+ DEBUG ("Error opening URI %s: %s", uri, error->message);
+ g_error_free (error);
+ }
+
+ g_free (command);
+}
+#endif
+
+#ifndef MAC_INTEGRATION
+static void
+_open_uri_for_gnome (const gchar *uri)
{
static GAppInfo *http_app_info = NULL;
static GAppInfo *help_app_info = NULL;
@@ -203,6 +220,17 @@
g_list_free (uris_list);
}
+#endif
+
+void
+frogr_util_open_uri (const gchar *uri)
+{
+#ifdef MAC_INTEGRATION
+ _open_uri_for_mac (uri);
+#else
+ _open_uri_for_gnome (uri);
+#endif
+}
void
frogr_util_open_images_in_viewer (GList *uris_list)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org