Commit 45785431 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

removed GIMP_ZOOM_TYPE,

2001-08-09  Michael Natterer  <mitch@gimp.org>

	* app/appenums.h: removed GIMP_ZOOM_TYPE,

	* app/widgets/widgets-types.h: added it here.

	* app/disp_callbacks.c
	* app/widgets/gimpnavigationpreview.[ch]
	* app/gui/gradient-editor.c: removed old cruft which expects wheel
	events as button_4 and button_5 and connect to GdkEventScroll
	instead.

	* app/nav_window.c: connect to GimpNavigationPreview's new
	"scroll" and "zoom" signals.

	* app/gui/error-console-dialog.c: remove wheel scrol stuff (done
	by GtkScrolledWindow now).

	* app/gui/color-notebook.c
	* app/gui/gradient-editor.c: removed GtkPixmap stuff and use
	GtkImage instead. Looks a bit ugly in the color_notebook (seems
	we need more icon sizes).

	* app/gui/indicator-area.c: GObject porting.

	* app/gui/menus.c_ some more menu icons.

	* app/gui/toolbox.c: pass a GimpContext around as callback data
	and use context->gimp instead of accessing the global "the_gimp"
	variable.
parent 52b33872
2001-08-09 Michael Natterer <mitch@gimp.org>
* app/appenums.h: removed GIMP_ZOOM_TYPE,
* app/widgets/widgets-types.h: added it here.
* app/disp_callbacks.c
* app/widgets/gimpnavigationpreview.[ch]
* app/gui/gradient-editor.c: removed old cruft which expects wheel
events as button_4 and button_5 and connect to GdkEventScroll
instead.
* app/nav_window.c: connect to GimpNavigationPreview's new
"scroll" and "zoom" signals.
* app/gui/error-console-dialog.c: remove wheel scrol stuff (done
by GtkScrolledWindow now).
* app/gui/color-notebook.c
* app/gui/gradient-editor.c: removed GtkPixmap stuff and use
GtkImage instead. Looks a bit ugly in the color_notebook (seems
we need more icon sizes).
* app/gui/indicator-area.c: GObject porting.
* app/gui/menus.c_ some more menu icons.
* app/gui/toolbox.c: pass a GimpContext around as callback data
and use context->gimp instead of accessing the global "the_gimp"
variable.
2001-08-09 Sven Neumann <sven@gimp.org>
* app/core/Makefile.am
......
......@@ -82,12 +82,6 @@ typedef enum
UNKNOWN
} OrientationType;
typedef enum /*< skip >*/
{
GIMP_ZOOM_IN,
GIMP_ZOOM_OUT
} GimpZoomType;
/* Selection Boolean operations */
typedef enum /*< chop=CHANNEL_OP_ >*/
{
......
......@@ -41,8 +41,6 @@
#include "libgimp/gimpintl.h"
#include "pixmaps/refresh.xpm"
#define COLOR_AREA_SIZE 20
#define COLOR_HISTORY_SIZE 16
......@@ -198,7 +196,7 @@ color_notebook_new (const gchar *title,
GtkWidget *table;
GtkWidget *label;
GtkWidget *button;
GtkWidget *pixmap;
GtkWidget *image;
GtkWidget *arrow;
GtkWidget *color_area;
GimpRGB bw;
......@@ -393,9 +391,9 @@ color_notebook_new (const gchar *title,
gtk_container_add (GTK_CONTAINER (color_frame), cnp->new_color);
gtk_widget_show (cnp->new_color);
gtk_signal_connect (GTK_OBJECT (cnp->new_color), "color_changed",
GTK_SIGNAL_FUNC (color_notebook_color_changed),
cnp);
g_signal_connect (G_OBJECT (cnp->new_color), "color_changed",
G_CALLBACK (color_notebook_color_changed),
cnp);
/* The old color area */
color_frame = gtk_frame_new (NULL);
......@@ -420,17 +418,17 @@ color_notebook_new (const gchar *title,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (button);
pixmap = gimp_pixmap_new (refresh_xpm);
gtk_container_add (GTK_CONTAINER (button), pixmap);
gtk_widget_show (pixmap);
image = gtk_image_new_from_stock (GTK_STOCK_UNDO, GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_show (image);
gimp_help_set_help_data (button,
_("Revert to old color"),
NULL);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (color_notebook_reset_callback),
cnp);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (color_notebook_reset_callback),
cnp);
/* The white color button */
button = gtk_button_new ();
......@@ -447,9 +445,9 @@ color_notebook_new (const gchar *title,
gtk_container_add (GTK_CONTAINER (button), color_area);
gtk_widget_show (color_area);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (color_notebook_set_white),
(GtkObject *) cnp);
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (color_notebook_set_white),
cnp);
/* The black color button */
button = gtk_button_new ();
......@@ -466,9 +464,9 @@ color_notebook_new (const gchar *title,
gtk_container_add (GTK_CONTAINER (button), color_area);
gtk_widget_show (color_area);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (color_notebook_set_black),
(GtkObject *) cnp);
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (color_notebook_set_black),
cnp);
/* The color space sliders, toggle buttons and entries */
table = gtk_table_new (7, 4, FALSE);
......@@ -495,10 +493,11 @@ color_notebook_new (const gchar *title,
gtk_table_attach (GTK_TABLE (table), cnp->toggles[i],
0, 1, i, i + 1,
GTK_SHRINK, GTK_EXPAND, 0, 0);
gtk_signal_connect (GTK_OBJECT (cnp->toggles[i]), "toggled",
GTK_SIGNAL_FUNC (color_notebook_toggle_update),
cnp);
gtk_widget_show (cnp->toggles[i]);
g_signal_connect (G_OBJECT (cnp->toggles[i]), "toggled",
G_CALLBACK (color_notebook_toggle_update),
cnp);
}
cnp->slider_data[i] = gimp_scale_entry_new (GTK_TABLE (table), 1, i,
......@@ -510,9 +509,10 @@ color_notebook_new (const gchar *title,
0, TRUE, 0.0, 0.0,
gettext (slider_tips[i]),
NULL);
gtk_signal_connect (GTK_OBJECT (cnp->slider_data[i]), "value_changed",
GTK_SIGNAL_FUNC (color_notebook_scale_update),
cnp);
g_signal_connect (G_OBJECT (cnp->slider_data[i]), "value_changed",
G_CALLBACK (color_notebook_scale_update),
cnp);
}
/* The color history */
......@@ -531,9 +531,9 @@ color_notebook_new (const gchar *title,
NULL);
gtk_widget_show (button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (color_history_add_clicked),
cnp);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (color_history_add_clicked),
cnp);
arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_OUT);
gtk_container_add (GTK_CONTAINER (button), arrow);
......@@ -556,13 +556,13 @@ color_notebook_new (const gchar *title,
gtk_widget_show (cnp->history[i]);
gtk_widget_show (button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (color_history_color_clicked),
cnp);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (color_history_color_clicked),
cnp);
gtk_signal_connect (GTK_OBJECT (cnp->history[i]), "color_changed",
GTK_SIGNAL_FUNC (color_history_color_changed),
&color_history[i]);
g_signal_connect (G_OBJECT (cnp->history[i]), "color_changed",
G_CALLBACK (color_history_color_changed),
&color_history[i]);
}
/* The hex triplet entry */
......@@ -576,14 +576,15 @@ color_notebook_new (const gchar *title,
gtk_entry_set_text (GTK_ENTRY (cnp->hex_entry), buffer);
gtk_widget_set_usize (GTK_WIDGET (cnp->hex_entry), 60, 0);
gtk_box_pack_end (GTK_BOX (hbox), cnp->hex_entry, TRUE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (cnp->hex_entry), "focus_out_event",
GTK_SIGNAL_FUNC (color_notebook_hex_entry_events),
cnp);
gtk_signal_connect (GTK_OBJECT (cnp->hex_entry), "key_press_event",
GTK_SIGNAL_FUNC (color_notebook_hex_entry_events),
cnp);
gtk_widget_show (cnp->hex_entry);
g_signal_connect (G_OBJECT (cnp->hex_entry), "focus_out_event",
G_CALLBACK (color_notebook_hex_entry_events),
cnp);
g_signal_connect (G_OBJECT (cnp->hex_entry), "key_press_event",
G_CALLBACK (color_notebook_hex_entry_events),
cnp);
label = gtk_label_new (_("Hex Triplet:"));
gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
......@@ -598,9 +599,9 @@ color_notebook_new (const gchar *title,
*/
if (cnp->notebook)
{
gtk_signal_connect (GTK_OBJECT (cnp->notebook), "switch_page",
GTK_SIGNAL_FUNC (color_notebook_page_switch),
cnp);
g_signal_connect (G_OBJECT (cnp->notebook), "switch_page",
G_CALLBACK (color_notebook_page_switch),
cnp);
}
color_notebooks = g_list_prepend (color_notebooks, cnp);
......@@ -1033,10 +1034,16 @@ color_notebook_update_colors (ColorNotebook *cnp,
break;
case UPDATE_NEW_COLOR:
gtk_signal_handler_block_by_data (GTK_OBJECT (cnp->new_color), cnp);
g_signal_handlers_block_by_func (G_OBJECT (cnp->new_color),
color_notebook_color_changed,
cnp);
gimp_color_area_set_color (GIMP_COLOR_AREA (cnp->new_color),
&cnp->rgb);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (cnp->new_color), cnp);
g_signal_handlers_unblock_by_func (G_OBJECT (cnp->new_color),
color_notebook_color_changed,
cnp);
break;
default:
......@@ -1084,12 +1091,16 @@ color_notebook_update_scales (ColorNotebook *cnp,
for (i = 0; i < (cnp->show_alpha ? 7 : 6); i++)
if (i != skip)
{
gtk_signal_handler_block_by_data (GTK_OBJECT (cnp->slider_data[i]),
cnp);
g_signal_handlers_block_by_func (G_OBJECT (cnp->slider_data[i]),
color_notebook_scale_update,
cnp);
gtk_adjustment_set_value (GTK_ADJUSTMENT (cnp->slider_data[i]),
values[i]);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (cnp->slider_data[i]),
cnp);
g_signal_handlers_unblock_by_func (G_OBJECT (cnp->slider_data[i]),
color_notebook_scale_update,
cnp);
}
g_print ("RGB: %d %d %d HSV: %d %d %d ALPHA: %d\n",
......@@ -1352,14 +1363,16 @@ color_history_color_changed (GtkWidget *widget,
if (notebook->history[i] == widget)
continue;
gtk_signal_handler_block_by_data
(GTK_OBJECT (notebook->history[i]), data);
g_signal_handlers_block_by_func (G_OBJECT (notebook->history[i]),
color_history_color_changed,
data);
gimp_color_area_set_color
(GIMP_COLOR_AREA (notebook->history[i]), &changed_color);
gtk_signal_handler_unblock_by_data
(GTK_OBJECT (notebook->history[i]), data);
g_signal_handlers_unblock_by_func (G_OBJECT (notebook->history[i]),
color_history_color_changed,
data);
}
}
}
......
......@@ -178,6 +178,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
GdkEventExpose *eevent;
GdkEventMotion *mevent;
GdkEventButton *bevent;
GdkEventScroll *sevent;
GdkEventKey *kevent;
gdouble tx = 0;
gdouble ty = 0;
......@@ -344,43 +345,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
return_val = TRUE;
break;
/* wheelmouse support */
case 4:
state |= GDK_BUTTON4_MASK;
if (state & GDK_SHIFT_MASK)
{
change_scale (gdisp, GIMP_ZOOM_IN);
}
else
{
GtkAdjustment *adj =
(state & GDK_CONTROL_MASK) ? gdisp->hsbdata : gdisp->vsbdata;
gfloat new_value = adj->value - adj->page_increment / 2;
new_value =
CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, new_value);
}
return_val = TRUE;
break;
case 5:
state |= GDK_BUTTON5_MASK;
if (state & GDK_SHIFT_MASK)
{
change_scale (gdisp, GIMP_ZOOM_OUT);
}
else
{
GtkAdjustment *adj =
(state & GDK_CONTROL_MASK) ? gdisp->hsbdata : gdisp->vsbdata;
gfloat new_value = adj->value + adj->page_increment / 2;
new_value = CLAMP (new_value,
adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, new_value);
}
return_val = TRUE;
break;
default:
break;
}
......@@ -445,20 +409,41 @@ gdisplay_canvas_events (GtkWidget *canvas,
state &= ~GDK_BUTTON3_MASK;
break;
/* wheelmouse support */
case 4:
state &= ~GDK_BUTTON4_MASK;
return_val = TRUE;
default:
break;
}
break;
case 5:
state &= ~GDK_BUTTON5_MASK;
return_val = TRUE;
break;
case GDK_SCROLL:
sevent = (GdkEventScroll *) event;
state = sevent->state;
default:
break;
if (state & GDK_SHIFT_MASK)
{
if (sevent->direction == GDK_SCROLL_UP)
change_scale (gdisp, GIMP_ZOOM_IN);
else
change_scale (gdisp, GIMP_ZOOM_OUT);
}
else
{
GtkAdjustment *adj;
gdouble value;
if (state & GDK_CONTROL_MASK)
adj = gdisp->hsbdata;
else
adj = gdisp->vsbdata;
value = adj->value + ((sevent->direction == GDK_SCROLL_UP) ?
-adj->page_increment / 2 :
adj->page_increment / 2);
value = CLAMP (value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, value);
}
return_val = TRUE;
break;
case GDK_MOTION_NOTIFY:
......
......@@ -178,6 +178,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
GdkEventExpose *eevent;
GdkEventMotion *mevent;
GdkEventButton *bevent;
GdkEventScroll *sevent;
GdkEventKey *kevent;
gdouble tx = 0;
gdouble ty = 0;
......@@ -344,43 +345,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
return_val = TRUE;
break;
/* wheelmouse support */
case 4:
state |= GDK_BUTTON4_MASK;
if (state & GDK_SHIFT_MASK)
{
change_scale (gdisp, GIMP_ZOOM_IN);
}
else
{
GtkAdjustment *adj =
(state & GDK_CONTROL_MASK) ? gdisp->hsbdata : gdisp->vsbdata;
gfloat new_value = adj->value - adj->page_increment / 2;
new_value =
CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, new_value);
}
return_val = TRUE;
break;
case 5:
state |= GDK_BUTTON5_MASK;
if (state & GDK_SHIFT_MASK)
{
change_scale (gdisp, GIMP_ZOOM_OUT);
}
else
{
GtkAdjustment *adj =
(state & GDK_CONTROL_MASK) ? gdisp->hsbdata : gdisp->vsbdata;
gfloat new_value = adj->value + adj->page_increment / 2;
new_value = CLAMP (new_value,
adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, new_value);
}
return_val = TRUE;
break;
default:
break;
}
......@@ -445,20 +409,41 @@ gdisplay_canvas_events (GtkWidget *canvas,
state &= ~GDK_BUTTON3_MASK;
break;
/* wheelmouse support */
case 4:
state &= ~GDK_BUTTON4_MASK;
return_val = TRUE;
default:
break;
}
break;
case 5:
state &= ~GDK_BUTTON5_MASK;
return_val = TRUE;
break;
case GDK_SCROLL:
sevent = (GdkEventScroll *) event;
state = sevent->state;
default:
break;
if (state & GDK_SHIFT_MASK)
{
if (sevent->direction == GDK_SCROLL_UP)
change_scale (gdisp, GIMP_ZOOM_IN);
else
change_scale (gdisp, GIMP_ZOOM_OUT);
}
else
{
GtkAdjustment *adj;
gdouble value;
if (state & GDK_CONTROL_MASK)
adj = gdisp->hsbdata;
else
adj = gdisp->vsbdata;
value = adj->value + ((sevent->direction == GDK_SCROLL_UP) ?
-adj->page_increment / 2 :
adj->page_increment / 2);
value = CLAMP (value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, value);
}
return_val = TRUE;
break;
case GDK_MOTION_NOTIFY:
......
......@@ -178,6 +178,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
GdkEventExpose *eevent;
GdkEventMotion *mevent;
GdkEventButton *bevent;
GdkEventScroll *sevent;
GdkEventKey *kevent;
gdouble tx = 0;
gdouble ty = 0;
......@@ -344,43 +345,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
return_val = TRUE;
break;
/* wheelmouse support */
case 4:
state |= GDK_BUTTON4_MASK;
if (state & GDK_SHIFT_MASK)
{
change_scale (gdisp, GIMP_ZOOM_IN);
}
else
{
GtkAdjustment *adj =
(state & GDK_CONTROL_MASK) ? gdisp->hsbdata : gdisp->vsbdata;
gfloat new_value = adj->value - adj->page_increment / 2;
new_value =
CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, new_value);
}
return_val = TRUE;
break;
case 5:
state |= GDK_BUTTON5_MASK;
if (state & GDK_SHIFT_MASK)
{
change_scale (gdisp, GIMP_ZOOM_OUT);
}
else
{
GtkAdjustment *adj =
(state & GDK_CONTROL_MASK) ? gdisp->hsbdata : gdisp->vsbdata;
gfloat new_value = adj->value + adj->page_increment / 2;
new_value = CLAMP (new_value,
adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, new_value);
}
return_val = TRUE;
break;
default:
break;
}
......@@ -445,20 +409,41 @@ gdisplay_canvas_events (GtkWidget *canvas,
state &= ~GDK_BUTTON3_MASK;
break;
/* wheelmouse support */
case 4:
state &= ~GDK_BUTTON4_MASK;
return_val = TRUE;
default:
break;
}
break;
case 5:
state &= ~GDK_BUTTON5_MASK;
return_val = TRUE;
break;
case GDK_SCROLL:
sevent = (GdkEventScroll *) event;
state = sevent->state;
default:
break;
if (state & GDK_SHIFT_MASK)
{
if (sevent->direction == GDK_SCROLL_UP)
change_scale (gdisp, GIMP_ZOOM_IN);
else
change_scale (gdisp, GIMP_ZOOM_OUT);
}
else
{
GtkAdjustment *adj;
gdouble value;
if (state & GDK_CONTROL_MASK)
adj = gdisp->hsbdata;
else
adj = gdisp->vsbdata;
value = adj->value + ((sevent->direction == GDK_SCROLL_UP) ?
-adj->page_increment / 2 :
adj->page_increment / 2);
value = CLAMP (value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, value);
}
return_val = TRUE;
break;
case GDK_MOTION_NOTIFY:
......
......@@ -178,6 +178,57 @@ nav_dialog_marker_changed (GimpNavigationPreview *nav_preview,
scroll_display (gdisp, xoffset, yoffset);
}
static void
nav_dialog_zoom (GimpNavigationPreview *nav_preview,
GimpZoomType direction,
NavigationDialog *nav_dialog)
{
change_scale (nav_dialog->gdisp, direction);
}
static void
nav_dialog_scroll (GimpNavigationPreview *nav_preview,
GdkScrollDirection direction,
NavigationDialog *nav_dialog)
{
GtkAdjustment *adj;
gdouble value;
g_print ("nav_dialog_scroll(%d)\n", direction);
switch (direction)
{
case GDK_SCROLL_LEFT:
case GDK_SCROLL_RIGHT:
adj = nav_dialog->gdisp->hsbdata;
break;
case GDK_SCROLL_UP:
case GDK_SCROLL_DOWN:
adj = nav_dialog->gdisp->vsbdata;
break;
}
value = adj->value;
switch (direction)
{
case GDK_SCROLL_LEFT:
case GDK_SCROLL_UP:
value -= adj->page_increment / 2;
break;
case GDK_SCROLL_RIGHT:
case GDK_SCROLL_DOWN:
value += adj->page_increment / 2;
break;
}
value = CLAMP (value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, value);
}
NavigationDialog *
nav_dialog_create (GDisplay *gdisp)
{
......@@ -246,6 +297,12 @@ nav_dialog_create (GDisplay *gdisp)
g_signal_connect (G_OBJECT (preview), "marker_changed",
G_CALLBACK (nav_dialog_marker_changed),
nav_dialog);
g_signal_connect (G_OBJECT (preview), "zoom",
G_CALLBACK (nav_dialog_zoom),
nav_dialog);
g_signal_connect (G_OBJECT (preview), "scroll",
G_CALLBACK (nav_dialog_scroll),
nav_dialog);
nav_dialog->new_preview = preview;
}
......
......@@ -178,6 +178,57 @@ nav_dialog_marker_changed (GimpNavigationPreview *nav_preview,
scroll_display (gdisp, xoffset, yoffset);
}
static void
nav_dialog_zoom (GimpNavigationPreview *nav_preview,
GimpZoomType direction,
NavigationDialog *nav_dialog)
{
change_scale (nav_dialog->gdisp, direction);
}
static void
nav_dialog_scroll (GimpNavigationPreview *nav_preview,
GdkScrollDirection direction,
NavigationDialog *nav_dialog)
{
GtkAdjustment *adj;
gdouble value;
g_print ("nav_dialog_scroll(%d)\n", direction);
switch (direction)
{
case GDK_SCROLL_LEFT:
case GDK_SCROLL_RIGHT:
adj = nav_dialog->gdisp->hsbdata;
break;
case GDK_SCROLL_UP:
case GDK_SCROLL_DOWN:
adj = nav_dialog->gdisp->vsbdata;
break;
}
value = adj->value;
switch (direction)
{
case GDK_SCROLL_LEFT:
case GDK_SCROLL_UP:
value -= adj->page_increment / 2;
break;
case GDK_SCROLL_RIGHT:
case GDK_SCROLL_DOWN:
value += adj->page_increment / 2;
break;
}
value = CLAMP (value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, value);
}
NavigationDialog *
nav_dialog_create (GDisplay *gdisp)
{
......@@ -246,6 +297,12 @@ nav_dialog_create (GDisplay *gdisp)
g_signal_connect (G_OBJECT (preview), "marker_changed",
G_CALLBACK (nav_dialog_marker_changed),
nav_dialog);
g_signal_connect (G_OBJECT (preview), "zoom",
G_CALLBACK (nav_dialog_zoom),
nav_dialog);
g_signal_connect (G_OBJECT (preview), "scroll",
G_CALLBACK (nav_dialog_scroll),