pidgin/pidgin

17f602456139
Parents eda54ed056bd
Children e73dd56b68f1
Move Display/window.ui to display-window.ui

We've been slowly moving single ui files out of their directories and into the
top level for resources.

Testing Done:
Called in the turtles and connected a demo account and verified the window worked as expected.

Reviewed at https://reviews.imfreedom.org/r/3176/
--- a/pidgin/pidgindisplaywindow.c Wed May 08 03:40:26 2024 -0500
+++ b/pidgin/pidgindisplaywindow.c Thu May 09 20:43:55 2024 -0500
@@ -348,7 +348,7 @@
gtk_widget_class_set_template_from_resource(
widget_class,
- "/im/pidgin/Pidgin3/Display/window.ui"
+ "/im/pidgin/Pidgin3/display-window.ui"
);
gtk_widget_class_bind_template_child(widget_class, PidginDisplayWindow,
--- a/pidgin/resources/Display/window.ui Wed May 08 03:40:26 2024 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-<?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 library; if not, see <https://www.gnu.org/licenses/>.
--->
-<interface>
- <requires lib="gtk" version="4.0"/>
- <requires lib="Adw" version="1.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="GListStore" id="base_model">
- <property name="item-type">PidginDisplayItem</property>
- <child>
- <object class="PidginDisplayItem">
- <property name="id">__contacts__</property>
- <property name="title" translatable="1">Contacts</property>
- <property name="widget">
- <object class="GtkScrolledWindow">
- <child>
- <object class="PidginContactList" id="contact_list"/>
- </child>
- </object>
- </property>
- </object>
- </child>
- <child>
- <object class="PidginDisplayItem">
- <property name="id">__notifications__</property>
- <property name="title" translatable="1">Notifications</property>
- <property name="widget">
- <object class="GtkScrolledWindow">
- <child>
- <object class="PidginNotificationList" id="notification_list">
- <property name="orientation">vertical</property>
- </object>
- </child>
- </object>
- </property>
- <binding name="needs-attention">
- <lookup name="needs-attention">notification_list</lookup>
- </binding>
- <binding name="badge-number">
- <lookup name="notification-count">notification_list</lookup>
- </binding>
- </object>
- </child>
- <child>
- <object class="PidginDisplayItem">
- <property name="id">__plugins__</property>
- <property name="title" translatable="1">Plugins</property>
- <property name="widget">
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <child>
- <object class="PidginInfoPane">
- <property name="title" translatable="yes">Plugins</property>
- <child>
- <object class="GtkBox">
- <property name="margin-end">6</property>
- <property name="orientation">horizontal</property>
- <property name="spacing">6</property>
- <property name="valign">center</property>
- <child>
- <object class="GtkButton">
- <property name="tooltip-text" translatable="yes">Refresh</property>
- <!-- we can't actually refresh the gplugin pluging list right now, so we just show an insensitive button to remind us to fix it later. -->
- <property name="sensitive">false</property>
- <child>
- <object class="GtkImage">
- <property name="icon-name">view-refresh-symbolic</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GPluginGtkView" id="plugin_list">
- <property name="orientation">vertical</property>
- </object>
- </child>
- </object>
- </property>
- </object>
- </child>
- <child>
- <object class="PidginDisplayItem">
- <property name="id">__conversations__</property>
- <property name="title" translatable="1">Conversations</property>
- <property name="widget">
- <object class="AdwStatusPage">
- <property name="icon-name">mail-send-symbolic</property>
- <property name="title" translatable="1">Conversations</property>
- <property name="description" translatable="1">When you send a message to a friend or join a chat it will show up here!</property>
- </object>
- </property>
- <property name="children">
- <object class="GListStore" id="conversation_model">
- <property name="item-type">PidginDisplayItem</property>
- </object>
- </property>
- </object>
- </child>
- </object>
- <template class="PidginDisplayWindow" parent="GtkApplicationWindow">
- <property name="show-menubar">1</property>
- <property name="default-height">450</property>
- <property name="default-width">950</property>
- <child>
- <object class="GtkEventControllerKey">
- <property name="propagation-phase">capture</property>
- <signal name="key-pressed" handler="pidgin_display_window_key_pressed_cb"/>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="vbox">
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkPaned" id="paned">
- <property name="vexpand">1</property>
- <property name="focusable">1</property>
- <property name="position">220</property>
- <child>
- <object class="GtkBox">
- <property name="margin-top">6</property>
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-bottom">6</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkScrolledWindow">
- <property name="vexpand">1</property>
- <property name="focusable">1</property>
- <property name="propagate-natural-width">1</property>
- <style>
- <class name="sidebar"/>
- </style>
- <child>
- <object class="GtkListView" id="view">
- <property name="model">
- <object class="GtkSingleSelection" id="selection_model">
- <property name="autoselect">1</property>
- <property name="can-unselect">0</property>
- <signal name="notify::selected-item" handler="pidgin_display_window_selected_item_changed_cb"/>
- </object>
- </property>
- <property name="factory">
- <object class="GtkBuilderListItemFactory">
- <property name="resource">/im/pidgin/Pidgin3/display-item.ui</property>
- </object>
- </property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="AdwBin" id="bin">
- <property name="vexpand">1</property>
- <property name="hexpand">1</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </template>
-</interface>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pidgin/resources/display-window.ui Thu May 09 20:43:55 2024 -0500
@@ -0,0 +1,188 @@
+<?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 library; if not, see <https://www.gnu.org/licenses/>.
+-->
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <requires lib="Adw" version="1.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="GListStore" id="base_model">
+ <property name="item-type">PidginDisplayItem</property>
+ <child>
+ <object class="PidginDisplayItem">
+ <property name="id">__contacts__</property>
+ <property name="title" translatable="1">Contacts</property>
+ <property name="widget">
+ <object class="GtkScrolledWindow">
+ <child>
+ <object class="PidginContactList" id="contact_list"/>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="PidginDisplayItem">
+ <property name="id">__notifications__</property>
+ <property name="title" translatable="1">Notifications</property>
+ <property name="widget">
+ <object class="GtkScrolledWindow">
+ <child>
+ <object class="PidginNotificationList" id="notification_list">
+ <property name="orientation">vertical</property>
+ </object>
+ </child>
+ </object>
+ </property>
+ <binding name="needs-attention">
+ <lookup name="needs-attention">notification_list</lookup>
+ </binding>
+ <binding name="badge-number">
+ <lookup name="notification-count">notification_list</lookup>
+ </binding>
+ </object>
+ </child>
+ <child>
+ <object class="PidginDisplayItem">
+ <property name="id">__plugins__</property>
+ <property name="title" translatable="1">Plugins</property>
+ <property name="widget">
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="PidginInfoPane">
+ <property name="title" translatable="yes">Plugins</property>
+ <child>
+ <object class="GtkBox">
+ <property name="margin-end">6</property>
+ <property name="orientation">horizontal</property>
+ <property name="spacing">6</property>
+ <property name="valign">center</property>
+ <child>
+ <object class="GtkButton">
+ <property name="tooltip-text" translatable="yes">Refresh</property>
+ <!-- we can't actually refresh the gplugin pluging list right now, so we just show an insensitive button to remind us to fix it later. -->
+ <property name="sensitive">false</property>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">view-refresh-symbolic</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GPluginGtkView" id="plugin_list">
+ <property name="orientation">vertical</property>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="PidginDisplayItem">
+ <property name="id">__conversations__</property>
+ <property name="title" translatable="1">Conversations</property>
+ <property name="widget">
+ <object class="AdwStatusPage">
+ <property name="icon-name">mail-send-symbolic</property>
+ <property name="title" translatable="1">Conversations</property>
+ <property name="description" translatable="1">When you send a message to a friend or join a chat it will show up here!</property>
+ </object>
+ </property>
+ <property name="children">
+ <object class="GListStore" id="conversation_model">
+ <property name="item-type">PidginDisplayItem</property>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ <template class="PidginDisplayWindow" parent="GtkApplicationWindow">
+ <property name="show-menubar">1</property>
+ <property name="default-height">450</property>
+ <property name="default-width">950</property>
+ <child>
+ <object class="GtkEventControllerKey">
+ <property name="propagation-phase">capture</property>
+ <signal name="key-pressed" handler="pidgin_display_window_key_pressed_cb"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="vbox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkPaned" id="paned">
+ <property name="vexpand">1</property>
+ <property name="focusable">1</property>
+ <property name="position">220</property>
+ <child>
+ <object class="GtkBox">
+ <property name="margin-top">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="vexpand">1</property>
+ <property name="focusable">1</property>
+ <property name="propagate-natural-width">1</property>
+ <style>
+ <class name="sidebar"/>
+ </style>
+ <child>
+ <object class="GtkListView" id="view">
+ <property name="model">
+ <object class="GtkSingleSelection" id="selection_model">
+ <property name="autoselect">1</property>
+ <property name="can-unselect">0</property>
+ <signal name="notify::selected-item" handler="pidgin_display_window_selected_item_changed_cb"/>
+ </object>
+ </property>
+ <property name="factory">
+ <object class="GtkBuilderListItemFactory">
+ <property name="resource">/im/pidgin/Pidgin3/display-item.ui</property>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwBin" id="bin">
+ <property name="vexpand">1</property>
+ <property name="hexpand">1</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
--- a/pidgin/resources/pidgin.gresource.xml Wed May 08 03:40:26 2024 -0500
+++ b/pidgin/resources/pidgin.gresource.xml Thu May 09 20:43:55 2024 -0500
@@ -12,7 +12,6 @@
<file compressed="true" preprocess="xml-stripblanks">Conversations/conversation.ui</file>
<file compressed="true" preprocess="xml-stripblanks">Conversations/message.ui</file>
<file compressed="true" preprocess="xml-stripblanks">Debug/debug.ui</file>
- <file compressed="true" preprocess="xml-stripblanks">Display/window.ui</file>
<file compressed="true" preprocess="xml-stripblanks">Keypad/keypad.ui</file>
<file compressed="true" preprocess="xml-stripblanks">Media/window.ui</file>
<file compressed="true" preprocess="xml-stripblanks">Notifications/addcontact.ui</file>
@@ -37,6 +36,7 @@
<file compressed="true" preprocess="xml-stripblanks">contactlistitem.ui</file>
<file compressed="true" preprocess="xml-stripblanks">conversationmemberlistitem.ui</file>
<file compressed="true" preprocess="xml-stripblanks">display-item.ui</file>
+ <file compressed="true" preprocess="xml-stripblanks">display-window.ui</file>
<file compressed="true" preprocess="xml-stripblanks">infopane.ui</file>
<file compressed="true" preprocess="xml-stripblanks">notificationlist.ui</file>
<file compressed="true" preprocess="xml-stripblanks">presenceicon.ui</file>
--- a/po/POTFILES.in Wed May 08 03:40:26 2024 -0500
+++ b/po/POTFILES.in Thu May 09 20:43:55 2024 -0500
@@ -152,7 +152,6 @@
pidgin/resources/Accounts/manager-row.ui
pidgin/resources/avatar.ui
pidgin/resources/Debug/debug.ui
-pidgin/resources/Display/window.ui
pidgin/resources/Keypad/keypad.ui
pidgin/resources/Media/window.ui
pidgin/resources/Prefs/away.ui
@@ -169,6 +168,8 @@
pidgin/resources/account-row.ui
pidgin/resources/contactlist.ui
pidgin/resources/contactlistitem.ui
+pidgin/resources/display-item.ui
+pidgin/resources/display-window.ui
pidgin/resources/infopane.ui
pidgin/win32/gtkwin32dep.c
pidgin/win32/winpidgin.c