[Xfce4-commits] <eatmonkey:aria2-xml-rpc> New option "Pre-allocate all files" in Advanced tab
Mike Massonnet
noreply at xfce.org
Thu Feb 18 20:28:01 CET 2010
Updating branch refs/heads/aria2-xml-rpc
to 3049fdd6dafc3f5af3202f46adc51953b7f13616 (commit)
from afa6135bc1b8f7558aad4887bae47a5b43bede3d (commit)
commit 3049fdd6dafc3f5af3202f46adc51953b7f13616
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Tue Feb 16 01:29:37 2010 +0100
New option "Pre-allocate all files" in Advanced tab
src/eatsettings.rb | 5 +++++
src/settings.ui | 16 ++++++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/eatsettings.rb b/src/eatsettings.rb
index 1f79897..93eb5cc 100644
--- a/src/eatsettings.rb
+++ b/src/eatsettings.rb
@@ -157,6 +157,7 @@ class Eat::SettingsDialog
@advanced[:enable_upnp] = builder["enable-upnp"]
@advanced[:certificates] = builder["certificates"]
@advanced[:save_ondisk] = builder["save-ondisk"]
+ @advanced[:prealloc] = builder["pre-alloc"]
# Setup parent window
@dialog.set_transient_for(parent_window)
@@ -186,6 +187,7 @@ class Eat::SettingsDialog
@advanced[:enable_upnp].active = @settings["enable-upnp"]
@advanced[:certificates].active = @settings.aria2["check-certificate"]
@advanced[:save_ondisk].active = @settings.aria2["follow-torrent"] == true
+ @advanced[:prealloc].active = @settings.aria2["file-allocation"] == "prealloc"
# Setup advanced configuration treeview
@treestore = TreeStore.new(String, String, TrueClass)
@@ -259,6 +261,7 @@ class Eat::SettingsDialog
@treeiter["listen-port"].set_value(1, @advanced[:listen_port].value_as_int.to_s)
@treeiter["check-certificate"].set_value(1, @advanced[:certificates].active?.to_s)
@treeiter["follow-torrent"].set_value(1, @advanced[:save_ondisk].active? ? "true" : "mem")
+ @treeiter["file-allocation"].set_value(1, @advanced[:prealloc].active? ? "prealloc" : "none")
else
# Sync widget values with treestore
@basic_options[:max_concurrent_downloads].value = @treeiter["max-concurrent-downloads"].get_value(1).to_i
@@ -275,6 +278,7 @@ class Eat::SettingsDialog
@advanced[:listen_port].value = @treeiter["listen-port"].get_value(1).to_i
@advanced[:certificates].active = @treeiter["check-certificate"].get_value(1) == "true"
@advanced[:save_ondisk].active = @treeiter["follow-torrent"].get_value(1) == "true"
+ @advanced[:prealloc].active = @treeiter["file-allocation"].get_value(1) == "prealloc"
end
end
@@ -306,6 +310,7 @@ class Eat::SettingsDialog
@settings.aria2["check-certificate"] = @advanced[:certificates].active?
@settings.aria2["follow-torrent"] = @advanced[:save_ondisk].active? ? "true" : "mem"
@settings.aria2["follow-metalink"] = @advanced[:save_ondisk].active? ? "true" : "mem"
+ @settings.aria2["file-allocation"] = @advanced[:prealloc].active? ? "prealloc" : "none"
end
@settings.save
diff --git a/src/settings.ui b/src/settings.ui
index 2db54c9..25707d4 100644
--- a/src/settings.ui
+++ b/src/settings.ui
@@ -57,8 +57,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="related_action">action-custom-server</property>
<property name="use_action_appearance">True</property>
+ <property name="related_action">action-custom-server</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -366,8 +366,8 @@
<child>
<object class="GtkFileChooserButton" id="download-dir-button">
<property name="visible">True</property>
- <property name="create_folders">False</property>
<property name="action">select-folder</property>
+ <property name="create_folders">False</property>
<property name="width_chars">14</property>
</object>
<packing>
@@ -799,6 +799,18 @@
<property name="position">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="pre-alloc">
+ <property name="label" translatable="yes">Pre-allocate all files</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
</object>
</child>
</object>
More information about the Xfce4-commits
mailing list