[Gtk-sharp-list] enums not generated for gnomeprintui

Martin Willemoes Hansen mwh@sysrq.dk
Thu, 25 Sep 2003 13:12:28 +0200


--=-lVjLX592hLWq0rrfPeAW
Content-Type: multipart/alternative; boundary="=-g3I9ucoi2YMgvFIEK/cR"


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

Hi!

I noticed that the following enums is not parsed correctly by Gtk#:
    GnomePrintDialogRangeFlags
    GnomePrintDialogFlags
    GnomePrintButtons
    GnomePaperSelectorFlags

I noticed that they are on the form enum foobar { ... }; but
if I change them to have the form typedef enum { ... } foobar; 
they will be parsed correctly.

The changes are attached.

What do you think about it? Should I mail this to the gnomeprint team?
Is it the parser who is doing something wrongly?
-- 
Martin Willemoes Hansen

--------------------------------------------------------
E-Mail	mwh@sysrq.dk	Website	mwh.sysrq.dk
IRC     MWH, freenode.net
--------------------------------------------------------               


--=-g3I9ucoi2YMgvFIEK/cR
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.8">
</HEAD>
<BODY>
Hi!<BR>
<BR>
I noticed that the following enums is not parsed correctly by Gtk#:<BR>
&nbsp;&nbsp;&nbsp; GnomePrintDialogRangeFlags<BR>
&nbsp;&nbsp;&nbsp; GnomePrintDialogFlags<BR>
&nbsp;&nbsp;&nbsp; GnomePrintButtons<BR>
&nbsp;&nbsp;&nbsp; GnomePaperSelectorFlags<BR>
<BR>
I noticed that they are on the form enum foobar { ... }; but<BR>
if I change them to have the form typedef enum { ... } foobar; <BR>
they will be parsed correctly.<BR>
<BR>
The changes are attached.<BR>
<BR>
What do you think about it? Should I mail this to the gnomeprint team? Is it the parser who is doing something wrongly?<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>-- 
Martin Willemoes Hansen

--------------------------------------------------------
E-Mail	mwh@sysrq.dk	Website	mwh.sysrq.dk
IRC     MWH, freenode.net
--------------------------------------------------------               
</PRE>
</TD>
</TR>
</TABLE>

</BODY>
</HTML>

--=-g3I9ucoi2YMgvFIEK/cR--

--=-lVjLX592hLWq0rrfPeAW
Content-Disposition: attachment; filename=gnome-print-dialog.h.diff
Content-Type: text/x-patch; name=gnome-print-dialog.h.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

--- gnome-print-dialog.h.old	2003-09-25 13:05:07.000000000 +0200
+++ gnome-print-dialog.h	2003-09-25 13:06:09.000000000 +0200
@@ -60,31 +60,31 @@
 /*
  * Flags for creation of range widget
  */
-enum GnomePrintDialogRangeFlags {
+typedef enum {
 	GNOME_PRINT_RANGE_CURRENT = (1 << 0),
 	GNOME_PRINT_RANGE_ALL = (1 << 1),
 	GNOME_PRINT_RANGE_RANGE = (1 << 2),
 	GNOME_PRINT_RANGE_SELECTION = (1 << 3),
 	GNOME_PRINT_RANGE_SELECTION_UNSENSITIVE  = (1 << 4),
-};
+} GnomePrintDialogRangeFlags;
 
 /*
  * Flags to specify, whether we want range and copies widgets
  */
-enum GnomePrintDialogFlags {
+typedef enum {
 	GNOME_PRINT_DIALOG_RANGE = (1 << 0),
 	GNOME_PRINT_DIALOG_COPIES = (1 << 1)
-};
+} GnomePrintDialogFlags;
 
 /*
  * The button numbers corresponding to the standard buttons
  * Used with the GnomeDialog "clicked" signal.
  */
-enum GnomePrintButtons {
+typedef enum {
 	GNOME_PRINT_DIALOG_RESPONSE_PRINT = 1,
 	GNOME_PRINT_DIALOG_RESPONSE_PREVIEW,
 	GNOME_PRINT_DIALOG_RESPONSE_CANCEL = GTK_RESPONSE_CANCEL,
-};
+} GnomePrintButtons;
 
 GType gnome_print_dialog_get_type (void);
 

--=-lVjLX592hLWq0rrfPeAW
Content-Disposition: attachment; filename=gnome-print-paper-selector.h.diff
Content-Type: text/x-patch; name=gnome-print-paper-selector.h.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

--- gnome-print-paper-selector.h.old	2003-01-11 17:46:47.000000000 +0100
+++ gnome-print-paper-selector.h	2003-09-25 13:10:12.000000000 +0200
@@ -44,10 +44,10 @@
 #include <glib-object.h>
 #include <libgnomeprint/gnome-print-config.h>
 
-enum GnomePaperSelectorFlags {
+typedef enum {
 	GNOME_PAPER_SELECTOR_MARGINS = (1 << 0),
 	GNOME_PAPER_SELECTOR_FEED_ORIENTATION = (1 << 1)
-};
+} GnomePaperSelectorFlags;
 
 GType       gnome_paper_selector_get_type (void);
 GtkWidget * gnome_paper_selector_new (GnomePrintConfig *config);

--=-lVjLX592hLWq0rrfPeAW--