トーテムノームアプレット

以前の投稿では、最も単純なGnomeパネルアプレットの作成について説明しました。 この投稿では、Totemビデオプレーヤーと対話するアプレットを紹介します。 このアプレットは4つのボタンと碑文を備えた小さなアプリケーションになり、ボタンには次の機能があります。再生、一時停止、前と次の再生。



アプレットコード:

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 )



  1. 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 )



  2. 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 )



  3. 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 )



  4. 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 )



  5. 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 )



  6. 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 )



  7. 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 )



  8. 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 )



  9. 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 )



  10. 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 )



  11. 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 )



  12. 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 )



  13. 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 )



  14. 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 )



  15. 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 )



  16. 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 )



  17. 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 )



  18. 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 )



  19. 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 )



  20. 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 )



  21. 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 )



  22. 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 )



  23. 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 )



  24. 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 )



  25. 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 )



  26. 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 )



  27. 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 )



  28. 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 )



  29. 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 )



  30. 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 )



  31. 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 )



  32. 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 )



  33. 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 )



  34. 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 )



  35. 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 )



  36. 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 )



  37. 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 )



  38. 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 )



  39. 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 )



  40. 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 )



  41. 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 )



  42. 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 )



  43. 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 )



  44. 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 )



  45. 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 )



  46. 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 )



  47. 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 )



  48. 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 )



  49. 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 )



  50. 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 )



  51. 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 )



  52. 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 )



  53. 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 )



  54. 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 )



  55. 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 )



  56. 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 )



  57. 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 )



  58. 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 )



  59. 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



  1. < oaf_info >
  2. < oaf_server iid = "OAFIID:GNOME_TotemApplet_Factory"
  3. タイプ = "exe" ロケーション = "/ home / totemapplet.py">
  4. < oaf_attribute name = "repo_ids" type = "stringv">
  5. < item value = "IDL:Bonobo / GenericFactory:1.0" />
  6. < item value = "IDL:Bonobo / Unknown:1.0" />
  7. </ oaf_attribute >
  8. < oaf_attribute name = "name" type = "string" value = "Totem Applet" />
  9. < oaf_attribute name = "description" type = "string" value = "Simple remote control" />
  10. </ oaf_server >
  11. < oaf_server iid = "OAFIID:GNOME_TotemApplet"
  12. タイプ =「工場」 ロケーション =「OAFIID:GNOME_TotemApplet_Factory」>
  13. < oaf_attribute name = "repo_ids" type = "stringv">
  14. < item value = "IDL:GNOME / Vertigo / PanelAppletShell:1.0" />
  15. < item value = "IDL:Bonobo / Control:1.0" />
  16. < item value = "IDL:Bonobo / Unknown:1.0" />
  17. </ oaf_attribute >
  18. < oaf_attribute name = "name" type = "string" value = "Totem Applet" />
  19. < oaf_attribute name = "description" type = "string" value = "Simple remote control" />
  20. < oaf_attribute name = "panel:category" type = "string" value = "Utility" />
  21. </ oaf_server >
  22. </ oaf_info >


上記を実行した後、以下を実行する必要があります。

.serverファイルを/ usr / lib / bonobo / servers /にコピーします: cp /home/totemapplet.server / usr / lib / bonobo / servers /

アプレットを実行可能にする: chmod + x totemapplet.py

パネルに追加してお楽しみください。



All Articles