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. r3253 -
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui
([EMAIL PROTECTED])
2. r3254 - in
trunk/src/target/OM-2007.2/libraries/libmokopanelui2: .
libmokopanelui ([EMAIL PROTECTED])
3. r3255 - in
trunk/src/target/OM-2007.2/applications/openmoko-today2: . src
([EMAIL PROTECTED])
4. r3256 - in
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm: .
src ([EMAIL PROTECTED])
5. r3257 - in
trunk/src/target/OM-2007.2/applications/openmoko-today2: . src
([EMAIL PROTECTED])
6. r3258 - in
trunk/src/target/OM-2007.2/applications/openmoko-today2: . src
([EMAIL PROTECTED])
7. r3259 - trunk/src/target/OM-2007.2/artwork/pixmaps
([EMAIL PROTECTED])
8. r3260 - in
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2: .
images src ([EMAIL PROTECTED])
--- Begin Message ---
Author: mickey
Date: 2007-10-23 12:02:46 +0200 (Tue, 23 Oct 2007)
New Revision: 3253
Modified:
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
Log:
moko-panel-applet.c: add code to debug recent gsm icon breakage
Modified:
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
===================================================================
---
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
2007-10-23 09:42:37 UTC (rev 3252)
+++
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
2007-10-23 10:02:46 UTC (rev 3253)
@@ -203,6 +203,7 @@
if ( priv->filename_for_icon )
{
+ g_debug( "moko_panel_applet_iconadd_cb:'%s' (%p)",
priv->filename_for_icon, priv->filename_for_icon );
mb_panel_scaling_image_set_icon( MB_PANEL_SCALING_IMAGE(self->icon),
priv->filename_for_icon );
priv->filename_for_icon = 0;
}
@@ -214,6 +215,7 @@
////////////////
void moko_panel_applet_set_icon(MokoPanelApplet* self, const gchar* filename)
{
+ g_debug( "moko_panel_applet_set_icon:'%s' (%p)", filename, filename );
MokoPanelAppletPrivate* priv = MOKO_PANEL_APPLET_GET_PRIVATE( self );
if ( !self->icon )
{
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-10-23 12:21:01 +0200 (Tue, 23 Oct 2007)
New Revision: 3254
Modified:
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ChangeLog
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
Log:
libmokopanelui2: strdup the string that gets passed from outside the
glib mainloop to the inside. should fix recent icon breakage in gsm panel
Modified: trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ChangeLog
2007-10-23 10:02:46 UTC (rev 3253)
+++ trunk/src/target/OM-2007.2/libraries/libmokopanelui2/ChangeLog
2007-10-23 10:21:01 UTC (rev 3254)
@@ -1,6 +1,12 @@
+2007-10-23 Michael Lauer <[EMAIL PROTECTED]>
+
+ * libmokopanelui/moko-panel-applet.c:
+ Strdup the string that will be passed from outside the
+ mainloop to inside it. Fixes recent breakage of gsm panel icons.
+
2007-10-19 Michael Lauer <[EMAIL PROTECTED]>
- * libmokopanelui/moko-panel-appet.c:
+ * libmokopanelui/moko-panel-applet.c:
Try to workaround size-calculation bug in MBScaledPanelImage by
setting the actual icon @ mainloop idle time (and hopefully
after the enclosing widget has already been realized and we have
Modified:
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
===================================================================
---
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
2007-10-23 10:02:46 UTC (rev 3253)
+++
trunk/src/target/OM-2007.2/libraries/libmokopanelui2/libmokopanelui/moko-panel-applet.c
2007-10-23 10:21:01 UTC (rev 3254)
@@ -40,7 +40,7 @@
{
gboolean is_initialized;
gboolean hold_timeout_triggered;
- const char* filename_for_icon;
+ char* filename_for_icon;
} MokoPanelAppletPrivate;
enum {
@@ -205,6 +205,7 @@
{
g_debug( "moko_panel_applet_iconadd_cb:'%s' (%p)",
priv->filename_for_icon, priv->filename_for_icon );
mb_panel_scaling_image_set_icon( MB_PANEL_SCALING_IMAGE(self->icon),
priv->filename_for_icon );
+ g_free( priv->filename_for_icon );
priv->filename_for_icon = 0;
}
return FALSE;
@@ -225,8 +226,8 @@
gtk_event_box_set_visible_window( GTK_EVENT_BOX(self->eventbox), FALSE
);
gtk_widget_show_all( self->eventbox );
}
- priv->filename_for_icon = filename;
- g_idle_add( G_CALLBACK(moko_panel_applet_iconadd_cb), self );
+ priv->filename_for_icon = g_strdup( filename );
+ g_idle_add( (GSourceFunc) moko_panel_applet_iconadd_cb, self );
}
void moko_panel_applet_set_pixbuf(MokoPanelApplet* self, GdkPixbuf* pixbuf)
--- End Message ---
--- Begin Message ---
Author: chris
Date: 2007-10-23 12:29:57 +0200 (Tue, 23 Oct 2007)
New Revision: 3255
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-today2/configure.ac
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/Makefile.am
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
Log:
* configure.ac:
* src/Makefile.am:
* src/today-main.c: (set_time_idle), (today_create_home_page),
(main):
* src/today.h:
Use libjana-gtk/libjana-ecal and put an analog clock on the main screen
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
2007-10-23 10:21:01 UTC (rev 3254)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
2007-10-23 10:29:57 UTC (rev 3255)
@@ -1,6 +1,15 @@
2007-10-23 Chris Lord <[EMAIL PROTECTED]>
+ * configure.ac:
* src/Makefile.am:
+ * src/today-main.c: (set_time_idle), (today_create_home_page),
+ (main):
+ * src/today.h:
+ Use libjana-gtk/libjana-ecal and put an analog clock on the main screen
+
+2007-10-23 Chris Lord <[EMAIL PROTECTED]>
+
+ * src/Makefile.am:
Revert change that I didn't mean to commit
2007-10-22 Chris Lord <[EMAIL PROTECTED]>
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/configure.ac
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/configure.ac
2007-10-23 10:21:01 UTC (rev 3254)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/configure.ac
2007-10-23 10:29:57 UTC (rev 3255)
@@ -35,6 +35,7 @@
PKG_CHECK_MODULES(ECAL, libecal-1.2 >= $LIBECAL_VERSION)
PKG_CHECK_MODULES(EBOOK, libebook-1.2 >= $LIBEBOOK_VERSION)
PKG_CHECK_MODULES(GCONF, gconf-2.0)
+PKG_CHECK_MODULES(JANA, libjana libjana-ecal libjana-gtk)
AC_ARG_ENABLE(startup_notification,
AC_HELP_STRING([--enable-startup-notification], [enable startup
notification support]),
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/Makefile.am
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/Makefile.am
2007-10-23 10:21:01 UTC (rev 3254)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/Makefile.am
2007-10-23 10:29:57 UTC (rev 3255)
@@ -6,7 +6,7 @@
AM_CFLAGS = -Wall -pedantic -std=c99 @GTK_CFLAGS@ @ECAL_CFLAGS@ \
@EBOOK_CFLAGS@ @MOKOUI_CFLAGS@ @MOKOJOURNAL_CFLAGS@ \
- @GCONF_CFLAGS@
+ @GCONF_CFLAGS@ @JANA_CFLAGS@
bin_PROGRAMS = openmoko-today
@@ -32,7 +32,7 @@
$(top_builddir)/libtaku/libtaku.a \
@GTK_LIBS@ @ECAL_LIBS@ @EBOOK_LIBS@ @SEXY_LIBS@ \
@SN_LIBS@ @MOKOUI_LIBS@ @MOKOJOURNAL_LIBS@ \
- @GCONF_LIBS@
+ @GCONF_LIBS@ @JANA_LIBS@
MAINTAINERCLEANFILES = config.h.in Makefile.in
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
2007-10-23 10:21:01 UTC (rev 3254)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
2007-10-23 10:29:57 UTC (rev 3255)
@@ -9,6 +9,9 @@
#include <libtaku/launcher-util.h>
#include <libtaku/xutil.h>
#include <unistd.h>
+#include <libjana/jana.h>
+#include <libjana-ecal/jana-ecal.h>
+#include <libjana-gtk/jana-gtk.h>
#include "today.h"
#include "today-utils.h"
#include "today-pim-summary.h"
@@ -86,6 +89,27 @@
}
}
+static gboolean
+set_time_idle (TodayData *data)
+{
+ JanaTime *time;
+
+ time = jana_ecal_utils_time_now (data->location);
+ jana_gtk_clock_set_time (JANA_GTK_CLOCK (data->clock), time);
+
+#if GLIB_CHECK_VERSION(2,14,0)
+ g_timeout_add_seconds (60 - jana_time_get_seconds (time),
+ (GSourceFunc)set_time_idle, data);
+#else
+ g_timeout_add ((60 - jana_time_get_seconds (time)) * 1000,
+ (GSourceFunc)set_time_idle, data);
+#endif
+
+ g_object_unref (time);
+
+ return TRUE;
+}
+
static GtkWidget *
today_create_home_page (TodayData *data)
{
@@ -129,6 +153,20 @@
g_signal_connect (G_OBJECT (data->dial_button), "clicked",
G_CALLBACK (today_dial_button_clicked_cb), data);
+ /* Create event box with background */
+ data->bg_ebox = gtk_event_box_new ();
+ gtk_widget_set_app_paintable (data->bg_ebox, TRUE);
+ g_signal_connect (data->bg_ebox, "expose-event",
+ G_CALLBACK (bg_expose_cb), data);
+ g_signal_connect (data->bg_ebox, "size-allocate",
+ G_CALLBACK (bg_size_allocate_cb), data);
+
+ /* Get location and create clock widget */
+ data->location = jana_ecal_utils_guess_location ();
+ data->clock = jana_gtk_clock_new ();
+ jana_gtk_clock_set_draw_shadow (JANA_GTK_CLOCK (data->clock), TRUE);
+
+ /* Create viewport for clock/journal/PIM summary widgets */
viewport = gtk_viewport_new (NULL, NULL);
scroll = moko_finger_scroll_new ();
gtk_container_add (GTK_CONTAINER (scroll), viewport);
@@ -137,8 +175,12 @@
GTK_SHADOW_NONE);
gtk_widget_show_all (scroll);
+ /* Pack widgets */
vbox = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (vbox), data->clock, TRUE, TRUE, 0);
+ gtk_widget_show_all (data->clock);
+
data->message_box = today_pim_journal_box_new (data);
gtk_box_pack_start (GTK_BOX (vbox), data->message_box, FALSE, TRUE, 0);
gtk_widget_show (data->message_box);
@@ -147,14 +189,6 @@
gtk_box_pack_start (GTK_BOX (vbox), data->summary_box, FALSE, TRUE, 6);
gtk_widget_show (data->summary_box);
- /* Create event box with background */
- data->bg_ebox = gtk_event_box_new ();
- gtk_widget_set_app_paintable (data->bg_ebox, TRUE);
- g_signal_connect (data->bg_ebox, "expose-event",
- G_CALLBACK (bg_expose_cb), data);
- g_signal_connect (data->bg_ebox, "size-allocate",
- G_CALLBACK (bg_size_allocate_cb), data);
-
align = gtk_alignment_new (0.5, 0.5, 1, 1);
gtk_alignment_set_padding (GTK_ALIGNMENT (align), 6, 6, 6, 6);
gtk_container_add (GTK_CONTAINER (viewport), data->bg_ebox);
@@ -162,6 +196,9 @@
gtk_container_add (GTK_CONTAINER (align), vbox);
gtk_widget_show_all (data->bg_ebox);
+ /* Set the time on the clock */
+ set_time_idle (data);
+
return main_vbox;
}
@@ -285,8 +322,10 @@
#if 0
/* Force theme settings */
g_object_set (gtk_settings_get_default (),
- "gtk-theme-name", "openmoko-standard-2",
+ "gtk-theme-name", "openmoko-standard-2", /* Moko */
"gtk-icon-theme-name", "openmoko-standard",
+ "gtk-xft-dpi", 285 * 1024,
+ "gtk-font-name", "Sans 6",
NULL);
#endif
@@ -299,6 +338,8 @@
gtk_window_set_default_size (GTK_WINDOW (data.window), w, h);
gtk_window_move (GTK_WINDOW (data.window), x, y);
}
+#else
+ gtk_window_set_default_size (GTK_WINDOW (data.window), 480, 600);
#endif
/* Show and start */
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
2007-10-23 10:21:01 UTC (rev 3254)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
2007-10-23 10:29:57 UTC (rev 3255)
@@ -14,6 +14,7 @@
GtkWidget *window;
GtkWidget *notebook;
GtkWidget *home_toolbar;
+ GtkWidget *clock;
GtkWidget *message_box;
GtkWidget *summary_box;
GtkToolItem *dial_button;
@@ -22,6 +23,7 @@
GtkToolItem *dates_button;
GtkWidget *bg_ebox;
GdkPixmap *wallpaper;
+ gchar *location;
GtkTreeModel *events_model;
GtkTreeModel *tasks_model;
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-10-23 12:34:59 +0200 (Tue, 23 Oct 2007)
New Revision: 3256
Modified:
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ChangeLog
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
Log:
openmoko-panel-gsm: update the panel icon once we receive a connection event
Modified: trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ChangeLog
2007-10-23 10:29:57 UTC (rev 3255)
+++ trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ChangeLog
2007-10-23 10:34:59 UTC (rev 3256)
@@ -1,3 +1,8 @@
+2007-10-23 Michael Lauer <[EMAIL PROTECTED]>
+
+ * src/openmoko-panel-gsm.c: (gsm_applet_network_registration_cb):
+ Update the icon as well, once we receive a connection event.
+
2007-10-16 Daniel Willmann <[EMAIL PROTECTED]>
* src/openmoko-panel-gsm.c: (gsm_applet_network_registration_cb):
Modified:
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
===================================================================
---
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
2007-10-23 10:29:57 UTC (rev 3255)
+++
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
2007-10-23 10:34:59 UTC (rev 3256)
@@ -33,6 +33,8 @@
MokoGsmdConnection* gsm;
} GsmApplet;
+static GsmApplet* theApplet = NULL;
+
static void
gsm_applet_free(GsmApplet *applet)
{
@@ -72,7 +74,7 @@
moko_panel_applet_set_icon( applet->mokoapplet, image );
- g_free (image);
+ g_free( image );
}
static void
@@ -81,16 +83,17 @@
int lac,
int cell)
{
- NotifyNotification* nn;
- static MokoGsmdConnectionNetregType prev_type =
MOKO_GSMD_CONNECTION_NETREG_NONE;
+ NotifyNotification* nn;
+ static MokoGsmdConnectionNetregType prev_type =
MOKO_GSMD_CONNECTION_NETREG_NONE;
- if ((type == MOKO_GSMD_CONNECTION_NETREG_HOME) || (type ==
MOKO_GSMD_CONNECTION_NETREG_ROAMING) &&
- ((prev_type != MOKO_GSMD_CONNECTION_NETREG_HOME)&&(prev_type !=
MOKO_GSMD_CONNECTION_NETREG_ROAMING)))
- {
- nn = notify_notification_new ("Connected to Network", NULL, NULL, NULL);
- notify_notification_show (nn, NULL);
- }
- prev_type = type;
+ if ( (type == MOKO_GSMD_CONNECTION_NETREG_HOME) || (type ==
MOKO_GSMD_CONNECTION_NETREG_ROAMING) &&
+ ( (prev_type != MOKO_GSMD_CONNECTION_NETREG_HOME) && (prev_type !=
MOKO_GSMD_CONNECTION_NETREG_ROAMING) ) )
+ {
+ gsm_applet_update_signal_strength( self, 0, theApplet );
+ nn = notify_notification_new ("Connected to GSM Network", NULL, NULL,
NULL);
+ notify_notification_show (nn, NULL);
+ }
+ prev_type = type;
}
@@ -118,6 +121,7 @@
mb_panel_applet_create(const char* id, GtkOrientation orientation)
{
GsmApplet* applet = g_slice_new(GsmApplet);
+ theApplet = applet; // nasty global variable
MokoPanelApplet* mokoapplet = applet->mokoapplet =
MOKO_PANEL_APPLET(moko_panel_applet_new());
notify_init ("GSM Applet");
--- End Message ---
--- Begin Message ---
Author: chris
Date: 2007-10-23 18:57:40 +0200 (Tue, 23 Oct 2007)
New Revision: 3257
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
Log:
* src/today-main.c: (set_time_idle):
Return FALSE instead of TRUE so the callback doesn't get added more
and more over time
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
2007-10-23 10:34:59 UTC (rev 3256)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
2007-10-23 16:57:40 UTC (rev 3257)
@@ -1,5 +1,11 @@
2007-10-23 Chris Lord <[EMAIL PROTECTED]>
+ * src/today-main.c: (set_time_idle):
+ Return FALSE instead of TRUE so the callback doesn't get added more
+ and more over time
+
+2007-10-23 Chris Lord <[EMAIL PROTECTED]>
+
* configure.ac:
* src/Makefile.am:
* src/today-main.c: (set_time_idle), (today_create_home_page),
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
2007-10-23 10:34:59 UTC (rev 3256)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
2007-10-23 16:57:40 UTC (rev 3257)
@@ -107,7 +107,7 @@
g_object_unref (time);
- return TRUE;
+ return FALSE;
}
static GtkWidget *
--- End Message ---
--- Begin Message ---
Author: chris
Date: 2007-10-23 19:25:51 +0200 (Tue, 23 Oct 2007)
New Revision: 3258
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
Log:
* src/today-main.c: (digital_clock_notify), (main):
* src/today.h:
Listen to /desktop/poky/interface/digital_clock to determine whether
to display a digital or analogue clock
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
2007-10-23 16:57:40 UTC (rev 3257)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
2007-10-23 17:25:51 UTC (rev 3258)
@@ -1,5 +1,12 @@
2007-10-23 Chris Lord <[EMAIL PROTECTED]>
+ * src/today-main.c: (digital_clock_notify), (main):
+ * src/today.h:
+ Listen to /desktop/poky/interface/digital_clock to determine whether
+ to display a digital or analogue clock
+
+2007-10-23 Chris Lord <[EMAIL PROTECTED]>
+
* src/today-main.c: (set_time_idle):
Return FALSE instead of TRUE so the callback doesn't get added more
and more over time
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
2007-10-23 16:57:40 UTC (rev 3257)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
2007-10-23 17:25:51 UTC (rev 3258)
@@ -261,6 +261,17 @@
gtk_widget_queue_draw (data->bg_ebox);
}
+static void
+digital_clock_notify (GConfClient *client, guint cnxn_id,
+ GConfEntry *entry, TodayData *data)
+{
+ GConfValue *value;
+
+ value = gconf_entry_get_value (entry);
+ if (value) jana_gtk_clock_set_digital (JANA_GTK_CLOCK (data->clock),
+ gconf_value_get_bool (value));
+}
+
int
main (int argc, char **argv)
{
@@ -352,8 +363,14 @@
GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_WALLPAPER,
(GConfClientNotifyFunc)wallpaper_notify,
&data, NULL, NULL);
+ gconf_client_notify_add (gconf_client_get_default (),
+ GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_DIGITAL,
+ (GConfClientNotifyFunc)digital_clock_notify,
+ &data, NULL, NULL);
gconf_client_notify (gconf_client_get_default (),
GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_WALLPAPER);
+ gconf_client_notify (gconf_client_get_default (),
+ GCONF_POKY_INTERFACE_PREFIX GCONF_POKY_DIGITAL);
gtk_main ();
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
2007-10-23 16:57:40 UTC (rev 3257)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today.h
2007-10-23 17:25:51 UTC (rev 3258)
@@ -8,6 +8,7 @@
#define GCONF_POKY_INTERFACE_PREFIX "/desktop/poky/interface"
#define GCONF_POKY_WALLPAPER "/wallpaper"
+#define GCONF_POKY_DIGITAL "/digital_clock"
typedef struct {
/* Home */
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-10-23 20:29:32 +0200 (Tue, 23 Oct 2007)
New Revision: 3259
Added:
trunk/src/target/OM-2007.2/artwork/pixmaps/wallpaper.png
Log:
artwork: add wallpaper for today
Added: trunk/src/target/OM-2007.2/artwork/pixmaps/wallpaper.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/target/OM-2007.2/artwork/pixmaps/wallpaper.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
--- End Message ---
--- Begin Message ---
Author: abraxa
Date: 2007-10-23 21:57:21 +0200 (Tue, 23 Oct 2007)
New Revision: 3260
Removed:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/background.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/btn-white-p.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/btn-white.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-balance-left.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-balance-right.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-repeat-all.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-repeat-current.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-repeat-off.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-repeat-once.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-shuffle-off.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-shuffle-on.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-time.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-track.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-00.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-01.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-02.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-03.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-04.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-05.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-06.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-07.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-08.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-09.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-10.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-11.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-12.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan--1.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan--2.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan--3.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan-0.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan-1.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan-2.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan-3.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-00.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-01.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-02.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-03.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-04.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-05.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-06.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-07.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-08.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-09.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-10.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/slider-bar.png
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/slider_btn.png
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/TODO
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/configure.ac
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main_page.c
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.c
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.h
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playback.h
Log:
Fix alignment of label #2 when #1 is hidden (frame surrounding label #1 was
still visible)
Drop now unneeded images
Add GConf support, part I
Modified: trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/TODO
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/TODO
2007-10-23 18:29:32 UTC (rev 3259)
+++ trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/TODO
2007-10-23 19:57:21 UTC (rev 3260)
@@ -16,6 +16,7 @@
Issues:
Reduce call frequency of omp_playback_get_track_length()
+ Investigate on occasional segfault when terminating after video
playback with gstreamer
Documentation:
Update wiki
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/configure.ac
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/configure.ac
2007-10-23 18:29:32 UTC (rev 3259)
+++ trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/configure.ac
2007-10-23 19:57:21 UTC (rev 3260)
@@ -11,7 +11,6 @@
AC_STDC_HEADERS
AC_PROG_LIBTOOL
AC_PROG_INTLTOOL([0.35.0])
-#AM_GCONF_SOURCE_2
dnl i18n support
GETTEXT_PACKAGE=AC_PACKAGE_NAME
@@ -20,7 +19,7 @@
AM_GLIB_GNU_GETTEXT
-# Check for GTK/GLib/GThread/Pango, dbus, OpenMoko libs, gstreamer, expat,
uriparser and XSPF
+# Check for required libraries
PKG_CHECK_MODULES(GTK, [glib-2.0 >= 2.4.0 gtk+-2.0 >= 2.4.0 gthread-2.0
pango],,
AC_MSG_ERROR([*** Cannot find glib2/gtk2/gthread/pango ***]))
@@ -32,12 +31,15 @@
#PKG_CHECK_MODULES(OPENMOKO, [openmoko-libs >= 0.1.0],,
# AC_MSG_ERROR([*** Required OpenMoko Libraries >= 0.1.0 not installed
***]))
+PKG_CHECK_MODULES(GCONF, [gconf-2.0],,
+ AC_MSG_ERROR([*** Cannot find gconf ***]))
+
PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10 >= 0.10],,
AC_MSG_ERROR([*** Cannot find gstreamer ***]))
# gstinterfaces-0.10 is contained in libgstximagesink - which in turn is
# contained in gst-plugins-base. So if we have gstreamer we also have
gstinterfaces-0.10
-LIBS="$GTK_LIBS $OPENMOKO_LIBS $GSTREAMER_LIBS $LIBS -lgstinterfaces-0.10"
+LIBS="$GTK_LIBS $OPENMOKO_LIBS $GSTREAMER_LIBS $GCONF_LIBS $LIBS
-lgstinterfaces-0.10"
LIBS="-lexpat $LIBS"
AC_CHECK_LIB(expat, XML_Parse, , [echo "Error: libexpat not found"; exit -1])
@@ -52,7 +54,7 @@
AC_CHECK_LIB(mokoui2, moko_stock_register, , [echo "Error: libmokoui2 not
found"; exit -1])
-CFLAGS="$OPENMOKO_CFLAGS $GSTREAMER_CFLAGS $CFLAGS"
+CFLAGS="$OPENMOKO_CFLAGS $GSTREAMER_CFLAGS $GCONF_CFLAGS $CFLAGS"
localedir=$datadir/locale
AC_SUBST(localedir)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/background.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/btn-white-p.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/btn-white.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-balance-left.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-balance-right.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-repeat-all.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-repeat-current.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-repeat-off.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-repeat-once.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-shuffle-off.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-shuffle-on.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-time.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ico-track.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-00.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-01.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-02.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-03.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-04.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-05.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-06.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-07.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-08.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-09.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-10.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-11.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-eq-12.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan--1.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan--2.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan--3.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan-0.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan-1.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan-2.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-pan-3.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-00.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-01.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-02.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-03.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-04.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-05.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-06.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-07.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-08.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-09.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/ind-music-volume-10.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/slider-bar.png
===================================================================
(Binary files differ)
Deleted:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/images/slider_btn.png
===================================================================
(Binary files differ)
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main_page.c
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main_page.c
2007-10-23 18:29:32 UTC (rev 3259)
+++
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/main_page.c
2007-10-23 19:57:21 UTC (rev 3260)
@@ -52,6 +52,7 @@
GtkWidget *cover_eventbox;
GtkWidget *cover_frame;
GtkWidget *label1;
+ GtkWidget *label1_frame;
GtkWidget *label2;
GtkWidget *label3;
GtkWidget *track_number_label;
@@ -420,7 +421,7 @@
if (omp_config_get_main_ui_show_cover())
{
gtk_image_set_from_stock(GTK_IMAGE(main_widgets.cover_image),
"no_cover", -1);
- gtk_widget_queue_draw(main_widgets.cover_image); //
Re-draw the default cover
+ gtk_widget_queue_draw(main_widgets.cover_image); //
Re-draw the cover as it might have been used as video display before
}
// Determine which label we can use for showing the "No track
information" line
@@ -508,8 +509,8 @@
gtk_widget_set_name(GTK_WIDGET(main_widgets.label1),
"omp-main-top-label1");
gtk_label_set_ellipsize(GTK_LABEL(main_widgets.label1),
PANGO_ELLIPSIZE_END);
gtk_misc_set_alignment(GTK_MISC(main_widgets.label1), 0, 0);
- label = widget_wrap(main_widgets.label1, NULL);
- gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+ main_widgets.label1_frame = widget_wrap(main_widgets.label1, NULL);
+ gtk_box_pack_start(GTK_BOX(vbox), main_widgets.label1_frame, FALSE,
FALSE, 0);
main_widgets.label2 = gtk_label_new(NULL);
gtk_widget_set_name(GTK_WIDGET(main_widgets.label2),
"omp-main-top-label2");
@@ -533,7 +534,7 @@
// Show all widgets, then hide the ones we don't want visible
gtk_widget_show_all(GTK_WIDGET(frame));
- if (omp_config_get_main_ui_label1() == OMP_MAIN_LABEL_HIDDEN)
gtk_widget_hide(main_widgets.label1);
+ if (omp_config_get_main_ui_label1() == OMP_MAIN_LABEL_HIDDEN)
gtk_widget_hide(main_widgets.label1_frame);
if (omp_config_get_main_ui_label2() == OMP_MAIN_LABEL_HIDDEN)
gtk_widget_hide(main_widgets.label2);
if (omp_config_get_main_ui_label3() != OMP_MAIN_LABEL_HIDDEN)
gtk_widget_show_all(label3);
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.c
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.c
2007-10-23 18:29:32 UTC (rev 3259)
+++
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.c
2007-10-23 19:57:21 UTC (rev 3260)
@@ -26,6 +26,7 @@
#include <glib.h>
#include <glib/gstdio.h>
+#include <gconf/gconf-client.h>
#include <string.h>
#include <stdlib.h>
@@ -42,7 +43,7 @@
#include "playlist.h"
#include "playback.h"
-/// The default configuration
+/// The literal de-fault configuration, will only be used if gconf is
unavailable or schema file wasn't installed
struct _omp_config omp_default_config =
{
FALSE,
// shuffle
@@ -55,20 +56,28 @@
TRUE,
// main_ui_show_cover
OMP_MAIN_LABEL_HIDDEN, // main_ui_label1
OMP_MAIN_LABEL_ARTIST, // main_ui_label2
- OMP_MAIN_LABEL_TITLE // main_ui_label3
+ OMP_MAIN_LABEL_TITLE, // main_ui_label3
+ 15,
// main_min_gesture_radius
+ 750,
// main_gesture_repeat_tresh
+ 1000,
// main_gesture_repeat_intv
};
struct _omp_config *omp_config = NULL; ///< Global and
persistent configuration data
struct _omp_session *omp_session = NULL; ///< Global and
persistent session data
+/// The GConf instance we'll use
+GConfClient *omp_gconf_client;
+
/**
* Initalize and load application configuration data
*/
void
omp_config_init()
{
+ GError *error = NULL;
+
#ifdef DEBUG
g_print("Loading application configuration\n");
#endif
@@ -76,7 +85,7 @@
// This mustn't be called more than once
g_assert(!omp_config);
- // Set default config
+ // Set de-fault config
omp_config = g_new(struct _omp_config, 1);
g_memmove(omp_config, &omp_default_config, sizeof(struct _omp_config));
@@ -89,7 +98,53 @@
G_TYPE_OBJECT, G_SIGNAL_RUN_FIRST, 0, 0, NULL,
g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT);
- /// @todo GConf implementation
+ // Fetch values from GConf
+ omp_gconf_client = gconf_client_get_default();
+ gconf_client_preload(omp_gconf_client, OMP_GCONF_PATH,
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+
+ omp_config->shuffle =
+ gconf_client_get_bool(omp_gconf_client, OMP_GCONF_PATH
"/shuffle", &error);
+
+ if (error)
+ {
+ g_printerr("GConf error: %s\nWill continue execution, though
program might behave abnormal.\n", error->message);
+ g_error_free(error);
+
+ return;
+ }
+
+ omp_config->repeat_mode =
+ gconf_client_get_int(omp_gconf_client, OMP_GCONF_PATH
"/repeat_mode", NULL);
+
+ omp_config->resume_playback =
+ gconf_client_get_bool(omp_gconf_client, OMP_GCONF_PATH
"/resume_playback", NULL);
+
+ omp_config->prev_track_treshold =
+ gconf_client_get_int(omp_gconf_client, OMP_GCONF_PATH
"/prev_track_treshold", NULL);
+
+ omp_config->show_numbers_in_pl =
+ gconf_client_get_bool(omp_gconf_client, OMP_GCONF_PATH
"/show_numbers_in_playlist", NULL);
+
+ omp_config->main_ui_show_cover =
+ gconf_client_get_bool(omp_gconf_client, OMP_GCONF_PATH
"/show_cover_art", NULL);
+
+ omp_config->main_ui_label1 =
+ gconf_client_get_int(omp_gconf_client, OMP_GCONF_PATH
"/main_label1_type", NULL);
+
+ omp_config->main_ui_label2 =
+ gconf_client_get_int(omp_gconf_client, OMP_GCONF_PATH
"/main_label2_type", NULL);
+
+ omp_config->main_ui_label3 =
+ gconf_client_get_int(omp_gconf_client, OMP_GCONF_PATH
"/main_label3_type", NULL);
+
+ omp_config->main_min_gesture_radius =
+ gconf_client_get_int(omp_gconf_client, OMP_GCONF_PATH
"/min_gesture_radius", NULL);
+
+ omp_config->main_gesture_repeat_tresh =
+ gconf_client_get_int(omp_gconf_client, OMP_GCONF_PATH
"/gesture_repeat_tresh", NULL);
+
+ omp_config->main_gesture_repeat_intv =
+ gconf_client_get_int(omp_gconf_client, OMP_GCONF_PATH
"/gesture_repeat_intv", NULL);
}
/**
@@ -98,6 +153,7 @@
void
omp_config_free()
{
+ g_object_unref(G_OBJECT(omp_gconf_client));
g_free(omp_config);
}
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.h
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.h
2007-10-23 18:29:32 UTC (rev 3259)
+++
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/persistent.h
2007-10-23 19:57:21 UTC (rev 3260)
@@ -47,8 +47,11 @@
// Where to find the playlist files relative to the user's home directory?
#define OMP_RELATIVE_PLAYLIST_PATH "/playlists"
+// GConf path in which we will store our configuration settings
+#define OMP_GCONF_PATH "/apps/openmoko/mediaplayer"
+
/// Application configuration data
/// @note Default values are taken from omp_default_config
/// @note Update that struct as well if you make changes here!
@@ -65,6 +68,9 @@
guint main_ui_label1;
///< Contents of main UI's label #1
guint main_ui_label2;
///< Contents of main UI's label #2
guint main_ui_label3;
///< Contents of main UI's label #3
+ guint main_min_gesture_radius; ///< If a gesture stroke's
length is shorter than this the gesture is dismissed
+ guint main_gesture_repeat_tresh; ///< If a gesture was made its
action will be repeated if the finger is still down after this time (msec)
+ guint main_gesture_repeat_intv; ///< Gesture will be repeated
every X milliseconds
};
/// Session-persistent data
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playback.h
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playback.h
2007-10-23 18:29:32 UTC (rev 3259)
+++
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/src/playback.h
2007-10-23 19:57:21 UTC (rev 3260)
@@ -44,6 +44,8 @@
// The UI will be updated at this interval when a track is playing (in ms)
#define PLAYBACK_UI_UPDATE_INTERVAL 1000
+
+
gboolean omp_playback_init();
void omp_playback_free();
void omp_playback_save_state();
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog