aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-popup.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-02 04:56:04 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-02 04:56:04 +0800
commitb2cda1d0c6d44f53f71bad9e256f41188677dfba (patch)
tree65bd7560e802baf1740482ae48b952dc5c5957fc /calendar/gui/e-cal-popup.c
parente52986f4225cbe8496043da74ca250521d244705 (diff)
downloadgsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.tar
gsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.tar.gz
gsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.tar.bz2
gsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.tar.lz
gsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.tar.xz
gsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.tar.zst
gsoc2013-evolution-b2cda1d0c6d44f53f71bad9e256f41188677dfba.zip
Merge revisions 36016:36533 from trunk.
svn path=/branches/kill-bonobo/; revision=36534
Diffstat (limited to 'calendar/gui/e-cal-popup.c')
-rw-r--r--calendar/gui/e-cal-popup.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index a805ee8002..7f61282a5a 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -1,21 +1,22 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors: Michael Zucchi <notzed@ximian.com>
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Authors:
+ * Michael Zucchi <notzed@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
*/
@@ -396,17 +397,18 @@ ecalp_standard_menu_factory (EPopup *ecalp, void *data)
for (cp = mime_type; *cp != '\0'; cp++)
*cp = g_ascii_tolower (*cp);
- /* TODO: g_app_info_get_all_for_type expects content_type, not a mime_type, thus it will work fine
- on Linux/Unix systems, but not on Win32. They will add hopefully some function to convert between
- these two soon. */
- apps = g_app_info_get_all_for_type (mime_type);
+ cp = g_content_type_from_mime_type (mime_type);
+ apps = g_app_info_get_all_for_type (cp ? cp : mime_type);
+ g_free (cp);
if (apps == NULL && strcmp(mime_type, "application/octet-stream") == 0) {
if (filename) {
gchar *name_type;
- name_type = e_util_guess_mime_type (filename);
- apps = g_app_info_get_all_for_type (name_type);
+ name_type = e_util_guess_mime_type (filename, FALSE);
+ cp = g_content_type_from_mime_type (name_type);
+ apps = g_app_info_get_all_for_type (cp ? cp : name_type);
+ g_free (cp);
g_free (name_type);
}
}