Try adding a #ifndef/#define for XkbKeySymEntry to make up for OSF broken

Tue May 14 15:09:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
        for XkbKeySymEntry to make up for OSF broken
        XKB extension. (#77819, Gareth Pearce)

        * gtk/gtklayout.c: Clamp the upper values in response
        to ::size-allocate if necessary. (#81290, Christophe Saout)

        * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
        combo being destroyed before idle fires.
        (#81396, Timo Sirainen)
This commit is contained in:
Owen Taylor
2002-05-14 19:12:51 +00:00
committed by Owen Taylor
parent f34a1f4807
commit fa7fc23f44
12 changed files with 207 additions and 24 deletions

View File

@@ -1,3 +1,29 @@
Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
for XkbKeySymEntry to make up for OSF broken
XKB extension. (#77819, Gareth Pearce)
* gtk/gtklayout.c: Clamp the upper values in response
to ::size-allocate if necessary. (#81290, Christophe Saout)
* gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
combo being destroyed before idle fires.
(#81396, Timo Sirainen)
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
Discard configure events from SubstructureNotify.
(#81760, Rich Burridge)
* gtk/gtkfontsel.c (cmp_families): Use g_utf8_strcoll(), not
strcmp().
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): Clamp
width of child allocation to >= 1. (Fixes warnings from
#77639, Martin Schulze)
Mon May 13 23:19:20 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):

View File

@@ -1,3 +1,29 @@
Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
for XkbKeySymEntry to make up for OSF broken
XKB extension. (#77819, Gareth Pearce)
* gtk/gtklayout.c: Clamp the upper values in response
to ::size-allocate if necessary. (#81290, Christophe Saout)
* gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
combo being destroyed before idle fires.
(#81396, Timo Sirainen)
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
Discard configure events from SubstructureNotify.
(#81760, Rich Burridge)
* gtk/gtkfontsel.c (cmp_families): Use g_utf8_strcoll(), not
strcmp().
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): Clamp
width of child allocation to >= 1. (Fixes warnings from
#77639, Martin Schulze)
Mon May 13 23:19:20 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):

View File

@@ -1,3 +1,29 @@
Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
for XkbKeySymEntry to make up for OSF broken
XKB extension. (#77819, Gareth Pearce)
* gtk/gtklayout.c: Clamp the upper values in response
to ::size-allocate if necessary. (#81290, Christophe Saout)
* gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
combo being destroyed before idle fires.
(#81396, Timo Sirainen)
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
Discard configure events from SubstructureNotify.
(#81760, Rich Burridge)
* gtk/gtkfontsel.c (cmp_families): Use g_utf8_strcoll(), not
strcmp().
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): Clamp
width of child allocation to >= 1. (Fixes warnings from
#77639, Martin Schulze)
Mon May 13 23:19:20 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):

View File

@@ -1,3 +1,29 @@
Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
for XkbKeySymEntry to make up for OSF broken
XKB extension. (#77819, Gareth Pearce)
* gtk/gtklayout.c: Clamp the upper values in response
to ::size-allocate if necessary. (#81290, Christophe Saout)
* gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
combo being destroyed before idle fires.
(#81396, Timo Sirainen)
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
Discard configure events from SubstructureNotify.
(#81760, Rich Burridge)
* gtk/gtkfontsel.c (cmp_families): Use g_utf8_strcoll(), not
strcmp().
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): Clamp
width of child allocation to >= 1. (Fixes warnings from
#77639, Martin Schulze)
Mon May 13 23:19:20 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):

View File

@@ -1,3 +1,29 @@
Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
for XkbKeySymEntry to make up for OSF broken
XKB extension. (#77819, Gareth Pearce)
* gtk/gtklayout.c: Clamp the upper values in response
to ::size-allocate if necessary. (#81290, Christophe Saout)
* gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
combo being destroyed before idle fires.
(#81396, Timo Sirainen)
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
Discard configure events from SubstructureNotify.
(#81760, Rich Burridge)
* gtk/gtkfontsel.c (cmp_families): Use g_utf8_strcoll(), not
strcmp().
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): Clamp
width of child allocation to >= 1. (Fixes warnings from
#77639, Martin Schulze)
Mon May 13 23:19:20 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):

View File

@@ -1,3 +1,29 @@
Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
for XkbKeySymEntry to make up for OSF broken
XKB extension. (#77819, Gareth Pearce)
* gtk/gtklayout.c: Clamp the upper values in response
to ::size-allocate if necessary. (#81290, Christophe Saout)
* gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
combo being destroyed before idle fires.
(#81396, Timo Sirainen)
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
Discard configure events from SubstructureNotify.
(#81760, Rich Burridge)
* gtk/gtkfontsel.c (cmp_families): Use g_utf8_strcoll(), not
strcmp().
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): Clamp
width of child allocation to >= 1. (Fixes warnings from
#77639, Martin Schulze)
Mon May 13 23:19:20 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):

View File

@@ -1311,13 +1311,17 @@ gdk_event_translate (GdkEvent *event,
? " (discarding)"
: GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD
? " (discarding child)"
: xevent->xconfigure.event != xevent->xconfigure.window
? " (discarding substructure)"
: ""));
if (window &&
xevent->xconfigure.event == xevent->xconfigure.window &&
!GDK_WINDOW_DESTROYED (window) &&
(window_private->extension_events != 0))
_gdk_input_configure_event (&xevent->xconfigure, window);
if (!window ||
xevent->xconfigure.event != xevent->xconfigure.window ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_ROOT)
return_val = FALSE;

View File

@@ -54,6 +54,13 @@ update_keyrange (void)
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
/* OSF-4.0 is apparently missing this macro
*/
#ifndef XkbKeySymEntry
#define XkbKeySymEntry(d,k,sl,g) \
(XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
#endif
gboolean _gdk_use_xkb = FALSE;
gint _gdk_xkb_event_type;
static XkbDescPtr xkb_desc = NULL;

View File

@@ -378,6 +378,8 @@ gtk_combo_entry_focus_out (GtkEntry * entry, GdkEventFocus * event, GtkCombo * c
if (combo->value_in_list && !gtk_combo_find (combo))
{
GSource *focus_idle;
/* gdk_beep(); *//* this can be annoying */
if (combo->ok_if_empty && !strcmp (gtk_entry_get_text (entry), ""))
return FALSE;
@@ -390,7 +392,12 @@ gtk_combo_entry_focus_out (GtkEntry * entry, GdkEventFocus * event, GtkCombo * c
so the focus can be lost anyway...
the signal_emit_stop doesn't seem to work either...
*/
gtk_idle_add ((GtkFunction) gtk_combo_focus_idle, combo);
focus_idle = g_idle_source_new ();
g_source_set_closure (focus_idle,
g_cclosure_new_object (G_CALLBACK (gtk_combo_focus_idle),
G_OBJECT (combo)));
g_source_attach (focus_idle, NULL);
/*gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "focus_out_event"); */
return TRUE;
}

View File

@@ -616,7 +616,7 @@ cmp_families (const void *a, const void *b)
const char *a_name = pango_font_family_get_name (*(PangoFontFamily **)a);
const char *b_name = pango_font_family_get_name (*(PangoFontFamily **)b);
return strcmp (a_name, b_name);
return g_utf8_collate (a_name, b_name);
}
static void

View File

@@ -108,7 +108,8 @@ static void gtk_layout_style_set (GtkWidget *widget,
GtkStyle *old_style);
static void gtk_layout_set_adjustment_upper (GtkAdjustment *adj,
gdouble upper);
gdouble upper,
gboolean always_emit_changed);
static GtkWidgetClass *parent_class = NULL;
@@ -222,7 +223,7 @@ gtk_layout_set_adjustments (GtkLayout *layout,
layout->hadjustment = hadj;
gtk_object_ref (GTK_OBJECT (layout->hadjustment));
gtk_object_sink (GTK_OBJECT (layout->hadjustment));
gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width);
gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width, FALSE);
gtk_signal_connect (GTK_OBJECT (layout->hadjustment), "value_changed",
(GtkSignalFunc) gtk_layout_adjustment_changed,
@@ -235,7 +236,7 @@ gtk_layout_set_adjustments (GtkLayout *layout,
layout->vadjustment = vadj;
gtk_object_ref (GTK_OBJECT (layout->vadjustment));
gtk_object_sink (GTK_OBJECT (layout->vadjustment));
gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height);
gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height, FALSE);
gtk_signal_connect (GTK_OBJECT (layout->vadjustment), "value_changed",
(GtkSignalFunc) gtk_layout_adjustment_changed,
@@ -420,25 +421,30 @@ gtk_layout_move (GtkLayout *layout,
static void
gtk_layout_set_adjustment_upper (GtkAdjustment *adj,
gdouble upper)
gdouble upper,
gboolean always_emit_changed)
{
gboolean changed = FALSE;
gboolean value_changed = FALSE;
gdouble min = MAX (0., upper - adj->page_size);
if (upper != adj->upper)
{
gdouble min = MAX (0., upper - adj->page_size);
gboolean value_changed = FALSE;
adj->upper = upper;
if (adj->value > min)
{
adj->value = min;
value_changed = TRUE;
}
gtk_signal_emit_by_name (GTK_OBJECT (adj), "changed");
if (value_changed)
gtk_signal_emit_by_name (GTK_OBJECT (adj), "value_changed");
changed = TRUE;
}
if (adj->value > min)
{
adj->value = min;
value_changed = TRUE;
}
if (changed || always_emit_changed)
gtk_signal_emit_by_name (GTK_OBJECT (adj), "changed");
if (value_changed)
gtk_signal_emit_by_name (GTK_OBJECT (adj), "value_changed");
}
/**
@@ -475,9 +481,9 @@ gtk_layout_set_size (GtkLayout *layout,
g_object_thaw_notify (G_OBJECT (layout));
if (layout->hadjustment)
gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width);
gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width, FALSE);
if (layout->vadjustment)
gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height);
gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height, FALSE);
if (GTK_WIDGET_REALIZED (layout))
{
@@ -1002,14 +1008,14 @@ gtk_layout_size_allocate (GtkWidget *widget,
layout->hadjustment->page_size = allocation->width;
layout->hadjustment->page_increment = allocation->width * 0.9;
layout->hadjustment->lower = 0;
layout->hadjustment->upper = MAX (allocation->width, layout->width);
gtk_signal_emit_by_name (GTK_OBJECT (layout->hadjustment), "changed");
/* set_adjustment_upper() emits ::changed */
gtk_layout_set_adjustment_upper (layout->hadjustment, MAX (allocation->width, layout->width), TRUE);
layout->vadjustment->page_size = allocation->height;
layout->vadjustment->page_increment = allocation->height * 0.9;
layout->vadjustment->lower = 0;
layout->vadjustment->upper = MAX (allocation->height, layout->height);
gtk_signal_emit_by_name (GTK_OBJECT (layout->vadjustment), "changed");
gtk_layout_set_adjustment_upper (layout->vadjustment, MAX (allocation->height, layout->height), TRUE);
}
static gint

View File

@@ -506,6 +506,9 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
if (menu_item->submenu && menu_item->show_submenu_indicator)
child_allocation.width -= child_requisition.height;
if (child_allocation.width < 1)
child_allocation.width = 1;
gtk_widget_size_allocate (bin->child, &child_allocation);
}