Shell Edit continued...

"Oliver Giesen" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.gui.devel
Message-ID <017001c3d273$bfd22c40$fe78a8c0@g01>
I have now continued work on the shell edit patch and completed some of the
todo items:

> - rename ShellFileAction to ShellAction

Done.


> - change result type of ShellAction (and consequently the parameter of
> ShellActionSucceeded) from HINSTANCE to UINT (or long or whatever is
> generic enough to be useful for all platforms)

Done (UINT).


> - move ShellAction and ShellActionSucceeded to somewhere that's
> available to all platforms

Not yet done. Still waiting for input. CvsCommands would seem OK to me for
that purpose, at least judging by what else is already there (that could of
course also be misplaced). Right now it's still in wincvs_winutils which is
obviously inappropriate for a supposed cross-platform function.


> - add platform ifdefs to ShellActionSucceeded implementation

Done (though naturally still empty for *ix and Mac).


> - add LaunchType enumeration (edit, defaultedit, open, openas)

Done (kLaunchType).


> - merge LaunchEditor and LaunchViewer and augment the resulting function
> with parameter of abovementioned LaunchType type

Done (bool LaunchHandler(const char* filePath, const kLaunchType
launchType)). This obviously breaks/erases most of Jens' recent Mac
additions. As LaunchHandler itself is pretty much void of platform-specific
code after my patch, that stuff should probably move to an ifdef inside the
new ShellAction function (see above).


> [- add ShellActionType enumeration for different shell actions (default,
> open, edit, openas, explore) and change the "verb" parameter of
> ShellAction into a parameter of that type]

Done (kShellActionType).


Now, what I'm concerned about after some tests, is that changing the Open
behaviour to "open" explicitly (as Jerzy proposed - before it used the
empty/default action) causes the "Open as" dialog to be brought up much more
often than necessary. Just as an example, Visual C++ itself does create
neither "edit" nor "open" associations for C/C++ source files (that's how
consistently MS uses its own standards!). It only creates one custom action
named "Open with MSDev" which is not picked up by my new mechanism at all. I
think this latter part at least should be changed back to the old behaviour
(a middle-ground solution would probably be to try "open" first, then
default and only if that also fails "openas").

Also, there really don't seem to be too many applications that create
default "edit" associations for their respective files on installation, so
most of the time you will intially end up with the default editor being
opened instead of the associated app... we'll have to see how users take
that as that will be a highly visible change in behaviour indeed and it will
not at all be obvious what to do about it. The best solution would probably
be some kind of popup (with a "don't show again" checkbox ;) ) with an
explanatory text whenever a file is double-clicked/opened via "Edit
selection".

...talking of which... I just realized we need to come up with another label
for that latter one as well. Having two totally different "Edit selection"
menu items around certainly won't help UI unambiguity... I haven't really
been able to come up with something that's snappy enough to be placed on a
menu yet (stuff like "Edit selection with associated editor application"
obviously won't do ;) ).

I also haven't been able to resolve the menu/shortcut problems so far:

- the new items won't show up in the context menu.
- executing commands with Enter in the console pane no longer works

Any hints on how to overcome that?

I'm still doing some cleanup work at the moment. I'll post another
intermediate patch as soon as that's done (hopefully about this time
tomorrow) so you could properly see what I'm talking about.

Cheers and happy new year to y'all!

Oliver
----  ------------------
JID:  [email protected]
ICQ:  18777742     (http://wwp.icq.com/18777742)


 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/cvsgui-dev/

To unsubscribe from this group, send an email to:
 [email protected]

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.