[Evolution-hackers] gtk_message_dialog() alternatives

Jeffrey Stedfast fejj@novell.com
Mon, 07 Mar 2005 16:56:24 -0500


--=-PmjItehrie/ccAVOcNm7
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

you want to use e_error() and friends instead of gtk_message_dialog().

Jeff

On Mon, 2005-03-07 at 23:44 +0200, Jonathan Dieter wrote:
> Okay, I've put together a plugin that implements the functionality in my=20
> original patch that incorporates the standards on variable naming, etc. =20
> The one thing I'm not sure is what evolution-specific function to use=20
> that calls gtk_message_dialog() (or something similar).  The closest=20
> I've found is e_notice(), but that doesn't seem to let you use Yes/No=20
> buttons.  When looking through code in other plugins (save-calendar for=20
> instance), I note that they use gtk_message_dialog().  Any thoughts?
>=20
> While working on the plugin, I've modified configure.in to put my=20
> plugin, default-mail-client-check, in the experimental plugin section=20
> and autoreconf'd it to create the new configure script.  How should I=20
> send the patch to the list?  The changes to both configure and=20
> configure.in are quite extensive.
>=20
> Jonathan
>=20
> Not Zed wrote:
>=20
> >
> > Evolution patches list is probably as good a place as any.  Use=20
> > evolution-hackers if you need to ask questions like this one.  You=20
> > should subscribe to evolution-hackers at any rate.
> >
> > There is a shell event recently added "upgrade.done" which is called=20
> > at startup after the configuration is setup to the current version. =20
> > You can probably use that.
> >
> > The class is "org.gnome.evolution.shell.events:1.0"
> >
> > You might want to look at the other code, it uses a few things  - like=20
> > e-error, which you should be using as well, for any messages - don't=20
> > use gtk_message_dialog() directly.
> >
> >
> >
> > On Thu, 2005-03-03 at 08:23 +0200, Jonathan Dieter wrote:
> >
> >>Thanks for the quick response.  I've just gone through the published=20
> >>eplugin API and I haven't seen any hooks for either evolution startup o=
r=20
> >>the mail component startup.  If you know what they are, or could at=20
> >>least point me in the right direction to look for this information, I'd=
=20
> >>sure appreciate it.  Also, would you want me to send the plugin to the=20
> >>evolution-patches mailing-list or would it be better to send it elsewhe=
re?
> >>
> >>Thanks,
> >>Jonathan Dieter
> >>jdieter99@gmx.net <mailto:jdieter99@gmx.net>
> >>
> >>Not Zed wrote:
> >>
> >>>
> >>>
> >>> Hmm, we actually had a patch all but complete for this last year, fro=
m=20
> >>> Niklas Nylund <ninylund@abo.fi <mailto:ninylund@abo.fi> <mailto:ninyl=
und@abo.fi <mailto:ninylund@abo.fi>>>, but then the=20
> >>> thread seemed to peter out.
> >>>
> >>> I don't really know what we should do about this, since the other=20
> >>> patch was so close.
> >>>
> >>> As for your patch - this functionality should now be done via the=20
> >>> plugin interface.
> >>>
> >>> Also you're using java-style mixedCaps, we don't do that anywhere, we=
=20
> >>> use lower-case names for everthing, usually with _ separating words=20
> >>> (its easier for non-english speakers apparently).
> >>>
> >>> Michael
> >>>
> >>> On Thu, 2005-03-03 at 00:08 +0200, Jonathan Dieter wrote:
> >>>
> >>>>This patch will ask the user if they would like Evolution to be the=20
> >>>>default mailer for GNOME the first time that Evolution is run.  If th=
e=20
> >>>>user says "yes", Evolution sets itself to be the default mailer.  If =
the=20
> >>>>user says "no", Evolution won't change anything.  There is a check bo=
x=20
> >>>>that asks whether the user wants to be asked this question every time=
=20
> >>>>Evolution is started.  If the check box is not checked, Evolution wil=
l=20
> >>>>never ask the question again.  If it is checked, Evolution will only =
ask=20
> >>>>if there is either no mailer set up or if another mailer is set as th=
e=20
> >>>>default one.
> >>>>
> >>>>This is my first attempt at a patch, so any feedback would be=20
> >>>>appreciated.  Thanks,
> >>>>
> >>>>Jonathan Dieter
> >>>>jdieter99 at gmx dot net
> >>>>   =20
> >>>>
> >>
> >>   =20
> >>
> _______________________________________________
> evolution-hackers maillist  -  evolution-hackers@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/evolution-hackers
>=20
--=20
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj@ximian.com  - www.novell.com

--=-PmjItehrie/ccAVOcNm7
Content-Type: application/x-pkcs7-signature; name=smime.p7s
Content-Disposition: attachment; filename=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgU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