Skip to content

Commit

Permalink
Version 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab committed Nov 11, 2020
1 parent 0a91686 commit 9d0a380
Show file tree
Hide file tree
Showing 80 changed files with 1,661 additions and 730 deletions.
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
custom: ["https://www.paypal.me/luigifab", "https://gandi.link/f/4b904048"]
custom: ["https://www.paypal.me/luigifab", "https://gandi.link/f/4b904048", "https://ekwateur.fr/?parrain=EKW001147103"]
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBDIRS = src
43 changes: 28 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
# AWF - A Widget Factory (Extended)
# AWF - A widget factory (extended)

A widget factory is a theme preview application for GTK. It displays the various widget types provided by GTK in a single window allowing to see the visual effect of the applied theme.

Debian package submitted, [rfs for awf-gtk2](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959897) and [rfs for awf-gtk3](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959892).
Debian and Fedora packages submitted: [awf-gtk2.deb](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959897), [awf-gtk3.deb](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959892), [awf-gtk2.rpm](https://bugzilla.redhat.com/show_bug.cgi?id=1893321), [awf-gtk3.rpm](https://bugzilla.redhat.com/show_bug.cgi?id=1893323). Ubuntu: [PPA](https://launchpad.net/~luigifab/+archive/ubuntu/packages).

## Installation

It require *GTK 2.24+* or *GTK 3.0+ (including 3.24)* or *GTK 4.0+ (3.98+)*, and *GLIB 2.28+*.
It require *GTK 2.24+* or *GTK 3.0+ (including 3.24)* or *GTK 4.0+ (3.99+)*, and *GLIB 2.28+*.

* The *build.sh* script will compile the program with all major GTK version available: `sudo apt install dh-autoreconf libgtk2.0-dev libgtk-3-dev libgtk-4-dev` then: `bash build.sh`
* The *build.sh* script will compile the program with all major GTK versions available: `sudo apt install build-essential dh-autoreconf intltool libgtk2.0-dev libgtk-3-dev libgtk-4-dev` or `sudo dnf install autoconf automake gtk2-devel gtk3-devel gtk4-devel` then: `bash build.sh`

* The *debian-gtkx/deb.sh* script will compile the program and create debian package: `sudo apt install autotools-dev devscripts lintian dh-autoreconf libgtk2.0-dev libgtk-3-dev libgtk-4-dev` then: `bash debian-gtkx/deb.sh`
* The *debian-gtkx/deb.sh* scripts will compile the program and create debian packages: `sudo apt install dpkg-dev devscripts build-essential dh-make dh-autoreconf intltool libgtk2.0-dev libgtk-3-dev libgtk-4-dev` then: `bash debian-gtkx/deb.sh`

## Screenshots
* The *bash fedora-gtkx/rpm.sh* scripts will compile the program and create fedora packages: `sudo dnf install rpmdevtools rpm-sign autoconf automake gtk2-devel gtk3-devel gtk4-devel` then: `bash fedora-gtkx/rpm.sh`

* Debian and Ubuntu: `sudo apt install awf-gtk2 awf-gtk3` (coming soon, or via PPA)

* Fedora: `sudo dnf install awf-gtk2 awf-gtk3` (coming soon)

## Screenshots and Features

* Some options are available from command line (read -h).
* The options menu allow to run some standard dialogs.
* The menu items keyboard shortcut can be updated on hover (GTK 2.24, 3.0-3.24, *gtk-can-change-accels*).
* The plus toolbar button show/hide: arrows on notebooks, text on progress bars and scales, marks on scales.
* The refresh toolbar button and the refresh menuitem allow to reload the current theme.
* Translations: English (en), French (fr).
* The refresh toolbar button and the refresh menu item allow to reload the current theme (like the sighup signal).
* The menu items keyboard shortcut can be updated on hover (GTK 2.24 and 3.0-3.24, *gtk-can-change-accels*).
* For Ubuntu, the menu items keyboard shortcut can be updated on hover with: `export UBUNTU_MENUPROXY= && awf-gtk3`

GTK 2

Expand All @@ -33,22 +39,29 @@ GTK 3

GTK 4

Coming soon.
[![A widget factory - GTK 4 - Main window](images/thumbs/gtk4.png?raw=true)](images/gtk4.png?raw=true)
[![A widget factory - GTK 4 - Test menu](images/thumbs/gtk4-menu.png?raw=true)](images/gtk4-menu.png?raw=true)

## SIGHUP
The theme used for the screenshots is available [here](/~https://github.com/luigifab/human-theme).

To auto reload theme on files change, you can use [entr](/~https://github.com/clibs/entr).
## Dev

To reload theme on files change, you can use [Entr](/~https://github.com/clibs/entr) and the *sighup* signal.
```
sudo apt install entr
sudo apt install entr or sudo dnf install entr
ls ~/.themes/yourtheme/gtk-3.0/*.css | entr killall -s SIGHUP awf-gtk3
```

## Copyright and Credits

This program is provided under the terms of the *GNU GPLv3* license.
- Current version: 2.2.0 (11/11/2020)
- Compatibility: GTK 2.24 / 3.0 / 3.2 / 3.4 / 3.6 / 3.8 / 3.10 / 3.12 / 3.14 / 3.16 / 3.18 / 3.20 / 3.22 / 3.24
- Translations: English (en), French (fr)

This program is provided under the terms of the *GNU GPLv3+* license.

* Updated by Fabrice Creuzot (luigifab)
* Forked from [awf](/~https://github.com/valr/awf) by Valère Monseur (valr)
* Thanks to Ottoman Kent (for testing in ubuntu and bug report)
* Thanks to Dwight Engen (for rpm specification file: awf.spec.in)
* Thanks to Josef Radinger (for sorted menus, text in progress bars, treeviews with scrollbars)
* Thanks to Josef Radinger (for sorted menus, text in progress bars, treeviews with scrollbars)
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions src/build.sh → build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# debian: sudo apt install build-essential dh-autoreconf intltool libgtk2.0-dev libgtk-3-dev libgtk-4-dev
# fedora: sudo dnf install autoconf automake gtk2-devel gtk3-devel gtk4-devel

# remove old builds
rm -f awf-gtk2 awf-gtk3 awf-gtk4
Expand Down
2 changes: 1 addition & 1 deletion src/configure.ac → configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([A widget factory], [2.1.0])
AC_INIT([A widget factory], [2.2.0])
AC_CONFIG_SRCDIR([src/awf.c])

AM_INIT_AUTOMAKE
Expand Down
5 changes: 5 additions & 0 deletions debian-gtk2/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
awf-gtk2 (2.2.0-5) unstable; urgency=low

* Initial debian package release (Closes: #959434)

-- Fabrice Creuzot <code@luigifab.fr> Wed, 11 Nov 2020 12:00:00 +0000
9 changes: 5 additions & 4 deletions src/debian-gtk2/control → debian-gtk2/control
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Vcs-Git: /~https://github.com/luigifab/awf-extended.git
Package: awf-gtk2
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A widget factory is a theme preview application for GTK
It displays the various widget types provided by GTK in a single window
allowing to see the visual effect of the applied theme.
Description: Theme preview application for GTK
A widget factory is a theme preview application for GTK. It displays the
various widget types provided by GTK in a single window allowing to see
the visual effect of the applied theme.
.
This package include the gtk2 version.
This package provides the gtk2 version.
File renamed without changes.
112 changes: 112 additions & 0 deletions debian-gtk2/deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/bin/bash
# debian: sudo apt install dpkg-dev devscripts build-essential dh-make dh-autoreconf intltool libgtk2.0-dev



cd "$(dirname "$0")"
version="2.2.0"
gtk="gtk2"

rm -rf builder/
mkdir builder

# copy to a tmp directory
if [ true ]; then
cd builder
wget /~https://github.com/luigifab/awf-extended/archive/v${version}/awf-extended-${version}.tar.gz
tar xzf awf-extended-${version}.tar.gz
cd ..
else
temp=awf-extended-${version}
mkdir /tmp/${temp}
cp -r ../* /tmp/${temp}/
rm -rf /tmp/${temp}/*/builder/

mv /tmp/${temp} builder/
cp /usr/share/common-licenses/GPL-3 builder/${temp}/LICENSE

cd builder/
tar czf ${temp}.tar.gz ${temp}
cd ..
fi


# create packages for debian and ubuntu
for serie in unstable hirsute groovy focal bionic xenial trusty precise; do

if [ $serie = "unstable" ]; then
# for ubuntu
cp -a builder/awf-extended-${version}/ builder/awf-extended-${version}+src/
# debian only
cd builder/awf-extended-${version}/
else
# ubuntu only
cp -a builder/awf-extended-${version}+src/ builder/awf-extended-${version}+${serie}/
cd builder/awf-extended-${version}+${serie}/
fi

dh_make -s -y -f ../awf-extended-${version}.tar.gz -p awf-${gtk}

rm -f debian/*ex debian/*EX debian/README* debian/*doc*
mkdir debian/upstream
cp debian-${gtk}/* debian/
mv debian/metadata debian/upstream/metadata



if [ $serie = "unstable" ]; then
dpkg-buildpackage -us -uc
else
# debhelper: unstable:13 hirsute:13 groovy:13 focal:12 bionic:9 xenial:9 trusty:9 precise:9
if [ $serie = "focal" ]; then
sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 12)/g' debian/control
fi
if [ $serie = "bionic" ]; then
sed -i 's/dh $@/dh $@ --with autoreconf/g' debian/rules
sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 9), dh-autoreconf/g' debian/control
fi
if [ $serie = "xenial" ]; then
sed -i 's/dh $@/dh $@ --with autoreconf/g' debian/rules
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9), dh-autoreconf/g' debian/control
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
echo 9 > debian/compat
fi
if [ $serie = "trusty" ]; then
sed -i 's/dh $@/dh $@ --with autotools_dev,autoreconf/g' debian/rules
sed -i 's/override_dh_update_autotools_config/override_dh_autotools-dev_updateconfig/g' debian/rules
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9), autotools-dev, dh-autoreconf/g' debian/control
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
echo 9 > debian/compat
fi
if [ $serie = "precise" ]; then
sed -i 's/dh $@/dh $@ --with autotools_dev,autoreconf/g' debian/rules
sed -i 's/override_dh_update_autotools_config/override_dh_autotools-dev_updateconfig/g' debian/rules
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9), autotools-dev, dh-autoreconf/g' debian/control
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
echo 9 > debian/compat
fi
sed -i 's/unstable/'${serie}'/g' debian/changelog
sed -i 's/-5) /-5+'${serie}') /' debian/changelog
dpkg-buildpackage -us -uc -ui -d -S
fi
echo "==========================="
cd ..

if [ $serie = "unstable" ]; then
# debian only
debsign awf-${gtk}_${version}-*.changes
echo "==========================="
lintian -EviIL +pedantic awf-${gtk}_${version}-*.deb
else
# ubuntu only
debsign awf-${gtk}_${version}*+${serie}*source.changes
fi
echo "==========================="
cd ..
done

ls -dltrh $PWD/builder/*.deb $PWD/builder/*.changes
echo "==========================="

# cleanup
rm -rf builder/*/
3 changes: 3 additions & 0 deletions debian-gtk2/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
applications/awf-gtk2.desktop usr/share/applications
icons/* usr/share/icons/hicolor
locale/* usr/share/locale
File renamed without changes.
22 changes: 22 additions & 0 deletions debian-gtk2/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
dh $@

override_dh_update_autotools_config:
sed -i 's/ -eq 3/ -eq -1/g' configure.ac
sed -i 's/ -eq 4/ -eq -1/g' configure.ac
touch NEWS
touch AUTHORS
touch README
touch ChangeLog
mv LICENSE COPYING
for file in icons/*/*/*.png; do mv $$file `dirname $$file`/awf-gtk2.png; done
for file in icons/*/*/*.svg; do mv $$file `dirname $$file`/awf-gtk2.svg; done
for file in src/po/*.po; do \
code=`basename "$$file" .po`; \
mkdir -p locale/$$code/LC_MESSAGES/; \
msgfmt src/po/$$code.po -o locale/$$code/LC_MESSAGES/awf-gtk2.mo; \
done
File renamed without changes.
5 changes: 5 additions & 0 deletions debian-gtk3/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
awf-gtk3 (2.2.0-5) unstable; urgency=low

* Initial debian package release (Closes: #959436)

-- Fabrice Creuzot <code@luigifab.fr> Wed, 11 Nov 2020 12:00:00 +0000
9 changes: 5 additions & 4 deletions src/debian-gtk3/control → debian-gtk3/control
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Vcs-Git: /~https://github.com/luigifab/awf-extended.git
Package: awf-gtk3
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A widget factory is a theme preview application for GTK
It displays the various widget types provided by GTK in a single window
allowing to see the visual effect of the applied theme.
Description: Theme preview application for GTK
A widget factory is a theme preview application for GTK. It displays the
various widget types provided by GTK in a single window allowing to see
the visual effect of the applied theme.
.
This package include the gtk3 version.
This package provides the gtk3 version.
File renamed without changes.
112 changes: 112 additions & 0 deletions debian-gtk3/deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/bin/bash
# debian: sudo apt install dpkg-dev devscripts build-essential dh-make dh-autoreconf intltool libgtk-3-dev



cd "$(dirname "$0")"
version="2.2.0"
gtk="gtk3"

rm -rf builder/
mkdir builder

# copy to a tmp directory
if [ true ]; then
cd builder
wget /~https://github.com/luigifab/awf-extended/archive/v${version}/awf-extended-${version}.tar.gz
tar xzf awf-extended-${version}.tar.gz
cd ..
else
temp=awf-extended-${version}
mkdir /tmp/${temp}
cp -r ../* /tmp/${temp}/
rm -rf /tmp/${temp}/*/builder/

mv /tmp/${temp} builder/
cp /usr/share/common-licenses/GPL-3 builder/${temp}/LICENSE

cd builder/
tar czf ${temp}.tar.gz ${temp}
cd ..
fi


# create packages for debian and ubuntu
for serie in unstable hirsute groovy focal bionic xenial trusty precise; do

if [ $serie = "unstable" ]; then
# for ubuntu
cp -a builder/awf-extended-${version}/ builder/awf-extended-${version}+src/
# debian only
cd builder/awf-extended-${version}/
else
# ubuntu only
cp -a builder/awf-extended-${version}+src/ builder/awf-extended-${version}+${serie}/
cd builder/awf-extended-${version}+${serie}/
fi

dh_make -s -y -f ../awf-extended-${version}.tar.gz -p awf-${gtk}

rm -f debian/*ex debian/*EX debian/README* debian/*doc*
mkdir debian/upstream
cp debian-${gtk}/* debian/
mv debian/metadata debian/upstream/metadata



if [ $serie = "unstable" ]; then
dpkg-buildpackage -us -uc
else
# debhelper: unstable:13 hirsute:13 groovy:13 focal:12 bionic:9 xenial:9 trusty:9 precise:9
if [ $serie = "focal" ]; then
sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 12)/g' debian/control
fi
if [ $serie = "bionic" ]; then
sed -i 's/dh $@/dh $@ --with autoreconf/g' debian/rules
sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 9), dh-autoreconf/g' debian/control
fi
if [ $serie = "xenial" ]; then
sed -i 's/dh $@/dh $@ --with autoreconf/g' debian/rules
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9), dh-autoreconf/g' debian/control
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
echo 9 > debian/compat
fi
if [ $serie = "trusty" ]; then
sed -i 's/dh $@/dh $@ --with autotools_dev,autoreconf/g' debian/rules
sed -i 's/override_dh_update_autotools_config/override_dh_autotools-dev_updateconfig/g' debian/rules
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9), autotools-dev, dh-autoreconf/g' debian/control
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
echo 9 > debian/compat
fi
if [ $serie = "precise" ]; then
sed -i 's/dh $@/dh $@ --with autotools_dev,autoreconf/g' debian/rules
sed -i 's/override_dh_update_autotools_config/override_dh_autotools-dev_updateconfig/g' debian/rules
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9), autotools-dev, dh-autoreconf/g' debian/control
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
echo 9 > debian/compat
fi
sed -i 's/unstable/'${serie}'/g' debian/changelog
sed -i 's/-5) /-5+'${serie}') /' debian/changelog
dpkg-buildpackage -us -uc -ui -d -S
fi
echo "==========================="
cd ..

if [ $serie = "unstable" ]; then
# debian only
debsign awf-${gtk}_${version}-*.changes
echo "==========================="
lintian -EviIL +pedantic awf-${gtk}_${version}-*.deb
else
# ubuntu only
debsign awf-${gtk}_${version}*+${serie}*source.changes
fi
echo "==========================="
cd ..
done

ls -dltrh $PWD/builder/*.deb $PWD/builder/*.changes
echo "==========================="

# cleanup
rm -rf builder/*/
Loading

0 comments on commit 9d0a380

Please sign in to comment.