patches/nautilus-10-star-desktop.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 14836 bc662659c4ff
child 22009 848b8d27a814
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14836
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
     1
--- /usr/tmp/nautilus-2.25.2/src/nautilus-application.c	2008-12-15 15:54:24.000000000 +0000
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
     2
+++ nautilus-2.25.2/src/nautilus-application.c	2009-01-02 09:43:12.852217000 +0000
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
     3
@@ -546,6 +549,35 @@
13439
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     4
 }
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     5
 
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     6
 static void
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     7
+check_star_icon (void)
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     8
+{
14836
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
     9
+       char *desktop_file;
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    10
+       char *system_file;
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    11
+       char *desktop_path;
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    12
+       struct stat desktop_buf;
13439
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    13
+
14836
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    14
+       desktop_path = nautilus_get_desktop_directory ();
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    15
+       desktop_file = g_build_filename (desktop_path,
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    16
+                                        "star.desktop",
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    17
+                                        NULL);
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    18
+       if (g_stat (desktop_file, &desktop_buf) == 0) {
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    19
+               struct stat system_buf;
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    20
+               system_file = g_build_filename (DATADIR "/applications",
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    21
+                                               "star.desktop",
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    22
+                                               NULL);
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    23
+               if (g_stat (system_file, &system_buf) == 0) {
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    24
+                       if (desktop_buf.st_size != system_buf.st_size) {
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    25
+                               g_unlink(desktop_file);
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    26
+                       }
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    27
+               }
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    28
+               g_free (system_file);
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    29
+       }
13439
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    30
+
14836
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    31
+       g_free (desktop_file);
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    32
+       g_free (desktop_path);
13439
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    33
+}
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    34
+
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    35
+static void
14836
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    36
 open_windows (NautilusApplication *application,
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    37
 	      const char *startup_id,
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    38
 	      char **uris,
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    39
@@ -629,6 +661,7 @@
13439
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    40
 		return;
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    41
 	}
9fda05be38db 2008-09-08 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    42
 
14836
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    43
+	check_star_icon ();
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    44
 	if (kill_shell) {
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    45
 		if (unique_app_is_running (application->unique_app)) {
bc662659c4ff 2009-01-02 Padraig O'Briain <[email protected]>
padraig
parents: 13439
diff changeset
    46
 			unique_app_send_message (application->unique_app,