r3074 - in trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm: . src
thomas at sita.openmoko.org
thomas at sita.openmoko.org
Tue Oct 2 18:39:08 CEST 2007
Author: thomas
Date: 2007-10-02 18:39:07 +0200 (Tue, 02 Oct 2007)
New Revision: 3074
Modified:
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ChangeLog
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/configure.ac
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
Log:
* configure.ac:
* src/openmoko-panel-gsm.c: (gsm_applet_update_signal_strength),
(gsm_applet_autoregister_network), (gsm_applet_power_down_antenna),
(mb_panel_applet_create):
Add libnotify support
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-02 15:01:27 UTC (rev 3073)
+++ trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ChangeLog 2007-10-02 16:39:07 UTC (rev 3074)
@@ -1,3 +1,12 @@
+2007-10-02 Thomas Wood <thomas at openedhand.com>
+
+ * configure.ac:
+ * src/openmoko-panel-gsm.c: (gsm_applet_update_signal_strength),
+ (gsm_applet_autoregister_network), (gsm_applet_power_down_antenna),
+ (mb_panel_applet_create):
+
+ Add libnotify support
+
2007-09-02 Michael Lauer <mickey at openmoko.org>
* src/openmoko-panel-gsm.c:
Modified: trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/configure.ac
===================================================================
--- trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/configure.ac 2007-10-02 15:01:27 UTC (rev 3073)
+++ trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/configure.ac 2007-10-02 16:39:07 UTC (rev 3074)
@@ -11,7 +11,7 @@
AC_PROG_LIBTOOL
# base deps
-PKG_CHECK_MODULES(OPENMOKO, libmokopanelui2 libmokogsmd2)
+PKG_CHECK_MODULES(OPENMOKO, libmokopanelui2 libmokogsmd2 libnotify)
LIBS="$LIBS $OPENMOKO_LIBS"
CFLAGS="$CFLAGS $OPENMOKO_CFLAGS"
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-02 15:01:27 UTC (rev 3073)
+++ trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c 2007-10-02 16:39:07 UTC (rev 3074)
@@ -17,6 +17,8 @@
#include <libmokogsmd2/moko-gsmd-connection.h>
#include <libmokopanelui2/moko-panel-applet.h>
+#include <libnotify/notify.h>
+
#include <gtk/gtkimage.h>
#include <gtk/gtkbox.h>
#include <gtk/gtk.h>
@@ -74,6 +76,19 @@
}
static void
+gsm_applet_network_registration_cb (MokoGsmdConnection *self,
+ int type,
+ int lac,
+ int cell)
+{
+ NotifyNotification* nn;
+
+ nn = notify_notification_new ("Connected to Network", NULL, NULL, NULL);
+ notify_notification_show (nn, NULL);
+}
+
+
+static void
gsm_applet_power_up_antenna(GtkWidget* menu, GsmApplet* applet)
{
//TODO notify user
@@ -99,6 +114,8 @@
GsmApplet* applet = g_slice_new(GsmApplet);
MokoPanelApplet* mokoapplet = applet->mokoapplet = MOKO_PANEL_APPLET(moko_panel_applet_new());
+ notify_init ("GSM Applet");
+
moko_panel_applet_set_icon( mokoapplet, PKGDATADIR "/SignalStrength_NR.png" );
applet->gprs_mode = FALSE;
@@ -106,6 +123,7 @@
applet->gsm = moko_gsmd_connection_new();
g_signal_connect( G_OBJECT(applet->gsm), "signal-strength-changed", G_CALLBACK(gsm_applet_update_signal_strength), applet );
+ g_signal_connect( G_OBJECT(applet->gsm), "network-registration", G_CALLBACK(gsm_applet_network_registration_cb), applet );
// tap-with-hold menu (NOTE: temporary: left button atm.)
GtkMenu* menu = GTK_MENU (gtk_menu_new());
More information about the commitlog
mailing list