summaryrefslogtreecommitdiffstats
path: root/main/gnome-system-monitor/008-rsvg-fix.patch
blob: 9bad7152ac858a023002da9b30e2acdce9e2c2da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 7c700dd09c30e866fd3e358388d6a518f417b41c Mon Sep 17 00:00:00 2001
From: Chris Kühl <chrisk@openismus.com>
Date: Thu, 27 Jan 2011 14:20:45 +0000
Subject: Moved rsvg_init and rsvg_term into main to fix Bug #613752.

---
diff --git a/src/gsm_color_button.c b/src/gsm_color_button.c
index ef7b3de..e829694 100644
--- a/src/gsm_color_button.c
+++ b/src/gsm_color_button.c
@@ -595,8 +595,6 @@ gsm_color_button_init (GSMColorButton * color_button)
 {
   color_button->priv = GSM_COLOR_BUTTON_GET_PRIVATE (color_button);
 
-  rsvg_init ();
-
   color_button->priv->color.red = 0;
   color_button->priv->color.green = 0;
   color_button->priv->color.blue = 0;
@@ -645,7 +643,6 @@ gsm_color_button_finalize (GObject * object)
   cairo_surface_destroy (color_button->priv->image_buffer);
   color_button->priv->image_buffer = NULL;
 
-  rsvg_term ();
   G_OBJECT_CLASS (gsm_color_button_parent_class)->finalize (object);
 }
 
diff --git a/src/procman.cpp b/src/procman.cpp
index 19c4cbc..f20de72 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -715,6 +715,9 @@ main (int argc, char *argv[])
 		exit (0);
 	}
 
+	/* initialize rsvg */
+	rsvg_init ();
+
 	gtk_window_set_default_icon_name ("utilities-system-monitor");
 	g_set_application_name(_("System Monitor"));
 
@@ -753,6 +756,10 @@ main (int argc, char *argv[])
 
 	glibtop_close ();
 
+	// This function should only be called just before program exit.
+	// See GNOME bug #592100 for a discussion about this.
+	rsvg_term ();
+
 	return 0;
 }
 
--
cgit v0.9