アプレットコード:
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
Copy Source | Copy HTML #!/usr/bin/env python import sys import gtk import pygtk import subprocess import gnomeapplet def factory (applet, iid): button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-previous" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , previous_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-play" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , play_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-pause" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , pause_clicked ) hbox.add(button) button = gtk.Button( "" ) image = gtk.Image() image.set_from_stock( "gtk-media-next" ,gtk.ICON_SIZE_BUTTON) button.set_image(image) button.connect( "clicked" , next_clicked ) hbox.add(button) hbox = gtk.HBox() label = gtk.Label( "Gnome player:" ) hbox.add(label) applet.add(hbox) applet.show_all() return True def previous_clicked (event): subprocess .Popen(( "totem" , "--previous" )) def play_clicked (event): subprocess .Popen(( "totem" , "--play" )) def pause_clicked (event): subprocess .Popen(( "totem" , "--pause" )) def next_clicked (event): subprocess .Popen(( "totem" , "--next" )) if len ( sys .argv) == 2 : if sys .argv[ 1 ] == "run-in-window" : main_window = gtk.Window(gtk.WINDOW_TOPLEVEL) main_window.set_title( "Totem Applet" ) main_window.connect( "destroy" , gtk.main_quit) app = gnomeapplet.Applet() factory (app, None) app.reparent(main_window) main_window.show_all() gtk.main() sys .exit() gnomeapplet.bonobo_factory( "OAFIID:GNOME_TotemApplet_Factory" , gnomeapplet.Applet.__gtype__, "simple remote control" , "1.0" , factory )
ここには、すべての要素のコンテナがあります-碑文ラベルを含むHBox、および4つのボタン-ボタン-再生、一時停止など コンテナの説明の後に4つのイベントの説明が続きます-ボタンのクリック、ウィンドウの説明、アプレットの直接登録。
.Serverファイル:
Copy Source | Copy HTML
- < oaf_info >
- < oaf_server iid = "OAFIID:GNOME_TotemApplet_Factory"
- タイプ = "exe" ロケーション = "/ home / totemapplet.py">
- < oaf_attribute name = "repo_ids" type = "stringv">
- < item value = "IDL:Bonobo / GenericFactory:1.0" />
- < item value = "IDL:Bonobo / Unknown:1.0" />
- </ oaf_attribute >
- < oaf_attribute name = "name" type = "string" value = "Totem Applet" />
- < oaf_attribute name = "description" type = "string" value = "Simple remote control" />
- </ oaf_server >
- < oaf_server iid = "OAFIID:GNOME_TotemApplet"
- タイプ =「工場」 ロケーション =「OAFIID:GNOME_TotemApplet_Factory」>
- < oaf_attribute name = "repo_ids" type = "stringv">
- < item value = "IDL:GNOME / Vertigo / PanelAppletShell:1.0" />
- < item value = "IDL:Bonobo / Control:1.0" />
- < item value = "IDL:Bonobo / Unknown:1.0" />
- </ oaf_attribute >
- < oaf_attribute name = "name" type = "string" value = "Totem Applet" />
- < oaf_attribute name = "description" type = "string" value = "Simple remote control" />
- < oaf_attribute name = "panel:category" type = "string" value = "Utility" />
- </ oaf_server >
- </ oaf_info >
上記を実行した後、以下を実行する必要があります。
.serverファイルを/ usr / lib / bonobo / servers /にコピーします: cp /home/totemapplet.server / usr / lib / bonobo / servers /
アプレットを実行可能にする: chmod + x totemapplet.py
パネルに追加してお楽しみください。