On Monday, 5 August 2013, Manuel Quiñones  wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
In shell Activity.close(), to do the close directly if it is not a web<br>
activity.  If it is a web activity, emit the signal.  You said:<br>
<br>
> call get_window().close() only if the signal didn't return True<br>
<br>
but I would add: "or if it is not a web activity"<br>
</blockquote><div><br></div><div>For non-web activities nothing will connect to the signal and no value will be returned. I don't know very well how signal accumulators works in glib but I suspect emit will just return None if no signal has been connected. So emit would return True for web activities and None for gtk activities and you would close the window only when None is returned. This pattern is similar to delete_event in gtk, it gives a chance to some other code to handle the event, and fallback to a default implementation if nothing does.<span></span></div>
<br><br>-- <br>Daniel Narvaez<br><br>