[gthumb] Fixed crash when closing a window while the video viewer is active
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] Fixed crash when closing a window while the video viewer is active
- Date: Mon, 14 Mar 2011 16:18:53 +0000 (UTC)
commit b598c3277ee8a526023a815fd842983bdbbc4047
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Mar 14 16:57:30 2011 +0100
Fixed crash when closing a window while the video viewer is active
Deactivate the viewer before closing the window in order to destroy
the gstreamer pipeline.
gthumb/gth-browser.c | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 0a6a9a3..0fc7901 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -1962,6 +1962,21 @@ gth_browser_ask_whether_to_save (GthBrowser *browser,
static void
+_gth_browser_deactivate_viewer_page (GthBrowser *browser)
+{
+ if (browser->priv->viewer_page != NULL) {
+ if (browser->priv->fullscreen)
+ gth_viewer_page_show_pointer (GTH_VIEWER_PAGE (browser->priv->viewer_page), TRUE);
+ gth_viewer_page_deactivate (browser->priv->viewer_page);
+ gtk_ui_manager_ensure_update (browser->priv->ui);
+ gth_browser_set_viewer_widget (browser, NULL);
+ g_object_unref (browser->priv->viewer_page);
+ browser->priv->viewer_page = NULL;
+ }
+}
+
+
+static void
_gth_browser_close_final_step (gpointer user_data)
{
GthBrowser *browser = user_data;
@@ -2014,6 +2029,8 @@ _gth_browser_close_final_step (gpointer user_data)
/**/
+ _gth_browser_deactivate_viewer_page (browser);
+
gth_hook_invoke ("gth-browser-close", browser);
if (gtk_widget_get_realized (GTK_WIDGET (browser)) && last_window) {
@@ -5200,21 +5217,6 @@ load_file_data_unref (LoadFileData *data)
static void
-_gth_browser_deactivate_viewer_page (GthBrowser *browser)
-{
- if (browser->priv->viewer_page != NULL) {
- if (browser->priv->fullscreen)
- gth_viewer_page_show_pointer (GTH_VIEWER_PAGE (browser->priv->viewer_page), TRUE);
- gth_viewer_page_deactivate (browser->priv->viewer_page);
- gtk_ui_manager_ensure_update (browser->priv->ui);
- gth_browser_set_viewer_widget (browser, NULL);
- g_object_unref (browser->priv->viewer_page);
- browser->priv->viewer_page = NULL;
- }
-}
-
-
-static void
gth_viewer_page_file_loaded_cb (GthViewerPage *viewer_page,
GthFileData *file_data,
gboolean success,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]