[Pkg-maemo-commits] r46 ./libhildonmime/debian: * Merged with trunk branch.
Jonny Lamb
jonnylamb at jonnylamb.com
Fri Dec 28 19:20:43 UTC 2007
------------------------------------------------------------
revno: 46
committer: Jonny Lamb <jonnylamb at jonnylamb.com>
branch nick: libhildonmime
timestamp: Fri 2007-09-21 20:00:16 +0100
message:
* Merged with trunk branch.
modified:
ChangeLog
configure.in
data/uri-action-defaults.list
debian/changelog
libhildonmime/hildon-mime-open.c
libhildonmime/hildon-uri.c
tests/test-all.c
tests/test-uri.c
------------------------------------------------------------
revno: 21.1.17
committer: martyn
timestamp: Tue 2007-08-07 15:13:48 +0000
message:
* data/uri-action-defaults.list: Added xmpp scheme to the default
applications list so the chat-ui is used before the address book.
* tests/test-uri.c: Call g_thread_init() to stop warnings.
modified:
ChangeLog
data/uri-action-defaults.list
debian/changelog
tests/test-uri.c
------------------------------------------------------------
revno: 21.1.18
committer: martyn
timestamp: Fri 2007-08-10 12:25:51 +0000
message:
* debian/rules: Fix building with the new Scratchbox toolchain,
fixes NB#65400.
modified:
ChangeLog
debian/changelog
debian/rules
------------------------------------------------------------
revno: 21.1.19
committer: martyn
timestamp: Fri 2007-08-10 13:55:29 +0000
message:
* tests/test-uri.c: (main): Add switch to get the mime type from
an URI name (i.e. no probing, simple URI extension guess work).
modified:
ChangeLog
tests/test-uri.c
------------------------------------------------------------
revno: 21.1.20
committer: martyn
timestamp: Fri 2007-08-10 15:19:01 +0000
message:
Release 1.9.12
modified:
ChangeLog
configure.in
debian/changelog
------------------------------------------------------------
revno: 21.1.21
committer: martyn
timestamp: Mon 2007-08-13 11:28:41 +0000
message:
* configure.in: Bumped version.
* libhildonmime/hildon-uri.c: Make sure that the GSList* returned
when getting actions has the default action as the TOP MOST action
in the list, this fixes NB#62728.
* tests/test-all.c: Add comment to add a test for this at some
stage when we have more time.
modified:
ChangeLog
configure.in
debian/changelog
libhildonmime/hildon-uri.c
tests/test-all.c
------------------------------------------------------------
revno: 21.1.22
committer: martyn
timestamp: Wed 2007-08-15 10:11:46 +0000
message:
Release 1.9.13
modified:
ChangeLog
debian/changelog
------------------------------------------------------------
revno: 21.1.23
committer: martyn
timestamp: Mon 2007-08-20 10:19:36 +0000
message:
* configure.in: Bumped verison.
* libhildonmime/hildon-uri.c: (uri_get_desktop_file_by_filename):
Fixed bug where we would obtain the desktop file and the action id
but would have a space prepending or appending the returned
strings, this meant you could be returned the desktop file
'foo.desktop ' and that breaks a lot of things. Now we strip the
returned strings for whitespace. Fixes bug NB#62728.
modified:
ChangeLog
configure.in
debian/changelog
libhildonmime/hildon-uri.c
------------------------------------------------------------
revno: 21.1.24
committer: martyn
timestamp: Thu 2007-08-23 16:56:08 +0000
message:
Release 1.9.14
modified:
ChangeLog
debian/changelog
------------------------------------------------------------
revno: 21.1.25
committer: martyn
timestamp: Tue 2007-08-28 11:12:02 +0000
message:
* configure.in: Bumped verison.
* data/uri-action-defaults.list (mailto): Updated to use the old
email client for the time being
modified:
ChangeLog
configure.in
data/uri-action-defaults.list
debian/changelog
------------------------------------------------------------
revno: 21.1.26
committer: martyn
timestamp: Thu 2007-08-30 12:32:03 +0000
message:
* data/uri-action-defaults.list (mms): Added defaults for the
media player schemes mms, mmsh, rtsp and rdp. Fixes NB#62724.
modified:
ChangeLog
data/uri-action-defaults.list
debian/changelog
------------------------------------------------------------
revno: 21.1.27
committer: martyn
timestamp: Thu 2007-08-30 12:34:40 +0000
message:
* data/uri-action-defaults.list Added comment to the top of the
file stating libhildonmime maintains it since people spend time
reassining bugs until they find out which package the defaults
file is maintained by.
modified:
ChangeLog
data/uri-action-defaults.list
------------------------------------------------------------
revno: 21.1.28
committer: martyn
timestamp: Fri 2007-08-31 14:03:40 +0000
message:
* libhildonmime/hildon-mime-open.c:
(mime_launch_notify_task_navigator):
* libhildonmime/hildon-uri.c:
(uri_launch_notify_task_navigator): Use the new DBus service,
details for notifying the user that an application is being
launched. This fixes NB#67710.
modified:
ChangeLog
debian/changelog
libhildonmime/hildon-mime-open.c
libhildonmime/hildon-uri.c
------------------------------------------------------------
revno: 21.1.29
committer: martyn
timestamp: Fri 2007-08-31 15:52:44 +0000
message:
Release 1.9.15.
modified:
ChangeLog
debian/changelog
-------------- next part --------------
=== modified file 'ChangeLog'
--- a/ChangeLog 2007-07-13 15:10:55 +0000
+++ b/ChangeLog 2007-08-31 15:52:44 +0000
@@ -1,3 +1,86 @@
+2007-08-31 Martyn Russell <martyn at imendio.com>
+
+ * Release 1.9.15.
+
+2007-08-31 Martyn Russell <martyn at imendio.com>
+
+ * libhildonmime/hildon-mime-open.c:
+ (mime_launch_notify_task_navigator):
+ * libhildonmime/hildon-uri.c:
+ (uri_launch_notify_task_navigator): Use the new DBus service,
+ details for notifying the user that an application is being
+ launched. This fixes NB#67710.
+
+2007-08-30 Martyn Russell <martyn at imendio.com>
+
+ * data/uri-action-defaults.list Added comment to the top of the
+ file stating libhildonmime maintains it since people spend time
+ reassining bugs until they find out which package the defaults
+ file is maintained by.
+
+2007-08-30 Martyn Russell <martyn at imendio.com>
+
+ * data/uri-action-defaults.list (mms): Added defaults for the
+ media player schemes mms, mmsh, rtsp and rdp. Fixes NB#62724.
+
+2007-08-28 Martyn Russell <martyn at imendio.com>
+
+ * configure.in: Bumped verison.
+
+ * data/uri-action-defaults.list (mailto): Updated to use the old
+ email client for the time being
+
+2007-08-23 Martyn Russell <martyn at imendio.com>
+
+ * Release 1.9.14.
+
+2007-08-20 Martyn Russell <martyn at imendio.com>
+
+ * configure.in: Bumped verison.
+
+ * libhildonmime/hildon-uri.c: (uri_get_desktop_file_by_filename):
+ Fixed bug where we would obtain the desktop file and the action id
+ but would have a space prepending or appending the returned
+ strings, this meant you could be returned the desktop file
+ 'foo.desktop ' and that breaks a lot of things. Now we strip the
+ returned strings for whitespace. Fixes bug NB#62728.
+
+2007-08-15 Martyn Russell <martyn at imendio.com>
+
+ * Release 1.9.13.
+
+2007-08-13 Martyn Russell <martyn at imendio.com>
+
+ * configure.in: Bumped version.
+
+ * libhildonmime/hildon-uri.c: Make sure that the GSList* returned
+ when getting actions has the default action as the TOP MOST action
+ in the list, this fixes NB#62728.
+
+ * tests/test-all.c: Add comment to add a test for this at some
+ stage when we have more time.
+
+2007-08-10 Martyn Russell <martyn at imendio.com>
+
+ * Release 1.9.12.
+
+2007-08-10 Martyn Russell <martyn at imendio.com>
+
+ * tests/test-uri.c: (main): Add switch to get the mime type from
+ an URI name (i.e. no probing, simple URI extension guess work).
+
+2007-08-10 Martyn Russell <martyn at imendio.com>
+
+ * debian/rules: Fix building with the new Scratchbox toolchain,
+ fixes NB#65400.
+
+2007-08-07 Martyn Russell <martyn at imendio.com>
+
+ * data/uri-action-defaults.list: Added xmpp scheme to the default
+ applications list so the chat-ui is used before the address book.
+
+ * tests/test-uri.c: Call g_thread_init() to stop warnings.
+
2007-07-13 Martyn Russell <martyn at imendio.com>
* Release 1.9.11.
=== modified file 'configure.in'
--- a/configure.in 2007-07-22 21:46:53 +0000
+++ b/configure.in 2007-09-21 19:00:16 +0000
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT(libhildonmime, 1.9.11)
+AC_INIT(libhildonmime, 1.9.15)
AC_CONFIG_SRCDIR(libhildonmime/hildon-uri.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
=== modified file 'data/uri-action-defaults.list'
--- a/data/uri-action-defaults.list 2007-07-09 23:04:48 +0000
+++ b/data/uri-action-defaults.list 2007-08-30 12:34:40 +0000
@@ -1,3 +1,4 @@
+# This file is maintained by libhildonmime
[Default Actions]
http=hildon-browser.desktop
https=hildon-browser.desktop
@@ -6,8 +7,13 @@
ftp=hildon-browser.desktop
sipto=hildon-osso-addressbook.desktop
sip=hildon-voip-ui.desktop
-mailto=hildon-modest.desktop
+mailto=hildon-email-engine.desktop
chatto=hildon-chat-ui.desktop
+xmpp=hildon-chat-ui.desktop
+mms=hildon-mp_ui.desktop
+mmsh=hildon-mp_ui.desktop
+rtsp=hildon-mp_ui.desktop
+rdp=hildon-mp_ui.desktop
# For new actions
[X-Osso-URI-Scheme http]
=== modified file 'debian/changelog'
--- a/debian/changelog 2007-07-23 13:53:16 +0000
+++ b/debian/changelog 2007-09-21 19:00:16 +0000
@@ -1,4 +1,4 @@
-libhildonmime (1.9.3-2-1) UNRELEASED; urgency=low
+libhildonmime (1.9.15-1-1) UNRELEASED; urgency=low
[ Loic Minier ]
* Set Maintainer to Debian Maemo Maintainers; add myself to Uploaders.
@@ -22,9 +22,38 @@
* Updated descriptions in control.
* Merged with trunk branch.
* Add myself to Uploaders.
-
- -- Jonny Lamb <jonnylamb at jonnylamb.com> Mon, 23 Jul 2007 14:52:37 +0100
-
+ * Merged with trunk branch.
+
+ -- Jonny Lamb <jonnylamb at jonnylamb.com> Fri, 21 Sep 2007 18:20:51 +0100
+
+libhildonmime (1.9.15-1) unstable; urgency=low
+
+ * Update default URI handler for mailto scheme to use old email engine.
+ * Fixes: NB#62724, Unable to launch media player from browser with mms:// url
+ * Fixes: NB#67710, Application loading information banner is not shown if ...
+
+ -- Martyn Russell <martyn at imendio.com> Fri, 31 Aug 2007 17:00:00 +0100
+
+libhildonmime (1.9.14-1) unstable; urgency=low
+
+ * Fixes: NB#62728, Default handling application for "sip" link is incorrect
+
+ -- Martyn Russell <martyn at imendio.com> Thu, 23 Aug 2007 18:00:00 +0100
+
+libhildonmime (1.9.13-1) unstable; urgency=low
+
+ * Fixes: NB#62728, Default handling application for "sip" link is incorrect
+
+ -- Martyn Russell <martyn at imendio.com> Fri, 17 Aug 2007 17:00:00 +0100
+
+libhildonmime (1.9.12-1) unstable; urgency=low
+
+ * Updated the default application list so the chat-ui is default for xmpp schemes.
+ * Fixes: NB#65400, libhildonmime won't build
+
+ -- Martyn Russell <martyn at imendio.com> Fri, 10 Aug 2007 17:00:00 +0100
+
+>>>>>>> MERGE-SOURCE
libhildonmime (1.9.11-1) unstable; urgency=low
* Fixes: NB#62728, Default handling application for "sip" link is incorrect
=== modified file 'libhildonmime/hildon-mime-open.c'
--- a/libhildonmime/hildon-mime-open.c 2007-05-04 12:05:33 +0000
+++ b/libhildonmime/hildon-mime-open.c 2007-08-31 14:03:40 +0000
@@ -91,12 +91,11 @@
#define X_OSSO_SERVICE "X-Osso-Service"
-/* From osso-rpc.c */
-#define TASK_NAV_SERVICE "com.nokia.tasknav"
-/* NOTICE: Keep these in sync with values in hildon-navigator/windowmanager.c! */
-#define APP_LAUNCH_BANNER_METHOD_INTERFACE "com.nokia.tasknav.app_launch_banner"
-#define APP_LAUNCH_BANNER_METHOD_PATH "/com/nokia/tasknav/app_launch_banner"
-#define APP_LAUNCH_BANNER_METHOD "app_launch_banner"
+/* Updated from patch in NB#67710 */
+#define APP_LAUNCH_BANNER_SERVICE "com.nokia.hildon-desktop"
+#define APP_LAUNCH_BANNER_METHOD_INTERFACE "com.nokia.hildon.hdwm.startupnotification"
+#define APP_LAUNCH_BANNER_METHOD_PATH "/com/nokia/hildon/hdwm"
+#define APP_LAUNCH_BANNER_METHOD "starting"
typedef struct {
gchar *service_name;
@@ -232,10 +231,10 @@
/* From osso-rpc.c */
/* Inform the task navigator that we are launching the service */
- dprint ("Notifying the task navigator...");
+ dprint ("Notifying the application-launching-banner service...");
- dprint ("Creating message for service: '%s'", TASK_NAV_SERVICE);
- msg = dbus_message_new_method_call (TASK_NAV_SERVICE,
+ dprint ("Creating message for service: '%s'", APP_LAUNCH_BANNER_SERVICE);
+ msg = dbus_message_new_method_call (APP_LAUNCH_BANNER_SERVICE,
APP_LAUNCH_BANNER_METHOD_PATH,
APP_LAUNCH_BANNER_METHOD_INTERFACE,
APP_LAUNCH_BANNER_METHOD);
@@ -247,17 +246,17 @@
if (dbus_connection_send (con, msg, NULL) == TRUE) {
dprint ("Sent message to service: '%s'",
- TASK_NAV_SERVICE);
+ APP_LAUNCH_BANNER_SERVICE);
dbus_connection_flush (con);
} else {
dprint ("Couldn't send message to service: '%s'",
- TASK_NAV_SERVICE);
+ APP_LAUNCH_BANNER_SERVICE);
success = FALSE;
}
} else {
dprint ("Couldn't append msg with service: '%s'",
- TASK_NAV_SERVICE);
+ APP_LAUNCH_BANNER_SERVICE);
success = FALSE;
}
@@ -265,7 +264,7 @@
} else {
dprint ("Couldn't create msg with method: '%s' to service: '%s'",
APP_LAUNCH_BANNER_METHOD,
- TASK_NAV_SERVICE);
+ APP_LAUNCH_BANNER_SERVICE);
success = FALSE;
}
=== modified file 'libhildonmime/hildon-uri.c'
--- a/libhildonmime/hildon-uri.c 2007-06-19 13:20:11 +0000
+++ b/libhildonmime/hildon-uri.c 2007-08-31 14:03:40 +0000
@@ -55,16 +55,13 @@
#define HILDON_URI_DEFAULTS_GROUP "Default Actions"
#define HILDON_URI_DEFAULTS_GROUP_FORMAT "X-Osso-URI-Scheme %s" /* new */
-/* From osso-rpc.c */
-#define TASK_NAV_SERVICE "com.nokia.tasknav"
-/* NOTICE: Keep these in sync with values in hildon-navigator/windowmanager.c! */
-#define APP_LAUNCH_BANNER_METHOD_INTERFACE "com.nokia.tasknav.app_launch_banner"
-#define APP_LAUNCH_BANNER_METHOD_PATH "/com/nokia/tasknav/app_launch_banner"
-#define APP_LAUNCH_BANNER_METHOD "app_launch_banner"
-
-
-#define DEBUG_MSG(x)
-/* #define DEBUG_MSG(args) g_printerr args ; g_printerr ("\n"); */
+/* Updated from patch in NB#67710 */
+#define APP_LAUNCH_BANNER_SERVICE "com.nokia.hildon-desktop"
+#define APP_LAUNCH_BANNER_METHOD_INTERFACE "com.nokia.hildon.hdwm.startupnotification"
+#define APP_LAUNCH_BANNER_METHOD_PATH "/com/nokia/hildon/hdwm"
+#define APP_LAUNCH_BANNER_METHOD "starting"
+
+#define DEBUG_MSG(args) g_printerr args ; g_printerr ("\n");
/* The ID is the group name in the desktop file for this
* action, the domain is the translation domain used for the
@@ -939,6 +936,7 @@
strv = g_strsplit (str, ";", -1);
if (strv) {
*desktop_file = g_strdup (strv[0]);
+ g_strstrip (*desktop_file);
g_strfreev (strv);
g_free (str);
} else {
@@ -949,6 +947,7 @@
if (p) {
*action_id = g_strdup (p + 1);
p[0] = '\0';
+ g_strstrip (*action_id);
}
}
}
@@ -1223,10 +1222,10 @@
/* From osso-rpc.c */
/* Inform the task navigator that we are launching the service */
- DEBUG_MSG (("URI: Notifying the task navigator..."));
+ DEBUG_MSG (("URI: Notifying the application-launching-banner service..."));
- DEBUG_MSG (("URI: Creating message for service: '%s'", TASK_NAV_SERVICE));
- msg = dbus_message_new_method_call (TASK_NAV_SERVICE,
+ DEBUG_MSG (("URI: Creating message for service: '%s'", APP_LAUNCH_BANNER_SERVICE));
+ msg = dbus_message_new_method_call (APP_LAUNCH_BANNER_SERVICE,
APP_LAUNCH_BANNER_METHOD_PATH,
APP_LAUNCH_BANNER_METHOD_INTERFACE,
APP_LAUNCH_BANNER_METHOD);
@@ -1238,17 +1237,17 @@
if (dbus_connection_send (connection, msg, NULL) == TRUE) {
DEBUG_MSG (("URI: Sent message to service: '%s'",
- TASK_NAV_SERVICE));
+ APP_LAUNCH_BANNER_SERVICE));
dbus_connection_flush (connection);
} else {
DEBUG_MSG (("URI: Couldn't send message to service: '%s'",
- TASK_NAV_SERVICE));
+ APP_LAUNCH_BANNER_SERVICE));
success = FALSE;
}
} else {
DEBUG_MSG (("URI: Couldn't append msg with service: '%s'",
- TASK_NAV_SERVICE));
+ APP_LAUNCH_BANNER_SERVICE));
success = FALSE;
}
@@ -1256,7 +1255,7 @@
} else {
DEBUG_MSG (("URI: Couldn't create msg with method: '%s' to service: '%s'",
APP_LAUNCH_BANNER_METHOD,
- TASK_NAV_SERVICE));
+ APP_LAUNCH_BANNER_SERVICE));
success = FALSE;
}
@@ -1505,10 +1504,10 @@
hildon_uri_get_actions (const gchar *scheme,
GError **error)
{
- GSList *actions = NULL;
- GSList *desktop_files;
- GSList *l;
- gchar *filename;
+ GSList *actions = NULL;
+ GSList *desktop_files;
+ GSList *l;
+ gchar *filename;
g_return_val_if_fail (scheme != NULL && scheme[0] != '\0', NULL);
@@ -1525,6 +1524,28 @@
}
}
+ /* Make sure the default action is the first item in the list */
+ DEBUG_MSG (("URI: Making sure default action is the top of the list..."));
+
+ if (actions && !hildon_uri_is_default_action (actions->data, NULL)) {
+ HildonURIAction *default_action;
+
+ for (l = actions->next; l; l = l->next) {
+ if (!hildon_uri_is_default_action (l->data, NULL)) {
+ continue;
+ }
+
+ DEBUG_MSG (("URI: Moving default action to the top of the list..."));
+
+ default_action = l->data;
+
+ actions = g_slist_remove_link (actions, l);
+ g_slist_free1 (l);
+
+ actions = g_slist_prepend (actions, default_action);
+ }
+ }
+
g_slist_foreach (desktop_files, (GFunc) g_free, NULL);
g_slist_free (desktop_files);
@@ -1595,6 +1616,28 @@
action_type,
mime_type);
+ /* Make sure the default action is the first item in the list */
+ DEBUG_MSG (("URI: Making sure default action is the top of the list..."));
+
+ if (actions && !hildon_uri_is_default_action_by_uri (uri_str, actions->data, NULL)) {
+ HildonURIAction *default_action;
+
+ for (l = actions->next; l; l = l->next) {
+ if (!hildon_uri_is_default_action_by_uri (uri_str, l->data, NULL)) {
+ continue;
+ }
+
+ DEBUG_MSG (("URI: Moving default action to the top of the list..."));
+
+ default_action = l->data;
+
+ actions = g_slist_remove_link (actions, l);
+ g_slist_free1 (l);
+
+ actions = g_slist_prepend (actions, default_action);
+ }
+ }
+
g_slist_foreach (desktop_files, (GFunc) g_free, NULL);
g_slist_free (desktop_files);
@@ -1769,23 +1812,23 @@
* Return: The %TRUE if it is the default action or %FALSE.
**/
gboolean
-hildon_uri_is_default_action_by_uri (const gchar *uri,
+hildon_uri_is_default_action_by_uri (const gchar *uri_str,
HildonURIAction *action,
GError **error)
{
HildonURIAction *default_action;
- gboolean equal = FALSE;
+ gboolean equal = FALSE;
- g_return_val_if_fail (uri != NULL, FALSE);
+ g_return_val_if_fail (uri_str != NULL, FALSE);
g_return_val_if_fail (action != NULL, FALSE);
- default_action = hildon_uri_get_default_action_by_uri (uri, error);
+ default_action = hildon_uri_get_default_action_by_uri (uri_str, error);
DEBUG_MSG (("URI: Checking desktop file is default by uri:'%s' for scheme:'%s':\n"
"\tdefault_action:%p\n"
"\tdefault_action->desktop_file:'%s'\n"
"\taction->desktop_file:'%s'",
- uri,
+ uri_str,
action->scheme,
default_action,
default_action ? default_action->desktop_file : "",
@@ -1826,7 +1869,7 @@
"\tmethod1:'%s'\n"
"\tmethod2:'%s'\n"
"\tEQUAL = %s",
- uri,
+ uri_str,
desktop_file1, desktop_file2,
default_action->name, action->name,
default_action->method, action->method,
=== modified file 'tests/test-all.c'
--- a/tests/test-all.c 2007-06-19 13:20:11 +0000
+++ b/tests/test-all.c 2007-08-13 11:28:41 +0000
@@ -656,6 +656,11 @@
test_get_actions ();
}
+ /* FIXME: Add the following tests:
+ * - Make sure the default action is the top action in the list
+ * returned for _get_actions()
+ */
+
test_failure_conditions ();
test_system_default_actions ();
test_local_default_actions ();
=== modified file 'tests/test-uri.c'
--- a/tests/test-uri.c 2007-06-18 15:27:27 +0000
+++ b/tests/test-uri.c 2007-08-10 13:55:29 +0000
@@ -38,6 +38,7 @@
static gchar *set_default_by_uri = NULL;
static gchar *set_default_to_nothing = NULL;
static gchar *get_scheme = NULL;
+static gchar *get_mime_type = NULL;
static gchar **open_uris = NULL;
static GOptionEntry entries[] =
@@ -97,6 +98,11 @@
&get_scheme,
"Get the scheme from a URI like \"http://www.google.com\"",
NULL },
+ { "get-mime-type", 'y',
+ 0, G_OPTION_ARG_STRING,
+ &get_mime_type,
+ "Get the mime type from a URI like \"file:///home/martyn/file.swf\"",
+ NULL },
{ "open-uri", 'u',
0, G_OPTION_ARG_STRING_ARRAY,
&open_uris,
@@ -110,7 +116,9 @@
{
GOptionContext *context;
GError *error = NULL;
-
+
+ g_thread_init (NULL);
+
context = g_option_context_new ("- test the hildon-uri API.");
g_option_context_add_main_entries (context, entries, NULL);
g_option_context_parse (context, &argc, &argv, NULL);
@@ -119,7 +127,7 @@
if ((!use_default && !get_actions && !get_actions_by_uri &&
!get_default && !get_default_by_uri &&
!set_default && !set_default_by_uri && !set_default_to_nothing &&
- !get_scheme && !open_uris) ||
+ !get_scheme && !get_mime_type && !open_uris) ||
(set_default && !get_default) ||
(is_default && !get_actions)) {
g_printerr ("Usage: %s --help\n", argv[0]);
@@ -420,6 +428,21 @@
g_free (scheme);
}
+ if (get_mime_type) {
+ const gchar *mime_type = NULL;
+
+ mime_type = gnome_vfs_get_mime_type_for_name (get_mime_type);
+
+ if (!mime_type) {
+ g_printerr ("Could not get mime type from uri:'%s'\n",
+ get_mime_type);
+ return EXIT_FAILURE;
+ }
+
+ g_print ("Mime type for URI:'%s' is '%s'\n",
+ get_mime_type, mime_type);
+ }
+
if (open_uris) {
const gchar *uri;
gint i = 0;
More information about the Pkg-maemo-commits
mailing list