patches/nautilus-10-star-desktop.diff
author Jon Tibble <meths@btinternet.com>
Sat, 06 Oct 2012 16:11:50 +0100
branchs11express-2010-11
changeset 22109 db10202d5f6d
parent 14836 bc662659c4ff
child 22009 848b8d27a814
permissions -rw-r--r--
Added tag oi_151a_prestable7 for changeset 25dee50cecca

--- /usr/tmp/nautilus-2.25.2/src/nautilus-application.c	2008-12-15 15:54:24.000000000 +0000
+++ nautilus-2.25.2/src/nautilus-application.c	2009-01-02 09:43:12.852217000 +0000
@@ -546,6 +549,35 @@
 }
 
 static void
+check_star_icon (void)
+{
+       char *desktop_file;
+       char *system_file;
+       char *desktop_path;
+       struct stat desktop_buf;
+
+       desktop_path = nautilus_get_desktop_directory ();
+       desktop_file = g_build_filename (desktop_path,
+                                        "star.desktop",
+                                        NULL);
+       if (g_stat (desktop_file, &desktop_buf) == 0) {
+               struct stat system_buf;
+               system_file = g_build_filename (DATADIR "/applications",
+                                               "star.desktop",
+                                               NULL);
+               if (g_stat (system_file, &system_buf) == 0) {
+                       if (desktop_buf.st_size != system_buf.st_size) {
+                               g_unlink(desktop_file);
+                       }
+               }
+               g_free (system_file);
+       }
+
+       g_free (desktop_file);
+       g_free (desktop_path);
+}
+
+static void
 open_windows (NautilusApplication *application,
 	      const char *startup_id,
 	      char **uris,
@@ -629,6 +661,7 @@
 		return;
 	}
 
+	check_star_icon ();
 	if (kill_shell) {
 		if (unique_app_is_running (application->unique_app)) {
 			unique_app_send_message (application->unique_app,