lol

pantheon.epiphany: init

+101 -2
+76
pkgs/desktops/gnome/core/epiphany/dark-style.patch
··· 1 + diff --git a/meson.build b/meson.build 2 + index de9cbfa850..647f617605 100644 3 + --- a/meson.build 4 + +++ b/meson.build 5 + @@ -92,6 +92,7 @@ iso_codes_dep = dependency('iso-codes', version: '>= 0.35') 6 + json_glib_dep = dependency('json-glib-1.0', version: '>= 1.6') 7 + libarchive_dep = dependency('libarchive') 8 + libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.37.1') 9 + +libgranite_dep = dependency('granite', version: '>= 6.0.0') 10 + libhandy_dep = dependency('libhandy-1', version: '>= 1.1.0') 11 + libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0') 12 + libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0') 13 + diff --git a/src/ephy-shell.c b/src/ephy-shell.c 14 + index 650531da86..b9d1355e86 100644 15 + --- a/src/ephy-shell.c 16 + +++ b/src/ephy-shell.c 17 + @@ -50,6 +50,7 @@ 18 + 19 + #include <glib/gi18n.h> 20 + #include <gtk/gtk.h> 21 + +#include <granite.h> 22 + #include <handy.h> 23 + 24 + struct _EphyShell { 25 + @@ -483,6 +484,20 @@ run_in_background_set_mapping (const GValue *value, 26 + return g_variant_new_boolean (g_variant_get_boolean (var)); 27 + } 28 + 29 + +static void 30 + +ephy_shell_set_prefers_color_scheme (EphyShell *shell) 31 + +{ 32 + + GtkSettings* gtk_settings = gtk_settings_get_default (); 33 + + GraniteSettings* granite_settings = granite_settings_get_default (); 34 + + 35 + + g_object_set ( 36 + + gtk_settings, 37 + + "gtk-application-prefer-dark-theme", 38 + + granite_settings_get_prefers_color_scheme (granite_settings) == GRANITE_SETTINGS_COLOR_SCHEME_DARK, 39 + + NULL 40 + + ); 41 + +} 42 + + 43 + static void 44 + ephy_shell_startup (GApplication *application) 45 + { 46 + @@ -490,11 +505,18 @@ ephy_shell_startup (GApplication *application) 47 + EphyShell *shell = EPHY_SHELL (application); 48 + EphyEmbedShellMode mode; 49 + GAction *action; 50 + + GraniteSettings* granite_settings = granite_settings_get_default (); 51 + 52 + G_APPLICATION_CLASS (ephy_shell_parent_class)->startup (application); 53 + 54 + hdy_init (); 55 + 56 + + ephy_shell_set_prefers_color_scheme (shell); 57 + + 58 + + g_signal_connect (granite_settings, "notify::prefers-color-scheme", 59 + + G_CALLBACK (ephy_shell_set_prefers_color_scheme), shell 60 + + ); 61 + + 62 + /* If we are under Pantheon set the icon-theme and cursor-theme accordingly. */ 63 + if (is_desktop_pantheon ()) { 64 + GtkSettings *settings = gtk_settings_get_default (); 65 + diff --git a/src/meson.build b/src/meson.build 66 + index 5bf3eb92ec..d17b1b6d93 100644 67 + --- a/src/meson.build 68 + +++ b/src/meson.build 69 + @@ -74,6 +74,7 @@ libephymain_deps = [ 70 + gdk_dep, 71 + gvdb_dep, 72 + libarchive_dep, 73 + + libgranite_dep, 74 + libhandy_dep 75 + ] 76 +
+11 -2
pkgs/desktops/gnome/core/epiphany/default.nix
··· 9 9 , icu 10 10 , wrapGAppsHook 11 11 , gnome 12 + , pantheon 12 13 , libportal 13 14 , libxml2 14 15 , libxslt ··· 33 34 , libdazzle 34 35 , libhandy 35 36 , buildPackages 37 + , withPantheon ? false 36 38 }: 37 39 38 40 stdenv.mkDerivation rec { ··· 44 46 sha256 = "2tE4ufLVXeJxEo/KOLYfU/2YDFh9KeG6a1CP/zsZ9WQ="; 45 47 }; 46 48 49 + patches = lib.optionals withPantheon [ 50 + # https://github.com/elementary/browser 51 + # FIXME: Update the patches when https://github.com/elementary/browser/pull/41 merged 52 + ./dark-style.patch 53 + ./navigation-buttons.patch 54 + ]; 55 + 47 56 nativeBuildInputs = [ 48 57 desktop-file-utils 49 58 gettext ··· 87 96 p11-kit 88 97 sqlite 89 98 webkitgtk 90 - ]; 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 - maintainers = teams.gnome.members; 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 + diff --git a/src/resources/gtk/action-bar-start.ui b/src/resources/gtk/action-bar-start.ui 2 + index e604b9601f..2bfe244d53 100644 3 + --- a/src/resources/gtk/action-bar-start.ui 4 + +++ b/src/resources/gtk/action-bar-start.ui 5 + @@ -7,7 +7,6 @@ 6 + <property name="visible">True</property> 7 + <property name="orientation">horizontal</property> 8 + <style> 9 + - <class name="linked"/> 10 + <class name="navigation-box"/> 11 + </style> 12 + <child>
+2
pkgs/desktops/pantheon/default.nix
··· 69 69 70 70 elementary-videos = callPackage ./apps/elementary-videos { }; 71 71 72 + epiphany = pkgs.epiphany.override { withPantheon = true; }; 73 + 72 74 sideload = callPackage ./apps/sideload { }; 73 75 74 76 #### DESKTOP