Hello community,
here is the log from the commit of package jgmenu for openSUSE:Factory checked in at 2019-10-22 15:46:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jgmenu (Old)
and /work/SRC/openSUSE:Factory/.jgmenu.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jgmenu"
Tue Oct 22 15:46:00 2019 rev:10 rq:741684 version:3.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/jgmenu/jgmenu.changes 2019-10-07 14:14:20.838851729 +0200
+++ /work/SRC/openSUSE:Factory/.jgmenu.new.2352/jgmenu.changes 2019-10-22 15:46:09.669765800 +0200
@@ -1,0 +2,7 @@
+Tue Oct 22 07:26:41 UTC 2019 - Michael Vetter
+
+- Update to 3.5:
+ * Add col2 theme
+ * Some minor fixes
+
+-------------------------------------------------------------------
Old:
----
v3.4.tar.gz
New:
----
v3.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ jgmenu.spec ++++++
--- /var/tmp/diff_new_pack.xggCXQ/_old 2019-10-22 15:46:12.713769523 +0200
+++ /var/tmp/diff_new_pack.xggCXQ/_new 2019-10-22 15:46:12.717769529 +0200
@@ -12,12 +12,12 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: jgmenu
-Version: 3.4
+Version: 3.5
Release: 0
Summary: Small X11 menu intended to be used with openbox and tint2
License: GPL-2.0-only
++++++ v3.4.tar.gz -> v3.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/NEWS.md new/jgmenu-3.5/NEWS.md
--- old/jgmenu-3.4/NEWS.md 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/NEWS.md 2019-10-21 22:35:12.000000000 +0200
@@ -6,6 +6,7 @@
## Recent releases
+[v3.5](docs/relnotes/3.5.txt)
[v3.4](docs/relnotes/3.4.txt)
[v3.3](docs/relnotes/3.3.txt)
[v3.2](docs/relnotes/3.2.txt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/README.md new/jgmenu-3.5/README.md
--- old/jgmenu-3.4/README.md 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/README.md 2019-10-21 22:35:12.000000000 +0200
@@ -9,27 +9,18 @@
<h3 align="center">[<a
href="INSTALL.md">Install</a>] [https://github.com/johanmalm/jgmenu/tree/master/docs/relnotes">Release Notes</a>] [https://github.com/johanmalm/jgmenu/wiki/Timeline">Timeline</a>] [https://github.com/johanmalm/jgmenu/wiki/Roadmap">Roadmap</a>] [Tutorial</a>] [https://github.com/johanmalm/jgmenu/wiki">Wiki</a>] [https://github.com/johanmalm/jgmenu/wiki/Screenshots">Screenshots</a>]</h3>
+href="NEWS.md">Release Notes</a>] [https://jgmenu.github.io/">Website</a>] [https://jgmenu.github.io/screenshots.html">Screenshots</a>]</h3>
<img src="https://i.imgur.com/O3E84L3.png" alt="jgmenu" align="right" height="610px" width="512px">
-jgmenu is a stand-alone, simple and contemporary-looking menu application for Linux and BSD.
+A simple, independent and contemporary-looking X11 menu, designed for scripting, ricing and tweaking.
-Although it was originally written to be used with openbox and tint2, it is not in any way dependent on these and runs well with other panels and window managers.
-
-It is hackable with a clean, small code base.
-
-It is designed for customisation, scripting, ricing and tweaking
+It is hackable and has a simple code base. It does not depend on any toolkits such as GTK and Qt, but uses cairo and pango to render the menu.
It can optionally use some appearance settings from XSettings, tint2 and GTK.
-It does not depend on any toolkits such as GTK and Qt, but uses cairo and pango to render the menu directly onto an X11 window.
-
It can display the following types of menu (or any combination of):
- bespoke menu using a jgmenu flavoured CSV format
@@ -37,12 +28,8 @@
- pipe menus
- openbox XML menu including openbox pipe-menus
-It can display SVG, PNG and XPM icons.
-
It has UTF-8 search support.
-It has been compiled and run on OpenBSD, FreeBSD and various Linux distributions including Bunsenlabs, Arch, Ubuntu, Alpine, Void and Mint.
-
Authors
-------
@@ -55,7 +42,7 @@
- wrote the pmenu module
- produced the xsettings client and xpm loader
- provided much advice on early design choices
-- provided much technical guidance on icon related code, inter-process communication (IPC), the main loop select() and self-pipe constructs, and more (see git log for full details)
+- provided a lot of technical guidance on icon related code, inter-process communication (IPC), the main loop select() and self-pipe constructs, and more (see git log for full details)
There many who have contributed in other ways including, but not limited to:
@@ -68,13 +55,12 @@
- packaging
[@Misko-2083](https://github.com/Misko-2083)
-- contrib/tasks
-- contrib/xfce-plugin
+- various contrib/ packages
-Various members of the BunsenLabs and ArchLabs communities have also helped with testing, documentation, ideas and inspiration to keep this project going.
+Members of the BunsenLabs and ArchLabs communities have also helped with testing, documentation, ideas and inspiration to keep this project going.
Versioning
----------
-We use [semver 2.0.0](http://www.semver.org), except that at patch-level zero, the ".0" is omitted. For example, 1.0.0 would become 1.0.
+We use [semver 2.0.0](http://www.semver.org), except that at patch-level zero, the ".0" is omitted. For example, 1.0.0 becomes 1.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/contrib/gtktheme/jgmenu-gtktheme.py new/jgmenu-3.5/contrib/gtktheme/jgmenu-gtktheme.py
--- old/jgmenu-3.4/contrib/gtktheme/jgmenu-gtktheme.py 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/contrib/gtktheme/jgmenu-gtktheme.py 2019-10-21 22:35:12.000000000 +0200
@@ -5,10 +5,16 @@
""" Parse gtk theme and set some key/value pairs in jgmenurc """
-import gi
+import os
+import sys
+try:
+ import gi
+except ImportError:
+ print("[gtktheme] fatal: require python3-gi")
+ sys.exit(1)
+
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk
-import os
import shlex
import subprocess
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/contrib/xfce4-panel/Makefile new/jgmenu-3.5/contrib/xfce4-panel/Makefile
--- old/jgmenu-3.4/contrib/xfce4-panel/Makefile 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/contrib/xfce4-panel/Makefile 2019-10-21 22:35:12.000000000 +0200
@@ -1,6 +1,8 @@
-include ../../config.mk
-ifeq ($(shell uname -m),i686)
+ifeq ($(shell dpkg-architecture -q DEB_HOST_ARCH 2>/dev/null),i386)
+LIBDIR = $(DESTDIR)$(prefix)/lib/i386-linux-gnu/xfce4/panel/plugins
+else ifeq ($(shell uname -m),i686)
LIBDIR = $(DESTDIR)$(prefix)/lib/i386-linux-gnu/xfce4/panel/plugins
else
LIBDIR = $(DESTDIR)$(prefix)/lib/x86_64-linux-gnu/xfce4/panel/plugins
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/debian/changelog new/jgmenu-3.5/debian/changelog
--- old/jgmenu-3.4/debian/changelog 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/debian/changelog 2019-10-21 22:35:12.000000000 +0200
@@ -1,6 +1,13 @@
+jgmenu (3.5-1) lithium; urgency=medium
+
+ * New upstream release
+ * Split into packages jgmenu and jgmenu-xfce4-panel-applet
+
+ -- Johan Malm Mon, 21 Oct 2019 21:30:56 +0100
+
jgmenu (3.4-1) lithium; urgency=medium
* New upstream release
* Add CONTRIB_DIRS packages
- -- Johan Malm Mon, 05 Oct 2019 11:59:11 +0100
+ -- Johan Malm Sat, 05 Oct 2019 11:59:11 +0100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/debian/control new/jgmenu-3.5/debian/control
--- old/jgmenu-3.4/debian/control 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/debian/control 2019-10-21 22:35:12.000000000 +0200
@@ -2,33 +2,27 @@
Maintainer: Johan Malm
Section: x11
Priority: optional
-Standards-Version: 3.9.7
-Build-Depends: debhelper (>= 10),
- libx11-dev,
- libxrandr-dev,
- libcairo2-dev,
- libpango1.0-dev,
- librsvg2-dev,
- libxml2-dev,
- libglib2.0-dev,
- libmenu-cache-dev,
- pkg-config,
- libgtk-3-dev,
- xfce4-panel-dev
+Standards-Version: 4.3.0
+Homepage: https://jgmenu.github.io/
+Build-Depends: debhelper (>= 10), libx11-dev, libxrandr-dev, libcairo2-dev,
+ libpango1.0-dev, librsvg2-dev, libxml2-dev, libglib2.0-dev, libmenu-cache-dev,
+ pkg-config, libgtk-3-dev, xfce4-panel-dev
Package: jgmenu
Architecture: any
-Depends: libx11-6,
- libxrandr2,
- libcairo2,
- libpango-1.0-0,
- librsvg2-2,
- libxml2,
- libglib2.0-0,
- libmenu-cache3,
- python3
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, ${misc:Depends}, python3
Suggests: lxmenu-data
Description: Simple X11 menu
A stand-alone, contemporary-looking menu application for Linux and BSD.
- Independent of window manager and panel.
- Designed for customisation, scripting, ricing and tweaking
+ Independent of window manager and panel. Designed for customisation,
+ scripting, ricing and tweaking
+
+Package: jgmenu-xfce4-panel-applet
+Section: x11
+Architecture: any
+Multi-Arch: same
+Depends: ${shlibs:Depends}, ${misc:Depends}, jgmenu (>= 3.5)
+Description: xfce4-panel applet for jgmenu
+ An xfce4-panel applet for jgmenu
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/debian/jgmenu-xfce4-panel-applet.install new/jgmenu-3.5/debian/jgmenu-xfce4-panel-applet.install
--- old/jgmenu-3.4/debian/jgmenu-xfce4-panel-applet.install 1970-01-01 01:00:00.000000000 +0100
+++ new/jgmenu-3.5/debian/jgmenu-xfce4-panel-applet.install 2019-10-21 22:35:12.000000000 +0200
@@ -0,0 +1,2 @@
+usr/lib/*/xfce4/*
+usr/share/xfce4/panel/plugins/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/debian/jgmenu.install new/jgmenu-3.5/debian/jgmenu.install
--- old/jgmenu-3.4/debian/jgmenu.install 1970-01-01 01:00:00.000000000 +0100
+++ new/jgmenu-3.5/debian/jgmenu.install 2019-10-21 22:35:12.000000000 +0200
@@ -0,0 +1,3 @@
+usr/bin/*
+usr/lib/jgmenu/*
+usr/share/man/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/debian/rules new/jgmenu-3.5/debian/rules
--- old/jgmenu-3.4/debian/rules 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/debian/rules 2019-10-21 22:35:12.000000000 +0200
@@ -2,16 +2,12 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DPKG_EXPORT_BUILDFLAGS = 1
-#export DH_VERBOSE = 1
include /usr/share/dpkg/buildflags.mk
%:
dh $@
-override_dh_auto_clean:
- dh_auto_clean
-
override_dh_auto_configure:
@true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/docs/coding_style new/jgmenu-3.5/docs/coding_style
--- old/jgmenu-3.4/docs/coding_style 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/docs/coding_style 2019-10-21 22:35:12.000000000 +0200
@@ -4,7 +4,8 @@
C programs
----------
- - Use ANSI C (C89)
+ - Use C99 without GNU extensions. We compile with -std=gnu99 to support
+ list.h, but otherwise stay clear of GNU tricks.
- Kernel coding style (https://www.kernel.org/doc/Documentation/CodingStyle)
applies with the following exceptions:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/docs/manual/jgmenututorial.7 new/jgmenu-3.5/docs/manual/jgmenututorial.7
--- old/jgmenu-3.4/docs/manual/jgmenututorial.7 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/docs/manual/jgmenututorial.7 2019-10-21 22:35:12.000000000 +0200
@@ -1,10 +1,10 @@
.\" Automatically generated by Pandoc 2.2.1
.\"
-.TH "JGMENUTUTORIAL" "7" "29 September, 2019" "" ""
+.TH "JGMENUTUTORIAL" "7" "16 October, 2019" "" ""
.hy
.SH NAME
.PP
-The jgmenu tutorial
+jgmenututorial \- A step\-by\-step tutorial to jgmenu
.SH INTRODUCTION
.PP
This tutorial aims to explain the usage of jgmenu through a set of
@@ -128,9 +128,14 @@
.IP
.nf
\f[C]
-┌───────────────┐\ \ \ \ \ ┌────────────────┐
-│\ csv\-generator\ │\ \-\->\ │\ graphical\ menu\ │
-└───────────────┘\ \ \ \ \ └────────────────┘
+┌────────────────┐
+│\ csv\-generator\ \ │
+└────────────────┘
+\ \ \ \ \ \ \ \ |
+\ \ \ \ \ \ \ \ V
+┌────────────────┐
+│\ graphical\ menu\ │
+└────────────────┘
\f[]
.fi
.PP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/docs/manual/jgmenututorial.7.md new/jgmenu-3.5/docs/manual/jgmenututorial.7.md
--- old/jgmenu-3.4/docs/manual/jgmenututorial.7.md 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/docs/manual/jgmenututorial.7.md 2019-10-21 22:35:12.000000000 +0200
@@ -1,10 +1,10 @@
% JGMENUTUTORIAL(7)
% Johan Malm
-% 29 September, 2019
+% 16 October, 2019
# NAME
-The jgmenu tutorial
+jgmenututorial - A step-by-step tutorial to jgmenu
# INTRODUCTION
@@ -71,9 +71,14 @@
When jgmenu is started, two processes are run to produce the menu.
- ┌───────────────┐ ┌────────────────┐
- │ csv-generator │ --> │ graphical menu │
- └───────────────┘ └────────────────┘
+ ┌────────────────┐
+ │ csv-generator │
+ └────────────────┘
+ |
+ V
+ ┌────────────────┐
+ │ graphical menu │
+ └────────────────┘
The first process (csv-generator) produces the menu content, whereas the
second generates a graphical menu (what you see). This modular approach
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/docs/manual/jgmenuunicode.7 new/jgmenu-3.5/docs/manual/jgmenuunicode.7
--- old/jgmenu-3.4/docs/manual/jgmenuunicode.7 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/docs/manual/jgmenuunicode.7 2019-10-21 22:35:12.000000000 +0200
@@ -4,7 +4,7 @@
.hy
.SH NAME
.PP
-An overview of jgmenu unicode usage.
+jgmenuunicode \- An overview of jgmenu unicode usage
.SH INTRODUCTION
.PP
Unicode characters can be displayed by jgmenu.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/docs/manual/jgmenuunicode.7.md new/jgmenu-3.5/docs/manual/jgmenuunicode.7.md
--- old/jgmenu-3.4/docs/manual/jgmenuunicode.7.md 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/docs/manual/jgmenuunicode.7.md 2019-10-21 22:35:12.000000000 +0200
@@ -4,7 +4,7 @@
# NAME
-An overview of jgmenu unicode usage.
+jgmenuunicode - An overview of jgmenu unicode usage
# INTRODUCTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/docs/relnotes/3.5.txt new/jgmenu-3.5/docs/relnotes/3.5.txt
--- old/jgmenu-3.4/docs/relnotes/3.5.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/jgmenu-3.5/docs/relnotes/3.5.txt 2019-10-21 22:35:12.000000000 +0200
@@ -0,0 +1,11 @@
+jgmenu v3.5 release notes
+=========================
+
+Updates since v3.4
+------------------
+
+ * debian/: split into two packages - jgmenu and jgmenu-xfce4-panel-applet
+
+ * Add col2 theme
+
+ * Some minor fixes - see git commit log for full details.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/scripts/check new/jgmenu-3.5/scripts/check
--- old/jgmenu-3.4/scripts/check 1970-01-01 01:00:00.000000000 +0100
+++ new/jgmenu-3.5/scripts/check 2019-10-21 22:35:12.000000000 +0200
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+die () {
+ printf '\033[31mfatal:\033[m %b\n' "$@" >&2
+ exit 1
+}
+
+say () {
+ printf '\033[32m%s\033[m\n' "$@"
+}
+
+isinstalled () {
+ type "$1" >/dev/null 2>&1 || die "depend on $1"
+}
+
+usage () {
+ say "Usage: check [<options>]"
+ say "Options:"
+ say "-h show help"
+ exit 0
+}
+
+args() {
+ case $1 in
+ -h) usage ;;
+ esac
+}
+
+main() {
+ test -e src/jgmenu.c || die "must be run from top-level directory"
+ test $# -gt 0 && args "$@"
+ say " CHECK shellcheck"; shellcheck src/*.sh
+ say " CHECK cppcheck"; ./scripts/cppcheck-wrapper.sh
+}
+
+main "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/scripts/cppcheck-wrapper.sh new/jgmenu-3.5/scripts/cppcheck-wrapper.sh
--- old/jgmenu-3.4/scripts/cppcheck-wrapper.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/jgmenu-3.5/scripts/cppcheck-wrapper.sh 2019-10-21 22:35:12.000000000 +0200
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+suppressions=""
+
+# readdir_r is depreciated - see readdir_r(3)
+suppressions="${suppressions} --suppress=readdirCalled"
+
+# no need for strtok threadsafety in t2conf.c
+suppressions="${suppressions} --suppress=strtokCalled:src/t2conf.c"
+
+suppressions="${suppressions} --suppress=missingIncludeSystem"
+
+# Sticking to C89 kernel style throws these errors - but not a problem
+suppressions="${suppressions} --suppress=variableScope"
+
+# vsnprintf() is used in accordance with the man page
+suppressions="${suppressions} --suppress=nullPointer:src/jgmenu-obtheme.c:58"
+
+# This library is copied from git, so it's easier to keep it complete.
+# It also makes the unit test work properly
+suppressions="${suppressions} --suppress=unusedFunction:src/hashmap.c"
+
+#suppressions="${suppressions} --suppress="
+
+cppcheck \
+ --inconclusive \
+ --enable=all \
+ -DVERSION=3.4 \
+ -I src/ \
+ --std=c99 \
+ --std=posix \
+ --library=/usr/share/cppcheck/cfg/gnu.cfg \
+ --quiet \
+ ${suppressions} \
+ $@ \
+ src/*.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/scripts/pbuild new/jgmenu-3.5/scripts/pbuild
--- old/jgmenu-3.4/scripts/pbuild 1970-01-01 01:00:00.000000000 +0100
+++ new/jgmenu-3.5/scripts/pbuild 2019-10-21 22:35:12.000000000 +0200
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+: ${dist=buster}
+: ${arch=amd64}
+
+basetgz="/var/cache/pbuilder/base-${dist}-${arch}.tgz"
+#signarg='--auto-debsign'
+
+die () {
+ printf '%b\n' "fatal: $@" >&2
+ exit 1
+}
+
+usage () {
+ printf '%b\n' "Usage: $0 [--login]"
+}
+
+login_to_basetgz () {
+ sudo pbuilder login --basetgz "${basetgz}"
+}
+
+check_present_working_directory () {
+ [[ -f debian/changelog ]] || die 'not in right directory'
+ pkg_name=$(dpkg-parsechangelog --show-field Source)
+ [[ "${PWD##*/}" = ${pkg_name}* ]] || die "top level directory (${PWD##*/}) wrong name"
+}
+
+run_pbuilder_create () {
+ [[ -e $basetgz ]] && return
+ sudo pbuilder create --distribution "$dist" --architecture "$arch" --basetgz "$basetgz" --debootstrapopts --variant=buildd
+}
+
+create_orig_file () {
+ pkg_ver=$(dpkg-parsechangelog --show-field Version)
+ origname="${pkg_name}_${pkg_ver%-*}.orig.tar.gz"
+ if [[ -f ../$origname ]]; then
+ printf '%b\n' "../$origname exists. Overwrite? [yN]"
+ read -srn1
+ [[ $REPLY = [yY] ]] || exit
+ fi
+ tar -caf ../"${origname}" --exclude=debian --exclude-vcs --exclude-vcs-ignores .
+}
+
+run_pdebuild () {
+ create_orig_file
+ pdebuild "${signarg}" --architecture "${arch}" --buildresult ".." --debbuildopts -b -- --basetgz "${basetgz}" || die "pdebuild failed"
+}
+
+run_lintian () {
+ lintian --pedantic --info
+}
+
+main() {
+ while test $# != 0
+ do
+ case "$1" in
+ --login)
+ login_to_basetgz
+ exit 0
+ ;;
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ esac
+ shift
+ done
+ check_present_working_directory
+ run_pbuilder_create
+ run_pdebuild
+ run_lintian
+}
+
+main "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/scripts/version-gen.sh new/jgmenu-3.5/scripts/version-gen.sh
--- old/jgmenu-3.4/scripts/version-gen.sh 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/scripts/version-gen.sh 2019-10-21 22:35:12.000000000 +0200
@@ -8,7 +8,7 @@
# Change "default_version" before doing a `git tag -a ...`
#
-default_version="3.4"
+default_version="3.5"
v=$(git describe --dirty --abbrev=1 2>/dev/null)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/config.c new/jgmenu-3.5/src/config.c
--- old/jgmenu-3.4/src/config.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/config.c 2019-10-21 22:35:12.000000000 +0200
@@ -129,8 +129,9 @@
} else if (!strcmp(option, "tint2_look")) {
xatoi(&config.tint2_look, value, XATOI_NONNEG, "config.tint2_look");
} else if (!strcmp(option, "at_pointer")) {
- config.position_mode = POSITION_MODE_PTR;
- warn("'at_pointer' is depreciated; use 'position_mode = pointer'");
+ if (atoi(value) == 1)
+ config.position_mode = POSITION_MODE_PTR;
+ warn("'at_pointer' is deprecated; use 'position_mode'");
} else if (!strcmp(option, "position_mode")) {
if (!value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/geometry.c new/jgmenu-3.5/src/geometry.c
--- old/jgmenu-3.4/src/geometry.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/geometry.c 2019-10-21 22:35:12.000000000 +0200
@@ -291,14 +291,6 @@
geo_update();
}
-void geo_set_menu_width_from_itemarea_width(int width)
-{
- win[cur].menu_width = !cur ? width + menu_padding_left +
- menu_padding_right :
- width + sub_padding_left + sub_padding_right;
- geo_update();
-}
-
void geo_set_menu_height(int h)
{
win[cur].menu_height = h;
@@ -431,11 +423,6 @@
width + sub_padding_right + sub_padding_left;
}
-int geo_get_item_height(void)
-{
- return item_height;
-}
-
int geo_get_screen_x0(void)
{
return screen_x0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/geometry.h new/jgmenu-3.5/src/geometry.h
--- old/jgmenu-3.4/src/geometry.h 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/geometry.h 2019-10-21 22:35:12.000000000 +0200
@@ -59,7 +59,6 @@
void geo_win_del(void);
void geo_set_menu_width(int w);
-void geo_set_menu_width_from_itemarea_width(int w);
void geo_set_menu_height(int h);
void geo_set_menu_height_from_itemarea_height(int h);
void geo_set_menu_margin_x(int x);
@@ -85,7 +84,6 @@
int geo_get_itemarea_height(void);
int geo_get_menu_width(void);
int geo_get_menu_width_from_itemarea_width(int w);
-int geo_get_item_height(void);
int geo_get_screen_x0(void);
int geo_get_screen_y0(void);
int geo_get_screen_height(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/icon-find.c new/jgmenu-3.5/src/icon-find.c
--- old/jgmenu-3.4/src/icon-find.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/icon-find.c 2019-10-21 22:35:12.000000000 +0200
@@ -379,29 +379,6 @@
free(path.buf);
}
-void icon_find(struct sbuf *name, int size)
-{
- struct icon_path *path;
- struct list_head icon_paths;
-
- if (strchr(name->buf, '/'))
- return;
-
- INIT_LIST_HEAD(&icon_paths);
- path = xcalloc(1, sizeof(struct icon_path));
- sbuf_init(&path->name);
- sbuf_init(&path->path);
- sbuf_cpy(&path->name, name->buf);
- list_add(&path->list, &icon_paths);
- icon_find_all(&icon_paths, size);
- sbuf_cpy(name, path->path.buf);
-
- free(path->name.buf);
- free(path->path.buf);
- list_del(&path->list);
- free(path);
-}
-
void icon_find_cleanup(void)
{
struct sbuf *theme, *tmp_theme;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/icon-find.h new/jgmenu-3.5/src/icon-find.h
--- old/jgmenu-3.4/src/icon-find.h 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/icon-find.h 2019-10-21 22:35:12.000000000 +0200
@@ -18,7 +18,6 @@
void icon_find_print_themes(void);
void icon_find_init(void);
void icon_find_all(struct list_head *icons, int size);
-void icon_find(struct sbuf *name, int size);
void icon_find_cleanup(void);
#endif /* ICON_FIND_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/icon.c new/jgmenu-3.5/src/icon.c
--- old/jgmenu-3.4/src/icon.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/icon.c 2019-10-21 22:35:12.000000000 +0200
@@ -266,4 +266,5 @@
xfree(icon);
}
icon_find_cleanup();
+ cache_atexit_cleanup();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/jgmenu-hide-app.sh new/jgmenu-3.5/src/jgmenu-hide-app.sh
--- old/jgmenu-3.4/src/jgmenu-hide-app.sh 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/jgmenu-hide-app.sh 2019-10-21 22:35:12.000000000 +0200
@@ -3,8 +3,12 @@
applications_dir="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
desktop_file="${applications_dir}/${1}"
+say () {
+ printf '%b\n' "$@"
+}
+
_exit () {
- printf "%b\n" "$@"
+ say "$@"
exit 0
}
@@ -12,8 +16,6 @@
test -e "${desktop_file}" && _exit "info: file already exists"
mkdir -p "${applications_dir}"
-printf "%b\n" "[Desktop Entry]" >>"${desktop_file}"
-printf "%b\n" "Type=Application" >>"${desktop_file}"
-printf "%b\n" "NoDisplay=true" >>"${desktop_file}"
+say "[Desktop Entry]\nType=Application\nNoDisplay=true" >"${desktop_file}"
rm -rf "${HOME}/.cache/menus/"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/jgmenu-init.sh new/jgmenu-3.5/src/jgmenu-init.sh
--- old/jgmenu-3.4/src/jgmenu-init.sh 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/jgmenu-init.sh 2019-10-21 22:35:12.000000000 +0200
@@ -1,6 +1,7 @@
#!/bin/sh
-
+#
# 'jgmenu init' creates/updates jgmenurc
+#
config_file=~/.config/jgmenu/jgmenurc
prepend_file=~/.config/jgmenu/prepend.csv
@@ -15,14 +16,15 @@
interactive=f
regression_items="max_items min_items ignore_icon_cache color_noprog_fg \
-color_title_bg show_title search_all_items ignore_xsettings arrow_show \
-read_tint2rc tint2_rules tint2_button multi_window color_menu_fg at_pointer"
+show_title search_all_items ignore_xsettings arrow_show read_tint2rc \
+tint2_rules tint2_button multi_window color_menu_fg at_pointer"
available_themes="\
archlabs_1803 \
bunsenlabs_hydrogen \
bunsenlabs_helium \
bunsenlabs_lithium \
+ col2 \
col3 \
neon \
greeneye"
@@ -47,6 +49,10 @@
printf "info: %b\n" "$@"
}
+isinstalled () {
+ which "$1" >/dev/null 2>&1
+}
+
usage () {
say "\
usage: jgmenu init [<options>]\n\
@@ -78,11 +84,11 @@
say "append.csv already contains a lock entry"
return
fi
- if type i3lock-fancy >/dev/null 2>&1
+ if isinstalled i3lock-fancy
then
append__add "Lock,i3lock-fancy -p,system-lock-screen"
say "Append i3lock-fancy"
- elif type i3lock >/dev/null 2>&1
+ elif isinstalled i3lock
then
append__add "Lock,i3lock -c 000000,system-lock-screen"
say "Append i3lock"
@@ -95,7 +101,7 @@
say "append.csv already contains an exit entry"
return
fi
- if type systemctl >/dev/null
+ if isinstalled systemctl
then
say "Append exit options (systemctl)"
append__add "Exit,^checkout(exit),system-shutdown"
@@ -151,7 +157,7 @@
done
for x in ${prepend__terminals}
do
- if type "${x}" >/dev/null 2>&1
+ if isinstalled "${x}"
then
prepend__add "Terminal,${x},utilities-terminal"
printf "Prepend %b\n" "${x}"
@@ -171,7 +177,7 @@
done
for x in ${prepend__browsers}
do
- if type "${x}" >/dev/null 2>&1
+ if isinstalled "${x}"
then
prepend__add "Browser,${x},${x}"
printf "Prepend %b\n" "${x}"
@@ -191,7 +197,7 @@
done
for x in ${prepend__file_managers}
do
- if type "${x}" >/dev/null 2>&1
+ if isinstalled "${x}" >/dev/null 2>&1
then
prepend__add "File manager,${x},system-file-manager"
printf "Prepend %b\n" "${x}"
@@ -228,6 +234,7 @@
}
check_menu_package_installed () {
+ # shellcheck disable=SC2039
local menu_package_exists=
for d in $xdg_config_dirs
do
@@ -313,7 +320,7 @@
create_icon_greeneye () {
greeneye_search_icon="${HOME}/.config/jgmenu/greeneye-search.svg"
test -e "${greeneye_search_icon}" && return
- cat >${greeneye_search_icon} <<'EOF'
+ cat >"${greeneye_search_icon}" <<'EOF'
<!-- /usr/share/icons/breeze-dark/actions/22/system-search.svg -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
<defs id="defs3051">
@@ -340,6 +347,14 @@
fi
}
+fallback_if_no_lx () {
+ # not all systems support the lx module
+ if ! lx_installed
+ then
+ jgmenu_run config -s "${config_file}" -k csv_cmd -v pmenu
+ fi
+}
+
set_theme () {
test $# -eq 0 && die "set_theme(): no theme specified"
backup_config_files
@@ -362,7 +377,7 @@
bunsenlabs_lithium)
jgmenu_run themes bunsenlabs_lithium_config >"${config_file}"
jgmenu_run themes bunsenlabs_lithium_prepend >"${prepend_file}"
- fallback_if_no_openbox
+ fallback_if_no_lx
;;
neon)
jgmenu_run themes neon_config >"${config_file}"
@@ -375,6 +390,10 @@
jgmenu_run greeneye --widgets >"${prepend_file}"
jgmenu_run greeneye --config >"${config_file}"
;;
+ col2)
+ jgmenu_run themes col2_config >"${config_file}"
+ jgmenu_run themes col2_prepend >"${prepend_file}"
+ ;;
col3)
jgmenu_run themes col3_config >"${config_file}"
;;
@@ -397,15 +416,17 @@
}
check_nr_backups () {
- nr=$(ls -1 ~/.config/jgmenu/backup/ 2>/dev/null | wc -l)
+ nr=$(find ~/.config/jgmenu/backup/ 2>/dev/null | wc -l)
test "$nr" -gt 100 && warn "\
you have more than 100 backup files - consider removing a few"
}
backup_config_files () {
+ # shellcheck disable=SC2039
local files_to_backup="${HOME}/.config/jgmenu/jgmenurc \
${HOME}/.config/jgmenu/prepend.csv \
${HOME}/.config/jgmenu/append.csv"
+ # shellcheck disable=SC2039
local backup_dir
backup_dir="${HOME}/.config/jgmenu/backup/$(date +%Y%m%d%H%M%S%N)"
@@ -459,6 +480,7 @@
}
prompt () {
+ # shellcheck disable=SC2039
local cmd=
printf "%b" "What now> "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/jgmenu-obtheme.c new/jgmenu-3.5/src/jgmenu-obtheme.c
--- old/jgmenu-3.4/src/jgmenu-obtheme.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/jgmenu-obtheme.c 2019-10-21 22:35:12.000000000 +0200
@@ -206,15 +206,21 @@
die("cannot find rc.xml");
}
+/* Separate function to avoid cppcheck and check-patch.pl warnings */
+void libxml_test_version(void)
+{
+ LIBXML_TEST_VERSION
+}
+
int main(int argc, char **argv)
{
struct sbuf filename;
char *p;
+ libxml_test_version();
if (argc != 2)
usage();
sbuf_init(&filename);
- LIBXML_TEST_VERSION
p = getenv("JGMENU_RCXML");
if (p)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/jgmenu-themes.sh new/jgmenu-3.5/src/jgmenu-themes.sh
--- old/jgmenu-3.4/src/jgmenu-themes.sh 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/jgmenu-themes.sh 2019-10-21 22:35:12.000000000 +0200
@@ -6,6 +6,8 @@
bunsenlabs_helium_config \
bunsenlabs_lithium_config \
bunsenlabs_lithium_prepend \
+ col2_config \
+ col2_prepend \
col3_config \
neon_config \
neon_append \
@@ -291,6 +293,49 @@
EOF
}
+col2_config () {
+cat <<'EOF'
+tint2_look = 0
+columns = 2
+menu_width = 500
+menu_height_min = 480
+menu_height_max = 480
+menu_padding_top = 50
+menu_padding_right = 40
+menu_padding_bottom = 40
+menu_padding_left = 40
+menu_radius = 0
+menu_border = 0
+menu_halign = center
+menu_valign = center
+item_margin_y = 5
+item_height = 30
+item_padding_x = 8
+item_radius = 0
+item_border = 2
+sep_height = 5
+font = UbuntuMono 12
+icon_size = 18
+icon_text_spacing = 3
+color_menu_bg = #2B303B 100
+color_norm_bg = #1C2023 0
+color_norm_fg = #ffffff 100
+color_sel_bg = #8fa1b3 0
+color_sel_fg = #ffffff 100
+color_sel_border = #111111 100
+color_sep_fg = #919BA0 40
+csv_no_dirs = 1
+EOF
+}
+
+col2_prepend () {
+cat <<'EOF'
+# Search box
+@rect,,23,10,454,35,3,left,top,#111111 90,#000000 0,
+@search,,30,15,454,25,3,left,top,#ffffff 100,#222222 3,Type to search
+EOF
+}
+
col3_config () {
cat <<'EOF'
csv_cmd = apps
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/jgmenu.c new/jgmenu-3.5/src/jgmenu.c
--- old/jgmenu-3.4/src/jgmenu.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/jgmenu.c 2019-10-21 22:35:12.000000000 +0200
@@ -93,7 +93,6 @@
* When a submenu is checked out, *subhead and *subtail are set.
*/
struct menu {
- struct item *head; /* first item in linked list */
struct item *subhead; /* first item in checked out submenu */
struct item *subtail; /* last item in checked out submenu */
struct item *first; /* first visible item */
@@ -160,7 +159,7 @@
static void version(void)
{
- printf("%s\n", VERSION);
+ printf("%s\n", (char *)VERSION);
exit(0);
}
@@ -1397,7 +1396,7 @@
pipe_head = list_last_entry(&menu.master, struct item, master);
nr_lines = read_csv_file(fp, true);
if (fp && fp != stdin)
- fclose(fp);
+ pclose(fp);
if (!nr_lines) {
warn("empty pipemenu");
return;
@@ -2496,6 +2495,7 @@
icon_cleanup();
widgets_cleanup();
watch_cleanup();
+ t2conf_atexit();
delete_empty_item();
destroy_node_tree();
destroy_master_list();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/lockfile.c new/jgmenu-3.5/src/lockfile.c
--- old/jgmenu-3.4/src/lockfile.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/lockfile.c 2019-10-21 22:35:12.000000000 +0200
@@ -39,6 +39,8 @@
fl.l_whence = SEEK_SET;
if (fcntl(fd, F_SETLK, &fl) < 0)
die("an instance of 'jgmenu' is already running");
+ if (close(fd) < 0)
+ warn("[%s] error closing file descriptor", __FILE__);
atexit(lockfile_unlink);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/t2conf.c new/jgmenu-3.5/src/t2conf.c
--- old/jgmenu-3.4/src/t2conf.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/t2conf.c 2019-10-21 22:35:12.000000000 +0200
@@ -160,9 +160,8 @@
} else if (!strcmp(option, "task_font")) {
say("font = %s", value);
- if (font)
- free(font);
- font = strdup(value);
+ xfree(font);
+ font = xstrdup(value);
} else if (!strcmp(option, "task_font_color")) {
say("color_norm_fg = %s", value);
parse_hexstr(value, config.color_norm_fg);
@@ -171,9 +170,8 @@
parse_hexstr(value, config.color_sel_fg);
} else if (!strcmp(option, "launcher_icon_theme")) {
say("icon_theme = %s", value);
- if (icon_theme)
- free(icon_theme);
- icon_theme = strdup(value);
+ xfree(icon_theme);
+ icon_theme = xstrdup(value);
} else if (!strcmp(option, "launcher_icon_theme_override")) {
say("override_xsetti. = %s", value);
override_xsettings = atoi(value);
@@ -426,10 +424,8 @@
void t2conf_atexit(void)
{
- if (font)
- free(font);
- if (icon_theme)
- free(icon_theme);
+ xfree(font);
+ xfree(icon_theme);
}
void t2conf_parse(const char *filename, int screen_width, int screen_height)
@@ -456,12 +452,6 @@
t2conf_cleanup();
}
-int t2conf_is_horizontal_panel(void)
-{
- return (orientation == VERTICAL) ? 0 :
- (orientation == HORIZONTAL) ? 1 : -1;
-}
-
void t2conf_get_font(char **f)
{
*f = font;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/t2conf.h new/jgmenu-3.5/src/t2conf.h
--- old/jgmenu-3.4/src/t2conf.h 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/t2conf.h 2019-10-21 22:35:12.000000000 +0200
@@ -6,7 +6,6 @@
void t2conf_atexit(void);
void t2conf_parse(const char *filename, int screen_width, int screen_height);
-int t2conf_is_horizontal_panel(void);
void t2conf_get_font(char **f);
int t2conf_get_override_xsettings(void);
void t2conf_get_icon_theme(char **t);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/unix_sockets.c new/jgmenu-3.5/src/unix_sockets.c
--- old/jgmenu-3.4/src/unix_sockets.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/unix_sockets.c 2019-10-21 22:35:12.000000000 +0200
@@ -100,12 +100,3 @@
{
return unix_passive_socket(path, SOCK_STREAM, 1, backlog);
}
-
-/*
- * Create socket of type 'type' bound to 'path'.
- * Return socket descriptor on success, or -1 on error.
- */
-int unix_bind(const char *path, int type)
-{
- return unix_passive_socket(path, type, 0, 0);
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/unix_sockets.h new/jgmenu-3.5/src/unix_sockets.h
--- old/jgmenu-3.4/src/unix_sockets.h 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/unix_sockets.h 2019-10-21 22:35:12.000000000 +0200
@@ -17,6 +17,5 @@
int unix_build_address(const char *path, struct sockaddr_un *addr);
int unix_connect(const char *path, int type);
int unix_listen(const char *path, int backlog);
-int unix_bind(const char *path, int type);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/util.c new/jgmenu-3.5/src/util.c
--- old/jgmenu-3.4/src/util.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/util.c 2019-10-21 22:35:12.000000000 +0200
@@ -220,7 +220,7 @@
char *endptr;
if (!value || *value == '\0') {
- xatoi_warn("null or empty string", value, key);
+ xatoi_warn("null or empty string", "", key);
return;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/x11-ui.c new/jgmenu-3.5/src/x11-ui.c
--- old/jgmenu-3.4/src/x11-ui.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/x11-ui.c 2019-10-21 22:35:12.000000000 +0200
@@ -314,11 +314,6 @@
XMapWindow(ui->dpy, ui->w[ui->cur].win);
}
-void ui_win_goto_parent(void)
-{
- ui->cur--;
-}
-
void ui_win_activate(Window w)
{
int i;
@@ -343,18 +338,6 @@
return 0;
}
-Window ui_win_child_wid(Window w)
-{
- int i;
-
- for (i = 0; ui->w[i].c; i++)
- if (w == ui->w[i].win)
- break;
- if (!ui->w[i + 1].c)
- return 0;
- return ui->w[i + 1].win;
-}
-
static void del_win(int win_index)
{
if (!ui->w[win_index].c)
@@ -552,22 +535,6 @@
xfree(ui);
}
-/*
- * ui_insert_svg() is not currently used as it's quite slow
- * I've kept the code here am I might use it later
- */
-void ui_insert_svg(RsvgHandle *svg, double x, double y, double size)
-{
- RsvgDimensionData dimensions;
-
- rsvg_handle_get_dimensions(svg, &dimensions);
- cairo_save(ui->w[ui->cur].c);
- cairo_translate(ui->w[ui->cur].c, x, y);
- cairo_scale(ui->w[ui->cur].c, size / dimensions.width, size / dimensions.width);
- rsvg_handle_render_cairo(svg, ui->w[ui->cur].c);
- cairo_restore(ui->w[ui->cur].c);
-}
-
void ui_insert_image(cairo_surface_t *image, double x, double y, double size)
{
double w, h, max;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/x11-ui.h new/jgmenu-3.5/src/x11-ui.h
--- old/jgmenu-3.4/src/x11-ui.h 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/x11-ui.h 2019-10-21 22:35:12.000000000 +0200
@@ -55,10 +55,8 @@
void ui_init_cairo(int canvas_width, int canvas_height, const char *font);
void ui_win_init(int x, int y, int w, int h, int max_w, int max_h, const char *font);
void ui_win_add(int x, int y, int w, int h, int max_w, int max_h, const char *font);
-void ui_win_goto_parent(void);
void ui_win_activate(Window w);
int ui_has_child_window_open(Window w);
-Window ui_win_child_wid(Window w);
void ui_win_del(void);
void ui_win_del_beyond(int w);
void ui_draw_rectangle_rounded_at_top(double x, double y, double w, double h, double radius,
@@ -72,7 +70,6 @@
int ui_is_point_in_area(struct point p, struct area a);
void ui_map_window(unsigned int w, unsigned int h);
void ui_cleanup(void);
-void ui_insert_svg(RsvgHandle *svg, double x, double y, double size);
void ui_insert_image(cairo_surface_t *image, double x, double y, double size);
#endif /* X11_UI_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jgmenu-3.4/src/xsettings.c new/jgmenu-3.5/src/xsettings.c
--- old/jgmenu-3.4/src/xsettings.c 2019-10-05 12:59:34.000000000 +0200
+++ new/jgmenu-3.5/src/xsettings.c 2019-10-21 22:35:12.000000000 +0200
@@ -28,6 +28,8 @@
#include
#include
+#include "util.h"
+
struct xsettings_buffer {
char byte_order;
size_t len;
@@ -264,7 +266,7 @@
if (buffer_size > 0) {
unsigned long offset = *total_size;
*total_size += buffer_size;
- result = realloc(result, *total_size);
+ result = xrealloc(result, *total_size);
memcpy(result + offset, buffer, buffer_size);
if (bytes_after == 0)
done = True;