greq-0.9.4: Add greq, a program for building gtk+-1.2 dialogs from scripts.
authorAlex Ferguson <thoughtmonster@gmail.com>
Fri, 12 Nov 2010 15:13:41 +0000 (17:13 +0200)
committerKristoffer Ericson <kristoffer.ericson@gmail.com>
Mon, 15 Nov 2010 16:03:12 +0000 (17:03 +0100)
Added tab-delimiter.patch, which changes the delimiter between multiple
return arguments from \v to \t because busybox ash doesn't support arrays
and accessing individual arguments with cut is easier when they're tab
delimited.

Added wmclass-option.patch which adds an option for setting the window's
WMCLASS, along with proper defaults for window size and position.

Signed-off-by: Alex Ferguson <thoughtmonster@gmail.com>
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
recipes/greq/greq-0.9.4/tab-delimiter.patch [new file with mode: 0644]
recipes/greq/greq-0.9.4/wmclass-option.patch [new file with mode: 0644]
recipes/greq/greq_0.9.4.bb [new file with mode: 0644]

diff --git a/recipes/greq/greq-0.9.4/tab-delimiter.patch b/recipes/greq/greq-0.9.4/tab-delimiter.patch
new file mode 100644 (file)
index 0000000..ca8a156
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ru greq-0.9.4.orig/src/okay_cancel.c greq-0.9.4/src/okay_cancel.c
+--- greq-0.9.4.orig/src/okay_cancel.c  2002-03-16 19:25:40.000000000 +0200
++++ greq-0.9.4/src/okay_cancel.c       2010-11-07 12:59:59.633333893 +0200
+@@ -26,7 +26,7 @@
+       
+       /* if there are more widgets with output values, separate them */
+       if (current)
+-      putchar ('\v');
++      putchar ('\t');
+    }
+    quit(RETURN_OK);
+ }
diff --git a/recipes/greq/greq-0.9.4/wmclass-option.patch b/recipes/greq/greq-0.9.4/wmclass-option.patch
new file mode 100644 (file)
index 0000000..ec4868e
--- /dev/null
@@ -0,0 +1,31 @@
+diff -ru greq-0.9.4.orig/src/greq.c greq-0.9.4/src/greq.c
+--- greq-0.9.4.orig/src/greq.c 2002-04-19 21:44:02.000000000 +0300
++++ greq-0.9.4/src/greq.c      2010-11-07 15:57:14.393333895 +0200
+@@ -52,12 +52,15 @@
+    if (!win) quit (RETURN_ERROR_NOMEM);
+    gtk_signal_connect ((GtkObject *)win, "delete_event", // quit if window
+                      GTK_SIGNAL_FUNC (cancel_cb), NULL);// gets closed
++   gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER);
++   gtk_window_set_default_size(GTK_WINDOW(win), 200, 100);
++
+    msgbox = gtk_vbox_new (FALSE, 2);
+    if (!msgbox) quit (RETURN_ERROR_NOMEM);
+    gtk_container_set_border_width((GtkContainer *)msgbox, 5);
+    gtk_box_pack_start_defaults ((GtkBox*)(((GtkDialog*)win)->vbox), msgbox);
+  
+-   while ((c = getopt (argc, argv, "h?m:t:p:E::e::d:c:C:a::o:")) != -1)
++   while ((c = getopt (argc, argv, "h?m:t:p:E::e::d:c:C:a:w::o:")) != -1)
+      {
+       extern char *optarg;
+       extern int optind;
+@@ -100,6 +103,10 @@
+               cancel_label = (gchar *)win;
+            } 
+            break;
++         case 'w':
++           if (optarg)
++              gtk_window_set_wmclass((GtkWindow *)win, (gchar *)optarg, (gchar *)optarg);
++           break;
+          case '?':
+          case 'h':
+            fputs(GREQ_VERSION, stderr);
diff --git a/recipes/greq/greq_0.9.4.bb b/recipes/greq/greq_0.9.4.bb
new file mode 100644 (file)
index 0000000..a8d54af
--- /dev/null
@@ -0,0 +1,16 @@
+DESCRIPTION = "greq lets you build GTK dialogs from within a bash script."
+LICENSE = "GPL"
+DEPENDS = "gtk+-1.2"
+
+PR = "r0"
+
+SRC_URI = "http://download.berlios.de/greq/greq-${PV}.tar.gz \
+          file://tab-delimiter.patch \
+          file://wmclass-option.patch"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-gtk=1.2"
+
+SRC_URI[md5sum] = "457e709817e5d24742909e6c0b37284b"
+SRC_URI[sha256sum] = "1e67c1206b32716093ea4147d54741a49f48b0ac8890b785c4d54a60c4e7be0b"