Commit abf1fb90 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/docindex.c app/gdisplay_color_ui.c app/gimpprogress.c app/nav_window.c

2001-08-01  Sven Neumann  <sven@gimp.org>

	* app/docindex.c
	* app/gdisplay_color_ui.c
	* app/gimpprogress.c
	* app/nav_window.c
	* app/path.c
	* app/scale.c
	* app/undo_history.c
	* app/user_install.c
	* app/gui/resolution-calibrate-dialog.[ch]: converted uses of
	gtk_signal_* to g_signal_*.

	Changed expose_event handlers that used to be connected using
	signal_connect_after to call the default handler, do the additional
	drawing, then stop the signal emission by returning TRUE.
parent 8590e01f
2001-08-01 Sven Neumann <sven@gimp.org>
* app/docindex.c
* app/gdisplay_color_ui.c
* app/gimpprogress.c
* app/nav_window.c
* app/path.c
* app/scale.c
* app/undo_history.c
* app/user_install.c
* app/gui/resolution-calibrate-dialog.[ch]: converted uses of
gtk_signal_* to g_signal_*.
Changed expose_event handlers that used to be connected using
signal_connect_after to call the default handler, do the additional
drawing, then stop the signal emission by returning TRUE.
2001-08-01 Sven Neumann <sven@gimp.org>
* app/tools/gimpairbrushtool.c
......@@ -22,7 +39,7 @@
* app/tools/paint_options.c
* app/tools/selection_options.c
* app/tools/transform_options.c: got rid of all remaining gtk_signal
wrappers.
wrappers in the tools directory.
2001-08-01 Sven Neumann <sven@gimp.org>
......
......@@ -83,10 +83,10 @@ resolution_calibrate_ok (GtkWidget *button,
* by the user_installation_dialog.
**/
void
resolution_calibrate_dialog (GtkWidget *resolution_entry,
GtkRcStyle *dialog_style,
GtkRcStyle *ruler_style,
GtkSignalFunc expose_callback)
resolution_calibrate_dialog (GtkWidget *resolution_entry,
GtkRcStyle *dialog_style,
GtkRcStyle *ruler_style,
GCallback expose_callback)
{
GtkWidget *dialog;
GtkWidget *table;
......@@ -117,16 +117,16 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
NULL);
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit),
NULL);
g_signal_connect (G_OBJECT (dialog), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
gtk_object_set_user_data (GTK_OBJECT (dialog), resolution_entry);
gtk_signal_connect_object_while_alive (GTK_OBJECT (resolution_entry), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (dialog));
gtk_signal_connect_object_while_alive (GTK_OBJECT (resolution_entry), "unmap",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (dialog));
g_signal_connect_object (G_OBJECT (resolution_entry), "destroy",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (dialog), G_CONNECT_SWAPPED);
g_signal_connect_object (G_OBJECT (resolution_entry), "unmap",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (dialog), G_CONNECT_SWAPPED);
SET_STYLE (dialog, dialog_style);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 8);
......@@ -172,9 +172,9 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
SET_STYLE (darea, dialog_style);
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), 16, 16);
if (expose_callback)
gtk_signal_connect_after (GTK_OBJECT (darea), "expose_event",
GTK_SIGNAL_FUNC (expose_callback),
(gpointer) GTK_CORNER_TOP_LEFT);
g_signal_connect (G_OBJECT (darea), "expose_event",
G_CALLBACK (expose_callback),
GINT_TO_POINTER (GTK_CORNER_TOP_LEFT));
gtk_table_attach (GTK_TABLE (table), darea, 0, 1, 0, 1,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show (darea);
......@@ -183,9 +183,9 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
SET_STYLE (darea, dialog_style);
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), 16, 16);
if (expose_callback)
gtk_signal_connect_after (GTK_OBJECT (darea), "expose_event",
GTK_SIGNAL_FUNC (expose_callback),
(gpointer) GTK_CORNER_BOTTOM_LEFT);
g_signal_connect (G_OBJECT (darea), "expose_event",
G_CALLBACK (expose_callback),
GINT_TO_POINTER (GTK_CORNER_BOTTOM_LEFT));
gtk_table_attach (GTK_TABLE (table), darea, 0, 1, 2, 3,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show (darea);
......@@ -194,9 +194,9 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
SET_STYLE (darea, dialog_style);
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), 16, 16);
if (expose_callback)
gtk_signal_connect_after (GTK_OBJECT (darea), "expose_event",
GTK_SIGNAL_FUNC (expose_callback),
(gpointer) GTK_CORNER_TOP_RIGHT);
g_signal_connect (G_OBJECT (darea), "expose_event",
G_CALLBACK (expose_callback),
GINT_TO_POINTER (GTK_CORNER_TOP_RIGHT));
gtk_table_attach (GTK_TABLE (table), darea, 2, 3, 0, 1,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show (darea);
......@@ -205,9 +205,9 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
SET_STYLE (darea, dialog_style);
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), 16, 16);
if (expose_callback)
gtk_signal_connect_after (GTK_OBJECT (darea), "expose_event",
GTK_SIGNAL_FUNC (expose_callback),
(gpointer) GTK_CORNER_BOTTOM_RIGHT);
g_signal_connect (G_OBJECT (darea), "expose_event",
G_CALLBACK (expose_callback),
GINT_TO_POINTER (GTK_CORNER_BOTTOM_RIGHT));
gtk_table_attach (GTK_TABLE (table), darea, 2, 3, 2, 3,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show (darea);
......@@ -247,9 +247,9 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
1, GIMP_MAX_IMAGE_SIZE,
0, 0);
gtk_widget_hide (GTK_WIDGET (GIMP_COORDINATES_CHAINBUTTON (calibrate_entry)));
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
&calibrate_entry);
g_signal_connect (G_OBJECT (dialog), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&calibrate_entry);
if (ruler_style)
{
......
......@@ -20,10 +20,10 @@
#define __RESOLUTION_CALIBRATE_DIALOG_H__
void resolution_calibrate_dialog (GtkWidget *resolution_entry,
GtkRcStyle *dialog_style,
GtkRcStyle *ruler_style,
GtkSignalFunc expose_callback);
void resolution_calibrate_dialog (GtkWidget *resolution_entry,
GtkRcStyle *dialog_style,
GtkRcStyle *ruler_style,
GCallback expose_callback);
#endif /* __RESOLUTION_CALIBRATE_DIALOG_H__ */
......@@ -397,12 +397,20 @@ user_install_cancel_callback (GtkWidget *widget,
timeout = gtk_timeout_add (1024, (GtkFunction) gtk_exit, (gpointer) 0);
}
static gint
static gboolean
user_install_corner_expose (GtkWidget *widget,
GdkEventExpose *eevent,
gpointer data)
{
switch ((GtkCornerType) data)
GtkCornerType corner;
/* call default handler explicitly, then draw the corners */
if (GTK_WIDGET_GET_CLASS (widget)->expose_event)
GTK_WIDGET_GET_CLASS (widget)->expose_event (widget, eevent);
corner = GPOINTER_TO_INT (data);
switch (corner)
{
case GTK_CORNER_TOP_LEFT:
gdk_draw_arc (widget->window,
......@@ -449,7 +457,7 @@ user_install_corner_expose (GtkWidget *widget,
break;
default:
return FALSE;
break;
}
return TRUE;
......@@ -620,9 +628,9 @@ user_install_dialog_create (Gimp *gimp)
darea = gtk_drawing_area_new ();
TITLE_STYLE (darea);
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), 16, 16);
gtk_signal_connect_after (GTK_OBJECT (darea), "expose_event",
GTK_SIGNAL_FUNC (user_install_corner_expose),
(gpointer) GTK_CORNER_TOP_LEFT);
g_signal_connect (G_OBJECT (darea), "expose_event",
G_CALLBACK (user_install_corner_expose),
GINT_TO_POINTER (GTK_CORNER_TOP_LEFT));
gtk_table_attach (GTK_TABLE (table), darea, 0, 1, 0, 1,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show (darea);
......@@ -630,9 +638,9 @@ user_install_dialog_create (Gimp *gimp)
darea = gtk_drawing_area_new ();
TITLE_STYLE (darea);
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), 16, 16);
gtk_signal_connect_after (GTK_OBJECT (darea), "expose_event",
GTK_SIGNAL_FUNC (user_install_corner_expose),
(gpointer) GTK_CORNER_BOTTOM_LEFT);
g_signal_connect (G_OBJECT (darea), "expose_event",
G_CALLBACK (user_install_corner_expose),
GINT_TO_POINTER (GTK_CORNER_BOTTOM_LEFT));
gtk_table_attach (GTK_TABLE (table), darea, 0, 1, 2, 3,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show (darea);
......@@ -1113,7 +1121,7 @@ user_install_resolution_calibrate (GtkWidget *button,
resolution_calibrate_dialog (resolution_entry,
title_style,
page_style,
GTK_SIGNAL_FUNC (user_install_corner_expose));
G_CALLBACK (user_install_corner_expose));
}
static void
......
......@@ -224,8 +224,8 @@ setup_scale (GDisplay *gdisp)
gdisp->vsbdata->page_increment = (gdisp->disp_height / 2);
gdisp->vsbdata->step_increment = stepy;
gtk_signal_emit_by_name (GTK_OBJECT (gdisp->hsbdata), "changed");
gtk_signal_emit_by_name (GTK_OBJECT (gdisp->vsbdata), "changed");
g_signal_emit_by_name (G_OBJECT (gdisp->hsbdata), "changed", 0);
g_signal_emit_by_name (G_OBJECT (gdisp->vsbdata), "changed", 0);
hruler = GTK_RULER (gdisp->hrule);
vruler = GTK_RULER (gdisp->vrule);
......
......@@ -184,12 +184,12 @@ make_dialog (ColorDisplayDialog *cdd)
gtk_clist_set_auto_sort (GTK_CLIST (cdd->src), TRUE);
gtk_container_add (GTK_CONTAINER (scrolled_win), cdd->src);
gtk_signal_connect (GTK_OBJECT (cdd->src), "select_row",
GTK_SIGNAL_FUNC (select_src),
cdd);
gtk_signal_connect (GTK_OBJECT (cdd->src), "unselect_row",
GTK_SIGNAL_FUNC (unselect_src),
cdd);
g_signal_connect (G_OBJECT (cdd->src), "select_row",
G_CALLBACK (select_src),
cdd);
g_signal_connect (G_OBJECT (cdd->src), "unselect_row",
G_CALLBACK (unselect_src),
cdd);
vbbox = gtk_vbutton_box_new ();
gtk_vbutton_box_set_layout_default (GTK_BUTTONBOX_START);
......@@ -209,12 +209,12 @@ make_dialog (ColorDisplayDialog *cdd)
gtk_clist_column_titles_passive (GTK_CLIST (cdd->dest));
gtk_container_add (GTK_CONTAINER (scrolled_win), cdd->dest);
gtk_signal_connect (GTK_OBJECT (cdd->dest), "select_row",
GTK_SIGNAL_FUNC (select_dest),
cdd);
gtk_signal_connect (GTK_OBJECT (cdd->dest), "unselect_row",
GTK_SIGNAL_FUNC (unselect_dest),
cdd);
g_signal_connect (G_OBJECT (cdd->dest), "select_row",
G_CALLBACK (select_dest),
cdd);
g_signal_connect (G_OBJECT (cdd->dest), "unselect_row",
G_CALLBACK (unselect_dest),
cdd);
for (i = 0; i < 5; i++)
{
......@@ -222,9 +222,9 @@ make_dialog (ColorDisplayDialog *cdd)
gtk_button_new_with_label (gettext (buttons[i].label));
gtk_box_pack_start (GTK_BOX (vbbox), cdd->buttons[i], FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (cdd->buttons[i]), "clicked",
GTK_SIGNAL_FUNC (buttons[i].callback),
cdd);
g_signal_connect (G_OBJECT (cdd->buttons[i]), "clicked",
G_CALLBACK (buttons[i].callback),
cdd);
gtk_widget_set_sensitive (cdd->buttons[i], FALSE);
}
......
......@@ -224,8 +224,8 @@ setup_scale (GDisplay *gdisp)
gdisp->vsbdata->page_increment = (gdisp->disp_height / 2);
gdisp->vsbdata->step_increment = stepy;
gtk_signal_emit_by_name (GTK_OBJECT (gdisp->hsbdata), "changed");
gtk_signal_emit_by_name (GTK_OBJECT (gdisp->vsbdata), "changed");
g_signal_emit_by_name (G_OBJECT (gdisp->hsbdata), "changed", 0);
g_signal_emit_by_name (G_OBJECT (gdisp->vsbdata), "changed", 0);
hruler = GTK_RULER (gdisp->hrule);
vruler = GTK_RULER (gdisp->vrule);
......
......@@ -128,9 +128,6 @@ static void nav_dialog_draw_sqr (NavigationDialog *nav_dialog,
static gboolean nav_dialog_preview_events (GtkWidget *widget,
GdkEvent *event,
gpointer data);
static gboolean nav_dialog_expose_event (GtkWidget *widget,
GdkEvent *event,
gpointer data);
static void nav_dialog_idle_update_preview (NavigationDialog *nav_dialog);
static void nav_dialog_update_preview (NavigationDialog *nav_dialog);
......@@ -199,20 +196,20 @@ nav_dialog_create (GDisplay *gdisp)
GTK_WIN_POS_MOUSE,
FALSE, TRUE, TRUE,
"_delete_event_", nav_dialog_close_callback,
"_delete_event_",
nav_dialog_close_callback,
nav_dialog, NULL, NULL, TRUE, TRUE,
NULL);
g_free (title);
gtk_widget_hide (GTK_WIDGET (g_list_nth_data (gtk_container_children (GTK_CONTAINER (GTK_BIN (nav_dialog->shell)->child)), 0)));
gtk_dialog_set_has_separator (GTK_DIALOG (nav_dialog->shell), FALSE);
gtk_widget_hide (GTK_DIALOG (nav_dialog->shell)->action_area);
gtk_signal_connect_object (GTK_OBJECT (nav_dialog->shell), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) nav_dialog);
g_object_weak_ref (G_OBJECT (nav_dialog->shell),
g_free,
nav_dialog);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (nav_dialog->shell)->vbox), abox,
......@@ -246,9 +243,9 @@ nav_dialog_create (GDisplay *gdisp)
gtk_container_add (GTK_CONTAINER (frame), preview);
gtk_widget_show (preview);
gtk_signal_connect (GTK_OBJECT (preview), "marker_changed",
GTK_SIGNAL_FUNC (nav_dialog_marker_changed),
nav_dialog);
g_signal_connect (G_OBJECT (preview), "marker_changed",
G_CALLBACK (nav_dialog_marker_changed),
nav_dialog);
nav_dialog->new_preview = preview;
}
......@@ -260,15 +257,14 @@ nav_dialog_create (GDisplay *gdisp)
if (! g_object_get_data (G_OBJECT (gdisp->gimage), "nav_handlers_installed"))
{
gtk_signal_connect_after (GTK_OBJECT (gdisp->gimage), "dirty",
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
gtk_signal_connect_after (GTK_OBJECT (gdisp->gimage), "clean",
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
g_object_set_data (G_OBJECT (gdisp->gimage),
"nav_handlers_installed",
g_signal_connect (G_OBJECT (gdisp->gimage), "dirty",
G_CALLBACK (nav_image_need_update),
nav_dialog);
g_signal_connect (G_OBJECT (gdisp->gimage), "clean",
G_CALLBACK (nav_image_need_update),
nav_dialog);
g_object_set_data (G_OBJECT (gdisp->gimage), "nav_handlers_installed",
nav_dialog);
}
......@@ -367,9 +363,9 @@ nav_dialog_follow_auto (void)
{
nav_window_auto = nav_dialog_create (gdisp);
gtk_signal_connect (GTK_OBJECT (context), "display_changed",
GTK_SIGNAL_FUNC (nav_dialog_display_changed),
nav_window_auto);
g_signal_connect (G_OBJECT (context), "display_changed",
G_CALLBACK (nav_dialog_display_changed),
nav_window_auto);
}
nav_dialog_popup (nav_window_auto);
......@@ -472,9 +468,9 @@ nav_popup_click_handler (GtkWidget *widget,
nav_dialog->shell = gtk_window_new (GTK_WINDOW_POPUP);
gtk_widget_set_events (nav_dialog->shell, PREVIEW_MASK);
gtk_signal_connect_object (GTK_OBJECT (nav_dialog->shell), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) nav_dialog);
g_object_weak_ref (G_OBJECT (nav_dialog->shell),
g_free,
nav_dialog);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
......@@ -823,17 +819,12 @@ create_preview_widget (NavigationDialog *nav_dialog)
set_size_data (nav_dialog);
gtk_preview_size (GTK_PREVIEW (nav_dialog->preview),
nav_dialog->pwidth,
nav_dialog->pheight);
gtk_signal_connect (GTK_OBJECT (preview), "event",
GTK_SIGNAL_FUNC (nav_dialog_preview_events),
nav_dialog);
gtk_preview_size (GTK_PREVIEW (preview),
nav_dialog->pwidth, nav_dialog->pheight);
gtk_signal_connect_after (GTK_OBJECT (preview), "expose_event",
GTK_SIGNAL_FUNC (nav_dialog_expose_event),
nav_dialog);
g_signal_connect (G_OBJECT (preview), "event",
G_CALLBACK (nav_dialog_preview_events),
nav_dialog);
}
static gboolean
......@@ -1208,13 +1199,10 @@ nav_dialog_inside_preview_square (NavigationDialog *nav_dialog,
gint x,
gint y)
{
if (x > nav_dialog->dispx &&
x < (nav_dialog->dispx + nav_dialog->dispwidth) &&
y > nav_dialog->dispy &&
y < nav_dialog->dispy + nav_dialog->dispheight)
return TRUE;
return FALSE;
return (x > nav_dialog->dispx &&
x < nav_dialog->dispx + nav_dialog->dispwidth &&
y > nav_dialog->dispy &&
y < nav_dialog->dispy + nav_dialog->dispheight);
}
static gboolean
......@@ -1244,7 +1232,13 @@ nav_dialog_preview_events (GtkWidget *widget,
switch (event->type)
{
case GDK_EXPOSE:
break;
/* call default handler explicitly, then draw the square */
GTK_WIDGET_GET_CLASS (widget)->expose_event (widget,
(GdkEventExpose *) event);
nav_dialog_draw_sqr (nav_dialog, FALSE,
nav_dialog->dispx, nav_dialog->dispy,
nav_dialog->dispwidth, nav_dialog->dispheight);
return TRUE;
case GDK_MAP:
if (nav_dialog->ptype == NAV_POPUP)
......@@ -1423,52 +1417,6 @@ nav_dialog_preview_events (GtkWidget *widget,
return FALSE;
}
static gboolean
nav_dialog_expose_event (GtkWidget *widget,
GdkEvent *event,
gpointer data)
{
NavigationDialog *nav_dialog;
GDisplay *gdisp;
nav_dialog = (NavigationDialog *) data;
if (! nav_dialog || nav_dialog->frozen)
return FALSE;
gdisp = nav_dialog->gdisp;
switch (event->type)
{
case GDK_EXPOSE:
/* we must have the grab if in nav_popup */
gtk_signal_handler_block_by_func
(GTK_OBJECT (widget),
GTK_SIGNAL_FUNC (nav_dialog_expose_event),
data);
gtk_widget_draw (nav_dialog->preview, NULL);
gtk_signal_handler_unblock_by_func
(GTK_OBJECT (widget),
GTK_SIGNAL_FUNC (nav_dialog_expose_event),
data);
nav_dialog_draw_sqr (nav_dialog, FALSE,
nav_dialog->dispx, nav_dialog->dispy,
nav_dialog->dispwidth, nav_dialog->dispheight);
if (! gtk_grab_get_current () && nav_dialog->ptype == NAV_POPUP)
nav_dialog_grab_pointer (nav_dialog, nav_dialog->preview);
break;
default:
break;
}
return FALSE;
}
static void
nav_image_need_update (GimpImage *gimage,
......@@ -1563,9 +1511,9 @@ nav_create_button_area (NavigationDialog *nav_dialog)
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (navwindow_zoomout),
nav_dialog);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (navwindow_zoomout),
nav_dialog);
/* user zoom ratio */
g_snprintf (scale_str, MAX_SCALE_BUF, "%d:%d",
......@@ -1581,16 +1529,16 @@ nav_create_button_area (NavigationDialog *nav_dialog)
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (navwindow_zoomin),
nav_dialog);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (navwindow_zoomin),
nav_dialog);
nav_dialog->zoom_adjustment =
gtk_adjustment_new (0.0, -15.0, 16.0, 1.0, 1.0, 1.0);
gtk_signal_connect (GTK_OBJECT (nav_dialog->zoom_adjustment), "value_changed",
GTK_SIGNAL_FUNC (zoom_adj_changed),
nav_dialog);
g_signal_connect (G_OBJECT (nav_dialog->zoom_adjustment), "value_changed",
G_CALLBACK (zoom_adj_changed),
nav_dialog);
hscale = gtk_hscale_new (GTK_ADJUSTMENT (nav_dialog->zoom_adjustment));
gtk_scale_set_draw_value (GTK_SCALE (hscale), FALSE);
......@@ -1647,12 +1595,12 @@ nav_dialog_display_changed (GimpContext *context,
*/
if (! g_object_get_data (G_OBJECT (gimage), "nav_handlers_installed"))
{
gtk_signal_connect_after (GTK_OBJECT (gimage), "dirty",
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
gtk_signal_connect_after (GTK_OBJECT (gimage), "clean",
GTK_SIGNAL_FUNC (nav_image_need_update),
nav_dialog);
g_signal_connect (G_OBJECT (gimage), "dirty",
G_CALLBACK (nav_image_need_update),
nav_dialog);
g_signal_connect (G_OBJECT (gimage), "clean",
G_CALLBACK (nav_image_need_update),
nav_dialog);
g_object_set_data (G_OBJECT (gimage),
"nav_handlers_installed",
......
......@@ -128,9 +128,6 @@ static void nav_dialog_draw_sqr (NavigationDialog *nav_dialog,
static gboolean nav_dialog_preview_events (GtkWidget *widget,
GdkEvent *event,
gpointer data);
static gboolean nav_dialog_expose_event (GtkWidget *widget,
GdkEvent *event,
gpointer data);
static void nav_dialog_idle_update_preview (NavigationDialog *nav_dialog);
static void nav_dialog_update_preview (NavigationDialog *nav_dialog);
......@@ -199,20 +196,20 @@ nav_dialog_create (GDisplay *gdisp)
GTK_WIN_POS_MOUSE,
FALSE, TRUE, TRUE,
"_delete_event_", nav_dialog_close_callback,
"_delete_event_",
nav_dialog_close_callback,
nav_dialog, NULL, NULL, TRUE, TRUE,
NULL);
g_free (title);
gtk_widget_hide (GTK_WIDGET (g_list_nth_data (gtk_container_children (GTK_CONTAINER (GTK_BIN (nav_dialog->shell)->child)), 0)));
gtk_dialog_set_has_separator (GTK_DIALOG (nav_dialog->shell), FALSE);
gtk_widget_hide (GTK_DIALOG (nav_dialog->shell)->action_area);
gtk_signal_connect_object (GTK_OBJECT (nav_dialog->shell), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) nav_dialog);
g_object_weak_ref (G_OBJECT (nav_dialog->shell),
g_free,
nav_dialog);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (nav_dialog->shell)->vbox), abox,
......@@ -246,9 +243,9 @@ nav_dialog_create (GDisplay *gdisp)
gtk_container_add (GTK_CONTAINER (frame), preview);
gtk_widget_show (preview);
gtk_signal_connect (GTK_OBJECT (preview), "marker_changed",
GTK_SIGNAL_FUNC (nav_dialog_marker_changed),
nav_dialog);
g_signal_connect (G_OBJECT (preview), "marker_changed",
G_CALLBACK (nav_dialog_marker_changed),
nav_dialog);
nav_dialog->new_preview = preview;
}
......@@ -260,15 +257,14 @@ nav_dialog_create (GDisplay *gdisp)
if (! g_object_get_data (G_OBJECT (gdisp->gimage), "nav_handlers_installed"))
{