Commit 56b49396 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

libgimp/gimpbrushmenu.c libgimp/gimpexport.c libgimp/gimpgradientmenu.c

2001-07-31  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpbrushmenu.c
	* libgimp/gimpexport.c
	* libgimp/gimpgradientmenu.c
	* libgimp/gimpmenu.c
	* libgimp/gimppatternmenu.c: GObject porting.
parent 0f6ab278
2001-07-31 Sven Neumann <sven@gimp.org>
* libgimp/gimpbrushmenu.c
* libgimp/gimpexport.c
* libgimp/gimpgradientmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c: GObject porting.
2001-07-31 Sven Neumann <sven@gimp.org>
* app/core/core-types.h: removed g_signal_handlers_disconnect_by_data
......
......@@ -348,9 +348,9 @@ gimp_brush_select_widget (gchar *dname,
gtk_widget_set_events (brush, BRUSH_EVENT_MASK);
gtk_signal_connect (GTK_OBJECT (brush), "event",
(GtkSignalFunc) brush_preview_events,
(gpointer)bsel);
g_signal_connect (G_OBJECT (brush), "event",
G_CALLBACK (brush_preview_events),
bsel);
bsel->cback = cback;
bsel->data = data;
......@@ -398,11 +398,11 @@ gimp_brush_select_widget (gchar *dname,
gtk_widget_show(button);
bsel->button = button;
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) brush_select_callback,
(gpointer)bsel);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (brush_select_callback),
bsel);
gtk_object_set_data (GTK_OBJECT (hbox), BSEL_DATA_KEY, (gpointer) bsel);
g_object_set_data (G_OBJECT (hbox), BSEL_DATA_KEY, bsel);
return hbox;
}
......@@ -413,7 +413,7 @@ gimp_brush_select_widget_close_popup (GtkWidget *widget)
{
BSelect *bsel;
bsel = (BSelect *) gtk_object_get_data (GTK_OBJECT (widget), BSEL_DATA_KEY);
bsel = (BSelect *) g_object_get_data (G_OBJECT (widget), BSEL_DATA_KEY);
if (bsel && bsel->brush_popup_pnt)
{
......@@ -439,7 +439,7 @@ gimp_brush_select_widget_set_popup (GtkWidget *widget,
gchar *brush_name;
BSelect *bsel;
bsel = (BSelect *) gtk_object_get_data (GTK_OBJECT (widget), BSEL_DATA_KEY);
bsel = (BSelect *) g_object_get_data (G_OBJECT (widget), BSEL_DATA_KEY);
if (bsel)
{
......
......@@ -344,9 +344,9 @@ export_dialog (GSList *actions,
NULL);
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
GTK_SIGNAL_FUNC (export_cancel_callback),
NULL);
g_signal_connect (G_OBJECT (dialog), "destroy",
G_CALLBACK (export_cancel_callback),
NULL);
/* the headline */
vbox = gtk_vbox_new (FALSE, 6);
......@@ -380,19 +380,21 @@ export_dialog (GSList *actions,
button = gtk_radio_button_new_with_label (radio_group,
gettext (action->possibilities[0]));
gtk_label_set_justify (GTK_LABEL (GTK_BIN (button)->child), GTK_JUSTIFY_LEFT);
radio_group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_label_set_justify (GTK_LABEL (GTK_BIN (button)->child),
GTK_JUSTIFY_LEFT);
radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (export_toggle_callback),
&action->choice);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (export_toggle_callback),
&action->choice);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_widget_show (button);
button = gtk_radio_button_new_with_label (radio_group,
gettext (action->possibilities[1]));
gtk_label_set_justify (GTK_LABEL (GTK_BIN (button)->child), GTK_JUSTIFY_LEFT);
radio_group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_label_set_justify (GTK_LABEL (GTK_BIN (button)->child),
GTK_JUSTIFY_LEFT);
radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
}
......
......@@ -198,13 +198,14 @@ gimp_gradient_select_widget (gchar *dname,
button = gtk_button_new ();
gradient = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (gradient), CELL_SIZE_WIDTH, CELL_SIZE_HEIGHT);
gtk_preview_size (GTK_PREVIEW (gradient),
CELL_SIZE_WIDTH, CELL_SIZE_HEIGHT);
gtk_widget_show (gradient);
gtk_container_add (GTK_CONTAINER (button), gradient);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gradient_preview_callback,
(gpointer)gsel);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (gradient_preview_callback),
gsel);
gtk_widget_show(button);
......@@ -219,7 +220,9 @@ gimp_gradient_select_widget (gchar *dname,
/* Do initial gradient setup */
gradient_name =
gimp_gradients_get_gradient_data (igradient, &width, CELL_SIZE_WIDTH, &grad_data);
gimp_gradients_get_gradient_data (igradient,
&width, CELL_SIZE_WIDTH,
&grad_data);
if (gradient_name)
{
......@@ -235,7 +238,7 @@ gimp_gradient_select_widget (gchar *dname,
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
gtk_object_set_data (GTK_OBJECT (hbox), GSEL_DATA_KEY, (gpointer)gsel);
g_object_set_data (G_OBJECT (hbox), GSEL_DATA_KEY, gsel);
return hbox;
}
......@@ -246,7 +249,7 @@ gimp_gradient_select_widget_close_popup (GtkWidget *widget)
{
GSelect *gsel;
gsel = (GSelect*) gtk_object_get_data (GTK_OBJECT (widget), GSEL_DATA_KEY);
gsel = (GSelect*) g_object_get_data (G_OBJECT (widget), GSEL_DATA_KEY);
if (gsel && gsel->gradient_popup_pnt)
{
......@@ -264,12 +267,14 @@ gimp_gradient_select_widget_set_popup (GtkWidget *widget,
gchar *gradient_name;
GSelect *gsel;
gsel = (GSelect*) gtk_object_get_data (GTK_OBJECT (widget), GSEL_DATA_KEY);
gsel = (GSelect*) g_object_get_data (G_OBJECT (widget), GSEL_DATA_KEY);
if (gsel)
{
gradient_name =
gimp_gradients_get_gradient_data (gname, &width, gsel->sample_size, &grad_data);
gimp_gradients_get_gradient_data (gname,
&width, gsel->sample_size,
&grad_data);
if (gradient_name)
{
......
......@@ -121,8 +121,8 @@ gimp_image_menu_new (GimpConstraintFunc constraint,
gint i, k;
menu = gtk_menu_new ();
gtk_object_set_user_data (GTK_OBJECT (menu), (gpointer) callback);
gtk_object_set_data (GTK_OBJECT (menu), "gimp_callback_data", data);
g_object_set_data (G_OBJECT (menu), "gimp_callback", (gpointer) callback);
g_object_set_data (G_OBJECT (menu), "gimp_callback_data", data);
images = gimp_image_list (&nimages);
for (i = 0, k = 0; i < nimages; i++)
......@@ -133,9 +133,9 @@ gimp_image_menu_new (GimpConstraintFunc constraint,
g_free (filename);
menuitem = gtk_menu_item_new_with_label (label);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
(GtkSignalFunc) gimp_menu_callback,
&images[i]);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (gimp_menu_callback),
&images[i]);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
gtk_widget_show (menuitem);
......@@ -185,8 +185,8 @@ gimp_layer_menu_new (GimpConstraintFunc constraint,
gint i, j, k;
menu = gtk_menu_new ();
gtk_object_set_user_data (GTK_OBJECT (menu), (gpointer) callback);
gtk_object_set_data (GTK_OBJECT (menu), "gimp_callback_data", data);
g_object_set_data (G_OBJECT (menu), "gimp_callback", callback);
g_object_set_data (G_OBJECT (menu), "gimp_callback_data", data);
layer = -1;
......@@ -212,9 +212,9 @@ gimp_layer_menu_new (GimpConstraintFunc constraint,
g_free (name);
menuitem = gtk_menu_item_new();
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
(GtkSignalFunc) gimp_menu_callback,
&layers[j]);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (gimp_menu_callback),
&layers[j]);
hbox = gtk_hbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(menuitem), hbox);
......@@ -297,8 +297,8 @@ gimp_channel_menu_new (GimpConstraintFunc constraint,
gint i, j, k;
menu = gtk_menu_new ();
gtk_object_set_user_data (GTK_OBJECT (menu), (gpointer) callback);
gtk_object_set_data (GTK_OBJECT (menu), "gimp_callback_data", data);
g_object_set_data (G_OBJECT (menu), "gimp_callback", callback);
g_object_set_data (G_OBJECT (menu), "gimp_callback_data", data);
channel = -1;
......@@ -324,9 +324,9 @@ gimp_channel_menu_new (GimpConstraintFunc constraint,
g_free (name);
menuitem = gtk_menu_item_new ();
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (gimp_menu_callback),
&channels[j]);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (gimp_menu_callback),
&channels[j]);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (menuitem), hbox);
......@@ -412,8 +412,8 @@ gimp_drawable_menu_new (GimpConstraintFunc constraint,
gint i, j, k;
menu = gtk_menu_new ();
gtk_object_set_user_data (GTK_OBJECT (menu), (gpointer) callback);
gtk_object_set_data (GTK_OBJECT (menu), "gimp_callback_data", data);
g_object_set_data (G_OBJECT (menu), "gimp_callback", callback);
g_object_set_data (G_OBJECT (menu), "gimp_callback_data", data);
drawable = -1;
......@@ -441,9 +441,9 @@ gimp_drawable_menu_new (GimpConstraintFunc constraint,
g_free (name);
menuitem = gtk_menu_item_new ();
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
(GtkSignalFunc) gimp_menu_callback,
&layers[j]);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (gimp_menu_callback),
&layers[j]);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER(menuitem), hbox);
......@@ -504,9 +504,9 @@ gimp_drawable_menu_new (GimpConstraintFunc constraint,
g_free (name);
menuitem = gtk_menu_item_new ();
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (gimp_menu_callback),
&channels[j]);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (gimp_menu_callback),
&channels[j]);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (menuitem), hbox);
......@@ -579,10 +579,10 @@ gimp_menu_callback (GtkWidget *widget,
GimpMenuCallback callback;
gpointer callback_data;
callback =
(GimpMenuCallback) gtk_object_get_user_data (GTK_OBJECT (widget->parent));
callback_data = gtk_object_get_data (GTK_OBJECT (widget->parent),
"gimp_callback_data");
callback = (GimpMenuCallback) g_object_get_data (G_OBJECT (widget->parent),
"gimp_callback");
callback_data = g_object_get_data (G_OBJECT (widget->parent),
"gimp_callback_data");
(* callback) (*id, callback_data);
}
......
......@@ -317,9 +317,9 @@ gimp_pattern_select_widget (gchar *dname,
gtk_widget_set_events (pattern, PREVIEW_EVENT_MASK);
gtk_signal_connect (GTK_OBJECT (pattern), "event",
(GtkSignalFunc) pattern_preview_events,
(gpointer)psel);
g_signal_connect (G_OBJECT (pattern), "event",
G_CALLBACK (pattern_preview_events),
psel);
psel->cback = cback;
psel->data = data;
......@@ -357,11 +357,11 @@ gimp_pattern_select_widget (gchar *dname,
gtk_widget_show (button);
psel->button = button;
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) patterns_select_callback,
(gpointer)psel);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (patterns_select_callback),
psel);
gtk_object_set_data (GTK_OBJECT(hbox), PSEL_DATA_KEY, (gpointer)psel);
g_object_set_data (G_OBJECT (hbox), PSEL_DATA_KEY, psel);
return hbox;
}
......@@ -371,7 +371,7 @@ gimp_pattern_select_widget_close_popup (GtkWidget *widget)
{
PSelect *psel;
psel = (PSelect *) gtk_object_get_data (GTK_OBJECT (widget), PSEL_DATA_KEY);
psel = (PSelect *) g_object_get_data (G_OBJECT (widget), PSEL_DATA_KEY);
if (psel && psel->pattern_popup_pnt)
{
......@@ -392,7 +392,7 @@ gimp_pattern_select_widget_set_popup (GtkWidget *widget,
gchar *pattern_name;
PSelect *psel;
psel = (PSelect*) gtk_object_get_data (GTK_OBJECT (widget), PSEL_DATA_KEY);
psel = (PSelect*) g_object_get_data (G_OBJECT (widget), PSEL_DATA_KEY);
if (psel)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment