]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-chat.c
Merge remote-tracking branch 'jonny/ft'
[empathy.git] / libempathy-gtk / empathy-chat.c
index 09146d896633905842391e49c3254f2395fb95cf..70e35ddad0d4b49e159df8c146463792139e4e64 100644 (file)
@@ -49,8 +49,8 @@
 #include "empathy-chat.h"
 #include "empathy-spell.h"
 #include "empathy-contact-dialogs.h"
-#include "empathy-contact-list-store.h"
-#include "empathy-contact-list-view.h"
+#include "empathy-individual-store-channel.h"
+#include "empathy-individual-view.h"
 #include "empathy-contact-menu.h"
 #include "empathy-input-text-view.h"
 #include "empathy-search-bar.h"
@@ -2331,7 +2331,10 @@ chat_input_populate_popup_cb (GtkTextView *view,
        switch (priv->most_recent_event_type) {
            case GDK_BUTTON_PRESS:
                /* get the location from the pointer */
-               gtk_widget_get_pointer (GTK_WIDGET (view), &x, &y);
+               gdk_window_get_device_position (gtk_widget_get_window (GTK_WIDGET (view)),
+                       gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (
+                               gtk_widget_get_display (GTK_WIDGET (view)))), &x, &y, NULL);
+
                gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (view),
                                                       GTK_TEXT_WINDOW_WIDGET,
                                                       x, y,
@@ -2725,7 +2728,7 @@ chat_update_contacts_visibility (EmpathyChat *chat,
        }
 
        if (show && priv->contact_list_view == NULL) {
-               EmpathyContactListStore *store;
+               EmpathyIndividualStore *store;
                gint                     min_width;
                GtkAllocation            allocation;
 
@@ -2746,19 +2749,27 @@ chat_update_contacts_visibility (EmpathyChat *chat,
                priv->contacts_visible_id = g_timeout_add (500,
                        chat_contacts_visible_timeout_cb, chat);
 
-               store = empathy_contact_list_store_new (
-                               EMPATHY_CONTACT_LIST (priv->tp_chat));
-               empathy_contact_list_store_set_show_groups (
-                               EMPATHY_CONTACT_LIST_STORE (store), FALSE);
-
-               priv->contact_list_view = GTK_WIDGET (empathy_contact_list_view_new (store,
-                       EMPATHY_CONTACT_LIST_FEATURE_CONTACT_TOOLTIP,
-                       EMPATHY_CONTACT_FEATURE_CHAT |
-                       EMPATHY_CONTACT_FEATURE_CALL |
-                       EMPATHY_CONTACT_FEATURE_LOG |
-                       EMPATHY_CONTACT_FEATURE_INFO));
+               store = EMPATHY_INDIVIDUAL_STORE (
+                               empathy_individual_store_channel_new ((TpChannel *) priv->tp_chat));
+
+               empathy_individual_store_set_show_groups (store, FALSE);
+
+               priv->contact_list_view = GTK_WIDGET (empathy_individual_view_new (store,
+                       EMPATHY_INDIVIDUAL_VIEW_FEATURE_INDIVIDUAL_TOOLTIP,
+                       EMPATHY_INDIVIDUAL_FEATURE_ADD_CONTACT |
+                       EMPATHY_INDIVIDUAL_FEATURE_CHAT |
+                       EMPATHY_INDIVIDUAL_FEATURE_CALL |
+                       EMPATHY_INDIVIDUAL_FEATURE_LOG |
+                       EMPATHY_INDIVIDUAL_FEATURE_INFO));
+
+               empathy_individual_view_set_show_offline (
+                       EMPATHY_INDIVIDUAL_VIEW (priv->contact_list_view), TRUE);
+               empathy_individual_view_set_show_uninteresting (
+                       EMPATHY_INDIVIDUAL_VIEW (priv->contact_list_view), TRUE);
+
                gtk_container_add (GTK_CONTAINER (priv->scrolled_window_contacts),
                                   priv->contact_list_view);
+
                gtk_widget_show (priv->contact_list_view);
                gtk_widget_show (priv->scrolled_window_contacts);
                g_object_unref (store);
@@ -3470,7 +3481,7 @@ chat_prompt_to_save_password (EmpathyChat *self,
        gtk_info_bar_set_message_type (GTK_INFO_BAR (data->info_bar),
                                       GTK_MESSAGE_QUESTION);
 
-       hbox = gtk_hbox_new (FALSE, 5);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
        gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
 
        /* Add image */
@@ -3664,7 +3675,7 @@ display_password_info_bar (EmpathyChat *self)
 
        content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
 
-       hbox = gtk_hbox_new (FALSE, 5);
+       hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
        gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
 
        /* Add image */