Re: GtkToolbar drag and drop



Another UI option:

The spinner is a tricky issue because we don't want it to work quite
like a toolbar item. In fact, it seems completely unlike a toolbar item
other than size. Maybe we shouldn't have it on the toolbar... Put the
spinner in the upper left-hand corner of the window (probably but not
necessarily below the menu bar) as a separate "widget", with its own
raised bevel. Technically I suppose it could be the only item on a
miniature toolbar that had locked position.

-Seth

On Thu, 2003-10-16 at 17:30, Marco Pesenti Gritti wrote:
> On Thu, 2003-10-16 at 11:24, Soeren Sandmann wrote:
> > Marco Pesenti Gritti <marco gnome org> writes:
> > 
> > > 1 Keep the throbber visible at the end of the toolbar, after the
> > > overflow menu arrow. I think this is a strong requirement, being a form
> > > of feedback and not a faster way to access a function available from the
> > > menubar.
> > > 2 Have an efficient way of achieve user tasks (add spinner to a toolbar,
> > > remove spinner from a toolbar, move spinner from a toolbar to another).
> > > 3 Keep the user model the simpler is possible
> > 
> > Sorry about taking so long to get back to this. How does this sound:
> > 
> >         - get rid of GtkToolItem::pack_end as it's only useful for
> >           spinners.
> > 
> >         - add a new gtk_toolbar_set_end_item() that inserts a tool
> >           item in spinner position. This function could take NULL for
> >           the new tool item in which case the existing item, if any,
> >           would be removed.
> > 
> >         - Change gtk_toolbar_get_drop_position() to be:
> > 
> >            gboolean gtk_toolbar_get_drop_position (GtkToolbar *toolbar, 
> >                                                     int         x
> >                                                     int         y,
> >                                                     int        *pos)
> > 
> >           that would return TRUE if the indicated (x, y) corresonds to
> >           a valid drop location. In that case, 
> > 
> >                if *pos is non-negative, indicates the position where 
> >                the new item should be inserted. 
> > 
> >                If *pos is negative, indicates that the new item should 
> >                be added to the end of the toolbar.
> > 
> >           This function only indicates the "spinner" position as
> >           as valid drop target if the toolbar doesn't have a tool item
> >           in that position already.
> >         
> >         - add API 
> > 
> >                 gtk_toolbar_highlight_drop_location (GtkToolbar *toolbar,
> >                                                      int         x,
> >                                                      int         y,
> >                                                      GtkToolItem *new_item)
> > 
> >                 gtk_toolbar_unhighlight_drop_position (GtkToolbar *);
> > 
> >           that would [un]highlight corresponding position on the
> >           toolbar.
> > 
> > This API achieves:
> > 
> >         - ability to have zero or one spinners on the toolbar
> > 
> >         - good feedback on drag and drop.
> > 
> >         - some simplification of the gtktoolbar.c and gtktoolitem.c
> > 
> >         - expanding spacers can be added later if we decide it's a
> >           good idea (which I still think it might be).
> 
> I like the proposal, it seem simple and quite flexible.
> 
> > The sacrifice is the ability to have more than one tool item in
> > spinner position, which is acceptable in my opinion.
> 
> I agree that the sacrifice is acceptable.
> 
> > The following is a sketch of how the toolbar editor would work:
> > 
> 
> We discussed it on irc. My feeling is that requiring the spinner to be
> dragged at the end of the toolbar to be added (refusing the drag if it's
> not there), is bad for usability. I'm convinced it would be hard to find
> out for users.
> I see two possible ways to handle it, not sure which is the better one.
> 
> 1 Accept the drag on the whole toolbar, highlight the toolbar border,
> and put the spinner in the last position.
> 2 Accept the drag on the whole toolbar, highlight the position where the
> spinner is dragged. Put the spinner as last item, aligned on the right,
> if it has been dragged in last position. Put it in the middle of other
> items, like a normal item, if it was dragged somewhere else.
> 
> Marco 
> 
> 




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