[Glade-devel] [patch, glade3] glade_util_path_is_writable



--=-bd5iyUCfUQkEor449OBw
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I noticed that this function is marked with glade_implement_me()...

What about the attached patch? I'm probably missing something, since it
can't be so trivial ;)

Maybe should it also take care of displaying an error dialog or are the
callers supposed to check the return value and display the error
message?

ciao
        paolo

--=-bd5iyUCfUQkEor449OBw
Content-Disposition: attachment; filename=glade-path-writable.patch
Content-Type: text/plain; name=glade-path-writable.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

--- gnome2/glade3/src/glade-utils.c     2002-05-02 11:11:09.000000000 +0200
+++ glade3/src/glade-utils.c    2003-03-11 18:31:34.000000000 +0100
@@ -25,14 +25,15 @@
 #include "glade.h"
 #include <gmodule.h>
 #include "glade-project-window.h"
-
+#include <unistd.h>
 
 gboolean
 glade_util_path_is_writable (const gchar *full_path)
 {
-       glade_implement_me ();
-
-       return TRUE;
+       if (access (full_path, W_OK) == 0)
+               return TRUE;
+       else
+               return FALSE;
 }
 
 void

--=-bd5iyUCfUQkEor449OBw--





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