commit f0d5f00de28e9f45d8a1d65258e97f0a07c68b97 parent 8d69a8c175ac6b7003ac2e7b461d7170a319e126 Author: Dan Callaghan <djc@djc.id.au> Date: Thu, 4 Nov 2010 21:24:22 +1000 gob-generated artefacts should not be versioned Diffstat:
D | build/src/mn-about-dialog-private.h | | | 17 | ----------------- |
D | build/src/mn-about-dialog.c | | | 178 | ------------------------------------------------------------------------------- |
D | build/src/mn-about-dialog.gob.stamp | | | 0 | |
D | build/src/mn-about-dialog.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-auth-combo-box-private.h | | | 17 | ----------------- |
D | build/src/mn-auth-combo-box.c | | | 404 | ------------------------------------------------------------------------------- |
D | build/src/mn-auth-combo-box.gob.stamp | | | 0 | |
D | build/src/mn-auth-combo-box.h | | | 84 | ------------------------------------------------------------------------------- |
D | build/src/mn-authenticated-mailbox-private.h | | | 47 | ----------------------------------------------- |
D | build/src/mn-authenticated-mailbox-properties-private.h | | | 43 | ------------------------------------------- |
D | build/src/mn-authenticated-mailbox-properties.c | | | 575 | ------------------------------------------------------------------------------- |
D | build/src/mn-authenticated-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-authenticated-mailbox-properties.h | | | 70 | ---------------------------------------------------------------------- |
D | build/src/mn-authenticated-mailbox.c | | | 1052 | ------------------------------------------------------------------------------- |
D | build/src/mn-authenticated-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-authenticated-mailbox.h | | | 103 | ------------------------------------------------------------------------------- |
D | build/src/mn-autodetect-mailbox-properties-private.h | | | 24 | ------------------------ |
D | build/src/mn-autodetect-mailbox-properties.c | | | 470 | ------------------------------------------------------------------------------- |
D | build/src/mn-autodetect-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-autodetect-mailbox-properties.h | | | 77 | ----------------------------------------------------------------------------- |
D | build/src/mn-base-mbox-mailbox-backend-private.h | | | 30 | ------------------------------ |
D | build/src/mn-base-mbox-mailbox-backend.c | | | 606 | ------------------------------------------------------------------------------- |
D | build/src/mn-base-mbox-mailbox-backend.gob.stamp | | | 0 | |
D | build/src/mn-base-mbox-mailbox-backend.h | | | 65 | ----------------------------------------------------------------- |
D | build/src/mn-compact-message-view-private.h | | | 17 | ----------------- |
D | build/src/mn-compact-message-view.c | | | 249 | ------------------------------------------------------------------------------- |
D | build/src/mn-compact-message-view.gob.stamp | | | 0 | |
D | build/src/mn-compact-message-view.h | | | 60 | ------------------------------------------------------------ |
D | build/src/mn-custom-vfs-mailbox-private.h | | | 17 | ----------------- |
D | build/src/mn-custom-vfs-mailbox.c | | | 314 | ------------------------------------------------------------------------------- |
D | build/src/mn-custom-vfs-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-custom-vfs-mailbox.h | | | 71 | ----------------------------------------------------------------------- |
D | build/src/mn-dialog-private.h | | | 17 | ----------------- |
D | build/src/mn-dialog.c | | | 117 | ------------------------------------------------------------------------------- |
D | build/src/mn-dialog.gob.stamp | | | 0 | |
D | build/src/mn-dialog.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-evolution-client-private.h | | | 22 | ---------------------- |
D | build/src/mn-evolution-client.c | | | 438 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-client.gob.stamp | | | 0 | |
D | build/src/mn-evolution-client.h | | | 86 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-folder-tree-client-private.h | | | 34 | ---------------------------------- |
D | build/src/mn-evolution-folder-tree-client.c | | | 827 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-folder-tree-client.gob.stamp | | | 0 | |
D | build/src/mn-evolution-folder-tree-client.h | | | 106 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-folder-tree-server-private.h | | | 32 | -------------------------------- |
D | build/src/mn-evolution-folder-tree-server.c | | | 547 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-folder-tree-server.gob.stamp | | | 0 | |
D | build/src/mn-evolution-folder-tree-server.h | | | 97 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-mailbox-private.h | | | 35 | ----------------------------------- |
D | build/src/mn-evolution-mailbox-properties-private.h | | | 30 | ------------------------------ |
D | build/src/mn-evolution-mailbox-properties.c | | | 349 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-evolution-mailbox-properties.h | | | 74 | -------------------------------------------------------------------------- |
D | build/src/mn-evolution-mailbox.c | | | 633 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-evolution-mailbox.h | | | 81 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-message-private.h | | | 22 | ---------------------- |
D | build/src/mn-evolution-message.c | | | 416 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-message.gob.stamp | | | 0 | |
D | build/src/mn-evolution-message.h | | | 83 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-server-private.h | | | 17 | ----------------- |
D | build/src/mn-evolution-server.c | | | 802 | ------------------------------------------------------------------------------- |
D | build/src/mn-evolution-server.gob.stamp | | | 0 | |
D | build/src/mn-evolution-server.h | | | 90 | ------------------------------------------------------------------------------- |
D | build/src/mn-file-chooser-button-private.h | | | 40 | ---------------------------------------- |
D | build/src/mn-file-chooser-button.c | | | 552 | ------------------------------------------------------------------------------- |
D | build/src/mn-file-chooser-button.gob.stamp | | | 0 | |
D | build/src/mn-file-chooser-button.h | | | 89 | ------------------------------------------------------------------------------- |
D | build/src/mn-gmail-mailbox-private.h | | | 28 | ---------------------------- |
D | build/src/mn-gmail-mailbox-properties-private.h | | | 26 | -------------------------- |
D | build/src/mn-gmail-mailbox-properties.c | | | 379 | ------------------------------------------------------------------------------- |
D | build/src/mn-gmail-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-gmail-mailbox-properties.h | | | 75 | --------------------------------------------------------------------------- |
D | build/src/mn-gmail-mailbox.c | | | 740 | ------------------------------------------------------------------------------- |
D | build/src/mn-gmail-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-gmail-mailbox.h | | | 85 | ------------------------------------------------------------------------------- |
D | build/src/mn-gmime-stream-vfs-private.h | | | 28 | ---------------------------- |
D | build/src/mn-gmime-stream-vfs.c | | | 597 | ------------------------------------------------------------------------------- |
D | build/src/mn-gmime-stream-vfs.gob.stamp | | | 0 | |
D | build/src/mn-gmime-stream-vfs.h | | | 68 | -------------------------------------------------------------------- |
D | build/src/mn-hotmail-mailbox-private.h | | | 17 | ----------------- |
D | build/src/mn-hotmail-mailbox-properties-private.h | | | 17 | ----------------- |
D | build/src/mn-hotmail-mailbox-properties.c | | | 125 | ------------------------------------------------------------------------------- |
D | build/src/mn-hotmail-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-hotmail-mailbox-properties.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-hotmail-mailbox.c | | | 641 | ------------------------------------------------------------------------------- |
D | build/src/mn-hotmail-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-hotmail-mailbox.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-imap-mailbox-private.h | | | 30 | ------------------------------ |
D | build/src/mn-imap-mailbox-properties-private.h | | | 34 | ---------------------------------- |
D | build/src/mn-imap-mailbox-properties.c | | | 433 | ------------------------------------------------------------------------------- |
D | build/src/mn-imap-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-imap-mailbox-properties.h | | | 74 | -------------------------------------------------------------------------- |
D | build/src/mn-imap-mailbox.c | | | 2867 | ------------------------------------------------------------------------------- |
D | build/src/mn-imap-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-imap-mailbox.h | | | 101 | ------------------------------------------------------------------------------- |
D | build/src/mn-mail-icon-private.h | | | 36 | ------------------------------------ |
D | build/src/mn-mail-icon-widget-private.h | | | 34 | ---------------------------------- |
D | build/src/mn-mail-icon-widget.c | | | 714 | ------------------------------------------------------------------------------- |
D | build/src/mn-mail-icon-widget.gob.stamp | | | 0 | |
D | build/src/mn-mail-icon-widget.h | | | 100 | ------------------------------------------------------------------------------- |
D | build/src/mn-mail-icon.c | | | 967 | ------------------------------------------------------------------------------- |
D | build/src/mn-mail-icon.gob.stamp | | | 0 | |
D | build/src/mn-mail-icon.h | | | 162 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox-private.h | | | 79 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox-properties-dialog-private.h | | | 84 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox-properties-dialog.c | | | 1330 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox-properties-dialog.gob.stamp | | | 0 | |
D | build/src/mn-mailbox-properties-dialog.h | | | 101 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox-properties-private.h | | | 34 | ---------------------------------- |
D | build/src/mn-mailbox-properties.c | | | 543 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-mailbox-properties.h | | | 105 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox-view-private.h | | | 36 | ------------------------------------ |
D | build/src/mn-mailbox-view.c | | | 1756 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox-view.gob.stamp | | | 0 | |
D | build/src/mn-mailbox-view.h | | | 143 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox.c | | | 2397 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-mailbox.h | | | 256 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailboxes-private.h | | | 26 | -------------------------- |
D | build/src/mn-mailboxes.c | | | 1652 | ------------------------------------------------------------------------------- |
D | build/src/mn-mailboxes.gob.stamp | | | 0 | |
D | build/src/mn-mailboxes.h | | | 156 | ------------------------------------------------------------------------------- |
D | build/src/mn-maildir-mailbox-backend-private.h | | | 17 | ----------------- |
D | build/src/mn-maildir-mailbox-backend.c | | | 472 | ------------------------------------------------------------------------------- |
D | build/src/mn-maildir-mailbox-backend.gob.stamp | | | 0 | |
D | build/src/mn-maildir-mailbox-backend.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-maildir-message-private.h | | | 23 | ----------------------- |
D | build/src/mn-maildir-message.c | | | 449 | ------------------------------------------------------------------------------- |
D | build/src/mn-maildir-message.gob.stamp | | | 0 | |
D | build/src/mn-maildir-message.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-mbox-mailbox-backend-private.h | | | 17 | ----------------- |
D | build/src/mn-mbox-mailbox-backend.c | | | 148 | ------------------------------------------------------------------------------- |
D | build/src/mn-mbox-mailbox-backend.gob.stamp | | | 0 | |
D | build/src/mn-mbox-mailbox-backend.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-message-private.h | | | 37 | ------------------------------------- |
D | build/src/mn-message-view-private.h | | | 31 | ------------------------------- |
D | build/src/mn-message-view.c | | | 445 | ------------------------------------------------------------------------------- |
D | build/src/mn-message-view.gob.stamp | | | 0 | |
D | build/src/mn-message-view.h | | | 70 | ---------------------------------------------------------------------- |
D | build/src/mn-message.c | | | 1385 | ------------------------------------------------------------------------------- |
D | build/src/mn-message.gob.stamp | | | 0 | |
D | build/src/mn-message.h | | | 191 | ------------------------------------------------------------------------------- |
D | build/src/mn-mh-mailbox-backend-private.h | | | 17 | ----------------- |
D | build/src/mn-mh-mailbox-backend.c | | | 417 | ------------------------------------------------------------------------------- |
D | build/src/mn-mh-mailbox-backend.gob.stamp | | | 0 | |
D | build/src/mn-mh-mailbox-backend.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-mozilla-mailbox-backend-private.h | | | 17 | ----------------- |
D | build/src/mn-mozilla-mailbox-backend.c | | | 204 | ------------------------------------------------------------------------------- |
D | build/src/mn-mozilla-mailbox-backend.gob.stamp | | | 0 | |
D | build/src/mn-mozilla-mailbox-backend.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-pi-mailbox-private.h | | | 59 | ----------------------------------------------------------- |
D | build/src/mn-pi-mailbox-properties-private.h | | | 23 | ----------------------- |
D | build/src/mn-pi-mailbox-properties.c | | | 611 | ------------------------------------------------------------------------------- |
D | build/src/mn-pi-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-pi-mailbox-properties.h | | | 76 | ---------------------------------------------------------------------------- |
D | build/src/mn-pi-mailbox.c | | | 795 | ------------------------------------------------------------------------------- |
D | build/src/mn-pi-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-pi-mailbox.h | | | 106 | ------------------------------------------------------------------------------- |
D | build/src/mn-pop3-mailbox-private.h | | | 24 | ------------------------ |
D | build/src/mn-pop3-mailbox-properties-private.h | | | 17 | ----------------- |
D | build/src/mn-pop3-mailbox-properties.c | | | 205 | ------------------------------------------------------------------------------- |
D | build/src/mn-pop3-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-pop3-mailbox-properties.h | | | 67 | ------------------------------------------------------------------- |
D | build/src/mn-pop3-mailbox.c | | | 1855 | ------------------------------------------------------------------------------- |
D | build/src/mn-pop3-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-pop3-mailbox.h | | | 70 | ---------------------------------------------------------------------- |
D | build/src/mn-popup-private.h | | | 22 | ---------------------- |
D | build/src/mn-popup.c | | | 555 | ------------------------------------------------------------------------------- |
D | build/src/mn-popup.gob.stamp | | | 0 | |
D | build/src/mn-popup.h | | | 87 | ------------------------------------------------------------------------------- |
D | build/src/mn-popups-private.h | | | 22 | ---------------------- |
D | build/src/mn-popups.c | | | 531 | ------------------------------------------------------------------------------- |
D | build/src/mn-popups.gob.stamp | | | 0 | |
D | build/src/mn-popups.h | | | 61 | ------------------------------------------------------------- |
D | build/src/mn-properties-dialog-private.h | | | 92 | ------------------------------------------------------------------------------- |
D | build/src/mn-properties-dialog.c | | | 564 | ------------------------------------------------------------------------------- |
D | build/src/mn-properties-dialog.gob.stamp | | | 0 | |
D | build/src/mn-properties-dialog.h | | | 62 | -------------------------------------------------------------- |
D | build/src/mn-reentrant-mailbox-private.h | | | 32 | -------------------------------- |
D | build/src/mn-reentrant-mailbox.c | | | 349 | ------------------------------------------------------------------------------- |
D | build/src/mn-reentrant-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-reentrant-mailbox.h | | | 63 | --------------------------------------------------------------- |
D | build/src/mn-server-private.h | | | 17 | ----------------- |
D | build/src/mn-server.c | | | 364 | ------------------------------------------------------------------------------- |
D | build/src/mn-server.gob.stamp | | | 0 | |
D | build/src/mn-server.h | | | 67 | ------------------------------------------------------------------- |
D | build/src/mn-shell-private.h | | | 38 | -------------------------------------- |
D | build/src/mn-shell.c | | | 1732 | ------------------------------------------------------------------------------- |
D | build/src/mn-shell.gob.stamp | | | 0 | |
D | build/src/mn-shell.h | | | 161 | ------------------------------------------------------------------------------- |
D | build/src/mn-sound-file-chooser-dialog-private.h | | | 28 | ---------------------------- |
D | build/src/mn-sound-file-chooser-dialog.c | | | 328 | ------------------------------------------------------------------------------- |
D | build/src/mn-sound-file-chooser-dialog.gob.stamp | | | 0 | |
D | build/src/mn-sound-file-chooser-dialog.h | | | 65 | ----------------------------------------------------------------- |
D | build/src/mn-sound-player-private.h | | | 26 | -------------------------- |
D | build/src/mn-sound-player.c | | | 589 | ------------------------------------------------------------------------------- |
D | build/src/mn-sound-player.gob.stamp | | | 0 | |
D | build/src/mn-sound-player.h | | | 91 | ------------------------------------------------------------------------------- |
D | build/src/mn-standard-message-view-private.h | | | 17 | ----------------- |
D | build/src/mn-standard-message-view.c | | | 250 | ------------------------------------------------------------------------------- |
D | build/src/mn-standard-message-view.gob.stamp | | | 0 | |
D | build/src/mn-standard-message-view.h | | | 60 | ------------------------------------------------------------ |
D | build/src/mn-sylpheed-mailbox-backend-private.h | | | 42 | ------------------------------------------ |
D | build/src/mn-sylpheed-mailbox-backend.c | | | 804 | ------------------------------------------------------------------------------- |
D | build/src/mn-sylpheed-mailbox-backend.gob.stamp | | | 0 | |
D | build/src/mn-sylpheed-mailbox-backend.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-sylpheed-message-private.h | | | 17 | ----------------- |
D | build/src/mn-sylpheed-message.c | | | 201 | ------------------------------------------------------------------------------- |
D | build/src/mn-sylpheed-message.gob.stamp | | | 0 | |
D | build/src/mn-sylpheed-message.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-system-vfs-mailbox-private.h | | | 17 | ----------------- |
D | build/src/mn-system-vfs-mailbox-properties-private.h | | | 17 | ----------------- |
D | build/src/mn-system-vfs-mailbox-properties.c | | | 225 | ------------------------------------------------------------------------------- |
D | build/src/mn-system-vfs-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-system-vfs-mailbox-properties.h | | | 69 | --------------------------------------------------------------------- |
D | build/src/mn-system-vfs-mailbox.c | | | 267 | ------------------------------------------------------------------------------- |
D | build/src/mn-system-vfs-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-system-vfs-mailbox.h | | | 60 | ------------------------------------------------------------ |
D | build/src/mn-test-mailbox-private.h | | | 17 | ----------------- |
D | build/src/mn-test-mailbox.c | | | 197 | ------------------------------------------------------------------------------- |
D | build/src/mn-test-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-test-mailbox.h | | | 60 | ------------------------------------------------------------ |
D | build/src/mn-text-table-private.h | | | 42 | ------------------------------------------ |
D | build/src/mn-text-table.c | | | 706 | ------------------------------------------------------------------------------- |
D | build/src/mn-text-table.gob.stamp | | | 0 | |
D | build/src/mn-text-table.h | | | 95 | ------------------------------------------------------------------------------- |
D | build/src/mn-tooltips-private.h | | | 45 | --------------------------------------------- |
D | build/src/mn-tooltips.c | | | 1183 | ------------------------------------------------------------------------------- |
D | build/src/mn-tooltips.gob.stamp | | | 0 | |
D | build/src/mn-tooltips.h | | | 78 | ------------------------------------------------------------------------------ |
D | build/src/mn-vfs-mailbox-backend-private.h | | | 28 | ---------------------------- |
D | build/src/mn-vfs-mailbox-backend.c | | | 421 | ------------------------------------------------------------------------------- |
D | build/src/mn-vfs-mailbox-backend.gob.stamp | | | 0 | |
D | build/src/mn-vfs-mailbox-backend.h | | | 89 | ------------------------------------------------------------------------------- |
D | build/src/mn-vfs-mailbox-private.h | | | 40 | ---------------------------------------- |
D | build/src/mn-vfs-mailbox.c | | | 809 | ------------------------------------------------------------------------------- |
D | build/src/mn-vfs-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-vfs-mailbox.h | | | 80 | ------------------------------------------------------------------------------- |
D | build/src/mn-vfs-message-private.h | | | 17 | ----------------- |
D | build/src/mn-vfs-message.c | | | 306 | ------------------------------------------------------------------------------- |
D | build/src/mn-vfs-message.gob.stamp | | | 0 | |
D | build/src/mn-vfs-message.h | | | 89 | ------------------------------------------------------------------------------- |
D | build/src/mn-webmail-mailbox-private.h | | | 35 | ----------------------------------- |
D | build/src/mn-webmail-mailbox-properties-private.h | | | 26 | -------------------------- |
D | build/src/mn-webmail-mailbox-properties.c | | | 367 | ------------------------------------------------------------------------------- |
D | build/src/mn-webmail-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-webmail-mailbox-properties.h | | | 75 | --------------------------------------------------------------------------- |
D | build/src/mn-webmail-mailbox.c | | | 773 | ------------------------------------------------------------------------------- |
D | build/src/mn-webmail-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-webmail-mailbox.h | | | 79 | ------------------------------------------------------------------------------- |
D | build/src/mn-yahoo-mailbox-private.h | | | 17 | ----------------- |
D | build/src/mn-yahoo-mailbox-properties-private.h | | | 17 | ----------------- |
D | build/src/mn-yahoo-mailbox-properties.c | | | 125 | ------------------------------------------------------------------------------- |
D | build/src/mn-yahoo-mailbox-properties.gob.stamp | | | 0 | |
D | build/src/mn-yahoo-mailbox-properties.h | | | 57 | --------------------------------------------------------- |
D | build/src/mn-yahoo-mailbox.c | | | 509 | ------------------------------------------------------------------------------- |
D | build/src/mn-yahoo-mailbox.gob.stamp | | | 0 | |
D | build/src/mn-yahoo-mailbox.h | | | 57 | --------------------------------------------------------- |
260 files changed, 0 insertions(+), 50208 deletions(-) diff --git a/build/src/mn-about-dialog-private.h b/build/src/mn-about-dialog-private.h @@ -1,17 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_ABOUT_DIALOG_PRIVATE_H__ -#define __MN_ABOUT_DIALOG_PRIVATE_H__ - -#include "mn-about-dialog.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-about-dialog.c b/build/src/mn-about-dialog.c @@ -1,178 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-about-dialog.h" - -#include "mn-about-dialog-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 24 "src/mn-about-dialog.gob" - -#include <glib/gi18n.h> -#include "mn-util.h" - -#line 31 "mn-about-dialog.c" -/* self casting macros */ -#define SELF(x) MN_ABOUT_DIALOG(x) -#define SELF_CONST(x) MN_ABOUT_DIALOG_CONST(x) -#define IS_SELF(x) MN_IS_ABOUT_DIALOG(x) -#define TYPE_SELF MN_TYPE_ABOUT_DIALOG -#define SELF_CLASS(x) MN_ABOUT_DIALOG_CLASS(x) - -#define SELF_GET_CLASS(x) MN_ABOUT_DIALOG_GET_CLASS(x) - -/* self typedefs */ -typedef MNAboutDialog Self; -typedef MNAboutDialogClass SelfClass; - -/* here are local prototypes */ -#line 31 "src/mn-about-dialog.gob" -static void mn_about_dialog_class_init (MNAboutDialogClass * class) G_GNUC_UNUSED; -#line 48 "mn-about-dialog.c" -#line 37 "src/mn-about-dialog.gob" -static void mn_about_dialog_init (MNAboutDialog * self) G_GNUC_UNUSED; -#line 51 "mn-about-dialog.c" -#line 64 "src/mn-about-dialog.gob" -static void mn_about_dialog_activate_link_cb (GtkAboutDialog * about, const char * link, gpointer data) G_GNUC_UNUSED; -#line 54 "mn-about-dialog.c" - -/* pointer to the class of our parent */ -static GtkAboutDialogClass *parent_class = NULL; - -/* Short form macros */ -#define self_activate_link_cb mn_about_dialog_activate_link_cb -GType -mn_about_dialog_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNAboutDialogClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_about_dialog_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNAboutDialog), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_about_dialog_init, - NULL - }; - - type = g_type_register_static (GTK_TYPE_ABOUT_DIALOG, "MNAboutDialog", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNAboutDialog *)g_object_new(mn_about_dialog_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNAboutDialog * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNAboutDialog * -GET_NEW_VARG (const char *first, ...) -{ - MNAboutDialog *ret; - va_list ap; - va_start (ap, first); - ret = (MNAboutDialog *)g_object_new_valist (mn_about_dialog_get_type (), first, ap); - va_end (ap); - return ret; -} - -#line 31 "src/mn-about-dialog.gob" -static void -mn_about_dialog_class_init (MNAboutDialogClass * class G_GNUC_UNUSED) -{ -#line 107 "mn-about-dialog.c" -#define __GOB_FUNCTION__ "MN:About:Dialog::class_init" - - parent_class = g_type_class_ref (GTK_TYPE_ABOUT_DIALOG); - - { -#line 32 "src/mn-about-dialog.gob" - - gtk_about_dialog_set_email_hook(self_activate_link_cb, "mailto:", NULL); - gtk_about_dialog_set_url_hook(self_activate_link_cb, NULL, NULL); - -#line 118 "mn-about-dialog.c" - } -} -#undef __GOB_FUNCTION__ -#line 37 "src/mn-about-dialog.gob" -static void -mn_about_dialog_init (MNAboutDialog * self G_GNUC_UNUSED) -{ -#line 126 "mn-about-dialog.c" -#define __GOB_FUNCTION__ "MN:About:Dialog::init" - { -#line 38 "src/mn-about-dialog.gob" - - GtkAboutDialog *about = GTK_ABOUT_DIALOG(self); - static const char *authors[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL }; - static const char *documenters[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL }; - GdkPixbuf *logo; - - gtk_about_dialog_set_version(about, VERSION); - gtk_about_dialog_set_copyright(about, "Copyright \302\251 2003-2008 Jean-Yves Lefort"); - /* translators: header capitalization */ - gtk_about_dialog_set_comments(about, _("A Mail Notification Icon")); - gtk_about_dialog_set_website(about, "http://www.nongnu.org/mailnotify"); - gtk_about_dialog_set_authors(about, authors); - gtk_about_dialog_set_documenters(about, documenters); - /* - * translators: Your Name <your-email> - * optionally followed by one or more: \nOther Contributor's Name <his-email> - */ - gtk_about_dialog_set_translator_credits(about, _("translator-credits")); - - logo = mn_pixbuf_new(PKGDATADIR G_DIR_SEPARATOR_S "logo.png"); - gtk_about_dialog_set_logo(about, logo); - g_object_unref(logo); - - g_signal_connect(self, "response", G_CALLBACK(gtk_widget_destroy), NULL); - -#line 155 "mn-about-dialog.c" - } -} -#undef __GOB_FUNCTION__ - - - -#line 64 "src/mn-about-dialog.gob" -static void -mn_about_dialog_activate_link_cb (GtkAboutDialog * about, const char * link, gpointer data) -{ -#line 166 "mn-about-dialog.c" -#define __GOB_FUNCTION__ "MN:About:Dialog::activate_link_cb" -{ -#line 68 "src/mn-about-dialog.gob" - - const char *prefix = data; - char *url; - - url = prefix ? g_strconcat(prefix, link, NULL) : g_strdup(link); - mn_open_link(GTK_WINDOW(about), url); - g_free(url); - }} -#line 178 "mn-about-dialog.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-about-dialog.gob.stamp b/build/src/mn-about-dialog.gob.stamp diff --git a/build/src/mn-about-dialog.h b/build/src/mn-about-dialog.h @@ -1,57 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gtk/gtk.h> - -#ifndef __MN_ABOUT_DIALOG_H__ -#define __MN_ABOUT_DIALOG_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_ABOUT_DIALOG (mn_about_dialog_get_type()) -#define MN_ABOUT_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_about_dialog_get_type(), MNAboutDialog) -#define MN_ABOUT_DIALOG_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_about_dialog_get_type(), MNAboutDialog const) -#define MN_ABOUT_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_about_dialog_get_type(), MNAboutDialogClass) -#define MN_IS_ABOUT_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_about_dialog_get_type ()) - -#define MN_ABOUT_DIALOG_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_about_dialog_get_type(), MNAboutDialogClass) - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_ABOUT_DIALOG__ -#define __TYPEDEF_MN_ABOUT_DIALOG__ -typedef struct _MNAboutDialog MNAboutDialog; -#endif -struct _MNAboutDialog { - GtkAboutDialog __parent__; -}; - -/* - * Class definition - */ -typedef struct _MNAboutDialogClass MNAboutDialogClass; -struct _MNAboutDialogClass { - GtkAboutDialogClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_about_dialog_get_type (void) G_GNUC_CONST; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-auth-combo-box-private.h b/build/src/mn-auth-combo-box-private.h @@ -1,17 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_AUTH_COMBO_BOX_PRIVATE_H__ -#define __MN_AUTH_COMBO_BOX_PRIVATE_H__ - -#include "mn-auth-combo-box.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-auth-combo-box.c b/build/src/mn-auth-combo-box.c @@ -1,404 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-auth-combo-box.h" - -#include "mn-auth-combo-box-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 24 "src/mn-auth-combo-box.gob" - -#include <glib/gi18n.h> -#if WITH_SASL -#include <sasl/sasl.h> -#include "mn-sasl.h" -#endif /* WITH_SASL */ -#include "mn-util.h" - -enum -{ - COLUMN_MECHANISM, - COLUMN_LABEL, - N_COLUMNS -}; - -#line 42 "mn-auth-combo-box.c" -/* self casting macros */ -#define SELF(x) MN_AUTH_COMBO_BOX(x) -#define SELF_CONST(x) MN_AUTH_COMBO_BOX_CONST(x) -#define IS_SELF(x) MN_IS_AUTH_COMBO_BOX(x) -#define TYPE_SELF MN_TYPE_AUTH_COMBO_BOX -#define SELF_CLASS(x) MN_AUTH_COMBO_BOX_CLASS(x) - -#define SELF_GET_CLASS(x) MN_AUTH_COMBO_BOX_GET_CLASS(x) - -/* self typedefs */ -typedef MNAuthComboBox Self; -typedef MNAuthComboBoxClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "src/mn-auth-combo-box.gob" -static void mn_auth_combo_box_class_init (MNAuthComboBoxClass * c) G_GNUC_UNUSED; -#line 61 "mn-auth-combo-box.c" -#line 83 "src/mn-auth-combo-box.gob" -static void mn_auth_combo_box_init (MNAuthComboBox * self) G_GNUC_UNUSED; -#line 64 "mn-auth-combo-box.c" -#line 120 "src/mn-auth-combo-box.gob" -static int mn_auth_combo_box_sort_cb (GtkTreeModel * model, GtkTreeIter * a, GtkTreeIter * b, gpointer user_data) G_GNUC_UNUSED; -#line 67 "mn-auth-combo-box.c" - -enum { - PROP_0, - PROP_ACTIVE_MECHANISM -}; - -/* pointer to the class of our parent */ -static GtkComboBoxClass *parent_class = NULL; - -/* Short form macros */ -#define self_get_active_mechanism mn_auth_combo_box_get_active_mechanism -#define self_set_active_mechanism mn_auth_combo_box_set_active_mechanism -#define self_sort_cb mn_auth_combo_box_sort_cb -#define self_append mn_auth_combo_box_append -#define self_new mn_auth_combo_box_new -GType -mn_auth_combo_box_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNAuthComboBoxClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_auth_combo_box_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNAuthComboBox), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_auth_combo_box_init, - NULL - }; - - type = g_type_register_static (GTK_TYPE_COMBO_BOX, "MNAuthComboBox", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNAuthComboBox *)g_object_new(mn_auth_combo_box_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNAuthComboBox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNAuthComboBox * -GET_NEW_VARG (const char *first, ...) -{ - MNAuthComboBox *ret; - va_list ap; - va_start (ap, first); - ret = (MNAuthComboBox *)g_object_new_valist (mn_auth_combo_box_get_type (), first, ap); - va_end (ap); - return ret; -} - -static void -mn_auth_combo_box_class_init (MNAuthComboBoxClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c; - - parent_class = g_type_class_ref (GTK_TYPE_COMBO_BOX); - - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_string - ("active_mechanism" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (g_object_class, - PROP_ACTIVE_MECHANISM, - param_spec); - } -} -#undef __GOB_FUNCTION__ -#line 83 "src/mn-auth-combo-box.gob" -static void -mn_auth_combo_box_init (MNAuthComboBox * self G_GNUC_UNUSED) -{ -#line 154 "mn-auth-combo-box.c" -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::init" - { -#line 84 "src/mn-auth-combo-box.gob" - - GtkListStore *store; - GtkCellRenderer *renderer; - - store = gtk_list_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); - gtk_combo_box_set_model(GTK_COMBO_BOX(self), GTK_TREE_MODEL(store)); - g_object_unref(store); - - renderer = gtk_cell_renderer_text_new(); - gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(self), renderer, TRUE); - gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(self), renderer, - "text", COLUMN_LABEL, - NULL); - - self_append(self, NULL, _("Autodetect")); -#if WITH_SASL - if (mn_sasl_init(NULL)) - { - const char **mechanisms; - - mechanisms = sasl_global_listmech(); - if (mechanisms) - { - int i; - for (i = 0; mechanisms[i]; i++) - self_append(self, mechanisms[i], mechanisms[i]); - } - } -#endif /* WITH_SASL */ - - gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(store), self_sort_cb, NULL, NULL); - gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store), GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING); - - self_set_active_mechanism(self, NULL); - -#line 193 "mn-auth-combo-box.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::set_property" -{ - MNAuthComboBox *self G_GNUC_UNUSED; - - self = MN_AUTH_COMBO_BOX (object); - - switch (property_id) { - case PROP_ACTIVE_MECHANISM: - { -#line 44 "src/mn-auth-combo-box.gob" - - const char *mechanism = g_value_get_string(VAL); - GtkTreeModel *model; - GtkTreeIter iter; - gboolean valid; - - model = gtk_combo_box_get_model(GTK_COMBO_BOX(self)); - - MN_TREE_MODEL_FOREACH(valid, &iter, model) - { - char *this_mech; - gboolean found; - - gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &this_mech, -1); - found = (! this_mech && ! mechanism) - || (this_mech && mechanism && ! strcmp(this_mech, mechanism)); - g_free(this_mech); - - if (found) - { - gtk_combo_box_set_active_iter(GTK_COMBO_BOX(self), &iter); - break; - } - } - -#line 238 "mn-auth-combo-box.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::get_property" -{ - MNAuthComboBox *self G_GNUC_UNUSED; - - self = MN_AUTH_COMBO_BOX (object); - - switch (property_id) { - case PROP_ACTIVE_MECHANISM: - { -#line 70 "src/mn-auth-combo-box.gob" - - char *mechanism = NULL; - GtkTreeIter iter; - - if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(self), &iter)) - { - GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(self)); - gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &mechanism, -1); - } - - g_value_take_string(VAL, mechanism); - -#line 280 "mn-auth-combo-box.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - -#line 70 "src/mn-auth-combo-box.gob" -gchar * -mn_auth_combo_box_get_active_mechanism (MNAuthComboBox * self) -{ -#line 300 "mn-auth-combo-box.c" -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::get_active_mechanism" -{ -#line 42 "src/mn-auth-combo-box.gob" - gchar* val; g_object_get (G_OBJECT (self), "active_mechanism", &val, NULL); return val; -}} -#line 306 "mn-auth-combo-box.c" -#undef __GOB_FUNCTION__ - -#line 44 "src/mn-auth-combo-box.gob" -void -mn_auth_combo_box_set_active_mechanism (MNAuthComboBox * self, gchar * val) -{ -#line 313 "mn-auth-combo-box.c" -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::set_active_mechanism" -{ -#line 42 "src/mn-auth-combo-box.gob" - g_object_set (G_OBJECT (self), "active_mechanism", val, NULL); -}} -#line 319 "mn-auth-combo-box.c" -#undef __GOB_FUNCTION__ - - -#line 120 "src/mn-auth-combo-box.gob" -static int -mn_auth_combo_box_sort_cb (GtkTreeModel * model, GtkTreeIter * a, GtkTreeIter * b, gpointer user_data) -{ -#line 327 "mn-auth-combo-box.c" -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::sort_cb" -{ -#line 125 "src/mn-auth-combo-box.gob" - - char *mechanism_a; - char *label_a; - char *mechanism_b; - char *label_b; - int coll; - - gtk_tree_model_get(model, a, - COLUMN_MECHANISM, &mechanism_a, - COLUMN_LABEL, &label_a, - -1); - gtk_tree_model_get(model, b, - COLUMN_MECHANISM, &mechanism_b, - COLUMN_LABEL, &label_b, - -1); - - /* put "autodetect" (NULL mechanism) on top of the list */ - if (mechanism_a && mechanism_b) - coll = g_utf8_collate(label_a, label_b); - else if (mechanism_a || mechanism_b) - coll = mechanism_a ? 1 : -1; - else - coll = 0; - - g_free(mechanism_a); - g_free(mechanism_b); - - return coll; - }} -#line 360 "mn-auth-combo-box.c" -#undef __GOB_FUNCTION__ - -#line 155 "src/mn-auth-combo-box.gob" -void -mn_auth_combo_box_append (MNAuthComboBox * self, const char * mechanism, const char * label) -{ -#line 367 "mn-auth-combo-box.c" -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::append" -#line 155 "src/mn-auth-combo-box.gob" - g_return_if_fail (self != NULL); -#line 155 "src/mn-auth-combo-box.gob" - g_return_if_fail (MN_IS_AUTH_COMBO_BOX (self)); -#line 155 "src/mn-auth-combo-box.gob" - g_return_if_fail (label != NULL); -#line 375 "mn-auth-combo-box.c" -{ -#line 157 "src/mn-auth-combo-box.gob" - - GtkTreeModel *model; - GtkTreeIter iter; - - model = gtk_combo_box_get_model(GTK_COMBO_BOX(self)); - - gtk_list_store_append(GTK_LIST_STORE(model), &iter); - gtk_list_store_set(GTK_LIST_STORE(model), &iter, - COLUMN_MECHANISM, mechanism, - COLUMN_LABEL, label, - -1); - }} -#line 390 "mn-auth-combo-box.c" -#undef __GOB_FUNCTION__ - -#line 170 "src/mn-auth-combo-box.gob" -GtkWidget * -mn_auth_combo_box_new (void) -{ -#line 397 "mn-auth-combo-box.c" -#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::new" -{ -#line 172 "src/mn-auth-combo-box.gob" - - return GTK_WIDGET(GET_NEW); - }} -#line 404 "mn-auth-combo-box.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-auth-combo-box.gob.stamp b/build/src/mn-auth-combo-box.gob.stamp diff --git a/build/src/mn-auth-combo-box.h b/build/src/mn-auth-combo-box.h @@ -1,84 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gtk/gtk.h> - -#ifndef __MN_AUTH_COMBO_BOX_H__ -#define __MN_AUTH_COMBO_BOX_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_AUTH_COMBO_BOX (mn_auth_combo_box_get_type()) -#define MN_AUTH_COMBO_BOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_auth_combo_box_get_type(), MNAuthComboBox) -#define MN_AUTH_COMBO_BOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_auth_combo_box_get_type(), MNAuthComboBox const) -#define MN_AUTH_COMBO_BOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_auth_combo_box_get_type(), MNAuthComboBoxClass) -#define MN_IS_AUTH_COMBO_BOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_auth_combo_box_get_type ()) - -#define MN_AUTH_COMBO_BOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_auth_combo_box_get_type(), MNAuthComboBoxClass) - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_AUTH_COMBO_BOX__ -#define __TYPEDEF_MN_AUTH_COMBO_BOX__ -typedef struct _MNAuthComboBox MNAuthComboBox; -#endif -struct _MNAuthComboBox { - GtkComboBox __parent__; -}; - -/* - * Class definition - */ -typedef struct _MNAuthComboBoxClass MNAuthComboBoxClass; -struct _MNAuthComboBoxClass { - GtkComboBoxClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_auth_combo_box_get_type (void) G_GNUC_CONST; -#line 70 "src/mn-auth-combo-box.gob" -gchar * mn_auth_combo_box_get_active_mechanism (MNAuthComboBox * self); -#line 55 "mn-auth-combo-box.h" -#line 44 "src/mn-auth-combo-box.gob" -void mn_auth_combo_box_set_active_mechanism (MNAuthComboBox * self, - gchar * val); -#line 59 "mn-auth-combo-box.h" -#line 155 "src/mn-auth-combo-box.gob" -void mn_auth_combo_box_append (MNAuthComboBox * self, - const char * mechanism, - const char * label); -#line 64 "mn-auth-combo-box.h" -#line 170 "src/mn-auth-combo-box.gob" -GtkWidget * mn_auth_combo_box_new (void); -#line 67 "mn-auth-combo-box.h" - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_AUTH_COMBO_BOX_PROP_ACTIVE_MECHANISM(arg) "active_mechanism", __extension__ ({gchar *z = (arg); z;}) -#define MN_AUTH_COMBO_BOX_GET_PROP_ACTIVE_MECHANISM(arg) "active_mechanism", __extension__ ({gchar **z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_AUTH_COMBO_BOX_PROP_ACTIVE_MECHANISM(arg) "active_mechanism",(gchar *)(arg) -#define MN_AUTH_COMBO_BOX_GET_PROP_ACTIVE_MECHANISM(arg) "active_mechanism",(gchar **)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-authenticated-mailbox-private.h b/build/src/mn-authenticated-mailbox-private.h @@ -1,47 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_AUTHENTICATED_MAILBOX_PRIVATE_H__ -#define __MN_AUTHENTICATED_MAILBOX_PRIVATE_H__ - -#include "mn-authenticated-mailbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#line 25 "src/mn-authenticated-mailbox.gob" - -#include <gtk/gtk.h> - -#line 18 "mn-authenticated-mailbox-private.h" -struct _MNAuthenticatedMailboxPrivate { -#line 67 "src/mn-authenticated-mailbox.gob" - gpointer get_password_request; -#line 68 "src/mn-authenticated-mailbox.gob" - gpointer set_password_request; -#line 75 "src/mn-authenticated-mailbox.gob" - gboolean checking; -#line 79 "src/mn-authenticated-mailbox.gob" - GtkWidget * auth_dialog; -#line 84 "src/mn-authenticated-mailbox.gob" - char * prompted_password_keyring; -#line 85 "src/mn-authenticated-mailbox.gob" - guint32 prompted_password_item_id; -#line 32 "mn-authenticated-mailbox-private.h" -}; -#line 251 "src/mn-authenticated-mailbox.gob" -void mn_authenticated_mailbox_parse_username (MNAuthenticatedMailbox * self, char ** username, char ** domain); -#line 36 "mn-authenticated-mailbox-private.h" -#line 278 "src/mn-authenticated-mailbox.gob" -gboolean mn_authenticated_mailbox_fill_password (MNAuthenticatedMailbox * self, gboolean may_prompt); -#line 39 "mn-authenticated-mailbox-private.h" -#line 341 "src/mn-authenticated-mailbox.gob" -void mn_authenticated_mailbox_auth_failed (MNAuthenticatedMailbox * self); -#line 42 "mn-authenticated-mailbox-private.h" - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-authenticated-mailbox-properties-private.h b/build/src/mn-authenticated-mailbox-properties-private.h @@ -1,43 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_AUTHENTICATED_MAILBOX_PROPERTIES_PRIVATE_H__ -#define __MN_AUTHENTICATED_MAILBOX_PROPERTIES_PRIVATE_H__ - -#include "mn-authenticated-mailbox-properties.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#line 25 "src/mn-authenticated-mailbox-properties.gob" - -#include "mn-authenticated-mailbox.h" - -#line 18 "mn-authenticated-mailbox-properties-private.h" -struct _MNAuthenticatedMailboxPropertiesPrivate { -#line 44 "src/mn-authenticated-mailbox-properties.gob" - GtkWidget * password_operation_label; -#line 45 "src/mn-authenticated-mailbox-properties.gob" - GtkWidget * password_widget; -#line 47 "src/mn-authenticated-mailbox-properties.gob" - MNAuthenticatedMailbox * mailbox_setting_password; -#line 48 "src/mn-authenticated-mailbox-properties.gob" - gpointer get_password_request; -#line 28 "mn-authenticated-mailbox-properties-private.h" -}; -#line 93 "src/mn-authenticated-mailbox-properties.gob" -GtkWidget * mn_authenticated_mailbox_properties_field_new (MNAuthenticatedMailboxProperties * self, const char * mnemonic, GtkWidget ** label, GtkWidget ** entry); -#line 32 "mn-authenticated-mailbox-properties-private.h" -#line 270 "src/mn-authenticated-mailbox-properties.gob" -void mn_authenticated_mailbox_properties_get_contents (MNAuthenticatedMailboxProperties * self, const char ** username, const char ** password); -#line 35 "mn-authenticated-mailbox-properties-private.h" -#line 291 "src/mn-authenticated-mailbox-properties.gob" -gboolean mn_authenticated_mailbox_properties_is_complete (MNAuthenticatedMailboxProperties * self); -#line 38 "mn-authenticated-mailbox-properties-private.h" - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-authenticated-mailbox-properties.c b/build/src/mn-authenticated-mailbox-properties.c @@ -1,575 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-authenticated-mailbox-properties.h" - -#include "mn-authenticated-mailbox-properties-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 29 "src/mn-authenticated-mailbox-properties.gob" - -#include <glib/gi18n.h> -#include "mn-mailbox-properties-private.h" -#include "mn-util.h" - -#line 32 "mn-authenticated-mailbox-properties.c" -/* self casting macros */ -#define SELF(x) MN_AUTHENTICATED_MAILBOX_PROPERTIES(x) -#define SELF_CONST(x) MN_AUTHENTICATED_MAILBOX_PROPERTIES_CONST(x) -#define IS_SELF(x) MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES(x) -#define TYPE_SELF MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES -#define SELF_CLASS(x) MN_AUTHENTICATED_MAILBOX_PROPERTIES_CLASS(x) - -#define SELF_GET_CLASS(x) MN_AUTHENTICATED_MAILBOX_PROPERTIES_GET_CLASS(x) - -/* self typedefs */ -typedef MNAuthenticatedMailboxProperties Self; -typedef MNAuthenticatedMailboxPropertiesClass SelfClass; - -/* here are local prototypes */ -#line 0 "src/mn-authenticated-mailbox-properties.gob" -static void mn_authenticated_mailbox_properties_class_init (MNAuthenticatedMailboxPropertiesClass * c) G_GNUC_UNUSED; -#line 49 "mn-authenticated-mailbox-properties.c" -#line 50 "src/mn-authenticated-mailbox-properties.gob" -static void mn_authenticated_mailbox_properties_init (MNAuthenticatedMailboxProperties * self) G_GNUC_UNUSED; -#line 52 "mn-authenticated-mailbox-properties.c" -#line 88 "src/mn-authenticated-mailbox-properties.gob" -static void mn_authenticated_mailbox_properties_dispose (MNAuthenticatedMailboxProperties * self) G_GNUC_UNUSED; -#line 55 "mn-authenticated-mailbox-properties.c" -#line 121 "src/mn-authenticated-mailbox-properties.gob" -static void ___4_mn_authenticated_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED; -#line 58 "mn-authenticated-mailbox-properties.c" -#line 146 "src/mn-authenticated-mailbox-properties.gob" -static void mn_authenticated_mailbox_properties_clear_mailbox_callbacks (MNAuthenticatedMailboxProperties * self) G_GNUC_UNUSED; -#line 61 "mn-authenticated-mailbox-properties.c" -#line 163 "src/mn-authenticated-mailbox-properties.gob" -static void mn_authenticated_mailbox_properties_setting_password_notify_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED; -#line 64 "mn-authenticated-mailbox-properties.c" -#line 182 "src/mn-authenticated-mailbox-properties.gob" -static void mn_authenticated_mailbox_properties_get_password (MNAuthenticatedMailboxProperties * self, MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED; -#line 67 "mn-authenticated-mailbox-properties.c" -#line 192 "src/mn-authenticated-mailbox-properties.gob" -static void mn_authenticated_mailbox_properties_get_password_cb (GnomeKeyringResult result, GList * list, gpointer data) G_GNUC_UNUSED; -#line 70 "mn-authenticated-mailbox-properties.c" -#line 224 "src/mn-authenticated-mailbox-properties.gob" -static MNMailbox * ___9_mn_authenticated_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED; -#line 73 "mn-authenticated-mailbox-properties.c" -#line 246 "src/mn-authenticated-mailbox-properties.gob" -static void mn_authenticated_mailbox_properties_set_password_operation (MNAuthenticatedMailboxProperties * self, const char * operation) G_GNUC_UNUSED; -#line 76 "mn-authenticated-mailbox-properties.c" - -/* pointer to the class of our parent */ -static MNMailboxPropertiesClass *parent_class = NULL; - -/* Short form macros */ -#define self_field_new mn_authenticated_mailbox_properties_field_new -#define self_clear_mailbox_callbacks mn_authenticated_mailbox_properties_clear_mailbox_callbacks -#define self_setting_password_notify_h mn_authenticated_mailbox_properties_setting_password_notify_h -#define self_get_password mn_authenticated_mailbox_properties_get_password -#define self_get_password_cb mn_authenticated_mailbox_properties_get_password_cb -#define self_set_password_operation mn_authenticated_mailbox_properties_set_password_operation -#define self_get_contents mn_authenticated_mailbox_properties_get_contents -#define self_is_complete mn_authenticated_mailbox_properties_is_complete -GType -mn_authenticated_mailbox_properties_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNAuthenticatedMailboxPropertiesClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_authenticated_mailbox_properties_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNAuthenticatedMailboxProperties), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_authenticated_mailbox_properties_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_MAILBOX_PROPERTIES, "MNAuthenticatedMailboxProperties", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNAuthenticatedMailboxProperties *)g_object_new(mn_authenticated_mailbox_properties_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNAuthenticatedMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNAuthenticatedMailboxProperties * -GET_NEW_VARG (const char *first, ...) -{ - MNAuthenticatedMailboxProperties *ret; - va_list ap; - va_start (ap, first); - ret = (MNAuthenticatedMailboxProperties *)g_object_new_valist (mn_authenticated_mailbox_properties_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___dispose (GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::dispose" - MNAuthenticatedMailboxProperties *self G_GNUC_UNUSED = MN_AUTHENTICATED_MAILBOX_PROPERTIES (obj_self); -#line 88 "src/mn-authenticated-mailbox-properties.gob" - mn_authenticated_mailbox_properties_dispose (self); -#line 140 "mn-authenticated-mailbox-properties.c" - if (G_OBJECT_CLASS (parent_class)->dispose) \ - (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self); -#line 43 "src/mn-authenticated-mailbox-properties.gob" - if(self->password_entry) { g_object_unref ((gpointer) self->password_entry); self->password_entry = NULL; } -#line 145 "mn-authenticated-mailbox-properties.c" -#line 44 "src/mn-authenticated-mailbox-properties.gob" - if(self->_priv->password_operation_label) { g_object_unref ((gpointer) self->_priv->password_operation_label); self->_priv->password_operation_label = NULL; } -#line 148 "mn-authenticated-mailbox-properties.c" -} -#undef __GOB_FUNCTION__ - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::finalize" - MNAuthenticatedMailboxProperties *self G_GNUC_UNUSED = MN_AUTHENTICATED_MAILBOX_PROPERTIES (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -} -#undef __GOB_FUNCTION__ - -static void -mn_authenticated_mailbox_properties_class_init (MNAuthenticatedMailboxPropertiesClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c; - MNMailboxPropertiesClass *mn_mailbox_properties_class = (MNMailboxPropertiesClass *)c; - - g_type_class_add_private(c,sizeof(MNAuthenticatedMailboxPropertiesPrivate)); - - parent_class = g_type_class_ref (MN_TYPE_MAILBOX_PROPERTIES); - -#line 121 "src/mn-authenticated-mailbox-properties.gob" - mn_mailbox_properties_class->set_mailbox = ___4_mn_authenticated_mailbox_properties_set_mailbox; -#line 224 "src/mn-authenticated-mailbox-properties.gob" - mn_mailbox_properties_class->get_mailbox = ___9_mn_authenticated_mailbox_properties_get_mailbox; -#line 179 "mn-authenticated-mailbox-properties.c" - g_object_class->dispose = ___dispose; - g_object_class->finalize = ___finalize; -} -#undef __GOB_FUNCTION__ -#line 50 "src/mn-authenticated-mailbox-properties.gob" -static void -mn_authenticated_mailbox_properties_init (MNAuthenticatedMailboxProperties * self G_GNUC_UNUSED) -{ -#line 188 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES,MNAuthenticatedMailboxPropertiesPrivate); - { -#line 51 "src/mn-authenticated-mailbox-properties.gob" - - MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self); - const char *username; - - /* translators: header capitalization */ - self->account_vbox = mn_mailbox_properties_add_general_section(properties, _("Account")); - - self->username_vbox = self_field_new(self, - _("_Username:"), - &self->username_label, - &self->username_entry); - self->password_vbox = self_field_new(self, - _("_Password:"), - &self->password_label, - &self->password_entry); - - selfp->password_operation_label = gtk_label_new(NULL); - gtk_misc_set_alignment(GTK_MISC(selfp->password_operation_label), 0.0, 0.5); - - /* - * These two widgets will alternate in their parent container so - * we need to reference them. - */ - g_object_ref_sink(self->password_entry); - g_object_ref_sink(selfp->password_operation_label); - - selfp->password_widget = self->password_entry; - - /* defaults to the login name */ - username = g_get_user_name(); - if (username) - gtk_entry_set_text(GTK_ENTRY(self->username_entry), username); - - gtk_entry_set_visibility(GTK_ENTRY(self->password_entry), FALSE); - -#line 228 "mn-authenticated-mailbox-properties.c" - } -} -#undef __GOB_FUNCTION__ - - - -#line 88 "src/mn-authenticated-mailbox-properties.gob" -static void -mn_authenticated_mailbox_properties_dispose (MNAuthenticatedMailboxProperties * self G_GNUC_UNUSED) -{ -#line 239 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::dispose" -{ -#line 89 "src/mn-authenticated-mailbox-properties.gob" - - self_clear_mailbox_callbacks(self); - }} -#line 246 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 93 "src/mn-authenticated-mailbox-properties.gob" -GtkWidget * -mn_authenticated_mailbox_properties_field_new (MNAuthenticatedMailboxProperties * self, const char * mnemonic, GtkWidget ** label, GtkWidget ** entry) -{ -#line 253 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::field_new" -#line 93 "src/mn-authenticated-mailbox-properties.gob" - g_return_val_if_fail (self != NULL, (GtkWidget * )0); -#line 93 "src/mn-authenticated-mailbox-properties.gob" - g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self), (GtkWidget * )0); -#line 93 "src/mn-authenticated-mailbox-properties.gob" - g_return_val_if_fail (mnemonic != NULL, (GtkWidget * )0); -#line 93 "src/mn-authenticated-mailbox-properties.gob" - g_return_val_if_fail (entry != NULL, (GtkWidget * )0); -#line 263 "mn-authenticated-mailbox-properties.c" -{ -#line 98 "src/mn-authenticated-mailbox-properties.gob" - - GtkWidget *hbox; - GtkWidget *_label; - - _label = gtk_label_new_with_mnemonic(mnemonic); - gtk_misc_set_alignment(GTK_MISC(_label), 0.0, 0.5); - - *entry = gtk_entry_new(); - gtk_label_set_mnemonic_widget(GTK_LABEL(_label), *entry); - - hbox = gtk_hbox_new(FALSE, 12); - gtk_box_pack_start(GTK_BOX(hbox), _label, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(hbox), *entry, TRUE, TRUE, 0); - gtk_widget_show_all(hbox); - - gtk_size_group_add_widget(MN_MAILBOX_PROPERTIES(self)->label_size_group, _label); - - if (label) - *label = _label; - - return hbox; - }} -#line 288 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 121 "src/mn-authenticated-mailbox-properties.gob" -static void -___4_mn_authenticated_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox) -#line 294 "mn-authenticated-mailbox-properties.c" -#define PARENT_HANDLER(___properties,___mailbox) \ - { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \ - (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::set_mailbox" -{ -#line 123 "src/mn-authenticated-mailbox-properties.gob" - - Self *self = SELF(properties); - MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox); - - self_clear_mailbox_callbacks(self); - - gtk_entry_set_text(GTK_ENTRY(self->username_entry), auth_mailbox->username); - - /* - * If the password is currently being saved, wait for that - * operation to finish before querying the keyring for the - * password. - */ - if (mn_authenticated_mailbox_get_setting_password(auth_mailbox)) - { - selfp->mailbox_setting_password = g_object_ref(auth_mailbox); - g_signal_connect(auth_mailbox, "notify::setting-password", G_CALLBACK(self_setting_password_notify_h), self); - self_set_password_operation(self, _("Saving password to keyring...")); - } - else - self_get_password(self, auth_mailbox); - }} -#line 324 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 146 "src/mn-authenticated-mailbox-properties.gob" -static void -mn_authenticated_mailbox_properties_clear_mailbox_callbacks (MNAuthenticatedMailboxProperties * self) -{ -#line 332 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::clear_mailbox_callbacks" -#line 146 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (self != NULL); -#line 146 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self)); -#line 338 "mn-authenticated-mailbox-properties.c" -{ -#line 148 "src/mn-authenticated-mailbox-properties.gob" - - if (selfp->mailbox_setting_password) - { - g_signal_handlers_disconnect_by_func(selfp->mailbox_setting_password, self_setting_password_notify_h, self); - g_object_unref(selfp->mailbox_setting_password); - selfp->mailbox_setting_password = NULL; - } - - if (selfp->get_password_request) - { - gnome_keyring_cancel_request(selfp->get_password_request); - selfp->get_password_request = NULL; - } - }} -#line 355 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 163 "src/mn-authenticated-mailbox-properties.gob" -static void -mn_authenticated_mailbox_properties_setting_password_notify_h (GObject * object, GParamSpec * pspec, gpointer user_data) -{ -#line 362 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::setting_password_notify_h" -{ -#line 167 "src/mn-authenticated-mailbox-properties.gob" - - Self *self = user_data; - MNAuthenticatedMailbox *mailbox = MN_AUTHENTICATED_MAILBOX(object); - - /* - * If the password save operation is finished, we can query the - * keyring for the password. - */ - if (! mn_authenticated_mailbox_get_setting_password(mailbox)) - { - g_signal_handlers_disconnect_by_func(mailbox, self_setting_password_notify_h, self); - self_get_password(self, mailbox); - } - }} -#line 380 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 182 "src/mn-authenticated-mailbox-properties.gob" -static void -mn_authenticated_mailbox_properties_get_password (MNAuthenticatedMailboxProperties * self, MNAuthenticatedMailbox * mailbox) -{ -#line 387 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::get_password" -#line 182 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (self != NULL); -#line 182 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self)); -#line 182 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (mailbox != NULL); -#line 395 "mn-authenticated-mailbox-properties.c" -{ -#line 184 "src/mn-authenticated-mailbox-properties.gob" - - self_set_password_operation(self, _("Retrieving password from keyring...")); - - selfp->get_password_request = mn_authenticated_mailbox_get_password(mailbox, - self_get_password_cb, - self); - }} -#line 405 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 192 "src/mn-authenticated-mailbox-properties.gob" -static void -mn_authenticated_mailbox_properties_get_password_cb (GnomeKeyringResult result, GList * list, gpointer data) -{ -#line 412 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::get_password_cb" -{ -#line 194 "src/mn-authenticated-mailbox-properties.gob" - - Self *self = data; - const char *password = NULL; - - /* - * If the request was cancelled, it is either from dispose() and - * self might already have been finalized (since this is a main - * loop callback), or it is from set_mailbox() and the password - * will be retrieved again. In both cases we must do nothing. - */ - if (result == GNOME_KEYRING_RESULT_CANCELLED) - return; - - selfp->get_password_request = NULL; - - if (result == GNOME_KEYRING_RESULT_OK && list) - { - GnomeKeyringNetworkPasswordData *password_data = list->data; - password = password_data->password; - } - - GDK_THREADS_ENTER(); - - gtk_entry_set_text(GTK_ENTRY(self->password_entry), password ? password : ""); - self_set_password_operation(self, NULL); - - /* do not call gdk_flush(), we're normally in the main thread */ - GDK_THREADS_LEAVE(); - }} -#line 445 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 224 "src/mn-authenticated-mailbox-properties.gob" -static MNMailbox * -___9_mn_authenticated_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED) -#line 451 "mn-authenticated-mailbox-properties.c" -#define PARENT_HANDLER(___properties) \ - ((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \ - (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \ - ((MNMailbox * )0)) -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::get_mailbox" -{ -#line 226 "src/mn-authenticated-mailbox-properties.gob" - - Self *self = SELF(properties); - MNMailbox *mailbox; - MNAuthenticatedMailbox *auth_mailbox; - const char *username; - const char *password; - - mailbox = PARENT_HANDLER(properties); - auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox); - - username = gtk_entry_get_text(GTK_ENTRY(self->username_entry)); - password = gtk_entry_get_text(GTK_ENTRY(self->password_entry)); - - auth_mailbox->username = g_strdup(username); - if (*password) - auth_mailbox->password = g_strdup(password); - - return mailbox; - }} -#line 479 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 246 "src/mn-authenticated-mailbox-properties.gob" -static void -mn_authenticated_mailbox_properties_set_password_operation (MNAuthenticatedMailboxProperties * self, const char * operation) -{ -#line 487 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::set_password_operation" -#line 246 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (self != NULL); -#line 246 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self)); -#line 493 "mn-authenticated-mailbox-properties.c" -{ -#line 248 "src/mn-authenticated-mailbox-properties.gob" - - GtkWidget *password_widget; - - gtk_label_set_text(GTK_LABEL(selfp->password_operation_label), operation); - - if (operation) - password_widget = selfp->password_operation_label; - else - password_widget = self->password_entry; - - if (password_widget != selfp->password_widget) - { - gtk_container_remove(GTK_CONTAINER(self->password_vbox), selfp->password_widget); - - gtk_box_pack_start(GTK_BOX(self->password_vbox), password_widget, TRUE, TRUE, 0); - gtk_widget_show(password_widget); - selfp->password_widget = password_widget; - - mn_mailbox_properties_notify_complete(MN_MAILBOX_PROPERTIES(self)); - } - }} -#line 517 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 270 "src/mn-authenticated-mailbox-properties.gob" -void -mn_authenticated_mailbox_properties_get_contents (MNAuthenticatedMailboxProperties * self, const char ** username, const char ** password) -{ -#line 524 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::get_contents" -#line 270 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (self != NULL); -#line 270 "src/mn-authenticated-mailbox-properties.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self)); -#line 530 "mn-authenticated-mailbox-properties.c" -{ -#line 274 "src/mn-authenticated-mailbox-properties.gob" - - if (username) - { - const char *_username; - - _username = gtk_entry_get_text(GTK_ENTRY(self->username_entry)); - *username = *_username ? _username : NULL; - } - if (password) - { - const char *_password; - - _password = gtk_entry_get_text(GTK_ENTRY(self->password_entry)); - *password = *_password ? _password : NULL; - } - }} -#line 549 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 291 "src/mn-authenticated-mailbox-properties.gob" -gboolean -mn_authenticated_mailbox_properties_is_complete (MNAuthenticatedMailboxProperties * self) -{ -#line 556 "mn-authenticated-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::is_complete" -#line 291 "src/mn-authenticated-mailbox-properties.gob" - g_return_val_if_fail (self != NULL, (gboolean )0); -#line 291 "src/mn-authenticated-mailbox-properties.gob" - g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self), (gboolean )0); -#line 562 "mn-authenticated-mailbox-properties.c" -{ -#line 293 "src/mn-authenticated-mailbox-properties.gob" - - const char *username; - - if (selfp->password_widget == selfp->password_operation_label) - return FALSE; - - username = gtk_entry_get_text(GTK_ENTRY(self->username_entry)); - - return *username != 0; - }} -#line 575 "mn-authenticated-mailbox-properties.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-authenticated-mailbox-properties.gob.stamp b/build/src/mn-authenticated-mailbox-properties.gob.stamp diff --git a/build/src/mn-authenticated-mailbox-properties.h b/build/src/mn-authenticated-mailbox-properties.h @@ -1,70 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gtk/gtk.h> -#include "mn-mailbox-properties.h" - -#ifndef __MN_AUTHENTICATED_MAILBOX_PROPERTIES_H__ -#define __MN_AUTHENTICATED_MAILBOX_PROPERTIES_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES (mn_authenticated_mailbox_properties_get_type()) -#define MN_AUTHENTICATED_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_authenticated_mailbox_properties_get_type(), MNAuthenticatedMailboxProperties) -#define MN_AUTHENTICATED_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_authenticated_mailbox_properties_get_type(), MNAuthenticatedMailboxProperties const) -#define MN_AUTHENTICATED_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_authenticated_mailbox_properties_get_type(), MNAuthenticatedMailboxPropertiesClass) -#define MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_authenticated_mailbox_properties_get_type ()) - -#define MN_AUTHENTICATED_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_authenticated_mailbox_properties_get_type(), MNAuthenticatedMailboxPropertiesClass) - -/* Private structure type */ -typedef struct _MNAuthenticatedMailboxPropertiesPrivate MNAuthenticatedMailboxPropertiesPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_AUTHENTICATED_MAILBOX_PROPERTIES__ -#define __TYPEDEF_MN_AUTHENTICATED_MAILBOX_PROPERTIES__ -typedef struct _MNAuthenticatedMailboxProperties MNAuthenticatedMailboxProperties; -#endif -struct _MNAuthenticatedMailboxProperties { - MNMailboxProperties __parent__; - /*< private >*/ - GtkWidget * account_vbox; /* protected */ - GtkWidget * username_vbox; /* protected */ - GtkWidget * username_label; /* protected */ - GtkWidget * username_entry; /* protected */ - GtkWidget * password_vbox; /* protected */ - GtkWidget * password_label; /* protected */ - GtkWidget * password_entry; /* protected */ - MNAuthenticatedMailboxPropertiesPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNAuthenticatedMailboxPropertiesClass MNAuthenticatedMailboxPropertiesClass; -struct _MNAuthenticatedMailboxPropertiesClass { - MNMailboxPropertiesClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_authenticated_mailbox_properties_get_type (void) G_GNUC_CONST; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-authenticated-mailbox.c b/build/src/mn-authenticated-mailbox.c @@ -1,1052 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-authenticated-mailbox.h" - -#include "mn-authenticated-mailbox-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 29 "src/mn-authenticated-mailbox.gob" - -#include <glib/gi18n.h> -#include <gnome.h> -#include "mn-mailbox-private.h" -#include "mn-shell.h" -#include "mn-util.h" -#include "mn-keyring.h" - -#line 35 "mn-authenticated-mailbox.c" -/* self casting macros */ -#define SELF(x) MN_AUTHENTICATED_MAILBOX(x) -#define SELF_CONST(x) MN_AUTHENTICATED_MAILBOX_CONST(x) -#define IS_SELF(x) MN_IS_AUTHENTICATED_MAILBOX(x) -#define TYPE_SELF MN_TYPE_AUTHENTICATED_MAILBOX -#define SELF_CLASS(x) MN_AUTHENTICATED_MAILBOX_CLASS(x) - -#define SELF_GET_CLASS(x) MN_AUTHENTICATED_MAILBOX_GET_CLASS(x) - -/* self typedefs */ -typedef MNAuthenticatedMailbox Self; -typedef MNAuthenticatedMailboxClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_init (MNAuthenticatedMailbox * o) G_GNUC_UNUSED; -#line 54 "mn-authenticated-mailbox.c" -#line 87 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * class) G_GNUC_UNUSED; -#line 57 "mn-authenticated-mailbox.c" -#line 97 "src/mn-authenticated-mailbox.gob" -static void ___3_mn_authenticated_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED; -#line 60 "mn-authenticated-mailbox.c" -#line 110 "src/mn-authenticated-mailbox.gob" -static void ___4_mn_authenticated_mailbox_added (MNMailbox * mailbox) G_GNUC_UNUSED; -#line 63 "mn-authenticated-mailbox.c" -#line 130 "src/mn-authenticated-mailbox.gob" -static void ___5_mn_authenticated_mailbox_removed (MNMailbox * mailbox) G_GNUC_UNUSED; -#line 66 "mn-authenticated-mailbox.c" -#line 152 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_set_password (MNAuthenticatedMailbox * self) G_GNUC_UNUSED; -#line 69 "mn-authenticated-mailbox.c" -#line 174 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_set_password_cb (GnomeKeyringResult result, guint32 item_id, gpointer data) G_GNUC_UNUSED; -#line 72 "mn-authenticated-mailbox.c" -#line 200 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_set_set_password_request (MNAuthenticatedMailbox * self, gpointer request) G_GNUC_UNUSED; -#line 75 "mn-authenticated-mailbox.c" -#line 207 "src/mn-authenticated-mailbox.gob" -static void ___9_mn_authenticated_mailbox_check (MNMailbox * mailbox) G_GNUC_UNUSED; -#line 78 "mn-authenticated-mailbox.c" -#line 224 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_check_thread_cb (MNAuthenticatedMailbox * self) G_GNUC_UNUSED; -#line 81 "mn-authenticated-mailbox.c" -static void ___real_mn_authenticated_mailbox_authenticated_check (MNAuthenticatedMailbox * self); -#line 238 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_authenticated_check (MNAuthenticatedMailbox * self) G_GNUC_UNUSED; -#line 85 "mn-authenticated-mailbox.c" -#line 320 "src/mn-authenticated-mailbox.gob" -static char * mn_authenticated_mailbox_get_password_sync (MNAuthenticatedMailbox * self) G_GNUC_UNUSED; -#line 88 "mn-authenticated-mailbox.c" -#line 333 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_get_password_sync_request_cb (gpointer request, gpointer data) G_GNUC_UNUSED; -#line 91 "mn-authenticated-mailbox.c" -#line 364 "src/mn-authenticated-mailbox.gob" -static gboolean mn_authenticated_mailbox_prompt_for_password (MNAuthenticatedMailbox * self, char ** password, const char * format, ...) -G_GNUC_PRINTF(3, 4) G_GNUC_UNUSED; -#line 95 "mn-authenticated-mailbox.c" -#line 414 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_set_prompted_password (MNAuthenticatedMailbox * self, const char * keyring, const char * password) G_GNUC_UNUSED; -#line 98 "mn-authenticated-mailbox.c" -#line 445 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_set_prompted_password_request_cb (gpointer request, gpointer data) G_GNUC_UNUSED; -#line 101 "mn-authenticated-mailbox.c" -#line 458 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_handle_set_password_result (MNAuthenticatedMailbox * self, GnomeKeyringResult result) G_GNUC_UNUSED; -#line 104 "mn-authenticated-mailbox.c" -#line 487 "src/mn-authenticated-mailbox.gob" -static void mn_authenticated_mailbox_delete_password (MNAuthenticatedMailbox * self, const char * keyring, guint32 item_id) G_GNUC_UNUSED; -#line 107 "mn-authenticated-mailbox.c" - -enum { - PROP_0, - PROP_USERNAME, - PROP_PASSWORD, - PROP_SETTING_PASSWORD -}; - -/* pointer to the class of our parent */ -static MNMailboxClass *parent_class = NULL; - -/* Short form macros */ -#define self_get_setting_password mn_authenticated_mailbox_get_setting_password -#define self_set_password mn_authenticated_mailbox_set_password -#define self_set_password_cb mn_authenticated_mailbox_set_password_cb -#define self_set_set_password_request mn_authenticated_mailbox_set_set_password_request -#define self_check_thread_cb mn_authenticated_mailbox_check_thread_cb -#define self_authenticated_check mn_authenticated_mailbox_authenticated_check -#define self_parse_username mn_authenticated_mailbox_parse_username -#define self_fill_password mn_authenticated_mailbox_fill_password -#define self_get_password_sync mn_authenticated_mailbox_get_password_sync -#define self_get_password_sync_request_cb mn_authenticated_mailbox_get_password_sync_request_cb -#define self_auth_failed mn_authenticated_mailbox_auth_failed -#define self_prompt_for_password mn_authenticated_mailbox_prompt_for_password -#define self_set_prompted_password mn_authenticated_mailbox_set_prompted_password -#define self_set_prompted_password_request_cb mn_authenticated_mailbox_set_prompted_password_request_cb -#define self_handle_set_password_result mn_authenticated_mailbox_handle_set_password_result -#define self_get_password mn_authenticated_mailbox_get_password -#define self_delete_password mn_authenticated_mailbox_delete_password -GType -mn_authenticated_mailbox_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNAuthenticatedMailboxClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_authenticated_mailbox_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNAuthenticatedMailbox), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_authenticated_mailbox_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_MAILBOX, "MNAuthenticatedMailbox", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNAuthenticatedMailbox *)g_object_new(mn_authenticated_mailbox_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNAuthenticatedMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNAuthenticatedMailbox * -GET_NEW_VARG (const char *first, ...) -{ - MNAuthenticatedMailbox *ret; - va_list ap; - va_start (ap, first); - ret = (MNAuthenticatedMailbox *)g_object_new_valist (mn_authenticated_mailbox_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::finalize" - MNAuthenticatedMailbox *self G_GNUC_UNUSED = MN_AUTHENTICATED_MAILBOX (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 40 "src/mn-authenticated-mailbox.gob" - if(self->username) { g_free ((gpointer) self->username); self->username = NULL; } -#line 190 "mn-authenticated-mailbox.c" -#line 56 "src/mn-authenticated-mailbox.gob" - if(self->password) { g_free ((gpointer) self->password); self->password = NULL; } -#line 193 "mn-authenticated-mailbox.c" -#line 60 "src/mn-authenticated-mailbox.gob" - if(self->keyring_username) { g_free ((gpointer) self->keyring_username); self->keyring_username = NULL; } -#line 196 "mn-authenticated-mailbox.c" -#line 61 "src/mn-authenticated-mailbox.gob" - if(self->keyring_domain) { g_free ((gpointer) self->keyring_domain); self->keyring_domain = NULL; } -#line 199 "mn-authenticated-mailbox.c" -#line 62 "src/mn-authenticated-mailbox.gob" - if(self->keyring_server) { g_free ((gpointer) self->keyring_server); self->keyring_server = NULL; } -#line 202 "mn-authenticated-mailbox.c" -#line 63 "src/mn-authenticated-mailbox.gob" - if(self->keyring_protocol) { g_free ((gpointer) self->keyring_protocol); self->keyring_protocol = NULL; } -#line 205 "mn-authenticated-mailbox.c" -#line 64 "src/mn-authenticated-mailbox.gob" - if(self->keyring_authtype) { g_free ((gpointer) self->keyring_authtype); self->keyring_authtype = NULL; } -#line 208 "mn-authenticated-mailbox.c" -#line 77 "src/mn-authenticated-mailbox.gob" - if(self->runtime_password) { g_free ((gpointer) self->runtime_password); self->runtime_password = NULL; } -#line 211 "mn-authenticated-mailbox.c" -#line 84 "src/mn-authenticated-mailbox.gob" - if(self->_priv->prompted_password_keyring) { g_free ((gpointer) self->_priv->prompted_password_keyring); self->_priv->prompted_password_keyring = NULL; } -#line 214 "mn-authenticated-mailbox.c" -} -#undef __GOB_FUNCTION__ - -static void -mn_authenticated_mailbox_init (MNAuthenticatedMailbox * o G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::init" - o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_AUTHENTICATED_MAILBOX,MNAuthenticatedMailboxPrivate); -} -#undef __GOB_FUNCTION__ -#line 87 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * class G_GNUC_UNUSED) -{ -#line 229 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)class; - - g_type_class_add_private(class,sizeof(MNAuthenticatedMailboxPrivate)); - - parent_class = g_type_class_ref (MN_TYPE_MAILBOX); - -#line 97 "src/mn-authenticated-mailbox.gob" - mn_mailbox_class->seal = ___3_mn_authenticated_mailbox_seal; -#line 110 "src/mn-authenticated-mailbox.gob" - mn_mailbox_class->added = ___4_mn_authenticated_mailbox_added; -#line 130 "src/mn-authenticated-mailbox.gob" - mn_mailbox_class->removed = ___5_mn_authenticated_mailbox_removed; -#line 207 "src/mn-authenticated-mailbox.gob" - mn_mailbox_class->check = ___9_mn_authenticated_mailbox_check; -#line 238 "src/mn-authenticated-mailbox.gob" - class->authenticated_check = ___real_mn_authenticated_mailbox_authenticated_check; -#line 248 "mn-authenticated-mailbox.c" - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_string - ("username" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE)); - g_object_class_install_property (g_object_class, - PROP_USERNAME, - param_spec); - param_spec = g_param_spec_string - ("password" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD)); - g_object_class_install_property (g_object_class, - PROP_PASSWORD, - param_spec); - param_spec = g_param_spec_boolean - ("setting_password" /* name */, - NULL /* nick */, - NULL /* blurb */, - FALSE /* default_value */, - (GParamFlags)(G_PARAM_READABLE)); - g_object_class_install_property (g_object_class, - PROP_SETTING_PASSWORD, - param_spec); - } - { -#line 88 "src/mn-authenticated-mailbox.gob" - - /* - * We might need to save the password to the keyring before the - * first check, so we will call mn_mailbox_enable_checking() - * ourselves. - */ - MN_MAILBOX_CLASS(class)->enable_checking_when_added = FALSE; - -#line 293 "mn-authenticated-mailbox.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_property" -{ - MNAuthenticatedMailbox *self G_GNUC_UNUSED; - - self = MN_AUTHENTICATED_MAILBOX (object); - - switch (property_id) { - case PROP_USERNAME: - { -#line 41 "src/mn-authenticated-mailbox.gob" -{ char *old = self->username; self->username = g_value_dup_string (VAL); g_free (old); } -#line 314 "mn-authenticated-mailbox.c" - } - break; - case PROP_PASSWORD: - { -#line 57 "src/mn-authenticated-mailbox.gob" -{ char *old = self->password; self->password = g_value_dup_string (VAL); g_free (old); } -#line 321 "mn-authenticated-mailbox.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_property" -{ - MNAuthenticatedMailbox *self G_GNUC_UNUSED; - - self = MN_AUTHENTICATED_MAILBOX (object); - - switch (property_id) { - case PROP_USERNAME: - { -#line 41 "src/mn-authenticated-mailbox.gob" -g_value_set_string (VAL, self->username); -#line 352 "mn-authenticated-mailbox.c" - } - break; - case PROP_PASSWORD: - { -#line 57 "src/mn-authenticated-mailbox.gob" -g_value_set_string (VAL, self->password); -#line 359 "mn-authenticated-mailbox.c" - } - break; - case PROP_SETTING_PASSWORD: - { -#line 71 "src/mn-authenticated-mailbox.gob" - - g_value_set_boolean(VAL, selfp->set_password_request != NULL); - -#line 368 "mn-authenticated-mailbox.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - -#line 71 "src/mn-authenticated-mailbox.gob" -gboolean -mn_authenticated_mailbox_get_setting_password (MNAuthenticatedMailbox * self) -{ -#line 388 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_setting_password" -{ -#line 70 "src/mn-authenticated-mailbox.gob" - gboolean val; g_object_get (G_OBJECT (self), "setting_password", &val, NULL); return val; -}} -#line 394 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - - -#line 97 "src/mn-authenticated-mailbox.gob" -static void -___3_mn_authenticated_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED) -#line 401 "mn-authenticated-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->seal) \ - (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::seal" -{ -#line 99 "src/mn-authenticated-mailbox.gob" - - Self *self = SELF(mailbox); - - PARENT_HANDLER(mailbox); - - if (self->password) - mn_shell->mailboxes->must_save_after_load = TRUE; - - self_parse_username(self, &self->keyring_username, &self->keyring_domain); - }} -#line 419 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 110 "src/mn-authenticated-mailbox.gob" -static void -___4_mn_authenticated_mailbox_added (MNMailbox * mailbox G_GNUC_UNUSED) -#line 426 "mn-authenticated-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->added) \ - (* MN_MAILBOX_CLASS(parent_class)->added)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::added" -{ -#line 112 "src/mn-authenticated-mailbox.gob" - - Self *self = SELF(mailbox); - - PARENT_HANDLER(mailbox); - - /* - * If self->password is set, the password must be saved to the - * keyring (either because the user has just added the mailbox or - * because a mailboxes.xml produced by an older version of MN was - * loaded). Checking will be enabled after the password has been - * saved. Otherwise we must enable checking immediately. - */ - if (self->password) - self_set_password(self); - else - mn_mailbox_enable_checking(mailbox); - }} -#line 451 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 130 "src/mn-authenticated-mailbox.gob" -static void -___5_mn_authenticated_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED) -#line 458 "mn-authenticated-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->removed) \ - (* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::removed" -{ -#line 132 "src/mn-authenticated-mailbox.gob" - - Self *self = SELF(mailbox); - - PARENT_HANDLER(mailbox); - - if (selfp->auth_dialog) - gtk_dialog_response(GTK_DIALOG(selfp->auth_dialog), GTK_RESPONSE_CANCEL); - - if (selfp->get_password_request) - gnome_keyring_cancel_request(selfp->get_password_request); - - if (selfp->set_password_request) - gnome_keyring_cancel_request(selfp->set_password_request); - - /* - * We do not remove the password from the keyring, since it is - * meant to be shared with other applications - */ - }} -#line 485 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 152 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_set_password (MNAuthenticatedMailbox * self) -{ -#line 493 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_password" -#line 152 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 152 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 499 "mn-authenticated-mailbox.c" -{ -#line 154 "src/mn-authenticated-mailbox.gob" - - g_assert(self->password != NULL); - g_assert(selfp->set_password_request == NULL); - - g_object_ref(self); - self_set_set_password_request(self, - gnome_keyring_set_network_password(NULL, - self->keyring_username, - self->keyring_domain, - self->keyring_server, - NULL, - self->keyring_protocol, - self->keyring_authtype, - self->keyring_port, - self->password, - self_set_password_cb, - self, - g_object_unref)); - }} -#line 521 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 174 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_set_password_cb (GnomeKeyringResult result, guint32 item_id, gpointer data) -{ -#line 528 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_password_cb" -{ -#line 178 "src/mn-authenticated-mailbox.gob" - - Self *self = data; - - GDK_THREADS_ENTER(); - - self_set_set_password_request(self, NULL); - - /* - * If the mailbox has not been removed, display an error dialog if - * the password could not be saved and enable checking. - */ - if (mn_mailbox_get_active(MN_MAILBOX(self))) - { - self_handle_set_password_result(self, result); - - mn_mailbox_enable_checking(MN_MAILBOX(self)); - } - - /* do not call gdk_flush(), we're normally in the main thread */ - GDK_THREADS_LEAVE(); - }} -#line 553 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 200 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_set_set_password_request (MNAuthenticatedMailbox * self, gpointer request) -{ -#line 560 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_set_password_request" -#line 200 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 200 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 566 "mn-authenticated-mailbox.c" -{ -#line 202 "src/mn-authenticated-mailbox.gob" - - selfp->set_password_request = request; - g_object_notify(G_OBJECT(self), "setting-password"); - }} -#line 573 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 207 "src/mn-authenticated-mailbox.gob" -static void -___9_mn_authenticated_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED) -#line 579 "mn-authenticated-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->check) \ - (* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::check" -{ -#line 209 "src/mn-authenticated-mailbox.gob" - - Self *self = SELF(mailbox); - - if (selfp->checking) - return; - - PARENT_HANDLER(mailbox); - - selfp->checking = TRUE; - mn_mailbox_set_error(mailbox, NULL); - - g_object_ref(self); - mn_thread_create((GThreadFunc) self_check_thread_cb, self); - }} -#line 601 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 224 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_check_thread_cb (MNAuthenticatedMailbox * self) -{ -#line 609 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::check_thread_cb" -#line 224 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 224 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 615 "mn-authenticated-mailbox.c" -{ -#line 226 "src/mn-authenticated-mailbox.gob" - - self_authenticated_check(self); - - GDK_THREADS_ENTER(); - - selfp->checking = FALSE; - g_object_unref(self); - - gdk_flush(); - GDK_THREADS_LEAVE(); - }} -#line 629 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 238 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_authenticated_check (MNAuthenticatedMailbox * self) -{ -#line 636 "mn-authenticated-mailbox.c" - MNAuthenticatedMailboxClass *klass; -#line 238 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 238 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 642 "mn-authenticated-mailbox.c" - klass = MN_AUTHENTICATED_MAILBOX_GET_CLASS(self); - - if(klass->authenticated_check) - (*klass->authenticated_check)(self); -} -#line 238 "src/mn-authenticated-mailbox.gob" -static void -___real_mn_authenticated_mailbox_authenticated_check (MNAuthenticatedMailbox * self G_GNUC_UNUSED) -{ -#line 652 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::authenticated_check" -{ -#line 240 "src/mn-authenticated-mailbox.gob" - - self->auth_prompted = FALSE; - self->auth_cancelled = FALSE; - self->auth_failed = FALSE; - - g_free(selfp->prompted_password_keyring); - selfp->prompted_password_keyring = NULL; - - selfp->prompted_password_item_id = 0; - }} -#line 666 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 251 "src/mn-authenticated-mailbox.gob" -void -mn_authenticated_mailbox_parse_username (MNAuthenticatedMailbox * self, char ** username, char ** domain) -{ -#line 673 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::parse_username" -#line 251 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 251 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 679 "mn-authenticated-mailbox.c" -{ -#line 253 "src/mn-authenticated-mailbox.gob" - - char *at; - - at = strrchr(self->username, '@'); - if (at) - { - if (username) - *username = g_strndup(self->username, at - self->username); - if (domain) - *domain = g_strdup(at + 1); - } - else - { - if (username) - *username = g_strdup(self->username); - if (domain) - *domain = NULL; - } - }} -#line 701 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 278 "src/mn-authenticated-mailbox.gob" -gboolean -mn_authenticated_mailbox_fill_password (MNAuthenticatedMailbox * self, gboolean may_prompt) -{ -#line 708 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::fill_password" -#line 278 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (self != NULL, (gboolean )0); -#line 278 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (gboolean )0); -#line 714 "mn-authenticated-mailbox.c" -{ -#line 280 "src/mn-authenticated-mailbox.gob" - - self->auth_cancelled = FALSE; - - g_free(self->runtime_password); - self->runtime_password = self_get_password_sync(self); - - /* - * Check if the user removed the mailbox while we were waiting for - * the keyring password. - */ - if (! mn_mailbox_get_active(MN_MAILBOX(self))) - { - self->auth_cancelled = TRUE; - return FALSE; - } - - if (! self->runtime_password && may_prompt) - { - GDK_THREADS_ENTER(); - - self->auth_prompted = TRUE; - - if (! self_prompt_for_password(self, - &self->runtime_password, - self->auth_failed - /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */ - ? _("Mail Notification was unable to log into %s mailbox %s, possibly because the password you have entered is invalid.\n\nPlease re-enter your password.") - /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */ - : _("Enter your password for %s mailbox %s."), - MN_MAILBOX(self)->format, - MN_MAILBOX(self)->runtime_name)) - self->auth_cancelled = TRUE; - - gdk_flush(); - GDK_THREADS_LEAVE(); - } - - return ! self->auth_cancelled; - }} -#line 756 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 320 "src/mn-authenticated-mailbox.gob" -static char * -mn_authenticated_mailbox_get_password_sync (MNAuthenticatedMailbox * self) -{ -#line 763 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_password_sync" -#line 320 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (self != NULL, (char * )0); -#line 320 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (char * )0); -#line 769 "mn-authenticated-mailbox.c" -{ -#line 322 "src/mn-authenticated-mailbox.gob" - - return mn_keyring_get_password_sync(self->keyring_username, - self->keyring_domain, - self->keyring_server, - self->keyring_protocol, - self->keyring_authtype, - self->keyring_port, - self_get_password_sync_request_cb, - self); - }} -#line 782 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 333 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_get_password_sync_request_cb (gpointer request, gpointer data) -{ -#line 789 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_password_sync_request_cb" -{ -#line 335 "src/mn-authenticated-mailbox.gob" - - Self *self = data; - - selfp->get_password_request = request; - }} -#line 798 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 341 "src/mn-authenticated-mailbox.gob" -void -mn_authenticated_mailbox_auth_failed (MNAuthenticatedMailbox * self) -{ -#line 805 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::auth_failed" -#line 341 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 341 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 811 "mn-authenticated-mailbox.c" -{ -#line 343 "src/mn-authenticated-mailbox.gob" - - /* - * If the password had been entered at the password prompt, we - * must remove it from the keyring since the authentication has - * failed. - */ - if (self->auth_prompted && selfp->prompted_password_item_id) - { - self_delete_password(self, - selfp->prompted_password_keyring, - selfp->prompted_password_item_id); - - g_free(selfp->prompted_password_keyring); - selfp->prompted_password_keyring = NULL; - - selfp->prompted_password_item_id = 0; - } - - self->auth_failed = TRUE; - }} -#line 834 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 364 "src/mn-authenticated-mailbox.gob" -static gboolean -mn_authenticated_mailbox_prompt_for_password (MNAuthenticatedMailbox * self, char ** password, const char * format, ...) -{ -#line 841 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::prompt_for_password" -#line 364 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (self != NULL, (gboolean )0); -#line 364 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (gboolean )0); -#line 364 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (password != NULL, (gboolean )0); -#line 364 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (format != NULL, (gboolean )0); -#line 851 "mn-authenticated-mailbox.c" -{ -#line 370 "src/mn-authenticated-mailbox.gob" - - char *message; - gboolean ok; - - g_return_val_if_fail(selfp->auth_dialog == NULL, FALSE); - - MN_STRDUP_VPRINTF(message, format); - - /* keep the title in sync with gnome-authentication-manager */ - - /* translators: header capitalization */ - selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"), - message, - self->username, - NULL, - FALSE); - g_free(message); - - mn_add_weak_pointer(&selfp->auth_dialog); - - gnome_password_dialog_set_show_userpass_buttons(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), FALSE); - gnome_password_dialog_set_readonly_username(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), TRUE); - gnome_password_dialog_set_show_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), TRUE); - gnome_password_dialog_set_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), GNOME_PASSWORD_DIALOG_REMEMBER_SESSION); - - ok = gnome_password_dialog_run_and_block(GNOME_PASSWORD_DIALOG(selfp->auth_dialog)); - if (ok) - { - GnomePasswordDialogRemember remember; - - *password = gnome_password_dialog_get_password(GNOME_PASSWORD_DIALOG(selfp->auth_dialog)); - - remember = gnome_password_dialog_get_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog)); - if (remember == GNOME_PASSWORD_DIALOG_REMEMBER_SESSION) - self_set_prompted_password(self, "session", *password); - else if (remember == GNOME_PASSWORD_DIALOG_REMEMBER_FOREVER) - self_set_prompted_password(self, NULL, *password); - } - - gtk_widget_destroy(selfp->auth_dialog); - - return ok; - }} -#line 897 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 414 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_set_prompted_password (MNAuthenticatedMailbox * self, const char * keyring, const char * password) -{ -#line 904 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_prompted_password" -#line 414 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 414 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 414 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (password != NULL); -#line 912 "mn-authenticated-mailbox.c" -{ -#line 418 "src/mn-authenticated-mailbox.gob" - - GnomeKeyringResult result; - - /* do not block the main loop */ - gdk_flush(); - GDK_THREADS_LEAVE(); - - g_free(selfp->prompted_password_keyring); - selfp->prompted_password_keyring = g_strdup(keyring); - - result = mn_keyring_set_password_sync(keyring, - self->keyring_username, - self->keyring_domain, - self->keyring_server, - self->keyring_protocol, - self->keyring_authtype, - self->keyring_port, - password, - &selfp->prompted_password_item_id, - self_set_prompted_password_request_cb, - self); - - GDK_THREADS_ENTER(); - - self_handle_set_password_result(self, result); - }} -#line 941 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 445 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_set_prompted_password_request_cb (gpointer request, gpointer data) -{ -#line 948 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_prompted_password_request_cb" -{ -#line 447 "src/mn-authenticated-mailbox.gob" - - Self *self = data; - - GDK_THREADS_ENTER(); - - self_set_set_password_request(self, request); - - /* do not call gdk_flush(), we're normally in the main thread */ - GDK_THREADS_LEAVE(); - }} -#line 962 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 458 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_handle_set_password_result (MNAuthenticatedMailbox * self, GnomeKeyringResult result) -{ -#line 969 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::handle_set_password_result" -#line 458 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 458 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 975 "mn-authenticated-mailbox.c" -{ -#line 460 "src/mn-authenticated-mailbox.gob" - - if (result != GNOME_KEYRING_RESULT_OK && result != GNOME_KEYRING_RESULT_CANCELLED) - mn_show_error_dialog(NULL, - _("Unable to save the mailbox password"), - /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */ - _("The password of %s mailbox %s could not be saved to the keyring."), - MN_MAILBOX(self)->format, - MN_MAILBOX(self)->runtime_name); - }} -#line 987 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 470 "src/mn-authenticated-mailbox.gob" -gpointer -mn_authenticated_mailbox_get_password (MNAuthenticatedMailbox * self, GnomeKeyringOperationGetListCallback cb, gpointer data) -{ -#line 994 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_password" -#line 470 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (self != NULL, (gpointer )0); -#line 470 "src/mn-authenticated-mailbox.gob" - g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (gpointer )0); -#line 1000 "mn-authenticated-mailbox.c" -{ -#line 474 "src/mn-authenticated-mailbox.gob" - - return gnome_keyring_find_network_password(self->keyring_username, - self->keyring_domain, - self->keyring_server, - NULL, - self->keyring_protocol, - self->keyring_authtype, - self->keyring_port, - cb, - data, - NULL); - }} -#line 1015 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 487 "src/mn-authenticated-mailbox.gob" -static void -mn_authenticated_mailbox_delete_password (MNAuthenticatedMailbox * self, const char * keyring, guint32 item_id) -{ -#line 1022 "mn-authenticated-mailbox.c" -#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::delete_password" -#line 487 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (self != NULL); -#line 487 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self)); -#line 487 "src/mn-authenticated-mailbox.gob" - g_return_if_fail (item_id != 0); -#line 1030 "mn-authenticated-mailbox.c" -{ -#line 491 "src/mn-authenticated-mailbox.gob" - - char *default_keyring = NULL; - - if (! keyring) - { - /* - * gnome_keyring_item_delete_sync() does not work if the - * passed keyring is NULL, so we must get the default keyring. - */ - if (gnome_keyring_get_default_keyring_sync(&default_keyring) != GNOME_KEYRING_RESULT_OK) - return; - - keyring = default_keyring; - } - - gnome_keyring_item_delete_sync(keyring, item_id); - - g_free(default_keyring); - }} -#line 1052 "mn-authenticated-mailbox.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-authenticated-mailbox.gob.stamp b/build/src/mn-authenticated-mailbox.gob.stamp diff --git a/build/src/mn-authenticated-mailbox.h b/build/src/mn-authenticated-mailbox.h @@ -1,103 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gnome-keyring.h> -#include "mn-mailbox.h" - -#ifndef __MN_AUTHENTICATED_MAILBOX_H__ -#define __MN_AUTHENTICATED_MAILBOX_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_AUTHENTICATED_MAILBOX (mn_authenticated_mailbox_get_type()) -#define MN_AUTHENTICATED_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_authenticated_mailbox_get_type(), MNAuthenticatedMailbox) -#define MN_AUTHENTICATED_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_authenticated_mailbox_get_type(), MNAuthenticatedMailbox const) -#define MN_AUTHENTICATED_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_authenticated_mailbox_get_type(), MNAuthenticatedMailboxClass) -#define MN_IS_AUTHENTICATED_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_authenticated_mailbox_get_type ()) - -#define MN_AUTHENTICATED_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_authenticated_mailbox_get_type(), MNAuthenticatedMailboxClass) - -/* Private structure type */ -typedef struct _MNAuthenticatedMailboxPrivate MNAuthenticatedMailboxPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_AUTHENTICATED_MAILBOX__ -#define __TYPEDEF_MN_AUTHENTICATED_MAILBOX__ -typedef struct _MNAuthenticatedMailbox MNAuthenticatedMailbox; -#endif -struct _MNAuthenticatedMailbox { - MNMailbox __parent__; - /*< public >*/ - char * username; - char * password; - char * runtime_password; - /*< private >*/ - char * keyring_username; /* protected */ - char * keyring_domain; /* protected */ - char * keyring_server; /* protected */ - char * keyring_protocol; /* protected */ - char * keyring_authtype; /* protected */ - int keyring_port; /* protected */ - gboolean auth_prompted; /* protected */ - gboolean auth_cancelled; /* protected */ - gboolean auth_failed; /* protected */ - MNAuthenticatedMailboxPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNAuthenticatedMailboxClass MNAuthenticatedMailboxClass; -struct _MNAuthenticatedMailboxClass { - MNMailboxClass __parent__; - void (* authenticated_check) (MNAuthenticatedMailbox * self); -}; - - -/* - * Public methods - */ -GType mn_authenticated_mailbox_get_type (void) G_GNUC_CONST; -#line 71 "src/mn-authenticated-mailbox.gob" -gboolean mn_authenticated_mailbox_get_setting_password (MNAuthenticatedMailbox * self); -#line 75 "mn-authenticated-mailbox.h" -#line 470 "src/mn-authenticated-mailbox.gob" -gpointer mn_authenticated_mailbox_get_password (MNAuthenticatedMailbox * self, - GnomeKeyringOperationGetListCallback cb, - gpointer data); -#line 80 "mn-authenticated-mailbox.h" - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_AUTHENTICATED_MAILBOX_PROP_USERNAME(arg) "username", __extension__ ({gchar *z = (arg); z;}) -#define MN_AUTHENTICATED_MAILBOX_GET_PROP_USERNAME(arg) "username", __extension__ ({gchar **z = (arg); z;}) -#define MN_AUTHENTICATED_MAILBOX_PROP_PASSWORD(arg) "password", __extension__ ({gchar *z = (arg); z;}) -#define MN_AUTHENTICATED_MAILBOX_GET_PROP_PASSWORD(arg) "password", __extension__ ({gchar **z = (arg); z;}) -#define MN_AUTHENTICATED_MAILBOX_GET_PROP_SETTING_PASSWORD(arg) "setting_password", __extension__ ({gboolean *z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_AUTHENTICATED_MAILBOX_PROP_USERNAME(arg) "username",(gchar *)(arg) -#define MN_AUTHENTICATED_MAILBOX_GET_PROP_USERNAME(arg) "username",(gchar **)(arg) -#define MN_AUTHENTICATED_MAILBOX_PROP_PASSWORD(arg) "password",(gchar *)(arg) -#define MN_AUTHENTICATED_MAILBOX_GET_PROP_PASSWORD(arg) "password",(gchar **)(arg) -#define MN_AUTHENTICATED_MAILBOX_GET_PROP_SETTING_PASSWORD(arg) "setting_password",(gboolean *)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-autodetect-mailbox-properties-private.h b/build/src/mn-autodetect-mailbox-properties-private.h @@ -1,24 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_AUTODETECT_MAILBOX_PROPERTIES_PRIVATE_H__ -#define __MN_AUTODETECT_MAILBOX_PROPERTIES_PRIVATE_H__ - -#include "mn-autodetect-mailbox-properties.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct _MNAutodetectMailboxPropertiesPrivate { -#line 41 "src/mn-autodetect-mailbox-properties.gob" - GtkWidget * location_entry; -#line 42 "src/mn-autodetect-mailbox-properties.gob" - GtkWidget * chooser; -#line 18 "mn-autodetect-mailbox-properties-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-autodetect-mailbox-properties.c b/build/src/mn-autodetect-mailbox-properties.c @@ -1,470 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-autodetect-mailbox-properties.h" - -#include "mn-autodetect-mailbox-properties-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 25 "src/mn-autodetect-mailbox-properties.gob" - -#include <glib/gi18n.h> -#include "mn-mailbox-properties.h" -#include "mn-mailbox-properties-private.h" -#include "mn-util.h" -#include "mn-properties-dialog.h" -#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED -#include "mn-custom-vfs-mailbox.h" -#endif -#include "mn-stock.h" - -static char *current_folder_uri = NULL; - -#line 40 "mn-autodetect-mailbox-properties.c" -/* self casting macros */ -#define SELF(x) MN_AUTODETECT_MAILBOX_PROPERTIES(x) -#define SELF_CONST(x) MN_AUTODETECT_MAILBOX_PROPERTIES_CONST(x) -#define IS_SELF(x) MN_IS_AUTODETECT_MAILBOX_PROPERTIES(x) -#define TYPE_SELF MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES -#define SELF_CLASS(x) MN_AUTODETECT_MAILBOX_PROPERTIES_CLASS(x) - -#define SELF_GET_CLASS(x) MN_AUTODETECT_MAILBOX_PROPERTIES_GET_CLASS(x) - -/* self typedefs */ -typedef MNAutodetectMailboxProperties Self; -typedef MNAutodetectMailboxPropertiesClass SelfClass; - -/* here are local prototypes */ -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 100 "src/mn-autodetect-mailbox-properties.gob" -static void mn_autodetect_mailbox_properties_class_init (MNAutodetectMailboxPropertiesClass * class) G_GNUC_UNUSED; -#line 58 "mn-autodetect-mailbox-properties.c" -#line 109 "src/mn-autodetect-mailbox-properties.gob" -static void mn_autodetect_mailbox_properties_init (MNAutodetectMailboxProperties * self) G_GNUC_UNUSED; -#line 61 "mn-autodetect-mailbox-properties.c" -#line 154 "src/mn-autodetect-mailbox-properties.gob" -static void mn_autodetect_mailbox_properties_browse_clicked_h (GtkButton * button, gpointer user_data) G_GNUC_UNUSED; -#line 64 "mn-autodetect-mailbox-properties.c" -#line 196 "src/mn-autodetect-mailbox-properties.gob" -static void mn_autodetect_mailbox_properties_current_folder_changed_h (GtkFileChooser * chooser, gpointer user_data) G_GNUC_UNUSED; -#line 67 "mn-autodetect-mailbox-properties.c" -#line 203 "src/mn-autodetect-mailbox-properties.gob" -static void mn_autodetect_mailbox_properties_chooser_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED; -#line 70 "mn-autodetect-mailbox-properties.c" -#line 219 "src/mn-autodetect-mailbox-properties.gob" -static void ___6_mn_autodetect_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED; -#line 73 "mn-autodetect-mailbox-properties.c" -#line 231 "src/mn-autodetect-mailbox-properties.gob" -static MNMailbox * ___7_mn_autodetect_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED; -#line 76 "mn-autodetect-mailbox-properties.c" - -enum { - PROP_0, - PROP_COMPLETE, - PROP_DEFAULT_NAME, - PROP_DEFAULT_CHECK_DELAY -}; - -/* pointer to the class of our parent */ -static MNMailboxPropertiesClass *parent_class = NULL; - -/* Short form macros */ -#define self_browse_clicked_h mn_autodetect_mailbox_properties_browse_clicked_h -#define self_current_folder_changed_h mn_autodetect_mailbox_properties_current_folder_changed_h -#define self_chooser_response_h mn_autodetect_mailbox_properties_chooser_response_h -GType -mn_autodetect_mailbox_properties_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNAutodetectMailboxPropertiesClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_autodetect_mailbox_properties_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNAutodetectMailboxProperties), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_autodetect_mailbox_properties_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_MAILBOX_PROPERTIES, "MNAutodetectMailboxProperties", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNAutodetectMailboxProperties *)g_object_new(mn_autodetect_mailbox_properties_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNAutodetectMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNAutodetectMailboxProperties * -GET_NEW_VARG (const char *first, ...) -{ - MNAutodetectMailboxProperties *ret; - va_list ap; - va_start (ap, first); - ret = (MNAutodetectMailboxProperties *)g_object_new_valist (mn_autodetect_mailbox_properties_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::finalize" - MNAutodetectMailboxProperties *self G_GNUC_UNUSED = MN_AUTODETECT_MAILBOX_PROPERTIES (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -} -#undef __GOB_FUNCTION__ - -#line 100 "src/mn-autodetect-mailbox-properties.gob" -static void -mn_autodetect_mailbox_properties_class_init (MNAutodetectMailboxPropertiesClass * class G_GNUC_UNUSED) -{ -#line 150 "mn-autodetect-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - MNMailboxPropertiesClass *mn_mailbox_properties_class = (MNMailboxPropertiesClass *)class; - - g_type_class_add_private(class,sizeof(MNAutodetectMailboxPropertiesPrivate)); - - parent_class = g_type_class_ref (MN_TYPE_MAILBOX_PROPERTIES); - -#line 219 "src/mn-autodetect-mailbox-properties.gob" - mn_mailbox_properties_class->set_mailbox = ___6_mn_autodetect_mailbox_properties_set_mailbox; -#line 231 "src/mn-autodetect-mailbox-properties.gob" - mn_mailbox_properties_class->get_mailbox = ___7_mn_autodetect_mailbox_properties_get_mailbox; -#line 163 "mn-autodetect-mailbox-properties.c" - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - { - g_object_class_override_property (g_object_class, - PROP_COMPLETE, - "complete"); - g_object_class_override_property (g_object_class, - PROP_DEFAULT_NAME, - "default_name"); - g_object_class_override_property (g_object_class, - PROP_DEFAULT_CHECK_DELAY, - "default_check_delay"); - } - { -#line 101 "src/mn-autodetect-mailbox-properties.gob" - - MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class); - - p_class->type = "custom-vfs"; - p_class->stock_id = MN_STOCK_UNKNOWN; - p_class->combo_label = _("Autodetect"); - -#line 186 "mn-autodetect-mailbox-properties.c" - } -} -#undef __GOB_FUNCTION__ -#line 109 "src/mn-autodetect-mailbox-properties.gob" -static void -mn_autodetect_mailbox_properties_init (MNAutodetectMailboxProperties * self G_GNUC_UNUSED) -{ -#line 194 "mn-autodetect-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES,MNAutodetectMailboxPropertiesPrivate); - { -#line 110 "src/mn-autodetect-mailbox-properties.gob" - - MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self); - GtkWidget *location_vbox; - GtkWidget *outer_hbox; - GtkWidget *hbox; - GtkWidget *label; - GtkWidget *button; - - /* translators: header capitalization */ - location_vbox = mn_mailbox_properties_add_general_section(properties, _("Location")); - - label = gtk_label_new_with_mnemonic(_("_Location:")); - gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); - - outer_hbox = gtk_hbox_new(FALSE, 12); - hbox = gtk_hbox_new(FALSE, 6); - - selfp->location_entry = gtk_entry_new(); - /* translators: header capitalization */ - button = gtk_button_new_with_mnemonic(_("_Browse...")); - - gtk_label_set_mnemonic_widget(GTK_LABEL(label), selfp->location_entry); - properties->entries = g_slist_append(properties->entries, selfp->location_entry); - - gtk_box_pack_start(GTK_BOX(hbox), selfp->location_entry, TRUE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); - - gtk_box_pack_start(GTK_BOX(outer_hbox), label, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(outer_hbox), hbox, TRUE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(location_vbox), outer_hbox, FALSE, FALSE, 0); - - gtk_widget_show_all(outer_hbox); - - gtk_size_group_add_widget(MN_MAILBOX_PROPERTIES(self)->label_size_group, label); - - g_object_connect(selfp->location_entry, - "swapped-signal::changed", mn_mailbox_properties_notify_complete, self, - "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self, - "swapped-signal::changed", mn_mailbox_properties_notify_default_check_delay, self, - NULL); - - g_signal_connect(button, "clicked", G_CALLBACK(self_browse_clicked_h), self); - -#line 242 "mn-autodetect-mailbox-properties.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::get_property" -{ - MNAutodetectMailboxProperties *self G_GNUC_UNUSED; - - self = MN_AUTODETECT_MAILBOX_PROPERTIES (object); - - switch (property_id) { - case PROP_COMPLETE: - { -#line 46 "src/mn-autodetect-mailbox-properties.gob" - - const char *location; - gboolean complete = FALSE; - - location = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->location_entry)); - if (*location) - { - MNMailbox *mailbox; - - mailbox = mn_mailbox_new_from_uri(location); - if (mailbox) - { - complete = TRUE; - g_object_unref(mailbox); - } - } - - g_value_set_boolean(VAL, complete); - -#line 281 "mn-autodetect-mailbox-properties.c" - } - break; - case PROP_DEFAULT_NAME: - { -#line 68 "src/mn-autodetect-mailbox-properties.gob" - - char *name = NULL; - MNMailbox *mailbox; - - mailbox = mn_mailbox_new_from_uri(gtk_entry_get_text(GTK_ENTRY(selfp->location_entry))); - if (mailbox) - { - mn_mailbox_seal(mailbox); - name = g_strdup(mailbox->runtime_name); - g_object_unref(mailbox); - } - - g_value_take_string(VAL, name); - -#line 301 "mn-autodetect-mailbox-properties.c" - } - break; - case PROP_DEFAULT_CHECK_DELAY: - { -#line 85 "src/mn-autodetect-mailbox-properties.gob" - - int check_delay = -1; - MNMailbox *mailbox; - - mailbox = mn_mailbox_new_from_uri(gtk_entry_get_text(GTK_ENTRY(selfp->location_entry))); - if (mailbox) - { - mn_mailbox_seal(mailbox); - check_delay = mailbox->runtime_check_delay; - g_object_unref(mailbox); - } - - g_value_set_int(VAL, check_delay); - -#line 321 "mn-autodetect-mailbox-properties.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - - -#line 154 "src/mn-autodetect-mailbox-properties.gob" -static void -mn_autodetect_mailbox_properties_browse_clicked_h (GtkButton * button, gpointer user_data) -{ -#line 342 "mn-autodetect-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::browse_clicked_h" -{ -#line 156 "src/mn-autodetect-mailbox-properties.gob" - - Self *self = user_data; - GtkWidget *toplevel; - const char *location; - - if (selfp->chooser) - { - mn_window_present_from_event(GTK_WINDOW(selfp->chooser)); - return; - } - - toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button)); - /* translators: header capitalization */ - selfp->chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"), - GTK_WINDOW(toplevel), - GTK_FILE_CHOOSER_ACTION_OPEN, - "gnome-vfs", - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, 1, - NULL); - mn_add_weak_pointer(&selfp->chooser); - - gtk_window_set_destroy_with_parent(GTK_WINDOW(selfp->chooser), TRUE); - gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(selfp->chooser), FALSE); - mn_file_chooser_dialog_allow_select_folder(GTK_FILE_CHOOSER_DIALOG(selfp->chooser), 1); - - location = gtk_entry_get_text(GTK_ENTRY(selfp->location_entry)); - if (*location) - gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(selfp->chooser), location); - else if (current_folder_uri) - gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(selfp->chooser), current_folder_uri); - - g_object_connect(selfp->chooser, - "signal::current-folder-changed", self_current_folder_changed_h, self, - "signal::response", self_chooser_response_h, self, - NULL); - - gtk_widget_show(selfp->chooser); - }} -#line 385 "mn-autodetect-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 196 "src/mn-autodetect-mailbox-properties.gob" -static void -mn_autodetect_mailbox_properties_current_folder_changed_h (GtkFileChooser * chooser, gpointer user_data) -{ -#line 392 "mn-autodetect-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::current_folder_changed_h" -{ -#line 198 "src/mn-autodetect-mailbox-properties.gob" - - g_free(current_folder_uri); - current_folder_uri = gtk_file_chooser_get_current_folder_uri(chooser); - }} -#line 400 "mn-autodetect-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 203 "src/mn-autodetect-mailbox-properties.gob" -static void -mn_autodetect_mailbox_properties_chooser_response_h (GtkDialog * dialog, int response, gpointer user_data) -{ -#line 407 "mn-autodetect-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::chooser_response_h" -{ -#line 205 "src/mn-autodetect-mailbox-properties.gob" - - if (response == 1) - { - Self *self = user_data; - char *uri; - - uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(dialog)); - gtk_entry_set_text(GTK_ENTRY(selfp->location_entry), uri); - g_free(uri); - } - - gtk_widget_destroy(GTK_WIDGET(dialog)); - }} -#line 424 "mn-autodetect-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 219 "src/mn-autodetect-mailbox-properties.gob" -static void -___6_mn_autodetect_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox) -#line 430 "mn-autodetect-mailbox-properties.c" -#define PARENT_HANDLER(___properties,___mailbox) \ - { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \ - (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::set_mailbox" -{ -#line 221 "src/mn-autodetect-mailbox-properties.gob" - -#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED - g_return_if_fail(MN_IS_CUSTOM_VFS_MAILBOX(mailbox)); - - gtk_entry_set_text(GTK_ENTRY(SELF(properties)->_priv->location_entry), MN_CUSTOM_VFS_MAILBOX(mailbox)->uri); -#else - g_assert_not_reached(); -#endif - }} -#line 447 "mn-autodetect-mailbox-properties.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 231 "src/mn-autodetect-mailbox-properties.gob" -static MNMailbox * -___7_mn_autodetect_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED) -#line 454 "mn-autodetect-mailbox-properties.c" -#define PARENT_HANDLER(___properties) \ - ((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \ - (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \ - ((MNMailbox * )0)) -{ -#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::get_mailbox" -{ -#line 233 "src/mn-autodetect-mailbox-properties.gob" - - const char *uri; - - uri = gtk_entry_get_text(GTK_ENTRY(SELF(properties)->_priv->location_entry)); - return mn_mailbox_new_from_uri(uri); - }} -#line 469 "mn-autodetect-mailbox-properties.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER diff --git a/build/src/mn-autodetect-mailbox-properties.gob.stamp b/build/src/mn-autodetect-mailbox-properties.gob.stamp diff --git a/build/src/mn-autodetect-mailbox-properties.h b/build/src/mn-autodetect-mailbox-properties.h @@ -1,77 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gtk/gtk.h> -#include "mn-mailbox-properties.h" - -#ifndef __MN_AUTODETECT_MAILBOX_PROPERTIES_H__ -#define __MN_AUTODETECT_MAILBOX_PROPERTIES_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES (mn_autodetect_mailbox_properties_get_type()) -#define MN_AUTODETECT_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_autodetect_mailbox_properties_get_type(), MNAutodetectMailboxProperties) -#define MN_AUTODETECT_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_autodetect_mailbox_properties_get_type(), MNAutodetectMailboxProperties const) -#define MN_AUTODETECT_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_autodetect_mailbox_properties_get_type(), MNAutodetectMailboxPropertiesClass) -#define MN_IS_AUTODETECT_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_autodetect_mailbox_properties_get_type ()) - -#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_autodetect_mailbox_properties_get_type(), MNAutodetectMailboxPropertiesClass) - -/* Private structure type */ -typedef struct _MNAutodetectMailboxPropertiesPrivate MNAutodetectMailboxPropertiesPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_AUTODETECT_MAILBOX_PROPERTIES__ -#define __TYPEDEF_MN_AUTODETECT_MAILBOX_PROPERTIES__ -typedef struct _MNAutodetectMailboxProperties MNAutodetectMailboxProperties; -#endif -struct _MNAutodetectMailboxProperties { - MNMailboxProperties __parent__; - /*< private >*/ - MNAutodetectMailboxPropertiesPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNAutodetectMailboxPropertiesClass MNAutodetectMailboxPropertiesClass; -struct _MNAutodetectMailboxPropertiesClass { - MNMailboxPropertiesClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_autodetect_mailbox_properties_get_type (void) G_GNUC_CONST; - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;}) -#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;}) -#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_CHECK_DELAY(arg) "default_check_delay", __extension__ ({gint *z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg) -#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name",(gchar **)(arg) -#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_CHECK_DELAY(arg) "default_check_delay",(gint *)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-base-mbox-mailbox-backend-private.h b/build/src/mn-base-mbox-mailbox-backend-private.h @@ -1,30 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_BASE_MBOX_MAILBOX_BACKEND_PRIVATE_H__ -#define __MN_BASE_MBOX_MAILBOX_BACKEND_PRIVATE_H__ - -#include "mn-base-mbox-mailbox-backend.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct _MNBaseMboxMailboxBackendPrivate { -#line 47 "src/mn-base-mbox-mailbox-backend.gob" - GnomeVFSURI * uri; -#line 48 "src/mn-base-mbox-mailbox-backend.gob" - GnomeVFSFileSize last_size; -#line 49 "src/mn-base-mbox-mailbox-backend.gob" - time_t last_mtime; -#line 50 "src/mn-base-mbox-mailbox-backend.gob" - time_t last_ctime; -#line 52 "src/mn-base-mbox-mailbox-backend.gob" - GMutex * mutex; -#line 24 "mn-base-mbox-mailbox-backend-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-base-mbox-mailbox-backend.c b/build/src/mn-base-mbox-mailbox-backend.c @@ -1,606 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include "mn-base-mbox-mailbox-backend.h" - -#include "mn-base-mbox-mailbox-backend-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 26 "src/mn-base-mbox-mailbox-backend.gob" - -#include <string.h> -#include <glib/gi18n.h> -#include <gtk/gtk.h> -#include "mn-mailbox-private.h" -#include "mn-reentrant-mailbox-private.h" -#include "mn-vfs-mailbox-backend-private.h" -#include "mn-message-mime.h" -#include "mn-gmime-stream-vfs.h" -#include "mn-util.h" -#include "mn-vfs.h" -#if WITH_MBOX -#include "mn-mbox-mailbox-backend.h" -#endif -#if WITH_MOZILLA -#include "mn-mozilla-mailbox-backend.h" -#endif - -#line 43 "mn-base-mbox-mailbox-backend.c" -/* self casting macros */ -#define SELF(x) MN_BASE_MBOX_MAILBOX_BACKEND(x) -#define SELF_CONST(x) MN_BASE_MBOX_MAILBOX_BACKEND_CONST(x) -#define IS_SELF(x) MN_IS_BASE_MBOX_MAILBOX_BACKEND(x) -#define TYPE_SELF MN_TYPE_BASE_MBOX_MAILBOX_BACKEND -#define SELF_CLASS(x) MN_BASE_MBOX_MAILBOX_BACKEND_CLASS(x) - -#define SELF_GET_CLASS(x) MN_BASE_MBOX_MAILBOX_BACKEND_GET_CLASS(x) - -/* self typedefs */ -typedef MNBaseMboxMailboxBackend Self; -typedef MNBaseMboxMailboxBackendClass SelfClass; - -/* here are local prototypes */ -#line 0 "src/mn-base-mbox-mailbox-backend.gob" -static void mn_base_mbox_mailbox_backend_init (MNBaseMboxMailboxBackend * o) G_GNUC_UNUSED; -#line 60 "mn-base-mbox-mailbox-backend.c" -#line 0 "src/mn-base-mbox-mailbox-backend.gob" -static void mn_base_mbox_mailbox_backend_class_init (MNBaseMboxMailboxBackendClass * c) G_GNUC_UNUSED; -#line 63 "mn-base-mbox-mailbox-backend.c" -#line 54 "src/mn-base-mbox-mailbox-backend.gob" -static gboolean ___1_mn_base_mbox_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED; -#line 66 "mn-base-mbox-mailbox-backend.c" -#line 104 "src/mn-base-mbox-mailbox-backend.gob" -static GType mn_base_mbox_mailbox_backend_get_mailbox_type (GnomeVFSURI * uri) G_GNUC_UNUSED; -#line 69 "mn-base-mbox-mailbox-backend.c" -#line 164 "src/mn-base-mbox-mailbox-backend.gob" -static GMimeParser * mn_base_mbox_mailbox_backend_parser_new (GnomeVFSURI * uri, GnomeVFSResult * result) G_GNUC_UNUSED; -#line 72 "mn-base-mbox-mailbox-backend.c" -#line 191 "src/mn-base-mbox-mailbox-backend.gob" -static void ___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend, int check_id) G_GNUC_UNUSED; -#line 75 "mn-base-mbox-mailbox-backend.c" -#line 353 "src/mn-base-mbox-mailbox-backend.gob" -static MNMessage * mn_base_mbox_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * self, GMimeMessage * mime_message) G_GNUC_UNUSED; -#line 78 "mn-base-mbox-mailbox-backend.c" -#line 356 "src/mn-base-mbox-mailbox-backend.gob" -static GnomeVFSURI * mn_base_mbox_mailbox_backend_get_uncompressed_uri (GnomeVFSURI * uri, GnomeVFSFileInfo * file_info) G_GNUC_UNUSED; -#line 81 "mn-base-mbox-mailbox-backend.c" - -/* pointer to the class of our parent */ -static MNVFSMailboxBackendClass *parent_class = NULL; - -/* Short form macros */ -#define self_get_mailbox_type mn_base_mbox_mailbox_backend_get_mailbox_type -#define self_parser_new mn_base_mbox_mailbox_backend_parser_new -#define self_get_new_message mn_base_mbox_mailbox_backend_get_new_message -#define self_get_uncompressed_uri mn_base_mbox_mailbox_backend_get_uncompressed_uri -GType -mn_base_mbox_mailbox_backend_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNBaseMboxMailboxBackendClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_base_mbox_mailbox_backend_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNBaseMboxMailboxBackend), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_base_mbox_mailbox_backend_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_VFS_MAILBOX_BACKEND, "MNBaseMboxMailboxBackend", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNBaseMboxMailboxBackend *)g_object_new(mn_base_mbox_mailbox_backend_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNBaseMboxMailboxBackend * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNBaseMboxMailboxBackend * -GET_NEW_VARG (const char *first, ...) -{ - MNBaseMboxMailboxBackend *ret; - va_list ap; - va_start (ap, first); - ret = (MNBaseMboxMailboxBackend *)g_object_new_valist (mn_base_mbox_mailbox_backend_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___dispose (GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::dispose" - MNBaseMboxMailboxBackend *self G_GNUC_UNUSED = MN_BASE_MBOX_MAILBOX_BACKEND (obj_self); - if (G_OBJECT_CLASS (parent_class)->dispose) \ - (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self); -#line 47 "src/mn-base-mbox-mailbox-backend.gob" - if(self->_priv->uri) { gnome_vfs_uri_unref ((gpointer) self->_priv->uri); self->_priv->uri = NULL; } -#line 143 "mn-base-mbox-mailbox-backend.c" -} -#undef __GOB_FUNCTION__ - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::finalize" - MNBaseMboxMailboxBackend *self G_GNUC_UNUSED = MN_BASE_MBOX_MAILBOX_BACKEND (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 52 "src/mn-base-mbox-mailbox-backend.gob" - if(self->_priv->mutex) { g_mutex_free ((gpointer) self->_priv->mutex); self->_priv->mutex = NULL; } -#line 158 "mn-base-mbox-mailbox-backend.c" -} -#undef __GOB_FUNCTION__ - -static void -mn_base_mbox_mailbox_backend_init (MNBaseMboxMailboxBackend * o G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::init" - o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_BASE_MBOX_MAILBOX_BACKEND,MNBaseMboxMailboxBackendPrivate); -#line 52 "src/mn-base-mbox-mailbox-backend.gob" - o->_priv->mutex = g_mutex_new(); -#line 169 "mn-base-mbox-mailbox-backend.c" -} -#undef __GOB_FUNCTION__ -static void -mn_base_mbox_mailbox_backend_class_init (MNBaseMboxMailboxBackendClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c; - MNVFSMailboxBackendClass *mn_vfs_mailbox_backend_class = (MNVFSMailboxBackendClass *)c; - - g_type_class_add_private(c,sizeof(MNBaseMboxMailboxBackendPrivate)); - - parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX_BACKEND); - -#line 54 "src/mn-base-mbox-mailbox-backend.gob" - mn_vfs_mailbox_backend_class->is = ___1_mn_base_mbox_mailbox_backend_is; -#line 191 "src/mn-base-mbox-mailbox-backend.gob" - mn_vfs_mailbox_backend_class->check = ___4_mn_base_mbox_mailbox_backend_check; -#line 187 "mn-base-mbox-mailbox-backend.c" - c->get_new_message = NULL; - g_object_class->dispose = ___dispose; - g_object_class->finalize = ___finalize; -} -#undef __GOB_FUNCTION__ - - - -#line 54 "src/mn-base-mbox-mailbox-backend.gob" -static gboolean -___1_mn_base_mbox_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) -#line 199 "mn-base-mbox-mailbox-backend.c" -#define PARENT_HANDLER(___dummy,___class,___mailbox) \ - ((MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)? \ - (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)(___dummy,___class,___mailbox): \ - ((gboolean )0)) -{ -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::is" -{ -#line 58 "src/mn-base-mbox-mailbox-backend.gob" - - gboolean is = FALSE; - GnomeVFSURI *uri; - GnomeVFSFileInfo *file_info; - - uri = gnome_vfs_uri_ref(mailbox->vfs_uri); - file_info = gnome_vfs_file_info_new(); - - if (gnome_vfs_get_file_info_uri(uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS | GNOME_VFS_FILE_INFO_GET_MIME_TYPE) == GNOME_VFS_OK) - { - GnomeVFSURI *uncompressed_uri; - - /* handle a compressed mailbox */ - uncompressed_uri = self_get_uncompressed_uri(uri, file_info); - if (uncompressed_uri) - { - GnomeVFSFileInfo *uncompressed_file_info; - - uncompressed_file_info = gnome_vfs_file_info_new(); - if (gnome_vfs_get_file_info_uri(uncompressed_uri, uncompressed_file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS) == GNOME_VFS_OK) - { - gnome_vfs_file_info_unref(file_info); - file_info = uncompressed_file_info; - - gnome_vfs_uri_unref(uri); - uri = uncompressed_uri; - } - else - { - gnome_vfs_file_info_unref(uncompressed_file_info); - gnome_vfs_uri_unref(uncompressed_uri); - } - } - - if ((file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE) != 0 - && file_info->type == GNOME_VFS_FILE_TYPE_REGULAR - && self_get_mailbox_type(uri) == G_TYPE_FROM_CLASS(class)) - is = TRUE; - } - - gnome_vfs_uri_unref(uri); - gnome_vfs_file_info_unref(file_info); - - return is; - }} -#line 253 "mn-base-mbox-mailbox-backend.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 104 "src/mn-base-mbox-mailbox-backend.gob" -static GType -mn_base_mbox_mailbox_backend_get_mailbox_type (GnomeVFSURI * uri) -{ -#line 261 "mn-base-mbox-mailbox-backend.c" -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::get_mailbox_type" -#line 104 "src/mn-base-mbox-mailbox-backend.gob" - g_return_val_if_fail (uri != NULL, (GType )0); -#line 265 "mn-base-mbox-mailbox-backend.c" -{ -#line 106 "src/mn-base-mbox-mailbox-backend.gob" - - GMimeParser *parser; - GType type = 0; - - parser = self_parser_new(uri, NULL); - if (parser) - { - if (g_mime_parser_eos(parser)) - /* - * The file is empty. For now, treat it as a mbox mailbox - * or, if mbox support was not compiled in, as a Mozilla - * mailbox. Whenever the file grows, it will be checked - * again and at that point we will decide whether it is a - * mbox mailbox, a Mozilla mailbox or another type of file. - */ - { -#if WITH_MBOX - type = MN_TYPE_MBOX_MAILBOX_BACKEND; -#elif WITH_MOZILLA - type = MN_TYPE_MOZILLA_MAILBOX_BACKEND; -#endif - } - else - { - /* - * The file is not empty. Decide whether it is a Mozilla - * mailbox or a mbox mailbox by checking if the first - * message has a X-Mozilla-Status header. If the first - * message cannot be parsed, then it is neither a Mozilla - * mailbox nor a mbox mailbox. - */ - - GMimeMessage *mime_message; - - mime_message = g_mime_parser_construct_message(parser); - if (mime_message) - { - if (g_mime_message_get_header(mime_message, "X-Mozilla-Status")) - { -#if WITH_MOZILLA - type = MN_TYPE_MOZILLA_MAILBOX_BACKEND; -#endif - } - else - { -#if WITH_MBOX - type = MN_TYPE_MBOX_MAILBOX_BACKEND; -#endif - } - g_object_unref(mime_message); - } - } - g_object_unref(parser); - } - - return type; - }} -#line 325 "mn-base-mbox-mailbox-backend.c" -#undef __GOB_FUNCTION__ - -#line 164 "src/mn-base-mbox-mailbox-backend.gob" -static GMimeParser * -mn_base_mbox_mailbox_backend_parser_new (GnomeVFSURI * uri, GnomeVFSResult * result) -{ -#line 332 "mn-base-mbox-mailbox-backend.c" -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::parser_new" -#line 164 "src/mn-base-mbox-mailbox-backend.gob" - g_return_val_if_fail (uri != NULL, (GMimeParser * )0); -#line 336 "mn-base-mbox-mailbox-backend.c" -{ -#line 166 "src/mn-base-mbox-mailbox-backend.gob" - - GnomeVFSResult _result; - GnomeVFSHandle *handle; - GMimeParser *parser = NULL; - - _result = gnome_vfs_open_uri(&handle, uri, GNOME_VFS_OPEN_READ); - if (_result == GNOME_VFS_OK) - { - GMimeStream *stream; - - stream = mn_gmime_stream_vfs_new(handle, uri, &_result); - if (stream) - { - parser = g_mime_parser_new_with_stream(stream); - g_object_unref(stream); - g_mime_parser_set_scan_from(parser, TRUE); - } - } - - if (result) - *result = _result; - - return parser; - }} -#line 363 "mn-base-mbox-mailbox-backend.c" -#undef __GOB_FUNCTION__ - -#line 191 "src/mn-base-mbox-mailbox-backend.gob" -static void -___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, int check_id) -#line 369 "mn-base-mbox-mailbox-backend.c" -#define PARENT_HANDLER(___backend,___check_id) \ - { if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check) \ - (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check)(___backend,___check_id); } -{ -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::check" -{ -#line 193 "src/mn-base-mbox-mailbox-backend.gob" - - Self *self = SELF(backend); - gboolean polled; - GMimeParser *parser; - GnomeVFSResult result; - gboolean uri_set; - - mn_vfs_mailbox_backend_monitor(backend, check_id, backend->mailbox->uri, GNOME_VFS_MONITOR_FILE); - - if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id)) - return; - - /* the poll property is protected by the GDK lock */ - GDK_THREADS_ENTER(); - - polled = mn_mailbox_get_poll(MN_MAILBOX(backend->mailbox)); - - gdk_flush(); - GDK_THREADS_LEAVE(); - - if (polled) - { - GnomeVFSFileInfo *file_info; - gboolean check; - - /* - * We are here because the mailbox has to be polled; only - * check it if necessary. - */ - - file_info = gnome_vfs_file_info_new(); - result = gnome_vfs_get_file_info_uri(backend->mailbox->vfs_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS); - - g_mutex_lock(selfp->mutex); - - if (result == GNOME_VFS_OK - && (file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) != 0 - && (file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MTIME) != 0 - && file_info->size == selfp->last_size - && file_info->mtime == selfp->last_mtime) - { - if ((file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_CTIME) != 0) - check = file_info->ctime != selfp->last_ctime; - else - /* - * The ctime is often missing for remote mailboxes; - * since anyway the size and mtime do not have changed, - * we do not check the mailbox. - */ - check = FALSE; - } - else - check = TRUE; - - if (check) - { - selfp->last_size = file_info->size; - selfp->last_mtime = file_info->mtime; - selfp->last_ctime = file_info->ctime; - - if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id)) - check = FALSE; - } - - g_mutex_unlock(selfp->mutex); - - gnome_vfs_file_info_unref(file_info); - - if (! check) - return; - } - - g_mutex_lock(selfp->mutex); - uri_set = selfp->uri != NULL; - g_mutex_unlock(selfp->mutex); - - if (! uri_set) - { - GnomeVFSFileInfo *file_info; - GnomeVFSURI *uri; - gboolean aborted; - - file_info = gnome_vfs_file_info_new(); - if (gnome_vfs_get_file_info_uri(backend->mailbox->vfs_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS | GNOME_VFS_FILE_INFO_GET_MIME_TYPE) == GNOME_VFS_OK) - uri = self_get_uncompressed_uri(backend->mailbox->vfs_uri, file_info); - gnome_vfs_file_info_unref(file_info); - - if (! uri) - uri = gnome_vfs_uri_ref(backend->mailbox->vfs_uri); - - g_mutex_lock(selfp->mutex); - - if (! selfp->uri) - { - selfp->uri = uri; - uri = NULL; - } - - aborted = mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id); - - g_mutex_unlock(selfp->mutex); - - if (uri) - gnome_vfs_uri_unref(uri); - - if (aborted) - return; - } - - parser = self_parser_new(selfp->uri, &result); - if (parser) - { - GSList *messages = NULL; - - while (! g_mime_parser_eos(parser)) - { - GMimeMessage *mime_message; - - if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id)) - break; - - mime_message = g_mime_parser_construct_message(parser); - if (mime_message) - { - MNMessage *message; - - message = self_get_new_message(self, mime_message); - g_object_unref(mime_message); - - if (message) - messages = g_slist_prepend(messages, message); - } - } - - g_object_unref(parser); - - GDK_THREADS_ENTER(); - - if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id)) - mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages); - - mn_g_object_slist_free(messages); - - gdk_flush(); - GDK_THREADS_LEAVE(); - - return; /* success */ - } - - if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id)) - { - GDK_THREADS_ENTER(); - - mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open mailbox: %s"), gnome_vfs_result_to_string(result)); - - gdk_flush(); - GDK_THREADS_LEAVE(); - } - }} -#line 536 "mn-base-mbox-mailbox-backend.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 353 "src/mn-base-mbox-mailbox-backend.gob" -static MNMessage * -mn_base_mbox_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * self, GMimeMessage * mime_message) -{ -#line 544 "mn-base-mbox-mailbox-backend.c" - MNBaseMboxMailboxBackendClass *klass; -#line 353 "src/mn-base-mbox-mailbox-backend.gob" - g_return_val_if_fail (self != NULL, (MNMessage * )0); -#line 353 "src/mn-base-mbox-mailbox-backend.gob" - g_return_val_if_fail (MN_IS_BASE_MBOX_MAILBOX_BACKEND (self), (MNMessage * )0); -#line 353 "src/mn-base-mbox-mailbox-backend.gob" - g_return_val_if_fail (mime_message != NULL, (MNMessage * )0); -#line 353 "src/mn-base-mbox-mailbox-backend.gob" - g_return_val_if_fail (GMIME_IS_MESSAGE (mime_message), (MNMessage * )0); -#line 554 "mn-base-mbox-mailbox-backend.c" - klass = MN_BASE_MBOX_MAILBOX_BACKEND_GET_CLASS(self); - - if(klass->get_new_message) - return (*klass->get_new_message)(self,mime_message); - else - return (MNMessage * )(0); -} - -#line 356 "src/mn-base-mbox-mailbox-backend.gob" -static GnomeVFSURI * -mn_base_mbox_mailbox_backend_get_uncompressed_uri (GnomeVFSURI * uri, GnomeVFSFileInfo * file_info) -{ -#line 567 "mn-base-mbox-mailbox-backend.c" -#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::get_uncompressed_uri" -#line 356 "src/mn-base-mbox-mailbox-backend.gob" - g_return_val_if_fail (uri != NULL, (GnomeVFSURI * )0); -#line 356 "src/mn-base-mbox-mailbox-backend.gob" - g_return_val_if_fail (file_info != NULL, (GnomeVFSURI * )0); -#line 573 "mn-base-mbox-mailbox-backend.c" -{ -#line 359 "src/mn-base-mbox-mailbox-backend.gob" - - if ((file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) != 0 && file_info->mime_type) - { - /* compression methods supported by GnomeVFS */ - static const struct - { - const char *mime_type; - const char *method; - } compressions[] = { - { "application/x-gzip", "gzip" }, - { "application/x-bzip", "bzip2" } - }; - int i; - - for (i = 0; i < G_N_ELEMENTS(compressions); i++) - if (! strcmp(file_info->mime_type, compressions[i].mime_type)) - { - char *str; - GnomeVFSURI *uncompressed_uri; - - str = g_strdup_printf("%s%s:/", GNOME_VFS_URI_MAGIC_STR, compressions[i].method); - uncompressed_uri = gnome_vfs_uri_append_string(uri, str); - g_free(str); - - return uncompressed_uri; - } - } - - return NULL; - }} -#line 606 "mn-base-mbox-mailbox-backend.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-base-mbox-mailbox-backend.gob.stamp b/build/src/mn-base-mbox-mailbox-backend.gob.stamp diff --git a/build/src/mn-base-mbox-mailbox-backend.h b/build/src/mn-base-mbox-mailbox-backend.h @@ -1,65 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gmime/gmime.h> -#include "mn-vfs-mailbox-backend.h" -#include "mn-message.h" - -#ifndef __MN_BASE_MBOX_MAILBOX_BACKEND_H__ -#define __MN_BASE_MBOX_MAILBOX_BACKEND_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_BASE_MBOX_MAILBOX_BACKEND (mn_base_mbox_mailbox_backend_get_type()) -#define MN_BASE_MBOX_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_base_mbox_mailbox_backend_get_type(), MNBaseMboxMailboxBackend) -#define MN_BASE_MBOX_MAILBOX_BACKEND_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_base_mbox_mailbox_backend_get_type(), MNBaseMboxMailboxBackend const) -#define MN_BASE_MBOX_MAILBOX_BACKEND_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_base_mbox_mailbox_backend_get_type(), MNBaseMboxMailboxBackendClass) -#define MN_IS_BASE_MBOX_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_base_mbox_mailbox_backend_get_type ()) - -#define MN_BASE_MBOX_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_base_mbox_mailbox_backend_get_type(), MNBaseMboxMailboxBackendClass) - -/* Private structure type */ -typedef struct _MNBaseMboxMailboxBackendPrivate MNBaseMboxMailboxBackendPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_BASE_MBOX_MAILBOX_BACKEND__ -#define __TYPEDEF_MN_BASE_MBOX_MAILBOX_BACKEND__ -typedef struct _MNBaseMboxMailboxBackend MNBaseMboxMailboxBackend; -#endif -struct _MNBaseMboxMailboxBackend { - MNVFSMailboxBackend __parent__; - /*< private >*/ - MNBaseMboxMailboxBackendPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNBaseMboxMailboxBackendClass MNBaseMboxMailboxBackendClass; -struct _MNBaseMboxMailboxBackendClass { - MNVFSMailboxBackendClass __parent__; - MNMessage * (* get_new_message) (MNBaseMboxMailboxBackend * self, GMimeMessage * mime_message); -}; - - -/* - * Public methods - */ -GType mn_base_mbox_mailbox_backend_get_type (void) G_GNUC_CONST; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-compact-message-view-private.h b/build/src/mn-compact-message-view-private.h @@ -1,17 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_COMPACT_MESSAGE_VIEW_PRIVATE_H__ -#define __MN_COMPACT_MESSAGE_VIEW_PRIVATE_H__ - -#include "mn-compact-message-view.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-compact-message-view.c b/build/src/mn-compact-message-view.c @@ -1,249 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-compact-message-view.h" - -#include "mn-compact-message-view-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 24 "src/mn-compact-message-view.gob" - -#include <glib/gi18n.h> -#include "mn-message-view-private.h" -#include "mn-message.h" -#include "mn-util.h" -#include "mn-text-table.h" - -#line 34 "mn-compact-message-view.c" -/* self casting macros */ -#define SELF(x) MN_COMPACT_MESSAGE_VIEW(x) -#define SELF_CONST(x) MN_COMPACT_MESSAGE_VIEW_CONST(x) -#define IS_SELF(x) MN_IS_COMPACT_MESSAGE_VIEW(x) -#define TYPE_SELF MN_TYPE_COMPACT_MESSAGE_VIEW -#define SELF_CLASS(x) MN_COMPACT_MESSAGE_VIEW_CLASS(x) - -#define SELF_GET_CLASS(x) MN_COMPACT_MESSAGE_VIEW_GET_CLASS(x) - -/* self typedefs */ -typedef MNCompactMessageView Self; -typedef MNCompactMessageViewClass SelfClass; - -/* here are local prototypes */ -#line 0 "src/mn-compact-message-view.gob" -static void mn_compact_message_view_init (MNCompactMessageView * o) G_GNUC_UNUSED; -#line 51 "mn-compact-message-view.c" -#line 0 "src/mn-compact-message-view.gob" -static void mn_compact_message_view_class_init (MNCompactMessageViewClass * c) G_GNUC_UNUSED; -#line 54 "mn-compact-message-view.c" -#line 34 "src/mn-compact-message-view.gob" -static void ___1_mn_compact_message_view_append_header (MNMessageView * view) G_GNUC_UNUSED; -#line 57 "mn-compact-message-view.c" -#line 46 "src/mn-compact-message-view.gob" -static void ___2_mn_compact_message_view_append_message (MNMessageView * view, MNMessage * message, time_t now) G_GNUC_UNUSED; -#line 60 "mn-compact-message-view.c" -#line 61 "src/mn-compact-message-view.gob" -static void mn_compact_message_view_append_header (MNCompactMessageView * self, const char * name) G_GNUC_UNUSED; -#line 63 "mn-compact-message-view.c" -#line 71 "src/mn-compact-message-view.gob" -static void mn_compact_message_view_append_cell (MNCompactMessageView * self, const char * text) G_GNUC_UNUSED; -#line 66 "mn-compact-message-view.c" - -/* pointer to the class of our parent */ -static MNMessageViewClass *parent_class = NULL; - -/* Short form macros */ -#define self_append_header mn_compact_message_view_append_header -#define self_append_cell mn_compact_message_view_append_cell -#define self_new mn_compact_message_view_new -GType -mn_compact_message_view_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNCompactMessageViewClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_compact_message_view_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNCompactMessageView), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_compact_message_view_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_MESSAGE_VIEW, "MNCompactMessageView", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNCompactMessageView *)g_object_new(mn_compact_message_view_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNCompactMessageView * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNCompactMessageView * -GET_NEW_VARG (const char *first, ...) -{ - MNCompactMessageView *ret; - va_list ap; - va_start (ap, first); - ret = (MNCompactMessageView *)g_object_new_valist (mn_compact_message_view_get_type (), first, ap); - va_end (ap); - return ret; -} - -static void -mn_compact_message_view_init (MNCompactMessageView * o G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Compact:Message:View::init" -} -#undef __GOB_FUNCTION__ -static void -mn_compact_message_view_class_init (MNCompactMessageViewClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Compact:Message:View::class_init" - MNMessageViewClass *mn_message_view_class = (MNMessageViewClass *)c; - - parent_class = g_type_class_ref (MN_TYPE_MESSAGE_VIEW); - -#line 34 "src/mn-compact-message-view.gob" - mn_message_view_class->append_header = ___1_mn_compact_message_view_append_header; -#line 46 "src/mn-compact-message-view.gob" - mn_message_view_class->append_message = ___2_mn_compact_message_view_append_message; -#line 135 "mn-compact-message-view.c" -} -#undef __GOB_FUNCTION__ - - - -#line 34 "src/mn-compact-message-view.gob" -static void -___1_mn_compact_message_view_append_header (MNMessageView * view G_GNUC_UNUSED) -#line 144 "mn-compact-message-view.c" -#define PARENT_HANDLER(___view) \ - { if(MN_MESSAGE_VIEW_CLASS(parent_class)->append_header) \ - (* MN_MESSAGE_VIEW_CLASS(parent_class)->append_header)(___view); } -{ -#define __GOB_FUNCTION__ "MN:Compact:Message:View::append_header" -{ -#line 36 "src/mn-compact-message-view.gob" - - Self *self = SELF(view); - - self_append_header(self, _("Mailbox")); - self_append_header(self, _("From")); - self_append_header(self, _("Subject")); - self_append_header(self, _("Sent")); - mn_text_table_line_break(MN_TEXT_TABLE(self)); - }} -#line 161 "mn-compact-message-view.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 46 "src/mn-compact-message-view.gob" -static void -___2_mn_compact_message_view_append_message (MNMessageView * view G_GNUC_UNUSED, MNMessage * message, time_t now) -#line 168 "mn-compact-message-view.c" -#define PARENT_HANDLER(___view,___message,___now) \ - { if(MN_MESSAGE_VIEW_CLASS(parent_class)->append_message) \ - (* MN_MESSAGE_VIEW_CLASS(parent_class)->append_message)(___view,___message,___now); } -{ -#define __GOB_FUNCTION__ "MN:Compact:Message:View::append_message" -{ -#line 48 "src/mn-compact-message-view.gob" - - Self *self = SELF(view); - - self_append_cell(self, message->mailbox->runtime_name); - self_append_cell(self, message->from); - self_append_cell(self, message->subject); - - if (message->sent_time > 0) - mn_message_view_append_past_time_cell(MN_MESSAGE_VIEW(self), message->sent_time, now); - - mn_text_table_line_break(MN_TEXT_TABLE(self)); - }} -#line 188 "mn-compact-message-view.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 61 "src/mn-compact-message-view.gob" -static void -mn_compact_message_view_append_header (MNCompactMessageView * self, const char * name) -{ -#line 196 "mn-compact-message-view.c" -#define __GOB_FUNCTION__ "MN:Compact:Message:View::append_header" -#line 61 "src/mn-compact-message-view.gob" - g_return_if_fail (self != NULL); -#line 61 "src/mn-compact-message-view.gob" - g_return_if_fail (MN_IS_COMPACT_MESSAGE_VIEW (self)); -#line 61 "src/mn-compact-message-view.gob" - g_return_if_fail (name != NULL); -#line 204 "mn-compact-message-view.c" -{ -#line 63 "src/mn-compact-message-view.gob" - - char *markup; - - markup = g_markup_printf_escaped("<span weight=\"bold\">%s</span>", name); - mn_text_table_append_text_cell_from_markup(MN_TEXT_TABLE(self), markup); - g_free(markup); - }} -#line 214 "mn-compact-message-view.c" -#undef __GOB_FUNCTION__ - -#line 71 "src/mn-compact-message-view.gob" -static void -mn_compact_message_view_append_cell (MNCompactMessageView * self, const char * text) -{ -#line 221 "mn-compact-message-view.c" -#define __GOB_FUNCTION__ "MN:Compact:Message:View::append_cell" -#line 71 "src/mn-compact-message-view.gob" - g_return_if_fail (self != NULL); -#line 71 "src/mn-compact-message-view.gob" - g_return_if_fail (MN_IS_COMPACT_MESSAGE_VIEW (self)); -#line 71 "src/mn-compact-message-view.gob" - g_return_if_fail (text != NULL); -#line 229 "mn-compact-message-view.c" -{ -#line 73 "src/mn-compact-message-view.gob" - - mn_text_table_append_text_cell(MN_TEXT_TABLE(self), text); - }} -#line 235 "mn-compact-message-view.c" -#undef __GOB_FUNCTION__ - -#line 77 "src/mn-compact-message-view.gob" -GtkWidget * -mn_compact_message_view_new (void) -{ -#line 242 "mn-compact-message-view.c" -#define __GOB_FUNCTION__ "MN:Compact:Message:View::new" -{ -#line 79 "src/mn-compact-message-view.gob" - - return GTK_WIDGET(GET_NEW); - }} -#line 249 "mn-compact-message-view.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-compact-message-view.gob.stamp b/build/src/mn-compact-message-view.gob.stamp diff --git a/build/src/mn-compact-message-view.h b/build/src/mn-compact-message-view.h @@ -1,60 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include "mn-message-view.h" - -#ifndef __MN_COMPACT_MESSAGE_VIEW_H__ -#define __MN_COMPACT_MESSAGE_VIEW_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_COMPACT_MESSAGE_VIEW (mn_compact_message_view_get_type()) -#define MN_COMPACT_MESSAGE_VIEW(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_compact_message_view_get_type(), MNCompactMessageView) -#define MN_COMPACT_MESSAGE_VIEW_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_compact_message_view_get_type(), MNCompactMessageView const) -#define MN_COMPACT_MESSAGE_VIEW_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_compact_message_view_get_type(), MNCompactMessageViewClass) -#define MN_IS_COMPACT_MESSAGE_VIEW(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_compact_message_view_get_type ()) - -#define MN_COMPACT_MESSAGE_VIEW_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_compact_message_view_get_type(), MNCompactMessageViewClass) - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_COMPACT_MESSAGE_VIEW__ -#define __TYPEDEF_MN_COMPACT_MESSAGE_VIEW__ -typedef struct _MNCompactMessageView MNCompactMessageView; -#endif -struct _MNCompactMessageView { - MNMessageView __parent__; -}; - -/* - * Class definition - */ -typedef struct _MNCompactMessageViewClass MNCompactMessageViewClass; -struct _MNCompactMessageViewClass { - MNMessageViewClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_compact_message_view_get_type (void) G_GNUC_CONST; -#line 77 "src/mn-compact-message-view.gob" -GtkWidget * mn_compact_message_view_new (void); -#line 55 "mn-compact-message-view.h" - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-custom-vfs-mailbox-private.h b/build/src/mn-custom-vfs-mailbox-private.h @@ -1,17 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_CUSTOM_VFS_MAILBOX_PRIVATE_H__ -#define __MN_CUSTOM_VFS_MAILBOX_PRIVATE_H__ - -#include "mn-custom-vfs-mailbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-custom-vfs-mailbox.c b/build/src/mn-custom-vfs-mailbox.c @@ -1,314 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-custom-vfs-mailbox.h" - -#include "mn-custom-vfs-mailbox-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 24 "src/mn-custom-vfs-mailbox.gob" - -#include <glib/gi18n.h> -#include "mn-mailbox-private.h" - -#line 31 "mn-custom-vfs-mailbox.c" -/* self casting macros */ -#define SELF(x) MN_CUSTOM_VFS_MAILBOX(x) -#define SELF_CONST(x) MN_CUSTOM_VFS_MAILBOX_CONST(x) -#define IS_SELF(x) MN_IS_CUSTOM_VFS_MAILBOX(x) -#define TYPE_SELF MN_TYPE_CUSTOM_VFS_MAILBOX -#define SELF_CLASS(x) MN_CUSTOM_VFS_MAILBOX_CLASS(x) - -#define SELF_GET_CLASS(x) MN_CUSTOM_VFS_MAILBOX_GET_CLASS(x) - -/* self typedefs */ -typedef MNCustomVFSMailbox Self; -typedef MNCustomVFSMailboxClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "src/mn-custom-vfs-mailbox.gob" -static void mn_custom_vfs_mailbox_init (MNCustomVFSMailbox * o) G_GNUC_UNUSED; -#line 50 "mn-custom-vfs-mailbox.c" -#line 34 "src/mn-custom-vfs-mailbox.gob" -static void mn_custom_vfs_mailbox_class_init (MNCustomVFSMailboxClass * class) G_GNUC_UNUSED; -#line 53 "mn-custom-vfs-mailbox.c" -#line 39 "src/mn-custom-vfs-mailbox.gob" -static void ___2_mn_custom_vfs_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED; -#line 56 "mn-custom-vfs-mailbox.c" -#line 47 "src/mn-custom-vfs-mailbox.gob" -static MNMailbox * ___3_mn_custom_vfs_mailbox_parse_uri (MNMailbox * dummy, const char * uri) G_GNUC_UNUSED; -#line 59 "mn-custom-vfs-mailbox.c" -#line 63 "src/mn-custom-vfs-mailbox.gob" -static void ___4_mn_custom_vfs_mailbox_check (MNMailbox * mailbox) G_GNUC_UNUSED; -#line 62 "mn-custom-vfs-mailbox.c" - -enum { - PROP_0, - PROP_URI -}; - -/* pointer to the class of our parent */ -static MNVFSMailboxClass *parent_class = NULL; - -GType -mn_custom_vfs_mailbox_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNCustomVFSMailboxClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_custom_vfs_mailbox_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNCustomVFSMailbox), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_custom_vfs_mailbox_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_VFS_MAILBOX, "MNCustomVFSMailbox", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNCustomVFSMailbox *)g_object_new(mn_custom_vfs_mailbox_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNCustomVFSMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNCustomVFSMailbox * -GET_NEW_VARG (const char *first, ...) -{ - MNCustomVFSMailbox *ret; - va_list ap; - va_start (ap, first); - ret = (MNCustomVFSMailbox *)g_object_new_valist (mn_custom_vfs_mailbox_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::finalize" - MNCustomVFSMailbox *self G_GNUC_UNUSED = MN_CUSTOM_VFS_MAILBOX (obj_self); - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 31 "src/mn-custom-vfs-mailbox.gob" - if(self->uri) { g_free ((gpointer) self->uri); self->uri = NULL; } -#line 124 "mn-custom-vfs-mailbox.c" -} -#undef __GOB_FUNCTION__ - -static void -mn_custom_vfs_mailbox_init (MNCustomVFSMailbox * o G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::init" -} -#undef __GOB_FUNCTION__ -#line 34 "src/mn-custom-vfs-mailbox.gob" -static void -mn_custom_vfs_mailbox_class_init (MNCustomVFSMailboxClass * class G_GNUC_UNUSED) -{ -#line 138 "mn-custom-vfs-mailbox.c" -#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)class; - - parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX); - -#line 39 "src/mn-custom-vfs-mailbox.gob" - mn_mailbox_class->seal = ___2_mn_custom_vfs_mailbox_seal; -#line 47 "src/mn-custom-vfs-mailbox.gob" - mn_mailbox_class->parse_uri = ___3_mn_custom_vfs_mailbox_parse_uri; -#line 63 "src/mn-custom-vfs-mailbox.gob" - mn_mailbox_class->check = ___4_mn_custom_vfs_mailbox_check; -#line 151 "mn-custom-vfs-mailbox.c" - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_string - ("uri" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE)); - g_object_class_install_property (g_object_class, - PROP_URI, - param_spec); - } - { -#line 35 "src/mn-custom-vfs-mailbox.gob" - - MN_MAILBOX_CLASS(class)->type = "custom-vfs"; - -#line 173 "mn-custom-vfs-mailbox.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::set_property" -{ - MNCustomVFSMailbox *self G_GNUC_UNUSED; - - self = MN_CUSTOM_VFS_MAILBOX (object); - - switch (property_id) { - case PROP_URI: - { -#line 32 "src/mn-custom-vfs-mailbox.gob" -{ char *old = self->uri; self->uri = g_value_dup_string (VAL); g_free (old); } -#line 194 "mn-custom-vfs-mailbox.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::get_property" -{ - MNCustomVFSMailbox *self G_GNUC_UNUSED; - - self = MN_CUSTOM_VFS_MAILBOX (object); - - switch (property_id) { - case PROP_URI: - { -#line 32 "src/mn-custom-vfs-mailbox.gob" -g_value_set_string (VAL, self->uri); -#line 225 "mn-custom-vfs-mailbox.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - - -#line 39 "src/mn-custom-vfs-mailbox.gob" -static void -___2_mn_custom_vfs_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED) -#line 245 "mn-custom-vfs-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->seal) \ - (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::seal" -{ -#line 41 "src/mn-custom-vfs-mailbox.gob" - - MN_VFS_MAILBOX(mailbox)->uri = gnome_vfs_make_uri_canonical(SELF(mailbox)->uri); - - PARENT_HANDLER(mailbox); - }} -#line 258 "mn-custom-vfs-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 47 "src/mn-custom-vfs-mailbox.gob" -static MNMailbox * -___3_mn_custom_vfs_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * uri) -#line 265 "mn-custom-vfs-mailbox.c" -#define PARENT_HANDLER(___dummy,___uri) \ - ((MN_MAILBOX_CLASS(parent_class)->parse_uri)? \ - (* MN_MAILBOX_CLASS(parent_class)->parse_uri)(___dummy,___uri): \ - ((MNMailbox * )0)) -{ -#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::parse_uri" -{ -#line 49 "src/mn-custom-vfs-mailbox.gob" - - GnomeVFSURI *vfs_uri; - MNMailbox *mailbox = NULL; - - vfs_uri = gnome_vfs_uri_new(uri); - if (vfs_uri) - { - mailbox = mn_mailbox_new("custom-vfs", "uri", uri, NULL); - gnome_vfs_uri_unref(vfs_uri); - } - - return mailbox; - }} -#line 287 "mn-custom-vfs-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 63 "src/mn-custom-vfs-mailbox.gob" -static void -___4_mn_custom_vfs_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED) -#line 294 "mn-custom-vfs-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->check) \ - (* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::check" -{ -#line 65 "src/mn-custom-vfs-mailbox.gob" - - if (MN_VFS_MAILBOX(mailbox)->vfs_uri) - { - PARENT_HANDLER(mailbox); - } - else - { - mn_mailbox_set_error(mailbox, _("invalid location")); - mn_mailbox_set_poll(mailbox, FALSE); /* disable the mailbox */ - } - }} -#line 313 "mn-custom-vfs-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER diff --git a/build/src/mn-custom-vfs-mailbox.gob.stamp b/build/src/mn-custom-vfs-mailbox.gob.stamp diff --git a/build/src/mn-custom-vfs-mailbox.h b/build/src/mn-custom-vfs-mailbox.h @@ -1,71 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include "mn-vfs-mailbox.h" - -#ifndef __MN_CUSTOM_VFS_MAILBOX_H__ -#define __MN_CUSTOM_VFS_MAILBOX_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_CUSTOM_VFS_MAILBOX (mn_custom_vfs_mailbox_get_type()) -#define MN_CUSTOM_VFS_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_custom_vfs_mailbox_get_type(), MNCustomVFSMailbox) -#define MN_CUSTOM_VFS_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_custom_vfs_mailbox_get_type(), MNCustomVFSMailbox const) -#define MN_CUSTOM_VFS_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_custom_vfs_mailbox_get_type(), MNCustomVFSMailboxClass) -#define MN_IS_CUSTOM_VFS_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_custom_vfs_mailbox_get_type ()) - -#define MN_CUSTOM_VFS_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_custom_vfs_mailbox_get_type(), MNCustomVFSMailboxClass) - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_CUSTOM_VFS_MAILBOX__ -#define __TYPEDEF_MN_CUSTOM_VFS_MAILBOX__ -typedef struct _MNCustomVFSMailbox MNCustomVFSMailbox; -#endif -struct _MNCustomVFSMailbox { - MNVFSMailbox __parent__; - /*< public >*/ - char * uri; -}; - -/* - * Class definition - */ -typedef struct _MNCustomVFSMailboxClass MNCustomVFSMailboxClass; -struct _MNCustomVFSMailboxClass { - MNVFSMailboxClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_custom_vfs_mailbox_get_type (void) G_GNUC_CONST; - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_CUSTOM_VFS_MAILBOX_PROP_URI(arg) "uri", __extension__ ({gchar *z = (arg); z;}) -#define MN_CUSTOM_VFS_MAILBOX_GET_PROP_URI(arg) "uri", __extension__ ({gchar **z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_CUSTOM_VFS_MAILBOX_PROP_URI(arg) "uri",(gchar *)(arg) -#define MN_CUSTOM_VFS_MAILBOX_GET_PROP_URI(arg) "uri",(gchar **)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-dialog-private.h b/build/src/mn-dialog-private.h @@ -1,17 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_DIALOG_PRIVATE_H__ -#define __MN_DIALOG_PRIVATE_H__ - -#include "mn-dialog.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-dialog.c b/build/src/mn-dialog.c @@ -1,117 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-dialog.h" - -#include "mn-dialog-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ -/* self casting macros */ -#define SELF(x) MN_DIALOG(x) -#define SELF_CONST(x) MN_DIALOG_CONST(x) -#define IS_SELF(x) MN_IS_DIALOG(x) -#define TYPE_SELF MN_TYPE_DIALOG -#define SELF_CLASS(x) MN_DIALOG_CLASS(x) - -#define SELF_GET_CLASS(x) MN_DIALOG_GET_CLASS(x) - -/* self typedefs */ -typedef MNDialog Self; -typedef MNDialogClass SelfClass; - -/* here are local prototypes */ -#line 0 "src/mn-dialog.gob" -static void mn_dialog_class_init (MNDialogClass * c) G_GNUC_UNUSED; -#line 41 "mn-dialog.c" -#line 26 "src/mn-dialog.gob" -static void mn_dialog_init (MNDialog * self) G_GNUC_UNUSED; -#line 44 "mn-dialog.c" - -/* pointer to the class of our parent */ -static GtkDialogClass *parent_class = NULL; - -GType -mn_dialog_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNDialogClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_dialog_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNDialog), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_dialog_init, - NULL - }; - - type = g_type_register_static (GTK_TYPE_DIALOG, "MNDialog", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNDialog *)g_object_new(mn_dialog_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNDialog * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNDialog * -GET_NEW_VARG (const char *first, ...) -{ - MNDialog *ret; - va_list ap; - va_start (ap, first); - ret = (MNDialog *)g_object_new_valist (mn_dialog_get_type (), first, ap); - va_end (ap); - return ret; -} - -static void -mn_dialog_class_init (MNDialogClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Dialog::class_init" - - parent_class = g_type_class_ref (GTK_TYPE_DIALOG); - -} -#undef __GOB_FUNCTION__ -#line 26 "src/mn-dialog.gob" -static void -mn_dialog_init (MNDialog * self G_GNUC_UNUSED) -{ -#line 104 "mn-dialog.c" -#define __GOB_FUNCTION__ "MN:Dialog::init" - { -#line 27 "src/mn-dialog.gob" - - gtk_container_set_border_width(GTK_CONTAINER(self), 5); - gtk_dialog_set_has_separator(GTK_DIALOG(self), FALSE); - gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(self)->vbox), 2); - -#line 113 "mn-dialog.c" - } -} -#undef __GOB_FUNCTION__ - - diff --git a/build/src/mn-dialog.gob.stamp b/build/src/mn-dialog.gob.stamp diff --git a/build/src/mn-dialog.h b/build/src/mn-dialog.h @@ -1,57 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gtk/gtk.h> - -#ifndef __MN_DIALOG_H__ -#define __MN_DIALOG_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_DIALOG (mn_dialog_get_type()) -#define MN_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_dialog_get_type(), MNDialog) -#define MN_DIALOG_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_dialog_get_type(), MNDialog const) -#define MN_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_dialog_get_type(), MNDialogClass) -#define MN_IS_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_dialog_get_type ()) - -#define MN_DIALOG_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_dialog_get_type(), MNDialogClass) - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_DIALOG__ -#define __TYPEDEF_MN_DIALOG__ -typedef struct _MNDialog MNDialog; -#endif -struct _MNDialog { - GtkDialog __parent__; -}; - -/* - * Class definition - */ -typedef struct _MNDialogClass MNDialogClass; -struct _MNDialogClass { - GtkDialogClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_dialog_get_type (void) G_GNUC_CONST; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-client-private.h b/build/src/mn-evolution-client-private.h @@ -1,22 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#ifndef __MN_EVOLUTION_CLIENT_PRIVATE_H__ -#define __MN_EVOLUTION_CLIENT_PRIVATE_H__ - -#include "mn-evolution-client.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct _MNEvolutionClientPrivate { -#line 41 "src/mn-evolution-client.gob" - gboolean name_owner_signal_connected; -#line 16 "mn-evolution-client-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-client.c b/build/src/mn-evolution-client.c @@ -1,438 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 15 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-evolution-client.h" - -#include "mn-evolution-client-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 24 "src/mn-evolution-client.gob" - -#include "mn-shell.h" -#include "mn-evolution.h" -#include "mn-util.h" - -#line 32 "mn-evolution-client.c" -/* self casting macros */ -#define SELF(x) MN_EVOLUTION_CLIENT(x) -#define SELF_CONST(x) MN_EVOLUTION_CLIENT_CONST(x) -#define IS_SELF(x) MN_IS_EVOLUTION_CLIENT(x) -#define TYPE_SELF MN_TYPE_EVOLUTION_CLIENT -#define SELF_CLASS(x) MN_EVOLUTION_CLIENT_CLASS(x) - -#define SELF_GET_CLASS(x) MN_EVOLUTION_CLIENT_GET_CLASS(x) - -/* self typedefs */ -typedef MNEvolutionClient Self; -typedef MNEvolutionClientClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "src/mn-evolution-client.gob" -static void mn_evolution_client_class_init (MNEvolutionClientClass * c); -#line 51 "mn-evolution-client.c" -#line 43 "src/mn-evolution-client.gob" -static void mn_evolution_client_init (MNEvolutionClient * self); -#line 54 "mn-evolution-client.c" -#line 48 "src/mn-evolution-client.gob" -static void mn_evolution_client_connect_name_owner_signal (MNEvolutionClient * self); -#line 57 "mn-evolution-client.c" -#line 63 "src/mn-evolution-client.gob" -static void mn_evolution_client_disconnect_name_owner_signal (MNEvolutionClient * self); -#line 60 "mn-evolution-client.c" -#line 77 "src/mn-evolution-client.gob" -static void mn_evolution_client_connect (MNEvolutionClient * self); -#line 63 "mn-evolution-client.c" -#line 110 "src/mn-evolution-client.gob" -static void mn_evolution_client_name_owner_changed_h (DBusGProxy * proxy, const char * service_name, const char * old_owner, const char * new_owner, gpointer user_data); -#line 66 "mn-evolution-client.c" -#line 128 "src/mn-evolution-client.gob" -static void mn_evolution_client_proxy_destroy_h (DBusGProxy * proxy, gpointer user_data); -#line 69 "mn-evolution-client.c" - -enum { - PROP_0, - PROP_PROXY -}; - -/* pointer to the class of our parent */ -static GObjectClass *parent_class = NULL; - -/* Short form macros */ -#define self_get_proxy mn_evolution_client_get_proxy -#define self_set_proxy mn_evolution_client_set_proxy -#define self_connect_name_owner_signal mn_evolution_client_connect_name_owner_signal -#define self_disconnect_name_owner_signal mn_evolution_client_disconnect_name_owner_signal -#define self_connect mn_evolution_client_connect -#define self_name_owner_changed_h mn_evolution_client_name_owner_changed_h -#define self_proxy_destroy_h mn_evolution_client_proxy_destroy_h -#define self_get mn_evolution_client_get -GType -mn_evolution_client_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNEvolutionClientClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_evolution_client_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNEvolutionClient), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_evolution_client_init, - NULL - }; - - type = g_type_register_static (G_TYPE_OBJECT, "MNEvolutionClient", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNEvolutionClient *)g_object_new(mn_evolution_client_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNEvolutionClient * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNEvolutionClient * -GET_NEW_VARG (const char *first, ...) -{ - MNEvolutionClient *ret; - va_list ap; - va_start (ap, first); - ret = (MNEvolutionClient *)g_object_new_valist (mn_evolution_client_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Client::finalize" - MNEvolutionClient *self G_GNUC_UNUSED = MN_EVOLUTION_CLIENT (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -} -#undef __GOB_FUNCTION__ - -static void -mn_evolution_client_class_init (MNEvolutionClientClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Client::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c; - - g_type_class_add_private(c,sizeof(MNEvolutionClientPrivate)); - - parent_class = g_type_class_ref (G_TYPE_OBJECT); - - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_pointer - ("proxy" /* name */, - NULL /* nick */, - NULL /* blurb */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (g_object_class, - PROP_PROXY, - param_spec); - } -} -#undef __GOB_FUNCTION__ -#line 43 "src/mn-evolution-client.gob" -static void -mn_evolution_client_init (MNEvolutionClient * self G_GNUC_UNUSED) -{ -#line 173 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_EVOLUTION_CLIENT,MNEvolutionClientPrivate); - { -#line 44 "src/mn-evolution-client.gob" - - self_connect(self); - -#line 181 "mn-evolution-client.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Client::set_property" -{ - MNEvolutionClient *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_CLIENT (object); - - switch (property_id) { - case PROP_PROXY: - { -#line 39 "src/mn-evolution-client.gob" -self->proxy = g_value_get_pointer (VAL); -#line 202 "mn-evolution-client.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Client::get_property" -{ - MNEvolutionClient *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_CLIENT (object); - - switch (property_id) { - case PROP_PROXY: - { -#line 39 "src/mn-evolution-client.gob" -g_value_set_pointer (VAL, self->proxy); -#line 233 "mn-evolution-client.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - -#line 39 "src/mn-evolution-client.gob" -DBusGProxy * -mn_evolution_client_get_proxy (MNEvolutionClient * self) -{ -#line 253 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::get_proxy" -{ -#line 39 "src/mn-evolution-client.gob" - DBusGProxy* val; g_object_get (G_OBJECT (self), "proxy", &val, NULL); return val; -}} -#line 259 "mn-evolution-client.c" -#undef __GOB_FUNCTION__ - -#line 39 "src/mn-evolution-client.gob" -void -mn_evolution_client_set_proxy (MNEvolutionClient * self, DBusGProxy * val) -{ -#line 266 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::set_proxy" -{ -#line 39 "src/mn-evolution-client.gob" - g_object_set (G_OBJECT (self), "proxy", val, NULL); -}} -#line 272 "mn-evolution-client.c" -#undef __GOB_FUNCTION__ - - -#line 48 "src/mn-evolution-client.gob" -static void -mn_evolution_client_connect_name_owner_signal (MNEvolutionClient * self) -{ -#line 280 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::connect_name_owner_signal" -#line 48 "src/mn-evolution-client.gob" - g_return_if_fail (self != NULL); -#line 48 "src/mn-evolution-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_CLIENT (self)); -#line 286 "mn-evolution-client.c" -{ -#line 50 "src/mn-evolution-client.gob" - - if (selfp->name_owner_signal_connected) - return; - - dbus_g_proxy_connect_signal(mn_shell->session_bus_proxy, - "NameOwnerChanged", - G_CALLBACK(self_name_owner_changed_h), - self, - NULL); - - selfp->name_owner_signal_connected = TRUE; - }} -#line 301 "mn-evolution-client.c" -#undef __GOB_FUNCTION__ - -#line 63 "src/mn-evolution-client.gob" -static void -mn_evolution_client_disconnect_name_owner_signal (MNEvolutionClient * self) -{ -#line 308 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::disconnect_name_owner_signal" -#line 63 "src/mn-evolution-client.gob" - g_return_if_fail (self != NULL); -#line 63 "src/mn-evolution-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_CLIENT (self)); -#line 314 "mn-evolution-client.c" -{ -#line 65 "src/mn-evolution-client.gob" - - if (! selfp->name_owner_signal_connected) - return; - - dbus_g_proxy_disconnect_signal(mn_shell->session_bus_proxy, - "NameOwnerChanged", - G_CALLBACK(self_name_owner_changed_h), - self); - - selfp->name_owner_signal_connected = FALSE; - }} -#line 328 "mn-evolution-client.c" -#undef __GOB_FUNCTION__ - -#line 77 "src/mn-evolution-client.gob" -static void -mn_evolution_client_connect (MNEvolutionClient * self) -{ -#line 335 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::connect" -#line 77 "src/mn-evolution-client.gob" - g_return_if_fail (self != NULL); -#line 77 "src/mn-evolution-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_CLIENT (self)); -#line 341 "mn-evolution-client.c" -{ -#line 79 "src/mn-evolution-client.gob" - - DBusGProxy *proxy; - - g_return_if_fail(self->proxy == NULL); - - proxy = dbus_g_proxy_new_for_name_owner(mn_shell->session_bus, - MN_EVOLUTION_SERVER_SERVICE, - MN_EVOLUTION_SERVER_PATH, - MN_EVOLUTION_SERVER_INTERFACE, - NULL); - if (proxy) - { - self_disconnect_name_owner_signal(self); - - dbus_g_proxy_add_signal(proxy, - MN_EVOLUTION_SERVER_SIGNAL_FOLDER_CHANGED, - G_TYPE_STRING, /* uri */ - G_TYPE_INVALID); - dbus_g_proxy_add_signal(proxy, - MN_EVOLUTION_SERVER_SIGNAL_MESSAGE_READING, - G_TYPE_STRING, /* uri */ - G_TYPE_INVALID); - - g_signal_connect(proxy, "destroy", G_CALLBACK(self_proxy_destroy_h), self); - - self_set_proxy(self, proxy); - } - else - self_connect_name_owner_signal(self); - }} -#line 374 "mn-evolution-client.c" -#undef __GOB_FUNCTION__ - -#line 110 "src/mn-evolution-client.gob" -static void -mn_evolution_client_name_owner_changed_h (DBusGProxy * proxy, const char * service_name, const char * old_owner, const char * new_owner, gpointer user_data) -{ -#line 381 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::name_owner_changed_h" -{ -#line 116 "src/mn-evolution-client.gob" - - Self *self = user_data; - - /* this is a main loop callback */ - GDK_THREADS_ENTER(); - - if (! strcmp(service_name, MN_EVOLUTION_SERVER_SERVICE) && *new_owner) - self_connect(self); - - GDK_THREADS_LEAVE(); - }} -#line 396 "mn-evolution-client.c" -#undef __GOB_FUNCTION__ - -#line 128 "src/mn-evolution-client.gob" -static void -mn_evolution_client_proxy_destroy_h (DBusGProxy * proxy, gpointer user_data) -{ -#line 403 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::proxy_destroy_h" -{ -#line 130 "src/mn-evolution-client.gob" - - Self *self = user_data; - - /* this is a main loop callback */ - GDK_THREADS_ENTER(); - - self_set_proxy(self, NULL); - self_connect_name_owner_signal(self); - - GDK_THREADS_LEAVE(); - }} -#line 418 "mn-evolution-client.c" -#undef __GOB_FUNCTION__ - -#line 142 "src/mn-evolution-client.gob" -MNEvolutionClient * -mn_evolution_client_get (void) -{ -#line 425 "mn-evolution-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Client::get" -{ -#line 144 "src/mn-evolution-client.gob" - - static Self *self = NULL; - - /* does not need to be thread-safe */ - if (! self) - self = GET_NEW; - - return self; - }} -#line 438 "mn-evolution-client.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-evolution-client.gob.stamp b/build/src/mn-evolution-client.gob.stamp diff --git a/build/src/mn-evolution-client.h b/build/src/mn-evolution-client.h @@ -1,86 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <dbus/dbus-glib.h> - -#ifndef __MN_EVOLUTION_CLIENT_H__ -#define __MN_EVOLUTION_CLIENT_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_EVOLUTION_CLIENT (mn_evolution_client_get_type()) -#define MN_EVOLUTION_CLIENT(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_client_get_type(), MNEvolutionClient) -#define MN_EVOLUTION_CLIENT_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_client_get_type(), MNEvolutionClient const) -#define MN_EVOLUTION_CLIENT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_evolution_client_get_type(), MNEvolutionClientClass) -#define MN_IS_EVOLUTION_CLIENT(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_evolution_client_get_type ()) - -#define MN_EVOLUTION_CLIENT_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_evolution_client_get_type(), MNEvolutionClientClass) - -/* Private structure type */ -typedef struct _MNEvolutionClientPrivate MNEvolutionClientPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_EVOLUTION_CLIENT__ -#define __TYPEDEF_MN_EVOLUTION_CLIENT__ -typedef struct _MNEvolutionClient MNEvolutionClient; -#endif -struct _MNEvolutionClient { - GObject __parent__; - /*< public >*/ - DBusGProxy * proxy; - /*< private >*/ - MNEvolutionClientPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNEvolutionClientClass MNEvolutionClientClass; -struct _MNEvolutionClientClass { - GObjectClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_evolution_client_get_type (void) G_GNUC_CONST; -#line 39 "src/mn-evolution-client.gob" -DBusGProxy * mn_evolution_client_get_proxy (MNEvolutionClient * self); -#line 62 "mn-evolution-client.h" -#line 39 "src/mn-evolution-client.gob" -void mn_evolution_client_set_proxy (MNEvolutionClient * self, - DBusGProxy * val); -#line 66 "mn-evolution-client.h" -#line 142 "src/mn-evolution-client.gob" -MNEvolutionClient * mn_evolution_client_get (void); -#line 69 "mn-evolution-client.h" - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_EVOLUTION_CLIENT_PROP_PROXY(arg) "proxy", __extension__ ({DBusGProxy * z = (arg); z;}) -#define MN_EVOLUTION_CLIENT_GET_PROP_PROXY(arg) "proxy", __extension__ ({DBusGProxy * *z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_EVOLUTION_CLIENT_PROP_PROXY(arg) "proxy",(DBusGProxy * )(arg) -#define MN_EVOLUTION_CLIENT_GET_PROP_PROXY(arg) "proxy",(DBusGProxy * *)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-folder-tree-client-private.h b/build/src/mn-evolution-folder-tree-client-private.h @@ -1,34 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#ifndef __MN_EVOLUTION_FOLDER_TREE_CLIENT_PRIVATE_H__ -#define __MN_EVOLUTION_FOLDER_TREE_CLIENT_PRIVATE_H__ - -#include "mn-evolution-folder-tree-client.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#line 24 "src/mn-evolution-folder-tree-client.gob" - -#include "mn-evolution-client.h" - -#line 18 "mn-evolution-folder-tree-client-private.h" -struct _MNEvolutionFolderTreeClientPrivate { -#line 39 "src/mn-evolution-folder-tree-client.gob" - DBusGProxy * proxy; -#line 40 "src/mn-evolution-folder-tree-client.gob" - DBusGProxy * properties_proxy; -#line 63 "src/mn-evolution-folder-tree-client.gob" - MNEvolutionClient * client; -#line 65 "src/mn-evolution-folder-tree-client.gob" - unsigned int contact_error_idle_id; -#line 28 "mn-evolution-folder-tree-client-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-folder-tree-client.c b/build/src/mn-evolution-folder-tree-client.c @@ -1,827 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 15 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-evolution-folder-tree-client.h" - -#include "mn-evolution-folder-tree-client-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 28 "src/mn-evolution-folder-tree-client.gob" - -#include <glib/gi18n.h> -#include "mn-evolution-client-dbus.h" -#include "mn-dbus-properties-client-dbus.h" -#include "mn-evolution.h" -#include "mn-shell.h" -#include "mn-util.h" - -#line 35 "mn-evolution-folder-tree-client.c" -/* self casting macros */ -#define SELF(x) MN_EVOLUTION_FOLDER_TREE_CLIENT(x) -#define SELF_CONST(x) MN_EVOLUTION_FOLDER_TREE_CLIENT_CONST(x) -#define IS_SELF(x) MN_IS_EVOLUTION_FOLDER_TREE_CLIENT(x) -#define TYPE_SELF MN_TYPE_EVOLUTION_FOLDER_TREE_CLIENT -#define SELF_CLASS(x) MN_EVOLUTION_FOLDER_TREE_CLIENT_CLASS(x) - -#define SELF_GET_CLASS(x) MN_EVOLUTION_FOLDER_TREE_CLIENT_GET_CLASS(x) - -/* self typedefs */ -typedef MNEvolutionFolderTreeClient Self; -typedef MNEvolutionFolderTreeClientClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_class_init (MNEvolutionFolderTreeClientClass * c); -#line 54 "mn-evolution-folder-tree-client.c" -#line 67 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_folder_activated (MNEvolutionFolderTreeClient * self); -#line 57 "mn-evolution-folder-tree-client.c" -#line 70 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_init (MNEvolutionFolderTreeClient * self); -#line 60 "mn-evolution-folder-tree-client.c" -#line 78 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_dispose (MNEvolutionFolderTreeClient * self); -#line 63 "mn-evolution-folder-tree-client.c" -#line 91 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_clear_proxy (MNEvolutionFolderTreeClient * self); -#line 66 "mn-evolution-folder-tree-client.c" -#line 116 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_update (MNEvolutionFolderTreeClient * self); -#line 69 "mn-evolution-folder-tree-client.c" -#line 148 "src/mn-evolution-folder-tree-client.gob" -static gboolean mn_evolution_folder_tree_client_plug_removed_h (GtkSocket * sock, gpointer user_data); -#line 72 "mn-evolution-folder-tree-client.c" -#line 158 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_realize_h (GtkWidget * widget, gpointer user_data); -#line 75 "mn-evolution-folder-tree-client.c" -#line 247 "src/mn-evolution-folder-tree-client.gob" -static gboolean mn_evolution_folder_tree_client_contact_error_cb (gpointer data); -#line 78 "mn-evolution-folder-tree-client.c" -#line 258 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_handle_contact_error (MNEvolutionFolderTreeClient * self); -#line 81 "mn-evolution-folder-tree-client.c" -#line 278 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_sync_selected_uri (MNEvolutionFolderTreeClient * self); -#line 84 "mn-evolution-folder-tree-client.c" -#line 308 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_set_widget (MNEvolutionFolderTreeClient * self, GtkWidget * widget); -#line 87 "mn-evolution-folder-tree-client.c" -#line 325 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_folder_selected_h (DBusGProxy * proxy, const char * uri, gpointer user_data); -#line 90 "mn-evolution-folder-tree-client.c" -#line 343 "src/mn-evolution-folder-tree-client.gob" -static void mn_evolution_folder_tree_client_folder_activated_h (DBusGProxy * proxy, gpointer user_data); -#line 93 "mn-evolution-folder-tree-client.c" - -/* - * Signal connection wrapper macro shortcuts - */ -#define self_connect__folder_activated(object,func,data) mn_evolution_folder_tree_client_connect__folder_activated((object),(func),(data)) -#define self_connect_after__folder_activated(object,func,data) mn_evolution_folder_tree_client_connect_after__folder_activated((object),(func),(data)) -#define self_connect_data__folder_activated(object,func,data,destroy_data,flags) mn_evolution_folder_tree_client_connect_data__folder_activated((object),(func),(data),(destroy_data),(flags)) - -enum { - FOLDER_ACTIVATED_SIGNAL, - LAST_SIGNAL -}; - -enum { - PROP_0, - PROP_CONNECTED, - PROP_SELECTED_URI -}; - -static guint object_signals[LAST_SIGNAL] = {0}; - -/* pointer to the class of our parent */ -static GtkHBoxClass *parent_class = NULL; - -/* Short form macros */ -#define self_get_connected mn_evolution_folder_tree_client_get_connected -#define self_get_selected_uri mn_evolution_folder_tree_client_get_selected_uri -#define self_set_selected_uri mn_evolution_folder_tree_client_set_selected_uri -#define self_folder_activated mn_evolution_folder_tree_client_folder_activated -#define self_clear_proxy mn_evolution_folder_tree_client_clear_proxy -#define self_update mn_evolution_folder_tree_client_update -#define self_plug_removed_h mn_evolution_folder_tree_client_plug_removed_h -#define self_realize_h mn_evolution_folder_tree_client_realize_h -#define self_contact_error_cb mn_evolution_folder_tree_client_contact_error_cb -#define self_handle_contact_error mn_evolution_folder_tree_client_handle_contact_error -#define self_sync_selected_uri mn_evolution_folder_tree_client_sync_selected_uri -#define self_set_widget mn_evolution_folder_tree_client_set_widget -#define self_folder_selected_h mn_evolution_folder_tree_client_folder_selected_h -#define self_folder_activated_h mn_evolution_folder_tree_client_folder_activated_h -#define self_new mn_evolution_folder_tree_client_new -GType -mn_evolution_folder_tree_client_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNEvolutionFolderTreeClientClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_evolution_folder_tree_client_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNEvolutionFolderTreeClient), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_evolution_folder_tree_client_init, - NULL - }; - - type = g_type_register_static (GTK_TYPE_HBOX, "MNEvolutionFolderTreeClient", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNEvolutionFolderTreeClient *)g_object_new(mn_evolution_folder_tree_client_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNEvolutionFolderTreeClient * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNEvolutionFolderTreeClient * -GET_NEW_VARG (const char *first, ...) -{ - MNEvolutionFolderTreeClient *ret; - va_list ap; - va_start (ap, first); - ret = (MNEvolutionFolderTreeClient *)g_object_new_valist (mn_evolution_folder_tree_client_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___dispose (GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::dispose" - MNEvolutionFolderTreeClient *self G_GNUC_UNUSED = MN_EVOLUTION_FOLDER_TREE_CLIENT (obj_self); -#line 78 "src/mn-evolution-folder-tree-client.gob" - mn_evolution_folder_tree_client_dispose (self); -#line 184 "mn-evolution-folder-tree-client.c" - if (G_OBJECT_CLASS (parent_class)->dispose) \ - (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self); -} -#undef __GOB_FUNCTION__ - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::finalize" - MNEvolutionFolderTreeClient *self G_GNUC_UNUSED = MN_EVOLUTION_FOLDER_TREE_CLIENT (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 48 "src/mn-evolution-folder-tree-client.gob" - if(self->selected_uri) { g_free ((gpointer) self->selected_uri); self->selected_uri = NULL; } -#line 201 "mn-evolution-folder-tree-client.c" -} -#undef __GOB_FUNCTION__ - -static void -mn_evolution_folder_tree_client_class_init (MNEvolutionFolderTreeClientClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c; - - g_type_class_add_private(c,sizeof(MNEvolutionFolderTreeClientPrivate)); - - parent_class = g_type_class_ref (GTK_TYPE_HBOX); - - object_signals[FOLDER_ACTIVATED_SIGNAL] = - g_signal_new ("folder_activated", - G_TYPE_FROM_CLASS (g_object_class), - (GSignalFlags)(G_SIGNAL_RUN_LAST), - G_STRUCT_OFFSET (MNEvolutionFolderTreeClientClass, folder_activated), - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - c->folder_activated = NULL; - g_object_class->dispose = ___dispose; - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_boolean - ("connected" /* name */, - NULL /* nick */, - NULL /* blurb */, - FALSE /* default_value */, - (GParamFlags)(G_PARAM_READABLE)); - g_object_class_install_property (g_object_class, - PROP_CONNECTED, - param_spec); - param_spec = g_param_spec_string - ("selected_uri" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (g_object_class, - PROP_SELECTED_URI, - param_spec); - } -} -#undef __GOB_FUNCTION__ -#line 70 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_init (MNEvolutionFolderTreeClient * self G_GNUC_UNUSED) -{ -#line 257 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_EVOLUTION_FOLDER_TREE_CLIENT,MNEvolutionFolderTreeClientPrivate); - { -#line 71 "src/mn-evolution-folder-tree-client.gob" - - selfp->client = mn_evolution_client_get(); - g_signal_connect_swapped(selfp->client, "notify::proxy", G_CALLBACK(self_update), self); - - self_update(self); - -#line 268 "mn-evolution-folder-tree-client.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::set_property" -{ - MNEvolutionFolderTreeClient *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_FOLDER_TREE_CLIENT (object); - - switch (property_id) { - case PROP_SELECTED_URI: - { -#line 51 "src/mn-evolution-folder-tree-client.gob" - - g_free(self->selected_uri); - self->selected_uri = g_value_dup_string(VAL); - - if (selfp->proxy) - self_sync_selected_uri(self); - -#line 295 "mn-evolution-folder-tree-client.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::get_property" -{ - MNEvolutionFolderTreeClient *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_FOLDER_TREE_CLIENT (object); - - switch (property_id) { - case PROP_CONNECTED: - { -#line 44 "src/mn-evolution-folder-tree-client.gob" - - g_value_set_boolean(VAL, selfp->proxy != NULL); - -#line 328 "mn-evolution-folder-tree-client.c" - } - break; - case PROP_SELECTED_URI: - { -#line 59 "src/mn-evolution-folder-tree-client.gob" - - g_value_set_string(VAL, self->selected_uri); - -#line 337 "mn-evolution-folder-tree-client.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - -#line 44 "src/mn-evolution-folder-tree-client.gob" -gboolean -mn_evolution_folder_tree_client_get_connected (MNEvolutionFolderTreeClient * self) -{ -#line 357 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::get_connected" -{ -#line 42 "src/mn-evolution-folder-tree-client.gob" - gboolean val; g_object_get (G_OBJECT (self), "connected", &val, NULL); return val; -}} -#line 363 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 59 "src/mn-evolution-folder-tree-client.gob" -gchar * -mn_evolution_folder_tree_client_get_selected_uri (MNEvolutionFolderTreeClient * self) -{ -#line 370 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::get_selected_uri" -{ -#line 49 "src/mn-evolution-folder-tree-client.gob" - gchar* val; g_object_get (G_OBJECT (self), "selected_uri", &val, NULL); return val; -}} -#line 376 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 51 "src/mn-evolution-folder-tree-client.gob" -void -mn_evolution_folder_tree_client_set_selected_uri (MNEvolutionFolderTreeClient * self, gchar * val) -{ -#line 383 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::set_selected_uri" -{ -#line 49 "src/mn-evolution-folder-tree-client.gob" - g_object_set (G_OBJECT (self), "selected_uri", val, NULL); -}} -#line 389 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 67 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_folder_activated (MNEvolutionFolderTreeClient * self) -{ -#line 396 "mn-evolution-folder-tree-client.c" - GValue ___param_values[1]; - GValue ___return_val; - -memset (&___return_val, 0, sizeof (___return_val)); -memset (&___param_values, 0, sizeof (___param_values)); - -#line 67 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (self != NULL); -#line 67 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_FOLDER_TREE_CLIENT (self)); -#line 407 "mn-evolution-folder-tree-client.c" - - ___param_values[0].g_type = 0; - g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self)); - g_value_set_instance (&___param_values[0], (gpointer) self); - - g_signal_emitv (___param_values, - object_signals[FOLDER_ACTIVATED_SIGNAL], - 0 /* detail */, - &___return_val); - - g_value_unset (&___param_values[0]); -} - - -#line 78 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_dispose (MNEvolutionFolderTreeClient * self) -{ -#line 426 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::dispose" -{ -#line 79 "src/mn-evolution-folder-tree-client.gob" - - self_clear_proxy(self); - - mn_source_clear(&selfp->contact_error_idle_id); - - if (selfp->client) - { - g_signal_handlers_disconnect_by_func(selfp->client, self_update, self); - selfp->client = NULL; - } - }} -#line 441 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 91 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_clear_proxy (MNEvolutionFolderTreeClient * self) -{ -#line 448 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::clear_proxy" -#line 91 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (self != NULL); -#line 91 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_FOLDER_TREE_CLIENT (self)); -#line 454 "mn-evolution-folder-tree-client.c" -{ -#line 93 "src/mn-evolution-folder-tree-client.gob" - - if (selfp->proxy) - { - /* - * We cannot unreference the proxy because of a memory - * management bug in DBusGProxy - * (https://bugs.freedesktop.org/show_bug.cgi?id=14030), so - * simply disconnect the signals and nullify the proxy. - */ - - dbus_g_proxy_disconnect_signal(selfp->proxy, - MN_EVOLUTION_FOLDER_TREE_SERVER_SIGNAL_FOLDER_SELECTED, - G_CALLBACK(self_folder_selected_h), - self); - dbus_g_proxy_disconnect_signal(selfp->proxy, - MN_EVOLUTION_FOLDER_TREE_SERVER_SIGNAL_FOLDER_ACTIVATED, - G_CALLBACK(self_folder_activated_h), - self); - - mn_remove_weak_pointer(&selfp->proxy); /* also sets it to NULL */ - } - }} -#line 479 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 116 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_update (MNEvolutionFolderTreeClient * self) -{ -#line 486 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::update" -#line 116 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (self != NULL); -#line 116 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_FOLDER_TREE_CLIENT (self)); -#line 492 "mn-evolution-folder-tree-client.c" -{ -#line 118 "src/mn-evolution-folder-tree-client.gob" - - MNEvolutionClient *client; - - /* - * We do not unconditionally create the GtkSocket to avoid the - * widget change flicker that would occur if Evolution cannot be - * contacted. - */ - - client = mn_evolution_client_get(); - if (client->proxy) - { - GtkWidget *sock; - - sock = gtk_socket_new(); - - g_signal_connect(sock, "plug-removed", G_CALLBACK(self_plug_removed_h), NULL); - - /* - * In order to be able to call gtk_socket_get_id(), the socket - * must be added to a toplevel window. - */ - g_signal_connect(sock, "realize", G_CALLBACK(self_realize_h), self); - - self_set_widget(self, sock); - } - else - self_handle_contact_error(self); - }} -#line 524 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 148 "src/mn-evolution-folder-tree-client.gob" -static gboolean -mn_evolution_folder_tree_client_plug_removed_h (GtkSocket * sock, gpointer user_data) -{ -#line 531 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::plug_removed_h" -{ -#line 150 "src/mn-evolution-folder-tree-client.gob" - - /* - * Do not destroy the socket, it will be destroyed when removed - * from the vbox in set_widget(). - */ - return TRUE; - }} -#line 542 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 158 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_realize_h (GtkWidget * widget, gpointer user_data) -{ -#line 549 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::realize_h" -{ -#line 160 "src/mn-evolution-folder-tree-client.gob" - - Self *self = user_data; - MNEvolutionClient *client; - - client = mn_evolution_client_get(); - if (client->proxy) - { - guint32 id; - GError *err = NULL; - - id = (guint32) gtk_socket_get_id(GTK_SOCKET(widget)); - - if (org_gnome_MailNotification_Evolution_folder_tree_new(client->proxy, id, &err)) - { - char *service; - char *path; - - self_clear_proxy(self); - - service = g_strdup_printf(MN_EVOLUTION_FOLDER_TREE_SERVER_SERVICE, id); - path = g_strdup_printf(MN_EVOLUTION_FOLDER_TREE_SERVER_PATH, id); - - selfp->proxy = dbus_g_proxy_new_for_name_owner(mn_shell->session_bus, - service, - path, - MN_EVOLUTION_FOLDER_TREE_SERVER_INTERFACE, - NULL); - - g_free(service); - g_free(path); - - if (selfp->proxy) - { - /* - * We must add a weak pointer, so that if the proxy is - * destroyed after Evolution exits we won't try to - * clear an invalid proxy in clear_proxy(). - */ - mn_add_weak_pointer(&selfp->proxy); - - selfp->properties_proxy = dbus_g_proxy_new_from_proxy(selfp->proxy, DBUS_INTERFACE_PROPERTIES, NULL); - - dbus_g_proxy_add_signal(selfp->proxy, - MN_EVOLUTION_FOLDER_TREE_SERVER_SIGNAL_FOLDER_SELECTED, - G_TYPE_STRING, /* uri */ - G_TYPE_INVALID); - dbus_g_proxy_add_signal(selfp->proxy, - MN_EVOLUTION_FOLDER_TREE_SERVER_SIGNAL_FOLDER_ACTIVATED, - G_TYPE_INVALID); - - dbus_g_proxy_connect_signal(selfp->proxy, - MN_EVOLUTION_FOLDER_TREE_SERVER_SIGNAL_FOLDER_SELECTED, - G_CALLBACK(self_folder_selected_h), - self, - NULL); - dbus_g_proxy_connect_signal(selfp->proxy, - MN_EVOLUTION_FOLDER_TREE_SERVER_SIGNAL_FOLDER_ACTIVATED, - G_CALLBACK(self_folder_activated_h), - self, - NULL); - - /* give the folder tree a decent height */ - gtk_widget_set_size_request(widget, -1, 150); - - self_sync_selected_uri(self); - g_object_notify(G_OBJECT(self), "connected"); - - return; /* success */ - } - } - else - { - /* unlikely to ever happen, not worth a translation */ - g_warning("cannot create folder tree: %s", err->message); - g_error_free(err); - } - } - - /* - * Failure. We cannot call handle_contact_error() from here since - * it would destroy the GtkSocket that is currently being - * realized. Use an idle callback. - */ - if (! selfp->contact_error_idle_id) - selfp->contact_error_idle_id = gdk_threads_add_idle(self_contact_error_cb, self); - }} -#line 639 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 247 "src/mn-evolution-folder-tree-client.gob" -static gboolean -mn_evolution_folder_tree_client_contact_error_cb (gpointer data) -{ -#line 646 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::contact_error_cb" -{ -#line 249 "src/mn-evolution-folder-tree-client.gob" - - Self *self = data; - - self_handle_contact_error(self); - - selfp->contact_error_idle_id = 0; - return FALSE; /* remove source */ - }} -#line 658 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 258 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_handle_contact_error (MNEvolutionFolderTreeClient * self) -{ -#line 665 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::handle_contact_error" -#line 258 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (self != NULL); -#line 258 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_FOLDER_TREE_CLIENT (self)); -#line 671 "mn-evolution-folder-tree-client.c" -{ -#line 260 "src/mn-evolution-folder-tree-client.gob" - - GtkWidget *label; - - if (selfp->proxy) - { - self_clear_proxy(self); - g_object_notify(G_OBJECT(self), "connected"); - } - - label = gtk_label_new(_("Mail Notification can not contact Evolution. Make sure that Evolution is running and that the Evolution Jean-Yves Lefort's Mail Notification plugin is loaded.")); - - gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); - gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); - gtk_label_set_selectable(GTK_LABEL(label), TRUE); - - self_set_widget(self, label); - }} -#line 691 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 278 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_sync_selected_uri (MNEvolutionFolderTreeClient * self) -{ -#line 698 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::sync_selected_uri" -#line 278 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (self != NULL); -#line 278 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_FOLDER_TREE_CLIENT (self)); -#line 704 "mn-evolution-folder-tree-client.c" -{ -#line 280 "src/mn-evolution-folder-tree-client.gob" - - GValue value = { 0, }; - GError *err = NULL; - - g_return_if_fail(selfp->proxy != NULL); - - if (! self->selected_uri) - return; - - g_value_init(&value, G_TYPE_STRING); - g_value_set_string(&value, self->selected_uri); - - if (! org_freedesktop_DBus_Properties_set(selfp->properties_proxy, - MN_EVOLUTION_FOLDER_TREE_SERVER_INTERFACE, - MN_EVOLUTION_FOLDER_TREE_SERVER_PROPERTY_URI, - &value, - &err)) - { - g_warning("cannot set D-Bus property %s of interface %s: %s", - MN_EVOLUTION_FOLDER_TREE_SERVER_PROPERTY_URI, - MN_EVOLUTION_FOLDER_TREE_SERVER_INTERFACE, - err->message); - g_error_free(err); - } - - g_value_unset(&value); - }} -#line 734 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 308 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_set_widget (MNEvolutionFolderTreeClient * self, GtkWidget * widget) -{ -#line 741 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::set_widget" -#line 308 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (self != NULL); -#line 308 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (MN_IS_EVOLUTION_FOLDER_TREE_CLIENT (self)); -#line 308 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (widget != NULL); -#line 308 "src/mn-evolution-folder-tree-client.gob" - g_return_if_fail (GTK_IS_WIDGET (widget)); -#line 751 "mn-evolution-folder-tree-client.c" -{ -#line 310 "src/mn-evolution-folder-tree-client.gob" - - GList *children; - - children = gtk_container_get_children(GTK_CONTAINER(self)); - if (children) - { - g_assert(g_list_length(children) == 1); - gtk_container_remove(GTK_CONTAINER(self), children->data); - g_list_free(children); - } - - gtk_box_pack_start(GTK_BOX(self), widget, TRUE, TRUE, 0); - gtk_widget_show(widget); - }} -#line 768 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 325 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_folder_selected_h (DBusGProxy * proxy, const char * uri, gpointer user_data) -{ -#line 775 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::folder_selected_h" -{ -#line 329 "src/mn-evolution-folder-tree-client.gob" - - Self *self = user_data; - - /* this is a main loop callback */ - GDK_THREADS_ENTER(); - - g_free(self->selected_uri); - self->selected_uri = g_strdup(uri); - - g_object_notify(G_OBJECT(self), "selected-uri"); - - GDK_THREADS_LEAVE(); - }} -#line 792 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 343 "src/mn-evolution-folder-tree-client.gob" -static void -mn_evolution_folder_tree_client_folder_activated_h (DBusGProxy * proxy, gpointer user_data) -{ -#line 799 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::folder_activated_h" -{ -#line 345 "src/mn-evolution-folder-tree-client.gob" - - Self *self = user_data; - - /* this is a main loop callback */ - GDK_THREADS_ENTER(); - - self_folder_activated(self); - - GDK_THREADS_LEAVE(); - }} -#line 813 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ - -#line 356 "src/mn-evolution-folder-tree-client.gob" -GtkWidget * -mn_evolution_folder_tree_client_new (void) -{ -#line 820 "mn-evolution-folder-tree-client.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Client::new" -{ -#line 358 "src/mn-evolution-folder-tree-client.gob" - - return GTK_WIDGET(GET_NEW); - }} -#line 827 "mn-evolution-folder-tree-client.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-evolution-folder-tree-client.gob.stamp b/build/src/mn-evolution-folder-tree-client.gob.stamp diff --git a/build/src/mn-evolution-folder-tree-client.h b/build/src/mn-evolution-folder-tree-client.h @@ -1,106 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gtk/gtk.h> - -#ifndef __MN_EVOLUTION_FOLDER_TREE_CLIENT_H__ -#define __MN_EVOLUTION_FOLDER_TREE_CLIENT_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_EVOLUTION_FOLDER_TREE_CLIENT (mn_evolution_folder_tree_client_get_type()) -#define MN_EVOLUTION_FOLDER_TREE_CLIENT(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_folder_tree_client_get_type(), MNEvolutionFolderTreeClient) -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_folder_tree_client_get_type(), MNEvolutionFolderTreeClient const) -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_evolution_folder_tree_client_get_type(), MNEvolutionFolderTreeClientClass) -#define MN_IS_EVOLUTION_FOLDER_TREE_CLIENT(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_evolution_folder_tree_client_get_type ()) - -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_evolution_folder_tree_client_get_type(), MNEvolutionFolderTreeClientClass) - -/* Private structure type */ -typedef struct _MNEvolutionFolderTreeClientPrivate MNEvolutionFolderTreeClientPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_EVOLUTION_FOLDER_TREE_CLIENT__ -#define __TYPEDEF_MN_EVOLUTION_FOLDER_TREE_CLIENT__ -typedef struct _MNEvolutionFolderTreeClient MNEvolutionFolderTreeClient; -#endif -struct _MNEvolutionFolderTreeClient { - GtkHBox __parent__; - /*< public >*/ - char * selected_uri; - /*< private >*/ - MNEvolutionFolderTreeClientPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNEvolutionFolderTreeClientClass MNEvolutionFolderTreeClientClass; -struct _MNEvolutionFolderTreeClientClass { - GtkHBoxClass __parent__; - /*signal*/void (* folder_activated) (MNEvolutionFolderTreeClient * self); -}; - - -/* - * Public methods - */ -GType mn_evolution_folder_tree_client_get_type (void) G_GNUC_CONST; -#line 44 "src/mn-evolution-folder-tree-client.gob" -gboolean mn_evolution_folder_tree_client_get_connected (MNEvolutionFolderTreeClient * self); -#line 63 "mn-evolution-folder-tree-client.h" -#line 59 "src/mn-evolution-folder-tree-client.gob" -gchar * mn_evolution_folder_tree_client_get_selected_uri (MNEvolutionFolderTreeClient * self); -#line 66 "mn-evolution-folder-tree-client.h" -#line 51 "src/mn-evolution-folder-tree-client.gob" -void mn_evolution_folder_tree_client_set_selected_uri (MNEvolutionFolderTreeClient * self, - gchar * val); -#line 70 "mn-evolution-folder-tree-client.h" -#line 356 "src/mn-evolution-folder-tree-client.gob" -GtkWidget * mn_evolution_folder_tree_client_new (void); -#line 73 "mn-evolution-folder-tree-client.h" - -/* - * Signal connection wrapper macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define mn_evolution_folder_tree_client_connect__folder_activated(object,func,data) g_signal_connect(MN_EVOLUTION_FOLDER_TREE_CLIENT(__extension__ ({MNEvolutionFolderTreeClient *___object = (object); ___object; })),"folder_activated",(GCallback) __extension__ ({void (* ___folder_activated) (MNEvolutionFolderTreeClient * ___fake___self, gpointer ___data ) = (func); ___folder_activated; }), (data)) -#define mn_evolution_folder_tree_client_connect_after__folder_activated(object,func,data) g_signal_connect_after(MN_EVOLUTION_FOLDER_TREE_CLIENT(__extension__ ({MNEvolutionFolderTreeClient *___object = (object); ___object; })),"folder_activated",(GCallback) __extension__ ({void (* ___folder_activated) (MNEvolutionFolderTreeClient * ___fake___self, gpointer ___data ) = (func); ___folder_activated; }), (data)) -#define mn_evolution_folder_tree_client_connect_data__folder_activated(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_FOLDER_TREE_CLIENT(__extension__ ({MNEvolutionFolderTreeClient *___object = (object); ___object; })),"folder_activated",(GCallback) __extension__ ({void (* ___folder_activated) (MNEvolutionFolderTreeClient * ___fake___self, gpointer ___data ) = (func); ___folder_activated; }), (data), (destroy_data), (GConnectFlags)(flags)) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define mn_evolution_folder_tree_client_connect__folder_activated(object,func,data) g_signal_connect(MN_EVOLUTION_FOLDER_TREE_CLIENT(object),"folder_activated",(GCallback)(func),(data)) -#define mn_evolution_folder_tree_client_connect_after__folder_activated(object,func,data) g_signal_connect_after(MN_EVOLUTION_FOLDER_TREE_CLIENT(object),"folder_activated",(GCallback)(func),(data)) -#define mn_evolution_folder_tree_client_connect_data__folder_activated(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_FOLDER_TREE_CLIENT(object),"folder_activated",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags)) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_GET_PROP_CONNECTED(arg) "connected", __extension__ ({gboolean *z = (arg); z;}) -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_PROP_SELECTED_URI(arg) "selected_uri", __extension__ ({gchar *z = (arg); z;}) -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_GET_PROP_SELECTED_URI(arg) "selected_uri", __extension__ ({gchar **z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_GET_PROP_CONNECTED(arg) "connected",(gboolean *)(arg) -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_PROP_SELECTED_URI(arg) "selected_uri",(gchar *)(arg) -#define MN_EVOLUTION_FOLDER_TREE_CLIENT_GET_PROP_SELECTED_URI(arg) "selected_uri",(gchar **)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-folder-tree-server-private.h b/build/src/mn-evolution-folder-tree-server-private.h @@ -1,32 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#ifndef __MN_EVOLUTION_FOLDER_TREE_SERVER_PRIVATE_H__ -#define __MN_EVOLUTION_FOLDER_TREE_SERVER_PRIVATE_H__ - -#include "mn-evolution-folder-tree-server.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#line 20 "src/mn-evolution-folder-tree-server.gob" - -#include <gtk/gtk.h> - -#line 18 "mn-evolution-folder-tree-server-private.h" -struct _MNEvolutionFolderTreeServerPrivate { -#line 37 "src/mn-evolution-folder-tree-server.gob" - guint32 id; -#line 40 "src/mn-evolution-folder-tree-server.gob" - GtkWidget * plug; -#line 41 "src/mn-evolution-folder-tree-server.gob" - GtkWidget * tree; -#line 26 "mn-evolution-folder-tree-server-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-folder-tree-server.c b/build/src/mn-evolution-folder-tree-server.c @@ -1,547 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 15 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-evolution-folder-tree-server.h" - -#include "mn-evolution-folder-tree-server-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 24 "src/mn-evolution-folder-tree-server.gob" - -#include <dbus/dbus.h> -#include <mail/mail-component.h> -#include <mail/em-folder-tree.h> -#include "mn-evolution-plugin.h" -#include "mn-evolution.h" - -#include "mn-evolution-folder-tree-server-dbus.h" - -#line 36 "mn-evolution-folder-tree-server.c" -/* self casting macros */ -#define SELF(x) MN_EVOLUTION_FOLDER_TREE_SERVER(x) -#define SELF_CONST(x) MN_EVOLUTION_FOLDER_TREE_SERVER_CONST(x) -#define IS_SELF(x) MN_IS_EVOLUTION_FOLDER_TREE_SERVER(x) -#define TYPE_SELF MN_TYPE_EVOLUTION_FOLDER_TREE_SERVER -#define SELF_CLASS(x) MN_EVOLUTION_FOLDER_TREE_SERVER_CLASS(x) - -#define SELF_GET_CLASS(x) MN_EVOLUTION_FOLDER_TREE_SERVER_GET_CLASS(x) - -/* self typedefs */ -typedef MNEvolutionFolderTreeServer Self; -typedef MNEvolutionFolderTreeServerClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_init (MNEvolutionFolderTreeServer * o); -#line 55 "mn-evolution-folder-tree-server.c" -#line 49 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_folder_selected (MNEvolutionFolderTreeServer * self, const char * uri); -#line 58 "mn-evolution-folder-tree-server.c" -#line 52 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_folder_activated (MNEvolutionFolderTreeServer * self); -#line 61 "mn-evolution-folder-tree-server.c" -#line 55 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_class_init (MNEvolutionFolderTreeServerClass * class); -#line 64 "mn-evolution-folder-tree-server.c" -#line 60 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_constructor (MNEvolutionFolderTreeServer * self); -#line 67 "mn-evolution-folder-tree-server.c" -#line 79 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_finalize (MNEvolutionFolderTreeServer * self); -#line 70 "mn-evolution-folder-tree-server.c" -#line 84 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_plug_destroy_h (GtkObject * object, gpointer user_data); -#line 73 "mn-evolution-folder-tree-server.c" -#line 104 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_selected_h (EMFolderTree * tree, const char * full_name, const char * uri, guint32 flags, gpointer user_data); -#line 76 "mn-evolution-folder-tree-server.c" -#line 115 "src/mn-evolution-folder-tree-server.gob" -static void mn_evolution_folder_tree_server_activated_h (EMFolderTree * tree, const char * full_name, const char * uri, gpointer user_data); -#line 79 "mn-evolution-folder-tree-server.c" - -/* - * Signal connection wrapper macro shortcuts - */ -#define self_connect__folder_selected(object,func,data) mn_evolution_folder_tree_server_connect__folder_selected((object),(func),(data)) -#define self_connect_after__folder_selected(object,func,data) mn_evolution_folder_tree_server_connect_after__folder_selected((object),(func),(data)) -#define self_connect_data__folder_selected(object,func,data,destroy_data,flags) mn_evolution_folder_tree_server_connect_data__folder_selected((object),(func),(data),(destroy_data),(flags)) -#define self_connect__folder_activated(object,func,data) mn_evolution_folder_tree_server_connect__folder_activated((object),(func),(data)) -#define self_connect_after__folder_activated(object,func,data) mn_evolution_folder_tree_server_connect_after__folder_activated((object),(func),(data)) -#define self_connect_data__folder_activated(object,func,data,destroy_data,flags) mn_evolution_folder_tree_server_connect_data__folder_activated((object),(func),(data),(destroy_data),(flags)) - -typedef void (*___Sig1) (MNEvolutionFolderTreeServer *, gchar *, gpointer); - -static void -___marshal_Sig1 (GClosure *closure, - GValue *return_value G_GNUC_UNUSED, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint G_GNUC_UNUSED, - gpointer marshal_data) -{ - register ___Sig1 callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 2); - - if (G_CCLOSURE_SWAP_DATA (closure)) { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } else { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - - callback = (___Sig1) (marshal_data != NULL ? marshal_data : cc->callback); - - callback ((MNEvolutionFolderTreeServer *)data1, - (gchar *) g_value_get_string (param_values + 1), - data2); -} - - -enum { - FOLDER_SELECTED_SIGNAL, - FOLDER_ACTIVATED_SIGNAL, - LAST_SIGNAL -}; - -enum { - PROP_0, - PROP_ID, - PROP_URI -}; - -static guint object_signals[LAST_SIGNAL] = {0}; - -/* pointer to the class of our parent */ -static GObjectClass *parent_class = NULL; - -/* Short form macros */ -#define self_folder_selected mn_evolution_folder_tree_server_folder_selected -#define self_folder_activated mn_evolution_folder_tree_server_folder_activated -#define self_plug_destroy_h mn_evolution_folder_tree_server_plug_destroy_h -#define self_selected_h mn_evolution_folder_tree_server_selected_h -#define self_activated_h mn_evolution_folder_tree_server_activated_h -#define self_new mn_evolution_folder_tree_server_new -GType -mn_evolution_folder_tree_server_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNEvolutionFolderTreeServerClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_evolution_folder_tree_server_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNEvolutionFolderTreeServer), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_evolution_folder_tree_server_init, - NULL - }; - - type = g_type_register_static (G_TYPE_OBJECT, "MNEvolutionFolderTreeServer", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNEvolutionFolderTreeServer *)g_object_new(mn_evolution_folder_tree_server_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNEvolutionFolderTreeServer * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNEvolutionFolderTreeServer * -GET_NEW_VARG (const char *first, ...) -{ - MNEvolutionFolderTreeServer *ret; - va_list ap; - va_start (ap, first); - ret = (MNEvolutionFolderTreeServer *)g_object_new_valist (mn_evolution_folder_tree_server_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static GObject * -___constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::constructor" - GObject *obj_self; - MNEvolutionFolderTreeServer *self; - obj_self = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties); - self = MN_EVOLUTION_FOLDER_TREE_SERVER (obj_self); -#line 60 "src/mn-evolution-folder-tree-server.gob" - mn_evolution_folder_tree_server_constructor (self); -#line 200 "mn-evolution-folder-tree-server.c" - return obj_self; -} -#undef __GOB_FUNCTION__ - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::finalize" - MNEvolutionFolderTreeServer *self G_GNUC_UNUSED = MN_EVOLUTION_FOLDER_TREE_SERVER (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; -#line 79 "src/mn-evolution-folder-tree-server.gob" - mn_evolution_folder_tree_server_finalize (self); -#line 214 "mn-evolution-folder-tree-server.c" - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -} -#undef __GOB_FUNCTION__ - -static void -mn_evolution_folder_tree_server_init (MNEvolutionFolderTreeServer * o G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::init" - o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_EVOLUTION_FOLDER_TREE_SERVER,MNEvolutionFolderTreeServerPrivate); -} -#undef __GOB_FUNCTION__ -#line 55 "src/mn-evolution-folder-tree-server.gob" -static void -mn_evolution_folder_tree_server_class_init (MNEvolutionFolderTreeServerClass * class G_GNUC_UNUSED) -{ -#line 231 "mn-evolution-folder-tree-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - - g_type_class_add_private(class,sizeof(MNEvolutionFolderTreeServerPrivate)); - - parent_class = g_type_class_ref (G_TYPE_OBJECT); - - object_signals[FOLDER_SELECTED_SIGNAL] = - g_signal_new ("folder_selected", - G_TYPE_FROM_CLASS (g_object_class), - (GSignalFlags)(G_SIGNAL_RUN_LAST), - G_STRUCT_OFFSET (MNEvolutionFolderTreeServerClass, folder_selected), - NULL, NULL, - ___marshal_Sig1, - G_TYPE_NONE, 1, - G_TYPE_STRING); - if ___GOB_UNLIKELY(sizeof(const char * ) != sizeof(gchar *) || parent_class == NULL /* avoid warning */) { - g_error("src/mn-evolution-folder-tree-server.gob line 49: Type mismatch of \"folder_selected\" signal signature"); - } - object_signals[FOLDER_ACTIVATED_SIGNAL] = - g_signal_new ("folder_activated", - G_TYPE_FROM_CLASS (g_object_class), - (GSignalFlags)(G_SIGNAL_RUN_LAST), - G_STRUCT_OFFSET (MNEvolutionFolderTreeServerClass, folder_activated), - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - class->folder_selected = NULL; - class->folder_activated = NULL; - g_object_class->constructor = ___constructor; - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_uint - ("id" /* name */, - NULL /* nick */, - NULL /* blurb */, - 0 /* minimum */, - G_MAXUINT /* maximum */, - 0 /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property (g_object_class, - PROP_ID, - param_spec); - param_spec = g_param_spec_string - ("uri" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_WRITABLE)); - g_object_class_install_property (g_object_class, - PROP_URI, - param_spec); - } - { -#line 56 "src/mn-evolution-folder-tree-server.gob" - - dbus_g_object_type_install_info(TYPE_SELF, &dbus_glib_mn_evolution_folder_tree_server_object_info); - -#line 295 "mn-evolution-folder-tree-server.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::set_property" -{ - MNEvolutionFolderTreeServer *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_FOLDER_TREE_SERVER (object); - - switch (property_id) { - case PROP_ID: - { -#line 38 "src/mn-evolution-folder-tree-server.gob" -self->_priv->id = g_value_get_uint (VAL); -#line 316 "mn-evolution-folder-tree-server.c" - } - break; - case PROP_URI: - { -#line 45 "src/mn-evolution-folder-tree-server.gob" - - em_folder_tree_set_selected(EM_FOLDER_TREE(selfp->tree), g_value_get_string(VAL), FALSE); - -#line 325 "mn-evolution-folder-tree-server.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::get_property" -{ - MNEvolutionFolderTreeServer *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_FOLDER_TREE_SERVER (object); - - switch (property_id) { - case PROP_ID: - { -#line 38 "src/mn-evolution-folder-tree-server.gob" -g_value_set_uint (VAL, self->_priv->id); -#line 356 "mn-evolution-folder-tree-server.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - -#line 49 "src/mn-evolution-folder-tree-server.gob" -static void -mn_evolution_folder_tree_server_folder_selected (MNEvolutionFolderTreeServer * self, const char * uri) -{ -#line 376 "mn-evolution-folder-tree-server.c" - GValue ___param_values[2]; - GValue ___return_val; - -memset (&___return_val, 0, sizeof (___return_val)); -memset (&___param_values, 0, sizeof (___param_values)); - -#line 49 "src/mn-evolution-folder-tree-server.gob" - g_return_if_fail (self != NULL); -#line 49 "src/mn-evolution-folder-tree-server.gob" - g_return_if_fail (MN_IS_EVOLUTION_FOLDER_TREE_SERVER (self)); -#line 387 "mn-evolution-folder-tree-server.c" - - ___param_values[0].g_type = 0; - g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self)); - g_value_set_instance (&___param_values[0], (gpointer) self); - - ___param_values[1].g_type = 0; - g_value_init (&___param_values[1], G_TYPE_STRING); - g_value_set_static_string (&___param_values[1], (gchar *) uri); - - g_signal_emitv (___param_values, - object_signals[FOLDER_SELECTED_SIGNAL], - 0 /* detail */, - &___return_val); - - g_value_unset (&___param_values[0]); - g_value_unset (&___param_values[1]); -} - -#line 52 "src/mn-evolution-folder-tree-server.gob" -static void -mn_evolution_folder_tree_server_folder_activated (MNEvolutionFolderTreeServer * self) -{ -#line 410 "mn-evolution-folder-tree-server.c" - GValue ___param_values[1]; - GValue ___return_val; - -memset (&___return_val, 0, sizeof (___return_val)); -memset (&___param_values, 0, sizeof (___param_values)); - -#line 52 "src/mn-evolution-folder-tree-server.gob" - g_return_if_fail (self != NULL); -#line 52 "src/mn-evolution-folder-tree-server.gob" - g_return_if_fail (MN_IS_EVOLUTION_FOLDER_TREE_SERVER (self)); -#line 421 "mn-evolution-folder-tree-server.c" - - ___param_values[0].g_type = 0; - g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self)); - g_value_set_instance (&___param_values[0], (gpointer) self); - - g_signal_emitv (___param_values, - object_signals[FOLDER_ACTIVATED_SIGNAL], - 0 /* detail */, - &___return_val); - - g_value_unset (&___param_values[0]); -} - - -#line 60 "src/mn-evolution-folder-tree-server.gob" -static void -mn_evolution_folder_tree_server_constructor (MNEvolutionFolderTreeServer * self) -{ -#line 440 "mn-evolution-folder-tree-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::constructor" -{ -#line 61 "src/mn-evolution-folder-tree-server.gob" - - EMFolderTreeModel *model; - - model = mail_component_peek_tree_model(mail_component_peek()); - selfp->tree = em_folder_tree_new_with_model(model); - - selfp->plug = gtk_plug_new((GdkNativeWindow) selfp->id); - gtk_container_add(GTK_CONTAINER(selfp->plug), selfp->tree); - gtk_widget_show_all(selfp->plug); - - g_signal_connect(selfp->plug, "destroy", G_CALLBACK(self_plug_destroy_h), self); - - g_object_connect(selfp->tree, - "signal::folder-selected", self_selected_h, self, - "signal::folder-activated", self_activated_h, self, - NULL); - }} -#line 461 "mn-evolution-folder-tree-server.c" -#undef __GOB_FUNCTION__ - -#line 79 "src/mn-evolution-folder-tree-server.gob" -static void -mn_evolution_folder_tree_server_finalize (MNEvolutionFolderTreeServer * self) -{ -#line 468 "mn-evolution-folder-tree-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::finalize" -{ -#line 80 "src/mn-evolution-folder-tree-server.gob" - - g_signal_handlers_disconnect_by_func(selfp->plug, self_plug_destroy_h, self); - }} -#line 475 "mn-evolution-folder-tree-server.c" -#undef __GOB_FUNCTION__ - -#line 84 "src/mn-evolution-folder-tree-server.gob" -static void -mn_evolution_folder_tree_server_plug_destroy_h (GtkObject * object, gpointer user_data) -{ -#line 482 "mn-evolution-folder-tree-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::plug_destroy_h" -{ -#line 86 "src/mn-evolution-folder-tree-server.gob" - - Self *self = user_data; - char *service; - GError *err = NULL; - - /* the MN side is gone: unregister and unreference the server */ - - service = g_strdup_printf(MN_EVOLUTION_FOLDER_TREE_SERVER_SERVICE, selfp->id); - if (! mn_evolution_plugin_unregister_server(service, &err)) - { - g_warning("unable to unregister D-Bus service \"%s\": %s", service, err->message); - g_error_free(err); - } - g_free(service); - - g_object_unref(self); - }} -#line 503 "mn-evolution-folder-tree-server.c" -#undef __GOB_FUNCTION__ - -#line 104 "src/mn-evolution-folder-tree-server.gob" -static void -mn_evolution_folder_tree_server_selected_h (EMFolderTree * tree, const char * full_name, const char * uri, guint32 flags, gpointer user_data) -{ -#line 510 "mn-evolution-folder-tree-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::selected_h" -{ -#line 110 "src/mn-evolution-folder-tree-server.gob" - - Self *self = user_data; - self_folder_selected(self, uri); - }} -#line 518 "mn-evolution-folder-tree-server.c" -#undef __GOB_FUNCTION__ - -#line 115 "src/mn-evolution-folder-tree-server.gob" -static void -mn_evolution_folder_tree_server_activated_h (EMFolderTree * tree, const char * full_name, const char * uri, gpointer user_data) -{ -#line 525 "mn-evolution-folder-tree-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::activated_h" -{ -#line 120 "src/mn-evolution-folder-tree-server.gob" - - Self *self = user_data; - self_folder_activated(self); - }} -#line 533 "mn-evolution-folder-tree-server.c" -#undef __GOB_FUNCTION__ - -#line 125 "src/mn-evolution-folder-tree-server.gob" -MNEvolutionFolderTreeServer * -mn_evolution_folder_tree_server_new (guint32 id) -{ -#line 540 "mn-evolution-folder-tree-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::new" -{ -#line 127 "src/mn-evolution-folder-tree-server.gob" - - return GET_NEW_VARG(MN_EVOLUTION_FOLDER_TREE_SERVER_PROP_ID(id), NULL); - }} -#line 547 "mn-evolution-folder-tree-server.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-evolution-folder-tree-server.gob.stamp b/build/src/mn-evolution-folder-tree-server.gob.stamp diff --git a/build/src/mn-evolution-folder-tree-server.h b/build/src/mn-evolution-folder-tree-server.h @@ -1,97 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> -#ifndef __MN_EVOLUTION_FOLDER_TREE_SERVER_H__ -#define __MN_EVOLUTION_FOLDER_TREE_SERVER_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_EVOLUTION_FOLDER_TREE_SERVER (mn_evolution_folder_tree_server_get_type()) -#define MN_EVOLUTION_FOLDER_TREE_SERVER(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_folder_tree_server_get_type(), MNEvolutionFolderTreeServer) -#define MN_EVOLUTION_FOLDER_TREE_SERVER_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_folder_tree_server_get_type(), MNEvolutionFolderTreeServer const) -#define MN_EVOLUTION_FOLDER_TREE_SERVER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_evolution_folder_tree_server_get_type(), MNEvolutionFolderTreeServerClass) -#define MN_IS_EVOLUTION_FOLDER_TREE_SERVER(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_evolution_folder_tree_server_get_type ()) - -#define MN_EVOLUTION_FOLDER_TREE_SERVER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_evolution_folder_tree_server_get_type(), MNEvolutionFolderTreeServerClass) - -/* Private structure type */ -typedef struct _MNEvolutionFolderTreeServerPrivate MNEvolutionFolderTreeServerPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_EVOLUTION_FOLDER_TREE_SERVER__ -#define __TYPEDEF_MN_EVOLUTION_FOLDER_TREE_SERVER__ -typedef struct _MNEvolutionFolderTreeServer MNEvolutionFolderTreeServer; -#endif -struct _MNEvolutionFolderTreeServer { - GObject __parent__; - /*< private >*/ - MNEvolutionFolderTreeServerPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNEvolutionFolderTreeServerClass MNEvolutionFolderTreeServerClass; -struct _MNEvolutionFolderTreeServerClass { - GObjectClass __parent__; - /*signal*/void (* folder_selected) (MNEvolutionFolderTreeServer * self, const char * uri); - /*signal*/void (* folder_activated) (MNEvolutionFolderTreeServer * self); -}; - - -/* - * Public methods - */ -GType mn_evolution_folder_tree_server_get_type (void) G_GNUC_CONST; -#line 125 "src/mn-evolution-folder-tree-server.gob" -MNEvolutionFolderTreeServer * mn_evolution_folder_tree_server_new (guint32 id); -#line 58 "mn-evolution-folder-tree-server.h" - -/* - * Signal connection wrapper macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define mn_evolution_folder_tree_server_connect__folder_selected(object,func,data) g_signal_connect(MN_EVOLUTION_FOLDER_TREE_SERVER(__extension__ ({MNEvolutionFolderTreeServer *___object = (object); ___object; })),"folder_selected",(GCallback) __extension__ ({void (* ___folder_selected) (MNEvolutionFolderTreeServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___folder_selected; }), (data)) -#define mn_evolution_folder_tree_server_connect_after__folder_selected(object,func,data) g_signal_connect_after(MN_EVOLUTION_FOLDER_TREE_SERVER(__extension__ ({MNEvolutionFolderTreeServer *___object = (object); ___object; })),"folder_selected",(GCallback) __extension__ ({void (* ___folder_selected) (MNEvolutionFolderTreeServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___folder_selected; }), (data)) -#define mn_evolution_folder_tree_server_connect_data__folder_selected(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_FOLDER_TREE_SERVER(__extension__ ({MNEvolutionFolderTreeServer *___object = (object); ___object; })),"folder_selected",(GCallback) __extension__ ({void (* ___folder_selected) (MNEvolutionFolderTreeServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___folder_selected; }), (data), (destroy_data), (GConnectFlags)(flags)) -#define mn_evolution_folder_tree_server_connect__folder_activated(object,func,data) g_signal_connect(MN_EVOLUTION_FOLDER_TREE_SERVER(__extension__ ({MNEvolutionFolderTreeServer *___object = (object); ___object; })),"folder_activated",(GCallback) __extension__ ({void (* ___folder_activated) (MNEvolutionFolderTreeServer * ___fake___self, gpointer ___data ) = (func); ___folder_activated; }), (data)) -#define mn_evolution_folder_tree_server_connect_after__folder_activated(object,func,data) g_signal_connect_after(MN_EVOLUTION_FOLDER_TREE_SERVER(__extension__ ({MNEvolutionFolderTreeServer *___object = (object); ___object; })),"folder_activated",(GCallback) __extension__ ({void (* ___folder_activated) (MNEvolutionFolderTreeServer * ___fake___self, gpointer ___data ) = (func); ___folder_activated; }), (data)) -#define mn_evolution_folder_tree_server_connect_data__folder_activated(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_FOLDER_TREE_SERVER(__extension__ ({MNEvolutionFolderTreeServer *___object = (object); ___object; })),"folder_activated",(GCallback) __extension__ ({void (* ___folder_activated) (MNEvolutionFolderTreeServer * ___fake___self, gpointer ___data ) = (func); ___folder_activated; }), (data), (destroy_data), (GConnectFlags)(flags)) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define mn_evolution_folder_tree_server_connect__folder_selected(object,func,data) g_signal_connect(MN_EVOLUTION_FOLDER_TREE_SERVER(object),"folder_selected",(GCallback)(func),(data)) -#define mn_evolution_folder_tree_server_connect_after__folder_selected(object,func,data) g_signal_connect_after(MN_EVOLUTION_FOLDER_TREE_SERVER(object),"folder_selected",(GCallback)(func),(data)) -#define mn_evolution_folder_tree_server_connect_data__folder_selected(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_FOLDER_TREE_SERVER(object),"folder_selected",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags)) -#define mn_evolution_folder_tree_server_connect__folder_activated(object,func,data) g_signal_connect(MN_EVOLUTION_FOLDER_TREE_SERVER(object),"folder_activated",(GCallback)(func),(data)) -#define mn_evolution_folder_tree_server_connect_after__folder_activated(object,func,data) g_signal_connect_after(MN_EVOLUTION_FOLDER_TREE_SERVER(object),"folder_activated",(GCallback)(func),(data)) -#define mn_evolution_folder_tree_server_connect_data__folder_activated(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_FOLDER_TREE_SERVER(object),"folder_activated",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags)) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_EVOLUTION_FOLDER_TREE_SERVER_PROP_ID(arg) "id", __extension__ ({guint z = (arg); z;}) -#define MN_EVOLUTION_FOLDER_TREE_SERVER_GET_PROP_ID(arg) "id", __extension__ ({guint *z = (arg); z;}) -#define MN_EVOLUTION_FOLDER_TREE_SERVER_PROP_URI(arg) "uri", __extension__ ({gchar *z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_EVOLUTION_FOLDER_TREE_SERVER_PROP_ID(arg) "id",(guint )(arg) -#define MN_EVOLUTION_FOLDER_TREE_SERVER_GET_PROP_ID(arg) "id",(guint *)(arg) -#define MN_EVOLUTION_FOLDER_TREE_SERVER_PROP_URI(arg) "uri",(gchar *)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-mailbox-private.h b/build/src/mn-evolution-mailbox-private.h @@ -1,35 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#ifndef __MN_EVOLUTION_MAILBOX_PRIVATE_H__ -#define __MN_EVOLUTION_MAILBOX_PRIVATE_H__ - -#include "mn-evolution-mailbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#line 24 "src/mn-evolution-mailbox.gob" - -#include <time.h> -#include "mn-evolution-client.h" - -#line 19 "mn-evolution-mailbox-private.h" -struct _MNEvolutionMailboxPrivate { -#line 65 "src/mn-evolution-mailbox.gob" - MNEvolutionClient * client; -#line 66 "src/mn-evolution-mailbox.gob" - gboolean signals_connected; -#line 67 "src/mn-evolution-mailbox.gob" - DBusGProxyCall * pending_call; -#line 69 "src/mn-evolution-mailbox.gob" - time_t last_browsed; -#line 29 "mn-evolution-mailbox-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-mailbox-properties-private.h b/build/src/mn-evolution-mailbox-properties-private.h @@ -1,30 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#ifndef __MN_EVOLUTION_MAILBOX_PROPERTIES_PRIVATE_H__ -#define __MN_EVOLUTION_MAILBOX_PROPERTIES_PRIVATE_H__ - -#include "mn-evolution-mailbox-properties.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#line 24 "src/mn-evolution-mailbox-properties.gob" - -#include "mn-evolution-client.h" - -#line 18 "mn-evolution-mailbox-properties-private.h" -struct _MNEvolutionMailboxPropertiesPrivate { -#line 41 "src/mn-evolution-mailbox-properties.gob" - GtkWidget * tree; -#line 43 "src/mn-evolution-mailbox-properties.gob" - char * name; -#line 24 "mn-evolution-mailbox-properties-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-mailbox-properties.c b/build/src/mn-evolution-mailbox-properties.c @@ -1,349 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 15 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-evolution-mailbox-properties.h" - -#include "mn-evolution-mailbox-properties-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 28 "src/mn-evolution-mailbox-properties.gob" - -#include <glib/gi18n.h> -#include "mn-evolution-mailbox.h" -#include "mn-stock.h" -#include "mn-mailbox-properties-private.h" -#include "mn-shell.h" -#include "mn-evolution-client-dbus.h" -#include "mn-util.h" -#include "mn-evolution-folder-tree-client.h" - -#line 37 "mn-evolution-mailbox-properties.c" -/* self casting macros */ -#define SELF(x) MN_EVOLUTION_MAILBOX_PROPERTIES(x) -#define SELF_CONST(x) MN_EVOLUTION_MAILBOX_PROPERTIES_CONST(x) -#define IS_SELF(x) MN_IS_EVOLUTION_MAILBOX_PROPERTIES(x) -#define TYPE_SELF MN_TYPE_EVOLUTION_MAILBOX_PROPERTIES -#define SELF_CLASS(x) MN_EVOLUTION_MAILBOX_PROPERTIES_CLASS(x) - -#define SELF_GET_CLASS(x) MN_EVOLUTION_MAILBOX_PROPERTIES_GET_CLASS(x) - -/* self typedefs */ -typedef MNEvolutionMailboxProperties Self; -typedef MNEvolutionMailboxPropertiesClass SelfClass; - -/* here are local prototypes */ -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 55 "src/mn-evolution-mailbox-properties.gob" -static void mn_evolution_mailbox_properties_class_init (MNEvolutionMailboxPropertiesClass * class); -#line 55 "mn-evolution-mailbox-properties.c" -#line 65 "src/mn-evolution-mailbox-properties.gob" -static void mn_evolution_mailbox_properties_init (MNEvolutionMailboxProperties * self); -#line 58 "mn-evolution-mailbox-properties.c" -#line 84 "src/mn-evolution-mailbox-properties.gob" -static void mn_evolution_mailbox_properties_notify_selected_uri_h (GObject * object, GParamSpec * pspec, gpointer user_data); -#line 61 "mn-evolution-mailbox-properties.c" -#line 102 "src/mn-evolution-mailbox-properties.gob" -static void mn_evolution_mailbox_properties_folder_activated_h (MNEvolutionFolderTreeClient * client, gpointer user_data); -#line 64 "mn-evolution-mailbox-properties.c" -#line 110 "src/mn-evolution-mailbox-properties.gob" -static void ___5_mn_evolution_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox); -#line 67 "mn-evolution-mailbox-properties.c" -#line 122 "src/mn-evolution-mailbox-properties.gob" -static MNMailbox * ___6_mn_evolution_mailbox_properties_get_mailbox (MNMailboxProperties * properties); -#line 70 "mn-evolution-mailbox-properties.c" - -enum { - PROP_0, - PROP_COMPLETE, - PROP_DEFAULT_NAME -}; - -/* pointer to the class of our parent */ -static MNMailboxPropertiesClass *parent_class = NULL; - -/* Short form macros */ -#define self_notify_selected_uri_h mn_evolution_mailbox_properties_notify_selected_uri_h -#define self_folder_activated_h mn_evolution_mailbox_properties_folder_activated_h -GType -mn_evolution_mailbox_properties_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNEvolutionMailboxPropertiesClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_evolution_mailbox_properties_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNEvolutionMailboxProperties), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_evolution_mailbox_properties_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_MAILBOX_PROPERTIES, "MNEvolutionMailboxProperties", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNEvolutionMailboxProperties *)g_object_new(mn_evolution_mailbox_properties_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNEvolutionMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNEvolutionMailboxProperties * -GET_NEW_VARG (const char *first, ...) -{ - MNEvolutionMailboxProperties *ret; - va_list ap; - va_start (ap, first); - ret = (MNEvolutionMailboxProperties *)g_object_new_valist (mn_evolution_mailbox_properties_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox:Properties::finalize" - MNEvolutionMailboxProperties *self G_GNUC_UNUSED = MN_EVOLUTION_MAILBOX_PROPERTIES (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 43 "src/mn-evolution-mailbox-properties.gob" - if(self->_priv->name) { g_free ((gpointer) self->_priv->name); self->_priv->name = NULL; } -#line 137 "mn-evolution-mailbox-properties.c" -} -#undef __GOB_FUNCTION__ - -#line 55 "src/mn-evolution-mailbox-properties.gob" -static void -mn_evolution_mailbox_properties_class_init (MNEvolutionMailboxPropertiesClass * class G_GNUC_UNUSED) -{ -#line 145 "mn-evolution-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox:Properties::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - MNMailboxPropertiesClass *mn_mailbox_properties_class = (MNMailboxPropertiesClass *)class; - - g_type_class_add_private(class,sizeof(MNEvolutionMailboxPropertiesPrivate)); - - parent_class = g_type_class_ref (MN_TYPE_MAILBOX_PROPERTIES); - -#line 110 "src/mn-evolution-mailbox-properties.gob" - mn_mailbox_properties_class->set_mailbox = ___5_mn_evolution_mailbox_properties_set_mailbox; -#line 122 "src/mn-evolution-mailbox-properties.gob" - mn_mailbox_properties_class->get_mailbox = ___6_mn_evolution_mailbox_properties_get_mailbox; -#line 158 "mn-evolution-mailbox-properties.c" - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - { - g_object_class_override_property (g_object_class, - PROP_COMPLETE, - "complete"); - g_object_class_override_property (g_object_class, - PROP_DEFAULT_NAME, - "default_name"); - } - { -#line 56 "src/mn-evolution-mailbox-properties.gob" - - MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class); - - p_class->type = "evolution"; - p_class->stock_id = MN_STOCK_EVOLUTION_MAILBOX; - p_class->combo_label = "Evolution"; - p_class->enable_check_delay = FALSE; - -#line 179 "mn-evolution-mailbox-properties.c" - } -} -#undef __GOB_FUNCTION__ -#line 65 "src/mn-evolution-mailbox-properties.gob" -static void -mn_evolution_mailbox_properties_init (MNEvolutionMailboxProperties * self G_GNUC_UNUSED) -{ -#line 187 "mn-evolution-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox:Properties::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_EVOLUTION_MAILBOX_PROPERTIES,MNEvolutionMailboxPropertiesPrivate); - { -#line 66 "src/mn-evolution-mailbox-properties.gob" - - MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self); - GtkWidget *vbox; - - /* translators: header capitalization */ - vbox = mn_mailbox_properties_add_general_section(properties, _("Folder")); - - selfp->tree = mn_evolution_folder_tree_client_new(); - gtk_box_pack_start(GTK_BOX(vbox), selfp->tree, TRUE, TRUE, 0); - gtk_widget_show(selfp->tree); - - g_object_connect(selfp->tree, - "swapped-signal::notify::connected", mn_mailbox_properties_notify_complete, self, - "signal::notify::selected-uri", self_notify_selected_uri_h, self, - "signal::folder-activated", self_folder_activated_h, self, - NULL); - -#line 209 "mn-evolution-mailbox-properties.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox:Properties::get_property" -{ - MNEvolutionMailboxProperties *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_MAILBOX_PROPERTIES (object); - - switch (property_id) { - case PROP_COMPLETE: - { -#line 47 "src/mn-evolution-mailbox-properties.gob" - - MNEvolutionFolderTreeClient *tree = MN_EVOLUTION_FOLDER_TREE_CLIENT(selfp->tree); - g_value_set_boolean(VAL, mn_evolution_folder_tree_client_get_connected(tree) && tree->selected_uri != NULL); - -#line 233 "mn-evolution-mailbox-properties.c" - } - break; - case PROP_DEFAULT_NAME: - { -#line 53 "src/mn-evolution-mailbox-properties.gob" - g_value_set_string(VAL, selfp->name); -#line 240 "mn-evolution-mailbox-properties.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - - -#line 84 "src/mn-evolution-mailbox-properties.gob" -static void -mn_evolution_mailbox_properties_notify_selected_uri_h (GObject * object, GParamSpec * pspec, gpointer user_data) -{ -#line 261 "mn-evolution-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox:Properties::notify_selected_uri_h" -{ -#line 86 "src/mn-evolution-mailbox-properties.gob" - - Self *self = user_data; - MNEvolutionClient *client; - char *name = NULL; - - client = mn_evolution_client_get(); - if (client->proxy) - org_gnome_MailNotification_Evolution_get_folder_name(client->proxy, MN_EVOLUTION_FOLDER_TREE_CLIENT(selfp->tree)->selected_uri, &name, NULL); - - g_free(selfp->name); - selfp->name = name; - - g_object_notify(G_OBJECT(self), "complete"); - g_object_notify(G_OBJECT(self), "default-name"); - }} -#line 280 "mn-evolution-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 102 "src/mn-evolution-mailbox-properties.gob" -static void -mn_evolution_mailbox_properties_folder_activated_h (MNEvolutionFolderTreeClient * client, gpointer user_data) -{ -#line 287 "mn-evolution-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox:Properties::folder_activated_h" -{ -#line 104 "src/mn-evolution-mailbox-properties.gob" - - Self *self = user_data; - - gtk_window_activate_default(GTK_WINDOW(MN_MAILBOX_PROPERTIES(self)->dialog)); - }} -#line 296 "mn-evolution-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 110 "src/mn-evolution-mailbox-properties.gob" -static void -___5_mn_evolution_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox) -#line 302 "mn-evolution-mailbox-properties.c" -#define PARENT_HANDLER(___properties,___mailbox) \ - { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \ - (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox:Properties::set_mailbox" -{ -#line 112 "src/mn-evolution-mailbox-properties.gob" - - Self *self = SELF(properties); - MNEvolutionMailbox *evolution_mailbox = MN_EVOLUTION_MAILBOX(mailbox); - - mn_evolution_folder_tree_client_set_selected_uri(MN_EVOLUTION_FOLDER_TREE_CLIENT(selfp->tree), evolution_mailbox->uri); - - g_free(selfp->name); - selfp->name = g_strdup(evolution_mailbox->folder_name); - }} -#line 319 "mn-evolution-mailbox-properties.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 122 "src/mn-evolution-mailbox-properties.gob" -static MNMailbox * -___6_mn_evolution_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED) -#line 326 "mn-evolution-mailbox-properties.c" -#define PARENT_HANDLER(___properties) \ - ((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \ - (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \ - ((MNMailbox * )0)) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox:Properties::get_mailbox" -{ -#line 124 "src/mn-evolution-mailbox-properties.gob" - - Self *self = SELF(properties); - MNMailbox *mailbox; - - mailbox = PARENT_HANDLER(properties); - - g_object_set(mailbox, - MN_EVOLUTION_MAILBOX_PROP_URI(MN_EVOLUTION_FOLDER_TREE_CLIENT(selfp->tree)->selected_uri), - MN_EVOLUTION_MAILBOX_PROP_FOLDER_NAME(selfp->name), - NULL); - - return mailbox; - }} -#line 348 "mn-evolution-mailbox-properties.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER diff --git a/build/src/mn-evolution-mailbox-properties.gob.stamp b/build/src/mn-evolution-mailbox-properties.gob.stamp diff --git a/build/src/mn-evolution-mailbox-properties.h b/build/src/mn-evolution-mailbox-properties.h @@ -1,74 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include "mn-mailbox-properties.h" - -#ifndef __MN_EVOLUTION_MAILBOX_PROPERTIES_H__ -#define __MN_EVOLUTION_MAILBOX_PROPERTIES_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_EVOLUTION_MAILBOX_PROPERTIES (mn_evolution_mailbox_properties_get_type()) -#define MN_EVOLUTION_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_mailbox_properties_get_type(), MNEvolutionMailboxProperties) -#define MN_EVOLUTION_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_mailbox_properties_get_type(), MNEvolutionMailboxProperties const) -#define MN_EVOLUTION_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_evolution_mailbox_properties_get_type(), MNEvolutionMailboxPropertiesClass) -#define MN_IS_EVOLUTION_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_evolution_mailbox_properties_get_type ()) - -#define MN_EVOLUTION_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_evolution_mailbox_properties_get_type(), MNEvolutionMailboxPropertiesClass) - -/* Private structure type */ -typedef struct _MNEvolutionMailboxPropertiesPrivate MNEvolutionMailboxPropertiesPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_EVOLUTION_MAILBOX_PROPERTIES__ -#define __TYPEDEF_MN_EVOLUTION_MAILBOX_PROPERTIES__ -typedef struct _MNEvolutionMailboxProperties MNEvolutionMailboxProperties; -#endif -struct _MNEvolutionMailboxProperties { - MNMailboxProperties __parent__; - /*< private >*/ - MNEvolutionMailboxPropertiesPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNEvolutionMailboxPropertiesClass MNEvolutionMailboxPropertiesClass; -struct _MNEvolutionMailboxPropertiesClass { - MNMailboxPropertiesClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_evolution_mailbox_properties_get_type (void) G_GNUC_CONST; - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_EVOLUTION_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;}) -#define MN_EVOLUTION_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_EVOLUTION_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg) -#define MN_EVOLUTION_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name",(gchar **)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-mailbox.c b/build/src/mn-evolution-mailbox.c @@ -1,633 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 15 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-evolution-mailbox.h" - -#include "mn-evolution-mailbox-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 29 "src/mn-evolution-mailbox.gob" - -#include <stdarg.h> -#include <gobject/gvaluecollector.h> -#include <glib/gi18n.h> -#include "mn-evolution.h" -#include "mn-mailbox-private.h" -#include "mn-message.h" -#include "mn-util.h" -#include "mn-stock.h" -#include "mn-evolution-message.h" -#include "mn-shell.h" -#include "mn-evolution-client-dbus.h" - -typedef struct -{ - const char *uid; - unsigned int sent_time; - unsigned int received_time; - const char *id; - const char *from; - const char *subject; -} MessageInfo; - -#line 50 "mn-evolution-mailbox.c" -/* self casting macros */ -#define SELF(x) MN_EVOLUTION_MAILBOX(x) -#define SELF_CONST(x) MN_EVOLUTION_MAILBOX_CONST(x) -#define IS_SELF(x) MN_IS_EVOLUTION_MAILBOX(x) -#define TYPE_SELF MN_TYPE_EVOLUTION_MAILBOX -#define SELF_CLASS(x) MN_EVOLUTION_MAILBOX_CLASS(x) - -#define SELF_GET_CLASS(x) MN_EVOLUTION_MAILBOX_GET_CLASS(x) - -/* self typedefs */ -typedef MNEvolutionMailbox Self; -typedef MNEvolutionMailboxClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 71 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_class_init (MNEvolutionMailboxClass * class); -#line 69 "mn-evolution-mailbox.c" -#line 76 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_init (MNEvolutionMailbox * self); -#line 72 "mn-evolution-mailbox.c" -#line 85 "src/mn-evolution-mailbox.gob" -static void ___3_mn_evolution_mailbox_seal (MNMailbox * mailbox); -#line 75 "mn-evolution-mailbox.c" -#line 94 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_finalize (MNEvolutionMailbox * self); -#line 78 "mn-evolution-mailbox.c" -#line 110 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_connect_proxy_signals (MNEvolutionMailbox * self); -#line 81 "mn-evolution-mailbox.c" -#line 133 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_disconnect_proxy_signals (MNEvolutionMailbox * self); -#line 84 "mn-evolution-mailbox.c" -#line 156 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_folder_changed_h (DBusGProxy * proxy, const char * uri, gpointer user_data); -#line 87 "mn-evolution-mailbox.c" -#line 169 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_message_reading_h (DBusGProxy * proxy, const char * uri, gpointer user_data); -#line 90 "mn-evolution-mailbox.c" -#line 184 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_value_array_get_values (GValueArray * value_array, ...); -#line 93 "mn-evolution-mailbox.c" -#line 204 "src/mn-evolution-mailbox.gob" -static void ___a_mn_evolution_mailbox_check (MNMailbox * mailbox); -#line 96 "mn-evolution-mailbox.c" -#line 241 "src/mn-evolution-mailbox.gob" -static void mn_evolution_mailbox_get_unseen_messages_cb (DBusGProxy * proxy, GPtrArray * messages_array, GError * err, gpointer user_data); -#line 99 "mn-evolution-mailbox.c" - -enum { - PROP_0, - PROP_URI, - PROP_FOLDER_NAME -}; - -/* pointer to the class of our parent */ -static MNMailboxClass *parent_class = NULL; - -/* Short form macros */ -#define self_connect_proxy_signals mn_evolution_mailbox_connect_proxy_signals -#define self_disconnect_proxy_signals mn_evolution_mailbox_disconnect_proxy_signals -#define self_folder_changed_h mn_evolution_mailbox_folder_changed_h -#define self_message_reading_h mn_evolution_mailbox_message_reading_h -#define self_value_array_get_values mn_evolution_mailbox_value_array_get_values -#define self_get_unseen_messages_cb mn_evolution_mailbox_get_unseen_messages_cb -GType -mn_evolution_mailbox_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNEvolutionMailboxClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_evolution_mailbox_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNEvolutionMailbox), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_evolution_mailbox_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_MAILBOX, "MNEvolutionMailbox", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNEvolutionMailbox *)g_object_new(mn_evolution_mailbox_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNEvolutionMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNEvolutionMailbox * -GET_NEW_VARG (const char *first, ...) -{ - MNEvolutionMailbox *ret; - va_list ap; - va_start (ap, first); - ret = (MNEvolutionMailbox *)g_object_new_valist (mn_evolution_mailbox_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::finalize" - MNEvolutionMailbox *self G_GNUC_UNUSED = MN_EVOLUTION_MAILBOX (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; -#line 94 "src/mn-evolution-mailbox.gob" - mn_evolution_mailbox_finalize (self); -#line 168 "mn-evolution-mailbox.c" - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 55 "src/mn-evolution-mailbox.gob" - if(self->uri) { g_free ((gpointer) self->uri); self->uri = NULL; } -#line 173 "mn-evolution-mailbox.c" -#line 62 "src/mn-evolution-mailbox.gob" - if(self->folder_name) { g_free ((gpointer) self->folder_name); self->folder_name = NULL; } -#line 176 "mn-evolution-mailbox.c" -} -#undef __GOB_FUNCTION__ - -#line 71 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_class_init (MNEvolutionMailboxClass * class G_GNUC_UNUSED) -{ -#line 184 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)class; - - g_type_class_add_private(class,sizeof(MNEvolutionMailboxPrivate)); - - parent_class = g_type_class_ref (MN_TYPE_MAILBOX); - -#line 85 "src/mn-evolution-mailbox.gob" - mn_mailbox_class->seal = ___3_mn_evolution_mailbox_seal; -#line 204 "src/mn-evolution-mailbox.gob" - mn_mailbox_class->check = ___a_mn_evolution_mailbox_check; -#line 197 "mn-evolution-mailbox.c" - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_string - ("uri" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE)); - g_object_class_install_property (g_object_class, - PROP_URI, - param_spec); - param_spec = g_param_spec_string - ("folder_name" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE)); - g_object_class_install_property (g_object_class, - PROP_FOLDER_NAME, - param_spec); - } - { -#line 72 "src/mn-evolution-mailbox.gob" - - MN_MAILBOX_CLASS(class)->type = "evolution"; - -#line 228 "mn-evolution-mailbox.c" - } -} -#undef __GOB_FUNCTION__ -#line 76 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_init (MNEvolutionMailbox * self G_GNUC_UNUSED) -{ -#line 236 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_EVOLUTION_MAILBOX,MNEvolutionMailboxPrivate); - { -#line 77 "src/mn-evolution-mailbox.gob" - - mn_mailbox_set_format(MN_MAILBOX(self), "Evolution"); - mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_EVOLUTION_MAILBOX); - - /* we receive notifications from Evolution, no need to poll */ - mn_mailbox_set_poll(MN_MAILBOX(self), FALSE); - -#line 248 "mn-evolution-mailbox.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::set_property" -{ - MNEvolutionMailbox *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_MAILBOX (object); - - switch (property_id) { - case PROP_URI: - { -#line 56 "src/mn-evolution-mailbox.gob" -{ char *old = self->uri; self->uri = g_value_dup_string (VAL); g_free (old); } -#line 269 "mn-evolution-mailbox.c" - } - break; - case PROP_FOLDER_NAME: - { -#line 63 "src/mn-evolution-mailbox.gob" -{ char *old = self->folder_name; self->folder_name = g_value_dup_string (VAL); g_free (old); } -#line 276 "mn-evolution-mailbox.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::get_property" -{ - MNEvolutionMailbox *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_MAILBOX (object); - - switch (property_id) { - case PROP_URI: - { -#line 56 "src/mn-evolution-mailbox.gob" -g_value_set_string (VAL, self->uri); -#line 307 "mn-evolution-mailbox.c" - } - break; - case PROP_FOLDER_NAME: - { -#line 63 "src/mn-evolution-mailbox.gob" -g_value_set_string (VAL, self->folder_name); -#line 314 "mn-evolution-mailbox.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - - -#line 85 "src/mn-evolution-mailbox.gob" -static void -___3_mn_evolution_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED) -#line 334 "mn-evolution-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->seal) \ - (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::seal" -{ -#line 87 "src/mn-evolution-mailbox.gob" - - PARENT_HANDLER(mailbox); - - if (! mailbox->runtime_name) - mailbox->runtime_name = g_strdup(SELF(mailbox)->folder_name); - }} -#line 348 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 94 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_finalize (MNEvolutionMailbox * self) -{ -#line 356 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::finalize" -{ -#line 95 "src/mn-evolution-mailbox.gob" - - if (selfp->client) - { - if (selfp->pending_call) - { - g_assert(selfp->client->proxy != NULL); - dbus_g_proxy_cancel_call(selfp->client->proxy, selfp->pending_call); - } - - self_disconnect_proxy_signals(self); - - g_signal_handlers_disconnect_by_func(selfp->client, mn_mailbox_check, self); - } - }} -#line 374 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 110 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_connect_proxy_signals (MNEvolutionMailbox * self) -{ -#line 381 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::connect_proxy_signals" -#line 110 "src/mn-evolution-mailbox.gob" - g_return_if_fail (self != NULL); -#line 110 "src/mn-evolution-mailbox.gob" - g_return_if_fail (MN_IS_EVOLUTION_MAILBOX (self)); -#line 387 "mn-evolution-mailbox.c" -{ -#line 112 "src/mn-evolution-mailbox.gob" - - g_return_if_fail(selfp->client != NULL); - g_return_if_fail(selfp->client->proxy != NULL); - - if (selfp->signals_connected) - return; - - dbus_g_proxy_connect_signal(selfp->client->proxy, - MN_EVOLUTION_SERVER_SIGNAL_FOLDER_CHANGED, - G_CALLBACK(self_folder_changed_h), - self, - NULL); - dbus_g_proxy_connect_signal(selfp->client->proxy, - MN_EVOLUTION_SERVER_SIGNAL_MESSAGE_READING, - G_CALLBACK(self_message_reading_h), - self, - NULL); - - selfp->signals_connected = TRUE; - }} -#line 410 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 133 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_disconnect_proxy_signals (MNEvolutionMailbox * self) -{ -#line 417 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::disconnect_proxy_signals" -#line 133 "src/mn-evolution-mailbox.gob" - g_return_if_fail (self != NULL); -#line 133 "src/mn-evolution-mailbox.gob" - g_return_if_fail (MN_IS_EVOLUTION_MAILBOX (self)); -#line 423 "mn-evolution-mailbox.c" -{ -#line 135 "src/mn-evolution-mailbox.gob" - - g_return_if_fail(selfp->client != NULL); - - if (! selfp->signals_connected) - return; - - selfp->signals_connected = FALSE; - - if (! selfp->client->proxy) - return; - - dbus_g_proxy_disconnect_signal(selfp->client->proxy, - MN_EVOLUTION_SERVER_SIGNAL_FOLDER_CHANGED, - G_CALLBACK(self_folder_changed_h), - self); - dbus_g_proxy_disconnect_signal(selfp->client->proxy, - MN_EVOLUTION_SERVER_SIGNAL_MESSAGE_READING, - G_CALLBACK(self_message_reading_h), - self); - }} -#line 446 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 156 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_folder_changed_h (DBusGProxy * proxy, const char * uri, gpointer user_data) -{ -#line 453 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::folder_changed_h" -{ -#line 158 "src/mn-evolution-mailbox.gob" - - Self *self = user_data; - - if (! strcmp(uri, self->uri)) - { - GDK_THREADS_ENTER(); - mn_mailbox_check(MN_MAILBOX(self)); - GDK_THREADS_LEAVE(); - } - }} -#line 467 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 169 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_message_reading_h (DBusGProxy * proxy, const char * uri, gpointer user_data) -{ -#line 474 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::message_reading_h" -{ -#line 171 "src/mn-evolution-mailbox.gob" - - Self *self = user_data; - - if (! strcmp(uri, self->uri)) - { - selfp->last_browsed = mn_time(); - - GDK_THREADS_ENTER(); - mn_mailbox_check(MN_MAILBOX(self)); - GDK_THREADS_LEAVE(); - } - }} -#line 490 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 184 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_value_array_get_values (GValueArray * value_array, ...) -{ -#line 497 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::value_array_get_values" -#line 184 "src/mn-evolution-mailbox.gob" - g_return_if_fail (value_array != NULL); -#line 501 "mn-evolution-mailbox.c" -{ -#line 186 "src/mn-evolution-mailbox.gob" - - va_list args; - int i; - - va_start(args, value_array); - - for (i = 0; i < value_array->n_values; i++) - { - GValue *value = g_value_array_get_nth(value_array, i); - char *error = NULL; - - G_VALUE_LCOPY(value, args, G_VALUE_NOCOPY_CONTENTS, &error); - g_assert(error == NULL); - } - - va_end(args); - }} -#line 521 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 204 "src/mn-evolution-mailbox.gob" -static void -___a_mn_evolution_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED) -#line 527 "mn-evolution-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->check) \ - (* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::check" -{ -#line 206 "src/mn-evolution-mailbox.gob" - - Self *self = SELF(mailbox); - - PARENT_HANDLER(mailbox); - - mn_mailbox_set_error(mailbox, NULL); - - if (! selfp->client) - { - selfp->client = mn_evolution_client_get(); - g_signal_connect_swapped(selfp->client, "notify::proxy", G_CALLBACK(mn_mailbox_check), self); - } - - if (! selfp->client->proxy) /* not connected */ - { - selfp->pending_call = NULL; - - self_disconnect_proxy_signals(self); - - mn_mailbox_set_error(mailbox, _("unable to contact Evolution")); - - return; - } - - self_connect_proxy_signals(self); - - if (selfp->pending_call) - dbus_g_proxy_cancel_call(selfp->client->proxy, selfp->pending_call); - - selfp->pending_call = org_gnome_MailNotification_Evolution_get_unseen_messages_async(selfp->client->proxy, - self->uri, - self_get_unseen_messages_cb, - self); - }} -#line 569 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 241 "src/mn-evolution-mailbox.gob" -static void -mn_evolution_mailbox_get_unseen_messages_cb (DBusGProxy * proxy, GPtrArray * messages_array, GError * err, gpointer user_data) -{ -#line 577 "mn-evolution-mailbox.c" -#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::get_unseen_messages_cb" -{ -#line 246 "src/mn-evolution-mailbox.gob" - - Self *self = user_data; - - GDK_THREADS_ENTER(); - - if (err) - { - mn_mailbox_set_error(MN_MAILBOX(self), "%s", err->message); - g_error_free(err); - } - else - { - int i; - GSList *messages = NULL; - - for (i = 0; i < messages_array->len; i++) - { - GValueArray *value_array = g_ptr_array_index(messages_array, i); - MessageInfo info; - MNMessageFlags flags = 0; - - self_value_array_get_values(value_array, - &info.uid, - &info.sent_time, - &info.received_time, - &info.id, - &info.from, - &info.subject); - - if (info.received_time > selfp->last_browsed) - flags |= MN_MESSAGE_NEW; - - messages = g_slist_prepend(messages, - mn_evolution_message_new(MN_MAILBOX(self), - info.sent_time, - info.id, - info.from, - info.subject, - flags, - info.uid)); - } - - mn_g_ptr_array_free_deep_custom(messages_array, (GFunc) g_value_array_free, NULL); - - mn_mailbox_set_messages(MN_MAILBOX(self), messages); - mn_g_object_slist_free(messages); - } - - selfp->pending_call = NULL; - - GDK_THREADS_LEAVE(); - }} -#line 633 "mn-evolution-mailbox.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-evolution-mailbox.gob.stamp b/build/src/mn-evolution-mailbox.gob.stamp diff --git a/build/src/mn-evolution-mailbox.h b/build/src/mn-evolution-mailbox.h @@ -1,81 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include "mn-mailbox.h" - -#ifndef __MN_EVOLUTION_MAILBOX_H__ -#define __MN_EVOLUTION_MAILBOX_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_EVOLUTION_MAILBOX (mn_evolution_mailbox_get_type()) -#define MN_EVOLUTION_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_mailbox_get_type(), MNEvolutionMailbox) -#define MN_EVOLUTION_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_mailbox_get_type(), MNEvolutionMailbox const) -#define MN_EVOLUTION_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_evolution_mailbox_get_type(), MNEvolutionMailboxClass) -#define MN_IS_EVOLUTION_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_evolution_mailbox_get_type ()) - -#define MN_EVOLUTION_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_evolution_mailbox_get_type(), MNEvolutionMailboxClass) - -/* Private structure type */ -typedef struct _MNEvolutionMailboxPrivate MNEvolutionMailboxPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_EVOLUTION_MAILBOX__ -#define __TYPEDEF_MN_EVOLUTION_MAILBOX__ -typedef struct _MNEvolutionMailbox MNEvolutionMailbox; -#endif -struct _MNEvolutionMailbox { - MNMailbox __parent__; - /*< public >*/ - char * uri; - char * folder_name; - /*< private >*/ - MNEvolutionMailboxPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNEvolutionMailboxClass MNEvolutionMailboxClass; -struct _MNEvolutionMailboxClass { - MNMailboxClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_evolution_mailbox_get_type (void) G_GNUC_CONST; - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_EVOLUTION_MAILBOX_PROP_URI(arg) "uri", __extension__ ({gchar *z = (arg); z;}) -#define MN_EVOLUTION_MAILBOX_GET_PROP_URI(arg) "uri", __extension__ ({gchar **z = (arg); z;}) -#define MN_EVOLUTION_MAILBOX_PROP_FOLDER_NAME(arg) "folder_name", __extension__ ({gchar *z = (arg); z;}) -#define MN_EVOLUTION_MAILBOX_GET_PROP_FOLDER_NAME(arg) "folder_name", __extension__ ({gchar **z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_EVOLUTION_MAILBOX_PROP_URI(arg) "uri",(gchar *)(arg) -#define MN_EVOLUTION_MAILBOX_GET_PROP_URI(arg) "uri",(gchar **)(arg) -#define MN_EVOLUTION_MAILBOX_PROP_FOLDER_NAME(arg) "folder_name",(gchar *)(arg) -#define MN_EVOLUTION_MAILBOX_GET_PROP_FOLDER_NAME(arg) "folder_name",(gchar **)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-message-private.h b/build/src/mn-evolution-message-private.h @@ -1,22 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#ifndef __MN_EVOLUTION_MESSAGE_PRIVATE_H__ -#define __MN_EVOLUTION_MESSAGE_PRIVATE_H__ - -#include "mn-evolution-message.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct _MNEvolutionMessagePrivate { -#line 61 "src/mn-evolution-message.gob" - char * uid; -#line 16 "mn-evolution-message-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-message.c b/build/src/mn-evolution-message.c @@ -1,416 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 15 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-evolution-message.h" - -#include "mn-evolution-message-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 24 "src/mn-evolution-message.gob" - -#include <glib/gi18n.h> -#include <camel/camel-folder-summary.h> -#include "mn-evolution-mailbox.h" -#include "mn-message-private.h" -#include "mn-evolution-client.h" -#include "mn-evolution-client-dbus.h" -#include "mn-util.h" - -#define CLIENT_METHOD(invocation) \ - { \ - MNEvolutionMailbox *mailbox = MN_EVOLUTION_MAILBOX(message->mailbox); \ - MNEvolutionClient *client; \ - GError *tmp_err = NULL; \ - GError *err = NULL; \ - \ - client = mn_evolution_client_get(); \ - \ - if (! client->proxy) \ - { \ - g_set_error(&err, 0, 0, _("Unable to contact Evolution.")); \ - goto end; \ - } \ - \ - if (! invocation) \ - { \ - g_set_error(&err, 0, 0, _("An Evolution error has occurred: %s."), tmp_err->message); \ - g_error_free(tmp_err); \ - } \ - \ - end: \ - mn_message_action_done(request, err); \ - } - -#line 61 "mn-evolution-message.c" -/* self casting macros */ -#define SELF(x) MN_EVOLUTION_MESSAGE(x) -#define SELF_CONST(x) MN_EVOLUTION_MESSAGE_CONST(x) -#define IS_SELF(x) MN_IS_EVOLUTION_MESSAGE(x) -#define TYPE_SELF MN_TYPE_EVOLUTION_MESSAGE -#define SELF_CLASS(x) MN_EVOLUTION_MESSAGE_CLASS(x) - -#define SELF_GET_CLASS(x) MN_EVOLUTION_MESSAGE_GET_CLASS(x) - -/* self typedefs */ -typedef MNEvolutionMessage Self; -typedef MNEvolutionMessageClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "src/mn-evolution-message.gob" -static void mn_evolution_message_init (MNEvolutionMessage * o); -#line 80 "mn-evolution-message.c" -#line 0 "src/mn-evolution-message.gob" -static void mn_evolution_message_class_init (MNEvolutionMessageClass * c); -#line 83 "mn-evolution-message.c" -#line 83 "src/mn-evolution-message.gob" -static gboolean ___2_mn_evolution_message_builtin_can_open (MNMessage * message); -#line 86 "mn-evolution-message.c" -#line 89 "src/mn-evolution-message.gob" -static void ___3_mn_evolution_message_builtin_open (MNMessage * message, MNMessageActionRequest * request); -#line 89 "mn-evolution-message.c" -#line 96 "src/mn-evolution-message.gob" -static void mn_evolution_message_set_flags (MNEvolutionMessage * self, guint32 flags, MNMessageActionRequest * request); -#line 92 "mn-evolution-message.c" -#line 103 "src/mn-evolution-message.gob" -static void ___5_mn_evolution_message_builtin_mark_as_read (MNMessage * message, MNMessageActionRequest * request); -#line 95 "mn-evolution-message.c" -#line 109 "src/mn-evolution-message.gob" -static void ___6_mn_evolution_message_builtin_mark_as_spam (MNMessage * message, MNMessageActionRequest * request); -#line 98 "mn-evolution-message.c" -#line 115 "src/mn-evolution-message.gob" -static void ___7_mn_evolution_message_builtin_delete (MNMessage * message, MNMessageActionRequest * request); -#line 101 "mn-evolution-message.c" - -enum { - PROP_0, - PROP_UID -}; - -/* pointer to the class of our parent */ -static MNMessageClass *parent_class = NULL; - -/* Short form macros */ -#define self_new mn_evolution_message_new -#define self_set_flags mn_evolution_message_set_flags -GType -mn_evolution_message_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNEvolutionMessageClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_evolution_message_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNEvolutionMessage), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_evolution_message_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_MESSAGE, "MNEvolutionMessage", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNEvolutionMessage *)g_object_new(mn_evolution_message_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNEvolutionMessage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNEvolutionMessage * -GET_NEW_VARG (const char *first, ...) -{ - MNEvolutionMessage *ret; - va_list ap; - va_start (ap, first); - ret = (MNEvolutionMessage *)g_object_new_valist (mn_evolution_message_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Message::finalize" - MNEvolutionMessage *self G_GNUC_UNUSED = MN_EVOLUTION_MESSAGE (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 61 "src/mn-evolution-message.gob" - if(self->_priv->uid) { g_free ((gpointer) self->_priv->uid); self->_priv->uid = NULL; } -#line 167 "mn-evolution-message.c" -} -#undef __GOB_FUNCTION__ - -static void -mn_evolution_message_init (MNEvolutionMessage * o G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Message::init" - o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_EVOLUTION_MESSAGE,MNEvolutionMessagePrivate); -} -#undef __GOB_FUNCTION__ -static void -mn_evolution_message_class_init (MNEvolutionMessageClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Message::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c; - MNMessageClass *mn_message_class = (MNMessageClass *)c; - - g_type_class_add_private(c,sizeof(MNEvolutionMessagePrivate)); - - parent_class = g_type_class_ref (MN_TYPE_MESSAGE); - -#line 83 "src/mn-evolution-message.gob" - mn_message_class->builtin_can_open = ___2_mn_evolution_message_builtin_can_open; -#line 89 "src/mn-evolution-message.gob" - mn_message_class->builtin_open = ___3_mn_evolution_message_builtin_open; -#line 103 "src/mn-evolution-message.gob" - mn_message_class->builtin_mark_as_read = ___5_mn_evolution_message_builtin_mark_as_read; -#line 109 "src/mn-evolution-message.gob" - mn_message_class->builtin_mark_as_spam = ___6_mn_evolution_message_builtin_mark_as_spam; -#line 115 "src/mn-evolution-message.gob" - mn_message_class->builtin_delete = ___7_mn_evolution_message_builtin_delete; -#line 199 "mn-evolution-message.c" - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_string - ("uid" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MESSAGE_PARAM_EXPORT | G_PARAM_CONSTRUCT_ONLY)); - g_object_class_install_property (g_object_class, - PROP_UID, - param_spec); - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Message::set_property" -{ - MNEvolutionMessage *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_MESSAGE (object); - - switch (property_id) { - case PROP_UID: - { -#line 62 "src/mn-evolution-message.gob" -{ char *old = self->_priv->uid; self->_priv->uid = g_value_dup_string (VAL); g_free (old); } -#line 235 "mn-evolution-message.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Evolution:Message::get_property" -{ - MNEvolutionMessage *self G_GNUC_UNUSED; - - self = MN_EVOLUTION_MESSAGE (object); - - switch (property_id) { - case PROP_UID: - { -#line 62 "src/mn-evolution-message.gob" -g_value_set_string (VAL, self->_priv->uid); -#line 266 "mn-evolution-message.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - - -#line 64 "src/mn-evolution-message.gob" -MNMessage * -mn_evolution_message_new (MNMailbox * mailbox, time_t sent_time, const char * id, const char * from, const char * subject, MNMessageFlags flags, const char * uid) -{ -#line 287 "mn-evolution-message.c" -#define __GOB_FUNCTION__ "MN:Evolution:Message::new" -#line 64 "src/mn-evolution-message.gob" - g_return_val_if_fail (uid != NULL, (MNMessage * )0); -#line 291 "mn-evolution-message.c" -{ -#line 72 "src/mn-evolution-message.gob" - - return MN_MESSAGE(GET_NEW_VARG(MN_MESSAGE_PROP_MAILBOX(mailbox), - MN_MESSAGE_PROP_SENT_TIME(sent_time), - MN_MESSAGE_PROP_ID((char *) id), - MN_MESSAGE_PROP_FROM((char *) from), - MN_MESSAGE_PROP_SUBJECT((char *) subject), - MN_MESSAGE_PROP_FLAGS(flags), - MN_EVOLUTION_MESSAGE_PROP_UID((char *) uid), - NULL)); - }} -#line 304 "mn-evolution-message.c" -#undef __GOB_FUNCTION__ - -#line 83 "src/mn-evolution-message.gob" -static gboolean -___2_mn_evolution_message_builtin_can_open (MNMessage * message G_GNUC_UNUSED) -#line 310 "mn-evolution-message.c" -#define PARENT_HANDLER(___message) \ - ((MN_MESSAGE_CLASS(parent_class)->builtin_can_open)? \ - (* MN_MESSAGE_CLASS(parent_class)->builtin_can_open)(___message): \ - ((gboolean )0)) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Message::builtin_can_open" -{ -#line 85 "src/mn-evolution-message.gob" - - return TRUE; - }} -#line 322 "mn-evolution-message.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 89 "src/mn-evolution-message.gob" -static void -___3_mn_evolution_message_builtin_open (MNMessage * message G_GNUC_UNUSED, MNMessageActionRequest * request) -#line 329 "mn-evolution-message.c" -#define PARENT_HANDLER(___message,___request) \ - { if(MN_MESSAGE_CLASS(parent_class)->builtin_open) \ - (* MN_MESSAGE_CLASS(parent_class)->builtin_open)(___message,___request); } -{ -#define __GOB_FUNCTION__ "MN:Evolution:Message::builtin_open" -{ -#line 91 "src/mn-evolution-message.gob" - - Self *self = SELF(message); - CLIENT_METHOD(org_gnome_MailNotification_Evolution_open_message(client->proxy, mailbox->uri, selfp->uid, &tmp_err)); - }} -#line 341 "mn-evolution-message.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 96 "src/mn-evolution-message.gob" -static void -mn_evolution_message_set_flags (MNEvolutionMessage * self, guint32 flags, MNMessageActionRequest * request) -{ -#line 349 "mn-evolution-message.c" -#define __GOB_FUNCTION__ "MN:Evolution:Message::set_flags" -#line 96 "src/mn-evolution-message.gob" - g_return_if_fail (self != NULL); -#line 96 "src/mn-evolution-message.gob" - g_return_if_fail (MN_IS_EVOLUTION_MESSAGE (self)); -#line 355 "mn-evolution-message.c" -{ -#line 98 "src/mn-evolution-message.gob" - - MNMessage *message = MN_MESSAGE(self); - CLIENT_METHOD(org_gnome_MailNotification_Evolution_set_message_flags(client->proxy, mailbox->uri, selfp->uid, flags, &tmp_err)); - }} -#line 362 "mn-evolution-message.c" -#undef __GOB_FUNCTION__ - -#line 103 "src/mn-evolution-message.gob" -static void -___5_mn_evolution_message_builtin_mark_as_read (MNMessage * message G_GNUC_UNUSED, MNMessageActionRequest * request) -#line 368 "mn-evolution-message.c" -#define PARENT_HANDLER(___message,___request) \ - { if(MN_MESSAGE_CLASS(parent_class)->builtin_mark_as_read) \ - (* MN_MESSAGE_CLASS(parent_class)->builtin_mark_as_read)(___message,___request); } -{ -#define __GOB_FUNCTION__ "MN:Evolution:Message::builtin_mark_as_read" -{ -#line 105 "src/mn-evolution-message.gob" - - self_set_flags(SELF(message), CAMEL_MESSAGE_SEEN, request); - }} -#line 379 "mn-evolution-message.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 109 "src/mn-evolution-message.gob" -static void -___6_mn_evolution_message_builtin_mark_as_spam (MNMessage * message G_GNUC_UNUSED, MNMessageActionRequest * request) -#line 386 "mn-evolution-message.c" -#define PARENT_HANDLER(___message,___request) \ - { if(MN_MESSAGE_CLASS(parent_class)->builtin_mark_as_spam) \ - (* MN_MESSAGE_CLASS(parent_class)->builtin_mark_as_spam)(___message,___request); } -{ -#define __GOB_FUNCTION__ "MN:Evolution:Message::builtin_mark_as_spam" -{ -#line 111 "src/mn-evolution-message.gob" - - self_set_flags(SELF(message), CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_JUNK | CAMEL_MESSAGE_JUNK_LEARN, request); - }} -#line 397 "mn-evolution-message.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 115 "src/mn-evolution-message.gob" -static void -___7_mn_evolution_message_builtin_delete (MNMessage * message G_GNUC_UNUSED, MNMessageActionRequest * request) -#line 404 "mn-evolution-message.c" -#define PARENT_HANDLER(___message,___request) \ - { if(MN_MESSAGE_CLASS(parent_class)->builtin_delete) \ - (* MN_MESSAGE_CLASS(parent_class)->builtin_delete)(___message,___request); } -{ -#define __GOB_FUNCTION__ "MN:Evolution:Message::builtin_delete" -{ -#line 117 "src/mn-evolution-message.gob" - - self_set_flags(SELF(message), CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED, request); - }} -#line 415 "mn-evolution-message.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER diff --git a/build/src/mn-evolution-message.gob.stamp b/build/src/mn-evolution-message.gob.stamp diff --git a/build/src/mn-evolution-message.h b/build/src/mn-evolution-message.h @@ -1,83 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include "mn-message.h" - -#ifndef __MN_EVOLUTION_MESSAGE_H__ -#define __MN_EVOLUTION_MESSAGE_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_EVOLUTION_MESSAGE (mn_evolution_message_get_type()) -#define MN_EVOLUTION_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_message_get_type(), MNEvolutionMessage) -#define MN_EVOLUTION_MESSAGE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_message_get_type(), MNEvolutionMessage const) -#define MN_EVOLUTION_MESSAGE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_evolution_message_get_type(), MNEvolutionMessageClass) -#define MN_IS_EVOLUTION_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_evolution_message_get_type ()) - -#define MN_EVOLUTION_MESSAGE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_evolution_message_get_type(), MNEvolutionMessageClass) - -/* Private structure type */ -typedef struct _MNEvolutionMessagePrivate MNEvolutionMessagePrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_EVOLUTION_MESSAGE__ -#define __TYPEDEF_MN_EVOLUTION_MESSAGE__ -typedef struct _MNEvolutionMessage MNEvolutionMessage; -#endif -struct _MNEvolutionMessage { - MNMessage __parent__; - /*< private >*/ - MNEvolutionMessagePrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNEvolutionMessageClass MNEvolutionMessageClass; -struct _MNEvolutionMessageClass { - MNMessageClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_evolution_message_get_type (void) G_GNUC_CONST; -#line 64 "src/mn-evolution-message.gob" -MNMessage * mn_evolution_message_new (MNMailbox * mailbox, - time_t sent_time, - const char * id, - const char * from, - const char * subject, - MNMessageFlags flags, - const char * uid); -#line 66 "mn-evolution-message.h" - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_EVOLUTION_MESSAGE_PROP_UID(arg) "uid", __extension__ ({gchar *z = (arg); z;}) -#define MN_EVOLUTION_MESSAGE_GET_PROP_UID(arg) "uid", __extension__ ({gchar **z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_EVOLUTION_MESSAGE_PROP_UID(arg) "uid",(gchar *)(arg) -#define MN_EVOLUTION_MESSAGE_GET_PROP_UID(arg) "uid",(gchar **)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-server-private.h b/build/src/mn-evolution-server-private.h @@ -1,17 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#ifndef __MN_EVOLUTION_SERVER_PRIVATE_H__ -#define __MN_EVOLUTION_SERVER_PRIVATE_H__ - -#include "mn-evolution-server.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-evolution-server.c b/build/src/mn-evolution-server.c @@ -1,802 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 15 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-evolution-server.h" - -#include "mn-evolution-server-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 24 "src/mn-evolution-server.gob" - -#include <stdio.h> -#include <libintl.h> -#include <gobject/gvaluecollector.h> -#include <camel/camel-folder.h> -#include <mail/em-folder-view.h> -#include <mail/em-format.h> -#include <mail/em-message-browser.h> -#include <mail/em-utils.h> -#include <mail/mail-session.h> -#include <mail/mail-tools.h> -#include "mn-evolution.h" -#include "mn-evolution-folder-tree-server.h" -#include "mn-evolution-plugin.h" - -/* see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=208774 */ -static GHashTable *folders = NULL; - -typedef struct -{ - char *uri; - CamelFolder *folder; -} FolderInfo; - -#define MN_EVOLUTION_SERVER_ERROR (mn_evolution_server_error_quark()) - -typedef enum -{ - MN_EVOLUTION_SERVER_ERROR_FOLDER_NOT_FOUND, - MN_EVOLUTION_SERVER_ERROR_MESSAGE_NOT_FOUND, - MN_EVOLUTION_SERVER_ERROR_FOLDER_TREE_REGISTRATION_FAILED, -} MNEvolutionServerError; - -#line 60 "mn-evolution-server.c" -/* self casting macros */ -#define SELF(x) MN_EVOLUTION_SERVER(x) -#define SELF_CONST(x) MN_EVOLUTION_SERVER_CONST(x) -#define IS_SELF(x) MN_IS_EVOLUTION_SERVER(x) -#define TYPE_SELF MN_TYPE_EVOLUTION_SERVER -#define SELF_CLASS(x) MN_EVOLUTION_SERVER_CLASS(x) - -#define SELF_GET_CLASS(x) MN_EVOLUTION_SERVER_GET_CLASS(x) - -/* self typedefs */ -typedef MNEvolutionServer Self; -typedef MNEvolutionServerClass SelfClass; - -/* here are local prototypes */ -#line 0 "src/mn-evolution-server.gob" -static void mn_evolution_server_init (MNEvolutionServer * o); -#line 77 "mn-evolution-server.c" -#line 75 "src/mn-evolution-server.gob" -static void mn_evolution_server_class_init (MNEvolutionServerClass * class); -#line 80 "mn-evolution-server.c" -#line 80 "src/mn-evolution-server.gob" -static GQuark mn_evolution_server_error_quark (void); -#line 83 "mn-evolution-server.c" -#line 86 "src/mn-evolution-server.gob" -static void mn_evolution_server_cache_folder (const char * uri, CamelFolder * folder); -#line 86 "mn-evolution-server.c" -#line 103 "src/mn-evolution-server.gob" -static void mn_evolution_server_folder_info_free (FolderInfo * info); -#line 89 "mn-evolution-server.c" -#line 112 "src/mn-evolution-server.gob" -static void mn_evolution_server_folder_deleted_cb (CamelObject * object, gpointer event_data, gpointer user_data); -#line 92 "mn-evolution-server.c" -#line 124 "src/mn-evolution-server.gob" -static CamelFolder * mn_evolution_server_lookup_folder (const char * uri, GError ** err); -#line 95 "mn-evolution-server.c" -#line 158 "src/mn-evolution-server.gob" -static GValueArray * mn_evolution_server_value_array_new (GType type, ...); -#line 98 "mn-evolution-server.c" -#line 188 "src/mn-evolution-server.gob" -static GValueArray * mn_evolution_server_camel_message_info_to_dbus_struct (CamelMessageInfo * info); -#line 101 "mn-evolution-server.c" -#line 216 "src/mn-evolution-server.gob" -static gboolean mn_evolution_server_get_unseen_messages (MNEvolutionServer * self, const char * folder_uri, GPtrArray ** ret, GError ** err); -#line 104 "mn-evolution-server.c" -#line 253 "src/mn-evolution-server.gob" -static gboolean mn_evolution_server_get_folder_name (MNEvolutionServer * self, const char * folder_uri, char ** ret, GError ** err); -#line 107 "mn-evolution-server.c" -#line 275 "src/mn-evolution-server.gob" -static gboolean mn_evolution_server_open_message (MNEvolutionServer * self, const char * folder_uri, const char * message_uid, GError ** err); -#line 110 "mn-evolution-server.c" -#line 307 "src/mn-evolution-server.gob" -static gboolean mn_evolution_server_set_message_flags (MNEvolutionServer * self, const char * folder_uri, const char * message_uid, unsigned int flags, GError ** err); -#line 113 "mn-evolution-server.c" -#line 337 "src/mn-evolution-server.gob" -static gboolean mn_evolution_server_folder_tree_new (MNEvolutionServer * self, guint32 id, GError ** err); -#line 116 "mn-evolution-server.c" - -/* - * Signal connection wrapper macro shortcuts - */ -#define self_connect__folder_changed(object,func,data) mn_evolution_server_connect__folder_changed((object),(func),(data)) -#define self_connect_after__folder_changed(object,func,data) mn_evolution_server_connect_after__folder_changed((object),(func),(data)) -#define self_connect_data__folder_changed(object,func,data,destroy_data,flags) mn_evolution_server_connect_data__folder_changed((object),(func),(data),(destroy_data),(flags)) -#define self_connect__message_reading(object,func,data) mn_evolution_server_connect__message_reading((object),(func),(data)) -#define self_connect_after__message_reading(object,func,data) mn_evolution_server_connect_after__message_reading((object),(func),(data)) -#define self_connect_data__message_reading(object,func,data,destroy_data,flags) mn_evolution_server_connect_data__message_reading((object),(func),(data),(destroy_data),(flags)) - -typedef void (*___Sig1) (MNEvolutionServer *, gchar *, gpointer); - -static void -___marshal_Sig1 (GClosure *closure, - GValue *return_value G_GNUC_UNUSED, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint G_GNUC_UNUSED, - gpointer marshal_data) -{ - register ___Sig1 callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 2); - - if (G_CCLOSURE_SWAP_DATA (closure)) { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } else { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - - callback = (___Sig1) (marshal_data != NULL ? marshal_data : cc->callback); - - callback ((MNEvolutionServer *)data1, - (gchar *) g_value_get_string (param_values + 1), - data2); -} - - -enum { - FOLDER_CHANGED_SIGNAL, - MESSAGE_READING_SIGNAL, - LAST_SIGNAL -}; - -static guint object_signals[LAST_SIGNAL] = {0}; - -/* pointer to the class of our parent */ -static GObjectClass *parent_class = NULL; - -/* Short form macros */ -#define self_folder_changed mn_evolution_server_folder_changed -#define self_message_reading mn_evolution_server_message_reading -#define self_error_quark mn_evolution_server_error_quark -#define self_cache_folder mn_evolution_server_cache_folder -#define self_folder_info_free mn_evolution_server_folder_info_free -#define self_folder_deleted_cb mn_evolution_server_folder_deleted_cb -#define self_lookup_folder mn_evolution_server_lookup_folder -#define self_value_array_new mn_evolution_server_value_array_new -#define self_camel_message_info_to_dbus_struct mn_evolution_server_camel_message_info_to_dbus_struct -#define self_get_unseen_messages mn_evolution_server_get_unseen_messages -#define self_get_folder_name mn_evolution_server_get_folder_name -#define self_open_message mn_evolution_server_open_message -#define self_set_message_flags mn_evolution_server_set_message_flags -#define self_folder_tree_new mn_evolution_server_folder_tree_new -#define self_new mn_evolution_server_new -GType -mn_evolution_server_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNEvolutionServerClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_evolution_server_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNEvolutionServer), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_evolution_server_init, - NULL - }; - - type = g_type_register_static (G_TYPE_OBJECT, "MNEvolutionServer", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNEvolutionServer *)g_object_new(mn_evolution_server_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNEvolutionServer * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNEvolutionServer * -GET_NEW_VARG (const char *first, ...) -{ - MNEvolutionServer *ret; - va_list ap; - va_start (ap, first); - ret = (MNEvolutionServer *)g_object_new_valist (mn_evolution_server_get_type (), first, ap); - va_end (ap); - return ret; -} - - -#line 58 "src/mn-evolution-server.gob" - -#include "mn-evolution-server-dbus.h" - -#line 234 "mn-evolution-server.c" -static void -mn_evolution_server_init (MNEvolutionServer * o G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:Evolution:Server::init" -} -#undef __GOB_FUNCTION__ -#line 75 "src/mn-evolution-server.gob" -static void -mn_evolution_server_class_init (MNEvolutionServerClass * class G_GNUC_UNUSED) -{ -#line 245 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - - parent_class = g_type_class_ref (G_TYPE_OBJECT); - - object_signals[FOLDER_CHANGED_SIGNAL] = - g_signal_new ("folder_changed", - G_TYPE_FROM_CLASS (g_object_class), - (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), - G_STRUCT_OFFSET (MNEvolutionServerClass, folder_changed), - NULL, NULL, - ___marshal_Sig1, - G_TYPE_NONE, 1, - G_TYPE_STRING); - if ___GOB_UNLIKELY(sizeof(const char * ) != sizeof(gchar *) || parent_class == NULL /* avoid warning */) { - g_error("src/mn-evolution-server.gob line 69: Type mismatch of \"folder_changed\" signal signature"); - } - object_signals[MESSAGE_READING_SIGNAL] = - g_signal_new ("message_reading", - G_TYPE_FROM_CLASS (g_object_class), - (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), - G_STRUCT_OFFSET (MNEvolutionServerClass, message_reading), - NULL, NULL, - ___marshal_Sig1, - G_TYPE_NONE, 1, - G_TYPE_STRING); - if ___GOB_UNLIKELY(sizeof(const char * ) != sizeof(gchar *) || parent_class == NULL /* avoid warning */) { - g_error("src/mn-evolution-server.gob line 72: Type mismatch of \"message_reading\" signal signature"); - } - - class->folder_changed = NULL; - class->message_reading = NULL; - { -#line 76 "src/mn-evolution-server.gob" - - dbus_g_object_type_install_info(TYPE_SELF, &dbus_glib_mn_evolution_server_object_info); - -#line 283 "mn-evolution-server.c" - } -} -#undef __GOB_FUNCTION__ - - -#line 69 "src/mn-evolution-server.gob" -void -mn_evolution_server_folder_changed (MNEvolutionServer * self, const char * uri) -{ -#line 293 "mn-evolution-server.c" - GValue ___param_values[2]; - GValue ___return_val; - -memset (&___return_val, 0, sizeof (___return_val)); -memset (&___param_values, 0, sizeof (___param_values)); - -#line 69 "src/mn-evolution-server.gob" - g_return_if_fail (self != NULL); -#line 69 "src/mn-evolution-server.gob" - g_return_if_fail (MN_IS_EVOLUTION_SERVER (self)); -#line 69 "src/mn-evolution-server.gob" - g_return_if_fail (uri != NULL); -#line 306 "mn-evolution-server.c" - - ___param_values[0].g_type = 0; - g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self)); - g_value_set_instance (&___param_values[0], (gpointer) self); - - ___param_values[1].g_type = 0; - g_value_init (&___param_values[1], G_TYPE_STRING); - g_value_set_static_string (&___param_values[1], (gchar *) uri); - - g_signal_emitv (___param_values, - object_signals[FOLDER_CHANGED_SIGNAL], - 0 /* detail */, - &___return_val); - - g_value_unset (&___param_values[0]); - g_value_unset (&___param_values[1]); -} - -#line 72 "src/mn-evolution-server.gob" -void -mn_evolution_server_message_reading (MNEvolutionServer * self, const char * uri) -{ -#line 329 "mn-evolution-server.c" - GValue ___param_values[2]; - GValue ___return_val; - -memset (&___return_val, 0, sizeof (___return_val)); -memset (&___param_values, 0, sizeof (___param_values)); - -#line 72 "src/mn-evolution-server.gob" - g_return_if_fail (self != NULL); -#line 72 "src/mn-evolution-server.gob" - g_return_if_fail (MN_IS_EVOLUTION_SERVER (self)); -#line 72 "src/mn-evolution-server.gob" - g_return_if_fail (uri != NULL); -#line 342 "mn-evolution-server.c" - - ___param_values[0].g_type = 0; - g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self)); - g_value_set_instance (&___param_values[0], (gpointer) self); - - ___param_values[1].g_type = 0; - g_value_init (&___param_values[1], G_TYPE_STRING); - g_value_set_static_string (&___param_values[1], (gchar *) uri); - - g_signal_emitv (___param_values, - object_signals[MESSAGE_READING_SIGNAL], - 0 /* detail */, - &___return_val); - - g_value_unset (&___param_values[0]); - g_value_unset (&___param_values[1]); -} - - -#line 80 "src/mn-evolution-server.gob" -static GQuark -mn_evolution_server_error_quark (void) -{ -#line 366 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::error_quark" -{ -#line 82 "src/mn-evolution-server.gob" - - return g_quark_from_static_string("mn-evolution-server-error"); - }} -#line 373 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 86 "src/mn-evolution-server.gob" -static void -mn_evolution_server_cache_folder (const char * uri, CamelFolder * folder) -{ -#line 380 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::cache_folder" -#line 86 "src/mn-evolution-server.gob" - g_return_if_fail (uri != NULL); -#line 86 "src/mn-evolution-server.gob" - g_return_if_fail (folder != NULL); -#line 386 "mn-evolution-server.c" -{ -#line 89 "src/mn-evolution-server.gob" - - FolderInfo *info; - - info = g_new0(FolderInfo, 1); - info->uri = g_strdup(uri); - info->folder = folder; - camel_object_ref(folder); - - /* uncache the folder when it is deleted */ - camel_object_hook_event(folder, "deleted", self_folder_deleted_cb, info); - - g_hash_table_replace(folders, info->uri, info); - }} -#line 402 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 103 "src/mn-evolution-server.gob" -static void -mn_evolution_server_folder_info_free (FolderInfo * info) -{ -#line 409 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::folder_info_free" -#line 103 "src/mn-evolution-server.gob" - g_return_if_fail (info != NULL); -#line 413 "mn-evolution-server.c" -{ -#line 105 "src/mn-evolution-server.gob" - - camel_object_unhook_event(info->folder, "deleted", self_folder_deleted_cb, info); - camel_object_unref(info->folder); - g_free(info->uri); - g_free(info); - }} -#line 422 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 112 "src/mn-evolution-server.gob" -static void -mn_evolution_server_folder_deleted_cb (CamelObject * object, gpointer event_data, gpointer user_data) -{ -#line 429 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::folder_deleted_cb" -{ -#line 116 "src/mn-evolution-server.gob" - - FolderInfo *info = user_data; - gboolean status; - - status = g_hash_table_remove(folders, info->uri); - g_assert(status == TRUE); - }} -#line 440 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 124 "src/mn-evolution-server.gob" -static CamelFolder * -mn_evolution_server_lookup_folder (const char * uri, GError ** err) -{ -#line 447 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::lookup_folder" -#line 124 "src/mn-evolution-server.gob" - g_return_val_if_fail (uri != NULL, (CamelFolder * )0); -#line 451 "mn-evolution-server.c" -{ -#line 126 "src/mn-evolution-server.gob" - - CamelFolder *folder = NULL; - - if (folders) - { - FolderInfo *info; - - info = g_hash_table_lookup(folders, uri); - if (info) - { - folder = info->folder; - camel_object_ref(folder); - } - } - else - folders = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) self_folder_info_free); - - if (! folder) - { - folder = mail_tool_uri_to_folder(uri, 0, NULL); - if (folder) - self_cache_folder(uri, folder); - else - g_set_error(err, - MN_EVOLUTION_SERVER_ERROR, - MN_EVOLUTION_SERVER_ERROR_FOLDER_NOT_FOUND, - dgettext(GETTEXT_PACKAGE, "folder not found")); - } - - return folder; - }} -#line 485 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 158 "src/mn-evolution-server.gob" -static GValueArray * -mn_evolution_server_value_array_new (GType type, ...) -{ -#line 492 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::value_array_new" -{ -#line 160 "src/mn-evolution-server.gob" - - GValueArray *value_array; - va_list args; - - value_array = g_value_array_new(0); - - va_start(args, type); - - while (type) - { - GValue value = { 0, }; - char *error = NULL; - - g_value_init(&value, type); - G_VALUE_COLLECT(&value, args, 0, &error); - g_assert(error == NULL); - - g_value_array_append(value_array, &value); - g_value_unset(&value); - - type = va_arg(args, GType); - } - - va_end(args); - - return value_array; - }} -#line 523 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 188 "src/mn-evolution-server.gob" -static GValueArray * -mn_evolution_server_camel_message_info_to_dbus_struct (CamelMessageInfo * info) -{ -#line 530 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::camel_message_info_to_dbus_struct" -#line 188 "src/mn-evolution-server.gob" - g_return_val_if_fail (info != NULL, (GValueArray * )0); -#line 534 "mn-evolution-server.c" -{ -#line 190 "src/mn-evolution-server.gob" - - const CamelSummaryMessageID *id; - char hexhash[sizeof(CamelSummaryMessageID) * 2 + 1]; - int i; - - id = camel_message_info_message_id(info); - for (i = 0; i < sizeof(id->id.hash); i++) - sprintf(hexhash + i * 2, "%.2x", id->id.hash[i]); - - g_assert(camel_message_info_uid(info) != NULL); - - return self_value_array_new(/* char *uid */ - G_TYPE_STRING, camel_message_info_uid(info), - /* unsigned int sent_time */ - G_TYPE_UINT, (unsigned int) camel_message_info_date_sent(info), - /* unsigned int received_time */ - G_TYPE_UINT, (unsigned int) camel_message_info_date_received(info), - /* char *id */ - G_TYPE_STRING, hexhash, - /* char *from */ - G_TYPE_STRING, camel_message_info_from(info), - /* char *subject */ - G_TYPE_STRING, camel_message_info_subject(info), - (GType) 0); - }} -#line 562 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 216 "src/mn-evolution-server.gob" -static gboolean -mn_evolution_server_get_unseen_messages (MNEvolutionServer * self, const char * folder_uri, GPtrArray ** ret, GError ** err) -{ -#line 569 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::get_unseen_messages" -#line 216 "src/mn-evolution-server.gob" - g_return_val_if_fail (self != NULL, (gboolean )0); -#line 216 "src/mn-evolution-server.gob" - g_return_val_if_fail (MN_IS_EVOLUTION_SERVER (self), (gboolean )0); -#line 216 "src/mn-evolution-server.gob" - g_return_val_if_fail (folder_uri != NULL, (gboolean )0); -#line 216 "src/mn-evolution-server.gob" - g_return_val_if_fail (ret != NULL, (gboolean )0); -#line 579 "mn-evolution-server.c" -{ -#line 221 "src/mn-evolution-server.gob" - - CamelFolder *folder; - - GDK_THREADS_ENTER(); - - folder = self_lookup_folder(folder_uri, err); - if (folder) - { - GPtrArray *summary; - int i; - - *ret = g_ptr_array_new(); - - summary = camel_folder_get_summary(folder); - - for (i = 0; i < summary->len; i++) - { - CamelMessageInfo *info = summary->pdata[i]; - - if ((camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN) == 0) - g_ptr_array_add(*ret, self_camel_message_info_to_dbus_struct(info)); - } - - camel_folder_free_summary(folder, summary); - camel_object_unref(folder); - } - - GDK_THREADS_LEAVE(); - - return folder != NULL; - }} -#line 613 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 253 "src/mn-evolution-server.gob" -static gboolean -mn_evolution_server_get_folder_name (MNEvolutionServer * self, const char * folder_uri, char ** ret, GError ** err) -{ -#line 620 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::get_folder_name" -#line 253 "src/mn-evolution-server.gob" - g_return_val_if_fail (self != NULL, (gboolean )0); -#line 253 "src/mn-evolution-server.gob" - g_return_val_if_fail (MN_IS_EVOLUTION_SERVER (self), (gboolean )0); -#line 253 "src/mn-evolution-server.gob" - g_return_val_if_fail (folder_uri != NULL, (gboolean )0); -#line 253 "src/mn-evolution-server.gob" - g_return_val_if_fail (ret != NULL, (gboolean )0); -#line 630 "mn-evolution-server.c" -{ -#line 258 "src/mn-evolution-server.gob" - - CamelFolder *folder; - - GDK_THREADS_ENTER(); - - folder = self_lookup_folder(folder_uri, err); - if (folder) - { - *ret = g_strdup(camel_folder_get_name(folder)); - camel_object_unref(folder); - } - - GDK_THREADS_LEAVE(); - - return folder != NULL; - }} -#line 649 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 275 "src/mn-evolution-server.gob" -static gboolean -mn_evolution_server_open_message (MNEvolutionServer * self, const char * folder_uri, const char * message_uid, GError ** err) -{ -#line 656 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::open_message" -#line 275 "src/mn-evolution-server.gob" - g_return_val_if_fail (self != NULL, (gboolean )0); -#line 275 "src/mn-evolution-server.gob" - g_return_val_if_fail (MN_IS_EVOLUTION_SERVER (self), (gboolean )0); -#line 275 "src/mn-evolution-server.gob" - g_return_val_if_fail (folder_uri != NULL, (gboolean )0); -#line 275 "src/mn-evolution-server.gob" - g_return_val_if_fail (message_uid != NULL, (gboolean )0); -#line 666 "mn-evolution-server.c" -{ -#line 280 "src/mn-evolution-server.gob" - - CamelFolder *folder; - - GDK_THREADS_ENTER(); - - folder = self_lookup_folder(folder_uri, err); - if (folder) - { - GtkWidget *browser; - - /* modelled after Evolution's handleuri_got_folder() */ - - browser = em_message_browser_window_new(); - - em_format_set_session((EMFormat *) ((EMFolderView *) browser)->preview, session); - em_folder_view_set_folder((EMFolderView *) browser, folder, folder_uri); - em_folder_view_set_message((EMFolderView *) browser, message_uid, FALSE); - gtk_widget_show(((EMMessageBrowser *) browser)->window); - - camel_object_unref(folder); - } - - GDK_THREADS_LEAVE(); - - return folder != NULL; - }} -#line 695 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 307 "src/mn-evolution-server.gob" -static gboolean -mn_evolution_server_set_message_flags (MNEvolutionServer * self, const char * folder_uri, const char * message_uid, unsigned int flags, GError ** err) -{ -#line 702 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::set_message_flags" -#line 307 "src/mn-evolution-server.gob" - g_return_val_if_fail (self != NULL, (gboolean )0); -#line 307 "src/mn-evolution-server.gob" - g_return_val_if_fail (MN_IS_EVOLUTION_SERVER (self), (gboolean )0); -#line 307 "src/mn-evolution-server.gob" - g_return_val_if_fail (folder_uri != NULL, (gboolean )0); -#line 307 "src/mn-evolution-server.gob" - g_return_val_if_fail (message_uid != NULL, (gboolean )0); -#line 712 "mn-evolution-server.c" -{ -#line 313 "src/mn-evolution-server.gob" - - CamelFolder *folder; - gboolean status = FALSE; - - GDK_THREADS_ENTER(); - - folder = self_lookup_folder(folder_uri, err); - if (folder) - { - status = camel_folder_set_message_flags(folder, message_uid, flags, flags); - camel_object_unref(folder); - - if (! status) - g_set_error(err, - MN_EVOLUTION_SERVER_ERROR, - MN_EVOLUTION_SERVER_ERROR_MESSAGE_NOT_FOUND, - dgettext(GETTEXT_PACKAGE, "message not found")); - } - - GDK_THREADS_LEAVE(); - - return status; - }} -#line 738 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 337 "src/mn-evolution-server.gob" -static gboolean -mn_evolution_server_folder_tree_new (MNEvolutionServer * self, guint32 id, GError ** err) -{ -#line 745 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::folder_tree_new" -#line 337 "src/mn-evolution-server.gob" - g_return_val_if_fail (self != NULL, (gboolean )0); -#line 337 "src/mn-evolution-server.gob" - g_return_val_if_fail (MN_IS_EVOLUTION_SERVER (self), (gboolean )0); -#line 751 "mn-evolution-server.c" -{ -#line 339 "src/mn-evolution-server.gob" - - MNEvolutionFolderTreeServer *tree; - char *service; - char *path; - GError *tmp_err = NULL; - gboolean status; - - GDK_THREADS_ENTER(); - - tree = mn_evolution_folder_tree_server_new(id); - - service = g_strdup_printf(MN_EVOLUTION_FOLDER_TREE_SERVER_SERVICE, id); - path = g_strdup_printf(MN_EVOLUTION_FOLDER_TREE_SERVER_PATH, id); - - status = mn_evolution_plugin_register_server(G_OBJECT(tree), service, path, &tmp_err); - - g_free(service); - g_free(path); - - if (! status) - { - /* unlikely to ever happen, not worth a translation */ - g_set_error(err, - MN_EVOLUTION_SERVER_ERROR, - MN_EVOLUTION_SERVER_ERROR_FOLDER_TREE_REGISTRATION_FAILED, - "cannot register folder tree server: %s", tmp_err->message); - g_error_free(tmp_err); - g_object_unref(tree); - } - - GDK_THREADS_LEAVE(); - - return status; - }} -#line 788 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ - -#line 374 "src/mn-evolution-server.gob" -MNEvolutionServer * -mn_evolution_server_new (void) -{ -#line 795 "mn-evolution-server.c" -#define __GOB_FUNCTION__ "MN:Evolution:Server::new" -{ -#line 376 "src/mn-evolution-server.gob" - - return GET_NEW; - }} -#line 802 "mn-evolution-server.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-evolution-server.gob.stamp b/build/src/mn-evolution-server.gob.stamp diff --git a/build/src/mn-evolution-server.h b/build/src/mn-evolution-server.h @@ -1,90 +0,0 @@ -/* Generated by GOB (v2.0.15) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <dbus/dbus-glib.h> - -#ifndef __MN_EVOLUTION_SERVER_H__ -#define __MN_EVOLUTION_SERVER_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_EVOLUTION_SERVER (mn_evolution_server_get_type()) -#define MN_EVOLUTION_SERVER(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_server_get_type(), MNEvolutionServer) -#define MN_EVOLUTION_SERVER_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_evolution_server_get_type(), MNEvolutionServer const) -#define MN_EVOLUTION_SERVER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_evolution_server_get_type(), MNEvolutionServerClass) -#define MN_IS_EVOLUTION_SERVER(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_evolution_server_get_type ()) - -#define MN_EVOLUTION_SERVER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_evolution_server_get_type(), MNEvolutionServerClass) - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_EVOLUTION_SERVER__ -#define __TYPEDEF_MN_EVOLUTION_SERVER__ -typedef struct _MNEvolutionServer MNEvolutionServer; -#endif -struct _MNEvolutionServer { - GObject __parent__; -}; - -/* - * Class definition - */ -typedef struct _MNEvolutionServerClass MNEvolutionServerClass; -struct _MNEvolutionServerClass { - GObjectClass __parent__; - /*signal*/void (* folder_changed) (MNEvolutionServer * self, const char * uri); - /*signal*/void (* message_reading) (MNEvolutionServer * self, const char * uri); -}; - - -/* - * Public methods - */ -GType mn_evolution_server_get_type (void) G_GNUC_CONST; -#line 69 "src/mn-evolution-server.gob" -void mn_evolution_server_folder_changed (MNEvolutionServer * self, - const char * uri); -#line 58 "mn-evolution-server.h" -#line 72 "src/mn-evolution-server.gob" -void mn_evolution_server_message_reading (MNEvolutionServer * self, - const char * uri); -#line 62 "mn-evolution-server.h" -#line 374 "src/mn-evolution-server.gob" -MNEvolutionServer * mn_evolution_server_new (void); -#line 65 "mn-evolution-server.h" - -/* - * Signal connection wrapper macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define mn_evolution_server_connect__folder_changed(object,func,data) g_signal_connect(MN_EVOLUTION_SERVER(__extension__ ({MNEvolutionServer *___object = (object); ___object; })),"folder_changed",(GCallback) __extension__ ({void (* ___folder_changed) (MNEvolutionServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___folder_changed; }), (data)) -#define mn_evolution_server_connect_after__folder_changed(object,func,data) g_signal_connect_after(MN_EVOLUTION_SERVER(__extension__ ({MNEvolutionServer *___object = (object); ___object; })),"folder_changed",(GCallback) __extension__ ({void (* ___folder_changed) (MNEvolutionServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___folder_changed; }), (data)) -#define mn_evolution_server_connect_data__folder_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_SERVER(__extension__ ({MNEvolutionServer *___object = (object); ___object; })),"folder_changed",(GCallback) __extension__ ({void (* ___folder_changed) (MNEvolutionServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___folder_changed; }), (data), (destroy_data), (GConnectFlags)(flags)) -#define mn_evolution_server_connect__message_reading(object,func,data) g_signal_connect(MN_EVOLUTION_SERVER(__extension__ ({MNEvolutionServer *___object = (object); ___object; })),"message_reading",(GCallback) __extension__ ({void (* ___message_reading) (MNEvolutionServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___message_reading; }), (data)) -#define mn_evolution_server_connect_after__message_reading(object,func,data) g_signal_connect_after(MN_EVOLUTION_SERVER(__extension__ ({MNEvolutionServer *___object = (object); ___object; })),"message_reading",(GCallback) __extension__ ({void (* ___message_reading) (MNEvolutionServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___message_reading; }), (data)) -#define mn_evolution_server_connect_data__message_reading(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_SERVER(__extension__ ({MNEvolutionServer *___object = (object); ___object; })),"message_reading",(GCallback) __extension__ ({void (* ___message_reading) (MNEvolutionServer * ___fake___self, const char * ___fake___uri, gpointer ___data ) = (func); ___message_reading; }), (data), (destroy_data), (GConnectFlags)(flags)) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define mn_evolution_server_connect__folder_changed(object,func,data) g_signal_connect(MN_EVOLUTION_SERVER(object),"folder_changed",(GCallback)(func),(data)) -#define mn_evolution_server_connect_after__folder_changed(object,func,data) g_signal_connect_after(MN_EVOLUTION_SERVER(object),"folder_changed",(GCallback)(func),(data)) -#define mn_evolution_server_connect_data__folder_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_SERVER(object),"folder_changed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags)) -#define mn_evolution_server_connect__message_reading(object,func,data) g_signal_connect(MN_EVOLUTION_SERVER(object),"message_reading",(GCallback)(func),(data)) -#define mn_evolution_server_connect_after__message_reading(object,func,data) g_signal_connect_after(MN_EVOLUTION_SERVER(object),"message_reading",(GCallback)(func),(data)) -#define mn_evolution_server_connect_data__message_reading(object,func,data,destroy_data,flags) g_signal_connect_data(MN_EVOLUTION_SERVER(object),"message_reading",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags)) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-file-chooser-button-private.h b/build/src/mn-file-chooser-button-private.h @@ -1,40 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_FILE_CHOOSER_BUTTON_PRIVATE_H__ -#define __MN_FILE_CHOOSER_BUTTON_PRIVATE_H__ - -#include "mn-file-chooser-button.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#line 35 "src/mn-file-chooser-button.gob" - -#include <libgnomevfs/gnome-vfs.h> - -#line 18 "mn-file-chooser-button-private.h" -struct _MNFileChooserButtonPrivate { -#line 47 "src/mn-file-chooser-button.gob" - char * filename; -#line 64 "src/mn-file-chooser-button.gob" - MNFileChooserButtonCreateDialogFunction create_dialog; -#line 65 "src/mn-file-chooser-button.gob" - gpointer create_dialog_data; -#line 67 "src/mn-file-chooser-button.gob" - GtkWidget * image; -#line 68 "src/mn-file-chooser-button.gob" - GtkWidget * label; -#line 69 "src/mn-file-chooser-button.gob" - GtkWidget * dialog; -#line 71 "src/mn-file-chooser-button.gob" - GnomeVFSAsyncHandle * async_handle; -#line 34 "mn-file-chooser-button-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-file-chooser-button.c b/build/src/mn-file-chooser-button.c @@ -1,552 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-file-chooser-button.h" - -#include "mn-file-chooser-button-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 39 "src/mn-file-chooser-button.gob" - -#include <glib/gi18n.h> -#include <gnome.h> -#include "mn-util.h" - -#line 32 "mn-file-chooser-button.c" -/* self casting macros */ -#define SELF(x) MN_FILE_CHOOSER_BUTTON(x) -#define SELF_CONST(x) MN_FILE_CHOOSER_BUTTON_CONST(x) -#define IS_SELF(x) MN_IS_FILE_CHOOSER_BUTTON(x) -#define TYPE_SELF MN_TYPE_FILE_CHOOSER_BUTTON -#define SELF_CLASS(x) MN_FILE_CHOOSER_BUTTON_CLASS(x) - -#define SELF_GET_CLASS(x) MN_FILE_CHOOSER_BUTTON_GET_CLASS(x) - -/* self typedefs */ -typedef MNFileChooserButton Self; -typedef MNFileChooserButtonClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 0 "src/mn-file-chooser-button.gob" -static void mn_file_chooser_button_class_init (MNFileChooserButtonClass * c) G_GNUC_UNUSED; -#line 51 "mn-file-chooser-button.c" -#line 73 "src/mn-file-chooser-button.gob" -static void mn_file_chooser_button_init (MNFileChooserButton * self) G_GNUC_UNUSED; -#line 54 "mn-file-chooser-button.c" -#line 111 "src/mn-file-chooser-button.gob" -static void mn_file_chooser_button_clicked_h (GtkButton * button, gpointer data) G_GNUC_UNUSED; -#line 57 "mn-file-chooser-button.c" -#line 147 "src/mn-file-chooser-button.gob" -static void mn_file_chooser_button_update (MNFileChooserButton * self) G_GNUC_UNUSED; -#line 60 "mn-file-chooser-button.c" -#line 207 "src/mn-file-chooser-button.gob" -static void mn_file_chooser_button_get_file_info_cb (GnomeVFSAsyncHandle * handle, GList * results, gpointer data) G_GNUC_UNUSED; -#line 63 "mn-file-chooser-button.c" -#line 253 "src/mn-file-chooser-button.gob" -static void mn_file_chooser_button_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED; -#line 66 "mn-file-chooser-button.c" - -enum { - PROP_0, - PROP_FILENAME -}; - -/* pointer to the class of our parent */ -static GtkHBoxClass *parent_class = NULL; - -/* Short form macros */ -#define self_get_filename mn_file_chooser_button_get_filename -#define self_set_filename mn_file_chooser_button_set_filename -#define self_clicked_h mn_file_chooser_button_clicked_h -#define self_update mn_file_chooser_button_update -#define self_get_file_info_cb mn_file_chooser_button_get_file_info_cb -#define self_response_h mn_file_chooser_button_response_h -#define self_new mn_file_chooser_button_new -GType -mn_file_chooser_button_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNFileChooserButtonClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_file_chooser_button_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNFileChooserButton), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_file_chooser_button_init, - NULL - }; - - type = g_type_register_static (GTK_TYPE_HBOX, "MNFileChooserButton", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNFileChooserButton *)g_object_new(mn_file_chooser_button_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNFileChooserButton * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNFileChooserButton * -GET_NEW_VARG (const char *first, ...) -{ - MNFileChooserButton *ret; - va_list ap; - va_start (ap, first); - ret = (MNFileChooserButton *)g_object_new_valist (mn_file_chooser_button_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___dispose (GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::dispose" - MNFileChooserButton *self G_GNUC_UNUSED = MN_FILE_CHOOSER_BUTTON (obj_self); - if (G_OBJECT_CLASS (parent_class)->dispose) \ - (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self); -#line 69 "src/mn-file-chooser-button.gob" - if(self->_priv->dialog) { gtk_widget_destroy ((gpointer) self->_priv->dialog); self->_priv->dialog = NULL; } -#line 136 "mn-file-chooser-button.c" -#line 71 "src/mn-file-chooser-button.gob" - if(self->_priv->async_handle) { gnome_vfs_async_cancel ((gpointer) self->_priv->async_handle); self->_priv->async_handle = NULL; } -#line 139 "mn-file-chooser-button.c" -} -#undef __GOB_FUNCTION__ - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::finalize" - MNFileChooserButton *self G_GNUC_UNUSED = MN_FILE_CHOOSER_BUTTON (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 47 "src/mn-file-chooser-button.gob" - if(self->_priv->filename) { g_free ((gpointer) self->_priv->filename); self->_priv->filename = NULL; } -#line 154 "mn-file-chooser-button.c" -} -#undef __GOB_FUNCTION__ - -static void -mn_file_chooser_button_class_init (MNFileChooserButtonClass * c G_GNUC_UNUSED) -{ -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c; - - g_type_class_add_private(c,sizeof(MNFileChooserButtonPrivate)); - - parent_class = g_type_class_ref (GTK_TYPE_HBOX); - - g_object_class->dispose = ___dispose; - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_string - ("filename" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE)); - g_object_class_install_property (g_object_class, - PROP_FILENAME, - param_spec); - } -} -#undef __GOB_FUNCTION__ -#line 73 "src/mn-file-chooser-button.gob" -static void -mn_file_chooser_button_init (MNFileChooserButton * self G_GNUC_UNUSED) -{ -#line 191 "mn-file-chooser-button.c" -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_FILE_CHOOSER_BUTTON,MNFileChooserButtonPrivate); - { -#line 74 "src/mn-file-chooser-button.gob" - - GtkWidget *button; - GtkWidget *box; - GtkWidget *separator; - GtkWidget *image; - - button = gtk_button_new(); - gtk_container_add(GTK_CONTAINER(self), button); - gtk_widget_show(button); - - box = gtk_hbox_new(FALSE, 4); - gtk_container_add(GTK_CONTAINER(button), box); - gtk_widget_show(box); - - selfp->image = gtk_image_new(); - gtk_box_pack_start(GTK_BOX(box), selfp->image, FALSE, FALSE, 0); - gtk_widget_show(selfp->image); - - selfp->label = gtk_label_new(NULL); - gtk_label_set_ellipsize(GTK_LABEL(selfp->label), PANGO_ELLIPSIZE_END); - gtk_misc_set_alignment(GTK_MISC(selfp->label), 0.0, 0.5); - gtk_container_add(GTK_CONTAINER(box), selfp->label); - gtk_widget_show(selfp->label); - - separator = gtk_vseparator_new(); - gtk_box_pack_start(GTK_BOX(box), separator, FALSE, FALSE, 0); - gtk_widget_show(separator); - - image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU); - gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0); - gtk_widget_show(image); - - g_signal_connect(button, "clicked", G_CALLBACK(self_clicked_h), self); - - self_update(self); - -#line 232 "mn-file-chooser-button.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::set_property" -{ - MNFileChooserButton *self G_GNUC_UNUSED; - - self = MN_FILE_CHOOSER_BUTTON (object); - - switch (property_id) { - case PROP_FILENAME: - { -#line 54 "src/mn-file-chooser-button.gob" - - g_free(selfp->filename); - selfp->filename = g_value_dup_string(VAL); - - self_update(self); - - if (selfp->dialog) - gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(selfp->dialog), selfp->filename); - -#line 261 "mn-file-chooser-button.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::get_property" -{ - MNFileChooserButton *self G_GNUC_UNUSED; - - self = MN_FILE_CHOOSER_BUTTON (object); - - switch (property_id) { - case PROP_FILENAME: - { -#line 50 "src/mn-file-chooser-button.gob" - - g_value_set_string(VAL, selfp->filename); - -#line 294 "mn-file-chooser-button.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - -#line 50 "src/mn-file-chooser-button.gob" -gchar * -mn_file_chooser_button_get_filename (MNFileChooserButton * self) -{ -#line 314 "mn-file-chooser-button.c" -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::get_filename" -{ -#line 48 "src/mn-file-chooser-button.gob" - gchar* val; g_object_get (G_OBJECT (self), "filename", &val, NULL); return val; -}} -#line 320 "mn-file-chooser-button.c" -#undef __GOB_FUNCTION__ - -#line 54 "src/mn-file-chooser-button.gob" -void -mn_file_chooser_button_set_filename (MNFileChooserButton * self, gchar * val) -{ -#line 327 "mn-file-chooser-button.c" -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::set_filename" -{ -#line 48 "src/mn-file-chooser-button.gob" - g_object_set (G_OBJECT (self), "filename", val, NULL); -}} -#line 333 "mn-file-chooser-button.c" -#undef __GOB_FUNCTION__ - - -#line 111 "src/mn-file-chooser-button.gob" -static void -mn_file_chooser_button_clicked_h (GtkButton * button, gpointer data) -{ -#line 341 "mn-file-chooser-button.c" -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::clicked_h" -{ -#line 113 "src/mn-file-chooser-button.gob" - - Self *self = data; - - if (! selfp->dialog) - { - /* translators: header capitalization */ - selfp->dialog = GTK_WIDGET(selfp->create_dialog(selfp->create_dialog_data)); - g_assert(GTK_IS_FILE_CHOOSER_DIALOG(selfp->dialog)); - - mn_add_weak_pointer(&selfp->dialog); - - if (selfp->filename) - gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(selfp->dialog), selfp->filename); - - g_signal_connect(selfp->dialog, "response", G_CALLBACK(self_response_h), self); - } - - if (! GTK_WIDGET_VISIBLE(selfp->dialog)) - { - GtkWindow *parent; - - parent = mn_widget_get_parent_window(GTK_WIDGET(self)); - if (parent) - { - if (parent != gtk_window_get_transient_for(GTK_WINDOW(selfp->dialog))) - gtk_window_set_transient_for(GTK_WINDOW(selfp->dialog), parent); - - gtk_window_set_modal(GTK_WINDOW(selfp->dialog), gtk_window_get_modal(parent)); - } - } - - mn_window_present_from_event(GTK_WINDOW(selfp->dialog)); - }} -#line 378 "mn-file-chooser-button.c" -#undef __GOB_FUNCTION__ - -#line 147 "src/mn-file-chooser-button.gob" -static void -mn_file_chooser_button_update (MNFileChooserButton * self) -{ -#line 385 "mn-file-chooser-button.c" -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::update" -#line 147 "src/mn-file-chooser-button.gob" - g_return_if_fail (self != NULL); -#line 147 "src/mn-file-chooser-button.gob" - g_return_if_fail (MN_IS_FILE_CHOOSER_BUTTON (self)); -#line 391 "mn-file-chooser-button.c" -{ -#line 149 "src/mn-file-chooser-button.gob" - - GnomeVFSURI *uri = NULL; - - if (selfp->async_handle) - { - gnome_vfs_async_cancel(selfp->async_handle); - selfp->async_handle = NULL; - } - - if (selfp->filename && *selfp->filename) - { - char *text_uri; - char *base; - - base = g_path_get_basename(selfp->filename); - gtk_label_set_text(GTK_LABEL(selfp->label), base); - g_free(base); - - text_uri = gnome_vfs_get_uri_from_local_path(selfp->filename); - if (text_uri) - { - uri = gnome_vfs_uri_new(text_uri); - g_free(text_uri); - } - } - else - /* - * translators: GTK+ has the same message used in the same - * context; please use the GTK+ translation for consistency - */ - gtk_label_set_text(GTK_LABEL(selfp->label), _("(None)")); - - /* - * Do not use MN_STOCK_UNKNOWN: we want to appear exactly as a - * GtkFileChooserButton. - */ - gtk_image_set_from_icon_name(GTK_IMAGE(selfp->image), "stock_unknown", GTK_ICON_SIZE_MENU); - - if (uri) - { - GList *uri_list = NULL; - - uri_list = g_list_append(uri_list, uri); - - g_object_ref(self); - gnome_vfs_async_get_file_info(&selfp->async_handle, - uri_list, - GNOME_VFS_FILE_INFO_GET_MIME_TYPE - | GNOME_VFS_FILE_INFO_FOLLOW_LINKS, - GNOME_VFS_PRIORITY_DEFAULT, - self_get_file_info_cb, - self); - - gnome_vfs_uri_unref(uri); - g_list_free(uri_list); - } - }} -#line 451 "mn-file-chooser-button.c" -#undef __GOB_FUNCTION__ - -#line 207 "src/mn-file-chooser-button.gob" -static void -mn_file_chooser_button_get_file_info_cb (GnomeVFSAsyncHandle * handle, GList * results, gpointer data) -{ -#line 458 "mn-file-chooser-button.c" -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::get_file_info_cb" -{ -#line 209 "src/mn-file-chooser-button.gob" - - Self *self = data; - - GDK_THREADS_ENTER(); - - if (results) - { - GnomeVFSGetFileInfoResult *result = results->data; - - if (result->result == GNOME_VFS_OK - && (result->file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) != 0) - { - char *uri; - char *icon_name; - - uri = gnome_vfs_get_uri_from_local_path(selfp->filename); - g_assert(uri != NULL); - - icon_name = gnome_icon_lookup(gtk_icon_theme_get_default(), - NULL, - uri, - NULL, - result->file_info, - result->file_info->mime_type, - GNOME_ICON_LOOKUP_FLAGS_NONE, - NULL); - - g_free(uri); - - if (icon_name) - { - gtk_image_set_from_icon_name(GTK_IMAGE(selfp->image), icon_name, GTK_ICON_SIZE_MENU); - g_free(icon_name); - } - } - } - - selfp->async_handle = NULL; - g_object_unref(self); - - /* do not call gdk_flush(), we're normally in the main thread */ - GDK_THREADS_LEAVE(); - }} -#line 505 "mn-file-chooser-button.c" -#undef __GOB_FUNCTION__ - -#line 253 "src/mn-file-chooser-button.gob" -static void -mn_file_chooser_button_response_h (GtkDialog * dialog, int response, gpointer user_data) -{ -#line 512 "mn-file-chooser-button.c" -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::response_h" -{ -#line 255 "src/mn-file-chooser-button.gob" - - Self *self = user_data; - - if (response == GTK_RESPONSE_ACCEPT) - { - char *filename; - - filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); - self_set_filename(self, filename); - g_free(filename); - } - - gtk_widget_destroy(GTK_WIDGET(dialog)); - }} -#line 530 "mn-file-chooser-button.c" -#undef __GOB_FUNCTION__ - -#line 270 "src/mn-file-chooser-button.gob" -GtkWidget * -mn_file_chooser_button_new (MNFileChooserButtonCreateDialogFunction create_dialog, gpointer data) -{ -#line 537 "mn-file-chooser-button.c" -#define __GOB_FUNCTION__ "MN:File:Chooser:Button::new" -#line 270 "src/mn-file-chooser-button.gob" - g_return_val_if_fail (create_dialog != NULL, (GtkWidget * )0); -#line 541 "mn-file-chooser-button.c" -{ -#line 273 "src/mn-file-chooser-button.gob" - - Self *self = GET_NEW; - - selfp->create_dialog = create_dialog; - selfp->create_dialog_data = data; - - return GTK_WIDGET(self); - }} -#line 552 "mn-file-chooser-button.c" -#undef __GOB_FUNCTION__ diff --git a/build/src/mn-file-chooser-button.gob.stamp b/build/src/mn-file-chooser-button.gob.stamp diff --git a/build/src/mn-file-chooser-button.h b/build/src/mn-file-chooser-button.h @@ -1,89 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gtk/gtk.h> - -#ifndef __MN_FILE_CHOOSER_BUTTON_H__ -#define __MN_FILE_CHOOSER_BUTTON_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -typedef GtkFileChooserDialog *(*MNFileChooserButtonCreateDialogFunction) (gpointer data); - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_FILE_CHOOSER_BUTTON (mn_file_chooser_button_get_type()) -#define MN_FILE_CHOOSER_BUTTON(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_file_chooser_button_get_type(), MNFileChooserButton) -#define MN_FILE_CHOOSER_BUTTON_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_file_chooser_button_get_type(), MNFileChooserButton const) -#define MN_FILE_CHOOSER_BUTTON_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_file_chooser_button_get_type(), MNFileChooserButtonClass) -#define MN_IS_FILE_CHOOSER_BUTTON(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_file_chooser_button_get_type ()) - -#define MN_FILE_CHOOSER_BUTTON_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_file_chooser_button_get_type(), MNFileChooserButtonClass) - -/* Private structure type */ -typedef struct _MNFileChooserButtonPrivate MNFileChooserButtonPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_FILE_CHOOSER_BUTTON__ -#define __TYPEDEF_MN_FILE_CHOOSER_BUTTON__ -typedef struct _MNFileChooserButton MNFileChooserButton; -#endif -struct _MNFileChooserButton { - GtkHBox __parent__; - /*< private >*/ - MNFileChooserButtonPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNFileChooserButtonClass MNFileChooserButtonClass; -struct _MNFileChooserButtonClass { - GtkHBoxClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_file_chooser_button_get_type (void) G_GNUC_CONST; -#line 50 "src/mn-file-chooser-button.gob" -gchar * mn_file_chooser_button_get_filename (MNFileChooserButton * self); -#line 64 "mn-file-chooser-button.h" -#line 54 "src/mn-file-chooser-button.gob" -void mn_file_chooser_button_set_filename (MNFileChooserButton * self, - gchar * val); -#line 68 "mn-file-chooser-button.h" -#line 270 "src/mn-file-chooser-button.gob" -GtkWidget * mn_file_chooser_button_new (MNFileChooserButtonCreateDialogFunction create_dialog, - gpointer data); -#line 72 "mn-file-chooser-button.h" - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_FILE_CHOOSER_BUTTON_PROP_FILENAME(arg) "filename", __extension__ ({gchar *z = (arg); z;}) -#define MN_FILE_CHOOSER_BUTTON_GET_PROP_FILENAME(arg) "filename", __extension__ ({gchar **z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_FILE_CHOOSER_BUTTON_PROP_FILENAME(arg) "filename",(gchar *)(arg) -#define MN_FILE_CHOOSER_BUTTON_GET_PROP_FILENAME(arg) "filename",(gchar **)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-gmail-mailbox-private.h b/build/src/mn-gmail-mailbox-private.h @@ -1,28 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_GMAIL_MAILBOX_PRIVATE_H__ -#define __MN_GMAIL_MAILBOX_PRIVATE_H__ - -#include "mn-gmail-mailbox.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#line 24 "src/mn-gmail-mailbox.gob" - -#include <libgnomevfs/gnome-vfs.h> - -#line 18 "mn-gmail-mailbox-private.h" -struct _MNGmailMailboxPrivate { -#line 54 "src/mn-gmail-mailbox.gob" - GnomeVFSURI * uri; -#line 22 "mn-gmail-mailbox-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-gmail-mailbox-properties-private.h b/build/src/mn-gmail-mailbox-properties-private.h @@ -1,26 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#ifndef __MN_GMAIL_MAILBOX_PROPERTIES_PRIVATE_H__ -#define __MN_GMAIL_MAILBOX_PROPERTIES_PRIVATE_H__ - -#include "mn-gmail-mailbox-properties.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct _MNGmailMailboxPropertiesPrivate { -#line 39 "src/mn-gmail-mailbox-properties.gob" - GtkWidget * label_check; -#line 40 "src/mn-gmail-mailbox-properties.gob" - GtkWidget * label_entry; -#line 46 "src/mn-gmail-mailbox-properties.gob" - char * location; -#line 20 "mn-gmail-mailbox-properties-private.h" -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-gmail-mailbox-properties.c b/build/src/mn-gmail-mailbox-properties.c @@ -1,379 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include <string.h> /* memset() */ - -#include "mn-gmail-mailbox-properties.h" - -#include "mn-gmail-mailbox-properties-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 25 "src/mn-gmail-mailbox-properties.gob" - -#include <glib/gi18n.h> -#include "mn-mailbox-properties.h" -#include "mn-mailbox-properties-private.h" -#include "mn-authenticated-mailbox-properties-private.h" -#include "mn-util.h" -#include "mn-properties-dialog.h" -#include "mn-authenticated-mailbox.h" -#include "mn-gmail-mailbox.h" -#include "mn-stock.h" - -#line 38 "mn-gmail-mailbox-properties.c" -/* self casting macros */ -#define SELF(x) MN_GMAIL_MAILBOX_PROPERTIES(x) -#define SELF_CONST(x) MN_GMAIL_MAILBOX_PROPERTIES_CONST(x) -#define IS_SELF(x) MN_IS_GMAIL_MAILBOX_PROPERTIES(x) -#define TYPE_SELF MN_TYPE_GMAIL_MAILBOX_PROPERTIES -#define SELF_CLASS(x) MN_GMAIL_MAILBOX_PROPERTIES_CLASS(x) - -#define SELF_GET_CLASS(x) MN_GMAIL_MAILBOX_PROPERTIES_GET_CLASS(x) - -/* self typedefs */ -typedef MNGmailMailboxProperties Self; -typedef MNGmailMailboxPropertiesClass SelfClass; - -/* here are local prototypes */ -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 85 "src/mn-gmail-mailbox-properties.gob" -static void mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * class) G_GNUC_UNUSED; -#line 56 "mn-gmail-mailbox-properties.c" -#line 94 "src/mn-gmail-mailbox-properties.gob" -static void mn_gmail_mailbox_properties_init (MNGmailMailboxProperties * self) G_GNUC_UNUSED; -#line 59 "mn-gmail-mailbox-properties.c" -#line 138 "src/mn-gmail-mailbox-properties.gob" -static void mn_gmail_mailbox_properties_check_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) G_GNUC_UNUSED; -#line 62 "mn-gmail-mailbox-properties.c" -#line 149 "src/mn-gmail-mailbox-properties.gob" -static void ___4_mn_gmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED; -#line 65 "mn-gmail-mailbox-properties.c" -#line 166 "src/mn-gmail-mailbox-properties.gob" -static MNMailbox * ___5_mn_gmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED; -#line 68 "mn-gmail-mailbox-properties.c" - -enum { - PROP_0, - PROP_COMPLETE, - PROP_DEFAULT_NAME -}; - -/* pointer to the class of our parent */ -static MNAuthenticatedMailboxPropertiesClass *parent_class = NULL; - -/* Short form macros */ -#define self_check_toggled_h mn_gmail_mailbox_properties_check_toggled_h -GType -mn_gmail_mailbox_properties_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNGmailMailboxPropertiesClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_gmail_mailbox_properties_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNGmailMailboxProperties), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_gmail_mailbox_properties_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES, "MNGmailMailboxProperties", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNGmailMailboxProperties *)g_object_new(mn_gmail_mailbox_properties_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNGmailMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNGmailMailboxProperties * -GET_NEW_VARG (const char *first, ...) -{ - MNGmailMailboxProperties *ret; - va_list ap; - va_start (ap, first); - ret = (MNGmailMailboxProperties *)g_object_new_valist (mn_gmail_mailbox_properties_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::finalize" - MNGmailMailboxProperties *self G_GNUC_UNUSED = MN_GMAIL_MAILBOX_PROPERTIES (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 46 "src/mn-gmail-mailbox-properties.gob" - if(self->_priv->location) { g_free ((gpointer) self->_priv->location); self->_priv->location = NULL; } -#line 134 "mn-gmail-mailbox-properties.c" -} -#undef __GOB_FUNCTION__ - -#line 85 "src/mn-gmail-mailbox-properties.gob" -static void -mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * class G_GNUC_UNUSED) -{ -#line 142 "mn-gmail-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - MNMailboxPropertiesClass *mn_mailbox_properties_class = (MNMailboxPropertiesClass *)class; - - g_type_class_add_private(class,sizeof(MNGmailMailboxPropertiesPrivate)); - - parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES); - -#line 149 "src/mn-gmail-mailbox-properties.gob" - mn_mailbox_properties_class->set_mailbox = ___4_mn_gmail_mailbox_properties_set_mailbox; -#line 166 "src/mn-gmail-mailbox-properties.gob" - mn_mailbox_properties_class->get_mailbox = ___5_mn_gmail_mailbox_properties_get_mailbox; -#line 155 "mn-gmail-mailbox-properties.c" - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - { - g_object_class_override_property (g_object_class, - PROP_COMPLETE, - "complete"); - g_object_class_override_property (g_object_class, - PROP_DEFAULT_NAME, - "default_name"); - } - { -#line 86 "src/mn-gmail-mailbox-properties.gob" - - MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class); - - p_class->type = "gmail"; - p_class->stock_id = MN_STOCK_GMAIL; - p_class->combo_label = "Gmail"; - -#line 175 "mn-gmail-mailbox-properties.c" - } -} -#undef __GOB_FUNCTION__ -#line 94 "src/mn-gmail-mailbox-properties.gob" -static void -mn_gmail_mailbox_properties_init (MNGmailMailboxProperties * self G_GNUC_UNUSED) -{ -#line 183 "mn-gmail-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_GMAIL_MAILBOX_PROPERTIES,MNGmailMailboxPropertiesPrivate); - { -#line 95 "src/mn-gmail-mailbox-properties.gob" - - MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self); - MNAuthenticatedMailboxProperties *auth = MN_AUTHENTICATED_MAILBOX_PROPERTIES(self); - GtkWidget *label_vbox; - GtkWidget *hbox; - - gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->username_vbox, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->password_vbox, FALSE, FALSE, 0); - - /* translators: header capitalization */ - label_vbox = mn_mailbox_properties_add_general_section(properties, _("Gmail Label")); - - selfp->label_check = gtk_check_button_new_with_mnemonic(_("_Restrict to this label:")); - gtk_size_group_add_widget(properties->label_size_group, selfp->label_check); - - selfp->label_entry = gtk_entry_new(); - gtk_widget_set_sensitive(selfp->label_entry, FALSE); - - hbox = gtk_hbox_new(FALSE, 12); - gtk_box_pack_start(GTK_BOX(hbox), selfp->label_check, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(hbox), selfp->label_entry, TRUE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(label_vbox), hbox, FALSE, FALSE, 0); - gtk_widget_show_all(label_vbox); - - properties->entries = mn_g_slist_append_elements(properties->entries, - auth->username_entry, - auth->password_entry, - selfp->label_entry, - NULL); - - g_signal_connect(selfp->label_check, "toggled", G_CALLBACK(self_check_toggled_h), self); - - g_object_connect(auth->username_entry, - "swapped-signal::changed", mn_mailbox_properties_notify_complete, self, - "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self, - NULL); - - g_object_connect(selfp->label_entry, - "swapped-signal::changed", mn_mailbox_properties_notify_complete, self, - "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self, - NULL); - -#line 230 "mn-gmail-mailbox-properties.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::get_property" -{ - MNGmailMailboxProperties *self G_GNUC_UNUSED; - - self = MN_GMAIL_MAILBOX_PROPERTIES (object); - - switch (property_id) { - case PROP_COMPLETE: - { -#line 50 "src/mn-gmail-mailbox-properties.gob" - - gboolean complete; - - complete = mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)); - if (complete) - { - gboolean label_enabled; - const char *label; - - label_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check)); - label = gtk_entry_get_text(GTK_ENTRY(selfp->label_entry)); - - if (label_enabled && ! *label) - complete = FALSE; - } - - g_value_set_boolean(VAL, complete); - -#line 268 "mn-gmail-mailbox-properties.c" - } - break; - case PROP_DEFAULT_NAME: - { -#line 71 "src/mn-gmail-mailbox-properties.gob" - - const char *username; - gboolean label_enabled; - const char *label; - - username = gtk_entry_get_text(GTK_ENTRY(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)->username_entry)); - g_assert(*username != 0); - - label_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check)); - label = gtk_entry_get_text(GTK_ENTRY(selfp->label_entry)); - - g_value_take_string(VAL, mn_gmail_mailbox_build_name(username, label_enabled ? label : NULL)); - -#line 287 "mn-gmail-mailbox-properties.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - - -#line 138 "src/mn-gmail-mailbox-properties.gob" -static void -mn_gmail_mailbox_properties_check_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) -{ -#line 308 "mn-gmail-mailbox-properties.c" -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::check_toggled_h" -{ -#line 140 "src/mn-gmail-mailbox-properties.gob" - - Self *self = user_data; - - gtk_widget_set_sensitive(selfp->label_entry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check))); - - g_object_notify(G_OBJECT(self), "complete"); - g_object_notify(G_OBJECT(self), "default-name"); - }} -#line 320 "mn-gmail-mailbox-properties.c" -#undef __GOB_FUNCTION__ - -#line 149 "src/mn-gmail-mailbox-properties.gob" -static void -___4_mn_gmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox) -#line 326 "mn-gmail-mailbox-properties.c" -#define PARENT_HANDLER(___properties,___mailbox) \ - { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \ - (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::set_mailbox" -{ -#line 151 "src/mn-gmail-mailbox-properties.gob" - - Self *self = SELF(properties); - MNGmailMailbox *gmail_mailbox = MN_GMAIL_MAILBOX(mailbox); - - PARENT_HANDLER(properties, mailbox); - - selfp->location = g_strdup(gmail_mailbox->location); - - if (gmail_mailbox->label) - { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->label_check), TRUE); - gtk_entry_set_text(GTK_ENTRY(selfp->label_entry), gmail_mailbox->label); - } - }} -#line 348 "mn-gmail-mailbox-properties.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 166 "src/mn-gmail-mailbox-properties.gob" -static MNMailbox * -___5_mn_gmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED) -#line 355 "mn-gmail-mailbox-properties.c" -#define PARENT_HANDLER(___properties) \ - ((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \ - (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \ - ((MNMailbox * )0)) -{ -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::get_mailbox" -{ -#line 168 "src/mn-gmail-mailbox-properties.gob" - - Self *self = SELF(properties); - MNMailbox *mailbox; - - mailbox = PARENT_HANDLER(properties); - - if (selfp->location) - g_object_set(mailbox, MN_GMAIL_MAILBOX_PROP_LOCATION(selfp->location), NULL); - - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check))) - g_object_set(mailbox, MN_GMAIL_MAILBOX_PROP_LABEL((char *) gtk_entry_get_text(GTK_ENTRY(selfp->label_entry))), NULL); - - return mailbox; - }} -#line 378 "mn-gmail-mailbox-properties.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER diff --git a/build/src/mn-gmail-mailbox-properties.gob.stamp b/build/src/mn-gmail-mailbox-properties.gob.stamp diff --git a/build/src/mn-gmail-mailbox-properties.h b/build/src/mn-gmail-mailbox-properties.h @@ -1,75 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -#include <glib.h> -#include <glib-object.h> - - -#include <gtk/gtk.h> -#include "mn-authenticated-mailbox-properties.h" - -#ifndef __MN_GMAIL_MAILBOX_PROPERTIES_H__ -#define __MN_GMAIL_MAILBOX_PROPERTIES_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* - * Type checking and casting macros - */ -#define MN_TYPE_GMAIL_MAILBOX_PROPERTIES (mn_gmail_mailbox_properties_get_type()) -#define MN_GMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_gmail_mailbox_properties_get_type(), MNGmailMailboxProperties) -#define MN_GMAIL_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_gmail_mailbox_properties_get_type(), MNGmailMailboxProperties const) -#define MN_GMAIL_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_gmail_mailbox_properties_get_type(), MNGmailMailboxPropertiesClass) -#define MN_IS_GMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_gmail_mailbox_properties_get_type ()) - -#define MN_GMAIL_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_gmail_mailbox_properties_get_type(), MNGmailMailboxPropertiesClass) - -/* Private structure type */ -typedef struct _MNGmailMailboxPropertiesPrivate MNGmailMailboxPropertiesPrivate; - -/* - * Main object structure - */ -#ifndef __TYPEDEF_MN_GMAIL_MAILBOX_PROPERTIES__ -#define __TYPEDEF_MN_GMAIL_MAILBOX_PROPERTIES__ -typedef struct _MNGmailMailboxProperties MNGmailMailboxProperties; -#endif -struct _MNGmailMailboxProperties { - MNAuthenticatedMailboxProperties __parent__; - /*< private >*/ - MNGmailMailboxPropertiesPrivate *_priv; -}; - -/* - * Class definition - */ -typedef struct _MNGmailMailboxPropertiesClass MNGmailMailboxPropertiesClass; -struct _MNGmailMailboxPropertiesClass { - MNAuthenticatedMailboxPropertiesClass __parent__; -}; - - -/* - * Public methods - */ -GType mn_gmail_mailbox_properties_get_type (void) G_GNUC_CONST; - -/* - * Argument wrapping macros - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;}) -#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;}) -#else /* __GNUC__ && !__STRICT_ANSI__ */ -#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg) -#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name",(gchar **)(arg) -#endif /* __GNUC__ && !__STRICT_ANSI__ */ - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/build/src/mn-gmail-mailbox.c b/build/src/mn-gmail-mailbox.c @@ -1,740 +0,0 @@ -/* Generated by GOB (v2.0.17) (do not edit directly) */ - -/* End world hunger, donate to the World Food Programme, http://www.wfp.org */ - -#define GOB_VERSION_MAJOR 2 -#define GOB_VERSION_MINOR 0 -#define GOB_VERSION_PATCHLEVEL 17 - -#define selfp (self->_priv) - -#include "mn-gmail-mailbox.h" - -#include "mn-gmail-mailbox-private.h" - -#ifdef G_LIKELY -#define ___GOB_LIKELY(expr) G_LIKELY(expr) -#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr) -#else /* ! G_LIKELY */ -#define ___GOB_LIKELY(expr) (expr) -#define ___GOB_UNLIKELY(expr) (expr) -#endif /* G_LIKELY */ - -#line 28 "src/mn-gmail-mailbox.gob" - -#include <string.h> -#include <stdlib.h> -#include <time.h> -#include <glib/gi18n.h> -#include <libxml/parser.h> -#include <libxml/tree.h> -#include "mn-mailbox-private.h" -#include "mn-authenticated-mailbox-private.h" -#include "mn-vfs.h" -#include "mn-stock.h" -#include "mn-message.h" -#include "mn-util.h" - -#line 39 "mn-gmail-mailbox.c" -/* self casting macros */ -#define SELF(x) MN_GMAIL_MAILBOX(x) -#define SELF_CONST(x) MN_GMAIL_MAILBOX_CONST(x) -#define IS_SELF(x) MN_IS_GMAIL_MAILBOX(x) -#define TYPE_SELF MN_TYPE_GMAIL_MAILBOX -#define SELF_CLASS(x) MN_GMAIL_MAILBOX_CLASS(x) - -#define SELF_GET_CLASS(x) MN_GMAIL_MAILBOX_GET_CLASS(x) - -/* self typedefs */ -typedef MNGmailMailbox Self; -typedef MNGmailMailboxClass SelfClass; - -/* here are local prototypes */ -static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -#line 56 "src/mn-gmail-mailbox.gob" -static void mn_gmail_mailbox_class_init (MNGmailMailboxClass * class) G_GNUC_UNUSED; -#line 58 "mn-gmail-mailbox.c" -#line 64 "src/mn-gmail-mailbox.gob" -static void mn_gmail_mailbox_init (MNGmailMailbox * self) G_GNUC_UNUSED; -#line 61 "mn-gmail-mailbox.c" -#line 70 "src/mn-gmail-mailbox.gob" -static void ___3_mn_gmail_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED; -#line 64 "mn-gmail-mailbox.c" -#line 114 "src/mn-gmail-mailbox.gob" -static GnomeVFSURI * mn_gmail_mailbox_build_uri (MNGmailMailbox * self) G_GNUC_UNUSED; -#line 67 "mn-gmail-mailbox.c" -#line 135 "src/mn-gmail-mailbox.gob" -static void ___5_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED; -#line 70 "mn-gmail-mailbox.c" -#line 263 "src/mn-gmail-mailbox.gob" -static void mn_gmail_mailbox_parse_entry (xmlNode * node, time_t * sent_time, char ** id, char ** from, char ** subject, char ** url) G_GNUC_UNUSED; -#line 73 "mn-gmail-mailbox.c" -#line 314 "src/mn-gmail-mailbox.gob" -static char * mn_gmail_mailbox_parse_author (xmlNode * node) G_GNUC_UNUSED; -#line 76 "mn-gmail-mailbox.c" -#line 346 "src/mn-gmail-mailbox.gob" -static time_t mn_gmail_mailbox_parse_date (const char * w3c_datetime) G_GNUC_UNUSED; -#line 79 "mn-gmail-mailbox.c" - -enum { - PROP_0, - PROP_LOCATION, - PROP_LABEL -}; - -/* pointer to the class of our parent */ -static MNAuthenticatedMailboxClass *parent_class = NULL; - -/* Short form macros */ -#define self_build_uri mn_gmail_mailbox_build_uri -#define self_parse_entry mn_gmail_mailbox_parse_entry -#define self_parse_author mn_gmail_mailbox_parse_author -#define self_parse_date mn_gmail_mailbox_parse_date -#define self_build_name mn_gmail_mailbox_build_name -GType -mn_gmail_mailbox_get_type (void) -{ - static GType type = 0; - - if ___GOB_UNLIKELY(type == 0) { - static const GTypeInfo info = { - sizeof (MNGmailMailboxClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mn_gmail_mailbox_class_init, - (GClassFinalizeFunc) NULL, - NULL /* class_data */, - sizeof (MNGmailMailbox), - 0 /* n_preallocs */, - (GInstanceInitFunc) mn_gmail_mailbox_init, - NULL - }; - - type = g_type_register_static (MN_TYPE_AUTHENTICATED_MAILBOX, "MNGmailMailbox", &info, (GTypeFlags)0); - } - - return type; -} - -/* a macro for creating a new object of our type */ -#define GET_NEW ((MNGmailMailbox *)g_object_new(mn_gmail_mailbox_get_type(), NULL)) - -/* a function for creating a new object of our type */ -#include <stdarg.h> -static MNGmailMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED; -static MNGmailMailbox * -GET_NEW_VARG (const char *first, ...) -{ - MNGmailMailbox *ret; - va_list ap; - va_start (ap, first); - ret = (MNGmailMailbox *)g_object_new_valist (mn_gmail_mailbox_get_type (), first, ap); - va_end (ap); - return ret; -} - - -static void -___dispose (GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::dispose" - MNGmailMailbox *self G_GNUC_UNUSED = MN_GMAIL_MAILBOX (obj_self); - if (G_OBJECT_CLASS (parent_class)->dispose) \ - (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self); -#line 54 "src/mn-gmail-mailbox.gob" - if(self->_priv->uri) { gnome_vfs_uri_unref ((gpointer) self->_priv->uri); self->_priv->uri = NULL; } -#line 148 "mn-gmail-mailbox.c" -} -#undef __GOB_FUNCTION__ - - -static void -___finalize(GObject *obj_self) -{ -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::finalize" - MNGmailMailbox *self G_GNUC_UNUSED = MN_GMAIL_MAILBOX (obj_self); - gpointer priv G_GNUC_UNUSED = self->_priv; - if(G_OBJECT_CLASS(parent_class)->finalize) \ - (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self); -#line 45 "src/mn-gmail-mailbox.gob" - if(self->location) { g_free ((gpointer) self->location); self->location = NULL; } -#line 163 "mn-gmail-mailbox.c" -#line 51 "src/mn-gmail-mailbox.gob" - if(self->label) { g_free ((gpointer) self->label); self->label = NULL; } -#line 166 "mn-gmail-mailbox.c" -} -#undef __GOB_FUNCTION__ - -#line 56 "src/mn-gmail-mailbox.gob" -static void -mn_gmail_mailbox_class_init (MNGmailMailboxClass * class G_GNUC_UNUSED) -{ -#line 174 "mn-gmail-mailbox.c" -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::class_init" - GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class; - MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)class; - MNAuthenticatedMailboxClass *mn_authenticated_mailbox_class = (MNAuthenticatedMailboxClass *)class; - - g_type_class_add_private(class,sizeof(MNGmailMailboxPrivate)); - - parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX); - -#line 70 "src/mn-gmail-mailbox.gob" - mn_mailbox_class->seal = ___3_mn_gmail_mailbox_seal; -#line 135 "src/mn-gmail-mailbox.gob" - mn_authenticated_mailbox_class->authenticated_check = ___5_mn_gmail_mailbox_authenticated_check; -#line 188 "mn-gmail-mailbox.c" - g_object_class->dispose = ___dispose; - g_object_class->finalize = ___finalize; - g_object_class->get_property = ___object_get_property; - g_object_class->set_property = ___object_set_property; - { - GParamSpec *param_spec; - - param_spec = g_param_spec_string - ("location" /* name */, - NULL /* nick */, - NULL /* blurb */, - "https://mail.google.com/mail/feed/atom" /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT)); - g_object_class_install_property (g_object_class, - PROP_LOCATION, - param_spec); - param_spec = g_param_spec_string - ("label" /* name */, - NULL /* nick */, - NULL /* blurb */, - NULL /* default_value */, - (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE)); - g_object_class_install_property (g_object_class, - PROP_LABEL, - param_spec); - } - { -#line 57 "src/mn-gmail-mailbox.gob" - - MN_MAILBOX_CLASS(class)->type = "gmail"; - - /* 5 minutes is a good default */ - MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5; - -#line 223 "mn-gmail-mailbox.c" - } -} -#undef __GOB_FUNCTION__ -#line 64 "src/mn-gmail-mailbox.gob" -static void -mn_gmail_mailbox_init (MNGmailMailbox * self G_GNUC_UNUSED) -{ -#line 231 "mn-gmail-mailbox.c" -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::init" - self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_GMAIL_MAILBOX,MNGmailMailboxPrivate); - { -#line 65 "src/mn-gmail-mailbox.gob" - - mn_mailbox_set_format(MN_MAILBOX(self), "Gmail"); - mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_GMAIL); - -#line 240 "mn-gmail-mailbox.c" - } -} -#undef __GOB_FUNCTION__ - -static void -___object_set_property (GObject *object, - guint property_id, - const GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::set_property" -{ - MNGmailMailbox *self G_GNUC_UNUSED; - - self = MN_GMAIL_MAILBOX (object); - - switch (property_id) { - case PROP_LOCATION: - { -#line 46 "src/mn-gmail-mailbox.gob" -{ char *old = self->location; self->location = g_value_dup_string (VAL); g_free (old); } -#line 261 "mn-gmail-mailbox.c" - } - break; - case PROP_LABEL: - { -#line 52 "src/mn-gmail-mailbox.gob" -{ char *old = self->label; self->label = g_value_dup_string (VAL); g_free (old); } -#line 268 "mn-gmail-mailbox.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - -static void -___object_get_property (GObject *object, - guint property_id, - GValue *VAL G_GNUC_UNUSED, - GParamSpec *pspec G_GNUC_UNUSED) -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::get_property" -{ - MNGmailMailbox *self G_GNUC_UNUSED; - - self = MN_GMAIL_MAILBOX (object); - - switch (property_id) { - case PROP_LOCATION: - { -#line 46 "src/mn-gmail-mailbox.gob" -g_value_set_string (VAL, self->location); -#line 299 "mn-gmail-mailbox.c" - } - break; - case PROP_LABEL: - { -#line 52 "src/mn-gmail-mailbox.gob" -g_value_set_string (VAL, self->label); -#line 306 "mn-gmail-mailbox.c" - } - break; - default: -/* Apparently in g++ this is needed, glib is b0rk */ -#ifndef __PRETTY_FUNCTION__ -# undef G_STRLOC -# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) -#endif - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -#undef __GOB_FUNCTION__ - - - -#line 70 "src/mn-gmail-mailbox.gob" -static void -___3_mn_gmail_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED) -#line 326 "mn-gmail-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_MAILBOX_CLASS(parent_class)->seal) \ - (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::seal" -{ -#line 72 "src/mn-gmail-mailbox.gob" - - MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox); - Self *self = SELF(mailbox); - GnomeVFSURI *uri; - - PARENT_HANDLER(mailbox); - - if (! mailbox->runtime_name) - mailbox->runtime_name = self_build_name(auth_mailbox->username, self->label); - - uri = self_build_uri(self); - if (uri) - { - /* - * Use keyring attributes that are compatible with what - * GnomeVFS uses. This allows the password entered by the user - * at the GnomeVFS password prompt to be recognized by Mail - * Notification and displayed in the mailbox properties - * dialog. - */ - auth_mailbox->keyring_server = g_strdup(gnome_vfs_uri_get_host_name(uri)); - auth_mailbox->keyring_protocol = g_strdup("http"); - auth_mailbox->keyring_authtype = g_strdup("basic"); - auth_mailbox->keyring_port = gnome_vfs_uri_get_host_port(uri); - if (auth_mailbox->keyring_port == 0) - { - const char *scheme; - - scheme = gnome_vfs_uri_get_scheme(uri); - if (! strcmp(scheme, "http")) - auth_mailbox->keyring_port = 80; - else if (! strcmp(scheme, "https")) - auth_mailbox->keyring_port = 443; - } - - gnome_vfs_uri_unref(uri); - } - else - /* fallback */ - auth_mailbox->keyring_domain = g_strdup("gmail.com"); - }} -#line 375 "mn-gmail-mailbox.c" -#undef __GOB_FUNCTION__ -#undef PARENT_HANDLER - -#line 114 "src/mn-gmail-mailbox.gob" -static GnomeVFSURI * -mn_gmail_mailbox_build_uri (MNGmailMailbox * self) -{ -#line 383 "mn-gmail-mailbox.c" -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::build_uri" -#line 114 "src/mn-gmail-mailbox.gob" - g_return_val_if_fail (self != NULL, (GnomeVFSURI * )0); -#line 114 "src/mn-gmail-mailbox.gob" - g_return_val_if_fail (MN_IS_GMAIL_MAILBOX (self), (GnomeVFSURI * )0); -#line 389 "mn-gmail-mailbox.c" -{ -#line 116 "src/mn-gmail-mailbox.gob" - - GnomeVFSURI *uri; - - uri = gnome_vfs_uri_new(self->location); - if (uri) - { - GnomeVFSURI *new_uri; - - if (self->label) - { - new_uri = gnome_vfs_uri_append_file_name(uri, self->label); - gnome_vfs_uri_unref(uri); - uri = new_uri; - } - } - - return uri; - }} -#line 410 "mn-gmail-mailbox.c" -#undef __GOB_FUNCTION__ - -#line 135 "src/mn-gmail-mailbox.gob" -static void -___5_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED) -#line 416 "mn-gmail-mailbox.c" -#define PARENT_HANDLER(___mailbox) \ - { if(MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check) \ - (* MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check)(___mailbox); } -{ -#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::authenticated_check" -{ -#line 137 "src/mn-gmail-mailbox.gob" - - Self *self = SELF(mailbox); - GnomeVFSResult result; - char *atom; - int atom_size; - xmlDoc *doc; - xmlNode *node; - - PARENT_HANDLER(mailbox); - - if (! selfp->uri) - { - selfp->uri = self_build_uri(self); - if (! selfp->uri) - { - GDK_THREADS_ENTER(); - - mn_mailbox_set_error(MN_MAILBOX(self), _("invalid feed location")); - /* error is not recoverable, disable the mailbox */ - mn_mailbox_set_poll(MN_MAILBOX(self), FALSE); - - gdk_flush(); - GDK_THREADS_LEAVE(); - - return; - } - - /* - * Obtain the password from the keyring but do not prompt - * (GnomeVFS will prompt on our behalf if the password is - * missing). - */ - mn_authenticated_mailbox_fill_password(mailbox, FALSE); - - gnome_vfs_uri_set_user_name(selfp->uri, mailbox->username); - gnome_vfs_uri_set_password(selfp->uri, mailbox->runtime_password); - } - - mn_mailbox_notice(MN_MAILBOX(self), _("retrieving feed from %s"), self->location); - - result = mn_vfs_read_entire_file_uri(selfp->uri, &atom_size, &atom); - if (result != GNOME_VFS_OK) - { - GDK_THREADS_ENTER(); - - mn_mailbox_set_error(MN_MAILBOX(self), _("unable to retrieve feed: %s"), gnome_vfs_result_to_string(result)); - - gdk_flush(); - GDK_THREADS_LEAVE(); - - return; - } - - mn_mailbox_notice(MN_MAILBOX(self), - ngettext("feed retrieved successfully (%i byte)", - "feed retrieved successfully (%i bytes)", - atom_size), - atom_size); - - doc = xmlParseMemory(atom, atom_size); - g_free(atom); - - if (! doc) - { - GDK_THREADS_ENTER(); - - mn_mailbox_set_error(MN_MAILBOX(self), _("unable to parse feed")); - - gdk_flush(); - GDK_THREADS_LEAVE(); - - return; - } - - node = xmlDocGetRootElement(doc); - if (node && ! strcmp(node->name, "feed")) - { - GSList *messages = NULL; - - for (node = node->children; node; node = node->next) - if (node->type == XML_ELEMENT_NODE && ! strcmp(node->name, "entry")) - { - time_t sent_time; - char *id; - char *from; - char *subject; - char *url; - - self_