forked from AuroraMiddleware/gtk
take value_spacing into account for GTK_POS_LEFT.
Fri Jan 22 07:33:44 1999 Tim Janik <timj@gtk.org> * gtk/gtkvscale.c (gtk_vscale_pos_trough): take value_spacing into account for GTK_POS_LEFT. * gtk/gtkradiobutton.c (gtk_radio_button_set_group): use gtk_toggle_button_set_active () to set the new state. (gtk_radio_button_new): only _set_group if group != NULL. (gtk_radio_button_clicked): reference the widget. (gtk_radio_button_init): make radio buttons active upon startup.
This commit is contained in:
parent
cb4bf0657c
commit
060c32e4e0
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
Fri Jan 22 07:33:44 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkvscale.c (gtk_vscale_pos_trough): take value_spacing into
|
||||
account for GTK_POS_LEFT.
|
||||
|
||||
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): use
|
||||
gtk_toggle_button_set_active () to set the new state.
|
||||
(gtk_radio_button_new): only _set_group if group != NULL.
|
||||
(gtk_radio_button_clicked): reference the widget.
|
||||
(gtk_radio_button_init): make radio buttons active upon
|
||||
startup.
|
||||
|
||||
Thu Jan 21 17:13:12 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkselection.c:
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Jan 22 07:33:44 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkvscale.c (gtk_vscale_pos_trough): take value_spacing into
|
||||
account for GTK_POS_LEFT.
|
||||
|
||||
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): use
|
||||
gtk_toggle_button_set_active () to set the new state.
|
||||
(gtk_radio_button_new): only _set_group if group != NULL.
|
||||
(gtk_radio_button_clicked): reference the widget.
|
||||
(gtk_radio_button_init): make radio buttons active upon
|
||||
startup.
|
||||
|
||||
Thu Jan 21 17:13:12 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkselection.c:
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Jan 22 07:33:44 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkvscale.c (gtk_vscale_pos_trough): take value_spacing into
|
||||
account for GTK_POS_LEFT.
|
||||
|
||||
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): use
|
||||
gtk_toggle_button_set_active () to set the new state.
|
||||
(gtk_radio_button_new): only _set_group if group != NULL.
|
||||
(gtk_radio_button_clicked): reference the widget.
|
||||
(gtk_radio_button_init): make radio buttons active upon
|
||||
startup.
|
||||
|
||||
Thu Jan 21 17:13:12 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkselection.c:
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Jan 22 07:33:44 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkvscale.c (gtk_vscale_pos_trough): take value_spacing into
|
||||
account for GTK_POS_LEFT.
|
||||
|
||||
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): use
|
||||
gtk_toggle_button_set_active () to set the new state.
|
||||
(gtk_radio_button_new): only _set_group if group != NULL.
|
||||
(gtk_radio_button_clicked): reference the widget.
|
||||
(gtk_radio_button_init): make radio buttons active upon
|
||||
startup.
|
||||
|
||||
Thu Jan 21 17:13:12 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkselection.c:
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Jan 22 07:33:44 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkvscale.c (gtk_vscale_pos_trough): take value_spacing into
|
||||
account for GTK_POS_LEFT.
|
||||
|
||||
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): use
|
||||
gtk_toggle_button_set_active () to set the new state.
|
||||
(gtk_radio_button_new): only _set_group if group != NULL.
|
||||
(gtk_radio_button_clicked): reference the widget.
|
||||
(gtk_radio_button_init): make radio buttons active upon
|
||||
startup.
|
||||
|
||||
Thu Jan 21 17:13:12 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkselection.c:
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Jan 22 07:33:44 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkvscale.c (gtk_vscale_pos_trough): take value_spacing into
|
||||
account for GTK_POS_LEFT.
|
||||
|
||||
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): use
|
||||
gtk_toggle_button_set_active () to set the new state.
|
||||
(gtk_radio_button_new): only _set_group if group != NULL.
|
||||
(gtk_radio_button_clicked): reference the widget.
|
||||
(gtk_radio_button_init): make radio buttons active upon
|
||||
startup.
|
||||
|
||||
Thu Jan 21 17:13:12 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkselection.c:
|
||||
|
@ -1,3 +1,15 @@
|
||||
Fri Jan 22 07:33:44 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkvscale.c (gtk_vscale_pos_trough): take value_spacing into
|
||||
account for GTK_POS_LEFT.
|
||||
|
||||
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): use
|
||||
gtk_toggle_button_set_active () to set the new state.
|
||||
(gtk_radio_button_new): only _set_group if group != NULL.
|
||||
(gtk_radio_button_clicked): reference the widget.
|
||||
(gtk_radio_button_init): make radio buttons active upon
|
||||
startup.
|
||||
|
||||
Thu Jan 21 17:13:12 1999 Jeff Garzik <jgarzik@pobox.com>
|
||||
|
||||
* gtk/gtkselection.c:
|
||||
|
@ -99,7 +99,12 @@ static void
|
||||
gtk_radio_button_init (GtkRadioButton *radio_button)
|
||||
{
|
||||
GTK_WIDGET_SET_FLAGS (radio_button, GTK_NO_WINDOW);
|
||||
|
||||
GTK_TOGGLE_BUTTON (radio_button)->active = TRUE;
|
||||
|
||||
radio_button->group = g_slist_prepend (NULL, radio_button);
|
||||
|
||||
gtk_widget_set_state (GTK_WIDGET (radio_button), GTK_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -146,12 +151,12 @@ gtk_radio_button_get_arg (GtkObject *object,
|
||||
|
||||
void
|
||||
gtk_radio_button_set_group (GtkRadioButton *radio_button,
|
||||
GSList *group)
|
||||
GSList *group)
|
||||
{
|
||||
g_return_if_fail (radio_button != NULL);
|
||||
g_return_if_fail (GTK_IS_RADIO_BUTTON (radio_button));
|
||||
g_return_if_fail (!g_slist_find (group, radio_button));
|
||||
|
||||
|
||||
if (radio_button->group)
|
||||
{
|
||||
GSList *slist;
|
||||
@ -183,11 +188,8 @@ gtk_radio_button_set_group (GtkRadioButton *radio_button,
|
||||
tmp_button->group = radio_button->group;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GTK_TOGGLE_BUTTON (radio_button)->active = TRUE;
|
||||
gtk_widget_set_state (GTK_WIDGET (radio_button), GTK_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_button), group == NULL);
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
@ -197,7 +199,8 @@ gtk_radio_button_new (GSList *group)
|
||||
|
||||
radio_button = gtk_type_new (gtk_radio_button_get_type ());
|
||||
|
||||
gtk_radio_button_set_group (radio_button, group);
|
||||
if (group)
|
||||
gtk_radio_button_set_group (radio_button, group);
|
||||
|
||||
return GTK_WIDGET (radio_button);
|
||||
}
|
||||
@ -293,6 +296,8 @@ gtk_radio_button_clicked (GtkButton *button)
|
||||
toggle_button = GTK_TOGGLE_BUTTON (button);
|
||||
toggled = FALSE;
|
||||
|
||||
gtk_widget_ref (GTK_WIDGET (button));
|
||||
|
||||
if (toggle_button->active)
|
||||
{
|
||||
tmp_button = NULL;
|
||||
@ -303,7 +308,7 @@ gtk_radio_button_clicked (GtkButton *button)
|
||||
tmp_button = tmp_list->data;
|
||||
tmp_list = tmp_list->next;
|
||||
|
||||
if (tmp_button->active && (tmp_button != toggle_button))
|
||||
if (tmp_button->active && tmp_button != toggle_button)
|
||||
break;
|
||||
|
||||
tmp_button = NULL;
|
||||
@ -348,6 +353,8 @@ gtk_radio_button_clicked (GtkButton *button)
|
||||
gtk_toggle_button_toggled (toggle_button);
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (button));
|
||||
|
||||
gtk_widget_unref (GTK_WIDGET (button));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -398,7 +398,7 @@ gtk_vscale_pos_trough (GtkVScale *vscale,
|
||||
switch (scale->value_pos)
|
||||
{
|
||||
case GTK_POS_LEFT:
|
||||
*x = (gtk_scale_get_value_width (scale) +
|
||||
*x = (gtk_scale_get_value_width (scale) + SCALE_CLASS (scale)->value_spacing +
|
||||
(widget->allocation.width - widget->requisition.width) / 2);
|
||||
break;
|
||||
case GTK_POS_RIGHT:
|
||||
|
@ -14,6 +14,10 @@
|
||||
include "testgtkrc2"
|
||||
|
||||
#include "/usr/local/share/themes/Pixmap/gtk/gtkrc"
|
||||
#include "/usr/local/share/themes/Redmond95/gtk/gtkrc"
|
||||
#include "/usr/local/share/themes/Metal/gtk/gtkrc"
|
||||
#include "/usr/local/share/themes/Notif/gtk/gtkrc"
|
||||
#include "/usr/local/share/themes/Default/gtk/gtkrc"
|
||||
|
||||
pixmap_path "."
|
||||
|
||||
|
@ -14,6 +14,10 @@
|
||||
include "testgtkrc2"
|
||||
|
||||
#include "/usr/local/share/themes/Pixmap/gtk/gtkrc"
|
||||
#include "/usr/local/share/themes/Redmond95/gtk/gtkrc"
|
||||
#include "/usr/local/share/themes/Metal/gtk/gtkrc"
|
||||
#include "/usr/local/share/themes/Notif/gtk/gtkrc"
|
||||
#include "/usr/local/share/themes/Default/gtk/gtkrc"
|
||||
|
||||
pixmap_path "."
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user