Branch: refs/heads/master Author: Matthew Brush matt@geany.org Committer: Matthew Brush matt@geany.org Date: Sat, 11 Aug 2012 04:05:41 Commit: d36db75bcbcbc43c747d86da0d647528cbb2b904 https://github.com/geany/geany/commit/d36db75bcbcbc43c747d86da0d647528cbb2b9...
Log Message: ----------- ClassBuilder: Defy GTK+ conventions and instead generate valid C code
Modified Paths: -------------- plugins/classbuilder.c
Modified: plugins/classbuilder.c 18 files changed, 9 insertions(+), 9 deletions(-) =================================================================== @@ -127,8 +127,8 @@ class {class_name}{base_decl}\n\ ";
static const gchar templates_gtk_class_header[] = "{fileheader}\n\n\ -#ifndef __{header_guard}__\n\ -#define __{header_guard}__\n\ +#ifndef {header_guard}_\n\ +#define {header_guard}_ 1\n\ {base_include}\n\ G_BEGIN_DECLS\n\ \n\n\ @@ -139,18 +139,18 @@ class {class_name}{base_decl}\n\ #define {namespace_up}IS_{class_name_up}_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), {namespace_up}TYPE_{class_name_up}))\n\ #define {namespace_up}{class_name_up}_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), {namespace_up}TYPE_{class_name_up}, {namespace}{class_name}Class))\n\ \n\ -typedef struct _{namespace}{class_name} {namespace}{class_name};\n\ -typedef struct _{namespace}{class_name}Class {namespace}{class_name}Class;\n\ -typedef struct _{namespace}{class_name}Private {namespace}{class_name}Private;\n\ +typedef struct {namespace}{class_name}_ {namespace}{class_name};\n\ +typedef struct {namespace}{class_name}Class_ {namespace}{class_name}Class;\n\ +typedef struct {namespace}{class_name}Private_ {namespace}{class_name}Private;\n\ \n\ -struct _{namespace}{class_name}\n\ +struct {namespace}{class_name}_\n\ {\n\ {base_name} parent;\n\ /* add your public declarations here */\n\ {namespace}{class_name}Private *priv;\n\ };\n\ \n\ -struct _{namespace}{class_name}Class\n\ +struct {namespace}{class_name}Class_\n\ {\n\ {base_name}Class parent_class;\n\ };\n\ @@ -160,13 +160,13 @@ struct _{namespace}{class_name}Class\n\ \n\n\ G_END_DECLS\n\ \n\ -#endif /* __{header_guard}__ */\n\ +#endif /* {header_guard}_ */\n\ ";
static const gchar templates_gtk_class_source[] = "{fileheader}\n\ #include "{header}"\n\ \n\ -struct _{namespace}{class_name}Private\n\ +struct {namespace}{class_name}Private_\n\ {\n\ /* add your private declarations here */\n\ gpointer delete_me;\n\
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).