Send commitlog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r1998 - in
trunk/src/target/OM-2007/applications/openmoko-contacts: . src
([EMAIL PROTECTED])
2. r1999 - in trunk/src/target/OM-2007/openmoko-libs: .
libmokogsmd ([EMAIL PROTECTED])
3. r2000 -
trunk/src/target/OM-2007/applications/openmoko-dialer/src
([EMAIL PROTECTED])
4. r2001 - trunk/src/target/OM-2007/openmoko-libs/libmokogsmd
([EMAIL PROTECTED])
5. r2002 - in
trunk/src/target/OM-2007/applications/openmoko-dialer: . src
([EMAIL PROTECTED])
6. r2003 - in
trunk/src/target/OM-2007/applications/openmoko-footer: . src
([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2007-05-17 13:20:48 +0200 (Thu, 17 May 2007)
New Revision: 1998
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.h
Log:
* src/contacts-omoko.c: (create_main_window):
* src/contacts-omoko.h:
Use moko stock icons
Modified: trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
2007-05-17 11:13:53 UTC (rev 1997)
+++ trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog
2007-05-17 11:20:48 UTC (rev 1998)
@@ -1,5 +1,11 @@
2007-05-17 Thomas Wood <[EMAIL PROTECTED]>
+ * src/contacts-omoko.c: (create_main_window):
+ * src/contacts-omoko.h:
+ Use moko stock icons
+
+2007-05-17 Thomas Wood <[EMAIL PROTECTED]>
+
Patch by: Neil J Patel <[EMAIL PROTECTED]>
* src/contacts-contact-pane.c:
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
2007-05-17 11:13:53 UTC (rev 1997)
+++
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c
2007-05-17 11:20:48 UTC (rev 1998)
@@ -121,6 +121,7 @@
//? MokoApplication* app =
MOKO_APPLICATION(moko_application_get_instance());
g_set_application_name (_("Contacts"));
+ moko_stock_register ();
ui->main_window = moko_paned_window_new ();
gtk_window_set_title (GTK_WINDOW (ui->main_window), _("Contacts"));
@@ -212,15 +213,13 @@
/* groups button */
widget = GTK_WIDGET (moko_tool_box_add_action_button (MOKO_TOOL_BOX
(moko_tool_box)));
- moko_pixmap_button_set_center_stock (MOKO_PIXMAP_BUTTON (widget),
-
"openmoko-action-button-group-icon");
+ moko_pixmap_button_set_center_stock (MOKO_PIXMAP_BUTTON (widget),
MOKO_STOCK_CONTACT_GROUPS);
g_signal_connect (G_OBJECT (widget), "clicked",
G_CALLBACK (contacts_groups_pane_show),
contacts_data);
/* history button */
widget = GTK_WIDGET (moko_tool_box_add_action_button (MOKO_TOOL_BOX
(moko_tool_box)));
- moko_pixmap_button_set_center_stock (MOKO_PIXMAP_BUTTON (widget),
-
"openmoko-action-button-history-icon");
+ moko_pixmap_button_set_center_stock (MOKO_PIXMAP_BUTTON (widget),
MOKO_STOCK_HISTORY);
/* edit button */
widget = GTK_WIDGET (moko_tool_box_add_action_button (MOKO_TOOL_BOX
(moko_tool_box)));
@@ -230,8 +229,7 @@
/* view button */
widget = GTK_WIDGET (moko_tool_box_add_action_button (MOKO_TOOL_BOX
(moko_tool_box)));
- moko_pixmap_button_set_center_stock (MOKO_PIXMAP_BUTTON (widget),
-
"openmoko-action-button-view-icon");
+ moko_pixmap_button_set_center_stock (MOKO_PIXMAP_BUTTON (widget),
MOKO_STOCK_VIEW);
g_signal_connect (G_OBJECT (widget), "clicked",
G_CALLBACK (contacts_view_cb), contacts_data);
Modified:
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.h
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.h
2007-05-17 11:13:53 UTC (rev 1997)
+++
trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.h
2007-05-17 11:20:48 UTC (rev 1998)
@@ -22,16 +22,8 @@
#include <string.h>
#include <gtk/gtk.h>
#include <glib.h>
-#include <libmokoui/moko-application.h>
-#include <libmokoui/moko-details-window.h>
-#include <libmokoui/moko-dialog-window.h>
-#include <libmokoui/moko-paned-window.h>
-#include <libmokoui/moko-tool-box.h>
-#include <libmokoui/moko-navigation-list.h>
-#include <libmokoui/moko-scrolled-pane.h>
-#include <libmokoui/moko-stock.h>
+#include <libmokoui/moko-ui.h>
-
#ifndef OMOKO_H
#define OMOKO_H
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-05-17 13:46:02 +0200 (Thu, 17 May 2007)
New Revision: 1999
Modified:
trunk/src/target/OM-2007/openmoko-libs/ChangeLog
trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.h
Log:
* libmokogsmd/moko-gsmd-connection.h: Add MokoGsmdConnectionProgress
Modified: trunk/src/target/OM-2007/openmoko-libs/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/ChangeLog 2007-05-17 11:20:48 UTC
(rev 1998)
+++ trunk/src/target/OM-2007/openmoko-libs/ChangeLog 2007-05-17 11:46:02 UTC
(rev 1999)
@@ -1,5 +1,9 @@
2007-05-17 Thomas Wood <[EMAIL PROTECTED]>
+ * libmokogsmd/moko-gsmd-connection.h: Add MokoGsmdConnectionProgress
+
+2007-05-17 Thomas Wood <[EMAIL PROTECTED]>
+
* libmokoui/moko-stock.c:
* libmokoui/moko-stock.h:
Modified:
trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.h
2007-05-17 11:20:48 UTC (rev 1998)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.h
2007-05-17 11:46:02 UTC (rev 1999)
@@ -19,7 +19,6 @@
#define _MOKO_GSMD_CONNECTION_H_
#include <glib-object.h>
-#include <gsmd/event.h>
G_BEGIN_DECLS
@@ -51,6 +50,21 @@
MOKO_GSMD_CONNECTION_NETREG_ROAMING = 5,
} MokoGsmdConnectionNetregType;
+
+enum {
+ MOKO_GSMD_PROG_SETUP = 0,
+ MOKO_GSMD_PROG_DISCONNECT = 1,
+ MOKO_GSMD_PROG_ALERT = 2,
+ MOKO_GSMD_PROG_CALL_PROCEED = 3,
+ MOKO_GSMD_PROG_SYNC = 4,
+ MOKO_GSMD_PROG_PROGRESS = 5,
+ MOKO_GSMD_PROG_CONNECTED = 6,
+ MOKO_GSMD_PROG_RELEASE = 7,
+ MOKO_GSMD_PROG_REJECT = 8,
+ MOKO_GSMD_PROG_UNKNOWN = 9,
+} MokoGsmdConnectionProgress;
+
+
/* signals */
void moko_gsmd_connection_incoming_call(MokoGsmdConnection* self, int type);
void moko_gsmd_connection_call_status_progress(MokoGsmdConnection* self, int
type);
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-05-17 13:47:04 +0200 (Thu, 17 May 2007)
New Revision: 2000
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c
Log:
openmoko-dialer: use MokoGsmdConnectionProgress
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c
2007-05-17 11:46:02 UTC (rev 1999)
+++
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c
2007-05-17 11:47:04 UTC (rev 2000)
@@ -250,13 +250,13 @@
void
call_progress_cb (MokoGsmdConnection *connection, int type, MokoDialerData
*data)
{
- if (type == GSMD_CALLPROG_REJECT)
+ if (type == MOKO_GSMD_PROG_REJECT)
{
g_debug ("call rejected");
return;
}
- if (type == GSMD_CALLPROG_CONNECTED)
+ if (type == MOKO_GSMD_PROG_CONNECTED)
{
gtk_dialog_response (data->window_outgoing, GTK_RESPONSE_OK);
}
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-05-17 20:46:37 +0200 (Thu, 17 May 2007)
New Revision: 2001
Modified:
trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.c
trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.h
Log:
libmokogsmd: register signal "pin-requested"
Modified:
trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.c
2007-05-17 11:47:04 UTC (rev 2000)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.c
2007-05-17 18:46:37 UTC (rev 2001)
@@ -25,8 +25,8 @@
#include <string.h>
#include <errno.h>
+#define DEBUG_THIS_FILE
#undef DEBUG_THIS_FILE
-#define DEBUG_THIS_FILE
#ifdef DEBUG_THIS_FILE
#define moko_debug(fmt,...) g_debug(fmt,##__VA_ARGS__)
@@ -177,7 +177,18 @@
G_TYPE_INT,
NULL);
- //TODO add SIGNAL_GSMD_EVT_PIN
+ moko_gsmd_connection_signals[SIGNAL_GSMD_EVT_PIN] = g_signal_new
+ ("pin-requested",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+ NULL,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_INT,
+ NULL);
moko_gsmd_connection_signals[SIGNAL_GSMD_EVT_OUT_STATUS] = g_signal_new
("call-progress",
@@ -279,6 +290,14 @@
return 0;
}
+/* this is the handler for receiving passthrough responses */
+static int
+pt_msghandler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
+{
+ char *payload = (char *)gmh + sizeof(*gmh);
+ g_debug("PASSTHROUGH RESPONSE = '%s'", payload);
+}
+
static void
moko_gsmd_connection_init(MokoGsmdConnection* self)
{
@@ -321,6 +340,7 @@
moko_debug( "-- registered for event %d, return code %d", i, rc );
}
+ lgsm_register_handler( priv->handle, GSMD_MSG_PASSTHROUGH, &pt_msghandler);
}
/* public API */
@@ -370,3 +390,10 @@
g_return_if_fail( priv->handle );
lgsm_voice_dtmf( priv->handle, number );
}
+
+void moko_gsmd_connection_trigger_signal_strength_event(MokoGsmdConnection*
self)
+{
+ MokoGsmdConnectionPrivate* priv = GSMD_CONNECTION_GET_PRIVATE(self);
+ g_return_if_fail( priv->handle );
+ lgsm_signal_quality( priv->handle );
+}
Modified:
trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.h
2007-05-17 11:47:04 UTC (rev 2000)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokogsmd/moko-gsmd-connection.h
2007-05-17 18:46:37 UTC (rev 2001)
@@ -72,6 +72,7 @@
//gprs
void moko_gsmd_connection_incoming_clip(MokoGsmdConnection* self, const char*
number);
void moko_gsmd_connection_network_registration(MokoGsmdConnection* self, int
type, int lac, int cell);
+void moko_gsmd_connection_trigger_signal_strength_event(MokoGsmdConnection*
self);
void moko_gsmd_connection_signal_strength_changed(MokoGsmdConnection* self,
int strength);
//voice
void moko_gsmd_connection_voice_accept(MokoGsmdConnection* self);
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-05-17 20:47:06 +0200 (Thu, 17 May 2007)
New Revision: 2002
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/openmoko-dialer.pro
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.c
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.h
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-main.c
Log:
openmoko-dialer: prepare to show PIN dialog on demand
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/openmoko-dialer.pro
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/openmoko-dialer.pro
2007-05-17 18:46:37 UTC (rev 2001)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/openmoko-dialer.pro
2007-05-17 18:47:06 UTC (rev 2002)
@@ -1,11 +1,21 @@
-HEADERS += \
+TEMPLATE = app
+DEPENDPATH += src
+INCLUDEPATH += . src
+
+# Input
+HEADERS += config.h \
src/alsa.h \
src/common.h \
src/contacts.h \
- src/dialergsm.h \
+ src/dialer-callbacks-connection.h \
+ src/dialer-main.h \
+ src/dialer-window-dialer.h \
+ src/dialer-window-history.h \
+ src/dialer-window-incoming.h \
+ src/dialer-window-outgoing.h \
+ src/dialer-window-pin.h \
+ src/dialer-window-talking.h \
src/error.h \
- src/event.h \
- src/history.h \
src/moko-dialer-autolist.h \
src/moko-dialer-declares.h \
src/moko-dialer-includes.h \
@@ -13,38 +23,27 @@
src/moko-dialer-status.h \
src/moko-dialer-textview.h \
src/moko-dialer-tip.h \
- src/moko-digit-button.h \
- src/openmoko-dialer-main.h \
- src/openmoko-dialer-window-dialer.h \
- src/openmoko-dialer-window-history.h \
- src/openmoko-dialer-window-incoming.h \
- src/openmoko-dialer-window-outgoing.h \
- src/openmoko-dialer-window-pin.h \
- src/openmoko-dialer-window-talking.h
+ src/moko-digit-button.h
-SOURCES += \
- src/alsa.c \
+SOURCES += src/alsa.c \
src/common.c \
src/contacts.c \
- src/dialergsm.c \
- src/event.c \
- src/history.c \
+ src/dialer-callbacks-connection.c \
+ src/dialer-main.c \
+ src/dialer-window-dialer.c \
+ src/dialer-window-history.c \
+ src/dialer-window-incoming.c \
+ src/dialer-window-outgoing.c \
+ src/dialer-window-pin.c \
+ src/dialer-window-talking.c \
src/moko-dialer-autolist.c \
src/moko-dialer-panel.c \
src/moko-dialer-status.c \
src/moko-dialer-textview.c \
src/moko-dialer-tip.c \
- src/moko-digit-button.c \
- src/openmoko-dialer-main.c \
- src/openmoko-dialer-window-dialer.c \
- src/openmoko-dialer-window-history.c \
- src/openmoko-dialer-window-incoming.c \
- src/openmoko-dialer-window-outgoing.c \
- src/openmoko-dialer-window-pin.c \
- src/openmoko-dialer-window-talking.c
+ src/moko-digit-button.c
-MOKOCONFIG = mokoui
-PKGCONFIG += libebook-1.2 libgsmd alsa
+MOKOCONFIG = mokoui mokogsmd mokojournal
+PKGCONFIG += libebook-1.2 alsa
include ( $(OPENMOKODIR)/devel/qmake/openmoko-include.pro )
-
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.c
2007-05-17 18:46:37 UTC (rev 2001)
+++
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.c
2007-05-17 18:47:06 UTC (rev 2002)
@@ -1,3 +1,21 @@
+/* openmoko-callbacks-connection.h
+ *
+ * Authored By Tony Guan <[EMAIL PROTECTED]>
+ * Thomas Wood <[EMAIL PROTECTED]>
+ * Michael 'Mickey' Lauer <[EMAIL PROTECTED]>
+ *
+ * Copyright (C) 2006-2007 OpenMoko, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Public License as published by
+ * the Free Software Foundation; version 2.1 of the license.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser Public License for more details.
+ *
+ */
#include "dialer-callbacks-connection.h"
#include "dialer-window-incoming.h"
@@ -22,3 +40,16 @@
/* caller id */
window_incoming_update_message (data, number);
}
+
+void
+incoming_pin_request_cb (MokoGsmdConnection *self, int type, MokoDialerData
*data)
+{
+ g_debug( "INCOMING PIN REQUEST!\n!\n!\n!\n" );
+}
+
+gboolean initial_timeout_cb (MokoGsmdConnection *conn)
+{
+ g_debug( "INITIAL TIMEOUT" );
+ //moko_gsmd_connection_network_register( conn );
+ return FALSE;
+}
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.h
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.h
2007-05-17 18:46:37 UTC (rev 2001)
+++
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-callbacks-connection.h
2007-05-17 18:47:06 UTC (rev 2002)
@@ -1,3 +1,21 @@
+/* openmoko-callbacks-connection.h
+ *
+ * Authored By Tony Guan <[EMAIL PROTECTED]>
+ * Thomas Wood <[EMAIL PROTECTED]>
+ * Michael 'Mickey' Lauer <[EMAIL PROTECTED]>
+ *
+ * Copyright (C) 2006-2007 OpenMoko, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Public License as published by
+ * the Free Software Foundation; version 2.1 of the license.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser Public License for more details.
+ *
+ */
#ifndef _DIALER_CALLBACKS_CONNECTION_H
#define _DIALER_CALLBACKS_CONNECTION_H
@@ -8,5 +26,8 @@
void network_registration_cb (MokoGsmdConnection *self, int type, int lac, int
cell);
void incoming_call_cb (MokoGsmdConnection *self, int type, MokoDialerData
*data);
void incoming_clip_cb (MokoGsmdConnection *self, const char *number,
MokoDialerData *data);
+void incoming_pin_request_cb (MokoGsmdConnection *self, int type,
MokoDialerData *data);
+gboolean initial_timeout_cb (MokoGsmdConnection *conn);
+
#endif
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-main.c
2007-05-17 18:46:37 UTC (rev 2001)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-main.c
2007-05-17 18:47:06 UTC (rev 2002)
@@ -1,4 +1,4 @@
-/* openmoko-dialer.c
+/* openmoko-dialer.c
*
* Authored by Tony Guan<[EMAIL PROTECTED]>
*
@@ -18,7 +18,6 @@
#include <libmokoui/moko-ui.h>
#include <libmokogsmd/moko-gsmd-connection.h>
-
#include <gtk/gtk.h>
#include <signal.h>
#include <unistd.h>
@@ -182,12 +181,16 @@
/* Set up gsmd connection object */
MokoGsmdConnection* conn = p_dialer_data->connection =
moko_gsmd_connection_new ();
+
+ /* power on GSM */
moko_gsmd_connection_set_antenna_power (conn, TRUE);
- sleep (4); /* FIXME: this is horrible */
- moko_gsmd_connection_network_register (conn);
+ /* handle network registration 4 seconds after powering GSM */
+ g_timeout_add( 4 * 1000, (GSourceFunc) initial_timeout_cb, conn );
+
g_signal_connect (G_OBJECT (conn), "network-registration", (GCallback)
network_registration_cb, p_dialer_data);
g_signal_connect (G_OBJECT (conn), "incoming-call", (GCallback)
incoming_call_cb, p_dialer_data);
g_signal_connect (G_OBJECT (conn), "incoming-clip", (GCallback)
incoming_clip_cb, p_dialer_data);
+ g_signal_connect (G_OBJECT (conn), "pin-requested", (GCallback)
incoming_pin_request_cb, p_dialer_data);
/* Set up journal handling */
p_dialer_data->journal = moko_journal_open_default ();
--- End Message ---
--- Begin Message ---
Author: alphaone
Date: 2007-05-18 02:02:09 +0200 (Fri, 18 May 2007)
New Revision: 2003
Added:
trunk/src/target/OM-2007/applications/openmoko-footer/src/taskitem.c
trunk/src/target/OM-2007/applications/openmoko-footer/src/taskitem.h
Modified:
trunk/src/target/OM-2007/applications/openmoko-footer/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-footer/src/Makefile.am
trunk/src/target/OM-2007/applications/openmoko-footer/src/taskmanager.c
Log:
* src/Makefile.am, src/taskitem.c, src/taskitem.h, src/taskmanager.c:
Add support for taskitems (consisting of an image and a label)
Modified: trunk/src/target/OM-2007/applications/openmoko-footer/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-footer/ChangeLog
2007-05-17 18:47:06 UTC (rev 2002)
+++ trunk/src/target/OM-2007/applications/openmoko-footer/ChangeLog
2007-05-18 00:02:09 UTC (rev 2003)
@@ -1,3 +1,12 @@
+2007-05-18 Daniel Willmann <[EMAIL PROTECTED]>
+
+ * src/Makefile.am:
+ * src/taskitem.c: Added.
+ * src/taskitem.h: Added.
+ * src/taskmanager.c:
+ (taskmanager_init):
+ Add support for taskitems (consisting of an
image and a label)
+
2007-05-17 Daniel Willmann <[EMAIL PROTECTED]>
* src/Makefile.am:
Modified: trunk/src/target/OM-2007/applications/openmoko-footer/src/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-footer/src/Makefile.am
2007-05-17 18:47:06 UTC (rev 2002)
+++ trunk/src/target/OM-2007/applications/openmoko-footer/src/Makefile.am
2007-05-18 00:02:09 UTC (rev 2003)
@@ -6,7 +6,7 @@
bin_PROGRAMS = openmoko-footer
-openmoko_footer_SOURCES = main.c footer.c callbacks.c taskmanager.c misc.c
+openmoko_footer_SOURCES = main.c footer.c callbacks.c taskmanager.c taskitem.c
misc.c
openmoko_footer_LDADD = @OPENMOKO_LIBS@
Added: trunk/src/target/OM-2007/applications/openmoko-footer/src/taskitem.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-footer/src/taskitem.c
2007-05-17 18:47:06 UTC (rev 2002)
+++ trunk/src/target/OM-2007/applications/openmoko-footer/src/taskitem.c
2007-05-18 00:02:09 UTC (rev 2003)
@@ -0,0 +1,52 @@
+/*
+ * Footer - Task item
+ *
+ * Authored by Daniel Willmann <[EMAIL PROTECTED]>
+ *
+ * Copyright (C) 2007 OpenMoko, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Public License as published by
+ * the Free Software Foundation; version 2 of the license.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Public License for more details.
+ *
+ * Current Version: $Rev$ ($Date$) [$Author$]
+ */
+
+#include "taskitem.h"
+
+#include <gtk/gtk.h>
+#include <glib.h>
+
+void moko_task_item_init( MokoTaskItem *ti, gchar *name, GdkPixbuf *icon )
+{
+ GdkPixbuf *scaled_icon;
+
+ ti->box = gtk_vbox_new( FALSE, 0 );
+ ti->name = gtk_label_new( name );
+
+ scaled_icon = gdk_pixbuf_scale_simple ( icon, 140, 140, GDK_INTERP_BILINEAR
);
+ ti->icon = gtk_image_new_from_pixbuf( scaled_icon );
+ g_object_unref( G_OBJECT(scaled_icon) );
+
+ gtk_box_pack_start( GTK_BOX(ti->box), GTK_WIDGET(ti->icon), TRUE, TRUE, 0 );
+ gtk_box_pack_start( GTK_BOX(ti->box), GTK_WIDGET(ti->name), TRUE, TRUE, 0 );
+}
+
+void moko_task_item_set_name( MokoTaskItem *ti, gchar *name )
+{
+ gtk_label_set_text( ti->name, name );
+
+}
+
+void moko_task_item_set_icon( MokoTaskItem *ti, GdkPixbuf *icon )
+{
+ GdkPixbuf *scaled_icon;
+ scaled_icon = gdk_pixbuf_scale_simple ( icon, 140, 140, GDK_INTERP_BILINEAR
);
+ gtk_image_set_from_pixbuf( ti->icon, scaled_icon );
+ g_object_unref( G_OBJECT(scaled_icon) );
+}
Added: trunk/src/target/OM-2007/applications/openmoko-footer/src/taskitem.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-footer/src/taskitem.h
2007-05-17 18:47:06 UTC (rev 2002)
+++ trunk/src/target/OM-2007/applications/openmoko-footer/src/taskitem.h
2007-05-18 00:02:09 UTC (rev 2003)
@@ -0,0 +1,37 @@
+/*
+ * Footer - Task item
+ *
+ * Authored by Daniel Willmann <[EMAIL PROTECTED]>
+ *
+ * Copyright (C) 2007 OpenMoko, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Public License as published by
+ * the Free Software Foundation; version 2 of the license.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Public License for more details.
+ *
+ * Current Version: $Rev$ ($Date$) [$Author$]
+ */
+
+#ifndef _TASKITEM_H_
+#define _TASKITEM_H_
+
+#include <gtk/gtk.h>
+
+typedef struct _MokoTaskItem
+{
+ GtkWidget *name;
+ GtkWidget *icon;
+ GtkWidget *box;
+} MokoTaskItem;
+
+
+void moko_task_item_init( MokoTaskItem *ti, gchar *name, GdkPixbuf *icon );
+void moko_task_item_set_name( MokoTaskItem *ti, gchar *name );
+void moko_task_item_set_icon( MokoTaskItem *ti, GdkPixbuf *icon );
+
+#endif
Modified:
trunk/src/target/OM-2007/applications/openmoko-footer/src/taskmanager.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-footer/src/taskmanager.c
2007-05-17 18:47:06 UTC (rev 2002)
+++ trunk/src/target/OM-2007/applications/openmoko-footer/src/taskmanager.c
2007-05-18 00:02:09 UTC (rev 2003)
@@ -17,6 +17,7 @@
* Current Version: $Rev$ ($Date$) [$Author$]
*/
+#include "taskitem.h"
#include "taskmanager.h"
#include "callbacks.h"
@@ -32,6 +33,9 @@
{
Display *dpy;
GtkWidget *image;
+ GdkPixbuf *pixbuf;
+ GtkScrolledWindow *scroll;
+ MokoTaskItem *test;
dpy = GDK_DISPLAY();
@@ -65,5 +69,16 @@
tm->table = gtk_table_new( 3, 3, TRUE );
- moko_finger_window_set_contents( tm->window, GTK_WIDGET(tm->table) );
+ test = g_new0( MokoTaskItem, 1 );
+
+ pixbuf = gdk_pixbuf_new_from_file (PKGDATADIR"/icon_app_history.png", NULL);
+ moko_task_item_init( test, "Testentry", pixbuf );
+ gtk_table_attach_defaults( tm->table, GTK_WIDGET(test->box), 0, 1, 0, 1);
+
+ scroll = gtk_scrolled_window_new( NULL, NULL );
+ gtk_scrolled_window_set_policy( scroll, GTK_POLICY_NEVER, GTK_POLICY_NEVER );
+ gtk_widget_set_size_request (GTK_WINDOW(scroll), -1, 400);
+ gtk_scrolled_window_add_with_viewport(GTK_CONTAINER(scroll),
GTK_WIDGET(tm->table) );
+
+ moko_finger_window_set_contents( tm->window, GTK_WIDGET(scroll) );
}
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog