Skip to content

Commit 7288ac4

Browse files
committed
fix #1456
1 parent ab3f93b commit 7288ac4

File tree

8 files changed

+384
-356
lines changed

8 files changed

+384
-356
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
2-
"app-id": "io.github.alainm23.planify.Devel",
3-
"runtime": "org.gnome.Platform",
4-
"runtime-version": "46",
5-
"sdk": "org.gnome.Sdk",
6-
"command": "io.github.alainm23.planify.Devel",
7-
"tags": ["devel"],
8-
"finish-args": [
2+
"app-id" : "io.github.alainm23.planify.Devel",
3+
"runtime" : "org.gnome.Platform",
4+
"runtime-version" : "47",
5+
"sdk" : "org.gnome.Sdk",
6+
"command" : "io.github.alainm23.planify.Devel",
7+
"tags" : [
8+
"devel"
9+
],
10+
"finish-args" : [
911
"--device=dri",
1012
"--share=ipc",
1113
"--share=network",
@@ -18,7 +20,7 @@
1820
"--own-name=io.github.alainm23.planify.quick-add",
1921
"--own-name=io.github.alainm23.planify"
2022
],
21-
"cleanup": [
23+
"cleanup" : [
2224
"/include",
2325
"/lib/pkgconfig",
2426
"/man",
@@ -29,34 +31,38 @@
2931
"*.la",
3032
"*.a"
3133
],
32-
"modules": [
34+
"modules" : [
3335
{
34-
"name": "intltool",
35-
"cleanup": ["*"],
36-
"sources": [
36+
"name" : "intltool",
37+
"cleanup" : [
38+
"*"
39+
],
40+
"sources" : [
3741
{
38-
"type": "archive",
39-
"url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz",
40-
"sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd"
42+
"type" : "archive",
43+
"url" : "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz",
44+
"sha256" : "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd"
4145
}
4246
]
4347
},
4448
{
45-
"name": "granite",
46-
"buildsystem": "meson",
47-
"sources": [
49+
"name" : "granite",
50+
"buildsystem" : "meson",
51+
"sources" : [
4852
{
49-
"type": "git",
50-
"url": "https://github.com/elementary/granite.git",
51-
"tag": "7.2.0"
53+
"type" : "git",
54+
"url" : "https://github.com/elementary/granite.git",
55+
"tag" : "7.2.0"
5256
}
5357
]
5458
},
5559
{
56-
"name": "libical",
57-
"buildsystem": "cmake-ninja",
58-
"cleanup": ["/lib/cmake"],
59-
"config-opts": [
60+
"name" : "libical",
61+
"buildsystem" : "cmake-ninja",
62+
"cleanup" : [
63+
"/lib/cmake"
64+
],
65+
"config-opts" : [
6066
"-DCMAKE_BUILD_TYPE=Release",
6167
"-DCMAKE_INSTALL_LIBDIR=/app/lib",
6268
"-DBUILD_SHARED_LIBS=ON",
@@ -66,28 +72,28 @@
6672
"-DICAL_BUILD_DOCS=false",
6773
"-DWITH_CXX_BINDINGS=false"
6874
],
69-
"sources": [
75+
"sources" : [
7076
{
71-
"type": "archive",
72-
"url": "https://github.com/libical/libical/releases/download/v3.0.17/libical-3.0.17.tar.gz",
73-
"sha256": "bcda9a6db6870240328752854d1ea475af9bbc6356e6771018200e475e5f781b",
74-
"x-checker-data": {
75-
"type": "anitya",
76-
"project-id": 1637,
77-
"url-template": "https://github.com/libical/libical/releases/download/v$version/libical-$version.tar.gz"
77+
"type" : "archive",
78+
"url" : "https://github.com/libical/libical/releases/download/v3.0.17/libical-3.0.17.tar.gz",
79+
"sha256" : "bcda9a6db6870240328752854d1ea475af9bbc6356e6771018200e475e5f781b",
80+
"x-checker-data" : {
81+
"type" : "anitya",
82+
"project-id" : 1637,
83+
"url-template" : "https://github.com/libical/libical/releases/download/v$version/libical-$version.tar.gz"
7884
}
7985
}
8086
]
8187
},
8288
{
83-
"name": "evolution-data-server",
84-
"buildsystem": "cmake-ninja",
85-
"cleanup": [
89+
"name" : "evolution-data-server",
90+
"buildsystem" : "cmake-ninja",
91+
"cleanup" : [
8692
"/lib/evolution-data-server/*-backends",
8793
"/libexec",
8894
"/share/dbus-1/services"
8995
],
90-
"config-opts": [
96+
"config-opts" : [
9197
"-DCMAKE_BUILD_TYPE=Release",
9298
"-DENABLE_FILE_LOCKING=fcntl",
9399
"-DENABLE_DOT_LOCKING=OFF",
@@ -110,55 +116,63 @@
110116
"-DENABLE_WEATHER=OFF",
111117
"-DENABLE_OAUTH2_WEBKITGTK4=OFF"
112118
],
113-
"sources": [
119+
"sources" : [
114120
{
115-
"type": "archive",
116-
"url": "https://download.gnome.org/sources/evolution-data-server/3.50/evolution-data-server-3.50.2.tar.xz",
117-
"sha256": "5e66270388d50c14f3b1ae3fa0d2127b9fedce752acd393b5545281b01fc4970",
118-
"x-checker-data": {
119-
"type": "gnome",
120-
"name": "evolution-data-server"
121+
"type" : "archive",
122+
"url" : "https://download.gnome.org/sources/evolution-data-server/3.50/evolution-data-server-3.50.2.tar.xz",
123+
"sha256" : "5e66270388d50c14f3b1ae3fa0d2127b9fedce752acd393b5545281b01fc4970",
124+
"x-checker-data" : {
125+
"type" : "gnome",
126+
"name" : "evolution-data-server"
121127
}
122128
}
123129
]
124130
},
125131
{
126-
"name": "libportal",
127-
"buildsystem": "meson",
128-
"config-opts": [
132+
"name" : "libportal",
133+
"buildsystem" : "meson",
134+
"config-opts" : [
129135
"-Dbackends=['gtk4']",
130136
"-Ddocs=false",
131137
"-Dtests=false"
132138
],
133-
"sources": [
139+
"sources" : [
134140
{
135-
"type": "git",
136-
"url": "https://github.com/flatpak/libportal.git",
137-
"tag": "0.6"
141+
"type" : "git",
142+
"url" : "https://github.com/flatpak/libportal.git",
143+
"tag" : "0.6"
138144
}
139145
]
140146
},
141147
{
142-
"name": "gxml",
143-
"buildsystem": "meson",
144-
"sources": [
148+
"name" : "gxml",
149+
"buildsystem" : "meson",
150+
"sources" : [
145151
{
146-
"type": "git",
147-
"url": "https://gitlab.gnome.org/GNOME/gxml.git"
152+
"type" : "git",
153+
"url" : "https://gitlab.gnome.org/GNOME/gxml.git"
148154
}
149155
]
150156
},
151157
{
152-
"name": "planify",
153-
"builddir": true,
154-
"buildsystem": "meson",
155-
"config-opts": ["-Dtracing=true", "-Dprofile=development"],
156-
"sources": [
158+
"name" : "planify",
159+
"builddir" : true,
160+
"buildsystem" : "meson",
161+
"config-opts" : [
162+
"-Dtracing=true",
163+
"-Dprofile=development",
164+
"--libdir=lib"
165+
],
166+
"sources" : [
157167
{
158-
"type": "dir",
159-
"path": "../"
168+
"type" : "dir",
169+
"path" : "../"
160170
}
161171
]
162172
}
163-
]
164-
}
173+
],
174+
"build-options" : {
175+
"env" : { }
176+
}
177+
}
178+

core/Widgets/ContextMenu/MenuItem.vala

+16-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ public class Widgets.ContextMenu.MenuItem : Gtk.Button {
3737
}
3838
}
3939

40+
bool _autohide_popover = true;
41+
public bool autohide_popover {
42+
get {
43+
return _autohide_popover;
44+
}
45+
46+
set {
47+
_autohide_popover = value;
48+
}
49+
}
50+
4051
public string icon {
4152
set {
4253
if (value != null) {
@@ -178,9 +189,11 @@ public class Widgets.ContextMenu.MenuItem : Gtk.Button {
178189
clicked.connect (() => {
179190
activate_item ();
180191

181-
var popover = (Gtk.Popover) get_ancestor (typeof (Gtk.Popover));
182-
if (popover != null) {
183-
popover.popdown ();
192+
if (autohide_popover) {
193+
var popover = (Gtk.Popover) get_ancestor (typeof (Gtk.Popover));
194+
if (popover != null) {
195+
popover.popdown ();
196+
}
184197
}
185198
});
186199
}

core/Widgets/DateTimePicker/DateTimePicker.vala

+6-1
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,14 @@ public class Widgets.DateTimePicker.DateTimePicker : Gtk.Popover {
117117
next_week_item = new Widgets.ContextMenu.MenuItem (_("Next week"), "work-week-symbolic");
118118
date_item = new Widgets.ContextMenu.MenuItem (_("Choose a date"), "month-symbolic");
119119
date_item.arrow = true;
120+
date_item.autohide_popover = false;
120121

121122
repeat_item = new Widgets.ContextMenu.MenuItem (_("Repeat"), "playlist-repeat-symbolic") {
122123
margin_top = 6,
123124
margin_bottom = 6
124125
};
125126
repeat_item.arrow = true;
127+
repeat_item.autohide_popover = false;
126128

127129
var time_icon = new Gtk.Image.from_icon_name ("clock-symbolic") {
128130
css_classes = { "dim-label" }
@@ -236,6 +238,7 @@ public class Widgets.DateTimePicker.DateTimePicker : Gtk.Popover {
236238

237239
private Adw.NavigationPage build_calendar_page () {
238240
var back_item = new Widgets.ContextMenu.MenuItem (_("Back"), "go-previous-symbolic");
241+
back_item.autohide_popover = false;
239242

240243
calendar_view = new Widgets.Calendar.Calendar ();
241244

@@ -267,14 +270,16 @@ public class Widgets.DateTimePicker.DateTimePicker : Gtk.Popover {
267270

268271
private Adw.NavigationPage build_repeat_page () {
269272
var back_item = new Widgets.ContextMenu.MenuItem (_("Back"), "go-previous-symbolic");
270-
273+
back_item.autohide_popover = false;
274+
271275
var none_item = new Widgets.ContextMenu.MenuItem (_("None"));
272276
var daily_item = new Widgets.ContextMenu.MenuItem (_("Daily"));
273277
var weekly_item = new Widgets.ContextMenu.MenuItem (_("Weekly"));
274278
var monthly_item = new Widgets.ContextMenu.MenuItem (_("Monthly"));
275279
var yearly_item = new Widgets.ContextMenu.MenuItem (_("Yearly"));
276280
var custom_item = new Widgets.ContextMenu.MenuItem (_("Custom"));
277281
custom_item.arrow = true;
282+
custom_item.autohide_popover = false;
278283

279284
var menu_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
280285
menu_box.margin_top = menu_box.margin_bottom = 3;

core/Widgets/DateTimePicker/RepeatConfig.vala

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public class Widgets.DateTimePicker.RepeatConfig : Adw.NavigationPage {
9797

9898
construct {
9999
var back_item = new Widgets.ContextMenu.MenuItem (_("Back"), "go-previous-symbolic");
100+
back_item.autohide_popover = false;
100101

101102
repeat_label = new Gtk.Label (null) {
102103
margin_top = 9,

core/Widgets/ReminderPicker/ReminderPicker.vala

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public class Widgets.ReminderPicker.ReminderPicker : Gtk.Popover {
142142

143143
private Gtk.Widget get_picker () {
144144
var back_item = new Widgets.ContextMenu.MenuItem (_("Back"), "go-previous-symbolic");
145+
back_item.autohide_popover = false;
145146

146147
calendar = new Widgets.Calendar.Calendar () {
147148
vexpand = true,

0 commit comments

Comments
 (0)