changeset 14325:985e5e3f6f2c

[gaim-migrate @ 17020] Some distros put the ncursesw headers in ncursesw/, some don't. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 24 Aug 2006 19:41:34 +0000
parents 2d7086454b08
children f74c19f2da30
files configure.ac console/libgnt/gntcolors.c console/libgnt/gntmain.c console/libgnt/gntwidget.h
diffstat 4 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Thu Aug 24 18:33:53 2006 +0000
+++ b/configure.ac	Thu Aug 24 19:41:34 2006 +0000
@@ -807,6 +807,9 @@
 if test "x$enable_gnt" = "xyes"; then
 	AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_gnt=no])
 	AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_gnt=no])
+
+	# Some distros put the headers in ncursesw/, some don't
+	AC_CHECK_HEADER(ncursesw/ncurses.h, [AC_DEFINE(HAVE_NCURSESW_INC, 1, [Define if you have the ncursesw headers in ncursesw/])])
 else
 	enable_gnt=no
 fi
--- a/console/libgnt/gntcolors.c	Thu Aug 24 18:33:53 2006 +0000
+++ b/console/libgnt/gntcolors.c	Thu Aug 24 19:41:34 2006 +0000
@@ -1,4 +1,9 @@
+#ifdef HAVE_NCURSESW_INC
 #include <ncursesw/ncurses.h>
+#else
+#include <ncurses.h>
+#endif
+
 #include "gntcolors.h"
 #include "gntstyle.h"
 
--- a/console/libgnt/gntmain.c	Thu Aug 24 18:33:53 2006 +0000
+++ b/console/libgnt/gntmain.c	Thu Aug 24 19:41:34 2006 +0000
@@ -1,4 +1,8 @@
+#ifdef HAVE_NCURSESW_INC
 #include <ncursesw/panel.h>
+#else
+#include <panel.h>
+#endif
 
 #include "gnt.h"
 #include "gntbox.h"
@@ -485,9 +489,9 @@
  * Mouse support:
  *  - bring a window on top if you click on its taskbar
  *  - click on the top-bar of the active window and drag+drop to move a window
+ *  - click on a window to bring it to focus
  *  wishlist:
  *   - have a little [X] on the windows, and clicking it will close that window.
- *   - click on a window to bring it to focus
  *   - allow scrolling in tree/textview on wheel-scroll event
  *   - click to activate button or select a row in tree
  *      - all these can be fulfilled by adding a "clicked" event for GntWidget
--- a/console/libgnt/gntwidget.h	Thu Aug 24 18:33:53 2006 +0000
+++ b/console/libgnt/gntwidget.h	Thu Aug 24 19:41:34 2006 +0000
@@ -4,7 +4,11 @@
 #include <stdio.h>
 #include <glib.h>
 #include <glib-object.h>
-#include <ncursesw/curses.h>
+#ifdef HAVE_NCURSESW_INC
+#include <ncursesw/ncurses.h>
+#else
+#include <ncurses.h>
+#endif
 
 #define GNT_TYPE_WIDGET				(gnt_widget_get_gtype())
 #define GNT_WIDGET(obj)				(G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WIDGET, GntWidget))