summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-07-19 18:21:05 +0000
committerjstebbins <[email protected]>2009-07-19 18:21:05 +0000
commitfecbcdf52adf696403d3cbaa3714d8ac992e1cd5 (patch)
tree80bb7b2cbcbb40c421092877be78da5d680b37e3 /gtk
parentada1b7a2c87de0c8c31eea795488e2f87f709412 (diff)
LinGui: add advanced preference option to enable/disable automatic dvd scanning
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2715 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c16
-rw-r--r--gtk/src/ghb.ui25
-rw-r--r--gtk/src/internal_defaults.xml2
3 files changed, 36 insertions, 7 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index f45060b66..cfd12dac6 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -3360,7 +3360,8 @@ handle_media_change(const gchar *device, gboolean insert, signal_user_data_t *ud
if (ins_count == 2)
{
g_thread_create((GThreadFunc)ghb_cache_volnames, ud, FALSE, NULL);
- if (ud->current_dvd_device != NULL &&
+ if (ghb_settings_get_boolean(ud->settings, "AutoScan") &&
+ ud->current_dvd_device != NULL &&
strcmp(device, ud->current_dvd_device) == 0)
{
show_scan_progress(ud);
@@ -3464,11 +3465,14 @@ drive_changed_cb(GVolumeMonitor *gvm, GDrive *gd, signal_user_data_t *ud)
}
if (g_drive_has_media(gd))
{
- show_scan_progress(ud);
- update_source_label(ud, device, TRUE);
- gint preview_count;
- preview_count = ghb_settings_get_int(ud->settings, "preview_count");
- ghb_backend_scan(device, 0, preview_count);
+ if (ghb_settings_get_boolean(ud->settings, "AutoScan"))
+ {
+ show_scan_progress(ud);
+ update_source_label(ud, device, TRUE);
+ gint preview_count;
+ preview_count = ghb_settings_get_int(ud->settings, "preview_count");
+ ghb_backend_scan(device, 0, preview_count);
+ }
}
else
{
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 354912593..c0967c66b 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -4277,6 +4277,29 @@ no-dct-decimate=0:cabac=1</property>
</packing>
</child>
<child>
+ <object class="GtkAlignment" id="alignment48">
+ <property name="visible">True</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkCheckButton" id="AutoScan">
+ <property name="label" translatable="yes">Automatically Scan DVD when loaded</property>
+ <property name="tooltip-text" translatable="yes">Scans the DVD whenever a new disc is loaded</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="pref_changed_cb"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkAlignment" id="hidden_prefs">
<property name="visible">True</property>
<property name="top_padding">6</property>
@@ -4316,7 +4339,7 @@ no-dct-decimate=0:cabac=1</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml
index 88d27af24..fe8d9e098 100644
--- a/gtk/src/internal_defaults.xml
+++ b/gtk/src/internal_defaults.xml
@@ -105,6 +105,8 @@
</dict>
<key>Preferences</key>
<dict>
+ <key>AutoScan</key>
+ <false />
<key>AddCC</key>
<false />
<key>EncodeLogLocation</key>