[balsa/gtk3] Use GDesktopAppInfo instead of GAppInfo
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Use GDesktopAppInfo instead of GAppInfo
- Date: Sat, 16 Apr 2011 13:49:06 +0000 (UTC)
commit feb3cc4bfc91034451a0a044abd3d885e19c723d
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sat Apr 16 09:48:14 2011 -0400
Use GDesktopAppInfo instead of GAppInfo
* configure.in: add gio-unix-2.0 to gnome-extras so we can use
GDesktopAppInfo.
* src/save-restore.c (config_defclient_save): use GDesktopAppInfo
instead of GAppInfo to set Balsa as default client.
ChangeLog | 9 +++++++++
configure.in | 1 +
src/save-restore.c | 13 +++++--------
3 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3fb9a9b..5eddba7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-04-16 Peter Bloomfield
+
+ Use GDesktopAppInfo instead of GAppInfo
+
+ * configure.in: add gio-unix-2.0 to gnome-extras so we can use
+ GDesktopAppInfo.
+ * src/save-restore.c (config_defclient_save): use GDesktopAppInfo
+ instead of GAppInfo to set Balsa as default client.
+
2011-04-15 Peter Bloomfield
Fix bz #647695; Pawel's patch for master, with one change.
diff --git a/configure.in b/configure.in
index 81d9024..9d935ab 100644
--- a/configure.in
+++ b/configure.in
@@ -282,6 +282,7 @@ dnl GNOME libs
dnl #####################################################################
if test x$with_gnome != xno; then
+ gnome_extras="$gnome_extras gio-unix-2.0"
AC_MSG_CHECKING([whether we have gnome-keyring])
if $PKG_CONFIG --atleast-version=1.0 gnome-keyring-1; then
gnome_extras="$gnome_extras gnome-keyring-1"
diff --git a/src/save-restore.c b/src/save-restore.c
index 021ad59..919ac3f 100644
--- a/src/save-restore.c
+++ b/src/save-restore.c
@@ -28,6 +28,7 @@
#include <string.h>
#if HAVE_GNOME
#include <gio/gio.h>
+#include <gio/gdesktopappinfo.h>
#endif
#include <glib/gi18n.h>
#include "balsa-app.h"
@@ -2123,26 +2124,22 @@ save_mru(GList * mru, const gchar * group)
void
config_defclient_save(void)
{
- GAppInfo *info;
+ GDesktopAppInfo *info;
GError *err;
if (!balsa_app.default_client)
return;
- err = NULL;
- info = g_app_info_create_from_commandline
- ("balsa -m", "Balsa",
- G_APP_INFO_CREATE_SUPPORTS_URIS |
- G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION, &err);
+ info = g_desktop_app_info_new("balsa.desktop");
if (!info) {
g_warning("Failed to create default application for Balsa "
"for \"mailto\": %s", err->message);
- g_error_free(err);
return;
}
+ err = NULL;
if (!g_app_info_set_as_default_for_type
- (info, "x-scheme-handler/mailto", &err)) {
+ (G_APP_INFO(info), "x-scheme-handler/mailto", &err)) {
g_warning("Failed to set Balsa as the default application "
"for \"mailto\": %s", err->message);
g_error_free(err);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]