make a private copy of the icon obtained through gtk_icon_them_load_icon
authormishas <mikhail.sobolev@gmail.com>
Mon, 16 Apr 2007 19:09:47 +0000 (19:09 +0000)
committermishas <mikhail.sobolev@gmail.com>
Mon, 16 Apr 2007 19:09:47 +0000 (19:09 +0000)
git-svn-id: file:///svnroot/simple-launcher/trunk@191 3ba93dab-e023-0410-b42a-de7732cf370a

launcher-item.cc

index 39fa274..2b8c79f 100644 (file)
@@ -162,6 +162,14 @@ GdkPixbuf *LauncherItem::getIcon(int icon_size) const {
     }
   }
 
+  if (pixbuf != NULL) {
+    GdkPixbuf *tempo = gdk_pixbuf_copy(pixbuf);
+
+    g_object_unref(pixbuf);
+
+    pifxbuf = tempo;
+  }
+
   return pixbuf;
 }