[Xfce4-commits] <midori:master> Warn if executing a non-existing action remotely
Christian Dywan
noreply at xfce.org
Sat Jul 21 00:44:01 CEST 2012
Updating branch refs/heads/master
to 1ea3c81643d12243a95f375c6561900b0719a351 (commit)
from 3ec314c7f8d3cb5001e137c10c2f0aef60cdff03 (commit)
commit 1ea3c81643d12243a95f375c6561900b0719a351
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Jul 21 00:35:05 2012 +0200
Warn if executing a non-existing action remotely
midori/midori-app.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/midori/midori-app.c b/midori/midori-app.c
index a7bce86..1822a91 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -1144,7 +1144,19 @@ midori_app_send_command (MidoriApp* app,
/* g_return_val_if_fail (MIDORI_IS_APP (app), FALSE); */
g_return_val_if_fail (command != NULL, FALSE);
- if (!midori_app_instance_is_running (app))
+ if (midori_app_instance_is_running (app))
+ {
+ MidoriBrowser* browser = midori_browser_new ();
+ int i;
+ for (i=0; command && command[i]; i++)
+ {
+ gboolean action_known = (gtk_action_group_get_action (midori_browser_get_action_group (browser), command[i]) != NULL);
+ if (!action_known)
+ g_warning (_("Unexpected action '%s'."), command[i]);
+ }
+ gtk_widget_destroy (GTK_WIDGET (browser));
+ }
+ else
return midori_app_command_received (app, "command", command, NULL);
#if HAVE_HILDON
More information about the Xfce4-commits
mailing list