diff options
author | Ted Alff | 2020-08-02 15:09:28 -0400 |
---|---|---|
committer | Ted Alff | 2020-08-02 15:09:28 -0400 |
commit | 9f33f5c8f522970244b443d75e594f05a50997d8 (patch) | |
tree | 70d78c3192916a0375979b734ccebaab31144370 | |
parent | ce77573f333f99f23f96666a300604d95e195def (diff) | |
download | aur-9f33f5c8f522970244b443d75e594f05a50997d8.tar.gz |
Version bump to 0.6 (at current fixed git commit plus xuzhen's fixes for background color until a release is tagged).
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | fixes.patch | 222 | ||||
-rw-r--r-- | vala0.48fix.patch | 12 |
4 files changed, 256 insertions, 52 deletions
@@ -1,26 +1,21 @@ pkgbase = xfce4-dockbarx-plugin pkgdesc = Embed DockbarX in the xfce4-panel - pkgver = 0.5 - pkgrel = 4 - url = https://github.com/TiZ-EX1/xfce4-dockbarx-plugin + pkgver = 0.6+r62+f7585b5 + pkgrel = 1 + url = https://github.com/m7s/xfce4-dockbarx-plugin arch = i686 arch = x86_64 - arch = aarch64 arch = armv7h + arch = aarch64 license = X11 - makedepends = python2 makedepends = git makedepends = vala - depends = dockbarx>=0.91 - depends = xfce4-panel<4.15.0 - conflicts = xfce4-dockbarx-plugin-git - conflicts = dockbarx-gtk3-git - source = xfce4-dockbarx-plugin::git+https://github.com/TiZ-EX1/xfce4-dockbarx-plugin#commit=cf16d6f415d03828e7a702550a0552ed5ea7ce0c - source = pref_dialog_fix.patch::https://github.com/TiZ-EX1/xfce4-dockbarx-plugin/commit/960ed3806d00b33b6a254fb583b366177ba56b77.patch - source = vala0.48fix.patch + depends = dockbarx>=1.0beta + depends = xfce4-panel>=4.12 + source = xfce4-dockbarx-plugin::git+https://github.com/M7S/xfce4-dockbarx-plugin#commit=f7585b53792fc9945be6a8f95a08aed8663b1b04 + source = fixes.patch sha256sums = SKIP - sha256sums = 04892f2eb8413a79288b234ed61af588a66f70553a9db9272d8f1d7904ad1dfa - sha256sums = 4b6c29fe052d6e890fbb67c5622728569a630bb6128c5b033039c5d00b22994d + sha256sums = 8f529817c1de28dc4ef2047254863d446f6c83a0120f90af9eac3f1524179f31 pkgname = xfce4-dockbarx-plugin @@ -1,42 +1,41 @@ # Contributor: twa022 <twa022 at gmail dot com> pkgname=xfce4-dockbarx-plugin -pkgver=0.5 -pkgrel=4 +_pkgver=0.6 +pkgver=0.6+r62+f7585b5 +pkgrel=1 pkgdesc="Embed DockbarX in the xfce4-panel" -arch=('i686' 'x86_64' 'aarch64' 'armv7h') -url="https://github.com/TiZ-EX1/xfce4-dockbarx-plugin" +arch=('i686' 'x86_64' 'armv7h' 'aarch64') +url="https://github.com/m7s/xfce4-dockbarx-plugin" license=('X11') -depends=('dockbarx>=0.91' 'xfce4-panel<4.15.0') -makedepends=('python2' 'git' 'vala') -conflicts=("${pkgname}-git" 'dockbarx-gtk3-git') # Use xfce4-dockbarx-plugin-gtk3-git to work with the GTK3 version of dockbarx - -#source=( ${pkgname}-${pkgver}.tar.gz::https://github.com/TiZ-EX1/${pkgname}/archive/v${pkgver}.tar.gz ) -#sha256sums=('c55e5231ae8b69ab10c22ab5150e47f5392b2398572e753cbcb1a147362e0ba5') -# Version 0.5 was never properly tagged, so use the commit directly -_commit='cf16d6f415d03828e7a702550a0552ed5ea7ce0c' # 1 after version bump with updated README -source=("${pkgname}::git+https://github.com/TiZ-EX1/xfce4-dockbarx-plugin#commit=${_commit}" - 'pref_dialog_fix.patch::https://github.com/TiZ-EX1/xfce4-dockbarx-plugin/commit/960ed3806d00b33b6a254fb583b366177ba56b77.patch' - 'vala0.48fix.patch') +depends=('dockbarx>=1.0beta' 'xfce4-panel>=4.12') +makedepends=('git' 'vala') +_commit='f7585b53792fc9945be6a8f95a08aed8663b1b04' +source=("${pkgname}::git+https://github.com/M7S/${pkgname}#commit=${_commit}" + 'fixes.patch') sha256sums=('SKIP' - '04892f2eb8413a79288b234ed61af588a66f70553a9db9272d8f1d7904ad1dfa' - '4b6c29fe052d6e890fbb67c5622728569a630bb6128c5b033039c5d00b22994d') + '8f529817c1de28dc4ef2047254863d446f6c83a0120f90af9eac3f1524179f31') + +pkgver() { + cd "${srcdir}/${pkgname}" + printf "%s+r%s+%s" "${_pkgver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} prepare() { - cd "${srcdir}/${pkgname}" #-${pkgver}" - patch -Np1 -i ../pref_dialog_fix.patch - patch -Np2 -r- -i ../vala0.48fix.patch + cd "${srcdir}/${pkgname}" + # Apply xuzhen's fixes for background color while waiting on pull request to be accepted + patch -Np1 -r- -i ../fixes.patch + + PREFIX=/usr python ./waf configure } build() { - cd "${srcdir}/${pkgname}" #-${pkgver}" - sed -i 's:env python$:&2:' waf wscript - PREFIX=/usr ./waf configure - ./waf build + cd "${srcdir}/${pkgname}" + python ./waf build } package() { - cd "${srcdir}/${pkgname}" #-${pkgver}" - DESTDIR="${pkgdir}" ./waf install + cd "${srcdir}/${pkgname}" + DESTDIR="${pkgdir}" python ./waf install } diff --git a/fixes.patch b/fixes.patch new file mode 100644 index 000000000000..4644185d1e92 --- /dev/null +++ b/fixes.patch @@ -0,0 +1,222 @@ +From db5051bf76aff2ac01c8f4203c63870f40f00b52 Mon Sep 17 00:00:00 2001 +From: xuzhen <xuzhen@users.noreply.github.com> +Date: Sat, 27 Jun 2020 14:46:21 +0800 +Subject: [PATCH 1/2] Remove an unnecessary requirement + +--- + wscript | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/wscript b/wscript +index 2c06b4c..3d8d464 100644 +--- a/wscript ++++ b/wscript +@@ -43,7 +43,6 @@ def configure (ctx): + ctx.load('vala') + ctx.env.append_value('CFLAGS', '-DGETTEXT_PACKAGE="gtk30"') + args = '--cflags --libs' +- ctx.find_program('dockx') + ctx.check_cfg(package = 'glib-2.0', atleast_version = '2.42', + uselib_store = 'GLIB', mandatory = True, args = args) + ctx.check_cfg(package = 'gtk+-3.0', atleast_version = '3.22', + +From aa9c974d82df99ede2c6eabf4d7b1663bfd69f42 Mon Sep 17 00:00:00 2001 +From: xuzhen <xuzhen@users.noreply.github.com> +Date: Sat, 18 Jul 2020 14:08:20 +0800 +Subject: [PATCH 2/2] fixed Gtk3 & xfce4-panel 4.14 compatibility + +--- + src/dockbarx.vala | 3 --- + src/preferences.vala | 28 +++++++++------------------- + src/xfce4-dockbarx-plug.py | 37 ++++++++++++++++++++----------------- + 3 files changed, 29 insertions(+), 39 deletions(-) + +diff --git a/src/dockbarx.vala b/src/dockbarx.vala +index 56006c1..a0cc65e 100644 +--- a/src/dockbarx.vala ++++ b/src/dockbarx.vala +@@ -35,7 +35,6 @@ public class DockbarXPlugin : PanelPlugin { + private bool starting_dbx = false; + public int bgmode { get; set; } + public string color { get; set; } +- public int alpha { get; set; } + public string image { get; set; } + public int offset { get; set; } + public int max_size { get; set; } +@@ -64,7 +63,6 @@ public class DockbarXPlugin : PanelPlugin { + + bgmode = xfc.get_int("/bgmode", 2); + color = xfc.get_string("/color", "#000"); +- alpha = xfc.get_int("/alpha", 100); + image = xfc.get_string("/image", ""); + offset = xfc.get_int("/offset", 0); + max_size = xfc.get_int("/max-size", 0); +@@ -74,7 +72,6 @@ public class DockbarXPlugin : PanelPlugin { + + Xfconf.property_bind(xfc, "/mode", typeof(int), this, "bgmode"); + Xfconf.property_bind(xfc, "/color", typeof(string), this, "color"); +- Xfconf.property_bind(xfc, "/alpha", typeof(int), this, "alpha"); + Xfconf.property_bind(xfc, "/image", typeof(string), this, "image"); + Xfconf.property_bind(xfc, "/offset", typeof(int), this, "offset"); + Xfconf.property_bind(xfc, "/max-size", typeof(int), this, "max-size"); +diff --git a/src/preferences.vala b/src/preferences.vala +index f380d66..f552585 100755 +--- a/src/preferences.vala ++++ b/src/preferences.vala +@@ -29,7 +29,6 @@ class PrefDialog : Dialog { + private RadioButton image_radio; + private RadioButton blend_radio; + private ColorButton color_button; +- private Scale alpha_scale; + private FileChooserButton image_button; + private SpinButton offset_spin; + private SpinButton max_size_spin; +@@ -40,7 +39,7 @@ class PrefDialog : Dialog { + title = "DockbarX Preferences"; + response.connect((i) => { destroy(); }); + unowned Box content = get_content_area() as Box; +- content.spacing = 12; ++ content.spacing = 12; + content.orientation = Orientation.VERTICAL; + + color_radio = new RadioButton.with_label(null, "Solid color"); +@@ -49,8 +48,6 @@ class PrefDialog : Dialog { + blend_radio = new RadioButton.with_label_from_widget( + image_radio, "Blend with panel"); + color_button = new ColorButton(); +- alpha_scale = new Scale.with_range(Orientation.HORIZONTAL, 0, 100, 1); +- alpha_scale.value_pos = PositionType.RIGHT; + image_button = new FileChooserButton("Select background image", + FileChooserAction.OPEN); + offset_spin = new SpinButton.with_range(-32767, 32767, 1); +@@ -81,25 +78,22 @@ class PrefDialog : Dialog { + var color_table = new Grid(); + color_table.set_column_spacing( 8 ); + var color_label = new Label("Color:"); +- var alpha_label = new Label("Alpha:"); + color_table.attach(color_label, 0, 0, 1, 1); +- color_table.attach(alpha_label, 0, 1, 1, 1); +- color_button.set_hexpand(false); ++ color_button.set_hexpand(true); ++ ((Gtk.ColorChooser) color_button).set_use_alpha(true); + color_table.attach(color_button, 1, 0, 1, 1); +- alpha_scale.set_hexpand(true); +- color_table.attach(alpha_scale, 1, 1, 5, 1); + color_frame.add(color_table); + + var image_table = new Grid(); + image_table.set_column_spacing( 8 ); + var image_label = new Label("Image:"); + var offset_label = new Label("Offset:"); +- image_table.attach(image_label, 0, 0, 1, 1); //, 0, 0, 0, 0); +- image_table.attach(offset_label, 0, 1, 1, 1); //, 0, 0, 0, 0); +- image_table.attach(image_button, 1, 0, 3, 1); //, AttachOptions.EXPAND | +- //AttachOptions.FILL, 0, 0, 0); +- image_table.attach(offset_spin, 1, 1, 1, 1); //, AttachOptions.EXPAND | +- //AttachOptions.FILL, 0, 0, 0); ++ image_table.attach(image_label, 0, 0, 1, 1); ++ image_table.attach(offset_label, 0, 1, 1, 1); ++ image_button.set_hexpand(true); ++ image_table.attach(image_button, 1, 0, 1, 1); ++ offset_spin.set_hexpand(true); ++ image_table.attach(offset_spin, 1, 1, 1, 1); + image_frame.add(image_table); + + var size_box = new Box(Orientation.HORIZONTAL, 2); +@@ -123,7 +117,6 @@ class PrefDialog : Dialog { + var color = Gdk.RGBA(); + color.parse(plugin.color); + color_button.rgba = color; +- alpha_scale.set_value(plugin.alpha); + image_button.set_filename(plugin.image); + offset_spin.value = plugin.offset; + max_size_spin.value = plugin.max_size; +@@ -155,9 +148,6 @@ class PrefDialog : Dialog { + color_button.color_set.connect(() => { + plugin.color = color_button.rgba.to_string(); + }); +- alpha_scale.value_changed.connect(() => { +- plugin.alpha = (int)alpha_scale.get_value(); +- }); + image_button.file_set.connect(() => { + plugin.image = image_button.get_filename(); + }); +diff --git a/src/xfce4-dockbarx-plug.py b/src/xfce4-dockbarx-plug.py +index a3898b1..88fedae 100755 +--- a/src/xfce4-dockbarx-plug.py ++++ b/src/xfce4-dockbarx-plug.py +@@ -29,6 +29,7 @@ + gi.require_version("Gtk", "3.0") + from gi.repository import Gtk + from gi.repository import Gdk ++from gi.repository import GdkPixbuf + from gi.repository import GObject + import cairo + import dbus +@@ -123,8 +124,9 @@ def xfconf_changed (self, channel, prop, val): + elif "block-autohide" in prop: + pass # This is one way comm from the plug to the socket. + elif self.mode == 0 and ("color" in prop or "alpha" in prop): +- self.color_pattern(Gdk.color_parse(self.xfconf_get_dbx( +- "color", "#000")), self.xfconf_get_dbx("alpha", 100)) ++ color = Gdk.RGBA() ++ color.parse(self.xfconf_get_dbx("color", "#000")) ++ self.color_pattern(color) + elif self.mode == 1 and ("image" in prop or "offset" in prop): + self.image_pattern(self.xfconf_get_dbx("image", "")) + else: +@@ -157,25 +159,22 @@ def config_bg (self): + if self.mode == 1: + self.image_pattern(self.xfconf_get_dbx("image", "")) + elif self.mode == 0: +- self.color_pattern(Gdk.color_parse(self.xfconf_get_dbx( +- "color", "#000")), self.xfconf_get_dbx("alpha", 100)) ++ color = Gdk.RGBA() ++ color.parse(self.xfconf_get_dbx("color", "#000")) ++ self.color_pattern(color) + else: + self.pattern_from_dbus() + +- def color_pattern (self, color, alpha): +- if Gdk.Screen.get_default().get_rgba_visual() is None: alpha = 100 +- self.pattern = cairo.SolidPattern(color.red_float, color.green_float, +- color.blue_float, alpha / 100.0) ++ def color_pattern (self, color): ++ if Gdk.Screen.get_default().get_rgba_visual() is None: ++ color.alpha = 1 ++ self.pattern = cairo.SolidPattern(color.red, color.green, color.blue, color.alpha) + + def image_pattern (self, image, from_dbus=False): + self.offset = self.xfconf_get_dbx("offset", 0) + try: +- if str(image).endswith("svg"): +- # Todo: Get a better height and width. How does xfcepanel handle it? +- surface = Cairo.SVGSurface(image, self.get_allocation_height(), self.get_allocation_width()) +- else: +- surface = cairo.ImageSurface.create_from_png(image) +- ++ pixbuf = GdkPixbuf.Pixbuf.new_from_file(image) ++ surface = Gdk.cairo_surface_create_from_pixbuf(pixbuf, 0) + self.pattern = cairo.SurfacePattern(surface) + self.pattern.set_extend(cairo.EXTEND_REPEAT) + tx = self.offset if self.orient in ("up", "down") else 0 +@@ -194,12 +193,16 @@ def image_pattern (self, image, from_dbus=False): + def pattern_from_dbus (self): + bgstyle = self.xfconf_get_panel("background-style", 0) + image = self.xfconf_get_panel("background-image", "") +- alpha = self.xfconf_get_panel("background-alpha", 100) + if bgstyle == 2 and os.path.isfile(image): + self.image_pattern(image, from_dbus=True) + elif bgstyle == 1: +- col = self.xfconf_get_panel("background-color", [0, 0, 0, 0]) +- self.color_pattern(Gdk.Color(col[0], col[1], col[2]), alpha) ++ col = self.xfconf_get_panel("background-rgba", None) ++ if col is None: ++ # xfce4-panel < 4.14 ++ col = self.xfconf_get_panel("background-color", [0, 0, 0, 0]) ++ col = [v / 65535.0 for v in col] ++ col[3] = self.xfconf_get_panel("background-alpha", 100) / 100.0 ++ self.color_pattern(Gdk.RGBA(col[0], col[1], col[2], col[3])) + else: + self.pattern = None + diff --git a/vala0.48fix.patch b/vala0.48fix.patch deleted file mode 100644 index 6e89b805518a..000000000000 --- a/vala0.48fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur ./xfce4-dockbarx-plugin.orig/vapi/libxfce4panel-1.0.vapi ./xfce4-dockbarx-plugin/vapi/libxfce4panel-1.0.vapi ---- ./xfce4-dockbarx-plugin.orig/vapi/libxfce4panel-1.0.vapi 2020-03-22 14:23:20.633731643 -0400 -+++ ./xfce4-dockbarx-plugin/vapi/libxfce4panel-1.0.vapi 2020-03-22 14:23:32.289623541 -0400 -@@ -99,7 +99,7 @@ - public virtual signal void mode_changed (Xfce.PanelPluginMode mode); - public virtual signal void nrows_changed (uint rows); - public virtual signal void orientation_changed (Gtk.Orientation orientation); -- public virtual signal bool remote_event (string name, GLib.Value value); -+ public virtual signal bool remote_event (string name, GLib.Value value, uint handle); - public virtual signal void removed (); - public virtual signal void save (); - public virtual signal void screen_position_changed (Xfce.ScreenPosition position); |