Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_actions.c e_dialog.c
Log Message:
E codingstyle
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_actions.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- e_actions.c 24 Sep 2005 01:59:26 -0000 1.29
+++ e_actions.c 24 Sep 2005 02:49:55 -0000 1.30
@@ -1131,7 +1131,7 @@
e_dialog_icon_set(dia, "enlightenment/exit", 64);
e_dialog_button_add(dia, _("Yes"), NULL, _e_actions_cb_exit_dialog_ok,
NULL);
e_dialog_button_add(dia, _("No"), NULL, NULL, NULL);
- e_dialog_button_focus (dia, 1);
+ e_dialog_button_focus(dia, 1);
e_win_centered_set(dia->win, 1);
e_dialog_show(dia);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_dialog.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- e_dialog.c 24 Sep 2005 01:59:26 -0000 1.14
+++ e_dialog.c 24 Sep 2005 02:49:55 -0000 1.15
@@ -19,7 +19,7 @@
static void _e_dialog_free(E_Dialog *dia);
static void _e_dialog_cb_button_clicked(void *data, Evas_Object *obj, const
char *emission, const char *source);
static void _e_dialog_cb_delete(E_Win *win);
-static int _e_dialog_key_down_cb (void *data, int type, void *event);
+static int _e_dialog_key_down_cb(void *data, int type, void *event);
/* local subsystem globals */
@@ -75,7 +75,7 @@
evas_object_show(o);
dia->focused = NULL;
- dia->key_down_handler = ecore_event_handler_add (ECORE_X_EVENT_KEY_DOWN,
_e_dialog_key_down_cb, dia);
+ dia->key_down_handler = ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN,
_e_dialog_key_down_cb, dia);
return dia;
}
@@ -127,23 +127,22 @@
{
E_Dialog_Button *db = NULL;
- db = evas_list_nth (dia->buttons, button);
-
- if (!db)
- return 0;
+ db = evas_list_nth(dia->buttons, button);
+ if (!db) return 0;
+
if (dia->focused)
- {
- E_Dialog_Button *focused;
-
- focused = dia->focused->data;
- if (focused)
- edje_object_signal_emit(focused->obj, "unfocus", "");
- }
-
+ {
+ E_Dialog_Button *focused;
+
+ focused = dia->focused->data;
+ if (focused)
+ edje_object_signal_emit(focused->obj, "unfocus", "");
+ }
+
dia->focused = evas_list_nth_list(dia->buttons, button);
edje_object_signal_emit(db->obj, "focus", "");
-
+
return 1;
}
@@ -216,7 +215,7 @@
if (dia->icon_object) evas_object_del(dia->icon_object);
if (dia->box_object) evas_object_del(dia->box_object);
if (dia->bg_object) evas_object_del(dia->bg_object);
- ecore_event_handler_del (dia->key_down_handler);
+ ecore_event_handler_del(dia->key_down_handler);
e_object_del(E_OBJECT(dia->win));
free(dia);
}
@@ -235,58 +234,62 @@
/* TODO: Implement shift-tab and left arrow */
static int
-_e_dialog_key_down_cb (void *data, int type, void *event)
+_e_dialog_key_down_cb(void *data, int type, void *event)
{
- Ecore_X_Event_Key_Down *ev = event;
- E_Dialog *dia = data;
-
+ Ecore_X_Event_Key_Down *ev;
+ E_Dialog *dia;
+
+ ev = event;
+ dia = data;
+
if (!strcmp(ev->keyname, "Tab") || !strcmp(ev->keyname, "Right"))
- {
- if (dia->focused && dia->buttons)
- {
- if (dia->focused->next)
- {
- E_Dialog_Button *db;
-
- db = dia->focused->data;
- edje_object_signal_emit(db->obj, "unfocus", "");
-
- dia->focused = dia->focused->next;
- db = dia->focused->data;
- edje_object_signal_emit(db->obj, "focus", "");
-
- } else {
-
- E_Dialog_Button *db;
-
- db = dia->focused->data;
- edje_object_signal_emit(db->obj, "unfocus", "");
-
- dia->focused = dia->buttons;
- db = evas_list_data (dia->focused);
- edje_object_signal_emit(db->obj, "focus", "");
- }
- } else {
-
- E_Dialog_Button *db;
-
- dia->focused = dia->buttons;
-
- db = dia->focused->data;
- edje_object_signal_emit(db->obj, "focus", "");
- }
- return 1;
- }
-
+ {
+ if (dia->focused && dia->buttons)
+ {
+ if (dia->focused->next)
+ {
+ E_Dialog_Button *db;
+
+ db = dia->focused->data;
+ edje_object_signal_emit(db->obj, "unfocus", "");
+
+ dia->focused = dia->focused->next;
+ db = dia->focused->data;
+ edje_object_signal_emit(db->obj, "focus", "");
+ }
+ else
+ {
+ E_Dialog_Button *db;
+
+ db = dia->focused->data;
+ edje_object_signal_emit(db->obj, "unfocus", "");
+
+ dia->focused = dia->buttons;
+ db = evas_list_data(dia->focused);
+ edje_object_signal_emit(db->obj, "focus", "");
+ }
+ }
+ else
+ {
+ E_Dialog_Button *db;
+
+ dia->focused = dia->buttons;
+
+ db = dia->focused->data;
+ edje_object_signal_emit(db->obj, "focus", "");
+ }
+ return 1;
+ }
+
if ((!strcmp(ev->keyname, "Enter") || !strcmp(ev->keyname, "Return") ||
!strcmp(ev->keyname, "Space")) && dia->focused)
- {
- E_Dialog_Button *db;
-
- db = evas_list_data (dia->focused);
- edje_object_signal_emit(db->obj, "click", "");
- }
-
+ {
+ E_Dialog_Button *db;
+
+ db = evas_list_data(dia->focused);
+ edje_object_signal_emit(db->obj, "click", "");
+ }
+
return 1;
}
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs