English 中文(简体)
粉碎机不能在双赢32时通过删除活动退出。
原标题:pygtk app does not exit via delete event on win32

我在窗户和坡道上有一只 p子。 主要全球倡议已经关闭了从删除活动(用户在窗户上点击Xhton)或从菜单“FLE->”上调的功能;

守则对此视而不见。

def close_down(self):
    self.hide_gui()
    #do some cleanup stuff here, close down a log file etc...
    gtk.main_quit()

def on_close_down_activate(self, widget):  # From menu
    self.close_down()
    print("Closed")

def on_main_gui_delete_event(self, window, event): # From window X button
    self.close_down()
    print("Closed")

但是,当用户在窗户上点击X纽吨时,“封闭”一词被印制到细线上,但 app却永远不能控制碎线,除非我通过任务主管杀死 p。 如果用户从文档菜单中选择基特,则将“封闭”一词改为“控制”平线。

在北草坪,它按预期行事。 窗户上的gt是否保持了某些东西?

问题回答

To close an application in PyGTK, you actually need two lines of code, not just one. My guess is that, in Linux, the window is closing, but the process is not. In Windows, nothing is closing.

为了确定这一点,仅添加以下几行:“格.main_quit()”

return False

该守则的理由是,在PyGTK中,你能够利用这一渠道创建“你确保你想要放弃吗?”方言。 如果“恢复真实”,方案就根本不会结束。





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签