]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-log-window.c
de.po: Updated German translation
[empathy.git] / libempathy-gtk / empathy-log-window.c
index f1d958a307e7dd042dcf51e70453c5e9b351b896..24633e5653e17ca25c97c7e7b3697c676d9b686a 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 
@@ -41,6 +41,7 @@
 #include "empathy-log-window.h"
 #include "empathy-account-chooser.h"
 #include "empathy-chat-view.h"
+#include "empathy-theme-manager.h"
 #include "empathy-ui-utils.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
@@ -159,7 +160,7 @@ empathy_log_window_show (McAccount   *account,
        }
 
        window = g_new0 (EmpathyLogWindow, 1);
-       window->log_manager = empathy_log_manager_new ();
+       window->log_manager = empathy_log_manager_dup_singleton ();
 
        filename = empathy_file_lookup ("empathy-log-window.glade",
                                        "libempathy-gtk");
@@ -207,13 +208,13 @@ empathy_log_window_show (McAccount   *account,
                          window);
 
        /* Configure Search EmpathyChatView */
-       window->chatview_find = empathy_chat_view_new ();
+       window->chatview_find = empathy_theme_manager_create_view (empathy_theme_manager_get ());
        gtk_container_add (GTK_CONTAINER (window->scrolledwindow_find),
                           GTK_WIDGET (window->chatview_find));
        gtk_widget_show (GTK_WIDGET (window->chatview_find));
 
        /* Configure Contacts EmpathyChatView */
-       window->chatview_chats = empathy_chat_view_new ();
+       window->chatview_chats = empathy_theme_manager_create_view (empathy_theme_manager_get ());
        gtk_container_add (GTK_CONTAINER (window->scrolledwindow_chats),
                           GTK_WIDGET (window->chatview_chats));
        gtk_widget_show (GTK_WIDGET (window->chatview_chats));
@@ -289,7 +290,7 @@ log_window_entry_find_changed_cb (GtkWidget       *entry,
 
        str = gtk_entry_get_text (GTK_ENTRY (window->entry_find));
 
-       is_sensitive &= !G_STR_EMPTY (str);
+       is_sensitive &= !EMP_STR_EMPTY (str);
        is_sensitive &= 
                !window->last_find || 
                (window->last_find && strcmp (window->last_find, str) != 0);
@@ -399,7 +400,7 @@ log_window_find_populate (EmpathyLogWindow *window,
 
        gtk_list_store_clear (store);
 
-       if (G_STR_EMPTY (search_criteria)) {
+       if (EMP_STR_EMPTY (search_criteria)) {
                /* Just clear the search. */
                return;
        }
@@ -628,6 +629,11 @@ log_window_chats_populate (EmpathyLogWindow *window)
        selection = gtk_tree_view_get_selection (view);
        store = GTK_LIST_STORE (model);
 
+       if (account == NULL) {
+               gtk_list_store_clear (store);
+               return;
+       }
+
        /* Block signals to stop the logs being retrieved prematurely */
        g_signal_handlers_block_by_func (selection,
                                         log_window_chats_changed_cb,