# HG changeset patch
# Node ID bffe2a708e8f
# Parent  c2d0a1ed3031
diff --git a/pidgin/gtkroomlist.c b/pidgin/gtkroomlist.c
--- a/pidgin/gtkroomlist.c
+++ b/pidgin/gtkroomlist.c
@@ -49,6 +49,8 @@
 	GtkWidget *join_button;
 	GtkWidget *close_button;
 
+	GtkWidget *menu;
+
 	PurpleAccount *account;
 	PurpleRoomlist *roomlist;
 
@@ -70,6 +72,49 @@
 	NUM_OF_COLUMNS,
 };
 
+/******************************************************************************
+ * Actions
+ *****************************************************************************/
+
+static void do_add_room_cb(PurpleRoomlist *list, PurpleRoomlistRoom *room);
+static void do_join_cb(PurpleRoomlist *list, PurpleRoomlistRoom *room);
+
+static void
+pidgin_roomlist_add_cb(GSimpleAction *action, GVariant *parameter,
+		       gpointer data)
+{
+	PurpleRoomlistRoom *room = NULL;
+	PidginRoomlistDialog *parent = NULL;
+
+	parent = PIDGIN_ROOMLIST_DIALOG(gtk_widget_get_parent(GTK_WIDGET(data)));
+	room = g_object_get_data(G_OBJECT(data), "selected-room");
+
+	do_add_room_cb(parent->roomlist, room);
+}
+
+static void
+pidgin_roomlist_join_cb(GSimpleAction *action, GVariant *parameter,
+			gpointer data)
+{
+	PurpleRoomlistRoom *room = NULL;
+	PidginRoomlistDialog *parent = NULL;
+
+	parent = PIDGIN_ROOMLIST_DIALOG(gtk_widget_get_parent(GTK_WIDGET(data)));
+	room = g_object_get_data(G_OBJECT(data), "selected-room");
+
+	do_join_cb(parent->roomlist, room);
+}
+
+static GActionEntry actions[] = {
+	{
+		.name = "add",
+		.activate = pidgin_roomlist_add_cb,
+	}, {
+		.name = "join",
+		.activate = pidgin_roomlist_join_cb,
+	},
+};
+
 static gboolean
 _search_func(GtkTreeModel *model, gint column, const gchar *key,
              GtkTreeIter *iter, gpointer search_data)
@@ -90,7 +135,7 @@
 	return result;
 }
 
-static gint delete_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d)
+static gint delete_win_cb(GtkWidget *w, GdkEvent *e, gpointer d)
 {
 	PidginRoomlistDialog *dialog = PIDGIN_ROOMLIST_DIALOG(w);
 
@@ -195,18 +240,12 @@
 	gtk_widget_set_sensitive(dialog->join_button, FALSE);
 }
 
-struct _menu_cb_info {
-	PurpleRoomlist *list;
-	PurpleRoomlistRoom *room;
-};
-
 static void
 selection_changed_cb(GtkTreeSelection *selection,
                      PidginRoomlistDialog *dialog)
 {
 	GtkTreeIter iter;
 	PurpleRoomlistRoom *room;
-	static struct _menu_cb_info *info;
 	PidginRoomlist *grl = NULL;
 
 	grl = g_object_get_data(G_OBJECT(dialog->roomlist),
@@ -217,13 +256,7 @@
 		                   ROOM_COLUMN, &room,
 		                   -1);
 
-		info = g_new0(struct _menu_cb_info, 1);
-		info->list = dialog->roomlist;
-		info->room = room;
-
-		g_object_set_data_full(G_OBJECT(dialog->join_button), "room-info",
-							   info, g_free);
-		g_object_set_data(G_OBJECT(dialog->add_button), "room-info", info);
+		g_object_set_data(G_OBJECT(dialog->add_button), "selected-room", room);
 
 		gtk_widget_set_sensitive(dialog->add_button, TRUE);
 		gtk_widget_set_sensitive(dialog->join_button, TRUE);
@@ -236,10 +269,10 @@
 }
 
 static void
-do_add_room_cb(G_GNUC_UNUSED GtkWidget *w, struct _menu_cb_info *info)
+do_add_room_cb(PurpleRoomlist *list, PurpleRoomlistRoom *room)
 {
 	char *name;
-	PurpleAccount *account = purple_roomlist_get_account(info->list);
+	PurpleAccount *account = purple_roomlist_get_account(list);
 	PurpleConnection *gc = purple_account_get_connection(account);
 	PurpleProtocol *protocol = NULL;
 
@@ -249,9 +282,9 @@
 
 	if(protocol != NULL && PURPLE_PROTOCOL_IMPLEMENTS(protocol, ROOMLIST, room_serialize)) {
 		name = purple_protocol_roomlist_room_serialize(PURPLE_PROTOCOL_ROOMLIST(protocol),
-		                                               info->room);
+		                                               room);
 	} else {
-		name = g_strdup(purple_roomlist_room_get_name(info->room));
+		name = g_strdup(purple_roomlist_room_get_name(room));
 	}
 
 	purple_blist_request_add_chat(account, NULL, NULL, name);
@@ -262,23 +295,29 @@
 static void
 add_room_to_blist_cb(GtkButton *button, G_GNUC_UNUSED gpointer data)
 {
-	struct _menu_cb_info *info = g_object_get_data(G_OBJECT(button), "room-info");
+	PurpleRoomlistRoom *room = NULL;
+	PidginRoomlistDialog *parent = NULL;
 
-	if(info != NULL) {
-		do_add_room_cb(NULL, info);
-	}
+	parent = PIDGIN_ROOMLIST_DIALOG(gtk_widget_get_parent(GTK_WIDGET(button)));
+	room = g_object_get_data(G_OBJECT(button), "selected-room");
+
+	do_add_room_cb(parent->roomlist, room);
 }
 
 static void
-do_join_cb(G_GNUC_UNUSED GtkWidget *w, struct _menu_cb_info *info) {
-	purple_roomlist_join_room(info->list, info->room);
+do_join_cb(PurpleRoomlist *list, PurpleRoomlistRoom *room) {
+	purple_roomlist_join_room(list, room);
 }
 
 static void
 join_button_cb(GtkButton *button, G_GNUC_UNUSED gpointer data) {
-	struct _menu_cb_info *info = g_object_get_data(G_OBJECT(button), "room-info");
+	PurpleRoomlistRoom *room = NULL;
+	PidginRoomlistDialog *parent;
 
-	purple_roomlist_join_room(info->list, info->room);
+	parent = PIDGIN_ROOMLIST_DIALOG(gtk_widget_get_parent(GTK_WIDGET(button)));
+	room = g_object_get_data(G_OBJECT(button), "selected-room");
+
+	purple_roomlist_join_room(parent->roomlist, room);
 }
 
 static void
@@ -289,67 +328,52 @@
 	PidginRoomlist *grl = NULL;
 	GtkTreeIter iter;
 	PurpleRoomlistRoom *room;
-	struct _menu_cb_info info;
 
 	grl = g_object_get_data(G_OBJECT(dialog->roomlist), PIDGIN_ROOMLIST_UI_DATA);
 
 	gtk_tree_model_get_iter(GTK_TREE_MODEL(grl->model), &iter, path);
 	gtk_tree_model_get(GTK_TREE_MODEL(grl->model), &iter, ROOM_COLUMN, &room, -1);
 
-	info.list = dialog->roomlist;
-	info.room = room;
-
-	do_join_cb(NULL, &info);
+	do_join_cb(dialog->roomlist, room);
 
 	g_clear_object(&room);
 }
 
 static gboolean
-room_click_cb(GtkWidget *tv, GdkEventButton *event, gpointer data) {
+room_click_cb(GtkWidget *tv, GdkEvent *event, gpointer data) {
 	PidginRoomlistDialog *dialog = data;
 	GtkTreePath *path;
 	PidginRoomlist *grl = NULL;
 	PurpleRoomlistRoom *room;
 	GtkTreeIter iter;
-	GtkWidget *menu;
-	GtkWidget *menuitem;
-	static struct _menu_cb_info info; /* XXX? */
+	double x, y;
 
 	if (!gdk_event_triggers_context_menu((GdkEvent *)event))
 		return FALSE;
 
 	grl = g_object_get_data(G_OBJECT(dialog->roomlist), PIDGIN_ROOMLIST_UI_DATA);
 
+	gdk_event_get_position(event, &x, &y);
+
 	/* Here we figure out which room was clicked */
-	if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), event->x, event->y, &path, NULL, NULL, NULL))
+	if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), x, y, &path, NULL, NULL, NULL))
 		return FALSE;
 	gtk_tree_model_get_iter(GTK_TREE_MODEL(grl->model), &iter, path);
 	gtk_tree_path_free(path);
 	gtk_tree_model_get(GTK_TREE_MODEL(grl->model), &iter, ROOM_COLUMN, &room, -1);
 
-	info.list = dialog->roomlist;
-	info.room = room;
+	gtk_popover_set_pointing_to(GTK_POPOVER(dialog->menu),
+	                            &(const GdkRectangle){(int)x, (int)y, 0, 0});
+
+	g_object_set_data(G_OBJECT(dialog->menu), "selected-room", room);
+
+	gtk_popover_popup(GTK_POPOVER(dialog->menu));
 
 	/* The current implementation isn't expecting a ref to unref the one we got
 	 * when we pulled the room out of the model.
 	 */
 	g_clear_object(&room);
 
-	menu = gtk_menu_new();
-
-	menuitem = gtk_menu_item_new_with_mnemonic(_("_Join"));
-	g_signal_connect(G_OBJECT(menuitem), "activate",
-	                 G_CALLBACK(do_join_cb), &info);
-	gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-
-	menuitem = gtk_menu_item_new_with_mnemonic(_("_Add"));
-	g_signal_connect(G_OBJECT(menuitem), "activate",
-	                 G_CALLBACK(do_add_room_cb), &info);
-	gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-
-	gtk_widget_show_all(menu);
-	gtk_menu_popup_at_pointer(GTK_MENU(menu), (GdkEvent *)event);
-
 	return FALSE;
 }
 
@@ -480,6 +504,10 @@
 static void
 pidgin_roomlist_dialog_init(PidginRoomlistDialog *self)
 {
+	GtkBuilder *builder = NULL;
+	GMenuModel *model = NULL;
+	GSimpleActionGroup *group = NULL;
+
 	gtk_widget_init_template(GTK_WIDGET(self));
 
 	pidgin_account_chooser_set_filter_func(
@@ -488,6 +516,21 @@
 
 	gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(self->tree),
 	                                    _search_func, NULL, NULL);
+
+	builder = gtk_builder_new_from_resource("/im/pidgin/Pidgin3/Roomlist/menu.ui");
+	model = (GMenuModel *)gtk_builder_get_object(builder, "menu");
+
+	self->menu = gtk_popover_menu_new_from_model(model);
+	gtk_widget_set_parent(self->menu, GTK_WIDGET(self));
+
+	g_clear_object(&builder);
+
+	/* Now setup our actions. */
+	group = g_simple_action_group_new();
+	g_action_map_add_action_entries(G_ACTION_MAP(group), actions,
+	                                G_N_ELEMENTS(actions), self);
+	gtk_widget_insert_action_group(GTK_WIDGET(self->menu), "roomlist",
+	                               G_ACTION_GROUP(group));
 }
 
 static PidginRoomlistDialog *
diff --git a/pidgin/resources/Roomlist/menu.ui b/pidgin/resources/Roomlist/menu.ui
new file mode 100644
--- /dev/null
+++ b/pidgin/resources/Roomlist/menu.ui
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Pidgin - Internet Messenger
+Copyright (C) Pidgin Developers <devel@pidgin.im>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+-->
+<interface>
+  <requires lib="gtk" version="4.0"/>
+  <!-- interface-license-type gplv2 -->
+  <!-- interface-name Pidgin -->
+  <!-- interface-description Internet Messenger -->
+  <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
+<menu id="menu">
+    <section>
+    <item>
+      <attribute name="label" translatable="yes">_Join</attribute>
+      <attribute name="action">roomlist.join</attribute>
+    </item>
+    <item>
+      <attribute name="label" translatable="yes">_Add</attribute>
+      <attribute name="action">roomlist.add</attribute>
+    </item>
+    </section>
+  </menu>
+</interface>
\ No newline at end of file
diff --git a/pidgin/resources/Roomlist/roomlist.ui b/pidgin/resources/Roomlist/roomlist.ui
--- a/pidgin/resources/Roomlist/roomlist.ui
+++ b/pidgin/resources/Roomlist/roomlist.ui
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 
-
+<!--
 Pidgin - Internet Messenger
 Copyright (C) Pidgin Developers <devel@pidgin.im>
 
@@ -15,148 +14,45 @@
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+along with this program; if not, see <https://www.gnu.org/licenses/>.
+-->
 
--->
 <interface>
-  <requires lib="gtk+" version="3.22"/>
+  <requires lib="gtk" version="4.0"/>
   <requires lib="pidgin" version="3.0"/>
-  <!-- interface-license-type gplv2 -->
-  <!-- interface-name Pidgin -->
-  <!-- interface-description Internet Messenger -->
-  <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
   <object class="PidginAccountStore" id="accounts"/>
   <template class="PidginRoomlistDialog" parent="GtkDialog">
-    <property name="can-focus">False</property>
-    <property name="title" translatable="yes">Room List</property>
+    <property name="title" translatable="1">Room List</property>
     <property name="role">room list</property>
     <property name="type-hint">dialog</property>
     <signal name="delete-event" handler="delete_win_cb" swapped="no"/>
-    <child internal-child="vbox">
+    <child internal-child="content_area">
       <object class="GtkBox">
-        <property name="can-focus">False</property>
+        <property name="visible">0</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox">
-            <property name="can-focus">False</property>
-            <property name="layout-style">end</property>
-            <child>
-              <object class="GtkButton" id="stop_button">
-                <property name="label">_Stop</property>
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">True</property>
-                <property name="use-underline">True</property>
-                <signal name="clicked" handler="stop_button_cb" object="PidginRoomlistDialog" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="list_button">
-                <property name="label" translatable="yes">_Get List</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">True</property>
-                <property name="use-underline">True</property>
-                <signal name="clicked" handler="list_button_cb" object="PidginRoomlistDialog" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="add_button">
-                <property name="label" translatable="yes">_Add Chat</property>
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">True</property>
-                <property name="use-underline">True</property>
-                <signal name="clicked" handler="add_room_to_blist_cb" object="PidginRoomlistDialog" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="join_button">
-                <property name="label" translatable="yes">_Join</property>
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">True</property>
-                <property name="use-underline">True</property>
-                <signal name="clicked" handler="join_button_cb" object="PidginRoomlistDialog" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="close_button">
-                <property name="label">_Close</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">True</property>
-                <property name="use-underline">True</property>
-                <signal name="clicked" handler="gtk_widget_destroy" object="PidginRoomlistDialog" swapped="yes"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">4</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkBox">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
             <property name="orientation">vertical</property>
             <property name="spacing">12</property>
             <child>
               <object class="GtkBox">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
+                <property name="valign">center</property>
                 <property name="spacing">5</property>
                 <child>
                   <object class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <property name="label" translatable="yes">_Account:</property>
-                    <property name="use-underline">True</property>
+                    <property name="halign">center</property>
+                    <property name="label" translatable="1">_Account:</property>
+                    <property name="use-underline">1</property>
                     <property name="mnemonic-widget">account_widget</property>
                     <accessibility>
                       <relation type="label-for" target="account_widget"/>
                     </accessibility>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <object class="PidginAccountChooser" id="account_widget">
+                    <property name="hexpand">1</property>
                     <property name="visible">True</property>
                     <property name="can-focus">False</property>
                     <property name="model">accounts</property>
@@ -166,29 +62,18 @@
                       <relation type="labelled-by" target="label1"/>
                     </accessibility>
                   </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
             </child>
             <child>
               <object class="GtkScrolledWindow" id="sw">
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
+                <property name="vexpand">1</property>
+                <property name="focusable">1</property>
                 <property name="shadow-type">in</property>
                 <property name="min-content-height">250</property>
-                <child>
+                <property name="child">
                   <object class="GtkTreeView" id="tree">
-                    <property name="visible">True</property>
-                    <property name="can-focus">True</property>
+                    <property name="focusable">1</property>
                     <property name="search-column">1</property>
                     <signal name="button-press-event" handler="room_click_cb" object="PidginRoomlistDialog" swapped="no"/>
                     <signal name="query-tooltip" handler="pidgin_roomlist_query_tooltip" object="PidginRoomlistDialog" swapped="no"/>
@@ -200,7 +85,7 @@
                     </child>
                     <child>
                       <object class="GtkTreeViewColumn">
-                        <property name="title" translatable="yes">Name</property>
+                        <property name="title" translatable="1">Name</property>
                         <child>
                           <object class="GtkCellRendererText"/>
                           <attributes>
@@ -211,7 +96,7 @@
                     </child>
                     <child>
                       <object class="GtkTreeViewColumn">
-                        <property name="title" translatable="yes">Description</property>
+                        <property name="title" translatable="1">Description</property>
                         <child>
                           <object class="GtkCellRendererText"/>
                           <attributes>
@@ -221,32 +106,96 @@
                       </object>
                     </child>
                   </object>
-                </child>
+                </property>
               </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
             </child>
             <child>
               <object class="GtkProgressBar" id="progress">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
+                <property name="valign">center</property>
               </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
             </child>
           </object>
+        </child>
+      </object>
+    </child>
+    <child internal-child="action_area">
+      <object class="GtkButtonBox">
+        <property name="valign">center</property>
+        <property name="can-focus">False</property>
+        <property name="layout-style">end</property>
+        <child>
+          <object class="GtkButton" id="stop_button">
+            <property name="label">_Stop</property>
+            <property name="sensitive">0</property>
+            <property name="focusable">1</property>
+            <property name="receives-default">1</property>
+            <property name="use-underline">1</property>
+            <signal name="clicked" handler="stop_button_cb" object="PidginRoomlistDialog" swapped="no"/>
+          </object>
           <packing>
-            <property name="expand">False</property>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="list_button">
+            <property name="label" translatable="1">_Get List</property>
+            <property name="focusable">1</property>
+            <property name="receives-default">1</property>
+            <property name="use-underline">1</property>
+            <signal name="clicked" handler="list_button_cb" object="PidginRoomlistDialog" swapped="no"/>
+          </object>
+          <packing>
+            <property name="expand">True</property>
             <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkButton" id="add_button">
+            <property name="label" translatable="1">_Add Chat</property>
+            <property name="sensitive">0</property>
+            <property name="focusable">1</property>
+            <property name="receives-default">1</property>
+            <property name="use-underline">1</property>
+            <signal name="clicked" handler="add_room_to_blist_cb" object="PidginRoomlistDialog" swapped="no"/>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="join_button">
+            <property name="label" translatable="1">_Join</property>
+            <property name="sensitive">0</property>
+            <property name="focusable">1</property>
+            <property name="receives-default">1</property>
+            <property name="use-underline">1</property>
+            <signal name="clicked" handler="join_button_cb" object="PidginRoomlistDialog" swapped="no"/>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="close_button">
+            <property name="label">_Close</property>
+            <property name="focusable">1</property>
+            <property name="receives-default">1</property>
+            <property name="use-underline">1</property>
+            <signal name="clicked" handler="gtk_widget_destroy" object="PidginRoomlistDialog" swapped="yes"/>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
       </object>
     </child>
   </template>
diff --git a/pidgin/resources/pidgin.gresource.xml b/pidgin/resources/pidgin.gresource.xml
--- a/pidgin/resources/pidgin.gresource.xml
+++ b/pidgin/resources/pidgin.gresource.xml
@@ -31,6 +31,7 @@
     <file compressed="true">Privacy/dialog.ui</file>
     <file compressed="true">Protocols/chooser.ui</file>
     <file compressed="true">Roomlist/roomlist.ui</file>
+    <file compressed="true">Roomlist/menu.ui</file>
     <file compressed="true">Status/box.ui</file>
     <file compressed="true">Status/editor.ui</file>
     <file compressed="true">Status/manager.ui</file>
