GSoC Progress Report (June 16)

Mike Lester element3260 at
Tue Jun 17 06:31:36 BST 2008

Since my last update I've accomplished quite a bit (at least it seems that
way). After finishing up the splitting of most dialogs from the main code, I
began to work on adding text selection and dragging capability. The mouse
and drag behavior is pretty much sorted out now and the best part is, text
selection works! Unfortunately I will not be able to get much work done this
next week as I'll be vacationing with my family in Colorado, but I look
forward to continuing my work as soon as I return (June 22).

Accomplished this week:

   - Implemented mouse drags and settled on a clicking scheme
      - When a mouse button is pressed the state is considered PRESS which
      basically means that it is waiting to either become a "Click" or a "D=
      - Clicks are considered a press and release with no movement.
      - If the mouse is moved while its state is PRESS it is considered a
      - Modifier keys are only accepted if held when the mouse is pressed,
      after the state is set as PRESS they can only be removed.
      - Basic text selection
      - Text selection works properly according to the core code
      - Text selection in an input box has several bugs
         - If a key is pressed when input text is selected it does not
         replace that text (nothing happens).
         - If a selection is clicked an "invisible" caret is placed there
         and any text typed after that will appear between the
selection without
         clearing it.
         - When a selection is made Cut and Paste are insensitive. (This is
         probably due to some oversight of mine about caret placement)
         - Drag saving/copying the selection isn't implemented yet
      - Clipboard functions for both the url entry bar and the browser
   itself (except for cut)
      - Copy and Paste work as expected.
      - Added a few functions to gtk_scaffolding to handle clipboard action
      - After testing several different methods to keep track of the
      selection states in both the browser and the url bar, I came to the
      conclusion that there was no clean and concise way to accomplish this
      (mostly because there is no
when a selection is created in the url bar). I consulted the
      Epiphany <> code to see how
      they handled this problem. Instead of constantly keeping track
of whether or
      not the actions should be sensitive, they only update sensitivity when
      necessary so...
      - Clipboard actions are only set as insensitive when a menu containing
      them (Edit menu / Right-click menu) is displayed, otherwise they
are always
      sensitive so that the keyboard accelerators will always be detected
      properly. The functions themselves handle instances where the clipboa=
      function is not possible.
      - These actions are hidden instead of desensitized for the right-click
      - Cut works for the url bar but not yet for the browser as there does
      not seem to be an easily accessible cut function in the core.

Future goals for next week:

   - Fix bugs with selections in a text input which are most likely related
   to caret placement.
   - Find a way to better implement desktop/text_input.c textarea_cut in
   order to add cut functionality.
   - Absolutely solidify mouse behavior once and for all.
   - Move on to either a find toolbar or Downloads.

Things I need help with:

   - Questions, concerns, comments, and suggestions about the mouse behavior
   so that we can get it squared away and won't have to deal with it later.
   - Does the RiscOS version have the same trouble with selections in a text
   input or did I overlook some important caret placement code on the gtk s=
   of things (as I highly suspect).
   - Schedule concerns. Should I:
      - Continue to work on text-selection/clipboard bugs even though it
      will take me past schedule.
      - Begin work on a Find toolbar which was originally part of the
      schedule for early June
      - Or move on ahead to Downloads?

Thanks to tlsa for helping me pretty much constantly with mouse behavior,
and to jmb for your helpful hints about current_redraw_browser, and of
course rjek, my faithful mentor ; )


(Additional updates of a less formal nature can be found on my GSoC blog at <> which is
currently aggregated at
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the netsurf-dev mailing list