aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-06-14 21:20:37 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-06-14 21:20:37 +0800
commit4d881a11fc8a3f56456cc89bf01b8007c59c27a2 (patch)
tree888550b9153748b0a091f46f6cd6d9d67a2c1916 /libempathy-gtk
parent6a18f1b044c05bc3da62cec4ab94483c01670aa2 (diff)
downloadgsoc2013-empathy-4d881a11fc8a3f56456cc89bf01b8007c59c27a2.tar
gsoc2013-empathy-4d881a11fc8a3f56456cc89bf01b8007c59c27a2.tar.gz
gsoc2013-empathy-4d881a11fc8a3f56456cc89bf01b8007c59c27a2.tar.bz2
gsoc2013-empathy-4d881a11fc8a3f56456cc89bf01b8007c59c27a2.tar.lz
gsoc2013-empathy-4d881a11fc8a3f56456cc89bf01b8007c59c27a2.tar.xz
gsoc2013-empathy-4d881a11fc8a3f56456cc89bf01b8007c59c27a2.tar.zst
gsoc2013-empathy-4d881a11fc8a3f56456cc89bf01b8007c59c27a2.zip
2007-06-14 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/gossip-contact-list-view.c: Show logs when right click on a contact in the roster. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@155 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/gossip-contact-list-view.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/libempathy-gtk/gossip-contact-list-view.c b/libempathy-gtk/gossip-contact-list-view.c
index 74b1d187f..8b42ab18e 100644
--- a/libempathy-gtk/gossip-contact-list-view.c
+++ b/libempathy-gtk/gossip-contact-list-view.c
@@ -36,6 +36,7 @@
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-contact-list.h>
+#include <libempathy/empathy-log-manager.h>
#include <libempathy/gossip-debug.h>
#include <libempathy/gossip-utils.h>
#include <libempathy/empathy-marshal.h>
@@ -50,7 +51,7 @@
#include "empathy-contact-dialogs.h"
//#include "gossip-chat-invite.h"
//#include "gossip-ft-window.h"
-//#include "gossip-log-window.h"
+#include "gossip-log-window.h"
#define DEBUG_DOMAIN "ContactListView"
@@ -526,14 +527,20 @@ GtkWidget *
gossip_contact_list_view_get_contact_menu (GossipContactListView *view,
GossipContact *contact)
{
- gboolean can_show_log;
- gboolean can_send_file;
+ EmpathyLogManager *log_manager;
+ gboolean can_show_log;
+ gboolean can_send_file;
g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_VIEW (view), NULL);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- can_show_log = FALSE; /* FIXME: gossip_log_exists_for_contact (contact); */
+ log_manager = empathy_log_manager_new ();
+ can_show_log = empathy_log_manager_exists (log_manager,
+ gossip_contact_get_account (contact),
+ gossip_contact_get_id (contact),
+ FALSE);
can_send_file = FALSE;
+ g_object_unref (log_manager);
return contact_list_view_get_contact_menu (view,
can_send_file,
@@ -1484,6 +1491,10 @@ contact_list_view_action_cb (GtkAction *action,
else if (contact && strcmp (name, "SendFile") == 0) {
}
else if (contact && strcmp (name, "Log") == 0) {
+ gossip_log_window_show (gossip_contact_get_account (contact),
+ gossip_contact_get_id (contact),
+ FALSE,
+ parent);
}
else if (group && strcmp (name, "Rename") == 0) {
}