|
From: Vedran L. <vlj...@us...> - 2005-02-13 13:48:50
|
Update of /cvsroot/ede/ede101/eiconman In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20127 Modified Files: edeskicon.cpp eiconman.cpp Log Message: Fix bug with dragging icons in single-click mode Index: eiconman.cpp =================================================================== RCS file: /cvsroot/ede/ede101/eiconman/eiconman.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** eiconman.cpp 25 Jan 2005 15:33:16 -0000 1.5 --- eiconman.cpp 13 Feb 2005 13:48:38 -0000 1.6 *************** *** 1,18 **** // Equinox Desktop Environment - desktop icons manager ! // Copyright (C) 2000-2002 Martin Pekar ! // ! // This program is free software; you can redistribute it and/or modify ! // it under the terms of the GNU General Public License as published by ! // the Free Software Foundation; either version 2 of the License, or ! // (at your option) any later version. ! // ! // This program is distributed in the hope that it will be useful, ! // but WITHOUT ANY WARRANTY; without even the implied warranty of ! // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! // GNU General Public License for more details. ! // ! // You should have received a copy of the GNU General Public License ! // along with this program; if not, write to the Free Software ! // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "eiconman.h" --- 1,7 ---- // Equinox Desktop Environment - desktop icons manager ! // Copyright (C) 2000-2005 EDE Authors ! // This program is licenced under terms of the ! // GNU General Public Licence version 2 or newer. ! // See COPYING for details. #include "eiconman.h" Index: edeskicon.cpp =================================================================== RCS file: /cvsroot/ede/ede101/eiconman/edeskicon.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** edeskicon.cpp 25 Jan 2005 15:33:16 -0000 1.3 --- edeskicon.cpp 13 Feb 2005 13:48:38 -0000 1.4 *************** *** 1,18 **** // Equinox Desktop Environment - desktop icons manager ! // Copyright (C) 2000-2002 Martin Pekar ! // ! // This program is free software; you can redistribute it and/or modify ! // it under the terms of the GNU General Public License as published by ! // the Free Software Foundation; either version 2 of the License, or ! // (at your option) any later version. ! // ! // This program is distributed in the hope that it will be useful, ! // but WITHOUT ANY WARRANTY; without even the implied warranty of ! // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! // GNU General Public License for more details. ! // ! // You should have received a copy of the GNU General Public License ! // along with this program; if not, write to the Free Software ! // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "edeskicon.h" --- 1,7 ---- // Equinox Desktop Environment - desktop icons manager ! // Copyright (C) 2000-2005 EDE Authors ! // This program is licenced under terms of the ! // GNU General Public Licence version 2 or newer. ! // See COPYING for details. #include "edeskicon.h" *************** *** 186,197 **** } if(button1) { switch(e) { - case FL_RELEASE: case FL_DRAG: - // No drag yet... - if(Fl::event_is_click()) return 1; - if(!micon) { micon = new MovableIcon(this); --- 175,183 ---- } + // Left mouse button if(button1) { switch(e) { case FL_DRAG: if(!micon) { micon = new MovableIcon(this); *************** *** 211,216 **** micon->position(X, Y); ! if(e==FL_DRAG) return 1; if(micon) { delete micon; --- 197,213 ---- micon->position(X, Y); ! return 1; ! ! case FL_RELEASE: ! ! // This happens only when there was no drag ! if(Fl::event_is_click()) { ! if (one_click_exec) ! cb_execute_i(); ! return 1; ! } + // We will update config only on FL_RELEASE, when + // dragging is over if(micon) { delete micon; *************** *** 227,231 **** return 1; ! case FL_PUSH: --- 224,228 ---- return 1; ! case FL_PUSH: *************** *** 237,244 **** y_icon = ((desktop->y()+y())/label_gridspacing)*label_gridspacing; ! if (one_click_exec) { ! cb_execute_i(); ! } ! else if (Fl::event_clicks() > 0) { Fl::event_clicks(0); cb_execute_i(); --- 234,239 ---- y_icon = ((desktop->y()+y())/label_gridspacing)*label_gridspacing; ! // Double click ! if ((!one_click_exec) && (Fl::event_clicks() > 0)) { Fl::event_clicks(0); cb_execute_i(); |