Hello community,
here is the log from the commit of package gnome-phone-manager
checked in at Wed Oct 31 01:13:49 CET 2007.
--------
--- GNOME/gnome-phone-manager/gnome-phone-manager.changes 2007-10-26 20:51:57.000000000 +0200
+++ /mounts/work_src_done/STABLE/gnome-phone-manager/gnome-phone-manager.changes 2007-10-30 15:49:40.659196000 +0100
@@ -1,0 +2,12 @@
+Tue Oct 30 15:48:58 CET 2007 - jpr@suse.de
+
+- Update to 0.30
+ * More fixes for sending and receiving text messages with international
+ characters that don't fit in the default GSM alphabet
+ * Warn when a phone or driver doesn't support getting the state
+ of the power source (such as the nk6510)
+ * Add the --config flag to dump a gnokiirc file for debugging
+ * Add the --debug/-d flag to enable gnokii debugging
+ * Add the Sagem myX-7 and Nokia 3110 to the supported phones
+
+-------------------------------------------------------------------
Old:
----
gnome-phone-manager-0.20.tar.bz2
New:
----
gnome-phone-manager-0.30.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-phone-manager.spec ++++++
--- /var/tmp/diff_new_pack.Y29679/_old 2007-10-31 01:13:26.000000000 +0100
+++ /var/tmp/diff_new_pack.Y29679/_new 2007-10-31 01:13:26.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package gnome-phone-manager (Version 0.20)
+# spec file for package gnome-phone-manager (Version 0.30)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,8 +12,8 @@
Name: gnome-phone-manager
BuildRequires: evolution-data-server-devel fdupes gnokii-devel gnome-icon-theme gstreamer010-devel intltool libgnomebt-devel libgnomeui-devel librsvg-devel update-desktop-files
-Version: 0.20
-Release: 2
+Version: 0.30
+Release: 1
Url: http://usefulinc.com/software/phonemgr
Group: Hardware/Mobile
License: GPL v2 or later
@@ -90,6 +90,15 @@
%files lang -f %{name}.lang
%changelog
+* Tue Oct 30 2007 - jpr@suse.de
+- Update to 0.30
+ * More fixes for sending and receiving text messages with international
+ characters that don't fit in the default GSM alphabet
+ * Warn when a phone or driver doesn't support getting the state
+ of the power source (such as the nk6510)
+ * Add the --config flag to dump a gnokiirc file for debugging
+ * Add the --debug/-d flag to enable gnokii debugging
+ * Add the Sagem myX-7 and Nokia 3110 to the supported phones
* Fri Oct 26 2007 - jpr@suse.de
- Link icons into place to pass brp-desktop check
* Fri Oct 26 2007 - jpr@suse.de
++++++ gnome-phone-manager-0.20.tar.bz2 -> gnome-phone-manager-0.30.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/ChangeLog new/gnome-phone-manager-0.30/ChangeLog
--- old/gnome-phone-manager-0.20/ChangeLog 2007-10-18 00:51:28.000000000 +0200
+++ new/gnome-phone-manager-0.30/ChangeLog 2007-10-29 16:08:35.000000000 +0100
@@ -1,3 +1,79 @@
+============ Version 0.30
+
+2007-10-29 Bastien Nocera
+
+ * NEWS: upd
+ * configure.in: 0.30
+
+2007-10-29 Bastien Nocera
+
+ * libgsm/phonemgr-listener.c: (phonemgr_listener_queue_message):
+ Fix sending texts that don't fit in the default GSM alphabet,
+ gnokii expects UTF-8, and will convert to UCS-2 itself
+
+2007-10-29 Bastien Nocera
+
+ * libgsm/phonemgr-listener.c: (phonemgr_listener_queue_message):
+ Zero-out the SMS data after having sent the message
+
+2007-10-29 Bastien Nocera
+
+ * libgsm/phonemgr-listener.c: (phonemgr_listener_emit_message),
+ (phonemgr_listener_connect), (phonemgr_listener_queue_message):
+ When receiving texts, they will be in GSM alphabet if it fits
+ in the alphabet (fixes receiving SMS from ISO8859-1 texts),
+ Don't send texts as UCS-2 when they fit in the default GSM alphabet
+ by not forgetting to convert to ISO8859-1 first
+ (Closes: #490471)
+
+ Sending as UCS-2 doesn't work though
+
+2007-10-26 Bastien Nocera
+
+ * libgsm/phonemgr-listener.c: (phonemgr_listener_emit_message),
+ (phonemgr_listener_init), (phonemgr_listener_connect),
+ (phonemgr_listener_battery_poll): Call GN_OP_GetBatteryLevel first,
+ as it's what most drivers implement, also warn when the driver
+ doesn't support
+
+2007-10-26 Bastien Nocera
+
+ * libgsm/glibgsmtest.c: (main):
+ * libgsm/phonemgr-listener.c: (phonemgr_listener_get_property),
+ (phonemgr_listener_set_property), (phonemgr_listener_class_init),
+ (phonemgr_listener_emit_message), (phonemgr_listener_new),
+ (phonemgr_listener_connect), (phonemgr_listener_battery_poll):
+ * libgsm/phonemgr-listener.h:
+ * libgsm/phonemgr-utils.c: (phonemgr_utils_connect),
+ (phonemgr_utils_tell_driver), (phonemgr_utils_write_gnokii_config):
+ * libgsm/phonemgr-utils.h:
+ * src/main.c: (main): Add "-d/--debug" option, to allow enabling
+ debugging gnokii
+
+2007-10-26 Bastien Nocera
+
+ * libgsm/phonemgr-listener.c:
+ (phonemgr_listener_set_sms_notification):
+ * libgsm/phonemgr-utils.c: (phonemgr_utils_get_channel),
+ (phonemgr_utils_config_append_debug),
+ (phonemgr_utils_driver_for_model),
+ (phonemgr_utils_driver_for_device), (phonemgr_utils_guess_driver),
+ (phonemgr_utils_tell_driver), (phonemgr_utils_write_gnokii_config):
+ * libgsm/phonemgr-utils.h:
+ * src/main.c: (main): Add --config flag to gnome-phone-manager
+ to dump a gnokii configuration file, to the best of g-p-m's
+ knowledge, useful for debugging
+
+2007-10-21 Bastien Nocera
+
+ * libgsm/phones.xml: Add Sagem myX-7 to the list
+ (Closes: #479563)
+
+2007-10-21 Bastien Nocera
+
+ * libgsm/phones.xml: Add the Nokia 3110 to the list
+ (Closes: #488836)
+
============ Version 0.20
2007-10-17 Bastien Nocera
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/configure new/gnome-phone-manager-0.30/configure
--- old/gnome-phone-manager-0.20/configure 2007-10-18 00:51:44.000000000 +0200
+++ new/gnome-phone-manager-0.30/configure 2007-10-29 16:08:50.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for GNOME Phone Manager 0.20.
+# Generated by GNU Autoconf 2.61 for GNOME Phone Manager 0.30.
#
# Report bugs to http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-phone-manager.
#
@@ -728,8 +728,8 @@
# Identity of this package.
PACKAGE_NAME='GNOME Phone Manager'
PACKAGE_TARNAME='gnome-phone-manager'
-PACKAGE_VERSION='0.20'
-PACKAGE_STRING='GNOME Phone Manager 0.20'
+PACKAGE_VERSION='0.30'
+PACKAGE_STRING='GNOME Phone Manager 0.30'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-phone-manager'
ac_unique_file="src/main.c"
@@ -1456,7 +1456,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNOME Phone Manager 0.20 to adapt to many kinds of systems.
+\`configure' configures GNOME Phone Manager 0.30 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1526,7 +1526,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNOME Phone Manager 0.20:";;
+ short | recursive ) echo "Configuration of GNOME Phone Manager 0.30:";;
esac
cat <<\_ACEOF
@@ -1646,7 +1646,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNOME Phone Manager configure 0.20
+GNOME Phone Manager configure 0.30
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1660,7 +1660,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNOME Phone Manager $as_me 0.20, which was
+It was created by GNOME Phone Manager $as_me 0.30, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2377,7 +2377,7 @@
# Define the identity of the package.
PACKAGE='gnome-phone-manager'
- VERSION='0.20'
+ VERSION='0.30'
cat >>confdefs.h <<_ACEOF
@@ -23538,7 +23538,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNOME Phone Manager $as_me 0.20, which was
+This file was extended by GNOME Phone Manager $as_me 0.30, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23591,7 +23591,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-GNOME Phone Manager config.status 0.20
+GNOME Phone Manager config.status 0.30
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/configure.in new/gnome-phone-manager-0.30/configure.in
--- old/gnome-phone-manager-0.20/configure.in 2007-10-18 00:51:03.000000000 +0200
+++ new/gnome-phone-manager-0.30/configure.in 2007-10-29 16:08:11.000000000 +0100
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([GNOME Phone Manager],[0.20],[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-phone-manager],[gnome-phone-manager])
+AC_INIT([GNOME Phone Manager],[0.30],[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-phone-manager],[gnome-phone-manager])
AC_CONFIG_SRCDIR(src/main.c)
AM_MAINTAINER_MODE
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/libgsm/glibgsmtest.c new/gnome-phone-manager-0.30/libgsm/glibgsmtest.c
--- old/gnome-phone-manager-0.20/libgsm/glibgsmtest.c 2007-09-24 13:42:59.000000000 +0200
+++ new/gnome-phone-manager-0.30/libgsm/glibgsmtest.c 2007-10-26 19:37:00.000000000 +0200
@@ -76,7 +76,7 @@
g_thread_init (NULL);
g_type_init ();
- listener = phonemgr_listener_new ();
+ listener = phonemgr_listener_new (TRUE);
if (!listener)
g_error ("Couldn't make listener");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/libgsm/phonemgr-listener.c new/gnome-phone-manager-0.30/libgsm/phonemgr-listener.c
--- old/gnome-phone-manager-0.20/libgsm/phonemgr-listener.c 2007-10-03 13:35:43.000000000 +0200
+++ new/gnome-phone-manager-0.30/libgsm/phonemgr-listener.c 2007-10-29 15:51:38.000000000 +0100
@@ -80,9 +80,12 @@
guint connected : 1;
guint terminated : 1;
+ guint debug : 1;
/* Whether the driver supports GN_OP_OnSMS */
guint supports_sms_notif : 1;
+ /* Whether or not the driver supports GN_OP_GetPowersource */
+ guint supports_power_source : 1;
};
static void phonemgr_listener_class_init (PhonemgrListenerClass *klass);
@@ -101,11 +104,54 @@
LAST_SIGNAL
};
+enum {
+ PROP_0,
+ PROP_DEBUG,
+};
+
static int phonemgr_listener_signals[LAST_SIGNAL] = { 0 } ;
G_DEFINE_TYPE (PhonemgrListener, phonemgr_listener, G_TYPE_OBJECT)
static void
+phonemgr_listener_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ PhonemgrListener *l;
+
+ l = PHONEMGR_LISTENER (object);
+
+ switch (property_id) {
+ case PROP_DEBUG:
+ g_value_set_boolean (value, l->debug != FALSE);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ }
+}
+
+static void
+phonemgr_listener_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ PhonemgrListener *l;
+
+ l = PHONEMGR_LISTENER (object);
+
+ switch (property_id) {
+ case PROP_DEBUG:
+ l->debug = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ }
+}
+
+static void
phonemgr_listener_class_init (PhonemgrListenerClass *klass)
{
GObjectClass *object_class;
@@ -113,6 +159,8 @@
parent_class = g_type_class_ref (G_TYPE_OBJECT);
object_class = (GObjectClass*) klass;
+ object_class->set_property = phonemgr_listener_set_property;
+ object_class->get_property = phonemgr_listener_get_property;
phonemgr_listener_signals[MESSAGE_SIGNAL] =
g_signal_new ("message",
@@ -158,6 +206,11 @@
2,
G_TYPE_INT, G_TYPE_BOOLEAN);
+ g_object_class_install_property (object_class,
+ PROP_DEBUG,
+ g_param_spec_boolean ("debug", NULL, NULL,
+ FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
object_class->finalize = phonemgr_listener_finalize;
klass->message = NULL;
@@ -211,9 +264,24 @@
text = NULL;
/* The data should be in whatever the locale's encoding is,
+ * if it doesn't fit the default GSM alphabet (roughly ISO8859-1)
* as a design decision in gnokii */
origtext = (char *) message->user_data[0].u.text;
- if (g_utf8_validate (origtext, -1, NULL) == FALSE) {
+
+ if (gn_char_def_alphabet (origtext)) {
+ GError *err = NULL;
+
+ text = g_convert (origtext, -1,
+ "UTF-8", "ISO8859-1",
+ NULL, NULL, &err);
+
+ if (err != NULL) {
+ g_warning ("Conversion error from GSM default alphabet: %d %s", err->code, err->message);
+ g_error_free (err);
+ g_free (text);
+ text = g_strdup (origtext);
+ }
+ } else if (g_utf8_validate (origtext, -1, NULL) == FALSE) {
GError *err = NULL;
text = g_locale_to_utf8 (origtext, -1, NULL, NULL, &err);
@@ -221,6 +289,7 @@
if (err != NULL) {
g_warning ("Conversion error: %d %s", err->code, err->message);
g_error_free (err);
+ g_free (text);
text = g_strdup (origtext);
}
}
@@ -240,9 +309,9 @@
}
PhonemgrListener *
-phonemgr_listener_new (void)
+phonemgr_listener_new (gboolean debug)
{
- return PHONEMGR_LISTENER (g_object_new (PHONEMGR_TYPE_LISTENER, NULL));
+ return PHONEMGR_LISTENER (g_object_new (PHONEMGR_TYPE_LISTENER, "debug", debug, NULL));
}
#ifndef DUMMY
@@ -253,6 +322,7 @@
l->mutex = g_mutex_new ();
l->driver = NULL;
l->batterylevel = 1;
+ l->supports_power_source = TRUE;
l->powersource = GN_PS_BATTERY;
}
@@ -294,7 +364,7 @@
}
}
- l->phone_state = phonemgr_utils_connect (device, NULL, channel, error);
+ l->phone_state = phonemgr_utils_connect (device, NULL, channel, l->debug, error);
if (l->phone_state == NULL) {
//FIXME
return FALSE;
@@ -310,7 +380,7 @@
if (strcmp (l->driver, PHONEMGR_DEFAULT_DRIVER) != 0) {
phonemgr_utils_disconnect (l->phone_state);
phonemgr_utils_free (l->phone_state);
- l->phone_state = phonemgr_utils_connect (device, l->driver, channel, error);
+ l->phone_state = phonemgr_utils_connect (device, l->driver, channel, l->debug, error);
if (l->phone_state == NULL) {
//FIXME
return FALSE;
@@ -488,14 +558,20 @@
(&l->phone_state->data)->power_source = &powersource;
(&l->phone_state->data)->battery_unit = &battery_unit;
- if (gn_sm_functions(GN_OP_GetPowersource, &l->phone_state->data, &l->phone_state->state) != GN_ERR_NONE)
- powersource = GN_PS_BATTERY;
-
- /* Some drivers will use the same function for battery level and power source, so optimise */
- if (batterylevel == -1)
- if (gn_sm_functions(GN_OP_GetBatteryLevel, &l->phone_state->data, &l->phone_state->state) != GN_ERR_NONE)
- return;
+ /* Some drivers will use the same function for battery level and power source, so optimise.
+ * Make sure to get the battery level first, as most drivers implement only this one */
+ if (gn_sm_functions(GN_OP_GetBatteryLevel, &l->phone_state->data, &l->phone_state->state) != GN_ERR_NONE)
+ return;
+ if (powersource == -1 && l->supports_power_source != FALSE) {
+ if (gn_sm_functions(GN_OP_GetPowersource, &l->phone_state->data, &l->phone_state->state) != GN_ERR_NONE) {
+ g_message ("driver or phone doesn't support getting the power source");
+ l->supports_power_source = FALSE;
+ powersource = GN_PS_BATTERY;
+ }
+ } else if (l->supports_power_source == FALSE) {
+ powersource = GN_PS_BATTERY;
+ }
if (batterylevel != l->batterylevel || powersource != l->powersource) {
AsyncSignal *signal;
@@ -529,9 +605,9 @@
l->phone_state->data.callback_data = l;
if (gn_sm_functions (GN_OP_OnSMS, &l->phone_state->data, &l->phone_state->state) == GN_ERR_NONE) {
l->supports_sms_notif = TRUE;
- g_message ("driver supports sms notifications");
+ g_message ("driver and phone support sms notifications");
} else {
- g_message ("driver doesn't support sms notifications");
+ g_message ("driver or phone doesn't support sms notifications");
}
} else {
if (l->supports_sms_notif == FALSE)
@@ -629,7 +705,7 @@
phonemgr_listener_queue_message (PhonemgrListener *l,
const char *number, const char *message)
{
- char *mstr;
+ char *mstr, *iso;
GError *err = NULL;
gn_sms sms;
gn_error error;
@@ -643,20 +719,32 @@
gn_data_clear(&l->phone_state->data);
gn_sms_default_submit(&sms);
+ /* Default GSM alphabet is a subset of ISO8859-1,
+ * so try that */
+ iso = g_convert (message, -1,
+ "ISO8859-1", "UTF-8",
+ NULL, NULL, &err);
+ if (err != NULL) {
+ g_clear_error (&err);
+ g_free (iso);
+ iso = NULL;
+ }
+
/* If the message contains characters not in the
- * default GSM alaphabet, we convert it to UCS-2 encoding instead */
- if (gn_char_def_alphabet((unsigned char *) message)) {
- mstr = g_strdup (message);
+ * default GSM alaphabet, we pass it as UTF-8 encoding instead */
+ if (iso && gn_char_def_alphabet((unsigned char *) iso)) {
+ mstr = iso;
sms.dcs.u.general.alphabet = GN_SMS_DCS_DefaultAlphabet;
} else {
- mstr = g_convert (message, strlen (message),
- "UCS-2", "UTF-8",
- NULL, NULL, &err);
+ g_free (iso);
+ /* gnokii will convert to UCS-2 itself, but we pass UTF-8 */
+ mstr = g_strdup (message);
sms.dcs.u.general.alphabet = GN_SMS_DCS_UCS2;
}
if (err != NULL) {
g_warning ("Conversion error: %d %s", err->code, err->message);
+ g_free (mstr);
g_error_free (err);
g_mutex_unlock (l->mutex);
return;
@@ -690,6 +778,9 @@
/* Actually send the message */
error = gn_sms_send (&l->phone_state->data, &l->phone_state->state);
+ /* Remove the reference to SMS */
+ l->phone_state->data.sms = NULL;
+
/* Unlock the phone */
g_mutex_unlock (l->mutex);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/libgsm/phonemgr-listener.h new/gnome-phone-manager-0.30/libgsm/phonemgr-listener.h
--- old/gnome-phone-manager-0.20/libgsm/phonemgr-listener.h 2007-09-24 13:44:38.000000000 +0200
+++ new/gnome-phone-manager-0.30/libgsm/phonemgr-listener.h 2007-10-26 15:19:29.000000000 +0200
@@ -66,7 +66,7 @@
GQuark phonemgr_listener_error_quark (void) G_GNUC_CONST;
GType phonemgr_listener_get_type (void);
-PhonemgrListener* phonemgr_listener_new (void);
+PhonemgrListener* phonemgr_listener_new (gboolean debug);
gboolean phonemgr_listener_connect (PhonemgrListener *listener,
char *device,
GError **error);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/libgsm/phonemgr-utils.c new/gnome-phone-manager-0.30/libgsm/phonemgr-utils.c
--- old/gnome-phone-manager-0.20/libgsm/phonemgr-utils.c 2007-10-14 15:50:57.000000000 +0200
+++ new/gnome-phone-manager-0.30/libgsm/phonemgr-utils.c 2007-10-26 15:38:04.000000000 +0200
@@ -41,6 +41,8 @@
* match */
static GHashTable *driver_model = NULL;
+static void phonemgr_utils_init_hash_tables (void);
+
void
phonemgr_utils_gn_statemachine_clear (struct gn_statemachine *state)
{
@@ -178,7 +180,7 @@
}
int
-phonemgr_utils_get_channel (char *device)
+phonemgr_utils_get_channel (const char *device)
{
bdaddr_t src, dst;
int channel;
@@ -218,11 +220,23 @@
}
}
+char *
+phonemgr_utils_config_append_debug (const char *config)
+{
+ return g_strdup_printf ("%s\n"
+ "[logging]\n"
+ "debug = on\n",
+ config);
+}
+
static char *
phonemgr_utils_driver_for_model (const char *model, const char *device)
{
char *driver;
+ if (driver_model == NULL)
+ phonemgr_utils_init_hash_tables ();
+
driver = g_hash_table_lookup (driver_model, model);
if (driver == NULL) {
g_warning ("Model %s not supported natively", model);
@@ -250,6 +264,9 @@
if (phonemgr_utils_is_bluetooth (device) == FALSE)
return NULL;
+ if (driver_device == NULL)
+ phonemgr_utils_init_hash_tables ();
+
driver = g_hash_table_lookup (driver_device, device);
return driver;
@@ -362,8 +379,6 @@
char *driver;
gn_error err;
- phonemgr_utils_init_hash_tables ();
-
driver = phonemgr_utils_driver_for_device (device);
if (driver != NULL)
return driver;
@@ -389,7 +404,7 @@
}
PhonemgrState *
-phonemgr_utils_connect (const char *device, const char *driver, int channel, GError **error)
+phonemgr_utils_connect (const char *device, const char *driver, int channel, gboolean debug, GError **error)
{
PhonemgrState *phone_state = NULL;
char *config, **lines;
@@ -405,8 +420,17 @@
}
config = phonemgr_utils_write_config (driver ? driver : PHONEMGR_DEFAULT_DRIVER, device, channel);
- lines = g_strsplit (config, "\n", -1);
- g_free (config);
+ if (debug != FALSE) {
+ char *debug;
+
+ debug = phonemgr_utils_config_append_debug (config);
+ g_free (config);
+ lines = g_strsplit (debug, "\n", -1);
+ g_free (debug);
+ } else {
+ lines = g_strsplit (config, "\n", -1);
+ g_free (config);
+ }
if (gn_cfg_memory_read ((const char **)lines) < 0) {
g_warning ("gn_cfg_memory_read");
@@ -460,10 +484,11 @@
GError *error = NULL;
PhonemgrState *phone_state;
const char *model;
+ char *driver;
int channel;
channel = phonemgr_utils_get_channel (addr);
- phone_state = phonemgr_utils_connect (addr, NULL, channel, &error);
+ phone_state = phonemgr_utils_connect (addr, NULL, channel, FALSE, &error);
if (phone_state == NULL) {
g_warning ("Couldn't connect to the '%s' phone: %s", addr, PHONEMGR_CONDERR_STR(error));
if (error != NULL)
@@ -474,6 +499,44 @@
model = gn_lib_get_phone_model (&phone_state->state);
g_print ("model: '%s'\n", model);
+ driver = phonemgr_utils_driver_for_model (model, addr);
+ g_print ("guessed driver: '%s'\n", driver);
+ g_free (driver);
+
+ phonemgr_utils_disconnect (phone_state);
+ phonemgr_utils_free (phone_state);
+}
+
+void
+phonemgr_utils_write_gnokii_config (const char *addr)
+{
+ GError *error = NULL;
+ PhonemgrState *phone_state;
+ char *driver, *config, *debug;
+ int channel;
+
+ channel = phonemgr_utils_get_channel (addr);
+ phone_state = phonemgr_utils_connect (addr, NULL, channel, FALSE, &error);
+ if (phone_state == NULL) {
+ g_warning ("Couldn't connect to the '%s' phone: %s", addr, PHONEMGR_CONDERR_STR(error));
+ if (error != NULL)
+ g_error_free (error);
+ return;
+ }
+
+ driver = phonemgr_utils_guess_driver (phone_state, addr, NULL);
+
+ config = phonemgr_utils_write_config (driver, addr, channel);
+ g_free (driver);
+ debug = phonemgr_utils_config_append_debug (config);
+ g_free (config);
+ if (g_file_set_contents ("gnokiirc", debug, -1, NULL) == FALSE) {
+ g_warning ("Couldn't write gnokiirc file in the current directory");
+ } else {
+ g_print ("Configuration file written in the current directory\n");
+ g_print ("Move gnokiirc to ~/.gnokiirc to start debugging with gnokii\n");
+ }
+ g_free (debug);
phonemgr_utils_disconnect (phone_state);
phonemgr_utils_free (phone_state);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/libgsm/phonemgr-utils.h new/gnome-phone-manager-0.30/libgsm/phonemgr-utils.h
--- old/gnome-phone-manager-0.20/libgsm/phonemgr-utils.h 2007-09-24 13:49:53.000000000 +0200
+++ new/gnome-phone-manager-0.30/libgsm/phonemgr-utils.h 2007-10-26 15:32:41.000000000 +0200
@@ -48,19 +48,27 @@
};
gboolean phonemgr_utils_is_bluetooth (const char *addr);
-int phonemgr_utils_get_channel (char *device);
-char *phonemgr_utils_write_config (const char *driver, const char *addr, int channel);
+int phonemgr_utils_get_channel (const char *device);
+char *phonemgr_utils_write_config (const char *driver,
+ const char *addr,
+ int channel);
char *phonemgr_utils_guess_driver (PhonemgrState *phone_state,
- const char *device, GError **error);
+ const char *device,
+ GError **error);
void phonemgr_utils_gn_statemachine_clear (struct gn_statemachine *state);
const char *phonemgr_utils_gn_error_to_string (gn_error error,
PhoneMgrError *perr);
-PhonemgrState *phonemgr_utils_connect (const char *device, const char *driver,
- int channel, GError **error);
+PhonemgrState *phonemgr_utils_connect (const char *device,
+ const char *driver,
+ int channel,
+ gboolean debug,
+ GError **error);
void phonemgr_utils_disconnect (PhonemgrState *phone_state);
void phonemgr_utils_free (PhonemgrState *phone_state);
void phonemgr_utils_tell_driver (const char *addr);
+void phonemgr_utils_write_gnokii_config (const char *addr);
+char *phonemgr_utils_config_append_debug (const char *config);
gboolean phonemgr_utils_connection_is_supported (PhonemgrConnectionType type);
time_t gn_timestamp_to_gtime (gn_timestamp stamp);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/libgsm/phones.xml new/gnome-phone-manager-0.30/libgsm/phones.xml
--- old/gnome-phone-manager-0.20/libgsm/phones.xml 2007-08-19 23:41:34.000000000 +0200
+++ new/gnome-phone-manager-0.30/libgsm/phones.xml 2007-10-21 21:13:21.000000000 +0200
@@ -15,5 +15,11 @@
+
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/NEWS new/gnome-phone-manager-0.30/NEWS
--- old/gnome-phone-manager-0.20/NEWS 2007-10-18 00:44:04.000000000 +0200
+++ new/gnome-phone-manager-0.30/NEWS 2007-10-29 16:07:59.000000000 +0100
@@ -1,7 +1,22 @@
+gnome-phone-manager 0.30
+========================
+
+ * More fixes for sending and receiving text messages with international
+ characters that don't fit in the default GSM alphabet
+
+ * Warn when a phone or driver doesn't support getting the state
+ of the power source (such as the nk6510)
+
+ * Add the --config flag to dump a gnokiirc file for debugging
+
+ * Add the --debug/-d flag to enable gnokii debugging
+
+ * Add the Sagem myX-7 and Nokia 3110 to the supported phones
+
gnome-phone-manager 0.20
========================
- * Fix sending on receiving messages with non-ASCII characters
+ * Fix sending or receiving messages with non-ASCII characters
* Really fix connecting to Sony Ericsson phones (and a lot of other
models and makes of phones)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/po/ChangeLog new/gnome-phone-manager-0.30/po/ChangeLog
--- old/gnome-phone-manager-0.20/po/ChangeLog 2007-09-18 16:53:15.000000000 +0200
+++ new/gnome-phone-manager-0.30/po/ChangeLog 2007-10-29 12:52:49.000000000 +0100
@@ -1,3 +1,7 @@
+2007-10-28 Daniel Nylander
+
+ * sv.po: Updated Swedish translation.
+
2007-09-15 Andre Klapper
* LINGUAS: Added sk.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/po/sv.po new/gnome-phone-manager-0.30/po/sv.po
--- old/gnome-phone-manager-0.20/po/sv.po 2007-07-25 15:17:08.000000000 +0200
+++ new/gnome-phone-manager-0.30/po/sv.po 2007-10-29 12:52:49.000000000 +0100
@@ -9,8 +9,8 @@
msgstr ""
"Project-Id-Version: phonemgr\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-07-25 10:50+0200\n"
-"PO-Revision-Date: 2007-07-25 11:00+0100\n"
+"POT-Creation-Date: 2007-10-28 10:09+0100\n"
+"PO-Revision-Date: 2007-10-28 10:10+0100\n"
"Last-Translator: Daniel Nylander \n"
"Language-Team: Swedish \n"
"MIME-Version: 1.0\n"
@@ -19,7 +19,7 @@
#. translators: the '%s' will be substituted with '/dev/ttyS0'
#. or similar
-#: ../src/connection.c:92
+#: ../src/connection.c:112
#, c-format
msgid "Connected to device on %s"
msgstr "Ansluten till enhet på %s"
@@ -28,13 +28,23 @@
#. bother changing the icon ourselves at this point
#. translators: the '%s' will be substituted with '/dev/ttyS0'
#. or similar
-#: ../src/connection.c:98
+#: ../src/connection.c:118
#, c-format
msgid "Failed connection to device on %s"
msgstr "Anslutning till enhet på %s misslyckades"
+#: ../src/gconf-bridge.c:1218
+#, c-format
+msgid "GConf error: %s"
+msgstr "GConf-fel: %s"
+
+#: ../src/gconf-bridge.c:1228
+msgid "All further errors shown only on terminal."
+msgstr "Alla ytterligare fel visas endast på terminalen."
+
#: ../src/gnome-phone-manager.desktop.in.h:1
-#: ../src/menu.c:28
+#: ../src/menu.c:49
+#: ../src/menu.c:51
msgid "Phone Manager"
msgstr "Telefonhanterare"
@@ -42,31 +52,39 @@
msgid "Receive and send text messages from your mobile phone"
msgstr "Mottag och skicka textmeddelanden från din mobiltelefon"
-#: ../src/icon.c:37
+#: ../src/icon.c:57
msgid "Message arrived"
msgstr "Meddelande ankom"
-#: ../src/icon.c:40
+#: ../src/icon.c:60
msgid "Connected"
msgstr "Ansluten"
-#: ../src/icon.c:44
+#: ../src/icon.c:64
msgid "Connecting to phone"
msgstr "Ansluter till telefon"
-#: ../src/icon.c:48
+#: ../src/icon.c:68
msgid "Not connected"
msgstr "Inte ansluten"
-#: ../src/main.c:14
+#: ../src/main.c:36
msgid "Show model name of a specific device"
msgstr "Visa modellnamn för en specifik enhet"
-#: ../src/main.c:29
+#: ../src/main.c:37
+msgid "Write the configuration file for gnokii debugging"
+msgstr "Skriv konfigurationsfilen för gnokii-felsökning"
+
+#: ../src/main.c:38
+msgid "Enable debug"
+msgstr "Aktivera felsökning"
+
+#: ../src/main.c:53
msgid "- Manage your mobile phone"
msgstr "- Hantera din mobiltelefon"
-#: ../src/menu.c:20
+#: ../src/menu.c:40
msgid "translator_credits"
msgstr ""
"Daniel Nylander\n"
@@ -75,19 +93,24 @@
"Skicka synpunkter på översättningen till\n"
"tp-sv@listor.tp-sv.se"
-#: ../src/menu.c:24
+#: ../src/menu.c:44
msgid "Send and receive messages from your mobile phone."
msgstr "Skicka och mottag meddelanden från din mobiltelefon."
-#: ../src/menu.c:32
+#: ../src/menu.c:56
msgid "Phone Manager website"
msgstr "Webbplatsen för Telefonhanterare"
-#: ../src/menu.c:63
+#: ../src/menu.c:87
msgid "_Send Message"
msgstr "_Skicka meddelande"
-#: ../src/ui.c:313
+#: ../src/phonemgr-chooser-button.c:80
+#: ../src/phonemgr-chooser-button.c:190
+msgid "Click to select device..."
+msgstr "Klicka för att välja enhet..."
+
+#: ../src/ui.c:333
msgid "Message too long!"
msgstr "Meddelandet är för långt!"
@@ -235,6 +258,54 @@
msgid "message body"
msgstr "meddelandetext"
+#: ../ui/gnome-phone-manager.schemas.in.h:1
+msgid "Bluetooth address of the device to connect to"
+msgstr "Blåtandsadress för enheten att ansluta till"
+
+#: ../ui/gnome-phone-manager.schemas.in.h:2
+msgid "Bluetooth address of the device to connect to. Requires connection_type to be 1 to be used."
+msgstr "Blåtandsadress för enheten att ansluta till. Kräver att connection_type är 1 för att användas."
+
+#: ../ui/gnome-phone-manager.schemas.in.h:3
+msgid "The connection type used by gnome-phone-manager"
+msgstr "Anslutningstypen som används av gnome-phone-manager"
+
+#: ../ui/gnome-phone-manager.schemas.in.h:4
+msgid "The connection type used by gnome-phone-manager: Bluetooth is 0 Serial 1 is 1 Serial 2 is 2 IrDa is 3 Other connection types are 4"
+msgstr "Anslutningstypen som används av gnome-phone-manager: Bluetooth är 0, Seriell 1 är 1, Seriell 2 är 2, Infrarött är 3, övriga anslutningstyper är 4"
+
+#: ../ui/gnome-phone-manager.schemas.in.h:5
+msgid "The device node for the serial device to connect to"
+msgstr "Enhetsnoden för serieenheten att ansluta till"
+
+#: ../ui/gnome-phone-manager.schemas.in.h:6
+msgid "The device node for the serial device to connect to. Requires connection_type to be 4 to be used."
+msgstr "Enhetsnoden för serieenheten att ansluta till. Kräver att connection_type är 4 för att användas."
+
+#: ../ui/gnome-phone-manager.schemas.in.h:7
+msgid "Whether to play a sound alert when a new message comes in"
+msgstr "Huruvida ett ljud ska spelas upp när ett nytt meddelande tas emot"
+
+#: ../ui/gnome-phone-manager.schemas.in.h:8
+msgid "Whether to play a sound alert when a new message comes in."
+msgstr "Huruvida ett ljud ska spelas upp när ett nytt meddelande tas emot."
+
+#: ../ui/gnome-phone-manager.schemas.in.h:9
+msgid "Whether to popup new messages on the desktop"
+msgstr "Huruvida nya meddelanden ska visas i en popupruta på skrivbordet"
+
+#: ../ui/gnome-phone-manager.schemas.in.h:10
+msgid "Whether to popup new messages on the desktop as soon as they're received, as opposed to showing them when clicking on the tray icon."
+msgstr "Huruvida nya meddelanden ska visas i en popupruta på skrivbordet så snart som de tas emot, i motsats till att visa dem vid klickning på brickikonen."
+
+#: ../ui/gnome-phone-manager.schemas.in.h:11
+msgid "Whether to retry connecting to the mobile phone"
+msgstr "Huruvida nya försök att ansluta till mobiltelefonen ska göras"
+
+#: ../ui/gnome-phone-manager.schemas.in.h:12
+msgid "Whether to retry connecting to the mobile phone if the connection fails at some point."
+msgstr "Huruvida nya försök att ansluta till mobiltelefonen ska göras om anslutningen förloras."
+
#: ../src/e-contact-entry.c:153
#, c-format
msgid "Cannot get contact: %s"
@@ -330,68 +401,6 @@
msgid "An unknown error occurred."
msgstr "Ett okänt fel inträffade."
-#: ../src/gconf-bridge.c:1218
-#, c-format
-msgid "GConf error: %s"
-msgstr "GConf-fel: %s"
-
-#: ../src/gconf-bridge.c:1228
-msgid "All further errors shown only on terminal."
-msgstr "Alla ytterligare fel visas endast på terminalen."
-
-#: ../src/phonemgr-chooser-button.c:79
-#: ../src/phonemgr-chooser-button.c:189
-msgid "Click to select device..."
-msgstr "Klicka för att välja enhet..."
-
-#: ../ui/gnome-phone-manager.schemas.in.h:1
-msgid "Bluetooth address of the device to connect to"
-msgstr "Blåtandsadress för enheten att ansluta till"
-
-#: ../ui/gnome-phone-manager.schemas.in.h:2
-msgid "Bluetooth address of the device to connect to. Requires connection_type to be 1 to be used."
-msgstr "Blåtandsadress för enheten att ansluta till. Kräver att connection_type är 1 för att användas."
-
-#: ../ui/gnome-phone-manager.schemas.in.h:3
-msgid "The connection type used by gnome-phone-manager"
-msgstr "Anslutningstypen som används av gnome-phone-manager"
-
-#: ../ui/gnome-phone-manager.schemas.in.h:4
-msgid "The connection type used by gnome-phone-manager: Bluetooth is 0 Serial 1 is 1 Serial 2 is 2 IrDa is 3 Other connection types are 4"
-msgstr "Anslutningstypen som används av gnome-phone-manager: Bluetooth är 0, Seriell 1 är 1, Seriell 2 är 2, Infrarött är 3, övriga anslutningstyper är 4"
-
-#: ../ui/gnome-phone-manager.schemas.in.h:5
-msgid "The device node for the serial device to connect to"
-msgstr "Enhetsnoden för serieenheten att ansluta till"
-
-#: ../ui/gnome-phone-manager.schemas.in.h:6
-msgid "The device node for the serial device to connect to. Requires connection_type to be 4 to be used."
-msgstr "Enhetsnoden för serieenheten att ansluta till. Kräver att connection_type är 4 för att användas."
-
-#: ../ui/gnome-phone-manager.schemas.in.h:7
-msgid "Whether to play a sound alert when a new message comes in"
-msgstr "Huruvida ett ljud ska spelas upp när ett nytt meddelande tas emot"
-
-#: ../ui/gnome-phone-manager.schemas.in.h:8
-msgid "Whether to play a sound alert when a new message comes in."
-msgstr "Huruvida ett ljud ska spelas upp när ett nytt meddelande tas emot."
-
-#: ../ui/gnome-phone-manager.schemas.in.h:9
-msgid "Whether to popup new messages on the desktop"
-msgstr "Huruvida nya meddelanden ska visas i en popupruta på skrivbordet"
-
-#: ../ui/gnome-phone-manager.schemas.in.h:10
-msgid "Whether to popup new messages on the desktop as soon as they're received, as opposed to showing them when clicking on the tray icon."
-msgstr "Huruvida nya meddelanden ska visas i en popupruta på skrivbordet så snart som de tas emot, i motsats till att visa dem vid klickning på brickikonen."
-
-#: ../ui/gnome-phone-manager.schemas.in.h:11
-msgid "Whether to retry connecting to the mobile phone"
-msgstr "Huruvida nya försök att ansluta till mobiltelefonen ska göras"
-
-#: ../ui/gnome-phone-manager.schemas.in.h:12
-msgid "Whether to retry connecting to the mobile phone if the connection fails at some point."
-msgstr "Huruvida nya försök att ansluta till mobiltelefonen ska göras om anslutningen förloras."
-
#~ msgid "Selection mode"
#~ msgstr "Markeringsläge"
#~ msgid "The selection mode"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/gnome-phone-manager-0.20/src/main.c new/gnome-phone-manager-0.30/src/main.c
--- old/gnome-phone-manager-0.20/src/main.c 2007-09-24 13:46:39.000000000 +0200
+++ new/gnome-phone-manager-0.30/src/main.c 2007-10-26 15:27:52.000000000 +0200
@@ -28,10 +28,14 @@
#include "phonemgr-object.h"
#include "app.h"
-static char *bdaddr = NULL;
+static char *bdaddr_ident = NULL;
+static char *bdaddr_config = NULL;
+static gboolean debug = FALSE;
const GOptionEntry options[] = {
- {"identify", '\0', 0, G_OPTION_ARG_STRING, &bdaddr, N_("Show model name of a specific device"), NULL},
+ { "identify", '\0', 0, G_OPTION_ARG_STRING, &bdaddr_ident, N_("Show model name of a specific device"), NULL },
+ { "config", '\0', 0, G_OPTION_ARG_STRING, &bdaddr_config, N_("Write the configuration file for gnokii debugging"), NULL },
+ { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug, N_("Enable debug"), NULL},
{ NULL }
};
@@ -58,8 +62,12 @@
return 1;
}
- if (bdaddr != NULL) {
- phonemgr_utils_tell_driver (bdaddr);
+ if (bdaddr_ident != NULL) {
+ phonemgr_utils_tell_driver (bdaddr_ident);
+ return 0;
+ }
+ if (bdaddr_config != NULL) {
+ phonemgr_utils_write_gnokii_config (bdaddr_config);
return 0;
}
@@ -73,7 +81,7 @@
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
/* Setup the listener */
- app->listener = phonemgr_listener_new ();
+ app->listener = phonemgr_listener_new (debug);
initialise_connection (app);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org