From 11b32e0a76482a958306807af483bad63736f94f Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Mon, 10 Dec 2012 14:07:41 -0600
Subject: Tilda:  add our patch to stop the tilda config wizard from being
 displayed unless it's on the command line refs #876

---
 abs/core/tilda/PKGBUILD         | 10 ++++++----
 abs/core/tilda/__changelog      |  2 ++
 abs/core/tilda/tilda_hide.patch | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 4 deletions(-)
 create mode 100644 abs/core/tilda/__changelog
 create mode 100644 abs/core/tilda/tilda_hide.patch

diff --git a/abs/core/tilda/PKGBUILD b/abs/core/tilda/PKGBUILD
index a579476..814a5c3 100644
--- a/abs/core/tilda/PKGBUILD
+++ b/abs/core/tilda/PKGBUILD
@@ -5,7 +5,7 @@
 
 pkgname=tilda
 pkgver=0.9.6
-pkgrel=6
+pkgrel=7
 pkgdesc="Linux terminal based on classic terminals from first person shooter games"
 arch=('i686' 'x86_64')
 url="http://tilda.sourceforge.net"
@@ -13,7 +13,7 @@ license=('GPL')
 depends=('vte' 'confuse' 'libglade')
 makedepends=('gawk')
 source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
-        tilda-fix.patch tilda-glib2.patch tilda-conf-sigsegv.patch config_0)
+tilda-fix.patch tilda-glib2.patch tilda-conf-sigsegv.patch config_0 tilda_hide.patch )
 
 build() {
   cd $srcdir/$pkgname-$pkgver
@@ -27,6 +27,7 @@ build() {
 # fix segfaults on malformed config files FS#29754
   patch -p0 -i ${srcdir}/$pkgname-conf-sigsegv.patch
 
+  patch -p0 -i ${srcdir}/tilda_hide.patch
   ./configure --prefix=/usr
   make
 }
@@ -35,7 +36,7 @@ package() {
   cd $srcdir/$pkgname-$pkgver
 
   make DESTDIR=${pkgdir} install
-  
+
   #default config
   install -D -m 0755 $startdir/src/config_0 $startdir/pkg/etc/tilda_config
 
@@ -44,4 +45,5 @@ md5sums=('b44ebe04fdfd312e9ddc5e0ed77f4289'
          '6ca2c5ae5acd254b1e89b319b118b8e1'
          'f1fc7009418c2ed7b506d5c555f072cb'
          '3e08a0b2d48bba69cf96bef1faeca429'
-         '754753190e0990cd6fba27b3c931bd0e')
+         '754753190e0990cd6fba27b3c931bd0e'
+         '0cc3020eabc74d939b0b978944d11693')
diff --git a/abs/core/tilda/__changelog b/abs/core/tilda/__changelog
new file mode 100644
index 0000000..b637dfd
--- /dev/null
+++ b/abs/core/tilda/__changelog
@@ -0,0 +1,2 @@
+tilda_hide patch
+This stops tilda from showing the config wizard unless tilda is started with -C
diff --git a/abs/core/tilda/tilda_hide.patch b/abs/core/tilda/tilda_hide.patch
new file mode 100644
index 0000000..19d2869
--- /dev/null
+++ b/abs/core/tilda/tilda_hide.patch
@@ -0,0 +1,35 @@
+--- src/tilda.c.orig	2012-12-10 13:11:23.336581090 -0600
++++ src/tilda.c	2012-12-10 13:44:31.543784376 -0600
+@@ -582,11 +582,11 @@
+     if (access (tw->config_file, R_OK) == -1)
+     {
+         /* We probably need a default key, too ... */
+-        gchar *default_key = g_strdup_printf ("F%d", tw->instance+1);
++        gchar *default_key = g_strdup_printf ("F%d", tw->instance+3);
+         config_setstr ("key", default_key);
+         g_free (default_key);
+ 
+-        need_wizard = TRUE;
++//         need_wizard = TRUE;
+     }
+ 
+     /* Show the wizard if we need to.
+@@ -598,12 +598,12 @@
+     {
+         gint ret = tilda_keygrabber_bind (config_getstr ("key"), tw);
+ 
+-        if (!ret)
+-        {
+-            /* The key was unbindable, so we need to show the wizard */
+-            show_invalid_keybinding_dialog (NULL);
+-            wizard (tw);
+-        }
++//         if (!ret)
++//         {
++//             /* The key was unbindable, so we need to show the wizard */
++//             show_invalid_keybinding_dialog (NULL);
++//             wizard (tw);
++//         }
+     }
+ 
+     if (config_getbool ("hidden"))
-- 
cgit v0.12

