def __init__(self, uid, orient, height): awn.AppletSimple.__init__(self, uid, orient, height) self.icon = self.set_awn_icon('rtm', 'awn-rtm') self.title = awn.awn_title_get_default() self.dialog = awn.AppletDialog(self) # set up mozilla profile self.mo = gtkmozembed self.pref_path = os.path.join(os.path.expanduser('~'), ".config/awn/applets/rtm") self.prefs = self.pref_path + "/profile/prefs.js" if os.path.exists(self.prefs) == True: self.mo.set_profile_path(self.pref_path, "profile") else: self.mo.set_profile_path(self.pref_path, "profile") shutil.copy( os.path.abspath(os.path.dirname(__file__)) + "/prefs.js", self.prefs) # set up gtkmozembed widget self.moz = self.mo.MozEmbed() pad = gtk.Alignment() pad.add(self.moz) self.moz.set_size_request(250, 350) self.moz.load_url( 'http://www.rememberthemilk.com/services/modules/googleig/') pad.show_all() self.dialog.add(pad) self.showing_dlog = False self.connect("button-press-event", self.button_press) self.connect("enter-notify-event", self.enter_notify) self.connect("leave-notify-event", self.leave_notify) self.dialog.props.hide_on_unfocus = True
def __init__ (self, uid, orient, height): awn.AppletSimple.__init__ (self, uid, orient, height) self.icon = self.set_awn_icon('rtm', 'awn-rtm') self.title = awn.awn_title_get_default () self.dialog = awn.AppletDialog (self) # set up mozilla profile self.mo = gtkmozembed; self.pref_path = os.path.join(os.path.expanduser('~'), ".config/awn/applets/rtm") self.prefs = self.pref_path + "/profile/prefs.js" if os.path.exists(self.prefs) == True: self.mo.set_profile_path(self.pref_path, "profile") else: self.mo.set_profile_path(self.pref_path, "profile") shutil.copy(os.path.abspath(os.path.dirname(__file__)) + "/prefs.js", self.prefs) # set up gtkmozembed widget self.moz = self.mo.MozEmbed() pad = gtk.Alignment() pad.add(self.moz) self.moz.set_size_request(250, 350) self.moz.load_url('http://www.rememberthemilk.com/services/modules/googleig/') pad.show_all() self.dialog.add(pad) self.showing_dlog = False self.connect ("button-press-event", self.button_press) self.connect ("enter-notify-event", self.enter_notify) self.connect ("leave-notify-event", self.leave_notify) self.dialog.props.hide_on_unfocus = True
def __init__ (self, uid, orient, height): awn.AppletSimple.__init__ (self, uid, orient, height) self.drawPWDlog() theme = gtk.icon_theme_get_default() icon = theme.load_icon ("stock_mail-reply", height, 0) #icon = gdk.pixbuf_new_from_file ("/home/njp/Projects/test.png") self.set_icon (icon) self.title = awn.awn_title_get_default () self.dialog = awn.AppletDialog (self) self.connect ("button-press-event", self.button_press) self.connect ("enter-notify-event", self.enter_notify) self.connect ("leave-notify-event", self.leave_notify) self.pwDialog.connect ("focus-out-event", self.pw_dialog_focus_out) self.dialog.connect ("focus-out-event", self.dialog_focus_out) # Show PWD/Mail dlog self.showDlog = lambda: self.pwDialog.show_all()
def __init__(self, uid, orient, height): awn.AppletSimple.__init__(self, uid, orient, height) self.drawPWDlog() theme = gtk.icon_theme_get_default() icon = theme.load_icon("stock_mail-reply", height, 0) #icon = gdk.pixbuf_new_from_file ("/home/njp/Projects/test.png") self.set_icon(icon) self.title = awn.awn_title_get_default() self.dialog = awn.AppletDialog(self) self.connect("button-press-event", self.button_press) self.connect("enter-notify-event", self.enter_notify) self.connect("leave-notify-event", self.leave_notify) self.pwDialog.connect("focus-out-event", self.pw_dialog_focus_out) self.dialog.connect("focus-out-event", self.dialog_focus_out) # Show PWD/Mail dlog self.showDlog = lambda: self.pwDialog.show_all()