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. r2841 - trunk/src/host/devirginator ([EMAIL PROTECTED])
2. r2842 - in trunk/src/target/OM-2007.2/libraries/libmokoui2: .
libmokoui ([EMAIL PROTECTED])
3. r2843 - in
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt: . src
([EMAIL PROTECTED])
4. r2844 -
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/po
([EMAIL PROTECTED])
--- Begin Message ---
Author: mickey
Date: 2007-08-28 13:54:20 +0200 (Tue, 28 Aug 2007)
New Revision: 2841
Modified:
trunk/src/host/devirginator/setup.sh
Log:
devirginator/setup.sh: allow devirginator to understand that filenames can have
'+' signs in them now when it tries to download them. patch by rwhitby
Modified: trunk/src/host/devirginator/setup.sh
===================================================================
--- trunk/src/host/devirginator/setup.sh 2007-08-28 10:58:23 UTC (rev
2840)
+++ trunk/src/host/devirginator/setup.sh 2007-08-28 11:54:20 UTC (rev
2841)
@@ -45,8 +45,8 @@
index=tmp/index-${SNAPSHOT}.html
rm -f $index
wget -O $index "`dirname \"$2\"`/"
- n="`basename \"$2\" | sed 's/*/[-a-zA-Z0-9_.]*/g'`"
- sed '/^.*[^-a-zA-Z0-9_.]\('"$n"'\)[^-a-zA-Z0-9_.].*$/s//\1/p;d' \
+ n="`basename \"$2\" | sed 's/*/[-a-zA-Z0-9_.+]*/g'`"
+ sed '/^.*[^-a-zA-Z0-9_.+]\('"$n"'\)[^-a-zA-Z0-9_.+].*$/s//\1/p;d' \
<$index >tmp/files
case `grep -c '' tmp/files` in
0) echo "not found: $2" 1>&2
--- End Message ---
--- Begin Message ---
Author: chris
Date: 2007-08-28 19:35:06 +0200 (Tue, 28 Aug 2007)
New Revision: 2842
Added:
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-search-bar.c
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-search-bar.h
Modified:
trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog
trunk/src/target/OM-2007.2/libraries/libmokoui2/configure.ac
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/Makefile.am
Log:
Add new widget MokoSearchBar, bump version to 0.2.0
Modified: trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog 2007-08-28
11:54:20 UTC (rev 2841)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog 2007-08-28
17:35:06 UTC (rev 2842)
@@ -1,3 +1,10 @@
+2007-08-28 Chris Lord,,, <[EMAIL PROTECTED]>
+
+ * configure.ac:
+ * libmokoui/Makefile.am:
+ * libmokoui/moko-search-bar.[ch]:
+ Add new widget MokoSearchBar
+
2007-08-22 Holger Freyther <[EMAIL PROTECTED]>
Rubberstamped by Mickey.
@@ -9,8 +16,9 @@
2007-08-15 Thomas Wood <[EMAIL PROTECTED]>
- * libmokoui/moko-stock.c: (_moko_stock_add_icon): Add a hack to make
sure we
- at least have a version of the icons available at each possible
GtkIconSize
+ * libmokoui/moko-stock.c: (_moko_stock_add_icon):
+ Add a hack to make sure we at least have a version of the icons
+ available at each possible GtkIconSize
2007-08-03 Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Modified: trunk/src/target/OM-2007.2/libraries/libmokoui2/configure.ac
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/configure.ac
2007-08-28 11:54:20 UTC (rev 2841)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/configure.ac
2007-08-28 17:35:06 UTC (rev 2842)
@@ -1,5 +1,5 @@
AC_PREREQ(2.53)
-AC_INIT(libmokoui2, 0.1.0, http://www.openmoko.org/)
+AC_INIT(libmokoui2, 0.2.0, http://www.openmoko.org/)
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR(libmokoui/moko-stock.c)
AM_CONFIG_HEADER(config.h)
Modified: trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/Makefile.am
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/Makefile.am
2007-08-28 11:54:20 UTC (rev 2841)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/Makefile.am
2007-08-28 17:35:06 UTC (rev 2842)
@@ -1,10 +1,12 @@
source_h = \
moko-stock.h \
- moko-finger-scroll.h
+ moko-finger-scroll.h \
+ moko-search-bar.h
source_c = \
moko-stock.c \
- moko-finger-scroll.c
+ moko-finger-scroll.c \
+ moko-search-bar.c
DATADIR=$(datadir)
Added:
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-search-bar.c
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-search-bar.c
2007-08-28 11:54:20 UTC (rev 2841)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-search-bar.c
2007-08-28 17:35:06 UTC (rev 2842)
@@ -0,0 +1,277 @@
+/*
+ * libmokoui -- OpenMoko Application Framework UI Library
+ *
+ * Authored by Chris Lord <[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 Lesser 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 Lesser Public License for more details.
+ *
+ * Current Version: $Rev$ ($Date$) [$Author$]
+ */
+
+#include "moko-search-bar.h"
+
+G_DEFINE_TYPE (MokoSearchBar, moko_search_bar, GTK_TYPE_HBOX)
+
+#define SEARCH_BAR_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), MOKO_TYPE_SEARCH_BAR, \
+ MokoSearchBarPrivate))
+
+typedef struct _MokoSearchBarPrivate MokoSearchBarPrivate;
+
+struct _MokoSearchBarPrivate
+{
+ GtkWidget *toggle;
+ GtkWidget *entry;
+ GtkWidget *combo;
+};
+
+enum {
+ TOGGLED,
+ TEXT_CHANGED,
+ CATEGORY_CHANGED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+static void
+moko_search_bar_get_property (GObject *object, guint property_id,
+ GValue *value, GParamSpec *pspec)
+{
+ switch (property_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ }
+}
+
+static void
+moko_search_bar_set_property (GObject *object, guint property_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ switch (property_id) {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ }
+}
+
+static void
+moko_search_bar_dispose (GObject *object)
+{
+ if (G_OBJECT_CLASS (moko_search_bar_parent_class)->dispose)
+ G_OBJECT_CLASS (moko_search_bar_parent_class)->dispose (object);
+}
+
+static void
+moko_search_bar_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (moko_search_bar_parent_class)->finalize (object);
+}
+
+static void
+moko_search_bar_class_init (MokoSearchBarClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (MokoSearchBarPrivate));
+
+ object_class->get_property = moko_search_bar_get_property;
+ object_class->set_property = moko_search_bar_set_property;
+ object_class->dispose = moko_search_bar_dispose;
+ object_class->finalize = moko_search_bar_finalize;
+
+ signals[TOGGLED] =
+ g_signal_new ("toggled",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (MokoSearchBarClass, toggled),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
+
+ signals[TEXT_CHANGED] =
+ g_signal_new ("text-changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (MokoSearchBarClass, text_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ signals[CATEGORY_CHANGED] =
+ g_signal_new ("category-changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (MokoSearchBarClass, category_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, GTK_TYPE_COMBO_BOX);
+}
+
+static void
+toggled_cb (GtkWidget *button, MokoSearchBar *self)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ g_object_set (G_OBJECT (priv->entry), "visible",
+ !GTK_WIDGET_VISIBLE (priv->entry), NULL);
+ g_object_set (G_OBJECT (priv->combo), "visible",
+ !GTK_WIDGET_VISIBLE (priv->combo), NULL);
+
+ if (GTK_WIDGET_VISIBLE (priv->entry))
+ gtk_widget_grab_focus (priv->entry);
+
+ g_signal_emit (self, signals[TOGGLED], 0,
+ GTK_WIDGET_VISIBLE (priv->entry));
+}
+
+static void
+entry_changed_cb (GtkEditable *editable, MokoSearchBar *self)
+{
+ g_signal_emit (self, signals[TEXT_CHANGED], 0, editable);
+}
+
+static void
+combo_changed_cb (GtkComboBox *combo, MokoSearchBar *self)
+{
+ g_signal_emit (self, signals[CATEGORY_CHANGED], 0, combo);
+}
+
+static void
+moko_search_bar_init (MokoSearchBar *self)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ /* Create toggle button */
+ priv->toggle = gtk_toggle_button_new ();
+ gtk_widget_set_name (priv->toggle, "mokosearchbutton");
+ gtk_button_set_image (GTK_BUTTON (priv->toggle),
+ gtk_image_new_from_stock (GTK_STOCK_FIND,
+ GTK_ICON_SIZE_SMALL_TOOLBAR));
+ gtk_box_pack_start (GTK_BOX (self), priv->toggle, FALSE, FALSE, 0);
+ gtk_widget_show_all (priv->toggle);
+
+ /* Create entry */
+ priv->entry = gtk_entry_new ();
+ gtk_widget_set_name (priv->entry, "mokosearchentry");
+ g_object_set (G_OBJECT (priv->entry), "no-show-all", TRUE, NULL);
+ gtk_box_pack_start (GTK_BOX (self), priv->entry, TRUE, TRUE, 0);
+
+ priv->combo = gtk_combo_box_new_text ();
+ gtk_box_pack_start (GTK_BOX (self), priv->combo, TRUE, TRUE, 0);
+ gtk_widget_show (priv->combo);
+
+ /* Connect up signals */
+ g_signal_connect (G_OBJECT (priv->toggle), "toggled",
+ G_CALLBACK (toggled_cb), self);
+ g_signal_connect (G_OBJECT (priv->entry), "changed",
+ G_CALLBACK (entry_changed_cb), self);
+ g_signal_connect (G_OBJECT (priv->combo), "changed",
+ G_CALLBACK (combo_changed_cb), self);
+}
+
+GtkWidget *
+moko_search_bar_new (void)
+{
+ return GTK_WIDGET (g_object_new (MOKO_TYPE_SEARCH_BAR, NULL));
+}
+
+gboolean
+moko_search_bar_search_visible (MokoSearchBar *self)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ return GTK_WIDGET_VISIBLE (priv->entry);
+}
+
+void
+moko_search_bar_toggle (MokoSearchBar *self)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->toggle),
+ !gtk_toggle_button_get_active (
+ GTK_TOGGLE_BUTTON (priv->toggle)));
+}
+
+void
+moko_search_bar_append_category (MokoSearchBar *self, const gchar *text)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ gtk_combo_box_append_text (GTK_COMBO_BOX (priv->combo), text);
+}
+
+void
+moko_search_bar_insert_category (MokoSearchBar *self, gint position,
+ const gchar *text)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ gtk_combo_box_insert_text (GTK_COMBO_BOX (priv->combo), position, text);
+}
+
+void
+moko_search_bar_prepend_category (MokoSearchBar *self, const gchar *text)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ gtk_combo_box_prepend_text (GTK_COMBO_BOX (priv->combo), text);
+}
+
+void
+moko_search_bar_remove_category (MokoSearchBar *self, gint position)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ gtk_combo_box_remove_text (GTK_COMBO_BOX (priv->combo), position);
+}
+
+gint
+moko_search_bar_get_active (MokoSearchBar *self)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ return gtk_combo_box_get_active (GTK_COMBO_BOX (priv->combo));
+}
+
+gchar *
+moko_search_bar_get_active_category (MokoSearchBar *self)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ return gtk_combo_box_get_active_text (GTK_COMBO_BOX (priv->combo));
+}
+
+void
+moko_search_bar_set_active (MokoSearchBar *self, gint position)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ gtk_combo_box_set_active (GTK_COMBO_BOX (priv->combo), position);
+}
+
+const gchar *
+moko_search_bar_get_text (MokoSearchBar *self)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ return gtk_entry_get_text (GTK_ENTRY (priv->entry));
+}
+
+void
+moko_search_bar_set_text (MokoSearchBar *self, const gchar *text)
+{
+ MokoSearchBarPrivate *priv = SEARCH_BAR_PRIVATE (self);
+
+ gtk_entry_set_text (GTK_ENTRY (priv->entry), text);
+}
+
Added:
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-search-bar.h
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-search-bar.h
2007-08-28 11:54:20 UTC (rev 2841)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-search-bar.h
2007-08-28 17:35:06 UTC (rev 2842)
@@ -0,0 +1,94 @@
+/*
+ * libmokoui -- OpenMoko Application Framework UI Library
+ *
+ * Authored by Chris Lord <[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 Lesser 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 Lesser Public License for more details.
+ *
+ * Current Version: $Rev$ ($Date$) [$Author$]
+ */
+
+#ifndef _MOKO_SEARCH_BAR
+#define _MOKO_SEARCH_BAR
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define MOKO_TYPE_SEARCH_BAR moko_search_bar_get_type()
+
+#define MOKO_SEARCH_BAR(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ MOKO_TYPE_SEARCH_BAR, MokoSearchBar))
+
+#define MOKO_SEARCH_BAR_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ MOKO_TYPE_SEARCH_BAR, MokoSearchBarClass))
+
+#define MOKO_IS_SEARCH_BAR(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+ MOKO_TYPE_SEARCH_BAR))
+
+#define MOKO_IS_SEARCH_BAR_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+ MOKO_TYPE_SEARCH_BAR))
+
+#define MOKO_SEARCH_BAR_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ MOKO_TYPE_SEARCH_BAR, MokoSearchBarClass))
+
+typedef struct {
+ GtkHBox parent;
+} MokoSearchBar;
+
+typedef struct {
+ GtkHBoxClass parent_class;
+
+ /* Signals */
+ void (*toggled) (MokoSearchBar *self,
+ gboolean search_visible);
+ void (*text_changed) (MokoSearchBar *self,
+ GtkEditable *editable);
+ void (*category_changed) (MokoSearchBar *self,
+ GtkComboBox *combo_box);
+} MokoSearchBarClass;
+
+GType moko_search_bar_get_type (void);
+
+GtkWidget * moko_search_bar_new (void);
+
+gboolean moko_search_bar_search_visible (MokoSearchBar *self);
+void moko_search_bar_toggle (MokoSearchBar *self);
+
+void moko_search_bar_append_category (MokoSearchBar *self,
+ const gchar *text);
+void moko_search_bar_insert_category (MokoSearchBar *self,
+ gint position,
+ const gchar *text);
+void moko_search_bar_prepend_category (MokoSearchBar *self,
+ const gchar *text);
+void moko_search_bar_remove_category (MokoSearchBar *self,
+ gint position);
+gint moko_search_bar_get_active (MokoSearchBar *self);
+gchar * moko_search_bar_get_active_category (MokoSearchBar *self);
+void moko_search_bar_set_active (MokoSearchBar *self,
+ gint position);
+
+const gchar * moko_search_bar_get_text (MokoSearchBar *self);
+void moko_search_bar_set_text (MokoSearchBar *self,
+ const gchar *text);
+
+G_END_DECLS
+
+#endif /* _MOKO_SEARCH_BAR */
+
--- End Message ---
--- Begin Message ---
Author: stefan
Date: 2007-08-29 00:48:10 +0200 (Wed, 29 Aug 2007)
New Revision: 2843
Modified:
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/ChangeLog
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c
Log:
2007-08-29 Stefan Schmidt <[EMAIL PROTECTED]>
* src/openmoko-panel-bt.c:
Allow applet to turn the bt radio on and off. Patch from Alexandre
d'Alton <[EMAIL PROTECTED]> (Closes #639)
Modified: trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/ChangeLog
2007-08-28 17:35:06 UTC (rev 2842)
+++ trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/ChangeLog
2007-08-28 22:48:10 UTC (rev 2843)
@@ -1,3 +1,9 @@
+2007-08-29 Stefan Schmidt <[EMAIL PROTECTED]>
+
+ * src/openmoko-panel-bt.c:
+ Allow applet to turn the bt radio on and off. Patch from Alexandre
+ d'Alton <[EMAIL PROTECTED]> (Closes #639)
+
2007-07-30 Michael Lauer <[EMAIL PROTECTED]>
* configure.ac:
Modified:
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c
===================================================================
---
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c
2007-08-28 17:35:06 UTC (rev 2842)
+++
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c
2007-08-28 22:48:10 UTC (rev 2843)
@@ -17,18 +17,131 @@
#include <libmokopanelui2/moko-panel-applet.h>
#include <gtk/gtkimage.h>
+#include <gtk/gtkbox.h>
+#include <gtk/gtk.h>
#include <time.h>
+#include <stdlib.h>
+#include <stdio.h>
+
typedef struct {
- GtkImage *image;
+ MokoPanelApplet *mokoapplet;
+ GtkImage *image;
+ int state;
} BtApplet;
+void quick_message(gchar *message) {
+
+ GtkWidget *dialog, *label, *okay_button;
+
+ /* Create the widgets */
+
+ dialog = gtk_dialog_new();
+ label = gtk_label_new (message);
+ okay_button = gtk_button_new_with_label("Okay");
+
+ /* Ensure that the dialog box is destroyed when the user clicks ok. */
+
+ gtk_signal_connect_object (GTK_OBJECT (okay_button), "clicked",
+ GTK_SIGNAL_FUNC (gtk_widget_destroy), dialog);
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area),
+ okay_button);
+
+ gtk_window_set_title(GTK_WINDOW(dialog), "Bt Status");
+
+ /* Add the label, and show everything we've added to the dialog. */
+
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
+ label);
+ gtk_widget_show_all (dialog);
+}
+
+#define BT_POWERON_FILENAME
"/sys/class/i2c-dev/i2c-0/device/0-0008/gta01-pm-bt.0/power_on"
+
+static int
+read_bt_power(void)
+{
+ FILE * f = fopen(BT_POWERON_FILENAME, "r+");
+ int val;
+
+ if (f == NULL) return -1;
+
+ fscanf(f, "%i", &val);
+ fclose(f);
+ return val;
+}
+
+static int
+set_bt_power(int val)
+{
+ FILE * f = fopen(BT_POWERON_FILENAME, "w");
+
+ if (f == NULL) return -1;
+
+ fprintf(f, "%i\n", val);
+
+ fclose(f);
+
+ return val;
+}
+
static void
+mb_panel_update(BtApplet *applet, int state)
+{
+
+ if(applet->state != state) {
+ printf("Will change the image ... \n");
+ if (state == 1)
+ gtk_image_set_from_file(applet->image, PKGDATADIR "/Bluetooth_On.png");
+ else
+ gtk_image_set_from_file(applet->image, PKGDATADIR "/Bluetooth_Off.png");
+ applet->state = state;
+ }
+}
+
+
+
+static void
+bt_applet_power_on(GtkWidget* menu, BtApplet* applet)
+{
+ int ret;
+ ret = set_bt_power(1);
+ mb_panel_update(applet, 1);
+ quick_message(" Bluetooth turned on \n\n");
+}
+
+static void
+bt_applet_power_off(GtkWidget* menu, BtApplet* applet)
+{
+ int ret;
+ ret = set_bt_power(0);
+ mb_panel_update(applet, 0);
+ quick_message(" Bluetooth turned off \n\n");
+}
+
+
+static void
+bt_applet_status(GtkWidget* menu, BtApplet* applet)
+{
+ int ret;
+ char tmp_string[256];
+
+ ret = read_bt_power();
+
+ sprintf(tmp_string, " Bluetooth is %s \n\n", ret ? "on" : "off");
+
+ quick_message(tmp_string);
+
+}
+
+static void
bt_applet_free (BtApplet *applet)
{
g_slice_free (BtApplet, applet);
}
+
+
G_MODULE_EXPORT GtkWidget*
mb_panel_applet_create(const char* id, GtkOrientation orientation)
{
@@ -40,11 +153,33 @@
applet = g_slice_new (BtApplet);
- applet->image = GTK_IMAGE(gtk_image_new_from_file ( PKGDATADIR
"/Bluetooth_Off.png"));
+ applet->state = read_bt_power();
+ applet->mokoapplet = mokoapplet;
+
+ if (applet->state == 0) {
+ applet->image = GTK_IMAGE(gtk_image_new_from_file ( PKGDATADIR
"/Bluetooth_Off.png"));
+ } else {
+ applet->image = GTK_IMAGE(gtk_image_new_from_file ( PKGDATADIR
"/Bluetooth_On.png"));
+ }
gtk_widget_set_name( applet->image, "openmoko-bt-applet" );
g_object_weak_ref( G_OBJECT(applet->image), (GWeakNotify) bt_applet_free,
applet );
+ moko_panel_applet_set_widget( GTK_CONTAINER(applet->mokoapplet),
applet->image );
+ gtk_widget_show_all( GTK_WIDGET(applet->mokoapplet) );
+
- moko_panel_applet_set_widget( GTK_CONTAINER(mokoapplet), applet->image );
- gtk_widget_show_all( GTK_WIDGET(mokoapplet) );
+ GtkMenu* menu = GTK_MENU(gtk_menu_new());
+ GtkWidget* item1 = gtk_menu_item_new_with_label("Power-Up Bluetooth
radio");
+ g_signal_connect(G_OBJECT(item1), "activate",
G_CALLBACK(bt_applet_power_on), applet);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item1);
+ GtkWidget* item2 = gtk_menu_item_new_with_label("Power-Off Bluetooth
radio");
+ g_signal_connect(G_OBJECT(item2), "activate",
G_CALLBACK(bt_applet_power_off), applet);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item2);
+ GtkWidget* item3 = gtk_menu_item_new_with_label("Bluetooth status");
+ g_signal_connect(G_OBJECT(item3), "activate",
G_CALLBACK(bt_applet_status), applet);
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item3);
+
+ gtk_widget_show_all(GTK_WIDGET(menu));
+ moko_panel_applet_set_popup( mokoapplet, GTK_WIDGET(menu),
MOKO_PANEL_APPLET_CLICK_POPUP);
+
return GTK_WIDGET(mokoapplet);
};
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-08-29 01:40:12 +0200 (Wed, 29 Aug 2007)
New Revision: 2844
Added:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/po/Makefile.in.in
Log:
openmoko-mediaplayer2: add po/Makefile.in.in
Added:
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/po/Makefile.in.in
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/po/Makefile.in.in
2007-08-28 22:48:10 UTC (rev 2843)
+++
trunk/src/target/OM-2007.2/applications/openmoko-mediaplayer2/po/Makefile.in.in
2007-08-28 23:40:12 UTC (rev 2844)
@@ -0,0 +1,218 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <[EMAIL PROTECTED]>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+#
+# - Modified by Owen Taylor <[EMAIL PROTECTED]> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <[EMAIL PROTECTED]> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <[EMAIL PROTECTED]> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @[EMAIL PROTECTED]
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir)
$(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir)
$(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#"
$(srcdir)/LINGUAS; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)";
ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep
^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then
printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then
LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then
LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in
$$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf
"$$lang.po "; done)
+
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf
"$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && gencat $@ $*.msg
+
+
+all: [EMAIL PROTECTED]@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(GENPOT)
+
+install: install-data
+install-data: [EMAIL PROTECTED]@
+install-data-no: all
+install-data-yes: all
+ $(mkdir_p) $(DESTDIR)$(itlocaledir)
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $$dir; \
+ if test -r $$lang.gmo; then \
+ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $(srcdir)/$$lang.gmo as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo"; \
+ fi; \
+ if test -r $$lang.gmo.m; then \
+ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ if test -r $(srcdir)/$$lang.gmo.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+ $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $(srcdir)/$$lang.gmo.m as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ rm -f
$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f
$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ done
+
+check: all $(GETTEXT_PACKAGE).pot
+ rm -f missing notexist
+ srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+ if [ -r missing -o -r notexist ]; then \
+ exit 1; \
+ fi
+
+mostlyclean:
+ rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+ rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES stamp-it
+ rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ extra_dists="$(EXTRA_DISTFILES)"; \
+ for file in $$extra_dists; do \
+ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+ done; \
+ for file in $$dists; do \
+ test -f $$file || file="$(srcdir)/$$file"; \
+ ln $$file $(distdir) 2> /dev/null \
+ || cp -p $$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ echo "$$lang:"; \
+ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+ if $$result; then \
+ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1;
then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move
$$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.gmo failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+Makefile POTFILES: stamp-it
+ @if test ! -f $@; then \
+ rm -f stamp-it; \
+ $(MAKE) stamp-it; \
+ fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog