#test python code for gdk scroll direction #--
#!/usr/bin/python from gi.repository import Gtk, Gdk, AppIndicator3
if __name__ == "__main__": menu = Gtk.Menu() quit = Gtk.MenuItem("Quit") quit.connect("activate", Gtk.main_quit) menu.append(quit) menu.show_all()
def scroll(ind, steps, direction): print steps, direction if direction != Gdk.ScrollDirection.UP: print "Things seem ok"
indicator = AppIndicator3.Indicator.new('testscroll', '', AppIndicator3.IndicatorCategory.APPLICATION_STATUS) indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE) indicator.set_icon("/usr/share/pixmaps/firefox.png") indicator.connect("scroll-event", scroll) indicator.set_menu(menu) Gtk.main()
#test python code for gdk scroll direction
#--
#!/usr/bin/python
from gi.repository import Gtk, Gdk, AppIndicator3
if __name__ == "__main__": "Quit") connect( "activate" , Gtk.main_quit) append( quit)
menu = Gtk.Menu()
quit = Gtk.MenuItem(
quit.
menu.
menu.show_all()
def scroll(ind, steps, direction): tion.UP:
print steps, direction
if direction != Gdk.ScrollDirec
print "Things seem ok"
indicator = AppIndicator3. Indicator. new('testscroll ', '', IndicatorCatego ry.APPLICATION_ STATUS) set_status( AppIndicator3. IndicatorStatus .ACTIVE) set_icon( "/usr/share/ pixmaps/ firefox. png") connect( "scroll- event", scroll) set_menu( menu)
AppIndicator3.
indicator.
indicator.
indicator.
indicator.
Gtk.main()