Skip to content
Browse files

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.

git-svn-id: https://geany-plugins.svn.sourceforge.net/svnroot/geany-plugins/trunk/geany-plugins@2299 e8383189-8249-0410-b506-acc975200cbd
  • Loading branch information...
1 parent cfae220 commit e6810af62fc0bfcd8de3285b2d205838700b0be5 @b4n b4n committed Oct 20, 2011
Showing with 99 additions and 5 deletions.
  1. +5 −5 webhelper/src/Makefile.am
  2. +59 −0 webhelper/src/gwh-enum-types.c
  3. +35 −0 webhelper/src/gwh-enum-types.h
View
10 webhelper/src/Makefile.am
@@ -24,9 +24,6 @@ headers = gwh-browser.h \
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_CFLAGS = $(AM_CFLAGS) \
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
View
59 webhelper/src/gwh-enum-types.c
@@ -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 */
+
View
35 webhelper/src/gwh-enum-types.h
@@ -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 */
+

0 comments on commit e6810af

Please sign in to comment.
Something went wrong with that request. Please try again.