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) 
 	    
 	      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
-		      
+