Edit 2007/07/07: next version of gnocky will be available from http://www.gnokii.org/
The following patches written by Daniele Forsi allow to:
- use gnocky 0.0.3 with libgnokii.so.3 (gn_cfg_read_default() and gn_cfg_phone_load())
- tolerate missing network coverage (GN_ERR_NOTAVAILABLE)
- read SMS from "SM" if phone doesn't support "IN"
- fix parts of the GUI (Refresh button still non functional)
- fix a memory leak (gtk_set_locale())
To compile the CVS version of gnocky you need to create an empty NEWS file in the top directory and fix the Makefile in the po directory (which is not including Makevars and so top_builddir is empty instead of ..).
Home page for gnokii: http://www.gnokii.org/
Home page for gnocky: http://sourceforge.net/projects/gnocky/
Index: src/main.c =================================================================== RCS file: /cvsroot/gnocky/gnocky/src/main.c,v retrieving revision 1.10 diff -u -p -r1.10 main.c --- src/main.c 5 May 2004 15:59:59 -0000 1.10 +++ src/main.c 5 Jul 2007 13:21:15 -0000 @@ -197,7 +197,6 @@ main (int argc, char *argv[]) textdomain (GETTEXT_PACKAGE); #endif - gtk_set_locale(); gtk_init(&argc, &argv); g_thread_init(NULL); Index: src/monitor.c =================================================================== RCS file: /cvsroot/gnocky/gnocky/src/monitor.c,v retrieving revision 1.15 diff -u -p -r1.15 monitor.c --- src/monitor.c 7 Jul 2004 16:33:11 -0000 1.15 +++ src/monitor.c 5 Jul 2007 13:21:15 -0000 @@ -399,7 +399,7 @@ static void gnocky_free_sms_entry(gpoint g_free(sms); } -static gn_error gnocky_read_sms_list() +static gn_error gnocky_read_sms_list_mt(gchar *current_mt) { gn_error error = GN_ERR_NONE; gn_data gdat; @@ -408,7 +408,6 @@ static gn_error gnocky_read_sms_list() gn_sms_folder_list folderlist; gn_sms message; gint count = 0, i = 1, errcount = 0; - gchar *current_mt = "IN"; g_mutex_lock(sms_mutex); @@ -469,6 +468,18 @@ static gn_error gnocky_read_sms_list() return error; } +static gn_error gnocky_read_sms_list() +{ + gn_error error = GN_ERR_NONE; + + error = gnocky_read_sms_list_mt("IN"); + if (error == GN_ERR_INVALIDMEMORYTYPE) { + error = gnocky_read_sms_list_mt("SM"); + } + + return error; +} + static gn_error gnocky_send_sms(gn_sms *sms) { gn_error error = GN_ERR_NONE; @@ -609,7 +620,7 @@ gn_error gnocky_get_basic_phone_info() if (pm.model) g_free(pm.model); - pm.model = gn_model_get(pm.model); + pm.model = gn_model_get(model); if (!pm.model) { pm.model = g_strdup(model); @@ -644,15 +655,17 @@ gn_error monitor_initialise_link() if (!phonebook_mutex) gnocky_monitor_init(); - if (gn_cfg_read_default(&bindir) < 0) { + error = gn_cfg_read_default(); + if (error != GN_ERR_NONE) { gnocky_show_error_from_thread(_("Cannot read configuration file! Please check ~/.gnokiirc")); - return GN_ERR_UNKNOWN; + return error; } - if (!gn_cfg_phone_load("", &statemachine)) { + error = gn_cfg_phone_load("", &statemachine); + if (error != GN_ERR_NONE) { gnocky_statusbar_set_text(_("Cannot load phone!")); sleep(2); - return GN_ERR_UNKNOWN; + return error; } gnocky_statusbar_set_text(_("Connecting...")); @@ -711,7 +724,13 @@ gpointer gnocky_monitor_loop(gpointer us if (pm.network_country) g_free(pm.network_country); pm.network_country = NULL; - if (error != GN_ERR_NOTIMPLEMENTED) { + switch (error) { + case GN_ERR_NOTIMPLEMENTED: + case GN_ERR_NOTAVAILABLE: + /* non fatal errors */ + continue; + default: + /* fatal errors */ pm.link_status = GNOCKY_LINK_FAILED; gnocky_statusbar_set_text(_("Connection broken!")); gn_sm_functions(GN_OP_Terminate, NULL, &statemachine); Index: src/glade/gnocky-logos-view.glade =================================================================== RCS file: /cvsroot/gnocky/gnocky/src/glade/gnocky-logos-view.glade,v retrieving revision 1.2 diff -u -p -r1.2 gnocky-logos-view.glade --- src/glade/gnocky-logos-view.glade 12 Mar 2004 21:03:12 -0000 1.2 +++ src/glade/gnocky-logos-view.glade 5 Jul 2007 13:21:20 -0000 @@ -193,8 +193,8 @@True -Ellipse -Ellipse +Fill +Fill True fill.png False Index: src/glade/gnocky.glade =================================================================== RCS file: /cvsroot/gnocky/gnocky/src/glade/gnocky.glade,v retrieving revision 1.3 diff -u -p -r1.3 gnocky.glade --- src/glade/gnocky.glade 5 May 2004 15:59:59 -0000 1.3 +++ src/glade/gnocky.glade 5 Jul 2007 13:21:22 -0000 @@ -62,7 +62,7 @@True gtk-preferences True -+