[empathy: 1/3] Readd Ctrl-H accelerator
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 1/3] Readd Ctrl-H accelerator
- Date: Wed, 16 May 2012 10:52:13 +0000 (UTC)
commit 72661bb34ca27c9b93ed93a765833cfbd1ee6e23
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Wed May 16 15:55:07 2012 +1000
Readd Ctrl-H accelerator
src/empathy-roster-window.c | 17 +++++++++++++++++
src/empathy.c | 4 ++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index 613a654..5d98981 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -2129,6 +2129,22 @@ contacts_loaded_cb (EmpathyIndividualManager *manager,
}
static void
+roster_window_setup_actions (EmpathyRosterWindow *self)
+{
+ GAction *action;
+
+#define ADD_GSETTINGS_ACTION(schema, key) \
+ action = g_settings_create_action (self->priv->gsettings_##schema, \
+ EMPATHY_PREFS_##key); \
+ g_action_map_add_action (G_ACTION_MAP (self), action); \
+ g_object_unref (action);
+
+ ADD_GSETTINGS_ACTION (ui, UI_SHOW_OFFLINE);
+
+#undef ADD_GSETTINGS_ACTION
+}
+
+static void
empathy_roster_window_init (EmpathyRosterWindow *self)
{
GtkBuilder *gui;
@@ -2194,6 +2210,7 @@ empathy_roster_window_init (EmpathyRosterWindow *self)
/* set up menus */
g_action_map_add_action_entries (G_ACTION_MAP (self),
menubar_entries, G_N_ELEMENTS (menubar_entries), self);
+ roster_window_setup_actions (self);
filename = empathy_file_lookup ("empathy-roster-window-menubar.ui", "src");
gui = empathy_builder_get_file (filename,
diff --git a/src/empathy.c b/src/empathy.c
index 9ba9236..e2ae263 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -357,6 +357,10 @@ empathy_app_command_line (GApplication *app,
gtk_application_add_window (GTK_APPLICATION (app),
GTK_WINDOW (self->window));
+ gtk_application_add_accelerator (GTK_APPLICATION (app),
+ "<Primary>h",
+ "win." EMPATHY_PREFS_UI_SHOW_OFFLINE,
+ NULL);
/* check if Shell is running */
dbus = tp_dbus_daemon_dup (&error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]