# HG changeset patch
# Node ID 0fae29343447
# Parent  0d5319e4b836
diff --git a/pidgin/pidgininfopane.c b/pidgin/pidgininfopane.c
--- a/pidgin/pidgininfopane.c
+++ b/pidgin/pidgininfopane.c
@@ -34,15 +34,13 @@
 	PurpleConversation *conversation;
 
 	GtkWidget *hbox;
-	GtkWidget *presence_icon;
+	GtkWidget *avatar;
 
 	GtkWidget *name;
 	GBinding *name_binding;
 
 	GtkWidget *topic;
 	GBinding *topic_binding;
-
-	GtkWidget *avatar;
 };
 
 enum {
@@ -55,6 +53,28 @@
 G_DEFINE_TYPE(PidginInfoPane, pidgin_info_pane, GTK_TYPE_BOX)
 
 /******************************************************************************
+ * Helpers
+ *****************************************************************************/
+static gboolean
+pidgin_info_pane_topic_to_label(G_GNUC_UNUSED GBinding *binding,
+                                const GValue *from_value,
+                                GValue *to_value,
+                                gpointer data)
+{
+	PidginInfoPane *pane = data;
+	const char *topic = NULL;
+	gboolean visible = FALSE;
+
+	topic = g_value_get_string(from_value);
+	visible = !purple_strempty(topic);
+	g_value_set_string(to_value, topic);
+
+	gtk_widget_set_visible(pane->topic, visible);
+
+	return TRUE;
+}
+
+/******************************************************************************
  * GObject Implementation
  *****************************************************************************/
 static void
@@ -132,7 +152,6 @@
 
 	gtk_widget_class_bind_template_child(widget_class, PidginInfoPane, hbox);
 	gtk_widget_class_bind_template_child(widget_class, PidginInfoPane, avatar);
-	gtk_widget_class_bind_template_child(widget_class, PidginInfoPane, presence_icon);
 	gtk_widget_class_bind_template_child(widget_class, PidginInfoPane, name);
 	gtk_widget_class_bind_template_child(widget_class, PidginInfoPane, topic);
 }
@@ -174,41 +193,18 @@
 	                               pane->conversation);
 
 	if(PURPLE_IS_CONVERSATION(conversation)) {
-		PidginPresenceIcon *presence_icon = NULL;
-		PurplePresence *presence = NULL;
-		const gchar *fallback = "person";
-
 		pane->name_binding =
 			g_object_bind_property(G_OBJECT(conversation), "name",
 			                       G_OBJECT(pane->name), "label",
 			                       G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
 
 		pane->topic_binding =
-			g_object_bind_property(G_OBJECT(conversation), "topic",
-			                       G_OBJECT(pane->topic), "label",
-			                       G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
-
-		if(PURPLE_IS_CHAT_CONVERSATION(conversation)) {
-			fallback = "chat";
-		} else if(PURPLE_IS_IM_CONVERSATION(conversation)) {
-			PurpleAccount *account = NULL;
-			PurpleBuddy *buddy = NULL;
-			const gchar *name = NULL;
-
-			account = purple_conversation_get_account(conversation);
-			name = purple_conversation_get_name(conversation);
-			buddy = purple_blist_find_buddy(account, name);
-
-			if(PURPLE_IS_BUDDY(buddy)) {
-				presence = purple_buddy_get_presence(buddy);
-			}
-
-			fallback = "person";
-		}
-
-		presence_icon = PIDGIN_PRESENCE_ICON(pane->presence_icon);
-		pidgin_presence_icon_set_fallback(presence_icon, fallback);
-		pidgin_presence_icon_set_presence(presence_icon, presence);
+			g_object_bind_property_full(G_OBJECT(conversation), "topic",
+			                            G_OBJECT(pane->topic), "label",
+			                            G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE,
+			                            pidgin_info_pane_topic_to_label,
+			                            NULL,
+			                            pane, NULL);
 	}
 
 	/* Notify that we changed. */
diff --git a/pidgin/resources/Conversations/infopane.ui b/pidgin/resources/Conversations/infopane.ui
--- a/pidgin/resources/Conversations/infopane.ui
+++ b/pidgin/resources/Conversations/infopane.ui
@@ -28,14 +28,13 @@
       <object class="GtkBox" id="hbox">
         <property name="spacing">6</property>
         <child>
-          <object class="PidginPresenceIcon" id="presence_icon">
-            <property name="fallback">chat</property>
-          </object>
+          <object class="PidginAvatar" id="avatar"/>
         </child>
         <child>
           <object class="GtkBox">
             <property name="hexpand">1</property>
             <property name="orientation">vertical</property>
+            <property name="valign">center</property>
             <child>
               <object class="GtkLabel" id="name">
                 <property name="label" translatable="1">[Place Holder]</property>
@@ -54,10 +53,6 @@
             </child>
           </object>
         </child>
-        <child>
-          <object class="PidginAvatar" id="avatar">
-          </object>
-        </child>
       </object>
     </child>
   </template>
