SF.net SVN: geany-plugins:[2299] trunk/geany-plugins/webhelper/src

colombanw at users.sourceforge.net colombanw at xxxxx
Thu Oct 20 13:55:55 UTC 2011


Revision: 2299
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2299&view=rev
Author:   colombanw
Date:     2011-10-20 13:55:54 +0000 (Thu, 20 Oct 2011)
Log Message:
-----------
WebHelper: Distribute all files referenced in POTFILES

src/gwh-enum-types.c was recently added to POTFILES because some
strings in it were marked as translatable, but this is an
auto-generated file, thus it doesn't exist before being generated.

This is no problem when building everything, but becomes a problem
if translations are built before the sources, or if the plugin is
disabled -- any situation where the file is not generated.

So, distribute the file and add it to the VCS for it to be always
available.  I know this is not very good to have a generated file
under version control, but at least it fixes the build.

Modified Paths:
--------------
    trunk/geany-plugins/webhelper/src/Makefile.am

Added Paths:
-----------
    trunk/geany-plugins/webhelper/src/gwh-enum-types.c
    trunk/geany-plugins/webhelper/src/gwh-enum-types.h

Modified: trunk/geany-plugins/webhelper/src/Makefile.am
===================================================================
--- trunk/geany-plugins/webhelper/src/Makefile.am	2011-10-19 22:31:46 UTC (rev 2298)
+++ trunk/geany-plugins/webhelper/src/Makefile.am	2011-10-20 13:55:54 UTC (rev 2299)
@@ -24,9 +24,6 @@
 autogen_sources = gwh-enum-types.c
 autogen_headers = gwh-enum-types.h
 
-CLEANFILES      = $(autogen_sources) \
-                  $(autogen_headers)
-
 EXTRA_DIST      = gwh-enum-types.c.tpl \
                   gwh-enum-types.h.tpl
 
@@ -43,9 +40,12 @@
 webhelper_la_LIBADD   = $(COMMONLIBS) \
                         $(WEBHELPER_LIBS)
 
-gwh-enum-types.c: $(srcdir)/gwh-enum-types.c.tpl gwh-enum-types.h $(headers) Makefile
+# These are generated in $(srcdir) because they are part of the distribution,
+# and should anyway only be regenerated if the .tpl changes, which is a
+# developer thing ,so if should be harmless.
+$(srcdir)/gwh-enum-types.c: $(srcdir)/gwh-enum-types.c.tpl gwh-enum-types.h $(headers)
 	$(AM_V_GEN)$(GLIB_MKENUMS) --template $< $(headers:%=$(srcdir)/%) > $@
-gwh-enum-types.h: $(srcdir)/gwh-enum-types.h.tpl $(headers) Makefile
+$(srcdir)/gwh-enum-types.h: $(srcdir)/gwh-enum-types.h.tpl $(headers)
 	$(AM_V_GEN)$(GLIB_MKENUMS) --template $< $(headers:%=$(srcdir)/%) > $@
 
 include $(top_srcdir)/build/cppcheck.mk

Added: trunk/geany-plugins/webhelper/src/gwh-enum-types.c
===================================================================
--- trunk/geany-plugins/webhelper/src/gwh-enum-types.c	                        (rev 0)
+++ trunk/geany-plugins/webhelper/src/gwh-enum-types.c	2011-10-20 13:55:54 UTC (rev 2299)
@@ -0,0 +1,59 @@
+
+/* Generated data (by glib-mkenums) */
+
+#include "gwh-enum-types.h"
+
+#include <glib/gi18n.h>
+
+/* enumerations from "./gwh-browser.h" */
+GType
+gwh_browser_position_get_type (void)
+{
+  static GType etype = 0;
+  if (G_UNLIKELY(etype == 0)) {
+    static const GEnumValue values[] = {
+      { GWH_BROWSER_POSITION_MESSAGE_WINDOW, "GWH_BROWSER_POSITION_MESSAGE_WINDOW", N_("message-window") },
+      { GWH_BROWSER_POSITION_SIDEBAR, "GWH_BROWSER_POSITION_SIDEBAR", N_("sidebar") },
+      { GWH_BROWSER_POSITION_SEPARATE_WINDOW, "GWH_BROWSER_POSITION_SEPARATE_WINDOW", N_("separate-window") },
+      { 0, NULL, NULL }
+    };
+    etype = g_enum_register_static (g_intern_static_string ("GwhBrowserPosition"), values);
+  }
+  return etype;
+}
+
+/* enumerations from "./gwh-settings.h" */
+GType
+gwh_settings_notify_flags_get_type (void)
+{
+  static GType etype = 0;
+  if (G_UNLIKELY(etype == 0)) {
+    static const GFlagsValue values[] = {
+      { GWH_SETTINGS_NOTIFY_NONE, "GWH_SETTINGS_NOTIFY_NONE", N_("none") },
+      { GWH_SETTINGS_NOTIFY_ON_CONNEXION, "GWH_SETTINGS_NOTIFY_ON_CONNEXION", N_("on-connexion") },
+      { 0, NULL, NULL }
+    };
+    etype = g_flags_register_static (g_intern_static_string ("GwhSettingsNotifyFlags"), values);
+  }
+  return etype;
+}
+
+/* enumerations from "./gwh-utils.h" */
+GType
+gwh_window_type_get_type (void)
+{
+  static GType etype = 0;
+  if (G_UNLIKELY(etype == 0)) {
+    static const GEnumValue values[] = {
+      { GWH_WINDOW_TYPE_NORMAL, "GWH_WINDOW_TYPE_NORMAL", N_("normal") },
+      { GWH_WINDOW_TYPE_UTILITY, "GWH_WINDOW_TYPE_UTILITY", N_("utility") },
+      { 0, NULL, NULL }
+    };
+    etype = g_enum_register_static (g_intern_static_string ("GwhWindowType"), values);
+  }
+  return etype;
+}
+
+
+/* Generated data ends here */
+

Added: trunk/geany-plugins/webhelper/src/gwh-enum-types.h
===================================================================
--- trunk/geany-plugins/webhelper/src/gwh-enum-types.h	                        (rev 0)
+++ trunk/geany-plugins/webhelper/src/gwh-enum-types.h	2011-10-20 13:55:54 UTC (rev 2299)
@@ -0,0 +1,35 @@
+
+/* Generated data (by glib-mkenums) */
+
+#ifndef H_GWH_ENUM_TYPES
+#define H_GWH_ENUM_TYPES
+
+#include <glib-object.h>
+
+/* include all headers that may introduce new enums */
+#include "gwh-browser.h"
+#include "gwh-settings.h"
+#include "gwh-utils.h"
+
+G_BEGIN_DECLS
+
+/* enumerations from "./gwh-browser.h" */
+G_GNUC_INTERNAL
+GType gwh_browser_position_get_type (void) G_GNUC_CONST;
+#define GWH_TYPE_BROWSER_POSITION (gwh_browser_position_get_type ())
+
+/* enumerations from "./gwh-settings.h" */
+G_GNUC_INTERNAL
+GType gwh_settings_notify_flags_get_type (void) G_GNUC_CONST;
+#define GWH_TYPE_SETTINGS_NOTIFY_FLAGS (gwh_settings_notify_flags_get_type ())
+
+/* enumerations from "./gwh-utils.h" */
+G_GNUC_INTERNAL
+GType gwh_window_type_get_type (void) G_GNUC_CONST;
+#define GWH_TYPE_WINDOW_TYPE (gwh_window_type_get_type ())
+G_END_DECLS
+
+#endif /* guard */
+
+/* Generated data ends here */
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Plugins-Commits mailing list