diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-05-14 19:15:46 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-05-14 19:15:46 +0000 |
commit | 44859f939cd1f6113d877d42ab141245cb68d275 (patch) | |
tree | fd94387b9bc3ef3faafecbdd7d7fdde0dc82cf9b | |
parent | ba2a16d3b19656e5cc950ec99f4dca0d9107be61 (diff) | |
download | gdk-pixbuf-44859f939cd1f6113d877d42ab141245cb68d275.tar.gz |
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)
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 13 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 13 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 13 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 13 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 13 | ||||
-rw-r--r-- | gdk/x11/gdkkeys-x11.c | 9 | ||||
-rw-r--r-- | gtk/gtkcombo.c | 9 | ||||
-rw-r--r-- | gtk/gtklayout.c | 48 |
9 files changed, 121 insertions, 23 deletions
@@ -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): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 70955ff43..14fdb81fe 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -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): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 70955ff43..14fdb81fe 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -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): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 70955ff43..14fdb81fe 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -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): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 70955ff43..14fdb81fe 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -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): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 70955ff43..14fdb81fe 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -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): diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c index 7c0dc100b..5ddbaa309 100644 --- a/gdk/x11/gdkkeys-x11.c +++ b/gdk/x11/gdkkeys-x11.c @@ -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; diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c index c7e2ed3dd..a425d9800 100644 --- a/gtk/gtkcombo.c +++ b/gtk/gtkcombo.c @@ -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; } diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c index 6c56e7ae2..1f636b128 100644 --- a/gtk/gtklayout.c +++ b/gtk/gtklayout.c @@ -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; + changed = TRUE; + } - 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"); + 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 |