mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Add missing case.
Thu Jul 12 14:06:19 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkmenubar.c (gtk_menu_bar_hierarchy_changed): Add missing case. * gtk/gtkcontainer.c (gtk_container_get_focus_chain): Fix NULL/FALSE return value confusion. * gtk/gtkrange.c (coord_to_value): Fix division-by-zero problem when scrollbar completely fills range. (Patch from Matthias Clasen, #57047)
This commit is contained in:
parent
3c57c96148
commit
82ffb2f502
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
Thu Jul 12 14:06:19 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c (gtk_menu_bar_hierarchy_changed): Add
|
||||
missing case.
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): Fix
|
||||
NULL/FALSE return value confusion.
|
||||
|
||||
* gtk/gtkrange.c (coord_to_value): Fix division-by-zero
|
||||
problem when scrollbar completely fills range. (Patch
|
||||
from Matthias Clasen, #57047)
|
||||
|
||||
Thu Jul 12 13:53:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Properly
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Jul 12 14:06:19 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c (gtk_menu_bar_hierarchy_changed): Add
|
||||
missing case.
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): Fix
|
||||
NULL/FALSE return value confusion.
|
||||
|
||||
* gtk/gtkrange.c (coord_to_value): Fix division-by-zero
|
||||
problem when scrollbar completely fills range. (Patch
|
||||
from Matthias Clasen, #57047)
|
||||
|
||||
Thu Jul 12 13:53:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Properly
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Jul 12 14:06:19 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c (gtk_menu_bar_hierarchy_changed): Add
|
||||
missing case.
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): Fix
|
||||
NULL/FALSE return value confusion.
|
||||
|
||||
* gtk/gtkrange.c (coord_to_value): Fix division-by-zero
|
||||
problem when scrollbar completely fills range. (Patch
|
||||
from Matthias Clasen, #57047)
|
||||
|
||||
Thu Jul 12 13:53:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Properly
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Jul 12 14:06:19 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c (gtk_menu_bar_hierarchy_changed): Add
|
||||
missing case.
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): Fix
|
||||
NULL/FALSE return value confusion.
|
||||
|
||||
* gtk/gtkrange.c (coord_to_value): Fix division-by-zero
|
||||
problem when scrollbar completely fills range. (Patch
|
||||
from Matthias Clasen, #57047)
|
||||
|
||||
Thu Jul 12 13:53:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Properly
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Jul 12 14:06:19 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c (gtk_menu_bar_hierarchy_changed): Add
|
||||
missing case.
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): Fix
|
||||
NULL/FALSE return value confusion.
|
||||
|
||||
* gtk/gtkrange.c (coord_to_value): Fix division-by-zero
|
||||
problem when scrollbar completely fills range. (Patch
|
||||
from Matthias Clasen, #57047)
|
||||
|
||||
Thu Jul 12 13:53:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Properly
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Jul 12 14:06:19 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c (gtk_menu_bar_hierarchy_changed): Add
|
||||
missing case.
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): Fix
|
||||
NULL/FALSE return value confusion.
|
||||
|
||||
* gtk/gtkrange.c (coord_to_value): Fix division-by-zero
|
||||
problem when scrollbar completely fills range. (Patch
|
||||
from Matthias Clasen, #57047)
|
||||
|
||||
Thu Jul 12 13:53:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Properly
|
||||
|
@ -1,3 +1,15 @@
|
||||
Thu Jul 12 14:06:19 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c (gtk_menu_bar_hierarchy_changed): Add
|
||||
missing case.
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): Fix
|
||||
NULL/FALSE return value confusion.
|
||||
|
||||
* gtk/gtkrange.c (coord_to_value): Fix division-by-zero
|
||||
problem when scrollbar completely fills range. (Patch
|
||||
from Matthias Clasen, #57047)
|
||||
|
||||
Thu Jul 12 13:53:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Properly
|
||||
|
@ -2126,7 +2126,7 @@ gboolean
|
||||
gtk_container_get_focus_chain (GtkContainer *container,
|
||||
GList **focus_chain)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_CONTAINER (container), NULL);
|
||||
g_return_val_if_fail (GTK_IS_CONTAINER (container), FALSE);
|
||||
|
||||
if (focus_chain)
|
||||
{
|
||||
|
@ -484,7 +484,7 @@ gtk_menu_bar_hierarchy_changed (GtkWidget *widget,
|
||||
toplevel = gtk_widget_get_toplevel (widget);
|
||||
|
||||
if (old_toplevel)
|
||||
remove_from_window (old_toplevel, menubar);
|
||||
remove_from_window (old_toplevel, GTK_WINDOW (menubar));
|
||||
|
||||
if (GTK_WIDGET_TOPLEVEL (toplevel))
|
||||
add_to_window (GTK_WINDOW (toplevel), menubar);
|
||||
|
@ -1021,11 +1021,17 @@ coord_to_value (GtkRange *range,
|
||||
gdouble value;
|
||||
|
||||
if (range->orientation == GTK_ORIENTATION_VERTICAL)
|
||||
frac = ((coord - range->layout->trough.y) /
|
||||
(gdouble) (range->layout->trough.height - range->layout->slider.height));
|
||||
if (range->layout->trough.height == range->layout->slider.height)
|
||||
frac = 1.0;
|
||||
else
|
||||
frac = ((coord - range->layout->trough.y) /
|
||||
(gdouble) (range->layout->trough.height - range->layout->slider.height));
|
||||
else
|
||||
frac = ((coord - range->layout->trough.x) /
|
||||
(gdouble) (range->layout->trough.width - range->layout->slider.width));
|
||||
if (range->layout->trough.width == range->layout->slider.width)
|
||||
frac = 1.0;
|
||||
else
|
||||
frac = ((coord - range->layout->trough.x) /
|
||||
(gdouble) (range->layout->trough.width - range->layout->slider.width));
|
||||
|
||||
if (should_invert (range))
|
||||
frac = 1.0 - frac;
|
||||
|
Loading…
Reference in New Issue
Block a user