Hi,
On Thursday 11 June 2009 12:02:18 Oscar Miras wrote:
> Hi,
>
> Ok. In fact, I never used g_new ... I realised when I watch again code,
> sorry :S.
> Finally I coded a version where everything works ok.
>
> But there's a problem, i'm creating a dependency from fullscreen ->
> pan-type. Before it never existed.
> Now in fullscreen_start function I'm invoking like if (!pw->image_fd) .
> I'll show you important code lines:
>
I wrote "if (fs->normal_imd)", not "if (!pw->image_fd)" ;-)
See the attached patch.
Fullscreen does not have to be dependent on pan view, of course.
With this patch you can call
pw->fs_image = fullscreen_start(pw->window, NULL, pan_fullscreen_stop_func, pw);
and then setup the image with
image_change_fd(pw->fs_image->imd, fd, image_zoom_get_default(NULL));
and similar functions explicitly from pan view.
Vladimir
Index: fullscreen.c
===================================================================
--- fullscreen.c (revision 1741)
+++ fullscreen.c (working copy)
@@ -224,7 +224,7 @@
gint w, h;
GdkGeometry geometry;
- if (!window || !imd) return NULL;
+ if (!window) return NULL;
fs = g_new0(FullScreenData, 1);
@@ -293,7 +293,7 @@
image_background_set_color_from_options(fs->imd, TRUE);
image_set_delay_flip(fs->imd, options->fullscreen.clean_flip);
- image_auto_refresh_enable(fs->imd, fs->normal_imd->auto_refresh);
+ if (fs->normal_imd) image_auto_refresh_enable(fs->imd, fs->normal_imd->auto_refresh);
if (options->fullscreen.clean_flip)
{
@@ -303,7 +303,7 @@
gtk_widget_show(fs->imd->widget);
- image_change_from_image(fs->imd, fs->normal_imd);
+ if (fs->normal_imd) image_change_from_image(fs->imd, fs->normal_imd);
gtk_widget_show(fs->window);
@@ -321,7 +321,7 @@
#ifdef HIDE_WINDOW_IN_FULLSCREEN
gtk_widget_hide(fs->normal_window);
#endif
- image_change_fd(fs->normal_imd, NULL, image_zoom_get(fs->normal_imd));
+ if (fs->normal_imd) image_change_fd(fs->normal_imd, NULL, image_zoom_get(fs->normal_imd));
return fs;
}
@@ -336,7 +336,7 @@
fullscreen_busy_mouse_disable(fs);
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
- image_change_from_image(fs->normal_imd, fs->imd);
+ if (fs->normal_imd) image_change_from_image(fs->normal_imd, fs->imd);
#ifdef HIDE_WINDOW_IN_FULLSCREEN
gtk_widget_show(fs->normal_window);
#endif
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel