Changeset 780:1687ac1948d0 in hatta-dev for hatta_qticon.py
- Timestamp:
- 07/16/10 20:18:33 (22 months ago)
- Branch:
- default
- File:
-
- 1 edited
-
hatta_qticon.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hatta_qticon.py
r779 r780 39 39 from error_dialog import ErrorDialog 40 40 41 def module_path(): 42 """ This will get us the program's directory, 43 even if we are frozen using py2exe""" 44 45 if we_are_frozen(): 46 return os.path.dirname(unicode( 47 sys.executable, sys.getfilesystemencoding())) 48 49 return os.path.dirname(unicode(__file__, sys.getfilesystemencoding())) 50 51 41 52 def we_are_frozen(): 42 53 """Returns whether we are frozen via py2exe. … … 44 55 45 56 return hasattr(sys, "frozen") and sys.frozen == "windows_exe" 46 47 48 def module_path():49 """ This will get us the program's directory,50 even if we are frozen using py2exe"""51 52 if we_are_frozen():53 return os.path.dirname(unicode(54 sys.executable, sys.getfilesystemencoding()))55 56 return os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))57 58 57 59 58 class HattaThread(QThread): … … 278 277 # First setup tray icon and display inform user about starting 279 278 self.hatta_icon = QIcon(QPixmap( 280 self.dist_icon if os.path.isfile(self.dist_icon) else 279 self.dist_icon if os.path.isfile(self.dist_icon) else 281 280 self.debug_icon)) 282 281 self.menu = QMenu(QString(_(u'Hatta Wiki menu'))) … … 594 593 quote(error_dialog.get_bug_dump())) 595 594 webbrowser.open(link) 596 QApplication.exit()595 #QApplication.exit() 597 596 598 597 if __name__ == '__main__': … … 613 612 app = QApplication(sys.argv) 614 613 QApplication.setQuitOnLastWindowClosed(False) 615 error_dialog = ErrorDialog( )614 error_dialog = ErrorDialog(module_path()) 616 615 status_icon = HattaTrayIcon() 616 raise AttributeError("DUPA") 617 617 app.exec_() 618 618 except Exception as e:
Note: See TracChangeset
for help on using the changeset viewer.
