diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2012-06-21 06:19:43 +0000 |
---|---|---|
committer | Vincent Torri <vincent.torri@gmail.com> | 2012-06-21 06:19:43 +0000 |
commit | c3b0637802b2e735ad19947bcaba06bc2c26c4e6 (patch) | |
tree | 6329eefede76d2846dbcbd863713bc5ae9743d84 /src/bin/e_entry_dialog.c | |
parent | 06c0c4d5f3e819fc149a82d5947b5cfa73a8e04a (diff) | |
download | enlightenment-c3b0637802b2e735ad19947bcaba06bc2c26c4e6.tar.gz |
e17: whitespaces--
SVN revision: 72561
Diffstat (limited to 'src/bin/e_entry_dialog.c')
-rw-r--r-- | src/bin/e_entry_dialog.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/bin/e_entry_dialog.c b/src/bin/e_entry_dialog.c index 2e608a7c17..eae5955a10 100644 --- a/src/bin/e_entry_dialog.c +++ b/src/bin/e_entry_dialog.c @@ -12,8 +12,8 @@ EAPI E_Entry_Dialog * e_entry_dialog_show(const char *title, const char *icon, const char *text, const char *initial_text, const char *button_text, const char *button2_text, - void (*ok_func)(char *text, void *data), - void (*cancel_func)(void *data), void *data) + void (*ok_func)(char *text, void *data), + void (*cancel_func)(void *data), void *data) { E_Entry_Dialog *ed; E_Dialog *dia; @@ -28,40 +28,40 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text, ed->cancel.data = data; if (initial_text) ed->text = strdup(initial_text); - + dia = e_dialog_new(e_container_current_get(e_manager_current_get()), "E", "_entry_dialog"); - if (!dia) + if (!dia) { e_object_del(E_OBJECT(ed)); return NULL; } dia->data = ed; ed->dia = dia; - + mask = 0; evas_object_key_ungrab(dia->event_object, "space", mask, ~mask); - + e_win_delete_callback_set(dia->win, _e_entry_dialog_delete); - + if (title) e_dialog_title_set(dia, title); if (icon) e_dialog_icon_set(dia, icon, 64); - + o = e_widget_list_add(dia->win->evas, 0, 0); - if (text) + if (text) { ob = e_widget_label_add(dia->win->evas, text); e_widget_list_object_append(o, ob, 1, 0, 0.5); } - + ed->entry = e_widget_entry_add(dia->win->evas, &(ed->text), NULL, NULL, NULL); evas_object_smart_callback_add(ed->entry, "key_down", _e_entry_cb_key_down, ed); e_widget_list_object_append(o, ed->entry, 1, 1, 0.5); e_widget_size_min_get(o, &w, &h); e_dialog_content_set(dia, o, w, h); - + e_dialog_button_add(dia, !button_text ? _("OK") : button_text, NULL, _e_entry_dialog_ok, ed); e_dialog_button_add(dia, !button2_text ? _("Cancel") : button2_text, NULL, _e_entry_dialog_cancel, ed); - + e_win_centered_set(dia->win, 1); e_dialog_show(dia); e_widget_focus_set(ed->entry, 1); @@ -77,12 +77,12 @@ _e_entry_dialog_free(E_Entry_Dialog *ed) E_FREE(ed->text); free(ed); } - + static void -_e_entry_dialog_ok(void *data, E_Dialog *dia __UNUSED__) +_e_entry_dialog_ok(void *data, E_Dialog *dia __UNUSED__) { E_Entry_Dialog *ed; - + ed = data; e_object_ref(E_OBJECT(ed)); if (ed->ok.func) ed->ok.func(ed->text, ed->ok.data); @@ -91,10 +91,10 @@ _e_entry_dialog_ok(void *data, E_Dialog *dia __UNUSED__) } static void -_e_entry_dialog_cancel(void *data, E_Dialog *dia __UNUSED__) +_e_entry_dialog_cancel(void *data, E_Dialog *dia __UNUSED__) { E_Entry_Dialog *ed; - + ed = data; e_object_ref(E_OBJECT(ed)); if (ed->cancel.func) ed->cancel.func(ed->cancel.data); @@ -103,25 +103,25 @@ _e_entry_dialog_cancel(void *data, E_Dialog *dia __UNUSED__) } static void -_e_entry_dialog_delete(E_Win *win) +_e_entry_dialog_delete(E_Win *win) { E_Dialog *dia; E_Entry_Dialog *ed; - + dia = win->data; ed = dia->data; e_object_del(E_OBJECT(ed)); } -static void -_e_entry_cb_key_down(void *data, Evas_Object *obj __UNUSED__, void *event_info) +static void +_e_entry_cb_key_down(void *data, Evas_Object *obj __UNUSED__, void *event_info) { Evas_Event_Key_Down *ev; E_Entry_Dialog *ed; - + ev = event_info; if (!(ed = data)) return; - if (!strcmp(ev->keyname, "Return")) + if (!strcmp(ev->keyname, "Return")) _e_entry_dialog_ok(data, ed->dia); else if (!strcmp(ev->keyname, "Escape")) |