[v0.3] NEW Plug-in: DialogMaster (dialog filter / controller / logger)

  • This very small plug-in is designed for controlling the MessageBox flow that is coming from Enigma2. Dialogs can be filtered and modified as they are being opened. If there is a popup dialog that you really don't want to see, this is your plug-in.. MessageBox events can also be logged so the user can check out what has actually happened on the Dreambox during a time period.


    Usage
    - When you see an annoying MessageBox -> press menu while it's still open
    - You will be greeted with a tiny config window with filtering and other options
    - Edit the filter string to remove any service specific text
    - Set the other options to your liking and press Save
    - The general configuration options can accessed via the plug-ins menu


    This is how the log file looks like:

    Code
    20090422 00:39 If you see this, something is wrong with your scart connection. Press OK to return.
    20090422 01:03 A record has been started: Willard (K15) 
    20090422 01:03 Stop ongoing recording? 20090422 0103 - TV2 - Willard (K15)
    20090422 01:03 Delete?  20090422 0103 - TV2 - Willard (K15) 
    20090422 04:05 Suomipoeka Enigma2 auto-restart launching, continue? Select no to postpone by one hour.

    TODO
    - Show the menu button icon below the message button icon, anybody got any ideas how to do this? :)


    :469:NOTE: This plugin does not overwrite any Enigma2 files.


    DOWNLOAD

  • Just noticed that pressing menu on a dialog that contains e.g. scandinavian letters (ä,ö,å) causes Enigma2 to crash since the whole string is set into the title field of the filter config window.


    So try to avoid configuring dialogs with exotic characters in the string... I'll post a fixed release at some point.

  • Ok.. Fixed the Enigma2 crash by setting a static title for the New Filter -editor.. Added support for viewing the logged messages and creating filters from the log view.

  • This version allows closing YES/NO dialogs with chosen selection. There are now also two different methods of hiding dialogs. A dialog can be either hidden or blocked. Hidden dialogs will remain "open" until closed by the timeout (or remote control action EXIT/OK/RED/GREEN). Blocked dialogs will be closed immediately with the given selection.


    WARNING:
    The "A record has been started" -dialog cannot be blocked or hidden with a timeout less than 2 seconds. This is because of a possible Enigma2 bug that causes a modal crash when selecting "Add recordind (enter recording duration)". For this you should use Hide and a 2 seconds timeout.



    I tried adding the menu button icon to the captured MessageBox instance but it seemed quite impossible to do.. At least with ePicload it just didn't seem to be possible to change the layout of the screen. If anyone has a good idea how to do this I'd like to hear it.

  • Der Ausschalttimer fährt die Box mit aktuelem Oozoon nicht herunter. Gleiches hatte ich nach Aufnahmen (die Box herunterfahren als Aktion haben) bemerkt. Auch das Schalten in den Standby Modus funktioniert nicht: Das Hinweis-Fenster erscheint, doch keine Reaktion nach Ablauf der 20 Sekunden, ob wohl als default Ja angegeben ist.


    Hatte den dialogmaster installiert, aber noch keine Aktionen konfiguriert. Nach Deinstallation funktioniert der Ausschalttimer wieder.


    Hat jemand ähnliche Erfahrungen?

    Wir haben alle den gleichen Himmel, aber nicht alle den gleichen Horizont. *** DM8000 - OE2.0+GP3.2

  • I found out that DialogMaster has a very bad bug:


    By default when you have a Messagebox of TYPE_YESNO with a timeout, then after timeout it gives you the result passed in as default.


    If default is True, then after the timeout Tue should be returned.
    If default is False, then after the timeout False should be returned.


    This Plugin always returns "False" as it calls the Cancel- Method of Messagebox after the Timeout instead of returning the default- value.


    The error is in line 237, where selc.close is set as timeoutCallback instead of using "ok"...


    By the way: The line 236 will cause unexpected results as well...


    The plugin assumes, that Messagebox will return "True", when self.ok is called and return "False" when self.cancel is called.


    The first assumption is false: ok does NOT always return TRUE, but it returns "False", if default = False


    The second assumption is right, as cancel always returns false, but it nevertheless does something wrong:
    If there is no configuration for a special Dialog, a User would assume, that the dialog behaves as if DialogMaster was not installed.
    But DialogMaster instead changes the behaviour from calling the OK- method and checking what to deliver back (the default value) to calling the Cancel- method...


    Please fix this bugs



    Best regards
    Tode


    P.S.: I attached a Version of plugin.py (untested), that should fix this problem:
    It sets self.yesclose to None in line 215 and adds a
    if self.yesclose != None:
    before the self.yesclose:
    And it changes the self.ok to self.alwaysOK in line 237 to get the expected alyways True.


    Now if there is no configuration for a specific Messagebox, then the default- behaviour is maintained...


    HTH
    Tode


    EDIT: I attached a diff- file... This is my first try for a diff- file (created with GnuWin32 Diff- utils), hope it has the correct format...
    EDIT2: I attached a diff- file in unified- format as well, as this looks more like the ones I know from enigma2- Sources

  • FYI: I tested my patch, it works for me...


    KiddyTimer now does what it should again, when timeout is over...


    Regards
    Tode

  • Thanks for the patch, seems to work fine...


    I also did some cosmetic changes (the gui always looked wrong in german) and combined both in the attached file...


    For User: just replace the plugin.py in


    /usr/lib/enigma2/python/Plugins/Extensions/DialogMaster/plugin.py


    by ftp (or dcc) with the attached one and reboot


    For suomipoeka: please update the ipk file on your homepage if you like

  • english:
    As i did not get an reply from suomipoeka (not by mail or PM) i decided to make an updated ipk.


    Just install it as usual and the fixes should be inkluded...


    german: weil ich keine antwort von suomipoeka bekommen habe habe ich mich dazu entschieden selbst ein aktualisiertes ipk file zu erstellen...


    Einfach auf dem üblichen weg installieren und die erwähnten korrekturen sollten eingespielt werden....

  • Falls dieses Plugin "enigma2-plugin-extensions-dialogmaster_0.3-r1_all.ipk" bei OE2 installiert wird, dann startet meine DM8000 nur noch mit einem Greenscreen in einer Dauerschleife. Abhilfe nur wenn man sich per telnet verbindet und dieses plugn wieder manuell deinstalliert.


    Der andere Download-Link funktioniert nicht mehr mit:
    http://koti.mbnet.fi/devnull/suomipoeka/dialogmaster/


    Existiert etwas lauffähiges für OE2?

  • Ich arbeite gerade an einem thematisch ähnlichem Plugin (für Notifications). Möglicherweise würde ich die sourcen inkludieren.
    Könntest du den crashlog posten, damit ich abschätzen kann wieviel Aufwand eine Korrektur wäre?