another xscanimage patch...

Matto Marjanovic (maddog@mir.com)
Wed, 17 Dec 1997 17:48:41 -0500

Here are a couple of patches to gtkglue.c and xscanimage.c to fix the
following:

a) The dialog window didn't shrink to fit after deselecting certain options
(e.g. "advanced options"), leaving unsightly blank spaces.
->Setting the 'autoshrink policy' on the toplevel window does the trick.
(Gee, those GTK guys thought of everything.)

b) xscanimage would always start up with advanced options hidden, even if
the saved preferences indicated they should be displayed, and then you
would have to toggle them off and on again to see 'em.

Nothing like staying home sick for a day...
-matt m.

--------------------------------------------------------------------

--- gtkglue.c Wed Dec 17 17:45:31 1997
+++ gtkglue.c.mm2 Wed Dec 17 17:22:29 1997
@@ -1192,7 +1192,7 @@
dialog->num_elements = num_elements;
dialog->param_change_callback = callback;
dialog->param_change_arg = arg;
- dialog->advanced = TRUE; /* default to showing _all_ options */
+ dialog->advanced = preferences.advanced; /* get value from preferences */

dialog->element = malloc (num_elements * sizeof (dialog->element[0]));
memset (dialog->element, 0, num_elements * sizeof (dialog->element[0]));
--- xscanimage.c Wed Dec 17 17:43:43 1997
+++ xscanimage.c.mm2 Wed Dec 17 17:42:07 1997
@@ -1324,7 +1324,8 @@
/* create the dialog box */
ScanWin.shell = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (ScanWin.shell), (char *) devname);
-
+ gtk_window_set_policy (GTK_WINDOW (ScanWin.shell),
+ FALSE, TRUE, TRUE);
/* create the main vbox */
vbox = GTK_DIALOG (ScanWin.shell)->vbox;

@@ -1392,8 +1393,6 @@
dialog = gsg_create_dialog (dialog_window, devname, update_param, 0);
if (!dialog)
return;
-
- gsg_set_advanced (dialog, FALSE); /* turn off advanced options */

/* The info row */
hbox = gtk_hbox_new (FALSE, 5);

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com