mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
show and hide the toolbar
This commit is contained in:
parent
1e35cca89f
commit
d32dc83f14
@ -5,8 +5,6 @@
|
|||||||
<widget class="GtkWindow" id="main_window">
|
<widget class="GtkWindow" id="main_window">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title">Deluge</property>
|
<property name="title">Deluge</property>
|
||||||
<property name="default_width">650</property>
|
|
||||||
<property name="default_height">639</property>
|
|
||||||
<signal name="destroy" handler="quit"/>
|
<signal name="destroy" handler="quit"/>
|
||||||
<signal name="destroy_event" handler="quit"/>
|
<signal name="destroy_event" handler="quit"/>
|
||||||
<signal name="delete_event" handler="delete"/>
|
<signal name="delete_event" handler="delete"/>
|
||||||
@ -18,7 +16,6 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkVPaned" id="vpaned1">
|
<widget class="GtkVPaned" id="vpaned1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="position">190</property>
|
|
||||||
<property name="position_set">True</property>
|
<property name="position_set">True</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||||
@ -696,10 +693,19 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkMenu" id="menu1">
|
<widget class="GtkMenu" id="menu1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckMenuItem" id="chk_toolbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Toolbar</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<signal name="toggled" handler="toolbar_toggle"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckMenuItem" id="chk_infopane">
|
<widget class="GtkCheckMenuItem" id="chk_infopane">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Show Details Pane</property>
|
<property name="label" translatable="yes">Details</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="active">True</property>
|
<property name="active">True</property>
|
||||||
<signal name="toggled" handler="infopane_toggle"/>
|
<signal name="toggled" handler="infopane_toggle"/>
|
||||||
|
@ -139,6 +139,7 @@ class DelugeGTK:
|
|||||||
"pref_clicked": self.show_pref_dialog,
|
"pref_clicked": self.show_pref_dialog,
|
||||||
"plugins_clicked": self.show_plugin_dialog,
|
"plugins_clicked": self.show_plugin_dialog,
|
||||||
## View Menu
|
## View Menu
|
||||||
|
"toolbar_toggle": self.toolbar_toggle,
|
||||||
"infopane_toggle": self.infopane_toggle,
|
"infopane_toggle": self.infopane_toggle,
|
||||||
"size_toggle": self.size_toggle,
|
"size_toggle": self.size_toggle,
|
||||||
"status_toggle": self.status_toggle,
|
"status_toggle": self.status_toggle,
|
||||||
@ -781,6 +782,16 @@ class DelugeGTK:
|
|||||||
if torrent is not None:
|
if torrent is not None:
|
||||||
self.manager.queue_up(torrent)
|
self.manager.queue_up(torrent)
|
||||||
|
|
||||||
|
def toolbar_toggle(self, widget):
|
||||||
|
if widget.get_active():
|
||||||
|
self.wtree.get_widget("tb_left").show()
|
||||||
|
self.wtree.get_widget("tb_middle").show()
|
||||||
|
self.wtree.get_widget("tb_right").show()
|
||||||
|
else:
|
||||||
|
self.wtree.get_widget("tb_left").hide()
|
||||||
|
self.wtree.get_widget("tb_middle").hide()
|
||||||
|
self.wtree.get_widget("tb_right").hide()
|
||||||
|
|
||||||
def infopane_toggle(self, widget):
|
def infopane_toggle(self, widget):
|
||||||
if widget.get_active():
|
if widget.get_active():
|
||||||
self.wtree.get_widget("torrent_info").show()
|
self.wtree.get_widget("torrent_info").show()
|
||||||
@ -814,6 +825,7 @@ class DelugeGTK:
|
|||||||
|
|
||||||
def load_window_settings(self):
|
def load_window_settings(self):
|
||||||
self.wtree.get_widget("chk_infopane").set_active(self.config.get("show_infopane", bool))
|
self.wtree.get_widget("chk_infopane").set_active(self.config.get("show_infopane", bool))
|
||||||
|
self.wtree.get_widget("chk_toolbar").set_active(self.config.get("show_toolbar", bool))
|
||||||
self.wtree.get_widget("chk_size").set_active(self.config.get("show_size", bool))
|
self.wtree.get_widget("chk_size").set_active(self.config.get("show_size", bool))
|
||||||
self.wtree.get_widget("chk_status").set_active(self.config.get("show_status", bool))
|
self.wtree.get_widget("chk_status").set_active(self.config.get("show_status", bool))
|
||||||
self.wtree.get_widget("chk_seed").set_active(self.config.get("show_seeders", bool))
|
self.wtree.get_widget("chk_seed").set_active(self.config.get("show_seeders", bool))
|
||||||
@ -825,6 +837,7 @@ class DelugeGTK:
|
|||||||
|
|
||||||
def save_window_settings(self):
|
def save_window_settings(self):
|
||||||
self.config.set("show_infopane", self.wtree.get_widget("chk_infopane").get_active())
|
self.config.set("show_infopane", self.wtree.get_widget("chk_infopane").get_active())
|
||||||
|
self.config.set("show_toolbar", self.wtree.get_widget("chk_toolbar").get_active())
|
||||||
self.config.set("show_size", self.size_column.get_visible())
|
self.config.set("show_size", self.size_column.get_visible())
|
||||||
self.config.set("show_status", self.status_column.get_visible())
|
self.config.set("show_status", self.status_column.get_visible())
|
||||||
self.config.set("show_seeders", self.seed_column.get_visible())
|
self.config.set("show_seeders", self.seed_column.get_visible())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user