9 |
# You should have received a copy of the GNU General Public License |
# You should have received a copy of the GNU General Public License |
10 |
# along with the program; if not, write to the Free Software |
# along with the program; if not, write to the Free Software |
11 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
12 |
|
# |
13 |
|
# $Id$ |
14 |
|
|
15 |
__author__ = "Brian Skahan <bskahan@etria.org>" |
__author__ = "Brian Skahan <bskahan@etria.org>" |
16 |
__date__ = "Wed Nov 06 2002" |
__date__ = "Wed Nov 06 2002" |
17 |
__version__ = "$Revision$" |
__version__ = "$Revision$" |
|
# $Id$ |
|
18 |
|
|
19 |
import os |
import os |
20 |
import string |
import string |
43 |
|
|
44 |
def handle_event(self,event): |
def handle_event(self,event): |
45 |
if event.type == X.ButtonPress: |
if event.type == X.ButtonPress: |
46 |
|
self.load_menu() |
47 |
|
if __debug__: |
48 |
|
print "Menu events: ", self.my_events |
49 |
|
print "buttons: ", self.buttons |
50 |
|
print "modifiers: ", self.modifiers |
51 |
if __debug__: |
if __debug__: |
52 |
print "Menus got X.ButtonPress", event.state, event.detail |
print "Menus got X.ButtonPress", event.state, event.detail |
53 |
print "at ", event.root_x, "x", event.root_y |
print "at ", event.root_x, "x", event.root_y |
64 |
if self.config.has_section("menu"): |
if self.config.has_section("menu"): |
65 |
menu_dict = self.config.options("menu") |
menu_dict = self.config.options("menu") |
66 |
else: |
else: |
67 |
menu_dict = default_menu |
menu_dict = self.default_menu |
68 |
|
|
69 |
if __debug__: |
if __debug__: |
70 |
print menu_dict |
print menu_dict |
71 |
|
|
|
load_menu(self) |
|
|
if __debug__: |
|
|
print "Menu events: ", my_events |
|
|
print "buttons: ", buttons |
|
|
print "modifiers: ", modifiers |
|
|
|
|
|
|
|
|
|
|
72 |
|
|
73 |
|
|
74 |
|
|