[Xfce4-commits] <garcon:master> Add a private for some internal functions.

Nick Schermer nick at xfce.org
Sat Aug 29 19:02:01 CEST 2009


Updating branch refs/heads/master
         to 2caae8003775ce0c521538f03240394bc0785a4f (commit)
       from 7042cf3c6de66dfb1fb20ac72b36b49be957462d (commit)

commit 2caae8003775ce0c521538f03240394bc0785a4f
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Aug 29 17:40:23 2009 +0200

    Add a private for some internal functions.

 garcon/Makefile.am                                |    5 +++-
 garcon/{garcon-environment.h => garcon-private.c} |   29 ++++++++++-----------
 garcon/{garcon-gio.h => garcon-private.h}         |   25 +++++++-----------
 3 files changed, 28 insertions(+), 31 deletions(-)

diff --git a/garcon/Makefile.am b/garcon/Makefile.am
index 738c487..1081b56 100644
--- a/garcon/Makefile.am
+++ b/garcon/Makefile.am
@@ -58,7 +58,9 @@ libgarcon_sources =							\
 	garcon-menu-node.c						\
 	garcon-menu-tree-provider.c					\
 	garcon-menu-merger.c						\
-	garcon-menu-parser.c
+	garcon-menu-parser.c						\
+	garcon-private.c						\
+	garcom-private.h
 
 libgarconincludedir = $(includedir)/garcon-1/garcon
 
@@ -79,6 +81,7 @@ libgarcon_1_la_LDFLAGS =						\
 	-no-undefined							\
 	-export-dynamic							\
 	-version-info $(GARCON_VERINFO)					\
+	-export-symbols-regex "^[^_].*"					\
 	$(PLATFORM_LDFLAGS)
 	
 libgarcon_1_la_LIBADD = 						\
diff --git a/garcon/garcon-environment.h b/garcon/garcon-private.c
similarity index 58%
copy from garcon/garcon-environment.h
copy to garcon/garcon-private.c
index 2384cf1..bf5b04b 100644
--- a/garcon/garcon-environment.h
+++ b/garcon/garcon-private.c
@@ -1,6 +1,5 @@
-/* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2007-2009 Jannis Pohlmann <jannis at xfce.org>
+ * Copyright (c) 2009 Nick Schermer <nick at xfce.org
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -18,20 +17,20 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#if !defined(GARCON_INSIDE_GARCON_H) && !defined(GARCON_COMPILATION)
-#error "Only <garcon/garcon.h> can be included directly. This file may disappear or change contents."
+#ifdef HAVE_CONFIG_H
+#include <config.h>
 #endif
 
-#ifndef __GARCON_MENU_ENVIRONMENT_H__
-#define __GARCON_MENU_ENVIRONMENT_H__
+#include <gio/gio.h>
 
-#include <glib.h>
+#include <garcon/garcon-private.h>
 
-G_BEGIN_DECLS
-
-void         garcon_set_environment (const gchar *env);
-const gchar *garcon_get_environment (void);
-
-G_END_DECLS
-
-#endif /* !__GARCON_MENU_ENVIRONMENT_H__ */
+gboolean
+_garcon_str_is_equal (const gchar *a,
+                      const gchar *b)
+{
+  if (a == NULL || b == NULL)
+    return (a == b);
+  
+  return (g_utf8_collate (a, b) == 0);
+}
diff --git a/garcon/garcon-gio.h b/garcon/garcon-private.h
similarity index 57%
copy from garcon/garcon-gio.h
copy to garcon/garcon-private.h
index 2908e1d..4f38440 100644
--- a/garcon/garcon-gio.h
+++ b/garcon/garcon-private.h
@@ -1,6 +1,7 @@
-/* vi:set et ai sw=2 sts=2 ts=2: */
 /*-
- * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+ * vi:set et ai sts=2 sw=2 cindent:
+ *
+ * Copyright (c) 2009 Nick Schermer <nick at xfce.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -14,28 +15,22 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
  */
 
 #if !defined(GARCON_INSIDE_GARCON_H) && !defined(GARCON_COMPILATION)
 #error "Only <garcon/garcon.h> can be included directly. This file may disappear or change contents."
 #endif
 
-#ifndef __GARCON_GIO_H__
-#define __GARCON_GIO_H__
-
-#include <gio/gio.h>
+#ifndef __GARCON_PRIVATE_H__
+#define __GARCON_PRIVATE_H__
 
 G_BEGIN_DECLS
 
-GFile *g_file_new_for_unknown_input    (const gchar *path,
-                                        GFile       *parent);
-GFile *g_file_new_relative_to_file     (const gchar *path,
-                                        GFile       *file);
-gchar *g_file_get_uri_relative_to_file (const gchar *path,
-                                        GFile       *file);
+gboolean _garcon_str_is_equal (const gchar *a,
+                               const gchar *b);
 
 G_END_DECLS
 
-#endif /* !__GARCON_GIO_H__ */
+#endif /* !__GARCON_PRIVATE_H__ */



More information about the Xfce4-commits mailing list