def __init__(self, **kwds):
     self._ns_app = Globals.ns_application
     self._ns_app.pygui_app = self
     self._ns_pasteboard = NSPasteboard.generalPasteboard()
     self._ns_key_window = None
     GApplication.__init__(self, **kwds)
     self.ns_init_application_name()
Example #2
0
 def __init__(self, **kwds):
     self._ns_app = Globals.ns_application
     self._ns_app.pygui_app = self
     self._ns_pasteboard = NSPasteboard.generalPasteboard()
     self._ns_key_window = None
     GApplication.__init__(self, **kwds)
     self.ns_init_application_name()
Example #3
0
 def destroy(self):
     del self.menus[:]
     import Windows
     Windows._ns_zombie_window = None
     self._ns_app.pygui_app = None
     self._ns_app = None
     self._ns_pasteboard = None
     GApplication.destroy(self)
 def destroy(self):
     del self.menus[:]
     import Windows
     Windows._ns_zombie_window = None
     self._ns_app.pygui_app = None
     self._ns_app = None
     self._ns_pasteboard = None
     GApplication.destroy(self)
Example #5
0
 def process_args(self, args):
     #  Note: When using py2app, argv_emulation should be disabled.
     if args and args[0].startswith("-psn"):
         # Launched from MacOSX Finder -- wait for file open/app launch messages
         pass
     else:
         # Not launched from Finder or using argv emulation
         self._ns_using_clargs = True
         GApplication.process_args(self, args)
 def process_args(self, args):
     #  Note: When using py2app, argv_emulation should be disabled.
     if args and args[0].startswith("-psn"):
         # Launched from MacOSX Finder -- wait for file open/app launch messages
         pass
     else:
         # Not launched from Finder or using argv emulation
         self._ns_using_clargs = True
         GApplication.process_args(self, args)
 def run(self, fast_exit = True):
     try:
         GApplication.run(self)
     except (KeyboardInterrupt, SystemExit):
         pass
     except:
         traceback.print_exc()
     #  A py2app bundled application seems to crash on exit if we don't
     #  bail out really quickly here (Python 2.3, PyObjC 1.3.7, py2app 0.2.1,
     #  MacOSX 10.4.4)
     if fast_exit:
         os._exit(0)
Example #8
0
 def run(self, fast_exit=True):
     try:
         GApplication.run(self)
     except (KeyboardInterrupt, SystemExit):
         pass
     except:
         traceback.print_exc()
     #  A py2app bundled application seems to crash on exit if we don't
     #  bail out really quickly here (Python 2.3, PyObjC 1.3.7, py2app 0.2.1,
     #  MacOSX 10.4.4)
     if fast_exit:
         os._exit(0)
Example #9
0
 def setup_menus(self, m):
     m.hide_app_cmd.enabled = True
     m.hide_other_apps_cmd.enabled = True
     m.show_all_apps_cmd.enabled = True
     if not self._ns_app.modalWindow():
         GApplication.setup_menus(self, m)
Example #10
0
 def set_menus(self, menu_list):
     GApplication.set_menus(self, menu_list)
     for window in self._windows:
         window._gtk_update_menubar()
Example #11
0
 def run(self):
     GApplication.run(self)
Example #12
0
 def set_menus(self, x):
     #print "Application.set_menus" ###
     GApplication.set_menus(self, x)
     for window in self.windows:
         window._win_menus_changed()
 def set_menus(self, x):
     #print "Application.set_menus" ###
     GApplication.set_menus(self, x)
     for window in self.windows:
         window._win_menus_changed()
 def run(self):
     GApplication.run(self)
 def set_menus(self, menu_list):
     GApplication.set_menus(self, menu_list)
     self._update_menubar()
 def setup_menus(self, m):
     m.hide_app_cmd.enabled = True
     m.hide_other_apps_cmd.enabled = True
     m.show_all_apps_cmd.enabled = True
     if not self._ns_app.modalWindow():
         GApplication.setup_menus(self, m)
 def set_menus(self, menu_list):
     GApplication.set_menus(self, menu_list)
     for window in self._windows:
         window._gtk_update_menubar()
Example #18
0
 def __init__(self, *args, **kwds):
     self._win_recycle_list = []
     self._win_app = ui.GetApp()
     self._win_app.AttachObject(self)
     self._win_app.SetMainFrame(WinUtils.win_none)
     GApplication.__init__(self, *args, **kwds)
Example #19
0
 def set_menus(self, menu_list):
     GApplication.set_menus(self, menu_list)
     self._update_menubar()
 def __init__(self, *args, **kwds):
     self._win_recycle_list = []
     self._win_app = ui.GetApp()
     self._win_app.AttachObject(self)
     self._win_app.SetMainFrame(WinUtils.win_none)
     GApplication.__init__(self, *args, **kwds)