r3175 - in trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
thomas at sita.openmoko.org
thomas at sita.openmoko.org
Mon Oct 15 15:33:59 CEST 2007
Author: thomas
Date: 2007-10-15 15:33:58 +0200 (Mon, 15 Oct 2007)
New Revision: 3175
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
Log:
* src/moko-dialer-panel.c: (moko_dialer_panel_init),
(moko_dialer_panel_pressed):
Don't use -1 as a char value
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog 2007-10-15 12:50:15 UTC (rev 3174)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog 2007-10-15 13:33:58 UTC (rev 3175)
@@ -1,5 +1,12 @@
2007-10-15 Thomas Wood <thomas at openedhand.com>
+ * src/moko-dialer-panel.c: (moko_dialer_panel_init),
+ (moko_dialer_panel_pressed):
+
+ Don't use -1 as a char value
+
+2007-10-15 Thomas Wood <thomas at openedhand.com>
+
* configure.ac:
* src/Makefile.am:
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c 2007-10-15 12:50:15 UTC (rev 3174)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c 2007-10-15 13:33:58 UTC (rev 3175)
@@ -20,13 +20,16 @@
#include "moko-digit-button.h"
G_DEFINE_TYPE (MokoDialerPanel, moko_dialer_panel, GTK_TYPE_VBOX)
- enum
- {
- CLICKED_SIGNAL,
- HOLD_SIGNAL,
- LAST_SIGNAL
- };
+#define NOVALUE '\0'
+
+enum
+{
+ CLICKED_SIGNAL,
+ HOLD_SIGNAL,
+ LAST_SIGNAL
+};
+
//forward definition
static gboolean moko_dialer_panel_pressed (MokoDigitButton * button,
GdkEventButton * event,
@@ -102,9 +105,9 @@
};
gchar rightchar[4][3] = {
- {-1, -1, -1},
- {-1, -1, -1},
- {-1, -1, -1},
+ {NOVALUE, NOVALUE, NOVALUE},
+ {NOVALUE, NOVALUE, NOVALUE},
+ {NOVALUE, NOVALUE, NOVALUE},
{'+', 'p', 'w'}
};
@@ -165,7 +168,7 @@
if (event->type == GDK_BUTTON_PRESS)
{
HoldTimeoutData *timeout_data;
- gchar value = -1;
+ gchar value = NOVALUE;
/* Normal 'clicked' event */
value = moko_digit_button_get_left (button);
@@ -175,7 +178,7 @@
value = moko_digit_button_get_right (button);
/* this button doesn't have a "hold" value */
- if (value == -1)
+ if (value == NOVALUE)
return FALSE;
timeout_data = g_new0 (HoldTimeoutData, 1);
More information about the commitlog
mailing list