empathy r1360 - trunk/libempathy-gtk



Author: fpeters
Date: Wed Aug 20 09:18:02 2008
New Revision: 1360
URL: http://svn.gnome.org/viewvc/empathy?rev=1360&view=rev

Log:
don't let label text be selected in contact tooltip  (closes: #546568)


Modified:
   trunk/libempathy-gtk/empathy-contact-list-view.c
   trunk/libempathy-gtk/empathy-contact-widget.c
   trunk/libempathy-gtk/empathy-contact-widget.h

Modified: trunk/libempathy-gtk/empathy-contact-list-view.c
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-list-view.c	(original)
+++ trunk/libempathy-gtk/empathy-contact-list-view.c	Wed Aug 20 09:18:02 2008
@@ -151,7 +151,7 @@
 
 	if (!priv->tooltip_widget) {
 		priv->tooltip_widget = empathy_contact_widget_new (contact,
-			EMPATHY_CONTACT_WIDGET_EDIT_NONE);
+			EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP);
 		g_object_add_weak_pointer (G_OBJECT (priv->tooltip_widget),
 					   (gpointer) &priv->tooltip_widget);
 	} else {

Modified: trunk/libempathy-gtk/empathy-contact-widget.c
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-widget.c	(original)
+++ trunk/libempathy-gtk/empathy-contact-widget.c	Wed Aug 20 09:18:02 2008
@@ -530,7 +530,9 @@
   else
     {
       information->widget_account = gtk_label_new (NULL);
-      gtk_label_set_selectable (GTK_LABEL (information->widget_account), TRUE);
+      if (!information->flags & EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP) {
+        gtk_label_set_selectable (GTK_LABEL (information->widget_account), TRUE);
+      }
       gtk_misc_set_alignment (GTK_MISC (information->widget_account), 0, 0.5);
     }
   gtk_table_attach_defaults (GTK_TABLE (information->table_contact),
@@ -552,7 +554,9 @@
   else
     {
       information->widget_id = gtk_label_new (NULL);
-      gtk_label_set_selectable (GTK_LABEL (information->widget_id), TRUE);
+      if (!information->flags & EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP) {
+        gtk_label_set_selectable (GTK_LABEL (information->widget_id), TRUE);
+      }
       gtk_misc_set_alignment (GTK_MISC (information->widget_id), 0, 0.5);
     }
   gtk_table_attach_defaults (GTK_TABLE (information->table_contact),
@@ -574,12 +578,17 @@
   else
     {
       information->widget_alias = gtk_label_new (NULL);
-      gtk_label_set_selectable (GTK_LABEL (information->widget_alias), TRUE);
+      if (!information->flags & EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP) {
+        gtk_label_set_selectable (GTK_LABEL (information->widget_alias), TRUE);
+      }
       gtk_misc_set_alignment (GTK_MISC (information->widget_alias), 0, 0.5);
     }
   gtk_table_attach_defaults (GTK_TABLE (information->table_contact),
            information->widget_alias,
            1, 2, 2, 3);
+  if (information->flags & EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP) {
+    gtk_label_set_selectable (GTK_LABEL (information->label_status), FALSE);
+  }
   gtk_widget_show (information->widget_alias);
 }
 

Modified: trunk/libempathy-gtk/empathy-contact-widget.h
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-widget.h	(original)
+++ trunk/libempathy-gtk/empathy-contact-widget.h	Wed Aug 20 09:18:02 2008
@@ -37,6 +37,7 @@
   EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT = 1 << 2,
   EMPATHY_CONTACT_WIDGET_EDIT_ID      = 1 << 3,
   EMPATHY_CONTACT_WIDGET_EDIT_GROUPS  = 1 << 4,
+  EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP  = 1 << 5,
 } EmpathyContactWidgetFlags;
 
 GtkWidget * empathy_contact_widget_new (EmpathyContact *contact,



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