Exemple #1
0
def startup_notification(name, desc=None, bin_name=None, icon=None):
    dpy = gtk.gdk.display_get_default()
    screen = dpy.get_default_screen().get_number()
    sn = sn_launcher(dpy, screen)
    sn.set_name(name)

    if bin_name:
        sn.set_binary_name(bin_name)
    if icon:
        sn.set_icon_name(icon)

    if desc:
        sn.set_description(desc)

    sn.initiate("", "", gtk.get_current_event_time())

    return sn
Exemple #2
0
def startup_notification(name, desc=None, bin_name=None, icon=None):
    dpy = gtk.gdk.display_get_default()
    screen = dpy.get_default_screen().get_number()
    sn = sn_launcher(dpy, screen)
    sn.set_name(name)

    if bin_name:
        sn.set_binary_name(bin_name)
    if icon:
        sn.set_icon_name(icon)

    if desc:
        sn.set_description(desc)

    sn.initiate("", "", gtk.get_current_event_time())

    return sn
Exemple #3
0
def startup_notification(name, desc=None, bin_name=None, icon=None):
    dpy = Gdk.Display.get_default()
    #FIXME this will work with GTK3
    #screen = dpy.get_default_screen().get_number()
    screen = Gdk.Screen.get_default().get_number()
    sn = sn_launcher(dpy, screen)
    sn.set_name(name)

    if bin_name:
        sn.set_binary_name(bin_name.encode('UTF-8'))
    if icon:
        sn.set_icon_name(icon.encode('UTF-8'))

    if desc:
        sn.set_description(desc.encode('UTF-8'))

    sn.initiate("", "", Gtk.get_current_event_time())

    return sn
Exemple #4
0
def startup_notification(name, desc=None, bin_name=None, icon=None):
    dpy = Gdk.Display.get_default()
    #FIXME this will work with GTK3
    #screen = dpy.get_default_screen().get_number()
    screen = Gdk.Screen.get_default().get_number()
    sn = sn_launcher(dpy, screen)
    sn.set_name(name)

    if bin_name:
        sn.set_binary_name(bin_name.encode('UTF-8'))
    if icon:
        sn.set_icon_name(icon.encode('UTF-8'))

    if desc:
        sn.set_description(desc.encode('UTF-8'))

    sn.initiate("", "", Gtk.get_current_event_time())

    return sn