diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 2490ad91..bee81aaf 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -116,13 +116,13 @@ class Hud: return True return False - def kill_hud(self, args): + def kill_hud(self, *args): for k in self.stat_windows.keys(): self.stat_windows[k].window.destroy() self.main_window.destroy() self.deleted = True - def reposition_windows(self, args): + def reposition_windows(self, *args): for w in self.stat_windows: self.stat_windows[w].window.move(self.stat_windows[w].x, self.stat_windows[w].y) @@ -259,7 +259,8 @@ class Stat_Window: # This handles all callbacks from button presses on the event boxes in # the stat windows. There is a bit of an ugly kludge to separate single- # and double-clicks. - if event.button == 1: # left button event + + if event.button == 3: # right button event if event.type == gtk.gdk.BUTTON_PRESS: # left button single click if self.sb_click > 0: return self.sb_click = gobject.timeout_add(250, self.single_click, widget) @@ -270,12 +271,14 @@ class Stat_Window: self.double_click(widget, event, *args) if event.button == 2: # middle button event - pass # print "middle button clicked" - - if event.button == 3: # right button event pass -# print "right button clicked" + + if event.button == 1: # left button event + if event.state & gtk.gdk.SHIFT_MASK: + self.window.begin_resize_drag(gtk.gdk.WINDOW_EDGE_SOUTH_EAST, event.button, int(event.x_root), int(event.y_root), event.time) + else: + self.window.begin_move_drag(event.button, int(event.x_root), int(event.y_root), event.time) def single_click(self, widget): # Callback from the timeout in the single-click finding part of the @@ -349,8 +352,9 @@ class Stat_Window: # font = pango.FontDescription("Sans 8") self.label[r][c].modify_font(font) - if not os.name == 'nt': # seems to be a bug in opacity on windows - self.window.set_opacity(parent.colors['hudopacity']) +# if not os.name == 'nt': # seems to be a bug in opacity on windows + self.window.set_opacity(parent.colors['hudopacity']) + self.window.realize self.window.move(self.x, self.y) self.window.show_all() @@ -457,7 +461,7 @@ class Popup_window: self.lab.set_text(pu_text) self.window.show_all() - self.window.set_transient_for(stat_window.main_window) + self.window.set_transient_for(stat_window.window) # set_keep_above(1) for windows if os.name == 'nt': self.topify_window(self.window)