mail-archives/gtk-sharp-list/2004-July/004435.html

200 строки
8.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] patch for gnome binding
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mwh%40sysrq.dk">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="004434.html">
<LINK REL="Next" HREF="004436.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] patch for gnome binding
</H1>
<B>Martin Willemoes Hansen
</B>
<A HREF="mailto:mwh%40sysrq.dk"
TITLE="[Gtk-sharp-list] patch for gnome binding">mwh@sysrq.dk
</A><BR>
<I>Mon, 12 Jul 2004 21:03:45 +0200</I>
<P><UL>
<LI> Previous message: <A HREF="004434.html">[Gtk-sharp-list] patch for gnome binding
</A></li>
<LI> Next message: <A HREF="004436.html">[Gtk-sharp-list] Stalls when calling Gdk.Threads.Enter twice
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4435">[ date ]</a>
<a href="thread.html#4435">[ thread ]</a>
<a href="subject.html#4435">[ subject ]</a>
<a href="author.html#4435">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>--=-fGsZQ+GE0ufmX7afwMUU
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
man, 2004-07-12 kl. 19:09 skrev Martin Willemoes Hansen:
&gt;<i> man, 2004-07-12 kl. 18:34 skrev Mike Kestner:
</I>&gt;<i> &gt; On Mon, 2004-07-12 at 10:55, Martin Willemoes Hansen wrote:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; &gt; &gt; I'm not convinced it's a good idea to expose set_Config publicly. I
</I>&gt;<i> &gt; &gt; &gt; would just invoke the glue method from the ctor instead and leave the
</I>&gt;<i> &gt; &gt; &gt; property read only.
</I>&gt;<i> &gt; &gt;
</I>&gt;<i> &gt; &gt; Ok, here is yet another updated patch ;)
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Why did you switch to using g_object_set? Are you certain that will
</I>&gt;<i> &gt; take a ref and assign the config field of the GnomePrintJob struct for
</I>&gt;<i> &gt; the job? It seems really inefficient at best to do it that way. Why
</I>&gt;<i> &gt; not just:
</I>&gt;<i> &gt; job-&gt;config = gnome_print_config_ref (config);
</I>&gt;<i> &gt;
</I>&gt;<i>
</I>&gt;<i> When using the above statement I get the error:
</I>&gt;<i> printjob.c: In function `gnomesharp_print_job_set_print_config':
</I>&gt;<i> printjob.c:30: error: dereferencing pointer to incomplete type
</I>&gt;<i>
</I>&gt;<i> &gt; Also, your .custom should import and use
</I>&gt;<i> &gt; gnomesharp_print_job_set_print_config, since that's what you named the
</I>&gt;<i> &gt; method in the glue.
</I>&gt;<i> Ahh I must be sleepy.
</I>
Okay as we discussed on IRC, the inheritable property of the class is
not easy to implement, without modification of the underlying c code, so
here is the patch which just adds an overload ctor.
--
Martin Willemoes Hansen
--=-fGsZQ+GE0ufmX7afwMUU
Content-Disposition: attachment; filename=gnome.diff
Content-Type: text/x-patch; name=gnome.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
? gnome.diff
? art/gtk-sharp.pub
? atk/gtk-sharp.pub
? gconf/GConf/gtk-sharp.pub
? gconf/GConf.PropertyEditors/gtk-sharp.pub
? gda/gtk-sharp.pub
? gdk/gtk-sharp.pub
? glade/gtk-sharp.pub
? glib/gtk-sharp.pub
? gnome/gtk-sharp.pub
? gnomedb/gtk-sharp.pub
? gtk/gtk-sharp.pub
? gtkhtml/gtk-sharp.pub
? pango/gtk-sharp.pub
? rsvg/gtk-sharp.pub
? vte/gtk-sharp.pub
Index: ChangeLog
===================================================================
RCS file: /cvs/public/gtk-sharp/ChangeLog,v
retrieving revision 1.877
diff -u -r1.877 ChangeLog
--- ChangeLog 9 Jul 2004 15:28:51 -0000 1.877
+++ ChangeLog 12 Jul 2004 18:05:01 -0000
@@ -1,3 +1,10 @@
+2004-07-12 Martin Willemoes Hansen &lt;<A HREF="mailto:mwh@sysrq.dk">mwh@sysrq.dk</A>&gt;
+
+ * gnome/Gnome.metadata: Fixed typo i to 1
+ Remove unnessesary disabledefaultconstructor
+ * gnome/PrintJob.custom: Change ctor to an overload ctor
+ * gnome/glue/Makefile.am: Remove empty comment
+
2004-07-09 Mike Kestner &lt;<A HREF="mailto:mkestner@ximian.com">mkestner@ximian.com</A>&gt;
* gdk/Gdk.metadata : mark gc param of Drawable.DrawPixbuf null_ok.
Index: gnome/Gnome.metadata
===================================================================
RCS file: /cvs/public/gtk-sharp/gnome/Gnome.metadata,v
retrieving revision 1.16
diff -u -r1.16 Gnome.metadata
--- gnome/Gnome.metadata 19 Jun 2004 14:46:11 -0000 1.16
+++ gnome/Gnome.metadata 12 Jul 2004 18:05:01 -0000
@@ -88,7 +88,7 @@
&lt;attr path=&quot;/api/namespace/object[@cname='GnomeIconEntry']/method[@name='PickDialog']&quot; name=&quot;hidden&quot;&gt;1&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomeIconList']/method[@cname='gnome_icon_list_construct']/*/*[@type='GtkAdjustment*']&quot; name=&quot;null_ok&quot;&gt;1&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomeIconList']/constructor[@cname='gnome_icon_list_new']&quot; name=&quot;hidden&quot;&gt;1&lt;/attr&gt;
- &lt;attr path=&quot;/api/namespace/object[@cname='GnomeIconList']/method[@name='GetSelection']&quot; name=&quot;hidden&quot;&gt;i&lt;/attr&gt;
+ &lt;attr path=&quot;/api/namespace/object[@cname='GnomeIconList']/method[@name='GetSelection']&quot; name=&quot;hidden&quot;&gt;1&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomeIconList']/method[@name='SetHadjustment']/*/*[@type='GtkAdjustment*']&quot; name=&quot;null_ok&quot;&gt;1&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomeIconList']/method[@name='SetVadjustment']/*/*[@type='GtkAdjustment*']&quot; name=&quot;null_ok&quot;&gt;1&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomeIconList']/signal[@name='FocusIcon']&quot; name=&quot;name&quot;&gt;IconFocused&lt;/attr&gt;
@@ -101,7 +101,6 @@
&lt;attr path=&quot;/api/namespace/object[@cname='GnomePrintDialog']/method/*/*[@type='const-guchar*']&quot; name=&quot;type&quot;&gt;const-gchar*&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomePrintDialog']/constructor[@cname='gnome_print_dialog_new']/*/*[@type='const-guchar*']&quot; name=&quot;type&quot;&gt;const-gchar*&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomePrintDialog']/constructor[@cname='gnome_print_dialog_new']/*/*[@name='flags']&quot; name=&quot;type&quot;&gt;GnomePrintDialogFlags&lt;/attr&gt;
- &lt;attr path=&quot;/api/namespace/object[@cname='GnomePrintJob']&quot; name=&quot;disabledefaultconstructor&quot;&gt;1&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomePrintJobPreview']/constructor/*/*[@type='const-guchar*']&quot; name=&quot;type&quot;&gt;const-gchar*&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomePrintMeta']/method/*/*[@name='filename']&quot; name=&quot;type&quot;&gt;const-gchar*&lt;/attr&gt;
&lt;attr path=&quot;/api/namespace/object[@cname='GnomePrintPdf']&quot; name=&quot;parent&quot;&gt;GObject&lt;/attr&gt;
Index: gnome/PrintJob.custom
===================================================================
RCS file: /cvs/public/gtk-sharp/gnome/PrintJob.custom,v
retrieving revision 1.3
diff -u -r1.3 PrintJob.custom
--- gnome/PrintJob.custom 25 Jun 2004 18:42:18 -0000 1.3
+++ gnome/PrintJob.custom 12 Jul 2004 18:05:01 -0000
@@ -3,7 +3,7 @@
//
// Author: Martin Willemoes Hansen &lt;<A HREF="mailto:mwh@sysrq.dk">mwh@sysrq.dk</A>&gt;
//
-// Copyright (C) 2003 Martin Willemoes Hansen
+// Copyright (C) 2003 2004 Martin Willemoes Hansen
//
// This code is inserted after the automatically generated code.
//
@@ -22,8 +22,4 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
-
-public PrintJob() : base (IntPtr.Zero)
-{
- Raw = gnome_print_job_new (PrintConfig.Default().Handle);
-}
+public PrintJob() : this (PrintConfig.Default()) {}
Index: gnome/glue/Makefile.am
===================================================================
RCS file: /cvs/public/gtk-sharp/gnome/glue/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- gnome/glue/Makefile.am 11 Jun 2004 18:19:40 -0000 1.4
+++ gnome/glue/Makefile.am 12 Jul 2004 18:05:01 -0000
@@ -16,8 +16,7 @@
canvas-proxy.h \
canvas-proxy-marshal.c \
canvas-proxy-marshal.h \
- program.c \
- #
+ program.c
libgnomesharpglue_la_LIBADD = $(GNOME_LIBS)
--=-fGsZQ+GE0ufmX7afwMUU--
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="004434.html">[Gtk-sharp-list] patch for gnome binding
</A></li>
<LI> Next message: <A HREF="004436.html">[Gtk-sharp-list] Stalls when calling Gdk.Threads.Enter twice
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#4435">[ date ]</a>
<a href="thread.html#4435">[ thread ]</a>
<a href="subject.html#4435">[ subject ]</a>
<a href="author.html#4435">[ author ]</a>
</LI>
</UL>
</body></html>