Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_calendar.c ewl_embed.c ewl_fileselector.c ewl_enums.h Log Message: Use the clicks field in the event structure rather than an extra callback type for double clicks. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_calendar.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ewl_calendar.c 5 Sep 2005 14:12:15 -0000 1.6 +++ ewl_calendar.c 27 Sep 2005 04:20:16 -0000 1.7 @@ -50,7 +50,10 @@ } void ewl_calendar_day_pick (Ewl_Widget *w, void *ev_data, void *user_data) { - ewl_callback_call(EWL_WIDGET(user_data), EWL_CALLBACK_VALUE_CHANGED); + Ewl_Event_Mouse_Down *ev = ev_data; + if (ev->clicks == 2) + ewl_callback_call(EWL_WIDGET(user_data), + EWL_CALLBACK_VALUE_CHANGED); } void ewl_calendar_prev_month_cb (Ewl_Widget *w, void *ev_data, void *user_data) { @@ -150,7 +153,7 @@ int cur_row, cur_col, cur_day, days=30; Ewl_Widget *day_label; - ewl_grid_reset(EWL_GRID(cal->grid),7,7); + ewl_grid_reset(EWL_GRID(cal->grid), 7, 7); ewl_calendar_add_day_labels(cal); /*Get the start time..*/ @@ -208,7 +211,7 @@ sprintf(day, "%d", cur_day+1); day_label = ewl_label_new(day); ewl_callback_append(EWL_WIDGET(day_label), EWL_CALLBACK_MOUSE_DOWN,ewl_calendar_day_select, cal); - ewl_callback_append(EWL_WIDGET(day_label), EWL_CALLBACK_DOUBLE_CLICKED,ewl_calendar_day_pick, cal); + ewl_callback_append(EWL_WIDGET(day_label), EWL_CALLBACK_CLICKED,ewl_calendar_day_pick, cal); ewl_grid_add(EWL_GRID(cal->grid), day_label, cur_col, cur_col, cur_row, cur_row); ewl_calendar_highlight_today(now, EWL_LABEL(day_label), cal); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_embed.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ewl_embed.c 5 Sep 2005 14:12:15 -0000 1.6 +++ ewl_embed.c 27 Sep 2005 04:20:16 -0000 1.7 @@ -384,7 +384,7 @@ if (ev.clicks > 1) { ewl_callback_call_with_event_data(temp, - EWL_CALLBACK_DOUBLE_CLICKED, + EWL_CALLBACK_CLICKED, &ev); } } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_fileselector.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- ewl_fileselector.c 25 Sep 2005 05:02:19 -0000 1.21 +++ ewl_fileselector.c 27 Sep 2005 04:20:16 -0000 1.22 @@ -186,7 +186,8 @@ fs->ffilter = strdup("^[^\\.]"); fs->dfilter = strdup("^[^\\.]"); - tmp = getenv("HOME"); + // tmp = getenv("HOME"); + tmp = "/Users/ningerso/files"; fs->path = strdup((tmp ? tmp : "/")); fs->files = ecore_list_new(); @@ -630,6 +631,10 @@ Ewl_Fileselector *fs; char *path; char *new_path; + Ewl_Event_Mouse_Down *ev = ev_data; + + if (ev->clicks < 2) + DRETURN(DLEVEL_STABLE); fs = data; path = ewl_widget_data_get(w, "FILESELECTOR_DIR"); @@ -760,7 +765,7 @@ ewl_fileselector_tooltip_add(prow, ecore_list_current(dirs)); ewl_fileselector_data_free(d); - ewl_callback_append(prow, EWL_CALLBACK_DOUBLE_CLICKED, + ewl_callback_append(prow, EWL_CALLBACK_CLICKED, ewl_fileselector_select_dir_cb, fs); ewl_callback_append(prow, EWL_CALLBACK_DESTROY, ewl_fileselector_dir_data_cleanup_cb, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_enums.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_enums.h 27 Sep 2005 03:26:32 -0000 1.9 +++ ewl_enums.h 27 Sep 2005 04:20:16 -0000 1.10 @@ -38,7 +38,6 @@ EWL_CALLBACK_SELECT, /**< Widget was selected by mouse or key */ EWL_CALLBACK_DESELECT, /**< Widget was deselected by mouse or key */ EWL_CALLBACK_CLICKED, /**< Mouse was pressed and released on a widget */ - EWL_CALLBACK_DOUBLE_CLICKED, /**< Mouse was clicked twice quickly */ EWL_CALLBACK_HILITED, /**< Mouse is over the widget */ EWL_CALLBACK_VALUE_CHANGED, /**< Value in widget changed */ EWL_CALLBACK_STATE_CHANGED, /**< Alter the state of the appearance */ ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs