Bug#515274: gbuffy: Depends on GTK 1.2

2009-05-21 Thread Kelvin Ku
Thanks for the gtk2 patch. We are not using debian so we're not sure what your
build environment is, but we encountered a few hitches building it after
patching:

   - the original configure was built with autoconf 2.13, but the patched
 configure.in uses gtk2 m4 macros which seem to require autoconf 2.61
   - the Makefile.in does not work with configure generated by autoconf 2.61;
 the resulting Makefile has some un-substituted $expressions
   - fix: hack configure to make it work

Also, the patched gbuffy itself had some problems:

   - segfaults when opening the configuration dialog or displaying
 headers (both operations try to draw a pixmap)
   - fix: remove the gdk_draw_bitmap function in gbuffy.c so that the internal
 gdk_draw_drawable function is used instead

   - window resets position when gbuffy_display is called again, e.g., after
 closing configuration dialog
   - fix: use a configure_event callback instead of using the timeout callback
 to update internal window state after a position/dimension change

   - mailbox button and main window don't grow and shrink
 immediately/correctly in response to changes in button label lengths
 (mailbox: count)
   - fix: still working on it; button and window sizes are correct when gbuffy
 is initially launched now, but not while it is running

We're not sure who exactly to contact about patching gbuffy, since the gtk2
patches seem to be pending only for the debian package. The gendiff output for
our patches is below, if you're interested.

Regards,
Kelvin Ku

--- ../tmp/gbuffy.c 2009-05-21 11:49:03.794448649 -0400
+++ gbuffy.c2009-05-21 11:48:06.962703339 -0400
@@ -137,54 +144,6 @@
   return gdk_bitmap_create_from_data (w, data, 48, 48);
 }
 
-#include gdk/gdkprivate.h
-void
-gdk_draw_bitmap (GdkDrawable *drawable,
- GdkGC   *gc,
- GdkPixmap   *src,
- gint xsrc,
- gint ysrc,
- gint xdest,
- gint ydest,
- gint width,
- gint height)
-{
-  GdkWindow *drawable_private;
-  GdkWindow *src_private;
-  GdkGC *gc_private;
-  g_return_if_fail (drawable != NULL);
-  g_return_if_fail (src != NULL);
-  g_return_if_fail (gc != NULL);
-
-  drawable_private = (GdkWindow *) drawable;
-  src_private = (GdkWindow *) src;
-  gc_private = (GdkGC *) gc;
-
-  if (width == -1)
-/*width = src_private-width; */
-gdk_drawable_get_size (src_private, width, height);
-  if (height == -1)
-/*height = src_private-height; */
-gdk_drawable_get_size (src_private, width, height);
-
-/* BDD - No idea if this is correct. */
-/*  XCopyPlane (drawable_private-xdisplay, */
-/* src_private-xwindow, */
-/* drawable_private-xwindow, */
-/* gc_private-xgc, */
-/* xsrc, ysrc, */
-/* width, height, */
-/* xdest, ydest, 1); */
-/*} */
-  XCopyPlane (gdk_x11_display_get_xdisplay(drawable_private),
- gdk_x11_get_default_root_xwindow(),
- gdk_x11_get_default_root_xwindow,
- gdk_x11_gc_get_xgc(gc_private),
- xsrc, ysrc,
- width, height,
- xdest, ydest, 1);
-}
-
 gint configure_event (GtkWidget *da, GdkEventConfigure *event, BOX_INFO *box)
 {
   GList *headers;
@@ -554,9 +536,6 @@
 {
   BOX_INFO *mbox;
   int change;
-  gint cur_width;
-  gint cur_height;
-  static unsigned int beenhere = 0;
 
   mbox = MailboxInfo;
   while (mbox != NULL)
@@ -577,24 +560,6 @@
 mbox = mbox-next;
   }
 
-  /* This is the wrong way to do this, but its quick and dirty.  I
-   * should figure out what event I should capture to receive and update
-   * this information, but instead we just update it here. */
-
-  gdk_window_get_size(MainWindow-window, cur_width, cur_height);
-  if (cur_width != Width)
-Width = cur_width;
-  if (cur_height != Height)
-Height = cur_height;
-  
-  HorizPos.sign = POSITIVE;
-  VertPos.sign = POSITIVE;
-
-  if (beenhere)
-gdk_window_get_position (MainWindow-window, HorizPos.value, 
VertPos.value);
-  else
-beenhere = 1;
-
   return TRUE;
 }
 
@@ -637,6 +602,19 @@
 }
 #endif
 
+/*
+ * Saves main window position/dimensions in case it's destroyed and remade.
+ */
+gint main_window_configure_event (GtkWidget *widget, GdkEventConfigure *event, 
gpointer user_data)
+{
+   HorizPos.value = event-x;
+   VertPos.value = event-y;
+   HorizPos.sign = VertPos.sign = POSITIVE;
+   Width = event-width;
+   Height = event-height;
+   return TRUE;
+}
+
 void gbuffy_display ()
 {
   GtkWidget *box;
@@ -739,36 +718,40 @@
  GTK_FILL | GTK_SHRINK,
  0, 0);
 gtk_widget_show (mbox-button);
-gtk_signal_connect_after (GTK_OBJECT (mbox-button), button_press_event,
-   GTK_SIGNAL_FUNC (gbuffy_button_callback), mbox);
+
+gtk_signal_connect (GTK_OBJECT (mbox-button), 

Bug#515274: gbuffy: Depends on GTK 1.2

2009-05-21 Thread Adeodato Simó
+ Kelvin Ku (Thu, 21 May 2009 12:08:39 -0400):

 Thanks for the gtk2 patch. We are not using debian so we're not sure what your
 build environment is, but we encountered a few hitches building it after
 patching:

Hello, Kelvin. Thanks for providing these fixes for the GTK2 patch. If
I'm not mistaken, the upstream of GBuffy is not really active any more,
so I think if somebody feels up to maintaining it as upstream, they
should go for it. Is this something any of you would be interested in?

Personally, I don't use GBuffy anymore myself, so I also need to find
another person to become its Debian maintainer.

Thanks!

- the original configure was built with autoconf 2.13, but the patched
  configure.in uses gtk2 m4 macros which seem to require autoconf 2.61
- the Makefile.in does not work with configure generated by autoconf 2.61;
  the resulting Makefile has some un-substituted $expressions
- fix: hack configure to make it work

 Also, the patched gbuffy itself had some problems:

- segfaults when opening the configuration dialog or displaying
  headers (both operations try to draw a pixmap)
- fix: remove the gdk_draw_bitmap function in gbuffy.c so that the internal
  gdk_draw_drawable function is used instead

- window resets position when gbuffy_display is called again, e.g., after
  closing configuration dialog
- fix: use a configure_event callback instead of using the timeout callback
  to update internal window state after a position/dimension change

- mailbox button and main window don't grow and shrink
  immediately/correctly in response to changes in button label lengths
  (mailbox: count)
- fix: still working on it; button and window sizes are correct when gbuffy
  is initially launched now, but not while it is running

 We're not sure who exactly to contact about patching gbuffy, since the gtk2
 patches seem to be pending only for the debian package. The gendiff output for
 our patches is below, if you're interested.

-- 
- Are you sure we're good?
- Always.
-- Rory and Lorelai




-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#515274: gbuffy: Depends on GTK 1.2

2009-03-23 Thread Barry deFreese

tags 515274 + patch

thank you


Hi,

Here is a patch I created that at least builds and runs with Gtk2.  I'm 
not very familiar with the package so I could not do much testing 
unfortunately.


Hope it helps.

Thanks,

Barry deFreese
Debian QA


diff -u gbuffy-0.2.6/debian/control gbuffy-0.2.6/debian/control
--- gbuffy-0.2.6/debian/control
+++ gbuffy-0.2.6/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Adeodato Simó d...@net.com.org.es
 Standards-Version: 3.7.3
-Build-Depends: debhelper, quilt, libwings-dev, libgtk1.2-dev, 
libcompfaceg1-dev, libssl-dev
+Build-Depends: debhelper, quilt, autoconf, automake, libwings-dev, 
libgtk2.0-dev, libcompfaceg1-dev, libssl-dev
 Vcs-Bzr: http://people.debian.org/~adeodato/code/packages/gbuffy
 
 Package: gbuffy
diff -u gbuffy-0.2.6/debian/rules gbuffy-0.2.6/debian/rules
--- gbuffy-0.2.6/debian/rules
+++ gbuffy-0.2.6/debian/rules
@@ -8,6 +8,9 @@
 
 build-stamp: patch
dh_testdir
+
+   autoreconf -f -i
+
./configure --prefix=/usr
$(MAKE) WITH_LIBWINGS=1
touch build-stamp
diff -u gbuffy-0.2.6/debian/changelog gbuffy-0.2.6/debian/changelog
--- gbuffy-0.2.6/debian/changelog
+++ gbuffy-0.2.6/debian/changelog
@@ -1,3 +1,10 @@
+gbuffy (0.2.6-13.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Build with Gtk2.
+
+ -- Barry deFreese bdefre...@debian.org  Mon, 23 Mar 2009 23:11:31 -0400
+
 gbuffy (0.2.6-13) unstable; urgency=low
 
   * Add patch from Tim Connors to augment the size of the xface buffer
diff -u gbuffy-0.2.6/debian/patches/series gbuffy-0.2.6/debian/patches/series
--- gbuffy-0.2.6/debian/patches/series
+++ gbuffy-0.2.6/debian/patches/series
@@ -6,0 +7 @@
+40_gtk2.diff
only in patch2:
unchanged:
--- gbuffy-0.2.6.orig/debian/patches/40_gtk2.diff
+++ gbuffy-0.2.6/debian/patches/40_gtk2.diff
@@ -0,0 +1,180 @@
+Index: gbuffy-0.2.6/configure.in
+===
+--- gbuffy-0.2.6.orig/configure.in 2009-03-23 23:12:54.0 -0400
 gbuffy-0.2.6/configure.in  2009-03-23 23:17:10.0 -0400
+@@ -18,7 +18,7 @@
+ AC_DEFINE_UNQUOTED(VERSION, $VERSION)
+ AC_SUBST(VERSION)
+ 
+-AM_PATH_GTK(1.1.11)
++AM_PATH_GTK_2_0(2.0.0)
+ 
+ gbuffy_led=no
+ AC_ARG_ENABLE(led, [  --enable-ledEnable LINUX specific LED 
support],
+@@ -57,16 +57,11 @@
+])
+ 
+ if test $gnome_applet = yes; then
+-  AC_DEFINE(GNOME_APPLET)
+   AC_MSG_RESULT(Building as a GNOME Applet)
+-  GNOME_INIT(applets)
+-  GAPPLET_INCLUDE=`$GNOME_CONFIG --cflags applets`
+-  GAPPLET_LIBS=`$GNOME_CONFIG --libs applets`
++  PKG_CHECK_MODULES(APPLET_GNOME, libpanelapplet-2.0, use_applet_gnome=yes, 
use_applet_gnome=no)
+ else
+   AC_MSG_RESULT(Building as a standalone program)
+ fi
+-AC_SUBST(GAPPLET_INCLUDE)
+-AC_SUBST(GAPPLET_LIBS)
+
+ dnl gbuffy_nntp_server=no
+ dnl AC_ARG_ENABLE(nntp, [  --enable-nntp[=server]  Enable NNTP 'Mailbox' 
support],
+Index: gbuffy-0.2.6/Makefile.in
+===
+--- gbuffy-0.2.6.orig/Makefile.in  2009-03-23 23:17:31.0 -0400
 gbuffy-0.2.6/Makefile.in   2009-03-23 23:19:35.0 -0400
+@@ -16,14 +16,14 @@
+ 
+ insta...@install@
+ c...@cc@
+-XCPPFLAGS=-I. `...@gtk_config@ --cflags` @GAPPLET_INCLUDE@ @CPPFLAGS@
++XCPPFLAGS=-I. @GTK_CFLAGS@ @APPLET_GNOME_CFLAGS@ @CPPFLAGS@
+ cfla...@cflags@ $(XCPPFLAGS)
+ LDFLAGS=-L/usr/local/lib @LDFLAGS@
+ ifdef WITH_LIBWINGS
+-lib...@gtk_config@ --libs` @GAPPLET_LIBS@ -lWINGs @LIBS@
++li...@gtk_libs@ @APPLET_GNOME_LIBS@ -lWINGs @LIBS@
+ CFLAGS+=-DWITH_LIBWINGS
+ else
+-lib...@gtk_config@ --libs` @GAPPLET_LIBS@ -lPropList @LIBS@
++li...@gtk_libs@ @APPLET_GNOME_LIBS@ -lPropList @LIBS@
+ endif
+ 
+ OBJS = config.o count.o from.o gbconfig.o gbuffy.o lib.o rfc2047.o system.o \
+Index: gbuffy-0.2.6/gbuffy.c
+===
+--- gbuffy-0.2.6.orig/gbuffy.c 2009-03-23 23:20:57.0 -0400
 gbuffy-0.2.6/gbuffy.c  2009-03-23 23:21:19.0 -0400
+@@ -149,28 +149,37 @@
+  gint width,
+  gint height)
+ {
+-  GdkWindowPrivate *drawable_private;
+-  GdkWindowPrivate *src_private;
+-  GdkGCPrivate *gc_private;
++  GdkWindow *drawable_private;
++  GdkWindow *src_private;
++  GdkGC *gc_private;
+   g_return_if_fail (drawable != NULL);
+   g_return_if_fail (src != NULL);
+   g_return_if_fail (gc != NULL);
+ 
+-  drawable_private = (GdkWindowPrivate*) drawable;
+-  src_private = (GdkWindowPrivate*) src;
+-  if (drawable_private-destroyed || src_private-destroyed)
+-return;
+-  gc_private = (GdkGCPrivate*) gc;
++  drawable_private = (GdkWindow *) drawable;
++  src_private = (GdkWindow *) src;
++  gc_private = (GdkGC *) gc;
+ 
+   if (width == -1)
+-width = src_private-width;
++/*width = src_private-width; */
++gdk_drawable_get_size (src_private, width, height);
+   if (height == -1)
+-height = src_private-height;
++/*height 

Bug#515274: gbuffy: Depends on GTK 1.2

2009-02-15 Thread Moritz Muehlenhoff
Package: gbuffy
Severity: serious

gbuffy build-depends on libgtk1.2-dev, which will be removed for Squeeze.

Please port it to use GTK 2 or request it's removal.

Cheers,
Moritz

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=C, lc_ctype=de_de.iso-8859...@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages gbuffy depends on:
ii  libc6 2.7-18 GNU C Library: Shared libraries
pn  libcompfaceg1 none (no description available)
ii  libglib1.2ldbl1.2.10-19  The GLib library of C routines
pn  libgtk1.2 none (no description available)
ii  libssl0.9.8   0.9.8g-15  SSL shared libraries
ii  libx11-6  2:1.1.5-2  X11 client-side library
ii  libxext6  2:1.0.4-1  X11 miscellaneous extension librar
ii  libxi62:1.1.4-1  X11 Input extension library

gbuffy recommends no packages.

gbuffy suggests no packages.



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org