Work around bug in stupid themes thinking "noteboook" means GtkNotebook
parent
28d1e1a362
commit
7575565add
11
.hgignore
11
.hgignore
|
@ -7,6 +7,7 @@
|
||||||
^berlios-hg.state.journal$
|
^berlios-hg.state.journal$
|
||||||
^build/.*
|
^build/.*
|
||||||
Makefile\.in$
|
Makefile\.in$
|
||||||
|
Makefile$
|
||||||
aclocal\.m4
|
aclocal\.m4
|
||||||
autom4te.*
|
autom4te.*
|
||||||
compile
|
compile
|
||||||
|
@ -35,3 +36,13 @@ moo/mooutils/stock-moo.h
|
||||||
.*\.suo$
|
.*\.suo$
|
||||||
devcpp/Makefile\.win$
|
devcpp/Makefile\.win$
|
||||||
devcpp/medit\.layout$
|
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$
|
||||||
|
|
|
@ -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_DEFUN([_MOO_CHECK_GTK_PRINTING],[
|
||||||
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_ARG_ENABLE([printing], AC_HELP_STRING([--enable-printing], [whether to enable printing support with gtk >= 2.9 (default = NO, it is UNSTABLE)]), [
|
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
|
if test x$enable_printing = "xyes"; then
|
||||||
MOO_ENABLE_PRINTING="yes"
|
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)
|
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
|
||||||
|
])
|
||||||
|
|
|
@ -11,12 +11,24 @@
|
||||||
* See COPYING file that comes with this distribution.
|
* See COPYING file that comes with this distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mooutils/moomarshals.h"
|
#include "mooutils/moomarshals.h"
|
||||||
#include "mooutils/moonotebook.h"
|
#include "mooutils/moonotebook.h"
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#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 MIN_LABELS_WIDTH 10
|
||||||
#define DEFAULT_HBORDER 6
|
#define DEFAULT_HBORDER 6
|
||||||
#define DEFAULT_VBORDER 3
|
#define DEFAULT_VBORDER 3
|
||||||
|
@ -1198,7 +1210,7 @@ static void moo_notebook_draw_child_border (MooNotebook *nb,
|
||||||
GTK_SHADOW_OUT,
|
GTK_SHADOW_OUT,
|
||||||
&event->area,
|
&event->area,
|
||||||
widget,
|
widget,
|
||||||
(char*) "notebook",
|
DETAIL_NOTEBOOK,
|
||||||
widget->allocation.x + border_width,
|
widget->allocation.x + border_width,
|
||||||
widget->allocation.y + border_width + nb->priv->tabs_height,
|
widget->allocation.y + border_width + nb->priv->tabs_height,
|
||||||
widget->allocation.width - 2*border_width,
|
widget->allocation.width - 2*border_width,
|
||||||
|
@ -1214,7 +1226,7 @@ static void moo_notebook_draw_child_border (MooNotebook *nb,
|
||||||
GTK_SHADOW_OUT,
|
GTK_SHADOW_OUT,
|
||||||
&event->area,
|
&event->area,
|
||||||
widget,
|
widget,
|
||||||
(char*) "notebook",
|
DETAIL_NOTEBOOK,
|
||||||
widget->allocation.x + border_width,
|
widget->allocation.x + border_width,
|
||||||
widget->allocation.y + border_width + nb->priv->tabs_height,
|
widget->allocation.y + border_width + nb->priv->tabs_height,
|
||||||
widget->allocation.width - 2*border_width,
|
widget->allocation.width - 2*border_width,
|
||||||
|
@ -2112,7 +2124,7 @@ static void moo_notebook_draw_label (MooNotebook *nb,
|
||||||
GTK_SHADOW_OUT,
|
GTK_SHADOW_OUT,
|
||||||
&event->area,
|
&event->area,
|
||||||
widget,
|
widget,
|
||||||
(char*) "tab",
|
DETAIL_TAB,
|
||||||
x, y,
|
x, y,
|
||||||
page->label->width,
|
page->label->width,
|
||||||
height,
|
height,
|
||||||
|
@ -2130,7 +2142,7 @@ static void moo_notebook_draw_label (MooNotebook *nb,
|
||||||
state,
|
state,
|
||||||
&event->area,
|
&event->area,
|
||||||
widget,
|
widget,
|
||||||
"tab",
|
DETAIL_TAB,
|
||||||
page->label->widget->allocation.x - focus_width,
|
page->label->widget->allocation.x - focus_width,
|
||||||
page->label->widget->allocation.y - focus_width,
|
page->label->widget->allocation.y - focus_width,
|
||||||
page->label->widget->allocation.width + 2 * focus_width,
|
page->label->widget->allocation.width + 2 * focus_width,
|
||||||
|
|
Loading…
Reference in New Issue