summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-12-05 18:21:20 +0000
committerjstebbins <[email protected]>2008-12-05 18:21:20 +0000
commita3c6c3d28e31b4a60cbcb45baaefb942c0e06976 (patch)
tree5fcb227e1468c0c70d41a6515de67cb1c742f179
parente8fc4aab3b2188244c884855272f731c2e69b3b4 (diff)
LinGui: stop live preview playback when the preview window is closed
otherwise you still continue to hear the audio. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2012 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/ghb.ui2
-rw-r--r--gtk/src/preview.c10
-rw-r--r--gtk/src/resource_data.h4
-rw-r--r--gtk/src/resources.plist2
4 files changed, 14 insertions, 4 deletions
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 657e884a3..f198ed397 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -3844,7 +3844,7 @@ location as the movie.</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="skip_taskbar_hint">True</property>
<property name="skip_pager_hint">True</property>
- <signal handler="gtk_widget_hide_on_delete" name="delete_event"/>
+ <signal handler="preview_window_delete_cb" name="delete_event"/>
<child>
<object class="GtkVBox" id="vbox32">
<property name="visible">True</property>
diff --git a/gtk/src/preview.c b/gtk/src/preview.c
index 5bc416f70..51e36c27e 100644
--- a/gtk/src/preview.c
+++ b/gtk/src/preview.c
@@ -745,3 +745,13 @@ preview_frame_value_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_set_preview_image(ud);
}
+gboolean
+preview_window_delete_cb(
+ GtkWidget *widget,
+ GdkEvent *event,
+ signal_user_data_t *ud)
+{
+ live_preview_stop(ud);
+ gtk_widget_hide(widget);
+ return TRUE;
+}
diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h
index 7e79c4631..5a4165cdc 100644
--- a/gtk/src/resource_data.h
+++ b/gtk/src/resource_data.h
@@ -6254,8 +6254,8 @@
"y&gt;\n"
" &lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&"
"gt;\n"
-" &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot"
-";delete_event&quot;/&gt;\n"
+" &lt;signal handler=&quot;preview_window_delete_cb&quot; name=&quot;"
+"delete_event&quot;/&gt;\n"
" &lt;child&gt;\n"
" &lt;object class=&quot;GtkVBox&quot; id=&quot;vbox32&quot;&gt;\n"
" &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;\n"
diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist
index 5613ee92b..0a810c2fd 100644
--- a/gtk/src/resources.plist
+++ b/gtk/src/resources.plist
@@ -3849,7 +3849,7 @@ location as the movie.&lt;/property&gt;
&lt;property name=&quot;type_hint&quot;&gt;GDK_WINDOW_TYPE_HINT_DIALOG&lt;/property&gt;
&lt;property name=&quot;skip_taskbar_hint&quot;&gt;True&lt;/property&gt;
&lt;property name=&quot;skip_pager_hint&quot;&gt;True&lt;/property&gt;
- &lt;signal handler=&quot;gtk_widget_hide_on_delete&quot; name=&quot;delete_event&quot;/&gt;
+ &lt;signal handler=&quot;preview_window_delete_cb&quot; name=&quot;delete_event&quot;/&gt;
&lt;child&gt;
&lt;object class=&quot;GtkVBox&quot; id=&quot;vbox32&quot;&gt;
&lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;