define GTK_DISABLE_COMPAT_H for compilation of gtk code.

Fri Jan 15 19:16:42 1999  Tim Janik  <timj@gtk.org>

        * gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
        code.

        * gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.

        * gtk/gtkcompat.h:
        * gtk/gtklabel.h:
        don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.

        * gtk/gtkstyle.h:
        * gtk/gtkstyle.c: coding style, indentation and alignment fixups.
        (gtk_draw_string):
        (gtk_paint_string):
        (gtk_draw_polygon):
        (gtk_style_set_background): fixed assertments.
        (gtk_default_draw_ramp):
        (gtk_default_draw_cross):
        (gtk_default_draw_oval): issue warnings since these functions aren't
        yet implemented.

        * gdk/gdkwindow.c:
        (gdk_window_hide): only unmap window if already mapped.
        (gdk_window_show): only map window if !mapped.
        (gdk_window_internal_destroy): destroyed windows can't be mapped.

        * gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
        because a resize is queued on a widget, we rely on the expose events
        now.
This commit is contained in:
Tim Janik 1999-01-15 18:41:43 +00:00 committed by Tim Janik
parent 2e99e7713d
commit 87620764ae
18 changed files with 2566 additions and 2319 deletions

View File

@ -1,3 +1,34 @@
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
code.
* gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.
* gtk/gtkcompat.h:
* gtk/gtklabel.h:
don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: coding style, indentation and alignment fixups.
(gtk_draw_string):
(gtk_paint_string):
(gtk_draw_polygon):
(gtk_style_set_background): fixed assertments.
(gtk_default_draw_ramp):
(gtk_default_draw_cross):
(gtk_default_draw_oval): issue warnings since these functions aren't
yet implemented.
* gdk/gdkwindow.c:
(gdk_window_hide): only unmap window if already mapped.
(gdk_window_show): only map window if !mapped.
(gdk_window_internal_destroy): destroyed windows can't be mapped.
* gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
because a resize is queued on a widget, we rely on the expose events
now.
Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init):

View File

@ -1,3 +1,34 @@
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
code.
* gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.
* gtk/gtkcompat.h:
* gtk/gtklabel.h:
don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: coding style, indentation and alignment fixups.
(gtk_draw_string):
(gtk_paint_string):
(gtk_draw_polygon):
(gtk_style_set_background): fixed assertments.
(gtk_default_draw_ramp):
(gtk_default_draw_cross):
(gtk_default_draw_oval): issue warnings since these functions aren't
yet implemented.
* gdk/gdkwindow.c:
(gdk_window_hide): only unmap window if already mapped.
(gdk_window_show): only map window if !mapped.
(gdk_window_internal_destroy): destroyed windows can't be mapped.
* gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
because a resize is queued on a widget, we rely on the expose events
now.
Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init):

View File

@ -1,3 +1,34 @@
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
code.
* gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.
* gtk/gtkcompat.h:
* gtk/gtklabel.h:
don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: coding style, indentation and alignment fixups.
(gtk_draw_string):
(gtk_paint_string):
(gtk_draw_polygon):
(gtk_style_set_background): fixed assertments.
(gtk_default_draw_ramp):
(gtk_default_draw_cross):
(gtk_default_draw_oval): issue warnings since these functions aren't
yet implemented.
* gdk/gdkwindow.c:
(gdk_window_hide): only unmap window if already mapped.
(gdk_window_show): only map window if !mapped.
(gdk_window_internal_destroy): destroyed windows can't be mapped.
* gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
because a resize is queued on a widget, we rely on the expose events
now.
Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init):

View File

@ -1,3 +1,34 @@
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
code.
* gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.
* gtk/gtkcompat.h:
* gtk/gtklabel.h:
don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: coding style, indentation and alignment fixups.
(gtk_draw_string):
(gtk_paint_string):
(gtk_draw_polygon):
(gtk_style_set_background): fixed assertments.
(gtk_default_draw_ramp):
(gtk_default_draw_cross):
(gtk_default_draw_oval): issue warnings since these functions aren't
yet implemented.
* gdk/gdkwindow.c:
(gdk_window_hide): only unmap window if already mapped.
(gdk_window_show): only map window if !mapped.
(gdk_window_internal_destroy): destroyed windows can't be mapped.
* gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
because a resize is queued on a widget, we rely on the expose events
now.
Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init):

View File

@ -1,3 +1,34 @@
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
code.
* gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.
* gtk/gtkcompat.h:
* gtk/gtklabel.h:
don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: coding style, indentation and alignment fixups.
(gtk_draw_string):
(gtk_paint_string):
(gtk_draw_polygon):
(gtk_style_set_background): fixed assertments.
(gtk_default_draw_ramp):
(gtk_default_draw_cross):
(gtk_default_draw_oval): issue warnings since these functions aren't
yet implemented.
* gdk/gdkwindow.c:
(gdk_window_hide): only unmap window if already mapped.
(gdk_window_show): only map window if !mapped.
(gdk_window_internal_destroy): destroyed windows can't be mapped.
* gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
because a resize is queued on a widget, we rely on the expose events
now.
Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init):

View File

@ -1,3 +1,34 @@
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
code.
* gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.
* gtk/gtkcompat.h:
* gtk/gtklabel.h:
don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: coding style, indentation and alignment fixups.
(gtk_draw_string):
(gtk_paint_string):
(gtk_draw_polygon):
(gtk_style_set_background): fixed assertments.
(gtk_default_draw_ramp):
(gtk_default_draw_cross):
(gtk_default_draw_oval): issue warnings since these functions aren't
yet implemented.
* gdk/gdkwindow.c:
(gdk_window_hide): only unmap window if already mapped.
(gdk_window_show): only map window if !mapped.
(gdk_window_internal_destroy): destroyed windows can't be mapped.
* gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
because a resize is queued on a widget, we rely on the expose events
now.
Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init):

View File

@ -1,3 +1,34 @@
Fri Jan 15 19:16:42 1999 Tim Janik <timj@gtk.org>
* gtk/Makefile.am: define GTK_DISABLE_COMPAT_H for compilation of gtk
code.
* gtk/gtkrc.c (gtk_rc_style_unref): added an assertment.
* gtk/gtkcompat.h:
* gtk/gtklabel.h:
don't provide compatibility defines if GTK_DISABLE_COMPAT_H is defined.
* gtk/gtkstyle.h:
* gtk/gtkstyle.c: coding style, indentation and alignment fixups.
(gtk_draw_string):
(gtk_paint_string):
(gtk_draw_polygon):
(gtk_style_set_background): fixed assertments.
(gtk_default_draw_ramp):
(gtk_default_draw_cross):
(gtk_default_draw_oval): issue warnings since these functions aren't
yet implemented.
* gdk/gdkwindow.c:
(gdk_window_hide): only unmap window if already mapped.
(gdk_window_show): only map window if !mapped.
(gdk_window_internal_destroy): destroyed windows can't be mapped.
* gtk/gtkwidget.c (gtk_widget_event): don't ignore expose events just
because a resize is queued on a widget, we rely on the expose events
now.
Fri Jan 15 10:22:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_class_init):

View File

@ -529,14 +529,15 @@ gdk_window_foreign_new (guint32 anid)
}
/* Call this function when you want a window and all its children to
disappear. When xdestroy is true, a request to destroy the XWindow
is sent out. When it is false, it is assumed that the XWindow has
been or will be destroyed by destroying some ancestor of this
window. */
* disappear. When xdestroy is true, a request to destroy the XWindow
* is sent out. When it is false, it is assumed that the XWindow has
* been or will be destroyed by destroying some ancestor of this
* window.
*/
static void
gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
gboolean our_destroy)
gdk_window_internal_destroy (GdkWindow *window,
gboolean xdestroy,
gboolean our_destroy)
{
GdkWindowPrivate *private;
GdkWindowPrivate *temp_private;
@ -630,6 +631,7 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
if (private->colormap)
gdk_colormap_unref (private->colormap);
private->mapped = FALSE;
private->destroyed = TRUE;
}
break;
@ -716,7 +718,7 @@ gdk_window_show (GdkWindow *window)
g_return_if_fail (window != NULL);
private = (GdkWindowPrivate*) window;
if (!private->destroyed)
if (!private->destroyed && !private->mapped)
{
private->mapped = TRUE;
XRaiseWindow (private->xdisplay, private->xwindow);
@ -732,7 +734,7 @@ gdk_window_hide (GdkWindow *window)
g_return_if_fail (window != NULL);
private = (GdkWindowPrivate*) window;
if (!private->destroyed)
if (!private->destroyed && private->mapped)
{
private->mapped = FALSE;
XUnmapWindow (private->xdisplay, private->xwindow);
@ -2533,5 +2535,3 @@ gdk_drawable_set_data (GdkDrawable *drawable,
{
g_dataset_set_data_full (drawable, key, data, destroy_func);
}

View File

@ -529,14 +529,15 @@ gdk_window_foreign_new (guint32 anid)
}
/* Call this function when you want a window and all its children to
disappear. When xdestroy is true, a request to destroy the XWindow
is sent out. When it is false, it is assumed that the XWindow has
been or will be destroyed by destroying some ancestor of this
window. */
* disappear. When xdestroy is true, a request to destroy the XWindow
* is sent out. When it is false, it is assumed that the XWindow has
* been or will be destroyed by destroying some ancestor of this
* window.
*/
static void
gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
gboolean our_destroy)
gdk_window_internal_destroy (GdkWindow *window,
gboolean xdestroy,
gboolean our_destroy)
{
GdkWindowPrivate *private;
GdkWindowPrivate *temp_private;
@ -630,6 +631,7 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
if (private->colormap)
gdk_colormap_unref (private->colormap);
private->mapped = FALSE;
private->destroyed = TRUE;
}
break;
@ -716,7 +718,7 @@ gdk_window_show (GdkWindow *window)
g_return_if_fail (window != NULL);
private = (GdkWindowPrivate*) window;
if (!private->destroyed)
if (!private->destroyed && !private->mapped)
{
private->mapped = TRUE;
XRaiseWindow (private->xdisplay, private->xwindow);
@ -732,7 +734,7 @@ gdk_window_hide (GdkWindow *window)
g_return_if_fail (window != NULL);
private = (GdkWindowPrivate*) window;
if (!private->destroyed)
if (!private->destroyed && private->mapped)
{
private->mapped = FALSE;
XUnmapWindow (private->xdisplay, private->xwindow);
@ -2533,5 +2535,3 @@ gdk_drawable_set_data (GdkDrawable *drawable,
{
g_dataset_set_data_full (drawable, key, data, destroy_func);
}

View File

@ -355,6 +355,7 @@ EXTRA_DIST = \
circles.xbm
INCLUDES = \
-DGTK_DISABLE_COMPAT_H \
-DG_LOG_DOMAIN=\"Gtk\" \
-DGTK_EXE_PREFIX=\"$(exec_prefix)\" \
-DGTK_DATA_PREFIX=\"$(prefix)\" \

View File

@ -28,6 +28,9 @@ extern "C" {
/* this file contains aliases that have to be kept for historical
* reasons, because a wide code base depends on them.
*/
#ifndef GTK_DISABLE_COMPAT_H
#define gtk_accel_label_accelerator_width gtk_accel_label_get_accel_width
#define gtk_container_border_width gtk_container_set_border_width
#define gtk_notebook_current_page gtk_notebook_get_current_page
@ -38,6 +41,8 @@ extern "C" {
#define gtk_window_position gtk_window_set_position
#define gtk_toggle_button_set_state gtk_toggle_button_set_active
#endif /* GTK_DISABLE_COMPAT_H */
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -82,8 +82,9 @@ void gtk_label_get (GtkLabel *label,
guint gtk_label_parse_uline (GtkLabel *label,
const gchar *string);
/* Deprecated */
#define gtk_label_set gtk_label_set_text
#ifndef GTK_DISABLE_COMPAT_H
# define gtk_label_set gtk_label_set_text
#endif /* GTK_DISABLE_COMPAT_H */
#ifdef __cplusplus
}

View File

@ -560,6 +560,7 @@ gtk_rc_style_unref (GtkRcStyle *rc_style)
gint i;
g_return_if_fail (rc_style != NULL);
g_return_if_fail (rc_style->ref_count > 0);
rc_style->ref_count--;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2391,8 +2391,8 @@ gtk_widget_size_allocate (GtkWidget *widget,
needs_draw = TRUE;
}
}
else if ((widget->allocation.width != real_allocation.width ||
widget->allocation.height != real_allocation.height))
else if (widget->allocation.width != real_allocation.width ||
widget->allocation.height != real_allocation.height)
{
needs_draw = TRUE;
}
@ -2724,12 +2724,8 @@ gtk_widget_event (GtkWidget *widget,
break;
case GDK_EXPOSE:
/* there is no sense in providing a widget with bogus expose events.
* Widgets that are going to be resized don't need to be
* exposed, since they will be redrawn anyways.
*/
if (!event->any.window ||
GTK_WIDGET_RESIZE_NEEDED (widget) ||
(widget->parent && GTK_WIDGET_RESIZE_NEEDED (widget->parent)))
if (!event->any.window)
{
gtk_widget_unref (widget);
return TRUE;

View File

@ -13,6 +13,8 @@
# testgtkrc2 sets all the buttons in the main window to blue by default
include "testgtkrc2"
#include "/usr/local/share/themes/Pixmap/gtk/gtkrc"
pixmap_path "."
style "defaultfont"

View File

@ -13,6 +13,8 @@
# testgtkrc2 sets all the buttons in the main window to blue by default
include "testgtkrc2"
#include "/usr/local/share/themes/Pixmap/gtk/gtkrc"
pixmap_path "."
style "defaultfont"