empathy r584 - in trunk: libempathy-gtk src



Author: xclaesse
Date: Sun Jan 20 00:04:45 2008
New Revision: 584
URL: http://svn.gnome.org/viewvc/empathy?rev=584&view=rev

Log:
Add a program to show chat logs


Added:
   trunk/src/empathy-logs.c
      - copied, changed from r583, /trunk/libempathy-gtk/empathy-log-window.h
Modified:
   trunk/libempathy-gtk/empathy-log-window.c
   trunk/libempathy-gtk/empathy-log-window.h
   trunk/src/.gitignore
   trunk/src/Makefile.am

Modified: trunk/libempathy-gtk/empathy-log-window.c
==============================================================================
--- trunk/libempathy-gtk/empathy-log-window.c	(original)
+++ trunk/libempathy-gtk/empathy-log-window.c	Sun Jan 20 00:04:45 2008
@@ -136,7 +136,7 @@
 	COL_CHAT_COUNT
 };
 
-void
+GtkWidget *
 empathy_log_window_show (McAccount   *account,
 			const gchar *chat_id,
 			gboolean     is_chatroom,
@@ -157,7 +157,7 @@
 						       chat_id, is_chatroom);
 		}
 
-		return;
+		return window->window;
 	}
 
 	window = g_new0 (EmpathyLogWindow, 1);
@@ -261,6 +261,8 @@
 	}
 
 	gtk_widget_show (window->window);
+
+	return window->window;
 }
 
 static void

Modified: trunk/libempathy-gtk/empathy-log-window.h
==============================================================================
--- trunk/libempathy-gtk/empathy-log-window.h	(original)
+++ trunk/libempathy-gtk/empathy-log-window.h	Sun Jan 20 00:04:45 2008
@@ -29,10 +29,10 @@
 
 G_BEGIN_DECLS
 
-void empathy_log_window_show (McAccount   *account,
-			     const gchar *chat_id,
-			     gboolean     chatroom,
-			     GtkWindow   *parent);
+GtkWidget * empathy_log_window_show (McAccount   *account,
+				     const gchar *chat_id,
+				     gboolean     chatroom,
+				     GtkWindow   *parent);
 
 G_END_DECLS
 

Modified: trunk/src/.gitignore
==============================================================================
--- trunk/src/.gitignore	(original)
+++ trunk/src/.gitignore	Sun Jan 20 00:04:45 2008
@@ -1,5 +1,6 @@
 empathy
 empathy-accounts
+empathy-logs
 empathy-chat-chandler
 org.gnome.Empathy.Chat.service
 empathy-call-chandler

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Sun Jan 20 00:04:45 2008
@@ -16,13 +16,15 @@
 
 bin_PROGRAMS =			\
 	empathy			\
-	empathy-accounts
+	empathy-accounts	\
+	empathy-logs
 
 libexec_PROGRAMS =		\
 	empathy-chat-chandler
 
 empathy_SOURCES = empathy.c
 empathy_accounts_SOURCES = empathy-accounts.c
+empathy_logs_SOURCES = empathy-logs.c
 empathy_chat_chandler_SOURCES = empathy-chat-chandler.c
 
 # Dbus service files

Copied: trunk/src/empathy-logs.c (from r583, /trunk/libempathy-gtk/empathy-log-window.h)
==============================================================================
--- /trunk/libempathy-gtk/empathy-log-window.h	(original)
+++ trunk/src/empathy-logs.c	Sun Jan 20 00:04:45 2008
@@ -1,7 +1,6 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * Copyright (C) 2006-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
+ * Copyright (C) 2008 Collabora Ltd.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -18,22 +17,43 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  * 
- * Authors: Martyn Russell <martyn imendio com>
- *          Xavier Claessens <xclaesse gmail com>
+ * Authors: Xavier Claessens <xclaesse gmail com>
  */
 
-#ifndef __EMPATHY_LOG_WINDOW_H__
-#define __EMPATHY_LOG_WINDOW_H__
+#include <config.h>
 
-#include <libmissioncontrol/mc-account.h>
+#include <string.h>
+#include <stdlib.h>
 
-G_BEGIN_DECLS
+#include <glib.h>
+#include <gtk/gtk.h>
 
-void empathy_log_window_show (McAccount   *account,
-			     const gchar *chat_id,
-			     gboolean     chatroom,
-			     GtkWindow   *parent);
+#include <libempathy-gtk/empathy-log-window.h>
 
-G_END_DECLS
+static void
+destroy_cb (GtkWidget *dialog,
+	    gpointer   user_data)
+{
+	gtk_main_quit ();
+}
+
+int
+main (int argc, char *argv[])
+{
+	GtkWidget *window;
+
+	gtk_init (&argc, &argv);
+
+	gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+					   PKGDATADIR G_DIR_SEPARATOR_S "icons");
+	window = empathy_log_window_show (NULL, NULL, FALSE, NULL);
+
+	g_signal_connect (window, "destroy",
+			  G_CALLBACK (destroy_cb),
+			  NULL);
+
+	gtk_main ();
+
+	return EXIT_SUCCESS;
+}
 
-#endif /* __EMPATHY_LOG_WINDOW_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]