aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-02-07 07:59:33 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-02-07 07:59:33 +0800
commit02cc922c2b3b8c0a511c95c0da5f4536ed94142c (patch)
treeea7b62469c256978e063dfd23b59ed78be45e485
parent71d24b1424c861483f92a0e2d6412fc5633ec322 (diff)
downloadgsoc2013-empathy-02cc922c2b3b8c0a511c95c0da5f4536ed94142c.tar
gsoc2013-empathy-02cc922c2b3b8c0a511c95c0da5f4536ed94142c.tar.gz
gsoc2013-empathy-02cc922c2b3b8c0a511c95c0da5f4536ed94142c.tar.bz2
gsoc2013-empathy-02cc922c2b3b8c0a511c95c0da5f4536ed94142c.tar.lz
gsoc2013-empathy-02cc922c2b3b8c0a511c95c0da5f4536ed94142c.tar.xz
gsoc2013-empathy-02cc922c2b3b8c0a511c95c0da5f4536ed94142c.tar.zst
gsoc2013-empathy-02cc922c2b3b8c0a511c95c0da5f4536ed94142c.zip
Add blocked contacts dialog to Empathy main window menu
-rw-r--r--src/empathy-main-window.c17
-rw-r--r--src/empathy-main-window.ui7
2 files changed, 23 insertions, 1 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index e953cb01c..6656ee0e4 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -51,6 +51,7 @@
#include <libempathy-gtk/empathy-contact-list-store.h>
#include <libempathy-gtk/empathy-contact-list-view.h>
#include <libempathy-gtk/empathy-live-search.h>
+#include <libempathy-gtk/empathy-contact-blocking-dialog.h>
#include <libempathy-gtk/empathy-contact-search-dialog.h>
#include <libempathy-gtk/empathy-geometry.h>
#include <libempathy-gtk/empathy-gtk-enum-types.h>
@@ -1436,6 +1437,18 @@ main_window_edit_personal_information_cb (GtkAction *action,
}
static void
+main_window_edit_blocked_contacts_cb (GtkAction *action,
+ EmpathyMainWindow *window)
+{
+ GtkWidget *dialog;
+
+ dialog = empathy_contact_blocking_dialog_new (GTK_WINDOW (window));
+ gtk_widget_show (dialog);
+ g_signal_connect (dialog, "response",
+ G_CALLBACK (gtk_widget_destroy), NULL);
+}
+
+static void
main_window_edit_preferences_cb (GtkAction *action,
EmpathyMainWindow *window)
{
@@ -1586,7 +1599,8 @@ main_window_connection_items_setup (EmpathyMainWindow *window,
"chat_new_message",
"chat_new_call",
"chat_add_contact",
- "edit_personal_information"
+ "edit_personal_information",
+ "edit_blocked_contacts"
};
for (i = 0, list = NULL; i < G_N_ELEMENTS (actions_connected); i++) {
@@ -1764,6 +1778,7 @@ empathy_main_window_init (EmpathyMainWindow *window)
"edit", "activate", main_window_edit_cb,
"edit_accounts", "activate", main_window_edit_accounts_cb,
"edit_personal_information", "activate", main_window_edit_personal_information_cb,
+ "edit_blocked_contacts", "activate", main_window_edit_blocked_contacts_cb,
"edit_preferences", "activate", main_window_edit_preferences_cb,
"help_about", "activate", main_window_help_about_cb,
"help_debug", "activate", main_window_help_debug_cb,
diff --git a/src/empathy-main-window.ui b/src/empathy-main-window.ui
index c57a9df64..a538e0120 100644
--- a/src/empathy-main-window.ui
+++ b/src/empathy-main-window.ui
@@ -107,6 +107,12 @@
</object>
</child>
<child>
+ <object class="GtkAction" id="edit_blocked_contacts">
+ <property name="name">edit_blocked_contacts</property>
+ <property name="label" translatable="yes">_Blocked Contacts</property>
+ </object>
+ </child>
+ <child>
<object class="GtkAction" id="edit_preferences">
<property name="stock_id">gtk-preferences</property>
<property name="name">edit_preferences</property>
@@ -242,6 +248,7 @@
<separator name="edit_context_separator"/>
<menuitem action="edit_accounts"/>
<menuitem action="edit_personal_information"/>
+ <menuitem action="edit_blocked_contacts"/>
<separator/>
<menuitem action="edit_preferences"/>
</menu>