[pkg-fso-commits] [SCM] libframeworkd-phonegui branch, upstream, updated. 640da47bfcff755388d0fb8f443eb34e0dea3c72
quickdev
niklas.coding at gmail.com
Sat Dec 27 20:50:06 UTC 2008
The following commit has been merged in the upstream branch:
commit dc5ecc2adc2044170d5235fa8e53936829e4544c
Author: quickdev <niklas.coding at gmail.com>
Date: Fri Dec 12 17:06:29 2008 +0100
Added contact-delete view.
diff --git a/libframeworkd-phonegui-efl/src/view/message-delete-view.c b/libframeworkd-phonegui-efl/src/view/contact-delete-view.c
similarity index 63%
copy from libframeworkd-phonegui-efl/src/view/message-delete-view.c
copy to libframeworkd-phonegui-efl/src/view/contact-delete-view.c
index 41534d5..6d47cff 100644
--- a/libframeworkd-phonegui-efl/src/view/message-delete-view.c
+++ b/libframeworkd-phonegui-efl/src/view/contact-delete-view.c
@@ -3,7 +3,7 @@
#include <frameworkd-glib/ogsmd/frameworkd-glib-ogsmd-sim.h>
-struct MessageDeleteViewData {
+struct ContactDeleteViewData {
struct Window *win;
int id;
void (*callback)();
@@ -11,21 +11,21 @@ struct MessageDeleteViewData {
Evas_Object *bt_yes, *bt_no;
};
-void message_delete_yes_clicked(void *userdata, Evas_Object *obj, void *event_info);
-void message_delete_no_clicked(void *userdata, Evas_Object *obj, void *event_info);
+void contact_delete_yes_clicked(void *userdata, Evas_Object *obj, void *event_info);
+void contact_delete_no_clicked(void *userdata, Evas_Object *obj, void *event_info);
static void delete_callback(GError *error, gpointer userdata);
-static void delete_callback2(struct MessageDeleteViewData *data);
+static void delete_callback2(struct ContactDeleteViewData *data);
-static void frame_delete_show(struct MessageDeleteViewData *data);
-static void frame_delete_hide(struct MessageDeleteViewData *data);
+static void frame_delete_show(struct ContactDeleteViewData *data);
+static void frame_delete_hide(struct ContactDeleteViewData *data);
static void frame_delete_no_clicked(void *userdata, Evas_Object *obj, void *event_info);
static void frame_delete_yes_clicked(void *userdata, Evas_Object *obj, void *event_info);
-static void frame_deleting_show(struct MessageDeleteViewData *data);
+static void frame_deleting_show(struct ContactDeleteViewData *data);
-struct MessageDeleteViewData *message_delete_view_show(struct Window *win, GHashTable *options) {
- struct MessageDeleteViewData *data = g_slice_alloc0(sizeof(struct MessageDeleteViewData));
+struct ContactDeleteViewData *contact_delete_view_show(struct Window *win, GHashTable *options) {
+ struct ContactDeleteViewData *data = g_slice_alloc0(sizeof(struct ContactDeleteViewData));
data->win = win;
if(options == NULL) {
@@ -35,7 +35,7 @@ struct MessageDeleteViewData *message_delete_view_show(struct Window *win, GHash
data->callback = g_hash_table_lookup(options, "delete_callback");
data->callback_data = g_hash_table_lookup(options, "delete_callback_data");
- g_debug("Delete view with message id = %d", data->id);
+ g_debug("Delete view with contact id = %d", data->id);
}
window_frame_show(win, data, frame_delete_show, frame_delete_hide);
@@ -44,16 +44,16 @@ struct MessageDeleteViewData *message_delete_view_show(struct Window *win, GHash
return data;
}
-void message_delete_view_hide(struct MessageDeleteViewData *data) {
- g_slice_free(struct MessageDeleteViewData, data);
+void contact_delete_view_hide(struct ContactDeleteViewData *data) {
+ g_slice_free(struct ContactDeleteViewData, data);
}
static void delete_callback(GError *error, gpointer userdata) {
- struct MessageDeleteViewData *data = (struct MessageDeleteViewData *) userdata;
+ struct ContactDeleteViewData *data = (struct ContactDeleteViewData *) userdata;
async_trigger(delete_callback2, data);
}
-static void delete_callback2(struct MessageDeleteViewData *data) {
+static void delete_callback2(struct ContactDeleteViewData *data) {
if(data->callback != NULL) {
data->callback(data->callback_data);
}
@@ -67,9 +67,9 @@ static void delete_callback2(struct MessageDeleteViewData *data) {
* Frame "delete"
*/
-static void frame_delete_show(struct MessageDeleteViewData *data) {
+static void frame_delete_show(struct ContactDeleteViewData *data) {
struct Window *win = data->win;
- window_layout_set(win, MESSAGE_FILE, "delete");
+ window_layout_set(win, CONTACTS_FILE, "delete");
data->bt_yes = elm_button_add(window_evas_object_get(win));
elm_button_label_set(data->bt_yes, "Yes");
@@ -84,22 +84,22 @@ static void frame_delete_show(struct MessageDeleteViewData *data) {
evas_object_show(data->bt_no);
}
-static void frame_delete_hide(struct MessageDeleteViewData *data) {
+static void frame_delete_hide(struct ContactDeleteViewData *data) {
evas_object_del(data->bt_yes);
evas_object_del(data->bt_no);
}
static void frame_delete_no_clicked(void *userdata, Evas_Object *obj, void *event_info) {
- struct MessageDeleteViewData *data = (struct MessageDeleteViewData *) userdata;
+ struct ContactDeleteViewData *data = (struct ContactDeleteViewData *) userdata;
window_destroy(data->win, NULL);
}
static void frame_delete_yes_clicked(void *userdata, Evas_Object *obj, void *event_info) {
- struct MessageDeleteViewData *data = (struct MessageDeleteViewData *) userdata;
+ struct ContactDeleteViewData *data = (struct ContactDeleteViewData *) userdata;
window_frame_show(data->win, data, frame_deleting_show, NULL);
- ogsmd_sim_delete_message(data->id, delete_callback, data);
+ ogsmd_sim_delete_entry("contacts", data->id, delete_callback, data);
}
@@ -107,8 +107,8 @@ static void frame_delete_yes_clicked(void *userdata, Evas_Object *obj, void *eve
* Frame "deleting"
*/
-static void frame_deleting_show(struct MessageDeleteViewData *data) {
+static void frame_deleting_show(struct ContactDeleteViewData *data) {
struct Window *win = data->win;
- window_layout_set(win, MESSAGE_FILE, "deleting");
+ window_layout_set(win, CONTACTS_FILE, "deleting");
}
--
libframeworkd-phonegui
More information about the pkg-fso-commits
mailing list