Skip to content

Commit f39ff66

Browse files
authored
Update Preferences.vala
1 parent 6afe4ed commit f39ff66

File tree

1 file changed

+64
-24
lines changed

1 file changed

+64
-24
lines changed

src/Preferences.vala

Lines changed: 64 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -171,52 +171,92 @@ namespace jorts {
171171
/*************************************************/
172172

173173

174-
var link = Granite.SettingsUri.PERMISSIONS ;
175-
var linkname = _("Permissions") ;
176174

177175
string desktop_environment = Environment.get_variable ("XDG_CURRENT_DESKTOP");
178176
print(desktop_environment + " detected!");
179177

180-
/*
181178
// Show only in Pantheon because others do not have an autostart panel
182179
if (desktop_environment == "Pantheon") {
183-
180+
184181
var link = Granite.SettingsUri.PERMISSIONS ;
185182
var linkname = _("Permissions") ;
186183

184+
var permissions_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
185+
var permissions_link = new Gtk.LinkButton.with_label (
186+
link,
187+
linkname
188+
);
189+
190+
// _("Applications → Permissions")
191+
permissions_link.tooltip_text = link;
192+
permissions_link.halign = Gtk.Align.END;
193+
194+
var permissions_label = new Granite.HeaderLabel (_("Allow to start at login")) {
195+
mnemonic_widget = permissions_link,
196+
secondary_text = _("You can set the sticky notes to appear when you log in by adding Jorts to autostart")
197+
};
198+
permissions_label.set_hexpand (true);
199+
200+
permissions_box.append (permissions_label);
201+
permissions_box.append (permissions_link);
202+
settingsbox.append(permissions_box);
203+
187204
// Show only in Windows
188205
} else if (desktop_environment == "Windows") {
189206

190207
var link = "https://support.microsoft.com/en-gb/windows/configure-startup-applications-in-windows-115a420a-0bff-4a6f-90e0-1934c844e473" ;
191208
var linkname = _("Microsoft support") ;
209+
210+
var permissions_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
211+
var permissions_link = new Gtk.LinkButton.with_label (
212+
link,
213+
linkname
214+
);
215+
216+
// _("Applications → Permissions")
217+
permissions_link.tooltip_text = link;
218+
permissions_link.halign = Gtk.Align.END;
219+
220+
var permissions_label = new Granite.HeaderLabel (_("Allow to start at login")) {
221+
mnemonic_widget = permissions_link,
222+
secondary_text = _("You can set the sticky notes to appear when you log in by adding Jorts to autostart")
223+
};
224+
permissions_label.set_hexpand (true);
225+
226+
permissions_box.append (permissions_label);
227+
permissions_box.append (permissions_link);
228+
settingsbox.append(permissions_box);
192229

193230
// show in all other DE
194231
} else {
195232

196233
var link = "https://flathub.org/apps/search?q=autostart" ;
197234
var linkname = _("Autostart apps in flathub") ;
198235

236+
var permissions_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
237+
var permissions_link = new Gtk.LinkButton.with_label (
238+
link,
239+
linkname
240+
);
241+
242+
// _("Applications → Permissions")
243+
permissions_link.tooltip_text = link;
244+
permissions_link.halign = Gtk.Align.END;
245+
246+
var permissions_label = new Granite.HeaderLabel (_("Allow to start at login")) {
247+
mnemonic_widget = permissions_link,
248+
secondary_text = _("You can set the sticky notes to appear when you log in by adding Jorts to autostart")
249+
};
250+
permissions_label.set_hexpand (true);
251+
252+
permissions_box.append (permissions_label);
253+
permissions_box.append (permissions_link);
254+
settingsbox.append(permissions_box);
255+
199256
}
200-
*/
201-
var permissions_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
202-
var permissions_link = new Gtk.LinkButton.with_label (
203-
link,
204-
linkname
205-
);
206-
207-
// _("Applications → Permissions")
208-
permissions_link.tooltip_text = link;
209-
permissions_link.halign = Gtk.Align.END;
210-
211-
var permissions_label = new Granite.HeaderLabel (_("Allow to start at login")) {
212-
mnemonic_widget = permissions_link,
213-
secondary_text = _("You can set the sticky notes to appear when you log in by adding Jorts to autostart")
214-
};
215-
permissions_label.set_hexpand (true);
216-
217-
permissions_box.append (permissions_label);
218-
permissions_box.append (permissions_link);
219-
settingsbox.append(permissions_box);
257+
258+
259+
220260

221261

222262
/*************************************************/

0 commit comments

Comments
 (0)