-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
history-view.ui
178 lines (178 loc) · 8.57 KB
/
history-view.ui
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="menu">
<section>
<item>
<attribute name="label" translatable="yes">_Preferences</attribute>
<attribute name="action">app.show-preferences</attribute>
</item>
<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 Mousai</attribute>
<attribute name="action">app.show-about</attribute>
</item>
</section>
</menu>
<menu id="selection_menu">
<section>
<item>
<attribute name="label" translatable="yes">Select _All</attribute>
<attribute name="action">history-view.select-all</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Select _None</attribute>
<attribute name="action">history-view.select-none</attribute>
</item>
</section>
</menu>
<template class="MsaiHistoryView">
<property name="layout-manager">
<object class="GtkBinLayout"/>
</property>
<style>
<class name="view"/>
</style>
<child>
<object class="AdwNavigationView" id="navigation_view">
<child>
<object class="AdwNavigationPage" id="navigation_main_page">
<property name="title" translatable="yes">Home</property>
<property name="child">
<object class="AdwToolbarView">
<child type="top">
<object class="GtkStack" id="header_bar_stack">
<property name="transition-type">crossfade</property>
<child>
<object class="AdwHeaderBar" id="main_header_bar">
<child>
<object class="GtkButton">
<property name="tooltip-text" translatable="yes">Recognize Song</property>
<property name="label" translatable="yes">Listen</property>
<property name="action-name">win.toggle-recognize</property>
<style>
<class name="suggested-action"/>
</style>
</object>
</child>
<child>
<object class="MsaiRecognizerStatus" id="recognizer_status"/>
</child>
<child type="end">
<object class="GtkMenuButton">
<property name="tooltip-text" translatable="yes">Main Menu</property>
<property name="icon-name">open-menu-symbolic</property>
<property name="menu-model">menu</property>
<property name="primary">True</property>
</object>
</child>
<child type="end">
<object class="GtkButton">
<property name="tooltip-text" translatable="yes">Select</property>
<property name="icon-name">selection-mode-symbolic</property>
<property name="action-name">history-view.toggle-selection-mode</property>
</object>
</child>
<child type="end">
<object class="GtkToggleButton">
<property name="tooltip-text" translatable="yes">Search Songs</property>
<property name="icon-name">system-search-symbolic</property>
<property name="active" bind-source="search_bar" bind-property="search-mode-enabled" bind-flags="sync-create | bidirectional"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwHeaderBar" id="selection_mode_header_bar">
<property name="title-widget">
<object class="GtkMenuButton" id="selection_mode_menu_button">
<property name="menu-model">selection_menu</property>
</object>
</property>
<child type="end">
<object class="GtkButton">
<property name="tooltip-text" translatable="yes">Cancel Selection</property>
<property name="label" translatable="yes">Cancel</property>
<property name="action-name">history-view.toggle-selection-mode</property>
</object>
</child>
<child type="end">
<object class="GtkToggleButton">
<property name="tooltip-text" translatable="yes">Search Songs</property>
<property name="icon-name">system-search-symbolic</property>
<property name="active" bind-source="search_bar" bind-property="search-mode-enabled" bind-flags="sync-create | bidirectional"/>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="top">
<!-- TODO Maybe inline this in the headerbar -->
<object class="GtkSearchBar" id="search_bar">
<property name="child">
<object class="GtkSearchEntry" id="search_entry">
<property name="placeholder-text" translatable="yes">Search songs</property>
</object>
</property>
</object>
</child>
<property name="content">
<object class="GtkStack" id="content_stack">
<property name="transition-type">crossfade</property>
<child>
<object class="GtkScrolledWindow" id="content_main_page">
<property name="hscrollbar-policy">never</property>
<property name="child">
<object class="GtkGridView" id="grid">
<property name="min-columns">2</property>
<style>
<class name="history-view"/>
</style>
</object>
</property>
</object>
</child>
<child>
<object class="AdwStatusPage" id="content_empty_page">
<property name="title" translatable="yes">Start Recognizing Songs!</property>
<property name="description" translatable="yes">Click the listen button to start</property>
<style>
<class name="icon-dropshadow"/>
</style>
</object>
</child>
<child>
<object class="AdwStatusPage" id="content_empty_search_result_page">
<property name="icon-name">system-search-symbolic</property>
<property name="title" translatable="yes">No Results</property>
</object>
</child>
</object>
</property>
<child type="bottom">
<object class="GtkActionBar" id="selection_mode_bar">
<child>
<object class="GtkButton" id="copy_selected_songs_button">
<property name="icon-name">edit-copy-symbolic</property>
<property name="action-name">history-view.copy-selected-song</property>
</object>
</child>
<child>
<object class="GtkButton" id="remove_selected_songs_button">
<property name="icon-name">user-trash-symbolic</property>
<property name="action-name">history-view.remove-selected-songs</property>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</child>
</template>
</interface>