Re: [patch] context-sensitive save and export actions
David Malcolm <[email protected]>
| Newsgroups | gmane.editors.conglomerate.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2004-10-18 at 18:46 -0400, Douglas Burke wrote: > This is a re-worked version of my previous patch that makes the Save > action (ie menu item and toolbar icon) insensitive if Conglomerate thinks > the document is unchanged. Improvements are: Committed to HEAD - thanks > > - the state is changed via a function call now rather than a macro. > The functions are cong_primary_window_action_set_sensitive() and > cong_primary_window_action_set_label(). I ended up with these names > since they are sent a CongPrimaryWindow as the first argument, but > I also thought about them being called cong_menus* or cong_ui* > > - The "Export" action is now also made inactive if the document does > not have any registered documents. This meant I could remove an > error dialog from cong-file-export.c > > I thought about checking for whether there are any importers register and, > if not, making the Import item insensitive. However, aren't we know > guaranteed there will be at least one importer plugin (as Conglomerate > comes with several), so we can always assume the Import action is valid? > > Doug