mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2025-12-24 01:19:40 +01:00
added background for new services
This commit is contained in:
@@ -42,21 +42,21 @@ class Application(Gtk.Application):
|
|||||||
_FAV_ELEMENTS = ("fav_cut_popup_item", "fav_paste_popup_item", "fav_locate_popup_item", "fav_iptv_popup_item",
|
_FAV_ELEMENTS = ("fav_cut_popup_item", "fav_paste_popup_item", "fav_locate_popup_item", "fav_iptv_popup_item",
|
||||||
"fav_insert_marker_popup_item", "fav_edit_sub_menu_popup_item", "fav_edit_popup_item",
|
"fav_insert_marker_popup_item", "fav_edit_sub_menu_popup_item", "fav_edit_popup_item",
|
||||||
"fav_picon_popup_item", "fav_copy_popup_item")
|
"fav_picon_popup_item", "fav_copy_popup_item")
|
||||||
_BOUQUET_ELEMENTS = ("edit_tool_button", "new_tool_button", "bouquets_new_popup_item", "bouquets_edit_popup_item",
|
_BOUQUET_ELEMENTS = ("bouquets_new_popup_item", "bouquets_edit_popup_item",
|
||||||
"bouquets_cut_popup_item", "bouquets_copy_popup_item", "bouquets_paste_popup_item")
|
"bouquets_cut_popup_item", "bouquets_copy_popup_item", "bouquets_paste_popup_item")
|
||||||
_COMMONS_ELEMENTS = ("edit_tool_button", "bouquets_remove_popup_item", "fav_remove_popup_item")
|
_COMMONS_ELEMENTS = ("bouquets_remove_popup_item", "fav_remove_popup_item")
|
||||||
_FAV_ENIGMA_ELEMENTS = ("fav_insert_marker_popup_item",)
|
_FAV_ENIGMA_ELEMENTS = ("fav_insert_marker_popup_item",)
|
||||||
_FAV_IPTV_ELEMENTS = ("fav_iptv_popup_item",)
|
_FAV_IPTV_ELEMENTS = ("fav_iptv_popup_item",)
|
||||||
_LOCK_HIDE_ELEMENTS = ("locked_tool_button", "hide_tool_button")
|
_LOCK_HIDE_ELEMENTS = ("locked_tool_button", "hide_tool_button")
|
||||||
_DYNAMIC_ELEMENTS = ("services_popup_menu", "new_tool_button", "edit_tool_button", "locked_tool_button",
|
_DYNAMIC_ELEMENTS = ("services_popup_menu", "locked_tool_button", "fav_cut_popup_item", "fav_paste_popup_item",
|
||||||
"fav_cut_popup_item", "fav_paste_popup_item", "bouquets_new_popup_item", "hide_tool_button",
|
"bouquets_new_popup_item", "hide_tool_button", "bouquets_remove_popup_item",
|
||||||
"bouquets_remove_popup_item", "fav_remove_popup_item", "bouquets_edit_popup_item",
|
"fav_remove_popup_item", "bouquets_edit_popup_item", "fav_insert_marker_popup_item",
|
||||||
"fav_insert_marker_popup_item", "fav_edit_popup_item", "fav_edit_sub_menu_popup_item",
|
"fav_edit_popup_item", "fav_edit_sub_menu_popup_item", "fav_locate_popup_item",
|
||||||
"fav_locate_popup_item", "fav_picon_popup_item", "fav_iptv_popup_item", "fav_copy_popup_item",
|
"fav_picon_popup_item", "fav_iptv_popup_item", "fav_copy_popup_item",
|
||||||
"bouquets_cut_popup_item", "bouquets_copy_popup_item", "bouquets_paste_popup_item")
|
"bouquets_cut_popup_item", "bouquets_copy_popup_item", "bouquets_paste_popup_item")
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
_NEW_COLOR = "#ff5733" # Color for new services in the main list
|
_NEW_COLOR = "#ffe6cc" # Color for new services in the main list
|
||||||
_EXTRA_COLOR = "#33a8ff" # Color for services with a extra name for the bouquet
|
_EXTRA_COLOR = "#33a8ff" # Color for services with a extra name for the bouquet
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
@@ -216,11 +216,6 @@ class Application(Gtk.Application):
|
|||||||
# Force ctrl press event for view. Multiple selections in lists only with Space key(as in file managers)!!!
|
# Force ctrl press event for view. Multiple selections in lists only with Space key(as in file managers)!!!
|
||||||
self._services_view.connect("key-press-event", self.force_ctrl)
|
self._services_view.connect("key-press-event", self.force_ctrl)
|
||||||
self._fav_view.connect("key-press-event", self.force_ctrl)
|
self._fav_view.connect("key-press-event", self.force_ctrl)
|
||||||
# Renders
|
|
||||||
self._service_render = builder.get_object("service_cellrenderertext")
|
|
||||||
self._fav_service_render = builder.get_object("fav_service_cellrenderertext")
|
|
||||||
self._service_column = builder.get_object("service_column")
|
|
||||||
self._fav_service_column = builder.get_object("fav_service_column")
|
|
||||||
# Clipboard
|
# Clipboard
|
||||||
self._clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
|
self._clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
|
||||||
# Wait dialog
|
# Wait dialog
|
||||||
@@ -243,7 +238,6 @@ class Application(Gtk.Application):
|
|||||||
|
|
||||||
def do_startup(self):
|
def do_startup(self):
|
||||||
Gtk.Application.do_startup(self)
|
Gtk.Application.do_startup(self)
|
||||||
self.init_service_renders()
|
|
||||||
self.init_http_api()
|
self.init_http_api()
|
||||||
|
|
||||||
def do_activate(self):
|
def do_activate(self):
|
||||||
@@ -283,29 +277,6 @@ class Application(Gtk.Application):
|
|||||||
""" Function for force ctrl press event for view """
|
""" Function for force ctrl press event for view """
|
||||||
event.state |= Gdk.ModifierType.CONTROL_MASK
|
event.state |= Gdk.ModifierType.CONTROL_MASK
|
||||||
|
|
||||||
def init_service_renders(self):
|
|
||||||
profile = Profile(self._profile)
|
|
||||||
func = self.service_data_function if profile is Profile.ENIGMA_2 else None
|
|
||||||
fav_func = self.fav_service_data_function if profile is Profile.ENIGMA_2 else None
|
|
||||||
self._service_column.set_cell_data_func(self._service_render, func, None)
|
|
||||||
self._fav_service_column.set_cell_data_func(self._fav_service_render, fav_func, None)
|
|
||||||
|
|
||||||
def service_data_function(self, column, render: Gtk.CellRendererText, model, itr, data):
|
|
||||||
""" Data function for the service column of main list """
|
|
||||||
render.set_property("foreground-set", None)
|
|
||||||
cas_flags = model.get_value(itr, 0)
|
|
||||||
if cas_flags:
|
|
||||||
f_flags = list(filter(lambda x: x.startswith("f:"), cas_flags.split(",")))
|
|
||||||
if f_flags and Flag.is_new(int(f_flags[0][2:])):
|
|
||||||
render.set_property("foreground", self._NEW_COLOR)
|
|
||||||
|
|
||||||
def fav_service_data_function(self, column, render, model, itr, data):
|
|
||||||
""" Data function for the service column of FAV list """
|
|
||||||
fav_id = model.get_value(itr, 7)
|
|
||||||
bq = self._extra_bouquets.get(self._bq_selected, None)
|
|
||||||
has_id = bq.get(fav_id, None) if bq else bq
|
|
||||||
render.set_property("foreground", self._EXTRA_COLOR) if has_id else render.set_property("foreground-set", None)
|
|
||||||
|
|
||||||
@run_idle
|
@run_idle
|
||||||
def on_close_app(self, *args):
|
def on_close_app(self, *args):
|
||||||
self.quit()
|
self.quit()
|
||||||
@@ -825,7 +796,16 @@ class Application(Gtk.Application):
|
|||||||
|
|
||||||
def append_services_data(self, services):
|
def append_services_data(self, services):
|
||||||
for srv in services:
|
for srv in services:
|
||||||
itr = self._services_model.append(srv)
|
flags = srv.flags_cas
|
||||||
|
tooltip, background = None, None
|
||||||
|
if flags:
|
||||||
|
f_flags = list(filter(lambda x: x.startswith("f:"), flags.split(",")))
|
||||||
|
if f_flags and Flag.is_new(int(f_flags[0][2:])):
|
||||||
|
tooltip = "Marked as new"
|
||||||
|
background = self._NEW_COLOR
|
||||||
|
|
||||||
|
s = srv + (tooltip, background)
|
||||||
|
itr = self._services_model.append(s)
|
||||||
self._services_model.set_value(itr, 8, self._picons.get(srv.picon_id, None))
|
self._services_model.set_value(itr, 8, self._picons.get(srv.picon_id, None))
|
||||||
yield True
|
yield True
|
||||||
self._wait_dialog.hide()
|
self._wait_dialog.hide()
|
||||||
@@ -1006,7 +986,6 @@ class Application(Gtk.Application):
|
|||||||
self.update_services_counts()
|
self.update_services_counts()
|
||||||
|
|
||||||
self.update_profile_label()
|
self.update_profile_label()
|
||||||
self.init_service_renders()
|
|
||||||
self.init_http_api()
|
self.init_http_api()
|
||||||
|
|
||||||
def on_tree_view_key_press(self, view, event):
|
def on_tree_view_key_press(self, view, event):
|
||||||
|
|||||||
@@ -282,7 +282,6 @@ Author: Dmitriy Yefremov
|
|||||||
</object>
|
</object>
|
||||||
<object class="GtkPopoverMenu" id="left_header_popover_menu">
|
<object class="GtkPopoverMenu" id="left_header_popover_menu">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<signal name="button-release-event" handler="on_popover_release" swapped="no"/>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="left_popover_munu_box">
|
<object class="GtkBox" id="left_popover_munu_box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -294,21 +293,17 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="create_left_popover_munu_button">
|
<object class="GtkModelButton" id="create_left_popover_munu_button_">
|
||||||
<property name="label">gtk-new</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="tooltip_text" translatable="yes">New empty configuration</property>
|
<property name="text" translatable="yes">New empty configuration</property>
|
||||||
<property name="relief">none</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
<signal name="clicked" handler="on_new_configuration" swapped="no"/>
|
<signal name="clicked" handler="on_new_configuration" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">6</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -319,41 +314,35 @@ Author: Dmitriy Yefremov
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">7</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="open_left_popover_munu_button">
|
<object class="GtkModelButton" id="open_left_popover_munu_button_">
|
||||||
<property name="label">gtk-open</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="text" translatable="yes">Open</property>
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
<signal name="clicked" handler="on_data_open" swapped="no"/>
|
<signal name="clicked" handler="on_data_open" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">2</property>
|
<property name="position">8</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="save_left_popover_munu_button">
|
<object class="GtkModelButton" id="save_left_popover_munu_button_">
|
||||||
<property name="label">gtk-save</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="text" translatable="yes">Save</property>
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
<signal name="clicked" handler="on_data_save" swapped="no"/>
|
<signal name="clicked" handler="on_data_save" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">3</property>
|
<property name="position">9</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -365,24 +354,46 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="padding">2</property>
|
<property name="padding">2</property>
|
||||||
<property name="position">4</property>
|
<property name="position">10</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="exit_left_popover_munu_button">
|
<object class="GtkModelButton" id="transfer_left_popover_munu_button">
|
||||||
<property name="label">gtk-quit</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="text" translatable="yes">FTP-transfer</property>
|
||||||
|
<signal name="clicked" handler="on_download" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">11</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparator">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">12</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkModelButton" id="exit_left_popover_munu_button_">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="text" translatable="yes">Exit</property>
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
<signal name="clicked" handler="on_close_app" swapped="no"/>
|
<signal name="clicked" handler="on_close_app" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">5</property>
|
<property name="position">13</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@@ -709,7 +720,6 @@ Author: Dmitriy Yefremov
|
|||||||
</object>
|
</object>
|
||||||
<object class="GtkPopoverMenu" id="right_header_popover_menu">
|
<object class="GtkPopoverMenu" id="right_header_popover_menu">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<signal name="button-release-event" handler="on_popover_release" swapped="no"/>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="right_popover_munu_box">
|
<object class="GtkBox" id="right_popover_munu_box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -721,15 +731,12 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkModelButton">
|
||||||
<property name="label">gtk-preferences</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="text" translatable="yes">Satellites editor</property>
|
||||||
<property name="use_stock">True</property>
|
<signal name="clicked" handler="on_satellite_editor_show" swapped="no"/>
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
<signal name="clicked" handler="on_preferences" swapped="no"/>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@@ -737,6 +744,59 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkModelButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="text" translatable="yes">Picons downloader</property>
|
||||||
|
<signal name="clicked" handler="on_picons_loader_show" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkModelButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="text" translatable="yes">Import m3u file</property>
|
||||||
|
<signal name="clicked" handler="on_import_m3u" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparator">
|
||||||
|
<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="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkModelButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="text" translatable="yes">Settings</property>
|
||||||
|
<signal name="clicked" handler="on_preferences" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSeparator">
|
<object class="GtkSeparator">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -747,24 +807,21 @@ Author: Dmitriy Yefremov
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">6</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkModelButton">
|
||||||
<property name="label">gtk-about</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="text" translatable="yes">About</property>
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="always_show_image">True</property>
|
|
||||||
<signal name="clicked" handler="on_about_app" swapped="no"/>
|
<signal name="clicked" handler="on_about_app" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">4</property>
|
<property name="position">7</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@@ -841,6 +898,10 @@ Author: Dmitriy Yefremov
|
|||||||
<column type="gchararray"/>
|
<column type="gchararray"/>
|
||||||
<!-- column-name transponder -->
|
<!-- column-name transponder -->
|
||||||
<column type="gchararray"/>
|
<column type="gchararray"/>
|
||||||
|
<!-- column-name tooltip -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
<!-- column-name background -->
|
||||||
|
<column type="gchararray"/>
|
||||||
</columns>
|
</columns>
|
||||||
<signal name="row-deleted" handler="on_model_changed" swapped="no"/>
|
<signal name="row-deleted" handler="on_model_changed" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
@@ -1062,62 +1123,6 @@ Author: Dmitriy Yefremov
|
|||||||
<object class="GtkBox" id="right_header_box">
|
<object class="GtkBox" id="right_header_box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="new_tool_button">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="sensitive">False</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="tooltip_text" translatable="yes">New bouquet</property>
|
|
||||||
<signal name="clicked" handler="on_new_bouquet" object="bouquets_tree_view" swapped="no"/>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="stock">gtk-new</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="edit_tool_button">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="sensitive">False</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="tooltip_text" translatable="yes">Edit</property>
|
|
||||||
<signal name="clicked" handler="on_tool_edit" swapped="no"/>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="stock">gtk-edit</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSeparator">
|
|
||||||
<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">2</property>
|
|
||||||
<property name="position">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="sat_editor_header_button">
|
<object class="GtkButton" id="sat_editor_header_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -1590,6 +1595,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="search_column">3</property>
|
<property name="search_column">3</property>
|
||||||
<property name="rubber_banding">True</property>
|
<property name="rubber_banding">True</property>
|
||||||
<property name="enable_grid_lines">both</property>
|
<property name="enable_grid_lines">both</property>
|
||||||
|
<property name="tooltip_column">20</property>
|
||||||
<property name="activate_on_single_click">True</property>
|
<property name="activate_on_single_click">True</property>
|
||||||
<signal name="button-press-event" handler="on_view_popup_menu" object="services_popup_menu" swapped="no"/>
|
<signal name="button-press-event" handler="on_view_popup_menu" object="services_popup_menu" swapped="no"/>
|
||||||
<signal name="button-press-event" handler="on_view_press" swapped="no"/>
|
<signal name="button-press-event" handler="on_view_press" swapped="no"/>
|
||||||
@@ -1611,6 +1617,7 @@ Author: Dmitriy Yefremov
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererText" id="cas_cellrenderertext1"/>
|
<object class="GtkCellRendererText" id="cas_cellrenderertext1"/>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">0</attribute>
|
<attribute name="text">0</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1623,6 +1630,7 @@ Author: Dmitriy Yefremov
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererText" id="type_cellrenderertext2"/>
|
<object class="GtkCellRendererText" id="type_cellrenderertext2"/>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">1</attribute>
|
<attribute name="text">1</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1631,15 +1639,17 @@ Author: Dmitriy Yefremov
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeViewColumn" id="service_column">
|
<object class="GtkTreeViewColumn" id="service_column">
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="spacing">2</property>
|
|
||||||
<property name="min_width">50</property>
|
<property name="min_width">50</property>
|
||||||
<property name="title" translatable="yes">Service</property>
|
<property name="title" translatable="yes">Service</property>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
<property name="reorderable">True</property>
|
<property name="reorderable">True</property>
|
||||||
<property name="sort_column_id">3</property>
|
<property name="sort_column_id">3</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererPixbuf" id="coded_cellrendererpixbuf"/>
|
<object class="GtkCellRendererPixbuf" id="coded_cellrendererpixbuf">
|
||||||
|
<property name="xpad">2</property>
|
||||||
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="cell-background">21</attribute>
|
||||||
<attribute name="pixbuf">2</attribute>
|
<attribute name="pixbuf">2</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1649,18 +1659,26 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="width_chars">25</property>
|
<property name="width_chars">25</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="cell-background">21</attribute>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">3</attribute>
|
<attribute name="text">3</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererPixbuf" id="locked_cellrendererpixbuf"/>
|
<object class="GtkCellRendererPixbuf" id="locked_cellrendererpixbuf">
|
||||||
|
<property name="xpad">2</property>
|
||||||
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="cell-background">21</attribute>
|
||||||
<attribute name="pixbuf">4</attribute>
|
<attribute name="pixbuf">4</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererPixbuf" id="hide_cellrendererpixbuf"/>
|
<object class="GtkCellRendererPixbuf" id="hide_cellrendererpixbuf">
|
||||||
|
<property name="xpad">2</property>
|
||||||
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="cell-background">21</attribute>
|
||||||
<attribute name="pixbuf">5</attribute>
|
<attribute name="pixbuf">5</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1680,6 +1698,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="width_chars">15</property>
|
<property name="width_chars">15</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">6</attribute>
|
<attribute name="text">6</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1698,6 +1717,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="xalign">0.51999998092651367</property>
|
<property name="xalign">0.51999998092651367</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">7</attribute>
|
<attribute name="text">7</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1711,6 +1731,7 @@ Author: Dmitriy Yefremov
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkCellRendererPixbuf" id="picon_cellrendererpixbuf"/>
|
<object class="GtkCellRendererPixbuf" id="picon_cellrendererpixbuf"/>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="cell-background">21</attribute>
|
||||||
<attribute name="pixbuf">8</attribute>
|
<attribute name="pixbuf">8</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1742,6 +1763,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="xalign">0.50999999046325684</property>
|
<property name="xalign">0.50999999046325684</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">10</attribute>
|
<attribute name="text">10</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1760,6 +1782,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="xalign">0.50999999046325684</property>
|
<property name="xalign">0.50999999046325684</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">11</attribute>
|
<attribute name="text">11</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1778,6 +1801,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="xalign">0.50999999046325684</property>
|
<property name="xalign">0.50999999046325684</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">12</attribute>
|
<attribute name="text">12</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1796,6 +1820,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="xalign">0.50999999046325684</property>
|
<property name="xalign">0.50999999046325684</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">13</attribute>
|
<attribute name="text">13</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1814,6 +1839,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="xalign">0.50999999046325684</property>
|
<property name="xalign">0.50999999046325684</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">14</attribute>
|
<attribute name="text">14</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1832,6 +1858,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="xalign">0.50999999046325684</property>
|
<property name="xalign">0.50999999046325684</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">15</attribute>
|
<attribute name="text">15</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1849,6 +1876,7 @@ Author: Dmitriy Yefremov
|
|||||||
<property name="xalign">0.50999999046325684</property>
|
<property name="xalign">0.50999999046325684</property>
|
||||||
</object>
|
</object>
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="background">21</attribute>
|
||||||
<attribute name="text">16</attribute>
|
<attribute name="text">16</attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</child>
|
</child>
|
||||||
@@ -1890,6 +1918,24 @@ Author: Dmitriy Yefremov
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeViewColumn" id="extra">
|
||||||
|
<property name="visible">False</property>
|
||||||
|
<property name="title" translatable="yes">extra</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText" id="tooltip_cellrenderertext"/>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="text">20</attribute>
|
||||||
|
</attributes>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText" id="background_cellrenderertext"/>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="text">21</attribute>
|
||||||
|
</attributes>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from app.eparser import Service
|
|||||||
from app.eparser.ecommons import MODULATION, Inversion, ROLL_OFF, Pilot, Flag, Pids, POLARIZATION, \
|
from app.eparser.ecommons import MODULATION, Inversion, ROLL_OFF, Pilot, Flag, Pids, POLARIZATION, \
|
||||||
get_key_by_value, get_value_by_name, FEC_DEFAULT, PLS_MODE, SERVICE_TYPE
|
get_key_by_value, get_value_by_name, FEC_DEFAULT, PLS_MODE, SERVICE_TYPE
|
||||||
from app.properties import Profile
|
from app.properties import Profile
|
||||||
from .uicommons import Gtk, Gdk, UI_RESOURCES_PATH, HIDE_ICON, TEXT_DOMAIN, CODED_ICON
|
from .uicommons import Gtk, Gdk, UI_RESOURCES_PATH, HIDE_ICON, TEXT_DOMAIN, CODED_ICON, Column
|
||||||
from .dialogs import show_dialog, DialogType, Action
|
from .dialogs import show_dialog, DialogType, Action
|
||||||
from .main_helper import get_base_model
|
from .main_helper import get_base_model
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ class ServiceDetailsDialog:
|
|||||||
if not itr:
|
if not itr:
|
||||||
return
|
return
|
||||||
|
|
||||||
srv = Service(*self._current_model[itr][:])
|
srv = Service(*self._current_model[itr][: Column.SRV_TOOLTIP])
|
||||||
self._old_service = srv
|
self._old_service = srv
|
||||||
self._current_itr = itr
|
self._current_itr = itr
|
||||||
# Service
|
# Service
|
||||||
@@ -197,7 +197,7 @@ class ServiceDetailsDialog:
|
|||||||
self.select_active_text(self._pol_combo_box, srv.pol)
|
self.select_active_text(self._pol_combo_box, srv.pol)
|
||||||
self.select_active_text(self._fec_combo_box, srv.fec)
|
self.select_active_text(self._fec_combo_box, srv.fec)
|
||||||
self.select_active_text(self._sys_combo_box, srv.system)
|
self.select_active_text(self._sys_combo_box, srv.system)
|
||||||
if tr_type in "tc" and self._profile is Profile.ENIGMA_2:
|
if tr_type and tr_type in "tc" and self._profile is Profile.ENIGMA_2:
|
||||||
self.update_ui_for_terrestrial()
|
self.update_ui_for_terrestrial()
|
||||||
else:
|
else:
|
||||||
self.set_sat_positions(srv.pos)
|
self.set_sat_positions(srv.pos)
|
||||||
|
|||||||
@@ -88,5 +88,46 @@ class BqGenType(Enum):
|
|||||||
EACH_TYPE = 5
|
EACH_TYPE = 5
|
||||||
|
|
||||||
|
|
||||||
|
class Column(Enum):
|
||||||
|
""" Column nums in the views """
|
||||||
|
# main view
|
||||||
|
SRV_CAS_FLAGS = 0
|
||||||
|
SRV_STANDARD = 1
|
||||||
|
SRV_CODED = 2
|
||||||
|
SRV_SERVICE = 3
|
||||||
|
SRV_LOCKED = 4
|
||||||
|
SRV_HIDE = 5
|
||||||
|
SRV_PACKAGE = 6
|
||||||
|
SRV_TYPE = 7
|
||||||
|
SRV_PICON = 8
|
||||||
|
SRV_PICON_ID = 9
|
||||||
|
SRV_SSID = 10
|
||||||
|
SRV_FREQ = 11
|
||||||
|
SRV_RATE = 12
|
||||||
|
SRV_POL = 13
|
||||||
|
SRV_FEC = 14
|
||||||
|
SRV_SYSTEM = 15
|
||||||
|
SRV_POS = 16
|
||||||
|
SRV_DATA_ID = 17
|
||||||
|
SRV_FAV_ID = 18
|
||||||
|
SRV_TRANSPONDER = 19
|
||||||
|
SRV_TOOLTIP = 20
|
||||||
|
SRV_BACKGROUND = 21
|
||||||
|
# fav view
|
||||||
|
FAV_NUM = 0
|
||||||
|
FAV_CODED = 1
|
||||||
|
FAV_SERVICE = 2
|
||||||
|
FAV_LOCKED = 3
|
||||||
|
FAV_HIDE = 4
|
||||||
|
FAV_TYPE = 5
|
||||||
|
FAV_POS = 6
|
||||||
|
FAV_ID = 7
|
||||||
|
FAV_PICON = 8
|
||||||
|
|
||||||
|
def __index__(self):
|
||||||
|
""" Overridden to get the index in slices directly """
|
||||||
|
return self.value
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user