[empathy] invite-participant-dialog: filter contacts by account
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] invite-participant-dialog: filter contacts by account
- Date: Mon, 15 Mar 2010 09:52:27 +0000 (UTC)
commit f75ecac41ace8d80c9253e3f16fc5e068885a1f0
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Mar 12 18:06:10 2010 +0100
invite-participant-dialog: filter contacts by account
We can't invite contacts from other accounts so we shouldn't display them
(#612718).
src/empathy-chat-window.c | 4 +++-
src/empathy-invite-participant-dialog.c | 7 +++++--
src/empathy-invite-participant-dialog.h | 3 ++-
3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 2e2f5c0..158faa0 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -875,6 +875,7 @@ chat_window_invite_participant_activate_cb (GtkAction *action,
EmpathyTpChat *tp_chat;
TpChannel *channel;
int response;
+ TpAccount *account;
priv = GET_PRIV (window);
@@ -882,9 +883,10 @@ chat_window_invite_participant_activate_cb (GtkAction *action,
tp_chat = empathy_chat_get_tp_chat (priv->current_chat);
channel = empathy_tp_chat_get_channel (tp_chat);
+ account = empathy_chat_get_account (priv->current_chat);
dialog = empathy_invite_participant_dialog_new (
- GTK_WINDOW (priv->dialog));
+ GTK_WINDOW (priv->dialog), account);
gtk_widget_show (dialog);
response = gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/src/empathy-invite-participant-dialog.c b/src/empathy-invite-participant-dialog.c
index 70332d1..77fb937 100644
--- a/src/empathy-invite-participant-dialog.c
+++ b/src/empathy-invite-participant-dialog.c
@@ -52,9 +52,12 @@ empathy_invite_participant_dialog_init (EmpathyInviteParticipantDialog *self)
}
GtkWidget *
-empathy_invite_participant_dialog_new (GtkWindow *parent)
+empathy_invite_participant_dialog_new (GtkWindow *parent,
+ TpAccount *account)
{
- GtkWidget *self = g_object_new (EMPATHY_TYPE_INVITE_PARTICIPANT_DIALOG, NULL);
+ GtkWidget *self = g_object_new (EMPATHY_TYPE_INVITE_PARTICIPANT_DIALOG,
+ "filter-account", account,
+ NULL);
if (parent != NULL)
{
diff --git a/src/empathy-invite-participant-dialog.h b/src/empathy-invite-participant-dialog.h
index 561e107..daacf51 100644
--- a/src/empathy-invite-participant-dialog.h
+++ b/src/empathy-invite-participant-dialog.h
@@ -39,7 +39,8 @@ struct _EmpathyInviteParticipantDialogClass
};
GType empathy_invite_participant_dialog_get_type (void);
-GtkWidget *empathy_invite_participant_dialog_new (GtkWindow *parent);
+GtkWidget *empathy_invite_participant_dialog_new (GtkWindow *parent,
+ TpAccount *account);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]