Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
24a9dc2
Port to GTK4
treppenwitz03 May 26, 2022
b8061f7
Merge branch 'master' into gtk4
treppenwitz03 Jun 4, 2022
ad6137a
Update meson
treppenwitz03 Jun 5, 2022
e817c47
Fix crash
treppenwitz03 Jun 10, 2022
8bf9ccf
Fix Appearance Page
treppenwitz03 Jun 10, 2022
0f9c46a
Fix DND
treppenwitz03 Jun 10, 2022
b8f8d97
Fix hang
treppenwitz03 Jun 10, 2022
8364b70
Merge branch 'master' into gtk4
treppenwitz03 Jun 10, 2022
4dfb538
Fix regressions
treppenwitz03 Jun 10, 2022
0170b5d
Draft Gnome.RRScreen replacement
treppenwitz03 Jun 10, 2022
51956db
Fix CI
treppenwitz03 Jun 11, 2022
1e84d2d
Fix CI
treppenwitz03 Jun 12, 2022
97055d5
Bump libs
danirabbit Jun 14, 2022
19afeb3
Fix wallpaper thumbs
danirabbit Jun 14, 2022
e08b652
Merge branch 'master' into gtk4
treppenwitz03 Jun 15, 2022
8f1e866
Update dock
treppenwitz03 Jun 21, 2022
d182f85
Merge branch 'master' into gtk4
treppenwitz03 Jul 2, 2022
f35fe44
Fix regressions
treppenwitz03 Jul 2, 2022
59f796d
Merge branch 'master' into gtk4
treppenwitz03 Jul 9, 2022
c75a4a7
Use Clamp
treppenwitz03 Jul 9, 2022
e067671
Merge branch 'master' into gtk4
treppenwitz03 Jul 31, 2022
f02261c
Merge branch 'master' into gtk4
treppenwitz03 Aug 5, 2022
1b3f3d4
Unsupport preview
treppenwitz03 Aug 5, 2022
8b27523
Simplify getting display names
treppenwitz03 Aug 5, 2022
3ac88a7
Merge branch 'master' into gtk4
Aug 8, 2022
79019ee
Merge branch 'master' into gtk4
Aug 9, 2022
61423de
Fix Dock.vala compilation
Aug 9, 2022
83e56d8
Merge branch 'master' into gtk4
lenemter Aug 11, 2022
9c5e187
Merge branch 'master' into gtk4
lenemter Aug 11, 2022
8e07bee
Fix lint
lenemter Aug 11, 2022
db6adb2
Fix solid color container
lenemter Aug 11, 2022
20ce586
Wallpapers cleanup, improvements and fixes
lenemter Aug 11, 2022
db8cef7
Remove toast before destoying
lenemter Aug 11, 2022
3711378
Fix keyboard style changing
lenemter Aug 11, 2022
7192f8c
Style dock size check buttons
lenemter Aug 11, 2022
abdaafc
Fix auto accent color
lenemter Aug 11, 2022
034f527
Fix size_group
lenemter Aug 11, 2022
2d50a68
Merge branch 'master' into gtk4
Aug 12, 2022
172f26c
Merge branch 'master' into gtk4
lenemter Aug 13, 2022
d0ea746
Use CheckButton as selection check
lenemter Aug 24, 2022
06aa6da
Merge branch 'master' into gtk4
lenemter Aug 24, 2022
112230f
Remove word
lenemter Aug 24, 2022
980cae5
"Fix" wallpaper popover
lenemter Aug 24, 2022
cc4bebc
Merge branch 'master' into gtk4
lenemter Aug 24, 2022
8c4b3c3
Silence some terminal warnings re css parsing (#332)
Aug 28, 2022
81d9fa3
Wallpapers: dont keep aspect ratio, add spacing
lenemter Aug 28, 2022
edf706a
Clean up wallpapers
lenemter Aug 28, 2022
b7c52da
Fix FileChooser title
lenemter Aug 28, 2022
57e868c
Merge branch 'master' into gtk4
lenemter Aug 29, 2022
368cb36
Merge branch 'master' into gtk4
lenemter Aug 30, 2022
b9a710d
Add libadwaita-1-dev to dependencies
lenemter Sep 3, 2022
a5c7342
Refactor wallpaper view (#335)
lenemter Sep 9, 2022
d656687
Fix undo toast
lenemter Sep 23, 2022
fc546ec
Use box instead of grid
lenemter Sep 23, 2022
782651a
Merge branch 'master' into gtk4
lenemter Sep 23, 2022
3b9c8dd
Merge branch 'master' into gtk4
lenemter Dec 2, 2022
358168a
Fix popover styling
lenemter Dec 2, 2022
f0b6ef4
Fix popover position
lenemter Dec 2, 2022
6019385
Merge branch 'master' into gtk4
lenemter Mar 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y libgnome-desktop-3-dev libgranite-dev libgtk-3-dev libplank-dev libswitchboard-2.0-dev libgexiv2-dev meson valac
apt install -y libgranite-7-dev libgtk-4-dev libadwaita-1-dev libswitchboard-3-dev libgexiv2-dev meson valac
- name: Build
env:
DESTDIR: out
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
You'll need the following dependencies:

* gnome-settings-daemon-dev
* libswitchboard-2.0-dev
* libgnome-desktop-3-dev
* libswitchboard-3-dev
* libgee-0.8-dev
* libgexiv2-dev
* libgtk-3-dev (>= 3.22)
* libplank-dev
* libgranite-dev
* libgtk-4-dev
* libgranite-7-dev
* meson
* valac

Expand Down
21 changes: 20 additions & 1 deletion data/Check.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
radio {
/*
* Copyright 2022 elementary, Inc. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/

check {
min-height: 20px;
min-width: 20px;
-gtk-icon-transform: scale(0.6);
Expand Down
22 changes: 22 additions & 0 deletions data/RemoveButton.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2022 elementary, Inc. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/

.remove-button {
transition: background-color 0s;
}
46 changes: 46 additions & 0 deletions data/appearance-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2020 elementary, Inc. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/

checkbutton .card {
background-position: center;
background-repeat: no-repeat;
background-size: 112px 80px, cover;
min-width: 112px;
min-height: 80px;
}

checkbutton .card.prefer-default {
background-image:
url("resource:///io/elementary/switchboard/plug/pantheon-shell/appearance-default.svg"),
linear-gradient(
to bottom,
alpha(@accent_color_300, 0.1),
alpha(@accent_color_500, 0.1)
);
}

checkbutton .card.prefer-dark {
background-image:
url("resource:///io/elementary/switchboard/plug/pantheon-shell/appearance-dark.svg"),
linear-gradient(
to bottom,
alpha(@accent_color_300, 0.1),
alpha(@accent_color_500, 0.1)
);
}
2 changes: 2 additions & 0 deletions data/icons.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<file alias="appearance-default.svg" compressed="true" preprocess="xml-stripblanks">appearance-default.svg</file>
<file alias="appearance-dark.svg" compressed="true" preprocess="xml-stripblanks">appearance-dark.svg</file>
<file compressed="true">Check.css</file>
<file compressed="true">RemoveButton.css</file>
<file alias="plug.css" compressed="true">plug.css</file>
<file alias="appearance-styles.css" compressed="true">appearance-styles.css</file>
</gresource>
</gresources>
22 changes: 11 additions & 11 deletions data/plug.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
),
linear-gradient(
to bottom,
alpha (@accent_color_500, 0.1),
alpha (@accent_color_500, 0.1)
alpha(@accent_color_500, 0.1),
alpha(@accent_color_500, 0.1)
);
background-repeat: no-repeat;
background-size: 48px 48px, cover;
Expand Down Expand Up @@ -58,29 +58,29 @@
}

.wallpaper-container .card {
border-radius: 1px;
border: none;
margin: 9px;
min-height: 128px;
}

.wallpaper-container .card:checked {
box-shadow:
0 0 0 4px alpha (@text_color, 0.2),
0 0 0 1px alpha (#000, 0.05),
0 3px 3px alpha (#000, 0.22);
0 0 0 4px alpha(@text_color, 0.2),
0 0 0 1px alpha(#000, 0.05),
0 3px 3px alpha(#000, 0.22);
}

.wallpaper-container:focus .card {
box-shadow:
0 0 0 4px @accent_color,
0 0 0 1px alpha (#000, 0.05),
0 3px 3px alpha (#000, 0.22);
0 0 0 1px alpha(#000, 0.05),
0 3px 3px alpha(#000, 0.22);
}

radiobutton .card {
background-image:
linear-gradient(
to bottom,
alpha (@accent_color_300, 0.1),
alpha (@accent_color_500, 0.1)
alpha(@accent_color_300, 0.1),
alpha(@accent_color_500, 0.1)
);
}
8 changes: 4 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ add_project_arguments(
gio_dep = dependency('gio-2.0')
glib_dep = dependency('glib-2.0')
gobject_dep = dependency('gobject-2.0')
granite_dep = dependency('granite', version: '>=6.0.0')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.22')
hdy_dep = dependency ('libhandy-1')
plank_dep = dependency('plank', version: '>=0.10.9')

granite_dep = dependency('granite-7')
gtk_dep = dependency('gtk4')
adw_dep = dependency ('libadwaita-1')
posix_dep = meson.get_compiler('vala').find_library('posix')

plug_resources = gnome.compile_resources(
Expand Down
6 changes: 4 additions & 2 deletions po/POTFILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
src/IOHelper.vala
src/Plug.vala
src/ThumbnailGenerator.vala
src/Translations.vala
Expand All @@ -7,6 +6,9 @@ src/Views/Dock.vala
src/Views/Multitasking.vala
src/Views/Text.vala
src/Views/Wallpaper.vala
src/Widgets/GenericContainer.vala
src/Widgets/ImageContainer.vala
src/Widgets/SolidColorContainer.vala
src/Widgets/WallpaperContainer.vala
src/Widgets/UriContainer.vala
src/Widgets/XMLContainer.vala
set-wallpaper-contract/set-wallpaper.vala
24 changes: 14 additions & 10 deletions set-wallpaper-contract/set-wallpaper.vala
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ namespace SetWallpaperContractor {
}

public static int main (string[] args) {
Gtk.init (ref args);

AccountsServiceUser? accounts_service = null;
try {
Expand Down Expand Up @@ -238,20 +237,25 @@ namespace SetWallpaperContractor {
};
dialog.add_button (_("Create Slideshow"), Gtk.ResponseType.OK);
dialog.set_default_response (Gtk.ResponseType.OK);
dialog.custom_bin.add (duration);
dialog.show_all ();
dialog.custom_bin.append (duration);
dialog.present ();

delay_value_changed (duration, dialog.secondary_label);
duration.value_changed.connect (() => delay_value_changed (duration, dialog.secondary_label));

if (dialog.run () == Gtk.ResponseType.OK) {
dialog.destroy ();
int return_val = 1;
dialog.response.connect ((id) => {
if (id == Gtk.ResponseType.OK) {
dialog.destroy ();

var path = folder.get_child (SLIDESHOW_FILENAME).get_path ();
update_slideshow (path, files, delay_value);
return 0;
}
var path = folder.get_child (SLIDESHOW_FILENAME).get_path ();
update_slideshow (path, files, delay_value);
return_val = 0;
} else {
return_val = 1;
}
});

return 1;
return return_val;
}
}
1 change: 0 additions & 1 deletion src/Config.vala.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
namespace Constants {
public const string PLANKDATADIR = "@PLANKDATADIR@";
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
public const string LOCALEDIR = "@LOCALEDIR@";
}
42 changes: 0 additions & 42 deletions src/IOHelper.vala

This file was deleted.

40 changes: 25 additions & 15 deletions src/Plug.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

public class PantheonShell.Plug : Switchboard.Plug {
private Gtk.Stack stack;
private Gtk.Grid main_grid;
private Gtk.Box main_box;

private Wallpaper wallpaper_view;

Expand All @@ -38,7 +38,7 @@ public class PantheonShell.Plug : Switchboard.Plug {

var provider = new Gtk.CssProvider ();
provider.load_from_resource ("/io/elementary/switchboard/plug/pantheon-shell/plug.css");
Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);

// DEPRECATED
settings.set ("desktop/wallpaper", "wallpaper");
Expand All @@ -53,10 +53,10 @@ public class PantheonShell.Plug : Switchboard.Plug {
}

public override Gtk.Widget get_widget () {
if (main_grid == null) {
main_grid = new Gtk.Grid ();
if (main_box == null) {
main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);

wallpaper_view = new Wallpaper (this);
wallpaper_view = new Wallpaper ();

var multitasking = new Multitasking ();
var appearance = new Appearance ();
Expand All @@ -74,22 +74,32 @@ public class PantheonShell.Plug : Switchboard.Plug {

stack.add_titled (multitasking, "multitasking", _("Multitasking"));

var stack_switcher = new Gtk.StackSwitcher ();
stack_switcher.stack = stack;
stack_switcher.halign = Gtk.Align.CENTER;
stack_switcher.homogeneous = true;
stack_switcher.margin = 24;
var stack_switcher = new Gtk.StackSwitcher () {
stack = stack,
halign = Gtk.Align.CENTER,
margin_start = 24,
margin_end = 24,
margin_top = 24,
margin_bottom = 24
};

var size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
var switcher_toggles = stack_switcher.observe_children ();
if (size_group.get_widgets ().length () == 0) {
for (var index = 0; index < switcher_toggles.get_n_items (); index++) {
size_group.add_widget ((Gtk.ToggleButton) switcher_toggles.get_item (index));
}
}

main_grid.attach (stack_switcher, 0, 0, 1, 1);
main_grid.attach (stack, 0, 1, 1, 1);
main_grid.show_all ();
main_box.append (stack_switcher);
main_box.append (stack);
}

return main_grid;
return main_box;
}

public override void shown () {
wallpaper_view.update_wallpaper_folder ();
wallpaper_view.load_wallpapers ();
}

public override void hidden () {
Expand Down
Loading