Re: help wanted, trying out a few ideas for post 0.94



On Fri, 2004-07-16 at 01:00, Alan Horkan wrote:
since Dia compiled so nicely I've been trying out a few ideas
some of which are simple and others that I haven't got working yet but I
would appreciate help with (help, advice towards figuring it out myself
as much as possible)

http://www.maths.tcd.ie/~horkana/dia/menus.c
I'll provide proper patches later when I've got the ideas sorted out

the gist of it is, more keybindings [1], some renaming [2] and more menu
items to take advantage of the features of Dia I have only recently begun
to appreciate [3].

[1] I wanted to add keybindings using some of the Function keys (F8, F9)
but the keybindings for the toolbox seem to be in a differnt context to
the bindings in the document window, so if the toolbox is out of focus
they are not much use.
This fits in with an idea I have that I would like to make the File and
Help menus in the Toolbox and the Document Window more consistant with
each other.  I mentioned yesterday that I was hoping to have the recent
files in both File menus, and although it could be be made optional I'd
prefer to always put them in a submenu 'Open Recent' (like the Gimp
does) and keep the file menu uncluttered.  I haven't tried doing this yet
but I hope it will be easy enough (dont laugh if it is trivial, these
things are always easy in hindsight when you know how).
Going against consistancy but following the Gnome Guidelines I added
Preferences to the bottom of the edit menu and it feels comfortable (and
i used the letter E as the mnemonic so that you can go Alt,E,E to quickly
access the preferences even though the Gnome HIG has been misleading
people to do it differently).

So you go against consistency to follow the HIG, then immediately stop
following the HIG?  

I added a keybinding for Select, Connected  Ctrl+Shift+T because it is
similar to Transitive ctrl+T.

Good.

Added Ctrl+R to Show Rulers but I need to lookup how to also allow
Ctrl+Shift+R to try and placate Gimp users.

Redraw F5

I guess that's ok since Redraw is just a failsafe for imperfect
rendering.

Select Invert Ctrl+I

Fair enough.

... probably a few others I'm forgetting but I'll worry about that when
I'm making proper patches.


[2] I renamed Objects to just Object because that seems to be the
convention when naming menus (File not Files, Image not Images, Layer not
Layers).

Seems to match what many other programs do.  Plural is only for menus
like Tools where the plural refers to the items in the menu, not to
things being operated on by the menu functions.  Please make sure that
all relevant files are updated.

When I added the keybinding Ctrl+I for Invert it also appeared in the menu
for the other 'Invert' so I figured I could get away with it by renaming
the other Invert to Inverse.

That is probably good.

[3] Layers, I have turned around completely from not understanding how
useful they can be to wanting to use them everywhere.  I have been using
Layers a lot with the Gimp, I wrote scripts to provide New Layer from
Cut/Copy that I'm rather proud of which make it very quick and easy to
create a new layer.  Also Inkscape is working towards
adding Layers like functionality and I took a closer look at Adobe
Illustrator.

Nifty, aren't they?

I think more people would appreciate the Layers features if they had
menu items, making them more discoverable and allow them to have
convenient keybindings.  "money for old rope".

The menu bar is getting awfully wide already.  Though it could go under
Diagram.  Or are you suggesting a context menu in the Layers dialog?

however I'm pretty clueless about how to get started on implenting the
hooks and callbacks to the existing functionality.

Do what I do, look at what's there and figure it out.  You'll need to
add a menu item in app/menus.c, initialize those that can be ghosted in
menus_initialize_updatable_items (adding appropriate struct entries in
app/menus.h), add sensitivity updates in app/diagram.c, and add callback
functions in app/commands.c. 

There is plenty of exisiting functionality, New Layer, Delete; Arrange
Forwards, Backwards; Show All/None, Current Only, Invert; Layer properties
(ie rename the layer).

To keep the menu managable, I'd suggest having a Visible submenu for
changing which layers are visible, and similarly a Connectable submenu.

I should be able to figure out eventually how to add easier features like
Duplicate Layer, New Layer from Cut/Copy, and Merge (hopefully very
similar to grouping and ungrouping)

Not exactly the same as grouping/ungrouping, as there is no object in
the diagram involved.  Should make it easier, but you'd still have to
add the undo objects for it.

(Alt+L is being used as shortcut for Tools/Line which would need to be
changed but I'm sure Dia will have single letter bindings again whenever
the text entry is overhauled).

You'll notice that I have reserved Alt keybindings for the tools.  I'd
like to keep it that way.

-Lars




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]