aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/gossip-chat-window.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-06-14 18:45:38 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-06-14 18:45:38 +0800
commit93e7c475bce7aca22c2b073b7c4b564121625b3c (patch)
tree4c826195bb664ea62405412935ce4047dbf31c95 /libempathy-gtk/gossip-chat-window.c
parentc82238798de571010689f3a3f6207f37cba1bb2d (diff)
downloadgsoc2013-empathy-93e7c475bce7aca22c2b073b7c4b564121625b3c.tar
gsoc2013-empathy-93e7c475bce7aca22c2b073b7c4b564121625b3c.tar.gz
gsoc2013-empathy-93e7c475bce7aca22c2b073b7c4b564121625b3c.tar.bz2
gsoc2013-empathy-93e7c475bce7aca22c2b073b7c4b564121625b3c.tar.lz
gsoc2013-empathy-93e7c475bce7aca22c2b073b7c4b564121625b3c.tar.xz
gsoc2013-empathy-93e7c475bce7aca22c2b073b7c4b564121625b3c.tar.zst
gsoc2013-empathy-93e7c475bce7aca22c2b073b7c4b564121625b3c.zip
Do not create log directory for a chat if there is no messages to put in.
2007-06-13 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/gossip-log-window.c: * libempathy-gtk/gossip-chat-window.c: * libempathy/empathy-log-manager.c: * libempathy/empathy-log-manager.h: Do not create log directory for a chat if there is no messages to put in. Show logs and information for the contact we are speaking with in the chat window menu. svn path=/trunk/; revision=150
Diffstat (limited to 'libempathy-gtk/gossip-chat-window.c')
-rw-r--r--libempathy-gtk/gossip-chat-window.c60
1 files changed, 20 insertions, 40 deletions
diff --git a/libempathy-gtk/gossip-chat-window.c b/libempathy-gtk/gossip-chat-window.c
index aef972cff..39639b7dc 100644
--- a/libempathy-gtk/gossip-chat-window.c
+++ b/libempathy-gtk/gossip-chat-window.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-chatroom-manager.h>
#include <libempathy/gossip-contact.h>
#include <libempathy/gossip-debug.h>
@@ -45,10 +46,9 @@
#include "gossip-chat-window.h"
#include "empathy-images.h"
-//#include "gossip-add-contact-dialog.h"
//#include "gossip-chat-invite.h"
-//#include "gossip-contact-info-dialog.h"
-//#include "gossip-log-window.h"
+#include "empathy-contact-dialogs.h"
+#include "gossip-log-window.h"
#include "gossip-new-chatroom-dialog.h"
#include "gossip-preferences.h"
#include "gossip-private-chat.h"
@@ -897,25 +897,14 @@ static void
chat_window_log_activate_cb (GtkWidget *menuitem,
GossipChatWindow *window)
{
-/* FIXME:
GossipChatWindowPriv *priv;
priv = GET_PRIV (window);
- if (gossip_chat_is_group_chat (priv->current_chat)) {
- GossipGroupChat *group_chat;
- GossipChatroom *chatroom;
-
- group_chat = GOSSIP_GROUP_CHAT (priv->current_chat);
- chatroom = gossip_group_chat_get_chatroom (group_chat);
- gossip_log_window_show (NULL, chatroom);
- } else {
- GossipContact *contact;
-
- contact = gossip_chat_get_contact (priv->current_chat);
- gossip_log_window_show (contact, NULL);
- }
-*/
+ gossip_log_window_show (priv->current_chat->account,
+ gossip_chat_get_id (priv->current_chat),
+ gossip_chat_is_group_chat (priv->current_chat),
+ GTK_WINDOW (priv->dialog));
}
static void
@@ -923,14 +912,15 @@ chat_window_info_activate_cb (GtkWidget *menuitem,
GossipChatWindow *window)
{
GossipChatWindowPriv *priv;
- //GossipContact *contact;
+ GossipContact *contact;
priv = GET_PRIV (window);
-/*FIXME:
- contact = gossip_chat_get_contact (priv->current_chat);
- gossip_contact_info_dialog_show (contact,
- GTK_WINDOW (priv->dialog));*/
+ contact = gossip_private_chat_get_contact (GOSSIP_PRIVATE_CHAT (priv->current_chat));
+
+ empathy_contact_information_dialog_show (contact,
+ GTK_WINDOW (priv->dialog),
+ FALSE);
}
static gboolean
@@ -982,28 +972,18 @@ chat_window_conv_activate_cb (GtkWidget *menuitem,
GossipChatWindow *window)
{
GossipChatWindowPriv *priv;
+ EmpathyLogManager *manager;
gboolean log_exists = FALSE;
priv = GET_PRIV (window);
-/* FIXME:
- if (gossip_chat_is_group_chat (priv->current_chat)) {
- GossipGroupChat *group_chat;
- GossipChatroom *chatroom;
- group_chat = GOSSIP_GROUP_CHAT (priv->current_chat);
- chatroom = gossip_group_chat_get_chatroom (group_chat);
- if (chatroom) {
- log_exists = gossip_log_exists_for_chatroom (chatroom);
- }
- } else {
- GossipContact *contact;
+ manager = empathy_log_manager_new ();
+ log_exists = empathy_log_manager_exists (manager,
+ priv->current_chat->account,
+ gossip_chat_get_id (priv->current_chat),
+ gossip_chat_is_group_chat (priv->current_chat));
+ g_object_unref (manager);
- contact = gossip_chat_get_contact (priv->current_chat);
- if (contact) {
- log_exists = gossip_log_exists_for_contact (contact);
- }
- }
-*/
gtk_widget_set_sensitive (priv->menu_conv_log, log_exists);
}