ShellApp: Report error when we fail to run an app
https://bugzilla.gnome.org/show_bug.cgi?id=644402
This commit is contained in:
parent
b4f16c4df8
commit
4bf1df0894
@ -30,6 +30,7 @@ js/ui/workspacesView.js
|
|||||||
src/gvc/gvc-mixer-control.c
|
src/gvc/gvc-mixer-control.c
|
||||||
src/gdmuser/gdm-user.c
|
src/gdmuser/gdm-user.c
|
||||||
src/main.c
|
src/main.c
|
||||||
|
src/shell-app.c
|
||||||
src/shell-app-system.c
|
src/shell-app-system.c
|
||||||
src/shell-global.c
|
src/shell-global.c
|
||||||
src/shell-mobile-providers.c
|
src/shell-mobile-providers.c
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <glib/gi18n-lib.h>
|
||||||
|
|
||||||
#include <meta/display.h>
|
#include <meta/display.h>
|
||||||
|
|
||||||
#include "shell-app-private.h"
|
#include "shell-app-private.h"
|
||||||
@ -427,13 +429,24 @@ shell_app_activate (ShellApp *app,
|
|||||||
switch (app->state)
|
switch (app->state)
|
||||||
{
|
{
|
||||||
case SHELL_APP_STATE_STOPPED:
|
case SHELL_APP_STATE_STOPPED:
|
||||||
/* TODO sensibly handle this error */
|
{
|
||||||
shell_app_info_launch_full (app->info,
|
GError *error = NULL;
|
||||||
0,
|
if (!shell_app_info_launch_full (app->info,
|
||||||
NULL,
|
0,
|
||||||
workspace,
|
NULL,
|
||||||
NULL,
|
workspace,
|
||||||
NULL);
|
NULL,
|
||||||
|
&error))
|
||||||
|
{
|
||||||
|
char *msg;
|
||||||
|
msg = g_strdup_printf (_("Failed to launch '%s'"), shell_app_get_name (app));
|
||||||
|
shell_global_notify_error (shell_global_get (),
|
||||||
|
msg,
|
||||||
|
error->message);
|
||||||
|
g_free (msg);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SHELL_APP_STATE_STARTING:
|
case SHELL_APP_STATE_STARTING:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user