diff --git a/DemonEditor.spec b/DemonEditor.spec index 6fe9bde6..859d9b16 100644 --- a/DemonEditor.spec +++ b/DemonEditor.spec @@ -1,67 +1,48 @@ -import os -import datetime -import distutils.util +# -*- mode: python ; coding: utf-8 -*- EXE_NAME = 'start.py' DIR_PATH = os.getcwd() -COMPILING_PLATFORM = distutils.util.get_platform() PATH_EXE = [os.path.join(DIR_PATH, EXE_NAME)] -STRIP = True -BUILD_DATE = datetime.datetime.now().strftime("%Y%m%d") block_cipher = None -ui_files = [('app/ui/*.glade', 'ui'), - ('app/ui/*.css', 'ui'), - ('app/ui/*.ui', 'ui'), - ('app/ui/lang*', 'share/locale'), - ('app/ui/icons*', 'share/icons') +ui_files = [('app\\ui\\*.glade', 'ui'), + ('app\\ui\\*.css', 'ui'), + ('app\\ui\\*.ui', 'ui'), + ('app\\ui\\lang*', 'share\\locale'), + ('app\\ui\\icons*', 'share\\icons') ] + a = Analysis([EXE_NAME], pathex=PATH_EXE, - binaries=None, + binaries=[], datas=ui_files, - hiddenimports=['fileinput', 'uuid'], + hiddenimports=[], hookspath=[], runtime_hooks=[], excludes=['youtube_dl', 'tkinter'], win_no_prefer_redirects=False, win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) - -pyz = PYZ(a.pure, - a.zipped_data, - cipher=block_cipher) - exe = EXE(pyz, a.scripts, + [], exclude_binaries=True, name='DemonEditor', debug=False, - strip=STRIP, + bootloader_ignore_signals=False, + strip=False, upx=True, - console=False) - + console=False, icon='icon.ico') coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, - strip=STRIP, + strip=False, upx=True, + upx_exclude=[], name='DemonEditor') - -app = BUNDLE(coll, - name='DemonEditor.app', - icon='icon.icns', - bundle_identifier=None, - info_plist={ - 'NSPrincipalClass': 'NSApplication', - 'CFBundleName': 'DemonEditor', - 'CFBundleDisplayName': 'DemonEditor', - 'CFBundleGetInfoString': "Enigma2 channel and satellites editor", - 'LSApplicationCategoryType': 'public.app-category.utilities', - 'CFBundleShortVersionString': "1.0.4 Beta (Build: {})".format(BUILD_DATE), - 'NSHumanReadableCopyright': u"Copyright © 2020, Dmitriy Yefremov", - 'NSRequiresAquaSystemAppearance': 'false' - }) diff --git a/README.md b/README.md index 24fcf925..9fe892d0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # DemonEditor -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) ![platform](https://img.shields.io/badge/platform-macos-lightgrey) -## Enigma2 channel and satellite list editor for macOS (experimental). - -![Main app window in macOS Big Sur.](https://user-images.githubusercontent.com/7511379/92320982-9b20c780-f02e-11ea-8a43-fc0c70503573.png) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) ![platform](https://img.shields.io/badge/platform-windows-lightgrey) +## Enigma2 channel and satellite list editor for MS Windows (experimental). Experimental support of Neutrino-MP or others on the same basis (BPanther, etc). Focused on the convenience of working in lists from the keyboard. The mouse is also fully supported (Drag and Drop etc). @@ -22,61 +20,36 @@ Focused on the convenience of working in lists from the keyboard. The mouse is a * Control panel with the ability to view EPG and manage timers (via HTTP API, experimental). * Simple FTP client (experimental). -#### Keyboard shortcuts -* **⌘ + X** - only in bouquet list. -* **⌘ + C** - only in services list. -Clipboard is **"rubber"**. There is an accumulation before the insertion! -* **⌘ + E** - edit. -* **⌘ + R, F2** - rename. -* **⌘ + S, T** in Satellites edit tool for create satellite or transponder. -* **⌘ + L** - parental lock. -* **⌘ + H** - hide/skip. -* **⌘ + P** - start play IPTV or other stream in the bouquet list. -* **⌘ + Z** - switch(**zap**) the channel(works when the HTTP API is enabled, Enigma2 only). -* **⌘ + W** - switch to the channel and watch in the program. -* **⌘ + Up/Down** - move selected items in the list. -* **⌘ + O** - (re)load user data from current dir. -* **⌘ + D** - load data from receiver. -* **⌘ + U/B** - upload data/bouquets to receiver. -* **⌘ + F** - show/hide search bar. -* **⇧ + ⌘ + F** - show/hide filter bar. -* **Left/Right** - remove selection. +#### Keyboard shortcuts +* **Ctrl + X** - only in bouquet list. +* **Ctrl + C** - only in services list. +Clipboard is **"rubber"**. There is an accumulation before the insertion! +* **Ctrl + Insert** - copies the selected channels from the main list to the bouquet + beginning or inserts (creates) a new bouquet. +* **Ctrl + BackSpace** - copies the selected channels from the main list to the bouquet end. +* **Ctrl + E** - edit. +* **Ctrl + R, F2** - rename. +* **Ctrl + S, T** in Satellites edit tool for create satellite or transponder. +* **Ctrl + L** - parental lock. +* **Ctrl + H** - hide/skip. +* **Ctrl + P** - start play IPTV or other stream in the bouquet list. +* **Ctrl + Z** - switch(**zap**) the channel(works when the HTTP API is enabled, Enigma2 only). +* **Ctrl + W** - switch to the channel and watch in the program. +* **Space** - select/deselect. +* **Left/Right** - remove selection. +* **Ctrl + Up, Down, PageUp, PageDown, Home, End**- move selected items in the list. +* **Ctrl + O** - (re)load user data from current dir. +* **Ctrl + D** - load data from receiver. +* **Ctrl + U/B** - upload data/bouquets to receiver. +* **Ctrl + I** - extra info, details. +* **Ctrl + F** - show/hide search bar. +* **Ctrl + Shift + F** - show/hide filter bar. -For **multiple** selection with the mouse, press and hold the **⌘** key! +For **multiple** selection with the mouse, press and hold the **Ctrl** key! ## Minimum requirements -*Python >= 3.5.2, GTK+ >= 3.16 with PyGObject bindings, python3-requests.* +*Python >= 3.4.4, GTK+ >= 3.16 with PyGObject bindings, python3-requests.* -## Installation and Launch -To run the program on macOS, you need to install [brew](https://brew.sh/). -Then install the required components via terminal: -```brew install python3 gtk+3 pygobject3 adwaita-icon-theme``` -```pip3 install requests``` -#### Optional: -```brew install wget``` -```pip3 install pillow, pyobjc``` - -To start the program, just download the [archive](https://github.com/DYefremov/DemonEditor/archive/experimental-mac.zip), unpack and run it from the terminal -with the command: ```./start.py``` -## Standalone package -You can also download the ready-made package as a ***.dmg** file from the [releases](https://github.com/DYefremov/DemonEditor/releases) page. -Recommended copy the package to the **Application** directory. -Perhaps in the security settings it will be necessary to allow the launch of this application! -**The package may not contain all the latest changes. Not all features can be supported and tested!** - -THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY. -AUTHOR IS NOT LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY CONNECTION WITH THIS SOFTWARE. -The package may contain components distributed under the GPL [v3](http://www.gnu.org/licenses/gpl-3.0.html) or lower license. -By downloading and using this package you agree to the terms of this [license](http://www.gnu.org/licenses/gpl-3.0.html) and the possible inconvenience associated with this! - -#### Building your own package -Install [PyInstaller](https://www.pyinstaller.org/) with the command from the terminal: - -```pip3 install pyinstaller``` - -and in the root dir run command: - -```pyinstaller DemonEditor.spec``` ## Important **This version is not fully tested and has experimental status!** @@ -88,6 +61,7 @@ When using the multiple import feature, from *lamedb* will be taken data **only If you need full set of the data, including *[satellites, terrestrial, cables].xml* (current files will be overwritten), just load your data via *"File/Open"* and press *"Save"*. When importing separate bouquet files, only those services (excluding IPTV) that are in the **current open lamedb** (main list of services) will be imported. + #### Command line arguments: * **-l** - write logs to file. * **-d on/off** - turn on/off debug mode. Allows to display more information in the logs. diff --git a/app/eparser/enigma/lamedb.py b/app/eparser/enigma/lamedb.py index d6ca6798..59de230b 100644 --- a/app/eparser/enigma/lamedb.py +++ b/app/eparser/enigma/lamedb.py @@ -274,7 +274,7 @@ class LameDbWriter: def write(self): if self._fmt == 4: # Writing lamedb file ver.4 - with open(self._path + _FILE_NAME, "w") as file: + with open(self._path + _FILE_NAME, "w", encoding="utf-8") as file: file.writelines(LameDbReader.get_services_lines(self._services)) elif self._fmt == 5: self.write_to_lamedb5() diff --git a/app/settings.py b/app/settings.py index 44e22c52..3a739174 100644 --- a/app/settings.py +++ b/app/settings.py @@ -5,14 +5,14 @@ import os import sys from enum import Enum, IntEnum from functools import lru_cache -from pathlib import Path from pprint import pformat from textwrap import dedent +SEP = os.sep HOME_PATH = os.path.expanduser("~") -CONFIG_PATH = HOME_PATH + "/.config/demon-editor/" +CONFIG_PATH = HOME_PATH + "{}.config{}demon-editor{}".format(SEP, SEP, SEP) CONFIG_FILE = CONFIG_PATH + "config.json" -DATA_PATH = HOME_PATH + "/DemonEditor/data/" +DATA_PATH = HOME_PATH + "{}DemonEditor{}data{}".format(SEP, SEP, SEP) IS_DARWIN = sys.platform == "darwin" IS_WIN = sys.platform == "win32" @@ -34,9 +34,9 @@ class Defaults(Enum): FAV_CLICK_MODE = 0 PLAY_STREAMS_MODE = 1 if IS_DARWIN else 0 PROFILE_FOLDER_DEFAULT = False - RECORDS_PATH = DATA_PATH + "records/" + RECORDS_PATH = DATA_PATH + "records{}".format(SEP) ACTIVATE_TRANSCODING = False - ACTIVE_TRANSCODING_PRESET = "720p TV/device" + ACTIVE_TRANSCODING_PRESET = "720p TV{}device".format(SEP) def get_settings(): @@ -82,13 +82,13 @@ def write_settings(config): def set_local_paths(settings, profile_name, data_path=DATA_PATH, use_profile_folder=False): - settings["data_local_path"] = "{}{}/".format(data_path, profile_name) + settings["data_local_path"] = "{}{}{}".format(data_path, profile_name, SEP) if use_profile_folder: - settings["picons_local_path"] = "{}{}/{}/".format(data_path, profile_name, "picons") - settings["backup_local_path"] = "{}{}/{}/".format(data_path, profile_name, "backup") + settings["picons_local_path"] = "{}{}{}{}{}".format(data_path, profile_name, SEP, "picons", SEP) + settings["backup_local_path"] = "{}{}{}{}{}".format(data_path, profile_name, SEP, "backup", SEP) else: - settings["picons_local_path"] = "{}{}/{}/".format(data_path, "picons", profile_name) - settings["backup_local_path"] = "{}{}/{}/".format(data_path, "backup", profile_name) + settings["picons_local_path"] = "{}{}{}{}{}".format(data_path, "picons", SEP, profile_name, SEP) + settings["backup_local_path"] = "{}{}{}{}{}".format(data_path, "backup", SEP, profile_name, SEP) class SettingsType(IntEnum): @@ -98,29 +98,29 @@ class SettingsType(IntEnum): def get_default_settings(self): """ Returns default settings for current type """ - print(self.value) - if self.value == 0: + if self is SettingsType.ENIGMA_2: return {"setting_type": self.value, "host": "127.0.0.1", "port": "21", "timeout": 5, "user": "root", "password": "root", "http_port": "80", "http_timeout": 5, "http_use_ssl": False, "telnet_port": "23", "telnet_timeout": 5, "services_path": "/etc/enigma2/", "user_bouquet_path": "/etc/enigma2/", - "satellites_xml_path": "/etc/tuxbox/", "data_local_path": DATA_PATH + "enigma2/", + "satellites_xml_path": "/etc/tuxbox/", "data_local_path": "{}enigma2{}".format(DATA_PATH, SEP), "picons_path": "/usr/share/enigma2/picon/", - "picons_local_path": DATA_PATH + "enigma2/picons/", - "backup_local_path": DATA_PATH + "enigma2/backup/"} - elif self.value == 1: + "picons_local_path": "{}enigma2{}picons{}".format(DATA_PATH, SEP, SEP), + "backup_local_path": "{}enigma2{}backup{}".format(DATA_PATH, SEP, SEP)} + elif self is SettingsType.NEUTRINO_MP: return {"setting_type": self, "host": "127.0.0.1", "port": "21", "timeout": 5, "user": "root", "password": "root", "http_port": "80", "http_timeout": 2, "http_use_ssl": False, "telnet_port": "23", "telnet_timeout": 1, "services_path": "/var/tuxbox/config/zapit/", "user_bouquet_path": "/var/tuxbox/config/zapit/", - "satellites_xml_path": "/var/tuxbox/config/", "data_local_path": DATA_PATH + "neutrino/", + "satellites_xml_path": "/var/tuxbox/config/", + "data_local_path": "{}neutrino{}".format(DATA_PATH, SEP), "picons_path": "/usr/share/tuxbox/neutrino/icons/logo/", - "picons_local_path": DATA_PATH + "neutrino/picons/", - "backup_local_path": DATA_PATH + "neutrino/backup/"} + "picons_local_path": "{}neutrino{}picons{}".format(DATA_PATH, SEP, SEP), + "backup_local_path": "{}neutrino{}backup{}".format(DATA_PATH, SEP, SEP)} class SettingsException(Exception): @@ -182,7 +182,7 @@ class Settings: self._cp_settings[k] = v def_path = self.default_data_path - def_path += "enigma2/" if self.setting_type is SettingsType.ENIGMA_2 else "neutrino/" + def_path += "enigma2{}".format(SEP) if self.setting_type is SettingsType.ENIGMA_2 else "neutrino{}".format(SEP) set_local_paths(self._cp_settings, self._current_profile, def_path, self.profile_folder_is_default) if force_write: diff --git a/app/ui/app_menu_bar.ui b/app/ui/app_menu_bar.ui index 00371fa8..44694623 100644 --- a/app/ui/app_menu_bar.ui +++ b/app/ui/app_menu_bar.ui @@ -1,25 +1,5 @@ - -
- - About - app.on_about_app - -
-
- - Settings - app.on_settings - -
-
- - Exit - app.on_close_app - -
-
File @@ -66,19 +46,31 @@ app.on_download +
+ + Settings + app.on_settings + +
+
+ + Exit + app.on_close_app + +
Edit
- - Lock - app.on_locked - - - Hide - app.on_hide - -
+ + Lock + app.on_locked + + + Hide + app.on_hide + +
View @@ -111,39 +103,50 @@
+
+ + IPTV + + Add IPTV or stream service + app.on_iptv + + + Import YouTube playlist + app.on_import_yt_list + + + Import m3u + app.on_import_m3u + + + Export to m3u + app.on_export_to_m3u + +
+ + EPG configuration + app.on_epg_list_configuration + + + List configuration + app.on_iptv_list_configuration + +
+
+ + Remove all unavailable + app.on_remove_all_unavailable + +
+
+
- IPTV - - Add IPTV or stream service - app.on_iptv - - - Import YouTube playlist - app.on_import_yt_list - - - Import m3u - app.on_import_m3u - - - Export to m3u - app.on_export_to_m3u - + Help
- EPG configuration - app.on_epg_list_configuration - - - List configuration - app.on_iptv_list_configuration - -
-
- - Remove all unavailable - app.on_remove_all_unavailable + About + app.on_about_app
diff --git a/app/ui/backup_dialog.glade b/app/ui/backup_dialog.glade index abe0654f..5b165f35 100644 --- a/app/ui/backup_dialog.glade +++ b/app/ui/backup_dialog.glade @@ -57,7 +57,7 @@ Author: Dmitriy Yefremov False False - + @@ -67,7 +67,7 @@ Author: Dmitriy Yefremov False False - + @@ -297,7 +297,7 @@ Author: Dmitriy Yefremov True False - + False diff --git a/app/ui/control.glade b/app/ui/control.glade index 29725b97..966de852 100644 --- a/app/ui/control.glade +++ b/app/ui/control.glade @@ -1176,7 +1176,7 @@ audio-volume-medium-symbolic True True - document-edit-symbolic + 1 @@ -1187,7 +1187,7 @@ audio-volume-medium-symbolic True True - document-edit-symbolic + 1 @@ -1198,7 +1198,7 @@ audio-volume-medium-symbolic True True - document-edit-symbolic + 1 @@ -1485,7 +1485,7 @@ audio-volume-medium-symbolic True True False - document-edit-symbolic + diff --git a/app/ui/dialogs.py b/app/ui/dialogs.py index f14eacab..bca3e753 100644 --- a/app/ui/dialogs.py +++ b/app/ui/dialogs.py @@ -5,6 +5,7 @@ from functools import lru_cache from pathlib import Path from app.commons import run_idle +from app.settings import SEP from .uicommons import Gtk, UI_RESOURCES_PATH, TEXT_DOMAIN, IS_GNOME_SESSION @@ -17,7 +18,7 @@ class Dialog(Enum): {use_header} False True - 320 + 250 True dialog True @@ -104,10 +105,12 @@ def get_chooser_dialog(transient, settings, name, patterns, title=None): def get_file_chooser_dialog(transient, text, settings, action_type, file_filter, buttons=None, title=None, dirs=False): + text = get_message(text) if text else "" action_type = Gtk.FileChooserAction.SELECT_FOLDER if action_type is None else action_type - dialog = Gtk.FileChooserNative.new(get_message(title) if title else "", transient, action_type) + buttons = buttons or (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.OK) + dialog = Gtk.FileChooserDialog(text, transient, action_type, buttons, use_header_bar=IS_GNOME_SESSION) + dialog.set_title(get_message(title) if title else "") dialog.set_create_folders(dirs) - dialog.set_modal(True) if file_filter is not None: dialog.add_filter(file_filter) @@ -115,10 +118,10 @@ def get_file_chooser_dialog(transient, text, settings, action_type, file_filter, dialog.set_current_folder(settings.data_local_path) response = dialog.run() - if response == Gtk.ResponseType.ACCEPT: + if response not in (Gtk.ResponseType.CANCEL, Gtk.ResponseType.DELETE_EVENT): path = Path(dialog.get_filename() or dialog.get_current_folder()) if path.is_dir(): - response = "{}/".format(path.resolve()) + response = "{}{}".format(path.resolve(), SEP) elif path.is_file(): response = str(path.resolve()) dialog.destroy() diff --git a/app/ui/download_dialog.glade b/app/ui/download_dialog.glade index f8090ecf..09b2def2 100755 --- a/app/ui/download_dialog.glade +++ b/app/ui/download_dialog.glade @@ -372,7 +372,6 @@ Author: Dmitriy Yefremov True True Options - center diff --git a/app/ui/epg_dialog.glade b/app/ui/epg_dialog.glade index 20ff225d..47580157 100644 --- a/app/ui/epg_dialog.glade +++ b/app/ui/epg_dialog.glade @@ -87,7 +87,7 @@ Author: Dmitriy Yefremov copy_image False - + @@ -118,7 +118,7 @@ Author: Dmitriy Yefremov insert_link_image False - + @@ -436,7 +436,7 @@ Author: Dmitriy Yefremov True True /data/epg/ - document-edit-symbolic + folder-open-symbolic False Select @@ -466,7 +466,7 @@ Author: Dmitriy Yefremov True True /etc/enigma2/ - document-edit-symbolic + False diff --git a/app/ui/ftp.glade b/app/ui/ftp.glade index 525a47e5..3019ac8c 100644 --- a/app/ui/ftp.glade +++ b/app/ui/ftp.glade @@ -583,7 +583,7 @@ Author: Dmitriy Yefremov rename_image False - + @@ -632,7 +632,7 @@ Author: Dmitriy Yefremov rename_image_2 False - + diff --git a/app/ui/iptv.glade b/app/ui/iptv.glade index 746a3362..8a84866a 100644 --- a/app/ui/iptv.glade +++ b/app/ui/iptv.glade @@ -458,7 +458,7 @@ Author: Dmitriy Yefremov 5 5 0 - document-edit-symbolic + @@ -501,7 +501,7 @@ Author: Dmitriy Yefremov 5 5 0 - document-edit-symbolic + @@ -544,7 +544,7 @@ Author: Dmitriy Yefremov 5 5 0 - document-edit-symbolic + @@ -587,7 +587,7 @@ Author: Dmitriy Yefremov 5 5 0 - document-edit-symbolic + @@ -630,7 +630,7 @@ Author: Dmitriy Yefremov 5 5 1 - document-edit-symbolic + @@ -919,7 +919,7 @@ Author: Dmitriy Yefremov True True True - document-edit-symbolic + 0 @@ -942,7 +942,7 @@ Author: Dmitriy Yefremov True True True - document-edit-symbolic + 1 @@ -1042,7 +1042,7 @@ Author: Dmitriy Yefremov 5 5 5 - document-edit-symbolic + Link to YouTube resource. @@ -1169,7 +1169,7 @@ Author: Dmitriy Yefremov 5 5 1 - document-edit-symbolic + @@ -1184,7 +1184,7 @@ Author: Dmitriy Yefremov 5 5 0 - document-edit-symbolic + @@ -1199,7 +1199,7 @@ Author: Dmitriy Yefremov 5 5 0 - document-edit-symbolic + @@ -1214,7 +1214,7 @@ Author: Dmitriy Yefremov 5 5 0 - document-edit-symbolic + @@ -1229,7 +1229,7 @@ Author: Dmitriy Yefremov 5 5 0 - document-edit-symbolic + diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 8825a9c2..d22af021 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -294,7 +294,6 @@ class Application(Gtk.Application): self._filter_types_model = builder.get_object("filter_types_list_store") self._filter_sat_positions_model = builder.get_object("filter_sat_positions_list_store") self._filter_only_free_button = builder.get_object("filter_only_free_button") - self._filter_bar.bind_property("search-mode-enabled", self._filter_bar, "visible") # Player self._player_box = builder.get_object("player_box") self._player_scale = builder.get_object("player_scale") @@ -320,7 +319,6 @@ class Application(Gtk.Application): self._player_frame = builder.get_object("player_frame") # Search self._search_bar = builder.get_object("search_bar") - self._search_bar.bind_property("search-mode-enabled", self._search_bar, "visible") self._search_entry = builder.get_object("search_entry") self._search_provider = SearchProvider((self._services_view, self._fav_view, self._bouquets_view), builder.get_object("search_down_button"), @@ -334,59 +332,6 @@ class Application(Gtk.Application): style_provider.load_from_path(UI_RESOURCES_PATH + "style.css") self._status_bar_box.get_style_context().add_provider_for_screen(Gdk.Screen.get_default(), style_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER) - # Layout - if self._settings.is_darwin and self._settings.alternate_layout: - self._main_paned = builder.get_object("main_data_paned") - self._fav_paned = builder.get_object("fav_bouquets_paned") - self._fav_box = self._fav_paned.get_child1() - self._bouquets_box = self._fav_paned.get_child2() - self._left_ar_bq_button = builder.get_object("left_arrow_bq_button") - self._left_ar_bq_button.bind_property("visible", builder.get_object("right_arrow_bq_button"), "visible", 4) - self._left_ar_bq_button.set_visible(True) - self.init_layout(builder) - - def init_layout(self, builder): - """ Initializes an alternate layout, if enabled. """ - top_box = builder.get_object("top_box") - top_toolbar = builder.get_object("top_toolbar") - top_toolbar.set_margin_left(0) - top_toolbar.set_margin_right(10) - - extra_box = builder.get_object("toolbar_extra_tools_box") - extra_box.set_margin_left(10) - extra_box.set_margin_right(0) - extra_box.reorder_child(self._ftp_button, 0) - extra_box.reorder_child(builder.get_object("add_bouquet_tool_button"), 2) - - top_box.set_child_packing(extra_box, False, True, 0, Gtk.PackType.START) - top_box.set_child_packing(top_toolbar, False, True, 0, Gtk.PackType.END) - top_box.reorder_child(extra_box, 0) - top_box.reorder_child(top_toolbar, 1) - - center_box = builder.get_object("center_box") - center_box.reorder_child(self._ftp_revealer, 0) - center_box.reorder_child(self._control_revealer, 1) - center_box.reorder_child(builder.get_object("main_box"), 2) - - services_box = self._main_paned.get_child1() - self._main_paned.remove(services_box) - self._main_paned.remove(self._fav_paned) - self._main_paned.pack1(self._fav_paned, True, True) - self._main_paned.pack2(services_box, True, True) - - self._left_ar_bq_button.set_visible(not self._settings.bq_details_first) - self.init_bq_position() - - def init_bq_position(self): - self._fav_paned.remove(self._fav_box) - self._fav_paned.remove(self._bouquets_box) - - if self._settings.bq_details_first: - self._fav_paned.pack1(self._fav_box, False, False) - self._fav_paned.pack2(self._bouquets_box, False, False) - else: - self._fav_paned.pack1(self._bouquets_box, False, False) - self._fav_paned.pack2(self._fav_box, False, False) def do_startup(self): Gtk.Application.do_startup(self) @@ -1413,7 +1358,7 @@ class Application(Gtk.Application): self.delete_selection(self._services_view, self._fav_view) self.on_view_focus(self._bouquets_view) - menu.popup_at_pointer(None) + menu.popup(None, None, None, None, event.button, event.time) return True def on_satellite_editor_show(self, action, value=None): @@ -2049,7 +1994,6 @@ class Application(Gtk.Application): self._profile_combo_box.append(p, p) def on_tree_view_key_press(self, view, event): - """ Handling keystrokes on press """ key_code = event.hardware_keycode if not KeyboardKey.value_exist(key_code): return @@ -2084,7 +2028,6 @@ class Application(Gtk.Application): self.on_delete(view) def on_tree_view_key_release(self, view, event): - """ Handling keystrokes on release """ key_code = event.hardware_keycode if not KeyboardKey.value_exist(key_code): return @@ -2953,7 +2896,7 @@ class Application(Gtk.Application): else: self.filter_set_default() - self._filter_bar.set_search_mode(value) + self._filter_bar.set_visible(value) def filter_set_default(self): """ Setting defaults for filter elements. """ @@ -3045,7 +2988,7 @@ class Application(Gtk.Application): return True action.set_state(value) - self._search_bar.set_search_mode(value) + self._search_bar.set_visible(value) if value: self._search_entry.grab_focus() else: diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade index e2162321..ad2c5c8d 100644 --- a/app/ui/main_window.glade +++ b/app/ui/main_window.glade @@ -1,5 +1,5 @@ -