Adding a quit button to dialer so you can exit from app 86/3286/1
authorJimmy Huang <jimmy.huang@intel.com>
Fri, 5 Apr 2013 20:20:53 +0000 (13:20 -0700)
committerJimmy Huang <jimmy.huang@intel.com>
Fri, 5 Apr 2013 20:20:53 +0000 (13:20 -0700)
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
Makefile.am
data/themes/images/ico_quit.png [new file with mode: 0644]
data/themes/includes/dialer.edc
dialer/gui.c

index a5037a9..28ead33 100644 (file)
@@ -194,6 +194,7 @@ data/themes/images/ico_multiparty_hangup.png \
 data/themes/images/ico_multiparty_private.png \
 data/themes/images/ico_mute.png \
 data/themes/images/ico_person.png \
+data/themes/images/ico_quit.png \
 data/themes/images/ico_speaker.png \
 data/themes/images/ico_swap.png \
 data/themes/images/ico_voicemail.png \
diff --git a/data/themes/images/ico_quit.png b/data/themes/images/ico_quit.png
new file mode 100644 (file)
index 0000000..1378b2e
Binary files /dev/null and b/data/themes/images/ico_quit.png differ
index 62b2b12..6c202a5 100644 (file)
@@ -30,6 +30,7 @@ group {
       image: "ico_contacts.png" COMP;
       image: "ico_history.png" COMP;
       image: "ico_voicemail.png" COMP;
+      image: "ico_quit.png" COMP;
    }
 
    parts {
@@ -187,8 +188,8 @@ group {
             state: "default" 0.0;                                       \
             color: 255 255 255 0;                                       \
             color_class: "action";                                      \
-            min: (WIDTH / 4) ACTION_HEIGHT;                             \
-            max: (WIDTH / 4) ACTION_HEIGHT;                             \
+            min: (WIDTH / 5) ACTION_HEIGHT;                             \
+            max: (WIDTH / 5) ACTION_HEIGHT;                             \
             fixed: 1 1;                                                 \
             rel1 {                                                      \
                to: "bg.actions";                                        \
@@ -252,8 +253,8 @@ group {
             state: "default" 0.0;                                       \
             color: 255 255 255 0;                                       \
             color_class: "action";                                      \
-            min: (WIDTH / 4) ACTION_HEIGHT;                             \
-            max: (WIDTH / 4) ACTION_HEIGHT;                             \
+            min: (WIDTH / 5) ACTION_HEIGHT;                             \
+            max: (WIDTH / 5) ACTION_HEIGHT;                             \
             fixed: 1 1;                                                 \
             visible: 0;                                                 \
             rel1 {                                                      \
@@ -370,9 +371,10 @@ group {
          }                                                              \
       }
 
-      ACTION_TOGGLE("keypad",    0.00, 0.25);
-      ACTION_TOGGLE("contacts",  0.25, 0.50);
-      ACTION_TOGGLE("history",   0.50, 0.75);
+      ACTION_TOGGLE("quit",      0.00, 0.20);
+      ACTION_TOGGLE("keypad",    0.20, 0.40);
+      ACTION_TOGGLE("contacts",  0.40, 0.60);
+      ACTION_TOGGLE("history",   0.60, 0.80);
 #undef ACTION_TOGGLE
 
       part {
@@ -398,8 +400,8 @@ group {
             state: "default" 0.0;
             color: 255 255 255 0;
             color_class: "action";
-            min: (WIDTH / 4) ACTION_HEIGHT;
-            max: (WIDTH / 4) ACTION_HEIGHT;
+            min: (WIDTH / 5) ACTION_HEIGHT;
+            max: (WIDTH / 5) ACTION_HEIGHT;
             fixed: 1 1;
             rel1 {
                to: "bg.actions";
@@ -482,8 +484,8 @@ group {
             state: "default" 0.0;
             color: 255 255 255 0;
             color_class: "caution";
-            min: (WIDTH / 4) ACTION_HEIGHT;
-            max: (WIDTH / 4) ACTION_HEIGHT;
+            min: (WIDTH / 5) ACTION_HEIGHT;
+            max: (WIDTH / 5) ACTION_HEIGHT;
             fixed: 1 1;
             rel1 {
                to: "bg.actions";
index 92b6f40..bca158a 100644 (file)
@@ -161,6 +161,11 @@ static void _gui_voicemail(void)
        gui_dial(number);
 }
 
+static void _gui_quit(void)
+{
+       elm_exit();
+}
+
 static void _on_clicked(void *data __UNUSED__, Evas_Object *o __UNUSED__,
                        const char *emission, const char *source __UNUSED__)
 {
@@ -177,6 +182,8 @@ static void _on_clicked(void *data __UNUSED__, Evas_Object *o __UNUSED__,
                _gui_show(history);
        else if (strcmp(emission, "voicemail") == 0)
                _gui_voicemail();
+       else if (strcmp(emission, "quit") == 0)
+               _gui_quit();
 }
 
 static void _ofono_changed(void *data __UNUSED__)