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:
Owen Taylor 2001-07-12 18:10:06 +00:00 committed by Owen Taylor
parent 3c57c96148
commit 82ffb2f502
10 changed files with 96 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)
{

View File

@ -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);

View File

@ -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;