Update copy/paste code from upstream

This includes a rename from the G* namespace to the Gtk* one, which
will help us with introspecting this code. Note that this removes
some of the custom code we added to GActionMuxer to relay event times
to the remote action group. We'll add this back soon.

https://bugzilla.gnome.org/show_bug.cgi?id=700257
This commit is contained in:
Jasper St. Pierre
2013-05-09 15:00:40 -04:00
parent ed76b54511
commit 10e857cebe
13 changed files with 1109 additions and 893 deletions

View File

@ -15,7 +15,7 @@
#include "shell-app-system-private.h"
#include "shell-window-tracker-private.h"
#include "st.h"
#include "gactionmuxer.h"
#include "gtkactionmuxer.h"
typedef enum {
MATCH_NONE,
@ -44,7 +44,7 @@ typedef struct {
/* See GApplication documentation */
GDBusMenuModel *remote_menu;
GActionMuxer *muxer;
GtkActionMuxer *muxer;
char *unique_bus_name;
GDBusConnection *session;
} ShellAppRunningState;
@ -565,9 +565,9 @@ shell_app_update_window_actions (ShellApp *app, MetaWindow *window)
}
if (!app->running_state->muxer)
app->running_state->muxer = g_action_muxer_new ();
app->running_state->muxer = gtk_action_muxer_new ();
g_action_muxer_insert (app->running_state->muxer, "win", actions);
gtk_action_muxer_insert (app->running_state->muxer, "win", actions);
g_object_notify (G_OBJECT (app), "action-group");
}
}
@ -1303,7 +1303,7 @@ create_running_state (ShellApp *app)
app->running_state->session = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
g_assert (app->running_state->session != NULL);
app->running_state->muxer = g_action_muxer_new ();
app->running_state->muxer = gtk_action_muxer_new ();
}
void
@ -1342,7 +1342,7 @@ shell_app_update_app_menu (ShellApp *app,
g_clear_object (&app->running_state->remote_menu);
app->running_state->remote_menu = g_dbus_menu_model_get (app->running_state->session, unique_bus_name, app_menu_object_path);
actions = g_dbus_action_group_get (app->running_state->session, unique_bus_name, application_object_path);
g_action_muxer_insert (app->running_state->muxer, "app", G_ACTION_GROUP (actions));
gtk_action_muxer_insert (app->running_state->muxer, "app", G_ACTION_GROUP (actions));
g_object_unref (actions);
}
}