aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2012-05-16 13:55:07 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2012-05-16 13:55:07 +0800
commit72661bb34ca27c9b93ed93a765833cfbd1ee6e23 (patch)
tree818795702f2b4b39907e6e2d5b695a894762db9b /src
parent34c7e098b02a3feaddc3b0fbcf6d23aa05fa4175 (diff)
downloadgsoc2013-empathy-72661bb34ca27c9b93ed93a765833cfbd1ee6e23.tar
gsoc2013-empathy-72661bb34ca27c9b93ed93a765833cfbd1ee6e23.tar.gz
gsoc2013-empathy-72661bb34ca27c9b93ed93a765833cfbd1ee6e23.tar.bz2
gsoc2013-empathy-72661bb34ca27c9b93ed93a765833cfbd1ee6e23.tar.lz
gsoc2013-empathy-72661bb34ca27c9b93ed93a765833cfbd1ee6e23.tar.xz
gsoc2013-empathy-72661bb34ca27c9b93ed93a765833cfbd1ee6e23.tar.zst
gsoc2013-empathy-72661bb34ca27c9b93ed93a765833cfbd1ee6e23.zip
Readd Ctrl-H accelerator
Diffstat (limited to 'src')
-rw-r--r--src/empathy-roster-window.c17
-rw-r--r--src/empathy.c4
2 files changed, 21 insertions, 0 deletions
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index 613a654e6..5d9898153 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 9ba923602..e2ae2632f 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);