Re: GTK+ Application class
- From: Murray Cumming <murrayc murrayc com>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: GTK Development List <gtk-devel-list gnome org>
- Subject: Re: GTK+ Application class
- Date: Wed, 25 Oct 2006 18:36:47 +0200
On Wed, 2006-10-25 at 16:03 +0200, Rodrigo Moya wrote:
> so, who would be calling those vfuncs? Gtkapplication internals? If
> so,
> how? Since below you say the app is responsible for creating the UI,
> how
> does Gtkapplication know Open/Close/Save have been selected?
You can have default handlers (even if you have to connect those
handlers yourself) for Open/Close/Save/SaveAs etc that just do
everything in terms of the generic vfuncs, without us having to
constantly reimplement the same logic.
Here are just a few of the those things:
- Show the file open dialog, and handle all the possible responses, load
the document and handle any errors, warning the user.
- Show the file save dialog, setting the modified status of the
document, and indicating that in the titlebar or document menu, handling
errors such as saving to read-only files or directories.
- Warn about saving changes when closing.
There's a lot of this stuff. We reimplement it again and again,
introducing far too many unnecessary bugs and inconsistencies, and
wasting too much time doing it. We don't even have to do everything at
once - we can try to abstract the most simple stuff at first.
This can be simplified. I know because I've done it in Bakery for C++.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]