mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-01-22 15:33:35 +01:00
added epg display from the alternatives list
This commit is contained in:
@@ -6,10 +6,11 @@ from urllib.parse import quote
|
||||
|
||||
from gi.repository import GLib
|
||||
|
||||
from .dialogs import get_dialogs_string, show_dialog, DialogType
|
||||
from .dialogs import get_dialogs_string, show_dialog, DialogType, get_message
|
||||
from .uicommons import Gtk, Gdk, UI_RESOURCES_PATH, Column
|
||||
from ..commons import run_task, run_with_delay, log, run_idle
|
||||
from ..connections import HttpAPI
|
||||
from ..eparser.ecommons import BqServiceType
|
||||
|
||||
|
||||
class ControlBox(Gtk.HBox):
|
||||
@@ -669,6 +670,12 @@ class ControlBox(Gtk.HBox):
|
||||
|
||||
service = self._app.current_services.get(fav_id, None)
|
||||
if service:
|
||||
if service.service_type == BqServiceType.ALT.name:
|
||||
msg = "Alternative service.\n\n {}".format(get_message("Not implemented yet!"))
|
||||
show_dialog(DialogType.ERROR, transient=self._app._main_window, text=msg)
|
||||
context.finish(False, False, time)
|
||||
return
|
||||
|
||||
self._timer_name_entry.set_text(service.service)
|
||||
self._timer_service_entry.set_text(service.service)
|
||||
self._timer_service_ref_entry.set_text(service.picon_id.rstrip(".png").replace("_", ":"))
|
||||
|
||||
@@ -93,6 +93,7 @@ class Application(Gtk.Application):
|
||||
"on_bouquets_selection": self.on_bouquets_selection,
|
||||
"on_satellite_editor_show": self.on_satellite_editor_show,
|
||||
"on_fav_selection": self.on_fav_selection,
|
||||
"on_alt_selection": self.on_alt_selection,
|
||||
"on_services_selection": self.on_services_selection,
|
||||
"on_fav_cut": self.on_fav_cut,
|
||||
"on_bouquets_cut": self.on_bouquets_cut,
|
||||
@@ -2746,13 +2747,13 @@ class Application(Gtk.Application):
|
||||
row = self._fav_model[path][:]
|
||||
srv_type, fav_id = row[Column.FAV_TYPE], row[Column.FAV_ID]
|
||||
|
||||
if srv_type == BqServiceType.IPTV.name or srv_type in self._marker_types:
|
||||
if srv_type in self._marker_types:
|
||||
self.show_error_dialog("Not allowed in this context!")
|
||||
self.set_playback_elms_active()
|
||||
return
|
||||
|
||||
srv = self._services.get(fav_id, None)
|
||||
if srv and srv.transponder:
|
||||
if srv and srv.transponder or srv_type == BqServiceType.IPTV.name:
|
||||
return srv.picon_id.rstrip(".png").replace("_", ":")
|
||||
|
||||
def update_info(self):
|
||||
@@ -3313,6 +3314,13 @@ class Application(Gtk.Application):
|
||||
|
||||
return True
|
||||
|
||||
def on_alt_selection(self, model, path, column):
|
||||
if self._control_box and self._control_box.update_epg:
|
||||
row = model[path][:]
|
||||
srv = self._services.get(row[Column.ALT_FAV_ID], None)
|
||||
if srv and srv.transponder or row[Column.ALT_TYPE] == BqServiceType.IPTV.name:
|
||||
self._control_box.on_service_changed(srv.picon_id.rstrip(".png").replace("_", ":"))
|
||||
|
||||
# ***************** Profile label ********************* #
|
||||
|
||||
@run_idle
|
||||
|
||||
@@ -2679,10 +2679,12 @@ Author: Dmitriy Yefremov
|
||||
<property name="enable_search">False</property>
|
||||
<property name="rubber_banding">True</property>
|
||||
<property name="enable_grid_lines">both</property>
|
||||
<property name="activate_on_single_click">True</property>
|
||||
<signal name="button-press-event" handler="on_view_popup_menu" object="alt_popup_menu" swapped="no"/>
|
||||
<signal name="drag-begin" handler="on_view_drag_begin" after="yes" swapped="no"/>
|
||||
<signal name="drag-data-get" handler="on_view_drag_data_get" swapped="no"/>
|
||||
<signal name="drag-data-received" handler="on_alt_view_drag_data_received" swapped="no"/>
|
||||
<signal name="row-activated" handler="on_alt_selection" object="alt_list_store" swapped="no"/>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="alt_selection">
|
||||
<property name="mode">multiple</property>
|
||||
|
||||
Reference in New Issue
Block a user