[gthumb] fixed crash when changing video in fullscreen mode
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed crash when changing video in fullscreen mode
- Date: Sat, 11 Sep 2010 08:13:22 +0000 (UTC)
commit 19df410055a0c11e5783e8564a871c4a109be012
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Sep 11 10:04:02 2010 +0200
fixed crash when changing video in fullscreen mode
extensions/gstreamer_tools/gth-media-viewer-page.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/extensions/gstreamer_tools/gth-media-viewer-page.c b/extensions/gstreamer_tools/gth-media-viewer-page.c
index af7f6f4..a4b5d29 100644
--- a/extensions/gstreamer_tools/gth-media-viewer-page.c
+++ b/extensions/gstreamer_tools/gth-media-viewer-page.c
@@ -733,10 +733,12 @@ remove_fullscreen_toolbar (GthMediaViewerPage *self)
if (self->priv->fullscreen_toolbar == NULL)
return;
- g_object_ref (self->priv->mediabar);
- gtk_container_remove (GTK_CONTAINER (self->priv->fullscreen_toolbar), self->priv->mediabar);
- gtk_box_pack_start (GTK_BOX (self->priv->area_box), self->priv->mediabar, FALSE, FALSE, 0);
- g_object_unref (self->priv->mediabar);
+ if (self->priv->mediabar->parent == self->priv->fullscreen_toolbar) {
+ g_object_ref (self->priv->mediabar);
+ gtk_container_remove (GTK_CONTAINER (self->priv->fullscreen_toolbar), self->priv->mediabar);
+ gtk_box_pack_start (GTK_BOX (self->priv->area_box), self->priv->mediabar, FALSE, FALSE, 0);
+ g_object_unref (self->priv->mediabar);
+ }
gth_browser_unregister_fullscreen_control (self->priv->browser, self->priv->fullscreen_toolbar);
gtk_widget_destroy (self->priv->fullscreen_toolbar);
@@ -1119,10 +1121,12 @@ gth_media_viewer_page_real_fullscreen (GthViewerPage *base,
gtk_container_set_border_width (GTK_CONTAINER (self->priv->fullscreen_toolbar), 0);
}
- g_object_ref (self->priv->mediabar);
- gtk_container_remove (GTK_CONTAINER (self->priv->area_box), self->priv->mediabar);
- gtk_container_add (GTK_CONTAINER (self->priv->fullscreen_toolbar), self->priv->mediabar);
- g_object_unref (self->priv->mediabar);
+ if (self->priv->mediabar->parent == self->priv->area_box) {
+ g_object_ref (self->priv->mediabar);
+ gtk_container_remove (GTK_CONTAINER (self->priv->area_box), self->priv->mediabar);
+ gtk_container_add (GTK_CONTAINER (self->priv->fullscreen_toolbar), self->priv->mediabar);
+ g_object_unref (self->priv->mediabar);
+ }
gtk_widget_realize (self->priv->mediabar);
gtk_window_set_gravity (GTK_WINDOW (self->priv->fullscreen_toolbar), GDK_GRAVITY_SOUTH_EAST);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]