shell-app: Remove old unused functionality

This commit is contained in:
Jasper St. Pierre 2013-10-14 09:38:40 -04:00
parent 3ca1784ff4
commit 5dedc5d8ba
2 changed files with 3 additions and 27 deletions

View File

@ -633,12 +633,7 @@ shell_app_activate_full (ShellApp *app,
case SHELL_APP_STATE_STOPPED: case SHELL_APP_STATE_STOPPED:
{ {
GError *error = NULL; GError *error = NULL;
if (!shell_app_launch (app, if (!shell_app_launch (app, timestamp, workspace, &error))
timestamp,
NULL,
workspace,
NULL,
&error))
{ {
char *msg; char *msg;
msg = g_strdup_printf (_("Failed to launch '%s'"), shell_app_get_name (app)); msg = g_strdup_printf (_("Failed to launch '%s'"), shell_app_get_name (app));
@ -680,12 +675,7 @@ shell_app_open_new_window (ShellApp *app,
* as say Pidgin. Ideally, we have the application express to us * as say Pidgin. Ideally, we have the application express to us
* that it supports an explicit new-window action. * that it supports an explicit new-window action.
*/ */
shell_app_launch (app, shell_app_launch (app, 0, workspace, NULL);
0,
NULL,
workspace,
NULL,
NULL);
} }
/** /**
@ -1175,17 +1165,13 @@ _gather_pid_callback (GDesktopAppInfo *gapp,
/** /**
* shell_app_launch: * shell_app_launch:
* @timestamp: Event timestamp, or 0 for current event timestamp * @timestamp: Event timestamp, or 0 for current event timestamp
* @uris: (element-type utf8): List of uris to pass to application
* @workspace: Start on this workspace, or -1 for default * @workspace: Start on this workspace, or -1 for default
* @startup_id: (out): Returned startup notification ID, or %NULL if none
* @error: A #GError * @error: A #GError
*/ */
gboolean gboolean
shell_app_launch (ShellApp *app, shell_app_launch (ShellApp *app,
guint timestamp, guint timestamp,
GList *uris,
int workspace, int workspace,
char **startup_id,
GError **error) GError **error)
{ {
GDesktopAppInfo *gapp; GDesktopAppInfo *gapp;
@ -1195,17 +1181,9 @@ shell_app_launch (ShellApp *app,
MetaScreen *screen; MetaScreen *screen;
GdkDisplay *gdisplay; GdkDisplay *gdisplay;
if (startup_id)
*startup_id = NULL;
if (app->entry == NULL) if (app->entry == NULL)
{ {
MetaWindow *window = window_backed_app_get_window (app); MetaWindow *window = window_backed_app_get_window (app);
/* We can't pass URIs into a window; shouldn't hit this
* code path. If we do, fix the caller to disallow it.
*/
g_return_val_if_fail (uris == NULL, TRUE);
meta_window_activate (window, timestamp); meta_window_activate (window, timestamp);
return TRUE; return TRUE;
} }
@ -1225,7 +1203,7 @@ shell_app_launch (ShellApp *app,
gdk_app_launch_context_set_desktop (context, workspace); gdk_app_launch_context_set_desktop (context, workspace);
gapp = gmenu_tree_entry_get_app_info (app->entry); gapp = gmenu_tree_entry_get_app_info (app->entry);
ret = g_desktop_app_info_launch_uris_as_manager (gapp, uris, ret = g_desktop_app_info_launch_uris_as_manager (gapp, NULL,
G_APP_LAUNCH_CONTEXT (context), G_APP_LAUNCH_CONTEXT (context),
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
NULL, NULL, NULL, NULL,

View File

@ -73,9 +73,7 @@ gboolean shell_app_is_on_workspace (ShellApp *app, MetaWorkspace *workspace);
gboolean shell_app_launch (ShellApp *app, gboolean shell_app_launch (ShellApp *app,
guint timestamp, guint timestamp,
GList *uris,
int workspace, int workspace,
char **startup_id,
GError **error); GError **error);
int shell_app_compare_by_name (ShellApp *app, ShellApp *other); int shell_app_compare_by_name (ShellApp *app, ShellApp *other);