tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
pantheon.epiphany: init
Bobby Rong
4 years ago
fee747f5
dc5ea090
+101
-2
4 changed files
expand all
collapse all
unified
split
pkgs
desktops
gnome
core
epiphany
dark-style.patch
default.nix
navigation-buttons.patch
pantheon
default.nix
+76
pkgs/desktops/gnome/core/epiphany/dark-style.patch
···
1
1
+
diff --git a/meson.build b/meson.build
2
2
+
index de9cbfa850..647f617605 100644
3
3
+
--- a/meson.build
4
4
+
+++ b/meson.build
5
5
+
@@ -92,6 +92,7 @@ iso_codes_dep = dependency('iso-codes', version: '>= 0.35')
6
6
+
json_glib_dep = dependency('json-glib-1.0', version: '>= 1.6')
7
7
+
libarchive_dep = dependency('libarchive')
8
8
+
libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.37.1')
9
9
+
+libgranite_dep = dependency('granite', version: '>= 6.0.0')
10
10
+
libhandy_dep = dependency('libhandy-1', version: '>= 1.1.0')
11
11
+
libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0')
12
12
+
libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0')
13
13
+
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
14
14
+
index 650531da86..b9d1355e86 100644
15
15
+
--- a/src/ephy-shell.c
16
16
+
+++ b/src/ephy-shell.c
17
17
+
@@ -50,6 +50,7 @@
18
18
+
19
19
+
#include <glib/gi18n.h>
20
20
+
#include <gtk/gtk.h>
21
21
+
+#include <granite.h>
22
22
+
#include <handy.h>
23
23
+
24
24
+
struct _EphyShell {
25
25
+
@@ -483,6 +484,20 @@ run_in_background_set_mapping (const GValue *value,
26
26
+
return g_variant_new_boolean (g_variant_get_boolean (var));
27
27
+
}
28
28
+
29
29
+
+static void
30
30
+
+ephy_shell_set_prefers_color_scheme (EphyShell *shell)
31
31
+
+{
32
32
+
+ GtkSettings* gtk_settings = gtk_settings_get_default ();
33
33
+
+ GraniteSettings* granite_settings = granite_settings_get_default ();
34
34
+
+
35
35
+
+ g_object_set (
36
36
+
+ gtk_settings,
37
37
+
+ "gtk-application-prefer-dark-theme",
38
38
+
+ granite_settings_get_prefers_color_scheme (granite_settings) == GRANITE_SETTINGS_COLOR_SCHEME_DARK,
39
39
+
+ NULL
40
40
+
+ );
41
41
+
+}
42
42
+
+
43
43
+
static void
44
44
+
ephy_shell_startup (GApplication *application)
45
45
+
{
46
46
+
@@ -490,11 +505,18 @@ ephy_shell_startup (GApplication *application)
47
47
+
EphyShell *shell = EPHY_SHELL (application);
48
48
+
EphyEmbedShellMode mode;
49
49
+
GAction *action;
50
50
+
+ GraniteSettings* granite_settings = granite_settings_get_default ();
51
51
+
52
52
+
G_APPLICATION_CLASS (ephy_shell_parent_class)->startup (application);
53
53
+
54
54
+
hdy_init ();
55
55
+
56
56
+
+ ephy_shell_set_prefers_color_scheme (shell);
57
57
+
+
58
58
+
+ g_signal_connect (granite_settings, "notify::prefers-color-scheme",
59
59
+
+ G_CALLBACK (ephy_shell_set_prefers_color_scheme), shell
60
60
+
+ );
61
61
+
+
62
62
+
/* If we are under Pantheon set the icon-theme and cursor-theme accordingly. */
63
63
+
if (is_desktop_pantheon ()) {
64
64
+
GtkSettings *settings = gtk_settings_get_default ();
65
65
+
diff --git a/src/meson.build b/src/meson.build
66
66
+
index 5bf3eb92ec..d17b1b6d93 100644
67
67
+
--- a/src/meson.build
68
68
+
+++ b/src/meson.build
69
69
+
@@ -74,6 +74,7 @@ libephymain_deps = [
70
70
+
gdk_dep,
71
71
+
gvdb_dep,
72
72
+
libarchive_dep,
73
73
+
+ libgranite_dep,
74
74
+
libhandy_dep
75
75
+
]
76
76
+
+11
-2
pkgs/desktops/gnome/core/epiphany/default.nix
···
9
9
, icu
10
10
, wrapGAppsHook
11
11
, gnome
12
12
+
, pantheon
12
13
, libportal
13
14
, libxml2
14
15
, libxslt
···
33
34
, libdazzle
34
35
, libhandy
35
36
, buildPackages
37
37
+
, withPantheon ? false
36
38
}:
37
39
38
40
stdenv.mkDerivation rec {
···
44
46
sha256 = "2tE4ufLVXeJxEo/KOLYfU/2YDFh9KeG6a1CP/zsZ9WQ=";
45
47
};
46
48
49
49
+
patches = lib.optionals withPantheon [
50
50
+
# https://github.com/elementary/browser
51
51
+
# FIXME: Update the patches when https://github.com/elementary/browser/pull/41 merged
52
52
+
./dark-style.patch
53
53
+
./navigation-buttons.patch
54
54
+
];
55
55
+
47
56
nativeBuildInputs = [
48
57
desktop-file-utils
49
58
gettext
···
87
96
p11-kit
88
97
sqlite
89
98
webkitgtk
90
90
-
];
99
99
+
] ++ lib.optional withPantheon pantheon.granite;
91
100
92
101
# Tests need an X display
93
102
mesonFlags = [
···
108
117
meta = with lib; {
109
118
homepage = "https://wiki.gnome.org/Apps/Epiphany";
110
119
description = "WebKit based web browser for GNOME";
111
111
-
maintainers = teams.gnome.members;
120
120
+
maintainers = teams.gnome.members ++ teams.pantheon.members;
112
121
license = licenses.gpl3Plus;
113
122
platforms = platforms.linux;
114
123
};
+12
pkgs/desktops/gnome/core/epiphany/navigation-buttons.patch
···
1
1
+
diff --git a/src/resources/gtk/action-bar-start.ui b/src/resources/gtk/action-bar-start.ui
2
2
+
index e604b9601f..2bfe244d53 100644
3
3
+
--- a/src/resources/gtk/action-bar-start.ui
4
4
+
+++ b/src/resources/gtk/action-bar-start.ui
5
5
+
@@ -7,7 +7,6 @@
6
6
+
<property name="visible">True</property>
7
7
+
<property name="orientation">horizontal</property>
8
8
+
<style>
9
9
+
- <class name="linked"/>
10
10
+
<class name="navigation-box"/>
11
11
+
</style>
12
12
+
<child>
+2
pkgs/desktops/pantheon/default.nix
···
69
69
70
70
elementary-videos = callPackage ./apps/elementary-videos { };
71
71
72
72
+
epiphany = pkgs.epiphany.override { withPantheon = true; };
73
73
+
72
74
sideload = callPackage ./apps/sideload { };
73
75
74
76
#### DESKTOP