diff options
Diffstat (limited to 'deluge/ui/gtk3')
-rw-r--r-- | deluge/ui/gtk3/__init__.py | 1 | ||||
-rw-r--r-- | deluge/ui/gtk3/addtorrentdialog.py | 25 | ||||
-rw-r--r-- | deluge/ui/gtk3/files_tab.py | 3 | ||||
-rw-r--r-- | deluge/ui/gtk3/glade/add_torrent_dialog.ui | 4 | ||||
-rw-r--r-- | deluge/ui/gtk3/glade/main_window.tabs.ui~ | 1507 | ||||
-rw-r--r-- | deluge/ui/gtk3/glade/main_window.ui | 40 | ||||
-rw-r--r-- | deluge/ui/gtk3/gtkui.py | 2 | ||||
-rw-r--r-- | deluge/ui/gtk3/listview.py | 2 | ||||
-rw-r--r-- | deluge/ui/gtk3/mainwindow.py | 1 | ||||
-rw-r--r-- | deluge/ui/gtk3/menubar.py | 16 | ||||
-rw-r--r-- | deluge/ui/gtk3/menubar_osx.py | 54 | ||||
-rwxr-xr-x | deluge/ui/gtk3/path_combo_chooser.py | 2 | ||||
-rw-r--r-- | deluge/ui/gtk3/peers_tab.py | 2 | ||||
-rw-r--r-- | deluge/ui/gtk3/preferences.py | 10 | ||||
-rw-r--r-- | deluge/ui/gtk3/systemtray.py | 1 |
15 files changed, 82 insertions, 1588 deletions
diff --git a/deluge/ui/gtk3/__init__.py b/deluge/ui/gtk3/__init__.py index 8db2773..d1b4ec5 100644 --- a/deluge/ui/gtk3/__init__.py +++ b/deluge/ui/gtk3/__init__.py @@ -18,7 +18,6 @@ environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1' # Keep this class in __init__.py to avoid the console having to import everything in gtkui.py class Gtk(UI): - cmd_description = """GTK-based graphical user interface""" def __init__(self, *args, **kwargs): diff --git a/deluge/ui/gtk3/addtorrentdialog.py b/deluge/ui/gtk3/addtorrentdialog.py index cf3851d..aa71cc4 100644 --- a/deluge/ui/gtk3/addtorrentdialog.py +++ b/deluge/ui/gtk3/addtorrentdialog.py @@ -379,7 +379,7 @@ class AddTorrentDialog(component.Component): self.listview_files.expand_row(root, False) def prepare_file(self, _file, file_name, file_num, download, files_storage): - first_slash_index = file_name.find(os.path.sep) + first_slash_index = file_name.find('/') if first_slash_index == -1: files_storage[file_name] = (file_num, _file, download) else: @@ -397,7 +397,7 @@ class AddTorrentDialog(component.Component): def add_files(self, parent_iter, split_files): ret = 0 for key, value in split_files.items(): - if key.endswith(os.path.sep): + if key.endswith('/'): chunk_iter = self.files_treestore.append( parent_iter, [True, key, 0, -1, False, 'folder-symbolic'] ) @@ -584,7 +584,7 @@ class AddTorrentDialog(component.Component): self.build_priorities( self.files_treestore.iter_children(_iter), priorities ) - elif not self.files_treestore.get_value(_iter, 1).endswith(os.path.sep): + elif not self.files_treestore.get_value(_iter, 1).endswith('/'): priorities[ self.files_treestore.get_value(_iter, 3) ] = self.files_treestore.get_value(_iter, 0) @@ -985,7 +985,10 @@ class AddTorrentDialog(component.Component): def _on_filename_edited(self, renderer, path, new_text): index = self.files_treestore[path][3] - new_text = new_text.strip(os.path.sep).strip() + # Ensure agnostic path separator + new_text = new_text.replace('\\', '/') + + new_text = new_text.strip('/').strip() # Return if the text hasn't changed if new_text == self.files_treestore[path][1]: @@ -1012,10 +1015,10 @@ class AddTorrentDialog(component.Component): for row in self.files_treestore[parent].iterchildren(): if new_text == row[1]: return - if os.path.sep in new_text: + if '/' in new_text: # There are folders in this path, so we need to create them # and then move the file iter to top - split_text = new_text.split(os.path.sep) + split_text = new_text.split('/') for s in split_text[:-1]: parent = self.files_treestore.append( parent, [True, s, 0, -1, False, 'folder-symbolic'] @@ -1068,19 +1071,19 @@ class AddTorrentDialog(component.Component): # we can construct the new proper paths # We need to check if this folder has been split - if os.path.sep in new_text: + if '/' in new_text: # It's been split, so we need to add new folders and then re-parent # itr. parent = self.files_treestore.iter_parent(itr) - split_text = new_text.split(os.path.sep) + split_text = new_text.split('/') for s in split_text[:-1]: # We don't iterate over the last item because we'll just use # the existing itr and change the text parent = self.files_treestore.append( - parent, [True, s + os.path.sep, 0, -1, False, 'folder-symbolic'] + parent, [True, s + '/', 0, -1, False, 'folder-symbolic'] ) - self.files_treestore[itr][1] = split_text[-1] + os.path.sep + self.files_treestore[itr][1] = split_text[-1] + '/' # Now re-parent itr to parent reparent_iter(self.files_treestore, itr, parent) @@ -1093,7 +1096,7 @@ class AddTorrentDialog(component.Component): else: # This was a simple folder rename without any splits, so just # change the path for itr - self.files_treestore[itr][1] = new_text + os.path.sep + self.files_treestore[itr][1] = new_text + '/' # Walk through the tree from 'itr' and add all the new file paths # to the 'mapped_files' option diff --git a/deluge/ui/gtk3/files_tab.py b/deluge/ui/gtk3/files_tab.py index 24c1697..6e0fba4 100644 --- a/deluge/ui/gtk3/files_tab.py +++ b/deluge/ui/gtk3/files_tab.py @@ -245,7 +245,7 @@ class FilesTab(Tab): if state['sort_id'] is not None and state['sort_order'] is not None: self.treestore.set_sort_column_id(state['sort_id'], state['sort_order']) - for (index, column) in enumerate(self.listview.get_columns()): + for index, column in enumerate(self.listview.get_columns()): cname = column.get_title() if cname in state['columns']: cstate = state['columns'][cname] @@ -759,7 +759,6 @@ class FilesTab(Tab): fd['path'] = fd['path'].replace(old_folder, new_folder, 1) if torrent_id == self.torrent_id: - old_split = old_folder.split('/') try: old_split.remove('') diff --git a/deluge/ui/gtk3/glade/add_torrent_dialog.ui b/deluge/ui/gtk3/glade/add_torrent_dialog.ui index 7183272..b0f507d 100644 --- a/deluge/ui/gtk3/glade/add_torrent_dialog.ui +++ b/deluge/ui/gtk3/glade/add_torrent_dialog.ui @@ -4,13 +4,13 @@ <requires lib="gtk+" version="3.0"/> <object class="GtkAdjustment" id="adjustment1"> <property name="lower">-1</property> - <property name="upper">9999</property> + <property name="upper">2097151</property> <property name="step_increment">1</property> <property name="page_increment">10</property> </object> <object class="GtkAdjustment" id="adjustment2"> <property name="lower">-1</property> - <property name="upper">9999</property> + <property name="upper">2097151</property> <property name="step_increment">1</property> <property name="page_increment">10</property> </object> diff --git a/deluge/ui/gtk3/glade/main_window.tabs.ui~ b/deluge/ui/gtk3/glade/main_window.tabs.ui~ deleted file mode 100644 index 4362183..0000000 --- a/deluge/ui/gtk3/glade/main_window.tabs.ui~ +++ /dev/null @@ -1,1507 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.2 --> -<interface> - <requires lib="gtk+" version="3.0"/> - <object class="GtkAdjustment" id="spin_max_connections_adjustment"> - <property name="lower">-1</property> - <property name="upper">999999</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - <signal name="value-changed" handler="on_spin_value_changed" swapped="no"/> - </object> - <object class="GtkAdjustment" id="spin_max_download_adjustment"> - <property name="lower">-1</property> - <property name="upper">2097151</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - <signal name="value-changed" handler="on_spin_value_changed" swapped="no"/> - </object> - <object class="GtkAdjustment" id="spin_max_upload_adjustment"> - <property name="lower">-1</property> - <property name="upper">2097151</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - <signal name="value-changed" handler="on_spin_value_changed" swapped="no"/> - </object> - <object class="GtkAdjustment" id="spin_max_upload_slots_adjustment"> - <property name="lower">-1</property> - <property name="upper">999999</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - <signal name="value-changed" handler="on_spin_value_changed" swapped="no"/> - </object> - <object class="GtkAdjustment" id="spin_stop_ratio_adjustment"> - <property name="upper">999999</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - <signal name="value-changed" handler="on_spin_value_changed" swapped="no"/> - </object> - <object class="GtkWindow" id="tabs"> - <property name="can_focus">False</property> - <child type="titlebar"> - <placeholder/> - </child> - <child> - <object class="GtkNotebook" id="dummy_nb_see_main_win_torrent_info"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="enable_popup">True</property> - <child> - <object class="GtkScrolledWindow" id="status_tab"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkViewport" id="viewport1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="resize_mode">queue</property> - <property name="shadow_type">none</property> - <child> - <object class="GtkAlignment" id="alignment43"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="top_padding">5</property> - <property name="bottom_padding">2</property> - <property name="left_padding">10</property> - <property name="right_padding">10</property> - <child> - <object class="GtkBox" id="vbox3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">5</property> - <child> - <object class="GtkBox" id="status_progress_vbox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkProgressBar" id="progressbar"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="pulse_step">0.10000000149</property> - <property name="show_text">True</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkGrid" id="table8"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">10</property> - <child> - <object class="GtkLabel" id="summary_download_speed"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="width_chars">20</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_total_downloaded"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_upload_speed"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="width_chars">15</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_seed_rank"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_availability"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="wrap">True</property> - <property name="wrap_mode">word-char</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_share_ratio"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_peers"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="width_chars">10</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_eta"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="left_attach">5</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_active_time"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="left_attach">5</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_seed_time"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="left_attach">5</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_last_transfer"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="wrap">True</property> - <property name="wrap_mode">char</property> - </object> - <packing> - <property name="left_attach">5</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_last_seen_complete"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="wrap">True</property> - <property name="wrap_mode">char</property> - </object> - <packing> - <property name="left_attach">5</property> - <property name="top_attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label42"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Down Speed:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label43"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Up Speed:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label38"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Downloaded:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label39"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Uploaded:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_seeds"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="width_chars">10</property> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_total_uploaded"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="width_chars">15</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_seeds"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Seeds:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_peers"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Peers:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label41"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Share Ratio:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_availablity"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Availability:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_seed_rank"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Seed Rank:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_eta"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">ETA Time:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_last_transfer"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Last Transfer:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_active_time"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Active Time:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_last_seen_complete"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Complete Seen:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_seed_time"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Seeding Time:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - </object> - </child> - </object> - </child> - <child type="tab"> - <object class="GtkLabel" id="status_tab_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">_Status</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="details_tab"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkViewport" id="viewport2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="resize_mode">queue</property> - <property name="shadow_type">none</property> - <child> - <object class="GtkAlignment" id="alignment54"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="top_padding">5</property> - <property name="bottom_padding">2</property> - <property name="left_padding">10</property> - <property name="right_padding">15</property> - <child> - <object class="GtkGrid" id="table_details"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">10</property> - <child> - <object class="GtkLabel" id="summary_name"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="wrap">True</property> - <property name="wrap_mode">word-char</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_total_size"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="selectable">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_num_files"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="selectable">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_completed"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_date_added"> - <property name="width_request">100</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_private"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_pieces"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Pieces:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_pieces"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - </object> - <packing> - <property name="left_attach">4</property> - <property name="top_attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_hash"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="wrap">True</property> - <property name="selectable">True</property> - <property name="width_chars">40</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_torrent_path"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="wrap">True</property> - <property name="wrap_mode">char</property> - <property name="selectable">True</property> - <property name="ellipsize">start</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_comments"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="wrap_mode">char</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">6</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_creator"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="wrap_mode">char</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">5</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_name"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Name:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_path"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Download Folder:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_date_added"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Added:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_total_size"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Total Size:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_num_files"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Total Files:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_hash"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Hash:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_creator"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Created By:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">5</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_comments"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Comments:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">6</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_completed"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Completed:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label_private"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Private Torrent:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="left_attach">3</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkSeparator" id="vseparator5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">1</property> - <property name="height">4</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - </object> - </child> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="details_tab_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">_Details</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="position">1</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="files_tab"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkTreeView" id="files_listview"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child internal-child="selection"> - <object class="GtkTreeSelection" id="treeselection1"/> - </child> - </object> - </child> - </object> - <packing> - <property name="position">2</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="files_tab_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Fi_les</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="position">2</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="peers_tab"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkTreeView" id="peers_listview"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child internal-child="selection"> - <object class="GtkTreeSelection" id="treeselection2"/> - </child> - </object> - </child> - </object> - <packing> - <property name="position">3</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="peers_tab_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">_Peers</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="position">3</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="options_tab"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkViewport" id="viewport3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="resize_mode">queue</property> - <property name="shadow_type">none</property> - <child> - <object class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="top_padding">5</property> - <property name="bottom_padding">2</property> - <property name="left_padding">5</property> - <property name="right_padding">15</property> - <child> - <object class="GtkGrid" id="table6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <object class="GtkAlignment" id="alignment8"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="top_padding">2</property> - <property name="left_padding">5</property> - <property name="right_padding">5</property> - <child> - <object class="GtkBox" id="vbox1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkBox" id="hbox1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <object class="GtkLabel" id="label_owner"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Owner:</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="summary_owner"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="wrap_mode">char</property> - <property name="selectable">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="padding">10</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_shared"> - <property name="label" translatable="yes">Shared</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">start</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chk_toggled" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_prioritize_first_last"> - <property name="label" translatable="yes">Prioritize First/Last</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">start</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chk_toggled" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_sequential_download"> - <property name="label" translatable="yes">Sequential Download</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">start</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chk_toggled" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_super_seeding"> - <property name="label" translatable="yes">Super Seeding</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">start</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chk_toggled" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_move_completed"> - <property name="label" translatable="yes">Move completed:</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">start</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chk_move_completed_toggled" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">5</property> - </packing> - </child> - <child> - <object class="GtkBox" id="hbox_move_completed_path_chooser"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">6</property> - </packing> - </child> - <child> - <placeholder/> - </child> - </object> - </child> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="left_padding">10</property> - <child> - <object class="GtkBox" id="vbox6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_top">15</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkCheckButton" id="chk_auto_managed"> - <property name="label" translatable="yes">Auto Managed</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">start</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chk_toggled" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="chk_stop_at_ratio"> - <property name="label" translatable="yes">Stop seed at ratio:</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">start</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chk_stop_at_ratio_toggled" swapped="no"/> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="left_padding">10</property> - <property name="right_padding">10</property> - <child> - <object class="GtkSpinButton" id="spin_stop_ratio"> - <property name="width_request">50</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">•</property> - <property name="primary_icon_activatable">False</property> - <property name="secondary_icon_activatable">False</property> - <property name="adjustment">spin_stop_ratio_adjustment</property> - <property name="digits">1</property> - <property name="numeric">True</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment9"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="left_padding">10</property> - <child> - <object class="GtkCheckButton" id="chk_remove_at_ratio"> - <property name="label" translatable="yes">Remove at ratio</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">start</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chk_toggled" swapped="no"/> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkSeparator" id="hseparator1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="padding">7</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="alignment5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <object class="GtkButton" id="button_apply"> - <property name="label" translatable="yes">_Apply</property> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_button_apply_clicked" swapped="no"/> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> - </object> - </child> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkFrame" id="frame1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> - <child> - <object class="GtkAlignment" id="alignment7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <object class="GtkGrid" id="table1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">5</property> - <property name="row_spacing">2</property> - <property name="column_spacing">4</property> - <child> - <object class="GtkSpinButton" id="spin_max_connections"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">•</property> - <property name="primary_icon_activatable">False</property> - <property name="secondary_icon_activatable">False</property> - <property name="adjustment">spin_max_connections_adjustment</property> - <property name="numeric">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="spin_max_upload"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">•</property> - <property name="primary_icon_activatable">False</property> - <property name="secondary_icon_activatable">False</property> - <property name="adjustment">spin_max_upload_adjustment</property> - <property name="digits">1</property> - <property name="numeric">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="spin_max_download"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">•</property> - <property name="primary_icon_activatable">False</property> - <property name="secondary_icon_activatable">False</property> - <property name="adjustment">spin_max_download_adjustment</property> - <property name="climb_rate">1</property> - <property name="digits">1</property> - <property name="numeric">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label11"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Upload Speed:</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label13"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">K/s</property> - <property name="ellipsize">start</property> - <attributes> - <attribute name="scale" value="0.90000000000000002"/> - </attributes> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label14"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">K/s</property> - <attributes> - <attribute name="scale" value="0.90000000000000002"/> - </attributes> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkSpinButton" id="spin_max_upload_slots"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">•</property> - <property name="primary_icon_activatable">False</property> - <property name="secondary_icon_activatable">False</property> - <property name="adjustment">spin_max_upload_slots_adjustment</property> - <property name="numeric">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Download Speed:</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label12"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Connections:</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label15"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Upload Slots:</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Bandwidth Limits</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - </child> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - </object> - </child> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="position">4</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="options_tab_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">_Options</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="position">4</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="trackers_tab"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkTreeView" id="trackers_listview"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child internal-child="selection"> - <object class="GtkTreeSelection" id="treeselection3"/> - </child> - </object> - </child> - </object> - <packing> - <property name="position">5</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="trackers_tab_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">_Trackers</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="position">5</property> - <property name="tab_fill">False</property> - </packing> - </child> - </object> - </child> - </object> -</interface> diff --git a/deluge/ui/gtk3/glade/main_window.ui b/deluge/ui/gtk3/glade/main_window.ui index ecbb8f6..e726756 100644 --- a/deluge/ui/gtk3/glade/main_window.ui +++ b/deluge/ui/gtk3/glade/main_window.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.22.2 --> <interface> <requires lib="gtk+" version="3.0"/> <object class="GtkImage" id="about-image"> @@ -7,7 +7,6 @@ <property name="can_focus">False</property> <property name="icon_name">help-about-symbolic</property> </object> - <object class="GtkAccelGroup" id="accelgroup1"/> <object class="GtkImage" id="add-image"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -67,6 +66,7 @@ <property name="icon_name">zoom-fit-best-symbolic</property> <property name="icon_size">1</property> </object> + <object class="GtkAccelGroup" id="main_accelgroup"/> <object class="GtkImage" id="new-image"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -93,9 +93,9 @@ <property name="can_focus">False</property> <property name="title">Deluge</property> <accel-groups> - <group name="accelgroup1"/> + <group name="main_accelgroup"/> </accel-groups> - <child> + <child type="titlebar"> <placeholder/> </child> <child> @@ -114,8 +114,10 @@ <property name="label" translatable="yes">_File</property> <property name="use_underline">True</property> <child type="submenu"> - <object class="GtkMenu" id="menuitem1_menu1"> + <object class="GtkMenu" id="submenu_file"> <property name="can_focus">False</property> + <property name="accel_group">main_accelgroup</property> + <property name="accel_path"><Deluge-MainWindow>/File</property> <child> <object class="GtkImageMenuItem" id="menuitem_addtorrent"> <property name="label" translatable="yes">_Add Torrent</property> @@ -126,7 +128,6 @@ <property name="image">add-image</property> <property name="use_stock">False</property> <signal name="activate" handler="on_menuitem_addtorrent_activate" swapped="no"/> - <accelerator key="O" signal="activate" modifiers="GDK_CONTROL_MASK"/> </object> </child> <child> @@ -138,7 +139,6 @@ <property name="image">new-image</property> <property name="use_stock">False</property> <signal name="activate" handler="on_menuitem_createtorrent_activate" swapped="no"/> - <accelerator key="N" signal="activate" modifiers="GDK_CONTROL_MASK"/> </object> </child> <child> @@ -155,7 +155,6 @@ <property name="use_stock">False</property> <property name="always_show_image">True</property> <signal name="activate" handler="on_menuitem_quitdaemon_activate" swapped="no"/> - <accelerator key="Q" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/> </object> </child> <child> @@ -172,9 +171,8 @@ <property name="use_underline">True</property> <property name="image">quit_image</property> <property name="use_stock">False</property> - <property name="accel_group">accelgroup1</property> + <property name="accel_group">main_accelgroup</property> <signal name="activate" handler="on_menuitem_quit_activate" swapped="no"/> - <accelerator key="Q" signal="activate" modifiers="GDK_CONTROL_MASK"/> </object> </child> </object> @@ -188,9 +186,11 @@ <property name="label" translatable="yes">_Edit</property> <property name="use_underline">True</property> <child type="submenu"> - <object class="GtkMenu" id="menu1"> + <object class="GtkMenu" id="submenu_edit"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="accel_group">main_accelgroup</property> + <property name="accel_path"><Deluge-MainWindow>/Edit</property> <child> <object class="GtkImageMenuItem" id="menuitem_preferences"> <property name="label" translatable="yes">_Preferences</property> @@ -199,9 +199,8 @@ <property name="use_underline">True</property> <property name="image">prefs-image</property> <property name="use_stock">False</property> - <property name="accel_group">accelgroup1</property> + <property name="accel_group">main_accelgroup</property> <signal name="activate" handler="on_menuitem_preferences_activate" swapped="no"/> - <accelerator key="P" signal="activate" modifiers="GDK_CONTROL_MASK"/> </object> </child> <child> @@ -213,7 +212,6 @@ <property name="image">connection-image</property> <property name="use_stock">False</property> <signal name="activate" handler="on_menuitem_connectionmanager_activate" swapped="no"/> - <accelerator key="M" signal="activate" modifiers="GDK_CONTROL_MASK"/> </object> </child> </object> @@ -223,6 +221,7 @@ <child> <object class="GtkMenuItem" id="menu_torrent"> <property name="can_focus">False</property> + <property name="accel_path"><MainWindow>/Torrent</property> <property name="label" translatable="yes">_Torrent</property> <property name="use_underline">True</property> </object> @@ -234,9 +233,11 @@ <property name="label" translatable="yes">_View</property> <property name="use_underline">True</property> <child type="submenu"> - <object class="GtkMenu" id="menu2"> + <object class="GtkMenu" id="submenu_view"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="accel_group">main_accelgroup</property> + <property name="accel_path"><Deluge-MainWindow>/View</property> <child> <object class="GtkCheckMenuItem" id="menuitem_toolbar"> <property name="visible">True</property> @@ -297,7 +298,6 @@ <property name="label" translatable="yes">_Find ...</property> <property name="use_underline">True</property> <signal name="activate" handler="on_search_filter_toggle" swapped="no"/> - <accelerator key="f" signal="activate" modifiers="GDK_CONTROL_MASK"/> </object> </child> <child> @@ -356,8 +356,10 @@ <property name="label" translatable="yes">_Help</property> <property name="use_underline">True</property> <child type="submenu"> - <object class="GtkMenu" id="menuitem2_menu1"> + <object class="GtkMenu" id="submenu_help"> <property name="can_focus">False</property> + <property name="accel_group">main_accelgroup</property> + <property name="accel_path"><Deluge-MainWindow>/Help</property> <child> <object class="GtkImageMenuItem" id="menuitem_homepage"> <property name="label" translatable="yes">_Homepage</property> @@ -377,7 +379,6 @@ <property name="use_underline">True</property> <property name="use_stock">False</property> <signal name="activate" handler="on_menuitem_faq_activate" swapped="no"/> - <accelerator key="F1" signal="activate"/> </object> </child> <child> @@ -405,7 +406,7 @@ <property name="use_underline">True</property> <property name="image">about-image</property> <property name="use_stock">False</property> - <property name="accel_group">accelgroup1</property> + <property name="accel_group">main_accelgroup</property> <signal name="activate" handler="on_menuitem_about_activate" swapped="no"/> </object> </child> @@ -467,7 +468,6 @@ This will filter torrents for the current selection on the sidebar.</property> <property name="label" translatable="yes">Filter</property> <property name="icon_name">system-search-symbolic</property> <signal name="clicked" handler="on_search_filter_toggle" swapped="no"/> - <accelerator key="f" signal="clicked" modifiers="GDK_CONTROL_MASK"/> </object> <packing> <property name="expand">False</property> diff --git a/deluge/ui/gtk3/gtkui.py b/deluge/ui/gtk3/gtkui.py index ddb2eb5..434d1b8 100644 --- a/deluge/ui/gtk3/gtkui.py +++ b/deluge/ui/gtk3/gtkui.py @@ -89,7 +89,7 @@ DEFAULT_PREFS = { 'enable_system_tray': True, 'close_to_tray': False, 'start_in_tray': False, - 'enable_appindicator': False, + 'enable_appindicator': True, 'lock_tray': False, 'tray_password': '', 'check_new_releases': True, diff --git a/deluge/ui/gtk3/listview.py b/deluge/ui/gtk3/listview.py index e9f6b10..a80d795 100644 --- a/deluge/ui/gtk3/listview.py +++ b/deluge/ui/gtk3/listview.py @@ -72,7 +72,7 @@ class ListView: """ __gsignals__ = { - 'button-press-event': (GObject.SIGNAL_RUN_LAST, None, (object,)) + 'button-press-event': (GObject.SignalFlags.RUN_LAST, None, (object,)) } def __init__(self, title=None, cell_renderer=None, **args): diff --git a/deluge/ui/gtk3/mainwindow.py b/deluge/ui/gtk3/mainwindow.py index d11ff31..e1e3bb3 100644 --- a/deluge/ui/gtk3/mainwindow.py +++ b/deluge/ui/gtk3/mainwindow.py @@ -44,7 +44,6 @@ log = logging.getLogger(__name__) class _GtkBuilderSignalsHolder: def connect_signals(self, mapping_or_class): - if isinstance(mapping_or_class, dict): for name, handler in mapping_or_class.items(): if hasattr(self, name): diff --git a/deluge/ui/gtk3/menubar.py b/deluge/ui/gtk3/menubar.py index a812a8c..328cb7e 100644 --- a/deluge/ui/gtk3/menubar.py +++ b/deluge/ui/gtk3/menubar.py @@ -23,6 +23,17 @@ from .path_chooser import PathChooser log = logging.getLogger(__name__) +default_main_window_accelmap = { + '<Deluge-MainWindow>/File/Add Torrent': '<Primary>o', + '<Deluge-MainWindow>/File/Create Torrent': '<Primary>n', + '<Deluge-MainWindow>/File/Quit & Shutdown Daemon': '<Primary><Shift>q', + '<Deluge-MainWindow>/File/Quit': '<Primary>q', + '<Deluge-MainWindow>/Edit/Preferences': '<Primary>p', + '<Deluge-MainWindow>/Edit/Connection Manager': '<Primary>m', + '<Deluge-MainWindow>/View/Find ...': '<Primary>f', + '<Deluge-MainWindow>/Help/FAQ': 'F1', +} + class MenuBar(component.Component): def __init__(self): @@ -112,6 +123,11 @@ class MenuBar(component.Component): # Attach the torrent_menu to the Torrent file menu self.menu_torrent.set_submenu(self.torrentmenu) + # Set keyboard shortcuts + for accel_path, accelerator in default_main_window_accelmap.items(): + accel_key, accel_mods = Gtk.accelerator_parse(accelerator) + Gtk.AccelMap.change_entry(accel_path, accel_key, accel_mods, True) + # Make sure the view menuitems are showing the correct active state self.main_builder.get_object('menuitem_toolbar').set_active( self.config['show_toolbar'] diff --git a/deluge/ui/gtk3/menubar_osx.py b/deluge/ui/gtk3/menubar_osx.py index 53150fb..7f846dc 100644 --- a/deluge/ui/gtk3/menubar_osx.py +++ b/deluge/ui/gtk3/menubar_osx.py @@ -5,48 +5,36 @@ # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # - -from gi.repository.Gdk import ModifierType -from gi.repository.Gtk import SeparatorMenuItem, accel_groups_from_object -from gi.repository.Gtk.AccelFlags import VISIBLE +from gi.repository import Gtk from deluge.configmanager import ConfigManager - -def accel_swap(item, group, skey, smod, dkey, dmod): - # Accel map hack broken, see ticket #3078 - # item.remove_accelerator(group, ord(skey), smod) - item.add_accelerator('activate', group, ord(dkey), dmod, VISIBLE) - - -def accel_meta(item, group, key): - accel_swap(item, group, key, ModifierType.CONTROL_MASK, key, ModifierType.META_MASK) +macos_main_window_accelmap = { + '<Deluge-MainWindow>/File/Add Torrent': '<Meta>o', + '<Deluge-MainWindow>/File/Create Torrent': '<Meta>n', + '<Deluge-MainWindow>/File/Quit & Shutdown Daemon': '<Meta><Shift>q', + '<Deluge-MainWindow>/File/Quit': '<Meta>q', + '<Deluge-MainWindow>/Edit/Preferences': '<Meta>comma', + '<Deluge-MainWindow>/Edit/Connection Manager': '<Meta>m', + '<Deluge-MainWindow>/View/Find ...': '<Meta>f', + '<Deluge-MainWindow>/Help/FAQ': '<Meta>question', +} def menubar_osx(gtkui, osxapp): + # Change key shortcuts + for accel_path, accelerator in macos_main_window_accelmap.items(): + accel_key, accel_mods = Gtk.accelerator_parse(accelerator) + Gtk.AccelMap.change_entry(accel_path, accel_key, accel_mods, True) + main_builder = gtkui.mainwindow.get_builder() menubar = main_builder.get_object('menubar') - group = accel_groups_from_object(gtkui.mainwindow.window)[0] config = ConfigManager('gtk3ui.conf') - - # NOTE: accel maps doesn't work with glade file format - # because of libglade not setting MenuItem accel groups - # That's why we remove / set accelerators by hand... (dirty) - # Clean solution: migrate glades files to gtkbuilder format file_menu = main_builder.get_object('menu_file').get_submenu() file_items = file_menu.get_children() - accel_meta(file_items[0], group, 'o') - accel_meta(file_items[1], group, 'n') quit_all_item = file_items[3] - accel_swap( - quit_all_item, - group, - 'q', - ModifierType.SHIFT_MASK | ModifierType.CONTROL_MASK, - 'q', - ModifierType.SHIFT_MASK | ModifierType.META_MASK, - ) + for item in range(2, len(file_items)): # remove quits file_menu.remove(file_items[item]) @@ -54,13 +42,9 @@ def menubar_osx(gtkui, osxapp): edit_menu = menu_widget.get_submenu() edit_items = edit_menu.get_children() pref_item = edit_items[0] - accel_swap( - pref_item, group, 'p', ModifierType.CONTROL_MASK, ',', ModifierType.META_MASK - ) edit_menu.remove(pref_item) conn_item = edit_items[1] - accel_meta(conn_item, group, 'm') edit_menu.remove(conn_item) menubar.remove(menu_widget) @@ -75,10 +59,10 @@ def menubar_osx(gtkui, osxapp): osxapp.set_menu_bar(menubar) # populate app menu osxapp.insert_app_menu_item(about_item, 0) - osxapp.insert_app_menu_item(SeparatorMenuItem(), 1) + osxapp.insert_app_menu_item(Gtk.SeparatorMenuItem(), 1) osxapp.insert_app_menu_item(pref_item, 2) if not config['standalone']: osxapp.insert_app_menu_item(conn_item, 3) if quit_all_item.get_visible(): - osxapp.insert_app_menu_item(SeparatorMenuItem(), 4) + osxapp.insert_app_menu_item(Gtk.SeparatorMenuItem(), 4) osxapp.insert_app_menu_item(quit_all_item, 5) diff --git a/deluge/ui/gtk3/path_combo_chooser.py b/deluge/ui/gtk3/path_combo_chooser.py index 74d9055..aeb4c7a 100755 --- a/deluge/ui/gtk3/path_combo_chooser.py +++ b/deluge/ui/gtk3/path_combo_chooser.py @@ -62,7 +62,6 @@ def path_without_trailing_path_sep(path): class ValueList: - paths_without_trailing_path_sep = False def get_values_count(self): @@ -1097,7 +1096,6 @@ class PathAutoCompleter: class PathChooserComboBox(Gtk.Box, StoredValuesPopup, GObject.GObject): - __gsignals__ = { signal: (SignalFlags.RUN_FIRST, GObject.TYPE_NONE, (object,)) for signal in [ diff --git a/deluge/ui/gtk3/peers_tab.py b/deluge/ui/gtk3/peers_tab.py index b458f7a..5768fbe 100644 --- a/deluge/ui/gtk3/peers_tab.py +++ b/deluge/ui/gtk3/peers_tab.py @@ -186,7 +186,7 @@ class PeersTab(Tab): if state['sort_id'] and state['sort_order'] is not None: self.liststore.set_sort_column_id(state['sort_id'], state['sort_order']) - for (index, column) in enumerate(self.listview.get_columns()): + for index, column in enumerate(self.listview.get_columns()): cname = column.get_title() if cname in state['columns']: cstate = state['columns'][cname] diff --git a/deluge/ui/gtk3/preferences.py b/deluge/ui/gtk3/preferences.py index a008a95..3463b70 100644 --- a/deluge/ui/gtk3/preferences.py +++ b/deluge/ui/gtk3/preferences.py @@ -30,8 +30,12 @@ from .dialogs import AccountDialog, ErrorDialog, InformationDialog, YesNoDialog from .path_chooser import PathChooser try: - require_version('AppIndicator3', '0.1') - from gi.repository import AppIndicator3 # noqa: F401 + try: + require_version('AyatanaAppIndicator3', '0.1') + from gi.repository import AyatanaAppIndicator3 # noqa: F401 + except (ValueError, ImportError): + require_version('AppIndicator3', '0.1') + from gi.repository import AppIndicator3 # noqa: F401 except (ImportError, ValueError): appindicator = False else: @@ -295,7 +299,7 @@ class Preferences(component.Component): 'Bandwidth'""" self.window_open = True if page is not None: - for (index, string, __) in self.liststore: + for index, string, __ in self.liststore: if page == string: self.treeview.get_selection().select_path(index) break diff --git a/deluge/ui/gtk3/systemtray.py b/deluge/ui/gtk3/systemtray.py index f65fde5..5318cf2 100644 --- a/deluge/ui/gtk3/systemtray.py +++ b/deluge/ui/gtk3/systemtray.py @@ -144,7 +144,6 @@ class SystemTray(component.Component): def __start(self): if self.config['enable_system_tray']: - if self.config['standalone']: try: self.hide_widget_list.remove('menuitem_quitdaemon') |