Bill Skaggs <weskaggs@primate.ucdavis.edu>

* libgimpwidgets/gimppropwidgets.[ch]: revert previous
	change; was not necessary.
This commit is contained in:
William Skaggs 2006-09-22 18:22:53 +00:00
parent d271c7387c
commit 93d3fd43ca
3 changed files with 15 additions and 42 deletions

View File

@ -1,3 +1,8 @@
2006-09-22 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* libgimpwidgets/gimppropwidgets.[ch]: revert previous
change; was not necessary.
2006-09-22 Michael Natterer <mitch@gimp.org>
* app/display/gimpstatusbar.c (gimp_statusbar_progress_style_set):

View File

@ -66,9 +66,9 @@ static void connect_notify (GObject *config,
/* check button */
/******************/
static void gimp_prop_toggle_button_callback (GtkWidget *widget,
static void gimp_prop_check_button_callback (GtkWidget *widget,
GObject *config);
static void gimp_prop_toggle_button_notify (GObject *config,
static void gimp_prop_check_button_notify (GObject *config,
GParamSpec *param_spec,
GtkWidget *button);
@ -89,30 +89,6 @@ GtkWidget *
gimp_prop_check_button_new (GObject *config,
const gchar *property_name,
const gchar *label)
{
return gimp_prop_toggle_button_new (config, property_name,
label, TRUE);
}
/**
* gimp_prop_toggle_button_new:
* @config: Object to which property is attached.
* @property_name: Name of boolean property controlled by checkbutton.
* @label: Label to give checkbutton (including mnemonic).
* @checkbutton: TRUE if the toggle button should be a checkbutton.
*
* Creates a #GtkToggleButton that displays and sets the specified
* boolean property.
*
* Return value: The newly created #GtkToggleButton widget.
*
* Since GIMP 2.4
*/
GtkWidget *
gimp_prop_toggle_button_new (GObject *config,
const gchar *property_name,
const gchar *label,
gboolean checkbutton)
{
GParamSpec *param_spec;
GtkWidget *button;
@ -130,29 +106,25 @@ gimp_prop_toggle_button_new (GObject *config,
property_name, &value,
NULL);
if (checkbutton)
button = gtk_check_button_new_with_mnemonic (label);
else
button = gtk_toggle_button_new_with_mnemonic (label);
button = gtk_check_button_new_with_mnemonic (label);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), value);
set_param_spec (G_OBJECT (button), button, param_spec);
g_signal_connect (button, "toggled",
G_CALLBACK (gimp_prop_toggle_button_callback),
G_CALLBACK (gimp_prop_check_button_callback),
config);
connect_notify (config, property_name,
G_CALLBACK (gimp_prop_toggle_button_notify),
G_CALLBACK (gimp_prop_check_button_notify),
button);
return button;
}
static void
gimp_prop_toggle_button_callback (GtkWidget *widget,
GObject *config)
gimp_prop_check_button_callback (GtkWidget *widget,
GObject *config)
{
GParamSpec *param_spec;
@ -168,7 +140,7 @@ gimp_prop_toggle_button_callback (GtkWidget *widget,
}
static void
gimp_prop_toggle_button_notify (GObject *config,
gimp_prop_check_button_notify (GObject *config,
GParamSpec *param_spec,
GtkWidget *button)
{
@ -181,14 +153,14 @@ gimp_prop_toggle_button_notify (GObject *config,
if (GTK_TOGGLE_BUTTON (button)->active != value)
{
g_signal_handlers_block_by_func (button,
gimp_prop_toggle_button_callback,
gimp_prop_check_button_callback,
config);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), value);
gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (button));
g_signal_handlers_unblock_by_func (button,
gimp_prop_toggle_button_callback,
gimp_prop_check_button_callback,
config);
}
}

View File

@ -29,10 +29,6 @@
GtkWidget * gimp_prop_check_button_new (GObject *config,
const gchar *property_name,
const gchar *label);
GtkWidget * gimp_prop_toggle_button_new (GObject *config,
const gchar *property_name,
const gchar *label,
gboolean checkbutton);
GtkWidget * gimp_prop_boolean_combo_box_new (GObject *config,
const gchar *property_name,
const gchar *true_text,