return real boolean values not just numbers.

Tue Mar 17 22:45:39 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
                not just numbers.

                        * gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
                                state for != 0, otherwise we get strange results.
This commit is contained in:
Tim Janik 1998-03-17 23:07:30 +00:00 committed by Tim Janik
parent 3872c32d4a
commit 3f04c019cd
9 changed files with 63 additions and 7 deletions

View File

@ -1,3 +1,11 @@
Tue Mar 17 22:45:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
not just numbers.
* gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
state for != 0, otherwise we get strange results.
Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu> Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can * gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can

View File

@ -1,3 +1,11 @@
Tue Mar 17 22:45:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
not just numbers.
* gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
state for != 0, otherwise we get strange results.
Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu> Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can * gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can

View File

@ -1,3 +1,11 @@
Tue Mar 17 22:45:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
not just numbers.
* gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
state for != 0, otherwise we get strange results.
Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu> Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can * gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can

View File

@ -1,3 +1,11 @@
Tue Mar 17 22:45:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
not just numbers.
* gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
state for != 0, otherwise we get strange results.
Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu> Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can * gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can

View File

@ -1,3 +1,11 @@
Tue Mar 17 22:45:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
not just numbers.
* gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
state for != 0, otherwise we get strange results.
Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu> Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can * gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can

View File

@ -1,3 +1,11 @@
Tue Mar 17 22:45:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
not just numbers.
* gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
state for != 0, otherwise we get strange results.
Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu> Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can * gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can

View File

@ -1,3 +1,11 @@
Tue Mar 17 22:45:39 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_arg): return real boolean values
not just numbers.
* gtk/gtktogglebutton.c (gtk_toggle_button_set_state): check
state for != 0, otherwise we get strange results.
Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu> Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can * gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can

View File

@ -158,7 +158,7 @@ gtk_toggle_button_set_state (GtkToggleButton *toggle_button,
g_return_if_fail (toggle_button != NULL); g_return_if_fail (toggle_button != NULL);
g_return_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button)); g_return_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button));
if (toggle_button->active != state) if (toggle_button->active != (state != FALSE))
gtk_button_clicked (GTK_BUTTON (toggle_button)); gtk_button_clicked (GTK_BUTTON (toggle_button));
} }

View File

@ -881,22 +881,22 @@ gtk_widget_get_arg (GtkWidget *widget,
GTK_VALUE_INT (*arg) = aux_info->height; GTK_VALUE_INT (*arg) = aux_info->height;
break; break;
case ARG_VISIBLE: case ARG_VISIBLE:
GTK_VALUE_BOOL (*arg) = GTK_WIDGET_VISIBLE (widget); GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_VISIBLE (widget) != FALSE);
break; break;
case ARG_SENSITIVE: case ARG_SENSITIVE:
GTK_VALUE_BOOL (*arg) = GTK_WIDGET_SENSITIVE (widget); GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_SENSITIVE (widget) != FALSE);
break; break;
case ARG_CAN_FOCUS: case ARG_CAN_FOCUS:
GTK_VALUE_BOOL (*arg) = GTK_WIDGET_CAN_FOCUS (widget); GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_CAN_FOCUS (widget) != FALSE);
break; break;
case ARG_HAS_FOCUS: case ARG_HAS_FOCUS:
GTK_VALUE_BOOL (*arg) = GTK_WIDGET_HAS_FOCUS (widget); GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_HAS_FOCUS (widget) != FALSE);
break; break;
case ARG_CAN_DEFAULT: case ARG_CAN_DEFAULT:
GTK_VALUE_BOOL (*arg) = GTK_WIDGET_CAN_DEFAULT (widget); GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_CAN_DEFAULT (widget) != FALSE);
break; break;
case ARG_HAS_DEFAULT: case ARG_HAS_DEFAULT:
GTK_VALUE_BOOL (*arg) = GTK_WIDGET_HAS_DEFAULT (widget); GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_HAS_DEFAULT (widget) != FALSE);
break; break;
case ARG_STYLE: case ARG_STYLE:
GTK_VALUE_BOXED (*arg) = (gpointer) gtk_widget_get_style (widget); GTK_VALUE_BOXED (*arg) = (gpointer) gtk_widget_get_style (widget);