goffice r2223 - in trunk: . goffice/gtk goffice/utils



Author: jbrefort
Date: Sun Sep 14 05:48:09 2008
New Revision: 2223
URL: http://svn.gnome.org/viewvc/goffice?rev=2223&view=rev

Log:
2008-09-14  Jean Brefort  <jean brefort normalesup org>

	* goffice/gtk/go-image-sel.c: (cb_file_image_select): don't test
	before g_free.
	* goffice/gtk/goffice-gtk.c: (go_help_display): applied patch
	from Hib Eris to fix a crash in non-gnome apps using goffice
	with gnome. [#551128]
	* goffice/utils/go-file.c: (go_file_get_date): don't free the error twice.



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/goffice/gtk/go-image-sel.c
   trunk/goffice/gtk/goffice-gtk.c
   trunk/goffice/utils/go-file.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Sun Sep 14 05:48:09 2008
@@ -1,5 +1,9 @@
 goffice 0.7.2:
 
+Hib Eris:
+	Fix crash in go_help_display when non gnome applications use
+	goffice with gnome. [#551128]
+
 Jean:
 	* Implement probability plots for some common distributions. [#500168]
 

Modified: trunk/goffice/gtk/go-image-sel.c
==============================================================================
--- trunk/goffice/gtk/go-image-sel.c	(original)
+++ trunk/goffice/gtk/go-image-sel.c	Sun Sep 14 05:48:09 2008
@@ -51,8 +51,7 @@
 static void
 cb_file_image_select (GtkWidget *cc, GOImageSelState *state)
 {
-	if (state->uri)
-		g_free (state->uri);
+	g_free (state->uri);
 
 	state->uri = go_gtk_select_image (GTK_WINDOW (gtk_widget_get_toplevel (cc)),
 				   NULL);

Modified: trunk/goffice/gtk/goffice-gtk.c
==============================================================================
--- trunk/goffice/gtk/goffice-gtk.c	(original)
+++ trunk/goffice/gtk/goffice-gtk.c	Sun Sep 14 05:48:09 2008
@@ -788,9 +788,7 @@
 static void
 go_help_display (CBHelpPaths const *paths)
 {
-#ifdef GOFFICE_WITH_GNOME
-	gnome_help_display (paths->app, paths->link, NULL);
-#elif defined(G_OS_WIN32)
+#if defined(G_OS_WIN32)
 	static GHashTable* context_help_map = NULL;
 	guint id;
 
@@ -844,6 +842,12 @@
 		g_free (path);
 	}
 #else
+#ifdef GOFFICE_WITH_GNOME
+	if (gnome_program_get () != NULL) {
+		gnome_help_display (paths->app, paths->link, NULL);
+		return;
+	}
+#endif
 	go_gtk_notice_dialog (NULL, GTK_MESSAGE_ERROR,
 			      "TODO : launch help browser for %s", paths->link);
 #endif

Modified: trunk/goffice/utils/go-file.c
==============================================================================
--- trunk/goffice/utils/go-file.c	(original)
+++ trunk/goffice/utils/go-file.c	Sun Sep 14 05:48:09 2008
@@ -814,10 +814,6 @@
 		tm = (time_t) g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_CHANGED);
 		break;
 	}
-	if (error)
-		g_free (error);
-	else {
-	}
 		
 	if (info)
 		g_object_unref (info);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]