Debian Codegraph @

demo/pages/tab-view/adw-tab-view-demo-window.ui

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <interface>
3 <requires lib="gtk" version="4.0"/>
4 <requires lib="libadwaita" version="1.0"/>
5 <template class="AdwTabViewDemoWindow" parent="AdwWindow">
6 <property name="title" translatable="yes">Tab View Demo</property>
7 <property name="default-width">800</property>
8 <property name="default-height">600</property>
9 <property name="content">
10 <object class="AdwTabOverview" id="tab_overview">
11 <property name="view">view</property>
12 <property name="enable-new-tab">True</property>
13 <signal name="extra-drag-drop" handler="extra_drag_drop_cb" swapped="true"/>
14 <signal name="create-tab" handler="create_tab_cb" swapped="true"/>
15 <property name="child">
16 <object class="AdwToolbarView">
17 <property name="top-bar-style">raised</property>
18 <child type="top">
19 <object class="AdwHeaderBar">
20 <child type="start">
21 <object class="GtkButton">
22 <property name="action-name">win.window-new</property>
23 <property name="icon-name">window-new-symbolic</property>
24 <property name="tooltip-text" translatable="yes">New Window</property>
25 </object>
26 </child>
27 <child type="end">
28 <object class="AdwTabButton" id="narrow_overview_btn">
29 <property name="visible">False</property>
30 <property name="view">view</property>
31 <property name="action-name">overview.open</property>
32 </object>
33 </child>
34 <child type="end">
35 <object class="GtkButton" id="overview_btn">
36 <property name="icon-name">view-grid-symbolic</property>
37 <property name="tooltip-text" translatable="yes">View Open Tabs</property>
38 <property name="action-name">overview.open</property>
39 </object>
40 </child>
41 <child type="end">
42 <object class="GtkButton" id="new_tab_btn">
43 <property name="action-name">win.tab-new</property>
44 <property name="icon-name">adw-tab-new-symbolic</property>
45 <property name="tooltip-text" translatable="yes">New Tab</property>
46 </object>
47 </child>
48 </object>
49 </child>
50 <child type="top">
51 <object class="AdwTabBar" id="tab_bar">
52 <property name="view">view</property>
53 <signal name="extra-drag-drop" handler="extra_drag_drop_cb" swapped="true"/>
54 </object>
55 </child>
56 <property name="content">
57 <object class="AdwTabView" id="view">
58 <property name="menu-model">tab_menu</property>
59 <signal name="page-detached" handler="page_detached_cb" swapped="true"/>
60 <signal name="setup-menu" handler="setup_menu_cb" swapped="true"/>
61 <signal name="create-window" handler="create_window_cb" swapped="true"/>
62 <signal name="indicator-activated" handler="indicator_activated_cb" swapped="true"/>
63 </object>
64 </property>
65 </object>
66 </property>
67 </object>
68 </property>
69 <child>
70 <object class="AdwBreakpoint">
71 <condition>max-width: 600px</condition>
72 <setter object="narrow_overview_btn" property="visible">True</setter>
73 <setter object="overview_btn" property="visible">False</setter>
74 <setter object="new_tab_btn" property="visible">False</setter>
75 <setter object="tab_bar" property="visible">False</setter>
76 </object>
77 </child>
78 </template>
79 <menu id="tab_menu">
80 <section>
81 <item>
82 <attribute name="label" translatable="yes">_Move to New Window</attribute>
83 <attribute name="action">tab.move-to-new-window</attribute>
84 </item>
85 <item>
86 <attribute name="label" translatable="yes">D_uplicate</attribute>
87 <attribute name="action">tab.duplicate</attribute>
88 </item>
89 </section>
90 <section>
91 <item>
92 <attribute name="label" translatable="yes">P_in Tab</attribute>
93 <attribute name="action">tab.pin</attribute>
94 <attribute name="hidden-when">action-disabled</attribute>
95 </item>
96 <item>
97 <attribute name="label" translatable="yes">Unp_in Tab</attribute>
98 <attribute name="action">tab.unpin</attribute>
99 <attribute name="hidden-when">action-disabled</attribute>
100 </item>
101 </section>
102 <section>
103 <item>
104 <attribute name="label" translatable="yes">Icon</attribute>
105 <attribute name="action">tab.icon</attribute>
106 </item>
107 <item>
108 <attribute name="label" translatable="yes">R_efresh Icon</attribute>
109 <attribute name="action">tab.refresh-icon</attribute>
110 </item>
111 </section>
112 <section>
113 <item>
114 <attribute name="label" translatable="yes">Loa_ding</attribute>
115 <attribute name="action">tab.loading</attribute>
116 </item>
117 <item>
118 <attribute name="label" translatable="yes">Needs _Attention</attribute>
119 <attribute name="action">tab.needs-attention</attribute>
120 </item>
121 <item>
122 <attribute name="label" translatable="yes">Indicator</attribute>
123 <attribute name="action">tab.indicator</attribute>
124 </item>
125 </section>
126 <section>
127 <item>
128 <attribute name="label" translatable="yes">Close _Other Tabs</attribute>
129 <attribute name="action">tab.close-other</attribute>
130 </item>
131 <item>
132 <attribute name="label" translatable="yes" comments="Translators: “Close Tabs to the _Right” if you’re translating for a language that reads from right to left">Close Tabs to the _Left</attribute>
133 <attribute name="action">tab.close-before</attribute>
134 </item>
135 <item>
136 <attribute name="label" translatable="yes" comments="Translators: “Close Tabs to the _Left” if you’re translating for a language that reads from right to left">Close Tabs to the _Right</attribute>
137 <attribute name="action">tab.close-after</attribute>
138 </item>
139 </section>
140 <section>
141 <item>
142 <attribute name="label" translatable="yes">_Close</attribute>
143 <attribute name="action">tab.close</attribute>
144 </item>
145 </section>
146 </menu>
147 </interface>
148