Re: PATCH: libgnome bugs



Forgot to attach...

On Tue, 2001-12-04 at 22:49, Richard Hestilow wrote:
> I found these while hacking default-applications-properties. I also
> modified libgnome.schemas to be more in line with what
> default-applications-properties, and removed the UI options to be moved
> to libgnomeui.schemas. Patches to libgnomeui and gnome-core's
> "gnome-edit" (which has yet to be ported to gconf) will follow, to
> reflect these changes.
> 
> Okay to commit?
> 
> -- Richard
> 
> _______________________________________________
> gnome-2-0-list mailing list
> gnome-2-0-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-2-0-list


Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/ChangeLog,v
retrieving revision 1.377
diff -u -r1.377 ChangeLog
--- ChangeLog	2001/12/03 11:29:38	1.377
+++ ChangeLog	2001/12/05 04:41:30
@@ -1,3 +1,17 @@
+2001-12-04  Richard Hestilow  <hestilow ximian com>
+
+	* gnome-exec.c (gnome_prepend_terminal_to_vector): Don't
+	double-free terminal.
+	
+	* gnome-gconf.c (_gnome_gconf_lazy_init): Unref client.
+
+	* gnome-url.c (gnome_url_show): Wrap execution in "/bin/sh -c ...".
+	Also, return ret, not hard-coded TRUE.
+
+	* libgnome.schemas: Revamp to better fit
+	default-applications-properties. Also, remove UI settings, will
+	be moved to libgnomeui.schemas.
+	
 2001-12-03  Malcolm Tredinnick <malcolm commsecure com au>
 	* gnome-init.[ch], gnome-util.h, parse-path.cP: replace
 	  references to .gnome and .gnome_private with GNOME_DOT_GNOME
Index: gnome-exec.c
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/gnome-exec.c,v
retrieving revision 1.48
diff -u -r1.48 gnome-exec.c
--- gnome-exec.c	2001/11/27 23:03:25	1.48
+++ gnome-exec.c	2001/12/05 04:41:32
@@ -437,7 +437,6 @@
 	/* we use g_free here as we sucked all the inner strings
 	 * out from it into real_argv */
 	g_free (term_argv);
-	g_free (terminal);
 }
 
 /**
Index: gnome-gconf.c
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/gnome-gconf.c,v
retrieving revision 1.43
diff -u -r1.43 gnome-gconf.c
--- gnome-gconf.c	2001/10/10 09:57:59	1.43
+++ gnome-gconf.c	2001/12/05 04:41:34
@@ -143,6 +143,8 @@
 			      GCONF_CLIENT_PRELOAD_NONE,
 			      NULL);
         g_free (settings_dir);
+
+        g_object_unref (G_OBJECT (client));
 }
 
 /**
Index: gnome-url.c
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/gnome-url.c,v
retrieving revision 1.33
diff -u -r1.33 gnome-url.c
--- gnome-url.c	2001/11/27 23:03:25	1.33
+++ gnome-url.c	2001/12/05 04:41:35
@@ -134,6 +134,7 @@
 	const char **argv;
 	char **newargv;
 	gboolean ret;
+	gchar *tmp;
 	
 	g_return_val_if_fail (url != NULL, FALSE);
 
@@ -183,7 +184,7 @@
 		g_free (template);
 		return FALSE;
 	}
-	
+
 	newargv = g_new0 (char *, argc + 1);
 	for (i = 0; i < argc; i++) {
 		if (strcmp (argv[i], "%s") == 0)
@@ -192,6 +193,14 @@
 			newargv[i] = g_strdup (argv[i]);
 	}
 	newargv[i] = NULL;
+	
+	tmp = g_strjoinv (" ", newargv);
+	g_strfreev (newargv);
+	newargv = g_new0 (char *, 4);
+	newargv[0] = gnome_util_user_shell ();
+	newargv[1] = g_strdup ("-c");
+	newargv[2] = tmp;
+	newargv[3] = NULL;
 
 	/* the way the poptParseArgvString works is that the entire thing
 	 * is allocated as one buffer, so just free will suffice, also
@@ -207,11 +216,11 @@
 			     NULL /* data */,
 			     NULL /* child_pid */,
 			     error);
-	
+
 	g_strfreev (newargv);
 	g_free (template);
 
-	return TRUE;
+	return ret;
 }
 
 /**
Index: libgnome.schemas
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/libgnome.schemas,v
retrieving revision 1.2
diff -u -r1.2 libgnome.schemas
--- libgnome.schemas	2001/10/25 05:20:51	1.2
+++ libgnome.schemas	2001/12/05 04:41:38
@@ -6,147 +6,149 @@
       <key>/schemas/desktop/gnome/applications/terminal</key>
       <owner>gnome</owner>
       <type>string</type>
+      <default>gnome-terminal -x</default>
       <locale name="C">
         <short>Terminal application</short>
         <long>Terminal program to use when starting applications that require one</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/url-handlers/default-show</applyto>
-      <key>/schemas/desktop/gnome/url-handlers/default-show</key>
+      <applyto>/desktop/gnome/applications/editor/exec</applyto>
+      <key>/schemas/desktop/gnome/applications/editor/exec</key>
       <owner>gnome</owner>
       <type>string</type>
+      <default>gedit</default>
       <locale name="C">
-        <short>Default URL show handler</short>
-        <long>Default URL show handler</long>
+        <short>Editor application</short>
+        <long>Command to run as the default GNOME editor</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/url-handlers/info-show</applyto>
-      <key>/schemas/desktop/gnome/url-handlers/info-show</key>
+      <applyto>/desktop/gnome/applications/editor/accepts_lineno</applyto>
+      <key>/schemas/desktop/gnome/applications/editor/accepts_lineno</key>
       <owner>gnome</owner>
-      <type>string</type>
+      <type>bool</type>
+      <default>false</default>
       <locale name="C">
-        <short>URL handler for info pages</short>
-        <long>URL handler for info pages</long>
+        <short>Editor accepts line numbers</short>
+        <long>Whether the default text editor accepts line numbers</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/url-handlers/man-show</applyto>
-      <key>/schemas/desktop/gnome/url-handlers/man-show</key>
+      <applyto>/desktop/gnome/applications/editor/needs_term</applyto>
+      <key>/schemas/desktop/gnome/applications/editor/needs_term</key>
       <owner>gnome</owner>
-      <type>string</type>
+      <type>bool</type>
+      <default>false</default>
       <locale name="C">
-        <short>URL handler for man pages</short>
-        <long>URL handler for man pages</long>
+        <short>Editor needs terminal</short>
+        <long>Whether the default text editor needs a terminal to run</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/url-handlers/ghelp-show</applyto>
-      <key>/schemas/desktop/gnome/url-handlers/ghelp-show</key>
+      <applyto>/desktop/gnome/applications/browser/exec</applyto>
+      <key>/schemas/desktop/gnome/applications/browser/exec</key>
       <owner>gnome</owner>
       <type>string</type>
+      <default>mozilla</default>
       <locale name="C">
-        <short>URL handler for gnome help pages</short>
-        <long>URL handler for gnome help pages</long>
+        <short>Default browser</short>
+        <long>Default browser for all URLs</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/menus-have-icons</applyto>
-      <key>/schemas/desktop/gnome/interface/menus-have-icons</key>
+      <applyto>/desktop/gnome/applications/browser/needs_term</applyto>
+      <key>/schemas/desktop/gnome/applications/browser/needs_term</key>
       <owner>gnome</owner>
       <type>bool</type>
-      <default>true</default>
+      <default>false</default>
       <locale name="C">
-        <short>Icons in menus</short>
-        <long>This allows menu icons to be disabled.</long>
+        <short>Browser needs terminal</short>
+        <long>Whether the default browser needs a terminal to run</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/menus-have-tearoff</applyto>
-      <key>/schemas/desktop/gnome/interface/menus-have-tearoff</key>
+      <applyto>/desktop/gnome/applications/browser/nremote</applyto>
+      <key>/schemas/desktop/gnome/applications/browser/nremote</key>
       <owner>gnome</owner>
       <type>bool</type>
       <default>true</default>
       <locale name="C">
-        <short>Tearoff item on menus</short>
-        <long>Menus can be torn off if this setting is true.</long>
+        <short>Browser understands remote</short>
+        <long>Whether the default browser understands netscape remote</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/toolbar-labels</applyto>
-      <key>/schemas/desktop/gnome/interface/toolbar-labels</key>
+      <applyto>/desktop/gnome/applications/help_viewer/exec</applyto>
+      <key>/schemas/desktop/gnome/applications/help_viewer/exec</key>
       <owner>gnome</owner>
-      <type>bool</type>
-      <default>true</default>
+      <type>string</type>
+      <default>nautilus</default>
       <locale name="C">
-        <short>Toolbars have labels</short>
-        <long>Toolbars have labels</long>
+        <short>Default help viewer</short>
+        <long>Default help viewer</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/toolbar-detachable</applyto>
-      <key>/schemas/desktop/gnome/interface/toolbar-detachable</key>
+      <applyto>/desktop/gnome/applications/help_viewer/needs_term</applyto>
+      <key>/schemas/desktop/gnome/applications/help_viewer/needs_term</key>
       <owner>gnome</owner>
       <type>bool</type>
-      <default>true</default>
+      <default>false</default>
       <locale name="C">
-        <short>Toolbars are detachable</short>
-        <long>Toolbars are detachable</long>
+        <short>Help viewer needs terminal</short>
+        <long>Whether the default help viewer needs a terminal to run</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/toolbar-relief</applyto>
-      <key>/schemas/desktop/gnome/interface/toolbar-relief</key>
+      <applyto>/desktop/gnome/applications/help_viewer/accepts_urls</applyto>
+      <key>/schemas/desktop/gnome/applications/help_viewer/accepts_urls</key>
       <owner>gnome</owner>
       <type>bool</type>
       <default>true</default>
       <locale name="C">
-        <short>Toolbars have a relief</short>
-        <long>Toolbars have a relief</long>
+        <short>Browser understands remote</short>
+        <long>Whether the default help viewer accepts URLs</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/menubar-detachable</applyto>
-      <key>/schemas/desktop/gnome/interface/menubar-detachable</key>
+      <applyto>/desktop/gnome/url-handlers/default-show</applyto>
+      <key>/schemas/desktop/gnome/url-handlers/default-show</key>
       <owner>gnome</owner>
-      <type>bool</type>
-      <default>true</default>
+      <type>string</type>
       <locale name="C">
-        <short>Menubars are detachable</short>
-        <long>Menubars are detachable</long>
+        <short>Default URL show handler</short>
+        <long>Default URL show handler</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/menubar-relief</applyto>
-      <key>/schemas/desktop/gnome/interface/menubar-relief</key>
+      <applyto>/desktop/gnome/url-handlers/info-show</applyto>
+      <key>/schemas/desktop/gnome/url-handlers/info-show</key>
       <owner>gnome</owner>
-      <type>bool</type>
-      <default>true</default>
+      <type>string</type>
       <locale name="C">
-        <short>Menubars have a relief</short>
-        <long>Menubars have a relief</long>
+        <short>URL handler for info pages</short>
+        <long>URL handler for info pages</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/statusbar-meter-on-right</applyto>
-      <key>/schemas/desktop/gnome/interface/statusbar-meter-on-right</key>
+      <applyto>/desktop/gnome/url-handlers/man-show</applyto>
+      <key>/schemas/desktop/gnome/url-handlers/man-show</key>
       <owner>gnome</owner>
-      <type>bool</type>
-      <default>true</default>
+      <type>string</type>
       <locale name="C">
-        <short>Status bar meter is on the right side</short>
-        <long>Status bar meter is on the right side of the status bar</long>
+        <short>URL handler for man pages</short>
+        <long>URL handler for man pages</long>
       </locale>
     </schema>
     <schema>
-      <applyto>/desktop/gnome/interface/statusbar-interactive</applyto>
-      <key>/schemas/desktop/gnome/interface/statusbar-interactive</key>
+      <applyto>/desktop/gnome/url-handlers/ghelp-show</applyto>
+      <key>/schemas/desktop/gnome/url-handlers/ghelp-show</key>
       <owner>gnome</owner>
-      <type>bool</type>
+      <type>string</type>
       <locale name="C">
-        <short>Status bar is interactive</short>
-        <long>Status bar is interactive</long>
+        <short>URL handler for gnome help pages</short>
+        <long>URL handler for gnome help pages</long>
       </locale>
     </schema>
   </schemalist>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]