Double(triple) click on a CList row



Hi all,

Environement: - gtk1.2.10
          - RedHat 7.2

I have a CList with "multiple selection". The "select_row" and
"unselect_row" signals have 2 different handlers. In both handlers I check
if event->type is GDK_2BUTTON_PRESS or GDK_3BUTTON_PRESS.

There are 2 issues:
 1. if the row is allready selected and:
     - I double click on it, this is happening:

          - enter in unselect_handler
               event->type != GDK_2BUTTON_PRESS
          - return from unselect handler
          - enter in select_handler
               event->type == GDK_2BUTTON_PRESS
          - return from select handler

          Why is it call the select handler (the 2nd time), and not the
unselect one ?

     - I triple click on it, this is happening:

          - enter in unselect_handler
               event->type != GDK_2BUTTON_PRESS and  event->type !=
GDK_3BUTTON_PRESS
          - return from unselect handler
          - enter in select_handler
               event->type == GDK_2BUTTON_PRESS
          - return from select handler
          - enter in select_handler
               event->type == GDK_3BUTTON_PRESS
          - return from select handler

          Why is it call the select handler (the 2nd and 3rd time), and not
the unselect one ?

2. if the row is not selected and:
     - I double click on it, this is happening:

          - enter in select_handler
               event->type != GDK_2BUTTON_PRESS
          - return from select handler
          - enter in select_handler
               event->type == GDK_2BUTTON_PRESS
          - return from select handler

          Is this OK? As I understand the handler should be called twice
with event->type != GDK_2BUTTON_PRESS and
               once with event->type ==GDK_2BUTTON_PRESS


     - I triple click on it, this is happening:

          - enter in select_handler
               event->type != GDK_2BUTTON_PRESS and  event->type !=
GDK_3BUTTON_PRESS
          - return from select handler
          - enter in select_handler
               event->type == GDK_2BUTTON_PRESS
          - return from select handler
          - enter in select_handler
               event->type == GDK_3BUTTON_PRESS
          - return from select handler

          Is this OK? As I understand the handler should be called twice
with event->type != GDK_2(/3)BUTTON_PRESS,
               once with event->type ==GDK_2BUTTON_PRESS, once again with
event->type != GDK_2(/3)BUTTON_PRESS and
               once with event->type ==GDK_3BUTTON_PRESS


Any information will be appreciated.

Thanks in advance,

Cosmin Bonea









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