diff --git a/app/ui/imports.py b/app/ui/imports.py
index d0abc660..4509f325 100644
--- a/app/ui/imports.py
+++ b/app/ui/imports.py
@@ -21,7 +21,7 @@ def import_bouquet(transient, model, path, settings, services, appender, file_pa
if profile is SettingsType.ENIGMA_2:
pattern = ".{}".format(bq_type.value)
- f_pattern = "userbouquet.*{}".format(pattern)
+ f_pattern = "*" + pattern if settings.is_darwin else "userbouquet.*{}".format(pattern)
elif profile is SettingsType.NEUTRINO_MP:
pattern = "webtv.xml" if bq_type is BqType.WEBTV else "bouquets.xml"
f_pattern = "bouquets.xml"
@@ -34,11 +34,15 @@ def import_bouquet(transient, model, path, settings, services, appender, file_pa
if file_path == Gtk.ResponseType.CANCEL:
return
- if not str(file_path).endswith(pattern):
+ if not file_path.endswith(pattern):
show_dialog(DialogType.ERROR, transient, text="No bouquet file is selected!")
return
if profile is SettingsType.ENIGMA_2:
+ if settings.is_darwin and file_path.rfind("userbouquet.") < 0:
+ show_dialog(DialogType.ERROR, transient, text="No bouquet file is selected!")
+ return
+
bq = get_enigma2_bouquet(file_path)
imported = list(filter(lambda x: x.data in services or x.type is BqServiceType.IPTV, bq.services))
diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py
index e0ff56e9..ea885aab 100644
--- a/app/ui/main_app_window.py
+++ b/app/ui/main_app_window.py
@@ -501,6 +501,7 @@ class Application(Gtk.Application):
self._bouquets_view.drag_source_set_target_list(None)
self._bouquets_view.drag_dest_add_text_targets()
self._bouquets_view.drag_source_add_text_targets()
+ self._bouquets_view.drag_dest_add_uri_targets()
def init_colors(self, update=False):
""" Initialisation of background colors for the services.
@@ -1036,13 +1037,15 @@ class Application(Gtk.Application):
def on_bq_view_drag_data_received(self, view, drag_context, x, y, data, info, time):
model_name, model = get_model_data(view)
drop_info = view.get_dest_row_at_pos(x, y)
- data = data.get_text()
- if not data:
+
+ uris = data.get_uris()
+ if uris:
+ from urllib.parse import unquote, urlparse
+ self.on_import_bouquet(None, file_path=urlparse(unquote(uris[0])).path.strip())
return
- if data.startswith("file://"):
- from urllib.parse import unquote, urlparse
- self.on_import_bouquet(None, file_path=urlparse(unquote(data)).path.strip())
+ data = data.get_text()
+ if not data:
return
itr_str, sep, source = data.partition("::::")
diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade
index 13877971..b64df60d 100644
--- a/app/ui/main_window.glade
+++ b/app/ui/main_window.glade
@@ -2923,7 +2923,6 @@ Author: Dmitriy Yefremov
No connection to the receiver!
10
10
- 24
network-offline