python类main_quit()的实例源码

recipe-578774.py 文件源码 项目:code 作者: ActiveState 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def __init__(self):

        Gtk.Window.__init__(self, title='My Window Title')
        self.connect('delete-event', Gtk.main_quit)        

        store = Gtk.ListStore(str, str, str, str)
        self.populate_store(store)

        self.treeview = Gtk.TreeView(model=store)

        renderer = Gtk.CellRendererText()

        column_catalog = Gtk.TreeViewColumn('Catalog Name', renderer, text=0)
        column_catalog.set_sort_column_id(0)        
        self.treeview.append_column(column_catalog)

        column_dbname = Gtk.TreeViewColumn('Database Name', renderer, text=1)
        column_dbname.set_sort_column_id(1)
        self.treeview.append_column(column_dbname)

        column_charset = Gtk.TreeViewColumn('Character Set', renderer, text=2)
        column_charset.set_sort_column_id(2)
        self.treeview.append_column(column_charset)

        column_collation = Gtk.TreeViewColumn('Collation', renderer, text=3)
        column_collation.set_sort_column_id(3)
        self.treeview.append_column(column_collation)

        scrolled_window = Gtk.ScrolledWindow()
        scrolled_window.set_policy(
            Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
        scrolled_window.add(self.treeview)
        scrolled_window.set_min_content_height(200)

        self.add(scrolled_window)
        self.show_all()

    # Add data to ListStore
main.py 文件源码 项目:Chipote 作者: EIREXE 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def on_window_close(self, widget, what):
        Gtk.main_quit()
indicator-tablet-mode.py 文件源码 项目:indicator-tablet-mode 作者: Aerilius 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def quit(self):
    # Reset everything:
    set_onscreen_keyboard(False)
    set_keyboard(True)
    set_touchpad(True)
    set_rotation("normal")
    Gtk.main_quit()
meracomatic-gui.py 文件源码 项目:merac-o-matic 作者: RogueAI42 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def onDeleteWindow(self, *args):
        Gtk.main_quit(*args)
login_window.py 文件源码 项目:susi_linux 作者: fossasia 项目源码 文件源码 阅读 98 收藏 0 点赞 0 评论 0
def exit_window(self):
        self.window.destroy()
        Gtk.main_quit()
configuration_window.py 文件源码 项目:susi_linux 作者: fossasia 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def exit_window(self):
        self.window.destroy()
        Gtk.main_quit()
app_window.py 文件源码 项目:susi_linux 作者: fossasia 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def exit_window(self):
        self.window.destroy()
        Gtk.main_quit()
gui.py 文件源码 项目:Projects 作者: SilverLuke 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def stop(self, *args):
        self.pm.close()
        Gtk.main_quit()
data_structures.py 文件源码 项目:openanalysis 作者: OpenWeavers 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def on_stage_destroy(self, x):
        gtk.main_quit()
YubiGuard.py 文件源码 项目:YubiGuard 作者: pykong 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def quit(self, *arg):
        print('Quitting Gtk.')
        Gtk.main_quit()
P300Client.py 文件源码 项目:esys-pbi 作者: fsxfreak 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def signalInterrupt(self, selfnum, frame):
        self.dataThread.stop()
        io.savemat('p300Data_jct_2_17_10.mat', {'data' : self.dataThread.data, 'timestamps' : self.timestamps, 'markers' : self.markers})

        gtk.main_quit()
welcomeWindow.py 文件源码 项目:PyIDE 作者: raggesilver 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def __init__(self):
        super(WelcomeWindow, self).__init__()

        self.hb = Gtk.HeaderBar()
        self.hb.set_show_close_button(True)
        self.hb.set_title("Py IDE")
        self.set_titlebar(self.hb)

        self.currentPage = None
        self.hbButtons = []

        self.language = ''

        self.showHome()

        ##################################################################


        self.set_size_request(800, 400)
        self.set_resizable(False)

        self.loadSettings()

        self.connect('destroy', Gtk.main_quit)

        self.show_all()

        Gtk.main()
jcchess.py 文件源码 项目:jcchess 作者: johncheetham 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def quit(self):
        self.stopped = True
        self.quitting = True
        #engine.movenow()
        self.save_settings()
        gv.ucib.stop_engine()
        gv.uciw.stop_engine()
        Gtk.main_quit()
        return False
render.py 文件源码 项目:iutils 作者: inconvergent 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def __destroy(self,*args):

    from gi.repository import Gtk

    Gtk.main_quit(*args)
indicator.py 文件源码 项目:furi-kura 作者: benjamindean 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def quit(self, widget):
        if self.services['timeout']:
            GObject.source_remove(self.services['timeout'])
        os.unlink(self.cfg_cls.LOCKFILE)
        Gtk.main_quit()
gui_resolver.py 文件源码 项目:RetroArch-Playlists-Generator 作者: Kierek 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def on_window_delete_event(self, *args):
        Gtk.main_quit(*args)
mainloop_terminate_ctrl_c.py 文件源码 项目:scarlett_os 作者: bossjones 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def decorate_gtk_mainfunc(function):
    def decorated_function(*args, **kwargs):
        run_mainloop(function, Gtk.main_quit, None, *args, **kwargs)

    return decorated_function

# We could override Gtk.main_iteration and Gtk.main_iteration_do too,
# but that does not seem to be necessary (because they don't dispatch
# our event handler, but instead return; this means that the exception
# is raised anyways).
MainWindow.py 文件源码 项目:sbrick-controller 作者: wintersandroid 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def on_delete_window(self, *args):
        for ch in self.notebook.get_children():
            ch.disconnect_sbrick()
        Gtk.main_quit(*args)
gtk_ui.py 文件源码 项目:python-gui 作者: neovim 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def quit(self):
        """Exit the UI event loop."""
        GObject.idle_add(Gtk.main_quit)
ui.py 文件源码 项目:python-eduvpn-client 作者: eduvpn 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self):
        """setup UI thingies, don't do any fetching or DBus communication yet"""

        # minimal global state to pass around data between steps where otherwise difficult
        self.selected_meta = None
        self.prefix = get_prefix()
        self.builder = Gtk.Builder()
        for b in builder_files:
            p = os.path.join(self.prefix, 'share/eduvpn/builder', b)
            if not os.access(p, os.R_OK):
                logger.error("Can't find {}! That is quite an important file.".format(p))
                raise Exception
            self.builder.add_from_file(p)

        # the signals coming from the GTK ui
        handlers = {
            "delete_window": Gtk.main_quit,
            "add_config": self.add,
            "del_config": self.delete,
            "select_config": self.select,
            "connect_set": self.switched,
        }

        self.builder.connect_signals(handlers)
        self.window = self.builder.get_object('eduvpn-window')
        self.verifier = make_verifier(verify_key)
        self.window.set_position(Gtk.WindowPosition.CENTER)


问题


面经


文章

微信
公众号

扫码关注公众号