plug-ins/common/svg.c plug-ins/common/tiff-load.c

2007-05-15  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/svg.c
	* plug-ins/common/tiff-load.c
	* plug-ins/common/postscript.c
	* plug-ins/common/poppler.c: added missing calls to
	gimp_window_set_transient().

	* libgimp/gimppixbuf.c (gimp_layer_new_from_pixbuf): reduced
	number of progress updates.


svn path=/trunk/; revision=22491
This commit is contained in:
Sven Neumann 2007-05-15 07:12:15 +00:00 committed by Sven Neumann
parent c049787564
commit 687db3d69e
6 changed files with 33 additions and 14 deletions

View File

@ -1,3 +1,14 @@
2007-05-15 Sven Neumann <sven@gimp.org>
* plug-ins/common/svg.c
* plug-ins/common/tiff-load.c
* plug-ins/common/postscript.c
* plug-ins/common/poppler.c: added missing calls to
gimp_window_set_transient().
* libgimp/gimppixbuf.c (gimp_layer_new_from_pixbuf): reduced
number of progress updates.
2007-05-14 Michael Natterer <mitch@gimp.org>
* app/file/file-utils.c (file_utils_filename_to_uri): fix check on

View File

@ -276,7 +276,7 @@ gimp_layer_new_from_pixbuf (gint32 image_ID,
{
done += rgn.h * rgn.w;
if (count++ % 16 == 0)
if (count++ % 32 == 0)
gimp_progress_update (progress_start +
(gdouble) done / (width * height) * range);
}

View File

@ -770,6 +770,8 @@ load_dialog (PopplerDocument *doc,
GTK_RESPONSE_CANCEL,
-1);
gimp_window_set_transient (GTK_WINDOW (dialog));
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);

View File

@ -130,7 +130,7 @@ static char dversio[] = "v1.17 19-Sep-2004";
/* Load info */
typedef struct
{
guint resolution; /* resolution (dpi) at which to run ghostscript */
guint resolution; /* resolution (dpi) at which to run ghostscript */
guint width, height; /* desired size (ghostscript may ignore this) */
gint use_bbox; /* 0: use width/height, 1: try to use BoundingBox */
gchar pages[STR_LENGTH]; /* Pages to load (eg.: 1,3,5-7) */
@ -156,7 +156,7 @@ static PSLoadVals plvals =
*/
GtkWidget *ps_width_spinbutton;
GtkWidget *ps_height_spinbutton;
/* Save info */
typedef struct
{
@ -278,7 +278,7 @@ static gboolean load_dialog (const gchar *filename,
gboolean loadPDF);
static void load_pages_entry_callback (GtkWidget *widget,
gpointer data);
static gboolean resolution_change_callback (GtkAdjustment *adjustment,
gpointer data);
@ -3063,6 +3063,8 @@ load_dialog (const gchar *filename,
GTK_RESPONSE_CANCEL,
-1);
gimp_window_set_transient (GTK_WINDOW (dialog));
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), main_vbox,
@ -3108,19 +3110,19 @@ load_dialog (const gchar *filename,
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Resolution:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value-changed",
G_CALLBACK (resolution_change_callback),
&plvals.resolution);
g_signal_connect (adj, "value-changed",
G_CALLBACK (gimp_int_adjustment_update),
&plvals.resolution);
ps_width_spinbutton = gimp_spin_button_new (&adj, plvals.width,
1, GIMP_MAX_IMAGE_SIZE,
1, GIMP_MAX_IMAGE_SIZE,
1, 10, 0, 1, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("_Width:"), 0.0, 0.5,
@ -3130,7 +3132,7 @@ load_dialog (const gchar *filename,
&plvals.width);
ps_height_spinbutton = gimp_spin_button_new (&adj, plvals.height,
1, GIMP_MAX_IMAGE_SIZE,
1, GIMP_MAX_IMAGE_SIZE,
1, 10, 0, 1, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("_Height:"), 0.0, 0.5,
@ -3524,20 +3526,20 @@ resolution_change_callback (GtkAdjustment *adjustment,
if (*old_resolution)
{
ratio = (gdouble) adjustment->value / *old_resolution;
}
ratio = (gdouble) adjustment->value / *old_resolution;
}
else
{
ratio = 1;
}
gtk_spin_button_set_value (GTK_SPIN_BUTTON (ps_width_spinbutton),
GTK_SPIN_BUTTON (ps_width_spinbutton)->
adjustment->value * ratio);
adjustment->value * ratio);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (ps_height_spinbutton),
GTK_SPIN_BUTTON (ps_height_spinbutton)->
adjustment->value * ratio);
adjustment->value * ratio);
return TRUE;
}

View File

@ -706,6 +706,8 @@ load_dialog (const gchar *filename)
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gimp_window_set_transient (GTK_WINDOW (dialog));
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,

View File

@ -407,6 +407,8 @@ load_dialog (TIFF *tif,
GTK_RESPONSE_CANCEL,
-1);
gimp_window_set_transient (GTK_WINDOW (dialog));
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);