forked from AuroraMiddleware/gtk
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:
parent
ba2a16d3b1
commit
44859f939c
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
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):
|
||||
|
@ -1,3 +1,16 @@
|
||||
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):
|
||||
|
@ -1,3 +1,16 @@
|
||||
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):
|
||||
|
@ -1,3 +1,16 @@
|
||||
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):
|
||||
|
@ -1,3 +1,16 @@
|
||||
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):
|
||||
|
@ -1,3 +1,16 @@
|
||||
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):
|
||||
|
@ -43,7 +43,14 @@
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
#endif /* HAVE_XKB */
|
||||
|
||||
typedef struct _GdkKeymapX11 GdkKeymapX11;
|
||||
|
||||
|
@ -383,6 +383,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;
|
||||
@ -395,7 +397,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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user