diff --git a/app/ui/dialogs.glade b/app/ui/dialogs.glade index 5164c5f1..839b60ad 100644 --- a/app/ui/dialogs.glade +++ b/app/ui/dialogs.glade @@ -11,9 +11,9 @@ DemonEditor 0.3.1 Pre-alpha 2018 Dmitriy Yefremov -dmitry.v.yefremov@gmail.com Enigma2 channel and satellites list editor for GNU/Linux + https://github.com/DYefremov/DemonEditor Это приложение распространяется без каких-либо гарантий. Подробнее в <a href="http://opensource.org/licenses/mit-license.php">The MIT License (MIT)</a>. Dmitriy Yefremov diff --git a/app/ui/lang/ru/LC_MESSAGES/demon-editor.mo b/app/ui/lang/ru/LC_MESSAGES/demon-editor.mo index b290ee13..5475f097 100644 Binary files a/app/ui/lang/ru/LC_MESSAGES/demon-editor.mo and b/app/ui/lang/ru/LC_MESSAGES/demon-editor.mo differ diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index cd2b08c1..077d8142 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -246,10 +246,8 @@ class MainAppWindow: def on_paste(self, view): selection = view.get_selection() dest_index = 0 - bq_selected = self.get_selected_bouquet() - + bq_selected = self.check_bouquet_selection() if not bq_selected: - show_dialog(DialogType.ERROR, self._main_window, "Error. No bouquet is selected!") return fav_bouquet = self._bouquets[bq_selected] @@ -440,10 +438,8 @@ class MainAppWindow: def receive_selection(self, *, view, drop_info, data): """ Update fav view after data received """ - bq_selected = self.get_selected_bouquet() - + bq_selected = self.check_bouquet_selection() if not bq_selected: - show_dialog(DialogType.ERROR, self._main_window, "Error. No bouquet is selected!") return model = get_base_model(view.get_model()) @@ -686,6 +682,20 @@ class MainAppWindow: service.hide, service.service_type, service.pos, service.fav_id, self._picons.get(service.picon_id, None))) + def check_bouquet_selection(self): + """ checks and returns bouquet if selected """ + bq_selected = self.get_selected_bouquet() + + if not bq_selected: + show_dialog(DialogType.ERROR, self._main_window, "Error. No bouquet is selected!") + return + + if Profile(self._profile) is Profile.NEUTRINO_MP and bq_selected.endswith(BqType.WEBTV.value): + show_dialog(DialogType.ERROR, self._main_window, "Operation not allowed in this context!") + return + + return bq_selected + def get_selected_bouquet(self): """ returns 'name:type' of last selected bouquet or False """ if self._current_bq_name is None: diff --git a/deb/usr/share/locale/ru/LC_MESSAGES/demon-editor.mo b/deb/usr/share/locale/ru/LC_MESSAGES/demon-editor.mo index b290ee13..5475f097 100644 Binary files a/deb/usr/share/locale/ru/LC_MESSAGES/demon-editor.mo and b/deb/usr/share/locale/ru/LC_MESSAGES/demon-editor.mo differ diff --git a/po/ru/demon-editor.mo b/po/ru/demon-editor.mo index b290ee13..5475f097 100644 Binary files a/po/ru/demon-editor.mo and b/po/ru/demon-editor.mo differ diff --git a/po/ru/demon-editor.po b/po/ru/demon-editor.po index 389e39a0..4995e18a 100644 --- a/po/ru/demon-editor.po +++ b/po/ru/demon-editor.po @@ -465,6 +465,9 @@ msgstr "Не выбран файл satellites.xml!" msgid "Error. Verify the data!" msgstr "Ошибка. Проверьте данные!" +msgid "Operation not allowed in this context!" +msgstr "Недопустимая операция в данном контексте!" +