diff --git a/.hgignore b/.hgignore index f06b0343..59944d23 100644 --- a/.hgignore +++ b/.hgignore @@ -7,6 +7,7 @@ ^berlios-hg.state.journal$ ^build/.* Makefile\.in$ +Makefile$ aclocal\.m4 autom4te.* compile @@ -35,3 +36,13 @@ moo/mooutils/stock-moo.h .*\.suo$ devcpp/Makefile\.win$ devcpp/medit\.layout$ +.*\.Po$ +^wininstaller/medit\.iss$ +^tests/medit\.rc$ +^tests/pyapp\.py$ +^stamp-h1$ +^medit$ +^medit-ui\.h$ +moo/moo-version\.h$ +moo/moo\.pc$ +moo/mooterm/termhelper_res\.rc$ diff --git a/m4/moo-gtk.m4 b/m4/moo-gtk.m4 index 126984e4..f3a9edd9 100644 --- a/m4/moo-gtk.m4 +++ b/m4/moo-gtk.m4 @@ -40,14 +40,9 @@ AC_DEFUN([_MOO_CHECK_VERSION],[ ############################################################################## -# MOO_PKG_CHECK_GTK_VERSIONS +# _MOO_CHECK_GTK_PRINTING # -AC_DEFUN([MOO_PKG_CHECK_GTK_VERSIONS],[ - AC_REQUIRE([MOO_AC_CHECK_OS]) - _MOO_CHECK_VERSION(GTK, gtk+-2.0) - _MOO_CHECK_VERSION(GLIB, glib-2.0) - _MOO_CHECK_VERSION(GDK, gdk-2.0) - +AC_DEFUN([_MOO_CHECK_GTK_PRINTING],[ AC_ARG_ENABLE([printing], AC_HELP_STRING([--enable-printing], [whether to enable printing support with gtk >= 2.9 (default = NO, it is UNSTABLE)]), [ if test x$enable_printing = "xyes"; then MOO_ENABLE_PRINTING="yes" @@ -70,3 +65,34 @@ AC_DEFUN([MOO_PKG_CHECK_GTK_VERSIONS],[ AM_CONDITIONAL(MOO_ENABLE_PRINTING, test x$MOO_ENABLE_PRINTING = xyes) ]) + + +############################################################################## +# _MOO_CHECK_BROKEN_GTK_THEME +# +AC_DEFUN([_MOO_CHECK_BROKEN_GTK_THEME],[ + AC_ARG_WITH([broken-gtk-theme], AC_HELP_STRING([--with-broken-gtk-theme], [Work around bug in gtk theme]), [ + if test x$with_broken_gtk_theme = "xyes"; then + MOO_BROKEN_GTK_THEME="yes" + fi + ]) + + if test x$MOO_BROKEN_GTK_THEME = xyes; then + AC_MSG_NOTICE([Broken gtk theme]) + AC_DEFINE(MOO_BROKEN_GTK_THEME, 1, [broken gtk theme]) + fi +]) + + +############################################################################## +# MOO_PKG_CHECK_GTK_VERSIONS +# +AC_DEFUN([MOO_PKG_CHECK_GTK_VERSIONS],[ + AC_REQUIRE([MOO_AC_CHECK_OS]) + _MOO_CHECK_VERSION(GTK, gtk+-2.0) + _MOO_CHECK_VERSION(GLIB, glib-2.0) + _MOO_CHECK_VERSION(GDK, gdk-2.0) + + _MOO_CHECK_GTK_PRINTING + _MOO_CHECK_BROKEN_GTK_THEME +]) diff --git a/moo/mooutils/moonotebook.c b/moo/mooutils/moonotebook.c index 3d513ba9..9eed6ef2 100644 --- a/moo/mooutils/moonotebook.c +++ b/moo/mooutils/moonotebook.c @@ -11,12 +11,24 @@ * See COPYING file that comes with this distribution. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "mooutils/moomarshals.h" #include "mooutils/moonotebook.h" #include #include #include +#ifdef MOO_BROKEN_GTK_THEME +#define DETAIL_NOTEBOOK NULL +#define DETAIL_TAB NULL +#else +#define DETAIL_NOTEBOOK ((char*) "notebook") +#define DETAIL_TAB ((char*) "tab") +#endif + #define MIN_LABELS_WIDTH 10 #define DEFAULT_HBORDER 6 #define DEFAULT_VBORDER 3 @@ -1198,7 +1210,7 @@ static void moo_notebook_draw_child_border (MooNotebook *nb, GTK_SHADOW_OUT, &event->area, widget, - (char*) "notebook", + DETAIL_NOTEBOOK, widget->allocation.x + border_width, widget->allocation.y + border_width + nb->priv->tabs_height, widget->allocation.width - 2*border_width, @@ -1214,7 +1226,7 @@ static void moo_notebook_draw_child_border (MooNotebook *nb, GTK_SHADOW_OUT, &event->area, widget, - (char*) "notebook", + DETAIL_NOTEBOOK, widget->allocation.x + border_width, widget->allocation.y + border_width + nb->priv->tabs_height, widget->allocation.width - 2*border_width, @@ -2112,7 +2124,7 @@ static void moo_notebook_draw_label (MooNotebook *nb, GTK_SHADOW_OUT, &event->area, widget, - (char*) "tab", + DETAIL_TAB, x, y, page->label->width, height, @@ -2130,7 +2142,7 @@ static void moo_notebook_draw_label (MooNotebook *nb, state, &event->area, widget, - "tab", + DETAIL_TAB, page->label->widget->allocation.x - focus_width, page->label->widget->allocation.y - focus_width, page->label->widget->allocation.width + 2 * focus_width,