Skip to content
This repository was archived by the owner on Jul 2, 2026. It is now read-only.

Commit de568bc

Browse files
committed
Buds still exists?
1 parent ef0b0b9 commit de568bc

3 files changed

Lines changed: 165 additions & 156 deletions

File tree

data/ui/window.blp

Lines changed: 132 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -11,164 +11,167 @@ template $BudsWindow : He.ApplicationWindow {
1111
Box {
1212
orientation: vertical;
1313

14-
Bis.Album album {
15-
can-navigate-back: true;
16-
can-navigate-forward: true;
17-
visible-child: listgrid;
18-
19-
Bis.AlbumPage {
20-
child:
21-
He.SideBar listgrid {
22-
show-back: false;
23-
has-margins: false;
24-
show-left-title-buttons: true;
25-
show-right-title-buttons: bind album.folded;
26-
width-request: 250;
27-
title: He.ViewTitle {
28-
label: _("Contacts");
29-
};
30-
scroller: sw;
31-
32-
[titlebar-toggle]
33-
ToggleButton search_button {
34-
icon-name: "system-search-symbolic";
35-
}
36-
[titlebar-menu]
37-
MenuButton {
38-
icon-name: "open-menu-symbolic";
39-
menu-model: primary_menu;
40-
}
41-
42-
SearchEntry search_entry {
43-
margin-start: 18;
44-
margin-end: 18;
45-
margin-bottom: 6;
46-
margin-top: 6;
47-
placeholder-text: _("Search contacts…");
48-
halign: start;
49-
visible: bind search_button.active;
50-
51-
styles [
52-
"search",
53-
"text-field"
54-
]
55-
}
56-
57-
ScrolledWindow sw {
58-
hscrollbar-policy: never;
59-
vexpand: true;
14+
Overlay about_overlay {
15+
16+
child: Bis.Album album {
17+
can-navigate-back: true;
18+
can-navigate-forward: true;
19+
visible-child: listgrid;
20+
21+
Bis.AlbumPage {
22+
child:
23+
He.SideBar listgrid {
24+
show-back: false;
25+
has-margins: false;
26+
show-left-title-buttons: true;
27+
show-right-title-buttons: bind album.folded;
28+
width-request: 250;
29+
title: He.ViewTitle {
30+
label: _("Contacts");
31+
};
32+
scroller: sw;
33+
34+
[titlebar-toggle]
35+
ToggleButton search_button {
36+
icon-name: "system-search-symbolic";
37+
}
38+
[titlebar-menu]
39+
MenuButton {
40+
icon-name: "open-menu-symbolic";
41+
menu-model: primary_menu;
42+
}
6043

61-
ListBox contacts_listbox {
62-
selection-mode: single;
44+
SearchEntry search_entry {
6345
margin-start: 18;
6446
margin-end: 18;
65-
row-activated => $item_activated();
47+
margin-bottom: 6;
48+
margin-top: 6;
49+
placeholder-text: _("Search contacts…");
50+
halign: start;
51+
visible: bind search_button.active;
6652

6753
styles [
68-
"content-list",
54+
"search",
55+
"text-field"
6956
]
7057
}
71-
}
72-
}
73-
;
74-
}
75-
76-
Bis.AlbumPage {
77-
child:
78-
Box info {
79-
orientation: vertical;
80-
spacing: 0;
81-
hexpand: true;
82-
83-
styles [
84-
"main-view",
85-
]
86-
87-
He.AppBar info_title {
88-
show-left-title-buttons: bind album.folded;
89-
show-right-title-buttons: true;
90-
show-back: bind album.folded;
91-
}
9258

93-
Stack stack {
94-
StackPage {
95-
name: "empty";
96-
child:
97-
He.EmptyPage empty_page {
98-
title: _("No Selected Contact");
99-
description: _("Select a contact to see info.");
100-
icon: "system-users-symbolic";
59+
ScrolledWindow sw {
60+
hscrollbar-policy: never;
61+
vexpand: true;
62+
63+
ListBox contacts_listbox {
64+
selection-mode: single;
65+
margin-start: 18;
66+
margin-end: 18;
67+
row-activated => $item_activated();
68+
69+
styles [
70+
"content-list",
71+
]
10172
}
102-
;
10373
}
74+
}
75+
;
76+
}
10477

105-
StackPage {
106-
name: "info";
107-
child:
108-
Bis.Latch {
109-
Box {
110-
orientation: vertical;
111-
spacing: 40;
112-
vexpand: true;
113-
halign: center;
114-
margin-top: 70;
115-
margin-bottom: 18;
116-
margin-start: 18;
117-
margin-end: 18;
118-
width-request: 360;
119-
120-
He.Avatar contact_image {
121-
size: 128;
122-
image: "";
123-
halign: center;
124-
}
78+
Bis.AlbumPage {
79+
child:
80+
Box info {
81+
orientation: vertical;
82+
spacing: 0;
83+
hexpand: true;
12584

126-
Label contact_name {
127-
styles [
128-
"display",
129-
]
130-
}
85+
styles [
86+
"main-view",
87+
]
88+
89+
He.AppBar info_title {
90+
show-left-title-buttons: bind album.folded;
91+
show-right-title-buttons: true;
92+
show-back: bind album.folded;
93+
}
94+
95+
Stack stack {
96+
StackPage {
97+
name: "empty";
98+
child:
99+
He.EmptyPage empty_page {
100+
title: _("No Selected Contact");
101+
description: _("Select a contact to see info.");
102+
icon: "system-users-symbolic";
103+
}
104+
;
105+
}
131106

107+
StackPage {
108+
name: "info";
109+
child:
110+
Bis.Latch {
132111
Box {
133112
orientation: vertical;
134-
spacing: 6;
113+
spacing: 40;
114+
vexpand: true;
115+
halign: center;
116+
margin-top: 70;
117+
margin-bottom: 18;
118+
margin-start: 18;
119+
margin-end: 18;
120+
width-request: 360;
121+
122+
He.Avatar contact_image {
123+
size: 128;
124+
image: "";
125+
halign: center;
126+
}
127+
128+
Label contact_name {
129+
styles [
130+
"display",
131+
]
132+
}
135133

136-
He.MiniContentBlock phone_block {
137-
visible: false;
138-
title: _("Phone");
139-
icon: "phone-symbolic";
134+
Box {
135+
orientation: vertical;
136+
spacing: 6;
140137

141-
He.Button phone_button {
142-
icon: "edit-copy-symbolic";
143-
is-disclosure: true;
138+
He.MiniContentBlock phone_block {
139+
visible: false;
140+
title: _("Phone");
141+
icon: "phone-symbolic";
142+
143+
He.Button phone_button {
144+
icon: "edit-copy-symbolic";
145+
is-disclosure: true;
146+
}
144147
}
145-
}
146148

147-
He.MiniContentBlock email_block {
148-
visible: false;
149-
title: _("Email");
150-
icon: "mail-archive-symbolic";
149+
He.MiniContentBlock email_block {
150+
visible: false;
151+
title: _("Email");
152+
icon: "mail-archive-symbolic";
151153

152-
He.Button email_button {
153-
icon: "edit-copy-symbolic";
154-
is-disclosure: true;
154+
He.Button email_button {
155+
icon: "edit-copy-symbolic";
156+
is-disclosure: true;
157+
}
155158
}
156-
}
157159

158-
He.MiniContentBlock bday_block {
159-
visible: false;
160-
title: _("Birthday");
161-
icon: "x-office-calendar-symbolic";
160+
He.MiniContentBlock bday_block {
161+
visible: false;
162+
title: _("Birthday");
163+
icon: "x-office-calendar-symbolic";
164+
}
162165
}
163166
}
164167
}
168+
;
165169
}
166-
;
167170
}
168171
}
172+
;
169173
}
170-
;
171-
}
174+
};
172175
}
173176
}
174177
}

src/application.vala

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818

1919
namespace Buds {
2020
public class Application : He.Application {
21+
private Window window;
22+
2123
public Application () {
2224
Object (
23-
application_id: Config.APP_ID,
24-
flags: ApplicationFlags.FLAGS_NONE
25+
application_id: Config.APP_ID,
26+
flags: ApplicationFlags.FLAGS_NONE
2527
);
2628
}
2729

@@ -32,21 +34,21 @@ namespace Buds {
3234
{ "quit", this.quit }
3335
};
3436
this.add_action_entries (action_entries, this);
35-
this.set_accels_for_action ("app.quit", {"<primary>q"});
37+
this.set_accels_for_action ("app.quit", { "<primary>q" });
3638
}
3739

3840
protected override void startup () {
3941
Gdk.RGBA accent_color = { 0 };
40-
accent_color.parse("#56BFA6");
41-
default_accent_color = He.from_gdk_rgba(accent_color);
42+
accent_color.parse ("#56BFA6");
43+
default_accent_color = He.from_gdk_rgba (accent_color);
4244

4345
resource_base_path = "/com/fyralabs/Buds";
4446

4547
base.startup ();
4648

4749
Bis.init ();
4850

49-
new Buds.Window (this);
51+
window = new Buds.Window (this);
5052
}
5153

5254
protected override void activate () {
@@ -55,21 +57,23 @@ namespace Buds {
5557

5658
private void on_about_action () {
5759
string[] developers = { "Fyra Labs" };
58-
new He.AboutWindow (
59-
this.active_window,
60-
"Buds" + Config.NAME_SUFFIX,
61-
"com.fyralabs.Buds",
62-
Config.VERSION,
63-
"com.fyralabs.Buds",
64-
"",
65-
"",
66-
"",
67-
{},
68-
developers,
69-
2022,
70-
He.AboutWindow.Licenses.GPLV3,
71-
He.Colors.MINT
72-
).present ();
60+
var awindow = new He.AboutWindow (
61+
this.active_window,
62+
"Buds" + Config.NAME_SUFFIX,
63+
"com.fyralabs.Buds",
64+
Config.VERSION,
65+
"com.fyralabs.Buds",
66+
"",
67+
"",
68+
"",
69+
{},
70+
developers,
71+
2022,
72+
He.AboutWindow.Licenses.GPLV3,
73+
He.Colors.MINT
74+
);
75+
window.about_overlay.add_overlay (awindow);
76+
awindow.present ();
7377
}
7478

7579
private void on_preferences_action () {
@@ -81,4 +85,4 @@ namespace Buds {
8185
public static int main (string[] args) {
8286
var app = new Buds.Application ();
8387
return app.run (args);
84-
}
88+
}

0 commit comments

Comments
 (0)