rpms/gnome-panel/devel gnome-panel.spec, 1.216, 1.217 preferred-apps.patch, 1.1, 1.2

Ray Strode (rstrode) fedora-extras-commits at redhat.com
Mon Sep 10 17:27:05 UTC 2007


Author: rstrode

Update of /cvs/pkgs/rpms/gnome-panel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17292

Modified Files:
	gnome-panel.spec preferred-apps.patch 
Log Message:
- create ~/.local/share/applications before writing out 
  preferred app launchers



Index: gnome-panel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-panel/devel/gnome-panel.spec,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -r1.216 -r1.217
--- gnome-panel.spec	6 Sep 2007 16:58:07 -0000	1.216
+++ gnome-panel.spec	10 Sep 2007 17:26:32 -0000	1.217
@@ -22,7 +22,7 @@
 Summary: GNOME panel
 Name: gnome-panel
 Version: 2.19.92
-Release: 2%{?dist} 
+Release: 3%{?dist} 
 URL: http://www.gnome.org
 Source0: http://download.gnome.org/sources/gnome-panel/2.19/%{name}-%{version}.tar.bz2
 Source1: redhat-panel-default-setup.entries
@@ -311,6 +311,10 @@
 %{_datadir}/gtk-doc/html/*
 
 %changelog
+* Mon Sep 10 2007 Ray Strode <rstrode at redhat.com> - 2.19.92-3
+- create ~/.local/share/applications before writing out 
+  preferred app launchers
+
 * Thu Sep  6 2007 Matthias Clasen <mclasen at redhat.com> - 2.19.92-2
 - Improve the handling of preferred apps in launchers
 

preferred-apps.patch:

Index: preferred-apps.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-panel/devel/preferred-apps.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- preferred-apps.patch	6 Sep 2007 16:59:35 -0000	1.1
+++ preferred-apps.patch	10 Sep 2007 17:26:32 -0000	1.2
@@ -1,25 +1,18 @@
-diff -up gnome-panel-2.19.6/gnome-panel/main.c.preferred-apps gnome-panel-2.19.6/gnome-panel/main.c
---- gnome-panel-2.19.6/gnome-panel/main.c.preferred-apps	2007-08-28 01:01:57.000000000 -0400
-+++ gnome-panel-2.19.6/gnome-panel/main.c	2007-08-28 01:02:42.000000000 -0400
-@@ -26,6 +26,7 @@
- #include "panel-action-protocol.h"
- #include "panel-lockdown.h"
- #include "panel-icon-names.h"
-+#include "launcher.h"
- #include "xstuff.h"
+diff -up gnome-panel-2.19.92/gnome-panel/panel-run-dialog.h.preferred-apps gnome-panel-2.19.92/gnome-panel/panel-run-dialog.h
+--- gnome-panel-2.19.92/gnome-panel/panel-run-dialog.h.preferred-apps	2007-09-04 13:34:26.000000000 -0400
++++ gnome-panel-2.19.92/gnome-panel/panel-run-dialog.h	2007-09-10 13:22:09.000000000 -0400
+@@ -32,6 +32,8 @@ G_BEGIN_DECLS
+ void panel_run_dialog_present           (GdkScreen  *screen,
+ 					 guint32    activate_time);
  
- #include "nothing.cP"
-@@ -81,6 +82,7 @@ main (int argc, char **argv)
- 			      GCONF_CLIENT_PRELOAD_NONE,
- 			      NULL);
++GSList *get_all_applications           (void);
++
+ G_END_DECLS
  
-+	panel_preferred_apps_init ();
- 	panel_global_config_load ();
- 	panel_lockdown_init ();
- 	panel_profile_load ();
-diff -up gnome-panel-2.19.6/gnome-panel/launcher.c.preferred-apps gnome-panel-2.19.6/gnome-panel/launcher.c
---- gnome-panel-2.19.6/gnome-panel/launcher.c.preferred-apps	2007-08-28 00:49:14.000000000 -0400
-+++ gnome-panel-2.19.6/gnome-panel/launcher.c	2007-08-28 01:01:47.000000000 -0400
+ #endif /* __PANEL_RUN_DIALOG_H__ */
+diff -up gnome-panel-2.19.92/gnome-panel/launcher.c.preferred-apps gnome-panel-2.19.92/gnome-panel/launcher.c
+--- gnome-panel-2.19.92/gnome-panel/launcher.c.preferred-apps	2007-09-10 13:22:09.000000000 -0400
++++ gnome-panel-2.19.92/gnome-panel/launcher.c	2007-09-10 13:24:09.000000000 -0400
 @@ -22,6 +22,7 @@
  #include <libgnomeui/gnome-url.h>
  #include <libgnomevfs/gnome-vfs.h>
@@ -36,7 +29,7 @@
  
  static GdkScreen *
  launcher_get_screen (Launcher *launcher)
-@@ -1264,3 +1266,166 @@ panel_launcher_set_dnd_enabled (Launcher
+@@ -1284,3 +1286,173 @@ panel_launcher_set_dnd_enabled (Launcher
  	} else
  		gtk_drag_source_unset (launcher->button);
  }
@@ -176,7 +169,7 @@
 +panel_preferred_apps_init (void)
 +{
 +	GConfClient *client;
-+	gchar *filename, *exec;
++        gchar *dirname, *filename, *exec;
 +	gint i;
 +
 +	const gchar *keys[] = {
@@ -191,21 +184,28 @@
 +	client = panel_gconf_get_client ();
 +
 +	for (i = 0; keys[i]; i++) {
-+		filename = g_build_filename (g_get_user_data_dir (), 
-+					     "applications", files[i], NULL);
++                dirname = g_build_filename (g_get_user_data_dir (), 
++					    "applications", NULL);
++		filename = g_build_filename (dirname, files[i], NULL);
 +		if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
++                        
++                        if (!g_file_test (dirname, G_FILE_TEST_EXISTS))
++                            g_mkdir_with_parents (dirname);
++
 +			exec = gconf_client_get_string (client, keys[i], NULL);
 +			update_preferred_app (filename, keys[i], exec);
 +			g_free (exec);
 +		}
++                g_free (dirname);
++
 +		gconf_client_notify_add (client, keys[i],
 +					 (GConfClientNotifyFunc) preferred_app_changed,
 +					 filename, g_free, NULL);
 +	}
 +}
-diff -up gnome-panel-2.19.6/gnome-panel/launcher.h.preferred-apps gnome-panel-2.19.6/gnome-panel/launcher.h
---- gnome-panel-2.19.6/gnome-panel/launcher.h.preferred-apps	2007-08-28 00:46:47.000000000 -0400
-+++ gnome-panel-2.19.6/gnome-panel/launcher.h	2007-08-28 00:47:10.000000000 -0400
+diff -up gnome-panel-2.19.92/gnome-panel/launcher.h.preferred-apps gnome-panel-2.19.92/gnome-panel/launcher.h
+--- gnome-panel-2.19.92/gnome-panel/launcher.h.preferred-apps	2007-09-10 13:22:09.000000000 -0400
++++ gnome-panel-2.19.92/gnome-panel/launcher.h	2007-09-10 13:22:09.000000000 -0400
 @@ -75,6 +75,7 @@ void            launcher_properties_dest
  void            panel_launcher_set_dnd_enabled  (Launcher *launcher,
  						 gboolean  dnd_enabled);
@@ -214,21 +214,28 @@
  
  G_END_DECLS
  
-diff -up gnome-panel-2.19.6/gnome-panel/panel-run-dialog.h.preferred-apps gnome-panel-2.19.6/gnome-panel/panel-run-dialog.h
---- gnome-panel-2.19.6/gnome-panel/panel-run-dialog.h.preferred-apps	2007-08-28 00:48:11.000000000 -0400
-+++ gnome-panel-2.19.6/gnome-panel/panel-run-dialog.h	2007-08-28 00:48:34.000000000 -0400
-@@ -32,6 +32,8 @@ G_BEGIN_DECLS
- void panel_run_dialog_present           (GdkScreen  *screen,
- 					 guint32    activate_time);
+diff -up gnome-panel-2.19.92/gnome-panel/main.c.preferred-apps gnome-panel-2.19.92/gnome-panel/main.c
+--- gnome-panel-2.19.92/gnome-panel/main.c.preferred-apps	2007-09-04 13:34:26.000000000 -0400
++++ gnome-panel-2.19.92/gnome-panel/main.c	2007-09-10 13:22:09.000000000 -0400
+@@ -26,6 +26,7 @@
+ #include "panel-action-protocol.h"
+ #include "panel-lockdown.h"
+ #include "panel-icon-names.h"
++#include "launcher.h"
+ #include "xstuff.h"
  
-+GSList *get_all_applications           (void);
-+
- G_END_DECLS
+ #include "nothing.cP"
+@@ -81,6 +82,7 @@ main (int argc, char **argv)
+ 			      GCONF_CLIENT_PRELOAD_NONE,
+ 			      NULL);
  
- #endif /* __PANEL_RUN_DIALOG_H__ */
-diff -up gnome-panel-2.19.6/gnome-panel/panel-run-dialog.c.preferred-apps gnome-panel-2.19.6/gnome-panel/panel-run-dialog.c
---- gnome-panel-2.19.6/gnome-panel/panel-run-dialog.c.preferred-apps	2007-08-28 00:47:26.000000000 -0400
-+++ gnome-panel-2.19.6/gnome-panel/panel-run-dialog.c	2007-08-28 00:47:51.000000000 -0400
++	panel_preferred_apps_init ();
+ 	panel_global_config_load ();
+ 	panel_lockdown_init ();
+ 	panel_profile_load ();
+diff -up gnome-panel-2.19.92/gnome-panel/panel-run-dialog.c.preferred-apps gnome-panel-2.19.92/gnome-panel/panel-run-dialog.c
+--- gnome-panel-2.19.92/gnome-panel/panel-run-dialog.c.preferred-apps	2007-09-04 13:34:26.000000000 -0400
++++ gnome-panel-2.19.92/gnome-panel/panel-run-dialog.c	2007-09-10 13:22:09.000000000 -0400
 @@ -813,7 +813,7 @@ get_all_applications_from_dir (GMenuTree
  	return list;
  }




More information about the fedora-extras-commits mailing list