# HG changeset patch # User Gary Kramlich # Date 1606211529 21600 # Node ID 3d6797191bf562974d1a43d1b5a4faef4a3bcccd # Parent bbb0be094c2b1b75d6ee473a10c0116ca5c5c581 Create a new menu bar for PidginConversationWindow. This is just the menu itself and no behavior. Testing Done: Compiled and ran locally. Reviewed at https://reviews.imfreedom.org/r/251/ diff -r bbb0be094c2b -r 3d6797191bf5 pidgin/pidginconversationwindow.c --- a/pidgin/pidginconversationwindow.c Tue Nov 24 03:33:04 2020 -0600 +++ b/pidgin/pidginconversationwindow.c Tue Nov 24 03:52:09 2020 -0600 @@ -25,6 +25,8 @@ struct _PidginConversationWindow { GtkApplicationWindow parent; + GMenu *send_to_menu; + GtkWidget *vbox; }; @@ -36,10 +38,26 @@ *****************************************************************************/ static void pidgin_conversation_window_init(PidginConversationWindow *window) { + GtkBuilder *builder = NULL; + GtkWidget *menubar = NULL; + GMenuModel *model = NULL; + gtk_widget_init_template(GTK_WIDGET(window)); gtk_window_set_application(GTK_WINDOW(window), GTK_APPLICATION(g_application_get_default())); + + /* setup our menu */ + builder = gtk_builder_new_from_resource("/im/pidgin/Pidgin/Conversations/menu.ui"); + + model = (GMenuModel *)gtk_builder_get_object(builder, "conversation"); + menubar = gtk_menu_bar_new_from_model(model); + gtk_box_pack_start(GTK_BOX(window->vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show(menubar); + + window->send_to_menu = (GMenu *)gtk_builder_get_object(builder, "send-to"); + + g_object_unref(G_OBJECT(builder)); } static void diff -r bbb0be094c2b -r 3d6797191bf5 pidgin/resources/Conversations/menu.ui --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/resources/Conversations/menu.ui Tue Nov 24 03:52:09 2020 -0600 @@ -0,0 +1,143 @@ + + + + + _Conversation +
+ + New Instant _Message... + app.new-message + <Primary>M + + + Join a _Chat... + app.join-chat + +
+
+ + _Find... + win.find + <Primary>F + + + View _Log + win.view-log + + + _Save As... + win.save-as + + + Clea_r Scrollback + win.clear-history + <Primary>L + +
+
+ + M_edia +
+ + _Audio Call + win.audio-call + + + _Video Call + win.video-call + + + Audio/Video _Call + win.audio-video-call + +
+
+
+
+ + Se_nd File... + win.send-file + + + Get _Attention + win.get-attention + + + Add Buddy _Pounce... + win.add-buddy-pounce + + + _Get Info + win.clear-history + <Primary>O + + + In_vite... + win.invite + + + M_ore +
+
+
+
+ + Al_ias... + win.alias + + + _Block... + win.block + + + _Unblock... + win.unblock + + + _Add... + win.add + + + _Remove... + win.remove + +
+
+ + Insert Lin_k... + win.insert-link + + + Insert Imag_e... + win.insert-image + +
+
+ + _Close + win.close + <Primary>W + +
+
+ + _Options +
+ + Enable _Logging + win.toggle-logging + +
+
+ + Show Formatting _Toolbars + win.toggle-formatting-toolbars + +
+
+ + S_end To +
+
+
+
diff -r bbb0be094c2b -r 3d6797191bf5 pidgin/resources/pidgin.gresource.xml --- a/pidgin/resources/pidgin.gresource.xml Tue Nov 24 03:33:04 2020 -0600 +++ b/pidgin/resources/pidgin.gresource.xml Tue Nov 24 03:52:09 2020 -0600 @@ -12,6 +12,7 @@ BuddyList/menu.ui BuddyList/window.ui Conversations/invite_dialog.ui + Conversations/menu.ui Conversations/tab-label.css Conversations/window.ui Debug/debug.ui