Re: Install Fedora Button for LiveCD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-04-19 at 16:24 -0600, Chris Murphy wrote:

> That is obscure UI design, and therefore doesn't resolve the current
> UI obscurity. So I see very little efficacy in the idea. 

To contribute something positive here, I went ahead and implemented the
'oscurity'. See attached. As an extra win, it only needs 30 lines of
code, compared to Kamils 60.

Of course, neither the extension nor the notification have any
translations, so they are not really suitable for including as-is in
F17.

Matthias
#!/usr/bin/env python

import pynotify
import sys
import os
import glib

def install_cb(n, action):
   assert action == "install"
   n.close()
   os.execlp("liveinst", "liveinst")

if __name__ == '__main__':
    if not pynotify.init("Install Fedora"):
        sys.exit(1)

    n = pynotify.Notification("Install Fedora",
        "You are currently using an uninstalled live image.\n" +
        "If you want to keep using Fedora, you can install " +
        "it to your hard disk.",
        "anaconda");

    n.add_action("install", "Install", install_cb)
    n.set_hint("resident", True)

    if not n.show():
        print "Failed to send notification"
        sys.exit(1)

    glib.MainLoop().run()
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux