ido: Added.

Signed-off-by: Willy Sudiarto Raharjo <willysr@gmail.com>
This commit is contained in:
Willy Sudiarto Raharjo 2019-09-25 02:28:55 +07:00
parent d7bdd77092
commit 132c71fb23
No known key found for this signature in database
GPG key ID: 887B8374D7333381
4 changed files with 225 additions and 0 deletions

View file

@ -0,0 +1,34 @@
From 9e672e82e01f0bbe11869a4b67bd0a26c9494c50 Mon Sep 17 00:00:00 2001
From: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
Date: Wed, 29 Oct 2014 00:36:15 -0400
Subject: [PATCH] Temporarily disable previous-button drop-shadow drawing
When indicator-sound is connected to a media player through mpris,
a bug in either cairo or ido causes unity-panel-service to segfault
---
src/idoplaybackmenuitem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/idoplaybackmenuitem.c b/src/idoplaybackmenuitem.c
index 11af9bb..5fb66da 100644
--- a/src/idoplaybackmenuitem.c
+++ b/src/idoplaybackmenuitem.c
@@ -1443,6 +1443,7 @@ ido_playback_menu_item_draw (GtkWidget* button, cairo_t *cr)
MIDDLE_END);
}
+#if 0
// draw previous-button drop-shadow
if ((item->cur_pushed_button == BUTTON_PREVIOUS && item->keyboard_activated) ||
item->cur_hover_button == BUTTON_PREVIOUS)
@@ -1485,6 +1486,7 @@ ido_playback_menu_item_draw (GtkWidget* button, cairo_t *cr)
_surface_blur (surf, 1);
_finalize (cr, &cr_surf, &surf, abs_prev_x, PREV_Y + 1.0f);
}
+#endif
// draw previous-button
_setup (&cr_surf, &surf, PREV_WIDTH, PREV_HEIGHT);
--
2.1.2

View file

@ -0,0 +1,69 @@
--- a/configure.ac
+++ b/configure.ac
@@ -140,6 +140,16 @@ dnl = GTK Doc Check ====================
GTK_DOC_CHECK([1.8])
+dnl = GTK+ Ubuntu Private API =================================================
+
+AC_ARG_ENABLE([ubuntu-private-api],
+ [AS_HELP_STRING([--enable-ubuntu-private-api=@<:@no/yes@:>@],
+ [Use Ubuntu GTK+ Private API @<:@default=yes@:>@])],
+ [enable_ubuntu_private_api="$enableval"],
+ [enable_ubuntu_private_api=yes])
+
+AM_CONDITIONAL([USE_UBUNTU_PRIVATE_API], [test "x$enable_ubuntu_private_api" != xno])
+
dnl ===========================================================================
AC_CONFIG_FILES([
@@ -160,6 +170,7 @@ echo ""
echo " Prefix : ${prefix}"
echo " gcov : ${use_gcov}"
echo " introspection: ${enable_introspection}"
+echo " ubuntu gtk+ : ${enable_ubuntu_private_api}"
echo ""
echo " Documentation: ${enable_gtk_doc}"
echo ""
--- a/src/idomenuitemfactory.c
+++ b/src/idomenuitemfactory.c
@@ -17,6 +17,7 @@
* Lars Uebernickel <lars.uebernickel@canonical.com>
*/
+#ifdef USE_UBUNTU_PRIVATE_API
#include <gtk/gtk.h>
#include <gtk/ubuntu-private.h>
@@ -117,3 +118,4 @@ static void
ido_menu_item_factory_init (IdoMenuItemFactory *factory)
{
}
+#endif
--- a/src/libido.c
+++ b/src/libido.c
@@ -28,9 +28,11 @@
void
ido_init (void)
{
+#ifdef USE_UBUNTU_PRIVATE_API
GType ido_menu_item_factory_get_type (void);
/* make sure this extension point is registered so that gtk calls it
* when finding custom menu items */
g_type_ensure (ido_menu_item_factory_get_type ());
+#endif
}
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -68,6 +68,10 @@ AM_CPPFLAGS = \
$(MAINTAINER_CFLAGS) \
-Wall -Werror -Wextra -Wno-unused-parameter -Wno-error=deprecated-declarations
+if USE_UBUNTU_PRIVATE_API
+AM_CPPFLAGS += -DUSE_UBUNTU_PRIVATE_API
+endif
+
AM_CFLAGS = \
$(COVERAGE_CFLAGS)

110
testing/ido/ido.SlackBuild Normal file
View file

@ -0,0 +1,110 @@
#!/bin/sh
# Slackware build script for ido
# Copyright 2019 Willy Sudiarto Raharjo <willysr@slackware-id.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ido
VERSION=${VERSION:-13.10.0+17.04.20161028}
BUILD=${BUILD:-1}
TAG=${TAG:-_msb}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
wget -c https://launchpad.net/ubuntu/+archive/primary/+files/ido_13.10.0+17.04.20161028.orig.tar.gz
CWD=$(pwd)
TMP=${TMP:-/tmp/msb}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
elif [ "$ARCH" = "arm" ]; then
SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
tar xvf $CWD/${PRGNAM}_$VERSION.orig.tar.gz
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -p1 < $CWD/0001-Temporarily-disable-previous-button-drop-shadow-draw.patch
patch -p1 < $CWD/ido-optional.patch
autoreconf -vfi
CFLAGS="$SLKCFLAGS -Wno-error" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-static \
--disable-introspection \
--disable-ubuntu-private-api \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING INSTALL NEWS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

12
testing/ido/slack-desc Normal file
View file

@ -0,0 +1,12 @@
|-----handy-ruler------------------------------------------------------|
ido: ido (Widgets and other objects used for indicators)
ido:
ido: Widgets and other objects used for indicators.
ido:
ido:
ido:
ido: Project URL: https://launchpad.net/libido
ido:
ido:
ido:
ido: