Re: Touch selections



Hey,

I've now taken a look at the code, here are some impressions:

GtkBubbleWindow looks interesting and somewhat similar to two things
that have been discussed:
    a) a "PopupWindow" class to replace grabs (e.g. on wayland)
    b) a "popover" widget that behaves like a transient overlay
(without being its own toplevel)
We should keep this private until we've worked out how it
overlaps/interacts with these usecases.

I'm not really convinced of some of the choices made in the
GtkSelectionWindow class:
   a) a toolbar may not be the right container for what the designers
had in mind - there was some talk of scrolling
   b) doesn't seem necessary to use a ui manager and actions here,
since you are not even allowing addition of actions
   c) adding a public getter for the toolbar will make it impossible
for us to change the implementation strategy later
   d) I'm not convinced the special-casing of cut/copy/paste is really
worth it - I would just have added these action in
GtkEntry/GtkTextView
I recommend dropping this widget altogether for now, and just
construct the toolbar with the default actions directly in
GtkEntry/GtkTextView.

In GtkEntry, I think the use of g_timeout_add_seconds for popping up
the selection is inappropriate - you don't want the delay to fluctuate
depending on whether you touch early or late in the second.

It would be nice if we could reuse the ::populate-popup signals to
allow custom actions to be added; unfortunately, all existing users of
this signal expect to add menuitems to a menu. One possibility might
be to add a set_context_menu_model() function that takes a GMenuModel,
which could be used to populate the traditional context menu, or to
build something toolbar-like for your popup. Of course menumodel and
toolbar is not a perfect fit, either.


Matthias


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