aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-08-05 15:06:42 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-08-05 15:06:42 -0400
commit191be4ed4601ce62c3197eb14b4044c89a26a0cd (patch)
tree56fc9b4e739db420a8fe321087ef2e20e5a3098f
parenta92965410d2bee490beff792bbd4876a95f1e0af (diff)
parent3a5ded2687b74d61f3bffdfd5f1f44a4a1db240c (diff)
downloadayatana-indicator-messages-191be4ed4601ce62c3197eb14b4044c89a26a0cd.tar.gz
ayatana-indicator-messages-191be4ed4601ce62c3197eb14b4044c89a26a0cd.tar.bz2
ayatana-indicator-messages-191be4ed4601ce62c3197eb14b4044c89a26a0cd.zip
releasing version 0.4.92-0ubuntu4
-rw-r--r--debian/changelog12
-rw-r--r--debian/control2
-rw-r--r--src/default-applications.c43
-rw-r--r--src/messages-service.c2
4 files changed, 49 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog
index 7ec4746..b0db608 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+indicator-messages (0.4.92-0ubuntu4) oneiric; urgency=low
+
+ * debian/control
+ - Dropped recommends for gwibber now that it is seeded
+ * cherry picked r220 from trunk
+ - Make sure to insert in the right locations
+ * cherry picked r221 from trunk
+ - Making mail applications based on the default mail client not a
+ hardcoded desktop file.
+
+ -- Ken VanDine <ken.vandine@canonical.com> Fri, 05 Aug 2011 14:33:39 -0400
+
indicator-messages (0.4.92-0ubuntu3) oneiric; urgency=low
* debian/control
diff --git a/debian/control b/debian/control
index 158b8bb..b336742 100644
--- a/debian/control
+++ b/debian/control
@@ -28,7 +28,7 @@ Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-desktop/indicator-messages/ubun
Package: indicator-messages
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
-Recommends: indicator-applet | indicator-renderer, indicator-status-provider-mc5, gwibber
+Recommends: indicator-applet | indicator-renderer, indicator-status-provider-mc5
Replaces: indicator-me
Breaks: indicator-applet (<< 0.3.0)
Conflicts: indicator-me
diff --git a/src/default-applications.c b/src/default-applications.c
index afb5025..0382e4d 100644
--- a/src/default-applications.c
+++ b/src/default-applications.c
@@ -21,20 +21,22 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib.h>
#include <glib/gi18n.h>
+#include <gio/gio.h>
+#include <gio/gdesktopappinfo.h>
#include "default-applications.h"
struct default_db_t {
const gchar * desktop_file;
+ const gchar * uri_scheme;
const gchar * name;
const gchar * setupname;
const gchar * icon;
};
struct default_db_t default_db[] = {
- {"evolution.desktop", N_("Mail"), N_("Set Up Mail..."), "applications-email-panel"},
- {"empathy.desktop", N_("Chat"), N_("Set Up Chat..."), "applications-chat-panel"},
- {"gwibber.desktop", N_("Broadcast"), N_("Set Up Broadcast Account..."), "applications-microblogging-panel"},
- {NULL, NULL}
+ {NULL, "mailto", N_("Mail"), N_("Set Up Mail..."), "applications-email-panel"},
+ {"empathy.desktop", NULL, N_("Chat"), N_("Set Up Chat..."), "applications-chat-panel"},
+ {"gwibber.desktop", NULL, N_("Broadcast"), N_("Set Up Broadcast Account..."), "applications-microblogging-panel"},
};
static struct default_db_t *
@@ -44,17 +46,40 @@ get_default_helper (const gchar * desktop_path)
gchar * basename = g_path_get_basename(desktop_path);
g_return_val_if_fail(basename != NULL, NULL);
+ gboolean found = FALSE;
gint i;
- for (i = 0; default_db[i].desktop_file != NULL; i++) {
- if (g_strcmp0(default_db[i].desktop_file, basename) == 0) {
- break;
+ gint length = G_N_ELEMENTS(default_db);
+ for (i = 0; i < length && !found; i++) {
+ if (default_db[i].desktop_file) {
+ if (g_strcmp0(default_db[i].desktop_file, basename) == 0) {
+ found = TRUE;
+ }
+ } else if (default_db[i].uri_scheme) {
+ GAppInfo *info = g_app_info_get_default_for_uri_scheme(default_db[i].uri_scheme);
+ if (!info) {
+ continue;
+ }
+
+ const gchar * filename = g_desktop_app_info_get_filename(G_DESKTOP_APP_INFO(info));
+ if (!filename) {
+ g_object_unref(info);
+ continue;
+ }
+
+ gchar * default_basename = g_path_get_basename(filename);
+ g_object_unref(info);
+ if (g_strcmp0(default_basename, basename) == 0) {
+ found = TRUE;
+ }
+
+ g_free(default_basename);
}
}
g_free(basename);
- if (default_db[i].desktop_file != NULL) {
- return &default_db[i];
+ if (found) {
+ return &default_db[i - 1];
}
return NULL;
diff --git a/src/messages-service.c b/src/messages-service.c
index 63549e3..c891f88 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -799,6 +799,8 @@ menushell_foreach_cb (DbusmenuMenuitem * data_mi, gpointer data_ms) {
AppMenuItem * appmenu = APP_MENU_ITEM(data_mi);
if (!g_strcmp0(INDICATE_LISTENER_SERVER_DBUS_NAME((IndicateListenerServer*)msl->server), INDICATE_LISTENER_SERVER_DBUS_NAME(app_menu_item_get_server(appmenu)))) {
msl->found = TRUE;
+ /* Return a position at the end of our shortcuts */
+ msl->position += g_list_length(app_menu_item_get_items(appmenu));
} else {
msl->position++;
}