[pkg-fso-commits] [SCM] freesmartphone.org demo GUI branch, master, updated. milestone2-25-gf72c138

Jan Luebbe jluebbe at debian.org
Tue Sep 2 10:26:31 UTC 2008


The following commit has been merged in the master branch:
commit ea25fb988d7934a30d1c28a605c957a786eeb445
Author: Jan Luebbe <jluebbe at debian.org>
Date:   Thu Aug 28 17:59:05 2008 +0200

    remove old pin and puk dialogs

diff --git a/data/themes/zhone.edc b/data/themes/zhone.edc
index 8bc5819..aa68995 100644
--- a/data/themes/zhone.edc
+++ b/data/themes/zhone.edc
@@ -1293,14 +1293,6 @@ collections {
         #include "zhone_call.edc"
     }
     group {
-        name: "pin";
-        #include "zhone_pin.edc"
-    }
-    group {
-        name: "puk";
-        #include "zhone_pin.edc"
-    }
-    group {
         name: "dtmf";
         #include "zhone_dial.edc"
     }
diff --git a/data/themes/zhone_pin.edc b/data/themes/zhone_pin.edc
deleted file mode 100644
index bdbdacf..0000000
--- a/data/themes/zhone_pin.edc
+++ /dev/null
@@ -1,326 +0,0 @@
-
-parts {
-    SWALLOWCLIP()
-    
-    part {
-        name: "label_description";
-        type: TEXT;
-        effect: SOFT_OUTLINE;
-        mouse_events: 0;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            rel1 {
-                relative: 0.0 0.0;
-                offset: 0 0;
-            }
-            rel2 {
-                relative: 1.0 0.2;
-                offset: -1 -1;
-            }
-            text {
-                font: "Sans";
-                size: 1;
-                fit: 1 1;
-                align: 0.0 0.5;
-            }
-        }
-    }
-    part {
-        name: "label_background";
-        type: RECT;
-        mouse_events: 0;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            rel1 {
-                relative: 0.0 0.2;
-                offset: 0 0;
-                to: "swallow_main";
-            }
-            rel2 {
-                relative: 1.0 0.4;
-                offset: -1 -1;
-                to: "swallow_main";
-            }
-            color: 255 255 255 64;
-        }
-    }
-    part {
-        name: "label";
-        type: TEXT;
-        effect: SOFT_OUTLINE;
-        mouse_events: 0;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            rel1 {
-                relative: 0.0 0.0;
-                offset: 0 0;
-                to: "label_background";
-            }
-            rel2 {
-                relative: 1.0 1.0;
-                offset: -1 -1;
-                to: "label_background";
-            }
-            text {
-                font: "Sans";
-                size: 1;
-                fit: 1 1;
-                align: 0.0 0.5;
-            }
-        }
-    }
-    part {
-        name: "dialer_box";
-        type: RECT;
-        mouse_events: 0;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            rel1 {
-                relative: 0.0 0.42;
-                offset: 0 0;
-                to: "swallow_main";
-            }
-            rel2 {
-                relative: 1.0 1.0;
-                offset: -1 -1;
-                to: "swallow_main";
-            }
-            color: 255 255 255 255;
-        }
-    }
-    
-    #define PIN_ICON(part_name, xpos, ypos, label)                      \
-    part {                                                              \
-        name: "button_"part_name;                                       \
-        type: IMAGE;                                                    \
-        mouse_events: 1;                                                \
-        clip_to: "swallow_clip";                                        \
-        description {                                                   \
-            state: "default" 0.0;                                       \
-            rel1 {                                                      \
-                relative: 0.25*xpos 0.25*ypos;                          \
-                offset: 1 1;                                            \
-                to: "dialer_box";                                       \
-            }                                                           \
-            rel2 {                                                      \
-                relative: 0.25+(0.25*xpos) 0.25+(0.25*ypos);            \
-                offset: -2 -2;                                          \
-                to: "dialer_box";                                       \
-            }                                                           \
-            image { normal: "button_background.png"; }                  \
-        }                                                               \
-        description {                                                   \
-            state: "active" 0.0;                                        \
-            inherit: "default" 0.0;                                     \
-            image { normal: "button_background_active.png"; }           \
-        }                                                               \
-    }                                                                   \
-    part {                                                              \
-        name: "label_"part_name;                                        \
-        type: TEXT;                                                     \
-        effect: SOFT_OUTLINE;                                           \
-        mouse_events: 0;                                                \
-        clip_to: "swallow_clip";                                        \
-        description {                                                   \
-            state: "default" 0.0;                                       \
-            align: 0.5 0.5;                                             \
-            rel1 {                                                      \
-                relative: 0.0 0.0;                                      \
-                offset: 0 0;                                            \
-                to: "button_"part_name;                                 \
-            }                                                           \
-            rel2 {                                                      \
-                relative: 1.0 0.8;                                      \
-                offset: -1 -1;                                          \
-                to: "button_"part_name;                                 \
-            }                                                           \
-            text {                                                      \
-                font: "Sans";                                           \
-                text: label;                                            \
-                size: 1;                                                \
-                fit: 1 1;                                               \
-            }                                                           \
-        }                                                               \
-    }
-    PIN_ICON("1", 0, 0, "1");
-    PIN_ICON("2", 1, 0, "2");
-    PIN_ICON("3", 2, 0, "3");
-    PIN_ICON("4", 0, 1, "4");
-    PIN_ICON("5", 1, 1, "5");
-    PIN_ICON("6", 2, 1, "6");
-    PIN_ICON("7", 0, 2, "7");
-    PIN_ICON("8", 1, 2, "8");
-    PIN_ICON("9", 2, 2, "9");
-    PIN_ICON("left", 0, 3, "");
-    PIN_ICON("0", 1, 3, "0");
-    PIN_ICON("right", 2, 3, "");
-    
-    
-    part {
-        name: "button_delete";
-        type: IMAGE;
-        mouse_events: 1;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            rel1 {
-                relative: 0.75 0.0;
-                offset: 1 1;
-                to: "dialer_box";
-            }
-            rel2 {
-                relative: 1.0 0.25;
-                offset: -2 -2;
-                to: "dialer_box";
-            }
-            image { normal: "button_background.png"; }
-        }
-        description {
-            state: "active" 0.0;
-            inherit: "default" 0.0;
-            image { normal: "button_background_active.png"; }
-        }
-    }
-    part {
-        name: "icon_delete";
-        mouse_events: 0;
-        type: IMAGE;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            aspect: 1.0 1.0;
-            aspect_preference: BOTH;
-            rel1 {
-                relative: 0.0 0.0;
-                offset: 0 0;
-                to: "button_delete";
-            }
-            rel2 {
-                relative: 1.0 1.0;
-                offset: -1 -1;
-                to: "button_delete";
-            }
-            image { normal: "icon_left.png"; }
-        }
-    }
-    part {
-        name: "button_done";
-        type: IMAGE;
-        mouse_events: 1;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            rel1 {
-                relative: 0.75 0.25;
-                offset: 1 1;
-                to: "dialer_box";
-            }
-            rel2 {
-                relative: 1.0 0.75;
-                offset: -2 -2;
-                to: "dialer_box";
-            }
-            image { normal: "button_background.png"; }
-        }
-        description {
-            state: "active" 0.0;
-            inherit: "default" 0.0;
-            image { normal: "button_background_active.png"; }
-        }
-    }
-    part {
-        name: "icon_done";
-        mouse_events: 0;
-        type: IMAGE;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            aspect: 1.0 1.0;
-            aspect_preference: BOTH;
-            rel1 {
-                relative: 0.0 0.0;
-                offset: 0 0;
-                to: "button_done";
-            }
-            rel2 {
-                relative: 1.0 1.0;
-                offset: -1 -1;
-                to: "button_done";
-            }
-            image { normal: "icon_accept.png"; }
-        }
-    }
-    part {
-        name: "button_dummy";
-        type: IMAGE;
-        mouse_events: 1;
-        clip_to: "swallow_clip";
-        description {
-            state: "default" 0.0;
-            rel1 {
-                relative: 0.75 0.75;
-                offset: 1 1;
-                to: "dialer_box";
-            }
-            rel2 {
-                relative: 1.0 1.0;
-                offset: -2 -2;
-                to: "dialer_box";
-            }
-            image { normal: "button_background.png"; }
-        }
-        description {
-            state: "active" 0.0;
-            inherit: "default" 0.0;
-            image { normal: "button_background_active.png"; }
-        }
-    }
-    
-    BUTTONS_BOTTOM();
-    BUTTON_OPTIONS();
-    BUTTON_MENU();
-    BUTTON_CLOSE();
-}
-programs {
-    ACTIVATE("button_bottom_right");
-    
-    ACTIVATE("button_1");
-    ACTIVATE("button_2");
-    ACTIVATE("button_3");
-    ACTIVATE("button_4");
-    ACTIVATE("button_5");
-    ACTIVATE("button_6");
-    ACTIVATE("button_7");
-    ACTIVATE("button_8");
-    ACTIVATE("button_9");
-    ACTIVATE("button_0");
-    ACTIVATE("button_delete");
-    ACTIVATE("button_done");
-    
-    #define EMIT_PIN_BUTTON_PRESSED(part_name)                          \
-    program {                                                           \
-        name: "emit_pin_button_pressed_"part_name;                      \
-        signal: "mouse,clicked,1";                                      \
-        source: part_name;                                              \
-        action: SIGNAL_EMIT "pin_button_pressed" part_name;             \
-    }
-    
-    EMIT_PIN_BUTTON_PRESSED("button_1");
-    EMIT_PIN_BUTTON_PRESSED("button_2");
-    EMIT_PIN_BUTTON_PRESSED("button_3");
-    EMIT_PIN_BUTTON_PRESSED("button_4");
-    EMIT_PIN_BUTTON_PRESSED("button_5");
-    EMIT_PIN_BUTTON_PRESSED("button_6");
-    EMIT_PIN_BUTTON_PRESSED("button_7");
-    EMIT_PIN_BUTTON_PRESSED("button_8");
-    EMIT_PIN_BUTTON_PRESSED("button_9");
-    EMIT_PIN_BUTTON_PRESSED("button_0");
-    EMIT_PIN_BUTTON_PRESSED("button_delete");
-    EMIT_PIN_BUTTON_PRESSED("button_done");
-    
-    TRANSITION();
-}
diff --git a/src/zhone b/src/zhone
index 8751f7c..e0d595e 100755
--- a/src/zhone
+++ b/src/zhone
@@ -1209,92 +1209,6 @@ class pyphone_message(edje_group):
                 self.part_text_set("label2_%d_%d" % (i,j) , text)
 
 #----------------------------------------------------------------------------#
-class pyphone_pin(edje_group):
-#----------------------------------------------------------------------------#
-    def __init__(self, main):
-        edje_group.__init__(self, main, "pin")
-        self.part_text_set( "label_description", u"SIM PIN?" )
-        self.text = []
-
-    @edje.decorators.signal_callback("pin_button_pressed", "*")
-    def on_edje_signal_pin_button_pressed(self, emission, source):
-        key = source.split("_", 1)[1]
-        if key in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"):
-            self.text.append(key)
-            # The trailing whitespace is a workaround for the one char invisible
-            # bug due to some problems with scaling of text parts.
-            self.part_text_set("label", u"".join(self.text)+u" ")
-        elif key in "delete":
-            self.text = self.text[:-1]
-            self.part_text_set("label", u"".join(self.text)+u" ")
-        elif key in "done":
-            if dbus_object.gsm_device_obj:
-                try:
-                    self.part_text_set( "label_description", u"Sending..." )
-                    # call mainloop.processEvents()
-                    dbus_object.gsm_sim_iface.SendAuthCode( "".join(self.text) )
-                except DBusException, e:
-                    try:
-                        authstatus = dbus_object.gsm_sim_iface.GetAuthStatus()
-                        if authstatus == "SIM PUK":
-                            self.main.transition_to("puk")
-                        elif authstatus == "SIM PIN":
-                            self.part_text_set( "label_description", u"Invalid. SIM PIN?" )
-                    except DBusException, e:
-                        logger.exception( "can't get auth status" )
-                else:
-                    self.part_text_set("label", u"")
-                    dbus_object.gsm_device_iface.SetAntennaPower(True)
-                    dbus_object.gsm_network_iface.Register()
-#                    # FIXME wait for the ready signal
-#                    self.main.groups["contacts"].prepare()
-#                    self.main.groups["sms"].prepare()
-                    self.main.transition_to("main")
-
-#----------------------------------------------------------------------------#
-class pyphone_puk(edje_group):
-#----------------------------------------------------------------------------#
-    def __init__(self, main):
-        edje_group.__init__(self, main, "puk")
-        self.part_text_set( "label_description", u"SIM PUK?" )
-        self.text = []
-        self.puk = []
-
-    @edje.decorators.signal_callback("pin_button_pressed", "*")
-    def on_edje_signal_puk_button_pressed(self, emission, source):
-        key = source.split("_", 1)[1]
-        if key in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"):
-            self.text.append(key)
-            # The trailing whitespace is a workaround for the one char invisible
-            # bug due to some problems with scaling of text parts.
-            self.part_text_set("label", u"".join(self.text)+u" ")
-        elif key in "delete":
-            self.text = self.text[:-1]
-            self.part_text_set("label", u"".join(self.text)+u" ")
-        elif key in "done":
-            if self.puk == []:
-              self.part_text_set( "label_description", u"New PIN?" )
-              self.puk = self.text
-              self.text = []
-            elif dbus_object.gsm_device_obj:
-                try:
-                    self.part_text_set( "label_description", u"Sending..." )
-                    dbus_object.gsm_sim_iface.Unlock("".join(self.puk), "".join(self.text))
-                except DBusException, e:
-                    logger.exception( "can't unlock SIM" )
-                    self.part_text_set( "label_description", u"Invalid. SIM PUK?" )
-                else:
-                    self.part_text_set("label", u"")
-                    self.text = []
-                    self.puk = []
-                    dbus_object.gsm_device_iface.SetAntennaPower(True)
-                    dbus_object.gsm_network_iface.Register()
-#                    # FIXME wait for the ready signal
-#                    self.main.groups["contacts"].prepare()
-#                    self.main.groups["sms"].prepare()
-                    self.main.transition_to("main")
-
-#----------------------------------------------------------------------------#
 class pyphone_list_choose(edje_group):
 #----------------------------------------------------------------------------#
     def __init__( self, main ):
@@ -1695,7 +1609,6 @@ class GUI(object):
                 "contacts",
                 "location",
                 "configuration",
-                "pin", "puk",
                 "list_choose", "number_edit", "pin_edit", "text_edit", "text_show", "message"
             ):
             ctor = globals().get( "pyphone_%s" % page, None )

-- 
freesmartphone.org demo GUI



More information about the pkg-fso-commits mailing list