gimp-gap r735 - in branches/gap-2-4: . gap
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp-gap r735 - in branches/gap-2-4: . gap
- Date: Thu, 14 Feb 2008 13:57:19 +0000 (GMT)
Author: neo
Date: Thu Feb 14 13:57:19 2008
New Revision: 735
URL: http://svn.gnome.org/viewvc/gimp-gap?rev=735&view=rev
Log:
2008-02-14 Sven Neumann <sven gimp org>
* gap/gap_pview_da.c (gap_pview_set_size): added a sanity check
for the preview size.
* gap/gap_mov_dialog.c (mov_path_prevw_create)
(mov_pview_size_allocate_callback)
* gap/gap_player_dialog.c (p_update_pviewsize): make sure that the
preview size doesn't become zero. Fixes bug #516443.
Modified:
branches/gap-2-4/ChangeLog
branches/gap-2-4/gap/gap_mov_dialog.c
branches/gap-2-4/gap/gap_player_dialog.c
branches/gap-2-4/gap/gap_pview_da.c
Modified: branches/gap-2-4/gap/gap_mov_dialog.c
==============================================================================
--- branches/gap-2-4/gap/gap_mov_dialog.c (original)
+++ branches/gap-2-4/gap/gap_mov_dialog.c Thu Feb 14 13:57:19 2008
@@ -4140,11 +4140,13 @@
if ( mgp->dwidth > mgp->dheight )
{
mgp->pheight = mgp->dheight * PREVIEW_SIZE / mgp->dwidth;
- mgp->pwidth = PREVIEW_SIZE;
+ mgp->pheight = MAX (1, mgp->pheight);
+ mgp->pwidth = PREVIEW_SIZE;
}
else
{
- mgp->pwidth = mgp->dwidth * PREVIEW_SIZE / mgp->dheight;
+ mgp->pwidth = mgp->dwidth * PREVIEW_SIZE / mgp->dheight;
+ mgp->pwidth = MAX (1, mgp->pwidth);
mgp->pheight = PREVIEW_SIZE;
}
@@ -5377,11 +5379,13 @@
if ( mgp->dwidth > mgp->dheight )
{
pheight = mgp->dheight * PREVIEW_SIZE / mgp->dwidth;
- pwidth = PREVIEW_SIZE;
+ pheight = MAX (1, pheight);
+ pwidth = PREVIEW_SIZE;
}
else
{
- pwidth = mgp->dwidth * PREVIEW_SIZE / mgp->dheight;
+ pwidth = mgp->dwidth * PREVIEW_SIZE / mgp->dheight;
+ pwidth = MAX (1, pwidth);
pheight = PREVIEW_SIZE;
}
psize = PREVIEW_SIZE;
Modified: branches/gap-2-4/gap/gap_player_dialog.c
==============================================================================
--- branches/gap-2-4/gap/gap_player_dialog.c (original)
+++ branches/gap-2-4/gap/gap_player_dialog.c Thu Feb 14 13:57:19 2008
@@ -1627,12 +1627,14 @@
{
/* landscape */
gpp->pv_height = gpp->ainfo_ptr->height * gpp->pv_pixelsize / gpp->ainfo_ptr->width;
- gpp->pv_width = gpp->pv_pixelsize;
+ gpp->pv_height = MAX (1, gpp->pv_height);
+ gpp->pv_width = gpp->pv_pixelsize;
}
else
{
/* portrait */
gpp->pv_width = gpp->ainfo_ptr->width * gpp->pv_pixelsize / gpp->ainfo_ptr->height;
+ gpp->pv_width = MAX (1, gpp->pv_width);
gpp->pv_height = gpp->pv_pixelsize;
}
Modified: branches/gap-2-4/gap/gap_pview_da.c
==============================================================================
--- branches/gap-2-4/gap/gap_pview_da.c (original)
+++ branches/gap-2-4/gap/gap_pview_da.c Thu Feb 14 13:57:19 2008
@@ -104,6 +104,8 @@
void
gap_pview_set_size(GapPView *pv_ptr, gint pv_width, gint pv_height, gint pv_check_size)
{
+ g_return_if_fail (pv_width > 0 && pv_height > 0);
+
if(pv_ptr->da_widget == NULL) { return; }
gap_pview_reset(pv_ptr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]