fractal/src/session/view/sidebar/mod.ui

158 lines
6.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="primary_menu">
<section>
<item>
<attribute name="label" translatable="yes">New _Direct Chat</attribute>
<attribute name="action">session.create-dm</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_New Room</attribute>
<attribute name="action">session.room-creation</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Join Room</attribute>
<attribute name="action">session.show-join-room</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Fractal</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
</menu>
<menu id="room_row_menu">
<section>
<item>
<attribute name="label" translatable="yes">_Accept</attribute>
<attribute name="action">room-row.accept-invite</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Reject</attribute>
<attribute name="action">room-row.reject-invite</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">Move to _Favorites</attribute>
<attribute name="action">room-row.set-favorite</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Move to _Rooms</attribute>
<attribute name="action">room-row.set-normal</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Move to Low _Priority</attribute>
<attribute name="action">room-row.set-lowpriority</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Leave Room</attribute>
<attribute name="action">room-row.leave</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Re_join Room</attribute>
<attribute name="action">room-row.join</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Forget Room</attribute>
<attribute name="action">room-row.forget</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
</menu>
<template class="Sidebar" parent="AdwNavigationPage">
<property name="title">Sidebar</property><!-- This is not displayed so no need to make it translatable -->
<child>
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<property name="show-title">False</property>
<child type="start">
<object class="AccountSwitcherButton"/>
</child>
<child type="end">
<object class="GtkMenuButton" id="appmenu_button">
<property name="icon-name">menu-primary-symbolic</property>
<property name="menu-model">primary_menu</property>
<property name="primary">True</property>
<property name="tooltip-text" translatable="yes">Main Menu</property>
<accessibility>
<property name="label" translatable="yes">Main Menu</property>
</accessibility>
</object>
</child>
<child type="end">
<object class="GtkToggleButton" id="search_button">
<property name="icon-name">system-search-symbolic</property>
<property name="active" bind-source="room_search" bind-property="search-mode-enabled" bind-flags="sync-create"/>
<property name="action-name">session.toggle-room-search</property>
<property name="tooltip-text" translatable="yes">Toggle Room Search</property>
<accessibility>
<property name="label" translatable="yes">Toggle Room Search</property>
</accessibility>
</object>
</child>
</object>
</child>
<child type="top">
<object class="GtkSearchBar" id="room_search">
<property name="child">
<object class="GtkSearchEntry" id="room_search_entry">
<property name="hexpand">True</property>
</object>
</property>
<accessibility>
<property name="label" translatable="yes">Room Search</property>
<property name="description" translatable="yes">Search for a room</property>
</accessibility>
</object>
</child>
<property name="content">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwBanner" id="offline_banner">
<property name="title" translatable="yes">Offline</property>
</object>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="vexpand">True</property>
<property name="hscrollbar-policy">never</property>
<property name="child">
<object class="GtkListView" id="listview">
<style>
<class name="navigation-sidebar"/>
<class name="sidebar-list"/>
</style>
<property name="single-click-activate">true</property>
<property name="tab-behavior">item</property>
<accessibility>
<property name="label" translatable="yes">Sidebar</property>
<property name="description" translatable="yes">Allows to navigate between rooms</property>
</accessibility>
</object>
</property>
</object>
</child>
</object>
</property>
</object>
</child>
</template>
</interface>