mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
Merge pull request #26496 from romildo/fix.lxappearance
lxappearance: add variant for Gtk+-3
This commit is contained in:
commit
ea7aa3156c
3 changed files with 37 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, intltool, pkgconfig, libX11, gtk2 }:
|
||||
{ stdenv, fetchurl, intltool, pkgconfig, libX11, gtk2, withGtk3 ? false, gtk3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "lxappearance-0.6.3";
|
||||
|
@ -10,7 +10,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ pkgconfig intltool ];
|
||||
|
||||
buildInputs = [ libX11 gtk2 ];
|
||||
buildInputs = [ libX11 (if withGtk3 then gtk3 else gtk2) ];
|
||||
|
||||
patches = [ ./lxappearance-0.6.3-xdg.system.data.dirs.patch ];
|
||||
|
||||
configureFlags = stdenv.lib.optional withGtk3 "--enable-gtk3";
|
||||
|
||||
meta = {
|
||||
description = "A lightweight program for configuring the theme and fonts of gtk applications";
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
--- lxappearance-0.6.3/src/widget-theme.c.orig 2016-02-20 20:48:38.000000000 -0200
|
||||
+++ lxappearance-0.6.3/src/widget-theme.c 2017-06-09 17:37:53.369555085 -0300
|
||||
@@ -66,6 +66,7 @@
|
||||
static void load_themes()
|
||||
{
|
||||
char* dir;
|
||||
+ const gchar * const * dirs;
|
||||
GSList* themes = NULL, *l;
|
||||
GtkTreeIter sel_it = {0};
|
||||
GtkTreeSelection* tree_sel;
|
||||
@@ -85,6 +86,16 @@
|
||||
themes = load_themes_in_dir(dir, themes);
|
||||
g_free(dir);
|
||||
|
||||
+ /* load from sharedata theme dirs */
|
||||
+ dirs = g_get_system_data_dirs();
|
||||
+ while (*dirs != NULL)
|
||||
+ {
|
||||
+ dir = g_build_filename(*dirs, "themes", NULL);
|
||||
+ themes = load_themes_in_dir(dir, themes);
|
||||
+ g_free(dir);
|
||||
+ dirs++;
|
||||
+ }
|
||||
+
|
||||
themes = g_slist_sort(themes, (GCompareFunc)strcmp);
|
||||
for(l = themes; l; l=l->next)
|
||||
{
|
|
@ -6055,6 +6055,10 @@ with pkgs;
|
|||
gtk2 = gtk2-x11;
|
||||
};
|
||||
|
||||
lxappearance-gtk3 = callPackage ../desktops/lxde/core/lxappearance {
|
||||
withGtk3 = true;
|
||||
};
|
||||
|
||||
lxmenu-data = callPackage ../desktops/lxde/core/lxmenu-data.nix { };
|
||||
|
||||
lxpanel = callPackage ../desktops/lxde/core/lxpanel {
|
||||
|
|
Loading…
Reference in a new issue