Changeset 3151
- Timestamp:
- 10/12/07 14:57:47 (6 years ago)
- Location:
- trunk/src/target/OM-2007.2/applications/openmoko-dialer2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
src/moko-keypad.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
r3150 r3151 1 2007-10-12 Thomas Wood <thomas@openedhand.com> 2 3 * src/moko-keypad.c: Clear dialer display when delete button held down, 4 rather than only when held and released 5 1 6 2007-10-12 Thomas Wood <thomas@openedhand.com> 2 7 -
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-keypad.c
r3150 r3151 174 174 175 175 static gboolean 176 moko_keypad_hold_timeout (MokoDialerTextview *textview) 177 { 178 moko_dialer_textview_empty (textview); 179 return FALSE; 180 } 181 182 static gboolean 176 183 on_delete_event (GtkWidget *button, GdkEventButton *event, MokoKeypad *keypad) 177 184 { 178 #define TAP_HOLD_TIME 800179 185 MokoKeypadPrivate *priv; 180 186 MokoDialerTextview *textview; 181 static guint32 last_event = 0;182 187 GList *matches; 183 188 static gint hold_timeout_source = 0; 189 184 190 g_return_val_if_fail (MOKO_IS_KEYPAD (keypad), FALSE); 185 191 priv = keypad->priv; 186 192 187 193 textview = MOKO_DIALER_TEXTVIEW (priv->textview); 188 194 189 195 if (event->type == GDK_BUTTON_PRESS) 190 196 { 191 last_event = event->time; 197 moko_dialer_textview_delete (textview); 198 hold_timeout_source = g_timeout_add (800, (GSourceFunc) moko_keypad_hold_timeout, textview); 192 199 return FALSE; 193 200 } 194 201 else if (event->type == GDK_BUTTON_RELEASE) 195 202 { 196 guint32 diff = event->time - last_event; 197 198 if (diff < TAP_HOLD_TIME) 199 { 200 /* Normal 'clicked' event */ 201 moko_dialer_textview_delete (textview); 202 } 203 else 204 { 205 /* Tap-and-hold event */ 206 moko_dialer_textview_empty (textview); 207 } 208 } 209 203 g_source_remove (hold_timeout_source); 204 } 205 210 206 if (!priv->pin_mode) 211 207 {
Note: See TracChangeset
for help on using the changeset viewer.
