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:
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_parse_entry(node, &sent_time, &id, &from, &subject, &url);
-
- messages = g_slist_prepend(messages, mn_message_new(MN_MAILBOX(self),
- sent_time,
- id,
- NULL,
- from,
- subject,
- url,
- MN_MESSAGE_NEW));
-
- g_free(id);
- g_free(from);
- g_free(subject);
- g_free(url);
- }
-
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_messages(MN_MAILBOX(self), messages);
- mn_g_object_slist_free(messages);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
- else
- {
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_error(MN_MAILBOX(self), _("unable to parse feed"));
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
-
- xmlFreeDoc(doc);
- }}
-#line 549 "mn-gmail-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#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)
-{
-#line 557 "mn-gmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::parse_entry"
-#line 263 "src/mn-gmail-mailbox.gob"
- g_return_if_fail (node != NULL);
-#line 263 "src/mn-gmail-mailbox.gob"
- g_return_if_fail (sent_time != NULL);
-#line 263 "src/mn-gmail-mailbox.gob"
- g_return_if_fail (id != NULL);
-#line 263 "src/mn-gmail-mailbox.gob"
- g_return_if_fail (from != NULL);
-#line 263 "src/mn-gmail-mailbox.gob"
- g_return_if_fail (subject != NULL);
-#line 263 "src/mn-gmail-mailbox.gob"
- g_return_if_fail (url != NULL);
-#line 571 "mn-gmail-mailbox.c"
-{
-#line 270 "src/mn-gmail-mailbox.gob"
-
- *sent_time = 0;
- *id = NULL;
- *from = NULL;
- *subject = NULL;
- *url = NULL;
-
- for (node = node->children; node; node = node->next)
- if (node->type == XML_ELEMENT_NODE)
- {
- if (! strcmp(node->name, "title"))
- {
- g_free(*subject);
- *subject = xmlNodeGetContent(node);
- }
- else if (! strcmp(node->name, "id"))
- {
- g_free(*id);
- *id = xmlNodeGetContent(node);
- }
- else if (! strcmp(node->name, "author"))
- {
- g_free(*from);
- *from = self_parse_author(node);
- }
- else if (! strcmp(node->name, "link"))
- {
- g_free(*url);
- *url = xmlGetProp(node, "href");
- }
- else if (! strcmp(node->name, "issued"))
- {
- char *w3c_datetime;
-
- w3c_datetime = xmlNodeGetContent(node);
- if (w3c_datetime)
- {
- *sent_time = self_parse_date(w3c_datetime);
- g_free(w3c_datetime);
- }
- }
- }
- }}
-#line 617 "mn-gmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 314 "src/mn-gmail-mailbox.gob"
-static char *
-mn_gmail_mailbox_parse_author (xmlNode * node)
-{
-#line 624 "mn-gmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::parse_author"
-#line 314 "src/mn-gmail-mailbox.gob"
- g_return_val_if_fail (node != NULL, (char * )0);
-#line 628 "mn-gmail-mailbox.c"
-{
-#line 316 "src/mn-gmail-mailbox.gob"
-
- char *from;
- char *name = NULL;
- char *email = NULL;
-
- for (node = node->children; node; node = node->next)
- if (node->type == XML_ELEMENT_NODE)
- {
- if (! strcmp(node->name, "name"))
- {
- g_free(name);
- name = xmlNodeGetContent(node);
- }
- else if (! strcmp(node->name, "email"))
- {
- g_free(email);
- email = xmlNodeGetContent(node);
- }
- }
-
- from = name && email
- ? g_strdup_printf("%s <%s>", name, email)
- : g_strdup(name ? name : email);
-
- g_free(name);
- g_free(email);
-
- return from;
- }}
-#line 660 "mn-gmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 346 "src/mn-gmail-mailbox.gob"
-static time_t
-mn_gmail_mailbox_parse_date (const char * w3c_datetime)
-{
-#line 667 "mn-gmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::parse_date"
-#line 346 "src/mn-gmail-mailbox.gob"
- g_return_val_if_fail (w3c_datetime != NULL, (time_t )0);
-#line 671 "mn-gmail-mailbox.c"
-{
-#line 348 "src/mn-gmail-mailbox.gob"
-
-#ifdef HAVE_TIMEGM
- time_t t = 0;
- char year[5];
- char month[3];
- char day[3];
- char hour[3];
- char minute[3];
- char second[3];
-
- if (sscanf(w3c_datetime, "%4s-%2s-%2sT%2s:%2s:%2sZ", year, month, day, hour, minute, second) == 6
- && mn_str_isnumeric(year)
- && mn_str_isnumeric(month)
- && mn_str_isnumeric(day)
- && mn_str_isnumeric(hour)
- && mn_str_isnumeric(minute)
- && mn_str_isnumeric(second))
- {
- struct tm tm = { 0 };
-
- tm.tm_sec = atoi(second);
- tm.tm_min = atoi(minute);
- tm.tm_hour = atoi(hour);
- tm.tm_mday = atoi(day);
- tm.tm_mon = atoi(month) - 1;
- tm.tm_year = atoi(year) - 1900;
-
- t = timegm(&tm);
- if (t == -1)
- t = 0;
- }
-
- return t;
-#else
- return 0;
-#endif
- }}
-#line 711 "mn-gmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 386 "src/mn-gmail-mailbox.gob"
-char *
-mn_gmail_mailbox_build_name (const char * username, const char * label)
-{
-#line 718 "mn-gmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::build_name"
-#line 386 "src/mn-gmail-mailbox.gob"
- g_return_val_if_fail (username != NULL, (char * )0);
-#line 722 "mn-gmail-mailbox.c"
-{
-#line 388 "src/mn-gmail-mailbox.gob"
-
- GString *name;
-
- name = g_string_new(NULL);
-
- if (g_str_has_suffix(username, "@gmail.com"))
- g_string_append(name, username);
- else
- g_string_append_printf(name, "%s@gmail.com", username);
-
- if (label)
- g_string_append_printf(name, "/%s", label);
-
- return g_string_free(name, FALSE);
- }}
-#line 740 "mn-gmail-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-gmail-mailbox.gob.stamp b/build/src/mn-gmail-mailbox.gob.stamp
diff --git a/build/src/mn-gmail-mailbox.h b/build/src/mn-gmail-mailbox.h
@@ -1,85 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-authenticated-mailbox.h"
-
-#ifndef __MN_GMAIL_MAILBOX_H__
-#define __MN_GMAIL_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_GMAIL_MAILBOX (mn_gmail_mailbox_get_type())
-#define MN_GMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_gmail_mailbox_get_type(), MNGmailMailbox)
-#define MN_GMAIL_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_gmail_mailbox_get_type(), MNGmailMailbox const)
-#define MN_GMAIL_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_gmail_mailbox_get_type(), MNGmailMailboxClass)
-#define MN_IS_GMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_gmail_mailbox_get_type ())
-
-#define MN_GMAIL_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_gmail_mailbox_get_type(), MNGmailMailboxClass)
-
-/* Private structure type */
-typedef struct _MNGmailMailboxPrivate MNGmailMailboxPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_GMAIL_MAILBOX__
-#define __TYPEDEF_MN_GMAIL_MAILBOX__
-typedef struct _MNGmailMailbox MNGmailMailbox;
-#endif
-struct _MNGmailMailbox {
- MNAuthenticatedMailbox __parent__;
- /*< public >*/
- char * location;
- char * label;
- /*< private >*/
- MNGmailMailboxPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNGmailMailboxClass MNGmailMailboxClass;
-struct _MNGmailMailboxClass {
- MNAuthenticatedMailboxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_gmail_mailbox_get_type (void) G_GNUC_CONST;
-#line 386 "src/mn-gmail-mailbox.gob"
-char * mn_gmail_mailbox_build_name (const char * username,
- const char * label);
-#line 64 "mn-gmail-mailbox.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_GMAIL_MAILBOX_PROP_LOCATION(arg) "location", __extension__ ({gchar *z = (arg); z;})
-#define MN_GMAIL_MAILBOX_GET_PROP_LOCATION(arg) "location", __extension__ ({gchar **z = (arg); z;})
-#define MN_GMAIL_MAILBOX_PROP_LABEL(arg) "label", __extension__ ({gchar *z = (arg); z;})
-#define MN_GMAIL_MAILBOX_GET_PROP_LABEL(arg) "label", __extension__ ({gchar **z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_GMAIL_MAILBOX_PROP_LOCATION(arg) "location",(gchar *)(arg)
-#define MN_GMAIL_MAILBOX_GET_PROP_LOCATION(arg) "location",(gchar **)(arg)
-#define MN_GMAIL_MAILBOX_PROP_LABEL(arg) "label",(gchar *)(arg)
-#define MN_GMAIL_MAILBOX_GET_PROP_LABEL(arg) "label",(gchar **)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-gmime-stream-vfs-private.h b/build/src/mn-gmime-stream-vfs-private.h
@@ -1,28 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_GMIME_STREAM_VFS_PRIVATE_H__
-#define __MN_GMIME_STREAM_VFS_PRIVATE_H__
-
-#include "mn-gmime-stream-vfs.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNGMimeStreamVFSPrivate {
-#line 61 "src/mn-gmime-stream-vfs.gob"
- GnomeVFSHandle * handle;
-#line 62 "src/mn-gmime-stream-vfs.gob"
- gboolean handle_owned;
-#line 64 "src/mn-gmime-stream-vfs.gob"
- char * uri;
-#line 65 "src/mn-gmime-stream-vfs.gob"
- gboolean eof;
-#line 22 "mn-gmime-stream-vfs-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-gmime-stream-vfs.c b/build/src/mn-gmime-stream-vfs.c
@@ -1,597 +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-gmime-stream-vfs.h"
-
-#include "mn-gmime-stream-vfs-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-gmime-stream-vfs.gob"
-
-#include <glib/gi18n.h>
-#include "mn-vfs.h"
-
-#define VFS_CALL(stream, expr, fail_format, fail_retval) \
- { \
- GnomeVFSResult result; \
- \
- result = expr; \
- if (result != GNOME_VFS_OK) \
- { \
- (stream)->_priv->eof = TRUE; \
- if (result != GNOME_VFS_ERROR_EOF) \
- { \
- g_warning((fail_format), \
- (stream)->_priv->uri, \
- gnome_vfs_result_to_string(result)); \
- return (fail_retval); \
- } \
- } \
- }
-
-#define VFS_READ(stream, buffer, bytes, bytes_read, fail_retval) \
- VFS_CALL((stream), gnome_vfs_read((stream)->_priv->handle, (buffer), (bytes), (bytes_read)), _("unable to read %s: %s"), (fail_retval))
-#define VFS_WRITE(stream, buffer, bytes, bytes_written, fail_retval) \
- VFS_CALL((stream), gnome_vfs_write((stream)->_priv->handle, (buffer), (bytes), (bytes_written)), _("unable to write to %s: %s"), (fail_retval))
-#define VFS_SEEK(stream, whence, offset, fail_retval) \
- VFS_CALL((stream), gnome_vfs_seek((stream)->_priv->handle, (whence), (offset)), _("unable to seek in %s: %s"), (fail_retval))
-#define VFS_TELL(stream, offset_return, fail_retval) \
- VFS_CALL((stream), gnome_vfs_tell((stream)->_priv->handle, (offset_return)), _("unable to tell position of %s: %s"), (fail_retval))
-#define VFS_CLOSE(stream, fail_retval) \
- VFS_CALL((stream), gnome_vfs_close((stream)->_priv->handle), _("unable to close %s: %s"), (fail_retval))
-
-#line 60 "mn-gmime-stream-vfs.c"
-/* self casting macros */
-#define SELF(x) MN_GMIME_STREAM_VFS(x)
-#define SELF_CONST(x) MN_GMIME_STREAM_VFS_CONST(x)
-#define IS_SELF(x) MN_IS_GMIME_STREAM_VFS(x)
-#define TYPE_SELF MN_TYPE_GMIME_STREAM_VFS
-#define SELF_CLASS(x) MN_GMIME_STREAM_VFS_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_GMIME_STREAM_VFS_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNGMimeStreamVFS Self;
-typedef MNGMimeStreamVFSClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-gmime-stream-vfs.gob"
-static void mn_gmime_stream_vfs_init (MNGMimeStreamVFS * o) G_GNUC_UNUSED;
-#line 77 "mn-gmime-stream-vfs.c"
-#line 0 "src/mn-gmime-stream-vfs.gob"
-static void mn_gmime_stream_vfs_class_init (MNGMimeStreamVFSClass * c) G_GNUC_UNUSED;
-#line 80 "mn-gmime-stream-vfs.c"
-#line 67 "src/mn-gmime-stream-vfs.gob"
-static void mn_gmime_stream_vfs_finalize (MNGMimeStreamVFS * self) G_GNUC_UNUSED;
-#line 83 "mn-gmime-stream-vfs.c"
-#line 73 "src/mn-gmime-stream-vfs.gob"
-static ssize_t ___2_mn_gmime_stream_vfs_read (GMimeStream * stream, char * buf, size_t len) G_GNUC_UNUSED;
-#line 86 "mn-gmime-stream-vfs.c"
-#line 93 "src/mn-gmime-stream-vfs.gob"
-static ssize_t ___3_mn_gmime_stream_vfs_write (GMimeStream * stream, const char * buf, size_t len) G_GNUC_UNUSED;
-#line 89 "mn-gmime-stream-vfs.c"
-#line 113 "src/mn-gmime-stream-vfs.gob"
-static int ___4_mn_gmime_stream_vfs_flush (GMimeStream * stream) G_GNUC_UNUSED;
-#line 92 "mn-gmime-stream-vfs.c"
-#line 120 "src/mn-gmime-stream-vfs.gob"
-static int ___5_mn_gmime_stream_vfs_close (GMimeStream * stream) G_GNUC_UNUSED;
-#line 95 "mn-gmime-stream-vfs.c"
-#line 130 "src/mn-gmime-stream-vfs.gob"
-static gboolean ___6_mn_gmime_stream_vfs_eos (GMimeStream * stream) G_GNUC_UNUSED;
-#line 98 "mn-gmime-stream-vfs.c"
-#line 141 "src/mn-gmime-stream-vfs.gob"
-static int ___7_mn_gmime_stream_vfs_reset (GMimeStream * stream) G_GNUC_UNUSED;
-#line 101 "mn-gmime-stream-vfs.c"
-#line 155 "src/mn-gmime-stream-vfs.gob"
-static off_t ___8_mn_gmime_stream_vfs_seek (GMimeStream * stream, off_t offset, GMimeSeekWhence whence) G_GNUC_UNUSED;
-#line 104 "mn-gmime-stream-vfs.c"
-#line 200 "src/mn-gmime-stream-vfs.gob"
-static off_t ___9_mn_gmime_stream_vfs_tell (GMimeStream * stream) G_GNUC_UNUSED;
-#line 107 "mn-gmime-stream-vfs.c"
-#line 206 "src/mn-gmime-stream-vfs.gob"
-static ssize_t ___a_mn_gmime_stream_vfs_length (GMimeStream * stream) G_GNUC_UNUSED;
-#line 110 "mn-gmime-stream-vfs.c"
-#line 225 "src/mn-gmime-stream-vfs.gob"
-static GMimeStream * ___b_mn_gmime_stream_vfs_substream (GMimeStream * stream, off_t start, off_t end) G_GNUC_UNUSED;
-#line 113 "mn-gmime-stream-vfs.c"
-
-/* pointer to the class of our parent */
-static GMimeStreamClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_new mn_gmime_stream_vfs_new
-GType
-mn_gmime_stream_vfs_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNGMimeStreamVFSClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_gmime_stream_vfs_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNGMimeStreamVFS),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_gmime_stream_vfs_init,
- NULL
- };
-
- type = g_type_register_static (GMIME_TYPE_STREAM, "MNGMimeStreamVFS", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNGMimeStreamVFS *)g_object_new(mn_gmime_stream_vfs_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNGMimeStreamVFS * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNGMimeStreamVFS *
-GET_NEW_VARG (const char *first, ...)
-{
- MNGMimeStreamVFS *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNGMimeStreamVFS *)g_object_new_valist (mn_gmime_stream_vfs_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::finalize"
- MNGMimeStreamVFS *self G_GNUC_UNUSED = MN_GMIME_STREAM_VFS (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 67 "src/mn-gmime-stream-vfs.gob"
- mn_gmime_stream_vfs_finalize (self);
-#line 171 "mn-gmime-stream-vfs.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 64 "src/mn-gmime-stream-vfs.gob"
- if(self->_priv->uri) { g_free ((gpointer) self->_priv->uri); self->_priv->uri = NULL; }
-#line 176 "mn-gmime-stream-vfs.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_gmime_stream_vfs_init (MNGMimeStreamVFS * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_GMIME_STREAM_VFS,MNGMimeStreamVFSPrivate);
-}
-#undef __GOB_FUNCTION__
-static void
-mn_gmime_stream_vfs_class_init (MNGMimeStreamVFSClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- GMimeStreamClass *gmime_stream_class = (GMimeStreamClass *)c;
-
- g_type_class_add_private(c,sizeof(MNGMimeStreamVFSPrivate));
-
- parent_class = g_type_class_ref (GMIME_TYPE_STREAM);
-
-#line 73 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->read = ___2_mn_gmime_stream_vfs_read;
-#line 93 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->write = ___3_mn_gmime_stream_vfs_write;
-#line 113 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->flush = ___4_mn_gmime_stream_vfs_flush;
-#line 120 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->close = ___5_mn_gmime_stream_vfs_close;
-#line 130 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->eos = ___6_mn_gmime_stream_vfs_eos;
-#line 141 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->reset = ___7_mn_gmime_stream_vfs_reset;
-#line 155 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->seek = ___8_mn_gmime_stream_vfs_seek;
-#line 200 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->tell = ___9_mn_gmime_stream_vfs_tell;
-#line 206 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->length = ___a_mn_gmime_stream_vfs_length;
-#line 225 "src/mn-gmime-stream-vfs.gob"
- gmime_stream_class->substream = ___b_mn_gmime_stream_vfs_substream;
-#line 218 "mn-gmime-stream-vfs.c"
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 67 "src/mn-gmime-stream-vfs.gob"
-static void
-mn_gmime_stream_vfs_finalize (MNGMimeStreamVFS * self G_GNUC_UNUSED)
-{
-#line 229 "mn-gmime-stream-vfs.c"
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::finalize"
-{
-#line 68 "src/mn-gmime-stream-vfs.gob"
-
- if (selfp->handle_owned)
- g_mime_stream_close(GMIME_STREAM(self));
- }}
-#line 237 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-
-#line 73 "src/mn-gmime-stream-vfs.gob"
-static ssize_t
-___2_mn_gmime_stream_vfs_read (GMimeStream * stream G_GNUC_UNUSED, char * buf, size_t len)
-#line 243 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream,___buf,___len) \
- ((GMIME_STREAM_CLASS(parent_class)->read)? \
- (* GMIME_STREAM_CLASS(parent_class)->read)(___stream,___buf,___len): \
- ((ssize_t )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::read"
-{
-#line 75 "src/mn-gmime-stream-vfs.gob"
-
- Self *self = SELF(stream);
- GnomeVFSFileSize bytes_read;
-
- if (stream->bound_end != -1 && stream->position >= stream->bound_end)
- return -1;
- if (stream->bound_end != -1)
- len = MIN(stream->bound_end - stream->position, (off_t) len);
-
- /* make sure we are at the right position */
- VFS_SEEK(self, GNOME_VFS_SEEK_START, stream->position, -1);
-
- VFS_READ(self, buf, len, &bytes_read, -1);
- stream->position += bytes_read;
-
- return bytes_read;
- }}
-#line 269 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 93 "src/mn-gmime-stream-vfs.gob"
-static ssize_t
-___3_mn_gmime_stream_vfs_write (GMimeStream * stream G_GNUC_UNUSED, const char * buf, size_t len)
-#line 276 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream,___buf,___len) \
- ((GMIME_STREAM_CLASS(parent_class)->write)? \
- (* GMIME_STREAM_CLASS(parent_class)->write)(___stream,___buf,___len): \
- ((ssize_t )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::write"
-{
-#line 95 "src/mn-gmime-stream-vfs.gob"
-
- Self *self = SELF(stream);
- GnomeVFSFileSize bytes_written;
-
- if (stream->bound_end != -1 && stream->position >= stream->bound_end)
- return -1;
- if (stream->bound_end != -1)
- len = MIN(stream->bound_end - stream->position, (off_t) len);
-
- /* make sure we are at the right position */
- VFS_SEEK(self, GNOME_VFS_SEEK_START, stream->position, -1);
-
- VFS_WRITE(self, buf, len, &bytes_written, -1);
- stream->position += bytes_written;
-
- return bytes_written;
- }}
-#line 302 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 113 "src/mn-gmime-stream-vfs.gob"
-static int
-___4_mn_gmime_stream_vfs_flush (GMimeStream * stream G_GNUC_UNUSED)
-#line 309 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream) \
- ((GMIME_STREAM_CLASS(parent_class)->flush)? \
- (* GMIME_STREAM_CLASS(parent_class)->flush)(___stream): \
- ((int )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::flush"
-{
-#line 115 "src/mn-gmime-stream-vfs.gob"
-
- /* nop */
- return 0; /* success */
- }}
-#line 322 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 120 "src/mn-gmime-stream-vfs.gob"
-static int
-___5_mn_gmime_stream_vfs_close (GMimeStream * stream G_GNUC_UNUSED)
-#line 329 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream) \
- ((GMIME_STREAM_CLASS(parent_class)->close)? \
- (* GMIME_STREAM_CLASS(parent_class)->close)(___stream): \
- ((int )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::close"
-{
-#line 122 "src/mn-gmime-stream-vfs.gob"
-
- Self *self = SELF(stream);
-
- VFS_CLOSE(self, -1);
-
- return 0; /* success */
- }}
-#line 345 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 130 "src/mn-gmime-stream-vfs.gob"
-static gboolean
-___6_mn_gmime_stream_vfs_eos (GMimeStream * stream G_GNUC_UNUSED)
-#line 352 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream) \
- ((GMIME_STREAM_CLASS(parent_class)->eos)? \
- (* GMIME_STREAM_CLASS(parent_class)->eos)(___stream): \
- ((gboolean )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::eos"
-{
-#line 132 "src/mn-gmime-stream-vfs.gob"
-
- Self *self = SELF(stream);
-
- if (stream->bound_end == -1)
- return selfp->eof;
- else
- return stream->position >= stream->bound_end;
- }}
-#line 369 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 141 "src/mn-gmime-stream-vfs.gob"
-static int
-___7_mn_gmime_stream_vfs_reset (GMimeStream * stream G_GNUC_UNUSED)
-#line 376 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream) \
- ((GMIME_STREAM_CLASS(parent_class)->reset)? \
- (* GMIME_STREAM_CLASS(parent_class)->reset)(___stream): \
- ((int )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::reset"
-{
-#line 143 "src/mn-gmime-stream-vfs.gob"
-
- Self *self = SELF(stream);
-
- if (stream->position == stream->bound_start)
- return 0;
-
- VFS_SEEK(self, GNOME_VFS_SEEK_START, stream->bound_start, -1);
- stream->position = stream->bound_start;
-
- return 0;
- }}
-#line 396 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 155 "src/mn-gmime-stream-vfs.gob"
-static off_t
-___8_mn_gmime_stream_vfs_seek (GMimeStream * stream G_GNUC_UNUSED, off_t offset, GMimeSeekWhence whence)
-#line 403 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream,___offset,___whence) \
- ((GMIME_STREAM_CLASS(parent_class)->seek)? \
- (* GMIME_STREAM_CLASS(parent_class)->seek)(___stream,___offset,___whence): \
- ((off_t )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::seek"
-{
-#line 157 "src/mn-gmime-stream-vfs.gob"
-
- Self *self = SELF(stream);
- off_t real = stream->position;
-
- switch (whence)
- {
- case GMIME_STREAM_SEEK_SET:
- real = offset;
- break;
-
- case GMIME_STREAM_SEEK_CUR:
- real = stream->position + offset;
- break;
-
- case GMIME_STREAM_SEEK_END:
- if (stream->bound_end == -1)
- {
- GnomeVFSFileSize current_position;
-
- VFS_SEEK(self, GNOME_VFS_SEEK_END, offset, -1);
- VFS_TELL(self, ¤t_position, -1);
-
- real = current_position;
- if (real < stream->bound_start)
- real = stream->bound_start;
- stream->position = real;
-
- return real;
- }
- real = stream->bound_end + offset;
- break;
- }
-
- if (stream->bound_end != -1)
- real = MIN(real, stream->bound_end);
- real = MAX(real, stream->bound_start);
-
- VFS_SEEK(self, GNOME_VFS_SEEK_START, real, -1);
- stream->position = real;
-
- return real;
- }}
-#line 454 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 200 "src/mn-gmime-stream-vfs.gob"
-static off_t
-___9_mn_gmime_stream_vfs_tell (GMimeStream * stream G_GNUC_UNUSED)
-#line 461 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream) \
- ((GMIME_STREAM_CLASS(parent_class)->tell)? \
- (* GMIME_STREAM_CLASS(parent_class)->tell)(___stream): \
- ((off_t )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::tell"
-{
-#line 202 "src/mn-gmime-stream-vfs.gob"
-
- return stream->position;
- }}
-#line 473 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 206 "src/mn-gmime-stream-vfs.gob"
-static ssize_t
-___a_mn_gmime_stream_vfs_length (GMimeStream * stream G_GNUC_UNUSED)
-#line 480 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream) \
- ((GMIME_STREAM_CLASS(parent_class)->length)? \
- (* GMIME_STREAM_CLASS(parent_class)->length)(___stream): \
- ((ssize_t )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::length"
-{
-#line 208 "src/mn-gmime-stream-vfs.gob"
-
- Self *self = SELF(stream);
- GnomeVFSFileSize bound_end;
-
- if (stream->bound_start != -1 && stream->bound_end != -1)
- return stream->bound_end - stream->bound_start;
-
- VFS_SEEK(self, GNOME_VFS_SEEK_END, 0, -1);
- VFS_TELL(self, &bound_end, -1);
- VFS_SEEK(self, GNOME_VFS_SEEK_START, stream->position, -1);
-
- if (bound_end < stream->bound_start)
- return -1;
-
- return bound_end - stream->bound_start;
- }}
-#line 505 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 225 "src/mn-gmime-stream-vfs.gob"
-static GMimeStream *
-___b_mn_gmime_stream_vfs_substream (GMimeStream * stream G_GNUC_UNUSED, off_t start, off_t end)
-#line 512 "mn-gmime-stream-vfs.c"
-#define PARENT_HANDLER(___stream,___start,___end) \
- ((GMIME_STREAM_CLASS(parent_class)->substream)? \
- (* GMIME_STREAM_CLASS(parent_class)->substream)(___stream,___start,___end): \
- ((GMimeStream * )0))
-{
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::substream"
-{
-#line 227 "src/mn-gmime-stream-vfs.gob"
-
- Self *self;
-
- self = GET_NEW;
- selfp->handle = SELF(stream)->_priv->handle;
- /* handle of the substream is not owned */
-
- g_mime_stream_construct(GMIME_STREAM(self), start, end);
-
- return GMIME_STREAM(self);
- }}
-#line 532 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 242 "src/mn-gmime-stream-vfs.gob"
-GMimeStream *
-mn_gmime_stream_vfs_new (GnomeVFSHandle * handle, GnomeVFSURI * uri, GnomeVFSResult * result)
-{
-#line 540 "mn-gmime-stream-vfs.c"
-#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::new"
-#line 242 "src/mn-gmime-stream-vfs.gob"
- g_return_val_if_fail (handle != NULL, (GMimeStream * )0);
-#line 242 "src/mn-gmime-stream-vfs.gob"
- g_return_val_if_fail (uri != NULL, (GMimeStream * )0);
-#line 546 "mn-gmime-stream-vfs.c"
-{
-#line 246 "src/mn-gmime-stream-vfs.gob"
-
- GMimeStream *stream;
- GnomeVFSResult _result;
- GnomeVFSFileSize current_position;
-
- if (gnome_vfs_seek(handle, GNOME_VFS_SEEK_CURRENT, 0) != GNOME_VFS_OK
- || gnome_vfs_tell(handle, ¤t_position) != GNOME_VFS_OK)
- {
- char *buf;
- int size;
-
- /* unseekable or untellable file, use a GMimeStreamMem */
-
- _result = mn_vfs_read_entire_file_uri(uri, &size, &buf);
- if (_result == GNOME_VFS_OK)
- {
- stream = g_mime_stream_mem_new_with_buffer(buf, size);
- g_free(buf);
- }
- else
- stream = NULL;
-
- gnome_vfs_close(handle);
- }
- else
- {
- Self *self;
-
- _result = GNOME_VFS_OK;
-
- self = GET_NEW;
- selfp->handle = handle;
- selfp->handle_owned = TRUE;
- selfp->uri = gnome_vfs_uri_to_string(uri, GNOME_VFS_URI_HIDE_NONE);
-
- stream = GMIME_STREAM(self);
- g_mime_stream_construct(stream, current_position, -1);
-
- /* check for EOF */
- if (g_mime_stream_length(stream) <= 0)
- selfp->eof = TRUE;
- }
-
- if (result)
- *result = _result;
-
- return stream;
- }}
-#line 597 "mn-gmime-stream-vfs.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-gmime-stream-vfs.gob.stamp b/build/src/mn-gmime-stream-vfs.gob.stamp
diff --git a/build/src/mn-gmime-stream-vfs.h b/build/src/mn-gmime-stream-vfs.h
@@ -1,68 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <libgnomevfs/gnome-vfs.h>
-#include <gmime/gmime.h>
-
-#ifndef __MN_GMIME_STREAM_VFS_H__
-#define __MN_GMIME_STREAM_VFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_GMIME_STREAM_VFS (mn_gmime_stream_vfs_get_type())
-#define MN_GMIME_STREAM_VFS(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_gmime_stream_vfs_get_type(), MNGMimeStreamVFS)
-#define MN_GMIME_STREAM_VFS_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_gmime_stream_vfs_get_type(), MNGMimeStreamVFS const)
-#define MN_GMIME_STREAM_VFS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_gmime_stream_vfs_get_type(), MNGMimeStreamVFSClass)
-#define MN_IS_GMIME_STREAM_VFS(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_gmime_stream_vfs_get_type ())
-
-#define MN_GMIME_STREAM_VFS_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_gmime_stream_vfs_get_type(), MNGMimeStreamVFSClass)
-
-/* Private structure type */
-typedef struct _MNGMimeStreamVFSPrivate MNGMimeStreamVFSPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_GMIME_STREAM_VFS__
-#define __TYPEDEF_MN_GMIME_STREAM_VFS__
-typedef struct _MNGMimeStreamVFS MNGMimeStreamVFS;
-#endif
-struct _MNGMimeStreamVFS {
- GMimeStream __parent__;
- /*< private >*/
- MNGMimeStreamVFSPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNGMimeStreamVFSClass MNGMimeStreamVFSClass;
-struct _MNGMimeStreamVFSClass {
- GMimeStreamClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_gmime_stream_vfs_get_type (void) G_GNUC_CONST;
-#line 242 "src/mn-gmime-stream-vfs.gob"
-GMimeStream * mn_gmime_stream_vfs_new (GnomeVFSHandle * handle,
- GnomeVFSURI * uri,
- GnomeVFSResult * result);
-#line 63 "mn-gmime-stream-vfs.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-hotmail-mailbox-private.h b/build/src/mn-hotmail-mailbox-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_HOTMAIL_MAILBOX_PRIVATE_H__
-#define __MN_HOTMAIL_MAILBOX_PRIVATE_H__
-
-#include "mn-hotmail-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-hotmail-mailbox-properties-private.h b/build/src/mn-hotmail-mailbox-properties-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_HOTMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
-#define __MN_HOTMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
-
-#include "mn-hotmail-mailbox-properties.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-hotmail-mailbox-properties.c b/build/src/mn-hotmail-mailbox-properties.c
@@ -1,125 +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-hotmail-mailbox-properties.h"
-
-#include "mn-hotmail-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 24 "src/mn-hotmail-mailbox-properties.gob"
-
-#include "mn-stock.h"
-
-#line 30 "mn-hotmail-mailbox-properties.c"
-/* self casting macros */
-#define SELF(x) MN_HOTMAIL_MAILBOX_PROPERTIES(x)
-#define SELF_CONST(x) MN_HOTMAIL_MAILBOX_PROPERTIES_CONST(x)
-#define IS_SELF(x) MN_IS_HOTMAIL_MAILBOX_PROPERTIES(x)
-#define TYPE_SELF MN_TYPE_HOTMAIL_MAILBOX_PROPERTIES
-#define SELF_CLASS(x) MN_HOTMAIL_MAILBOX_PROPERTIES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_HOTMAIL_MAILBOX_PROPERTIES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNHotmailMailboxProperties Self;
-typedef MNHotmailMailboxPropertiesClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-hotmail-mailbox-properties.gob"
-static void mn_hotmail_mailbox_properties_init (MNHotmailMailboxProperties * o) G_GNUC_UNUSED;
-#line 47 "mn-hotmail-mailbox-properties.c"
-#line 30 "src/mn-hotmail-mailbox-properties.gob"
-static void mn_hotmail_mailbox_properties_class_init (MNHotmailMailboxPropertiesClass * class) G_GNUC_UNUSED;
-#line 50 "mn-hotmail-mailbox-properties.c"
-
-/* pointer to the class of our parent */
-static MNWebmailMailboxPropertiesClass *parent_class = NULL;
-
-GType
-mn_hotmail_mailbox_properties_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNHotmailMailboxPropertiesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_hotmail_mailbox_properties_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNHotmailMailboxProperties),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_hotmail_mailbox_properties_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES, "MNHotmailMailboxProperties", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNHotmailMailboxProperties *)g_object_new(mn_hotmail_mailbox_properties_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNHotmailMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNHotmailMailboxProperties *
-GET_NEW_VARG (const char *first, ...)
-{
- MNHotmailMailboxProperties *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNHotmailMailboxProperties *)g_object_new_valist (mn_hotmail_mailbox_properties_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_hotmail_mailbox_properties_init (MNHotmailMailboxProperties * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox:Properties::init"
-}
-#undef __GOB_FUNCTION__
-#line 30 "src/mn-hotmail-mailbox-properties.gob"
-static void
-mn_hotmail_mailbox_properties_class_init (MNHotmailMailboxPropertiesClass * class G_GNUC_UNUSED)
-{
-#line 107 "mn-hotmail-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox:Properties::class_init"
-
- parent_class = g_type_class_ref (MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES);
-
- {
-#line 31 "src/mn-hotmail-mailbox-properties.gob"
-
- MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
-
- p_class->type = "hotmail";
- p_class->stock_id = MN_STOCK_HOTMAIL;
- p_class->combo_label = "Windows Live Hotmail";
-
-#line 121 "mn-hotmail-mailbox-properties.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
diff --git a/build/src/mn-hotmail-mailbox-properties.gob.stamp b/build/src/mn-hotmail-mailbox-properties.gob.stamp
diff --git a/build/src/mn-hotmail-mailbox-properties.h b/build/src/mn-hotmail-mailbox-properties.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-webmail-mailbox-properties.h"
-
-#ifndef __MN_HOTMAIL_MAILBOX_PROPERTIES_H__
-#define __MN_HOTMAIL_MAILBOX_PROPERTIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_HOTMAIL_MAILBOX_PROPERTIES (mn_hotmail_mailbox_properties_get_type())
-#define MN_HOTMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_hotmail_mailbox_properties_get_type(), MNHotmailMailboxProperties)
-#define MN_HOTMAIL_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_hotmail_mailbox_properties_get_type(), MNHotmailMailboxProperties const)
-#define MN_HOTMAIL_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_hotmail_mailbox_properties_get_type(), MNHotmailMailboxPropertiesClass)
-#define MN_IS_HOTMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_hotmail_mailbox_properties_get_type ())
-
-#define MN_HOTMAIL_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_hotmail_mailbox_properties_get_type(), MNHotmailMailboxPropertiesClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_HOTMAIL_MAILBOX_PROPERTIES__
-#define __TYPEDEF_MN_HOTMAIL_MAILBOX_PROPERTIES__
-typedef struct _MNHotmailMailboxProperties MNHotmailMailboxProperties;
-#endif
-struct _MNHotmailMailboxProperties {
- MNWebmailMailboxProperties __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNHotmailMailboxPropertiesClass MNHotmailMailboxPropertiesClass;
-struct _MNHotmailMailboxPropertiesClass {
- MNWebmailMailboxPropertiesClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_hotmail_mailbox_properties_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-hotmail-mailbox.c b/build/src/mn-hotmail-mailbox.c
@@ -1,641 +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-hotmail-mailbox.h"
-
-#include "mn-hotmail-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-hotmail-mailbox.gob"
-
-#include <unistd.h>
-#include <glib/gi18n.h>
-#include "mn-conf.h"
-#include "mn-webmail-mailbox-private.h"
-#include "mn-stock.h"
-#include "mn-util.h"
-
-typedef struct
-{
- const char *code;
- const char *folder;
-} InboxMapping;
-
-/* this list is not exhaustive */
-static const InboxMapping inbox_mappings_array[] = {
- { "da", "Indbakke" },
- { "de", "Posteingang" },
- { "es", "Band. entrada" },
- { "fi", "Saapuneet" },
- { "fr", "Boîte de réception" },
- { "it", "Posta in arrivo" },
- { "nl", "Postvak IN" },
- { "no", "Innboks" },
- { "pl", "Skrzynka odbiorcza" },
- { "pt_BR", "Caixa de Entrada" },
- { "pt_PT", "A Receber" },
- { "sv", "Inkorgen" },
-};
-
-static GHashTable *inbox_mappings;
-
-#line 59 "mn-hotmail-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_HOTMAIL_MAILBOX(x)
-#define SELF_CONST(x) MN_HOTMAIL_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_HOTMAIL_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_HOTMAIL_MAILBOX
-#define SELF_CLASS(x) MN_HOTMAIL_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_HOTMAIL_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNHotmailMailbox Self;
-typedef MNHotmailMailboxClass SelfClass;
-
-/* here are local prototypes */
-#line 59 "src/mn-hotmail-mailbox.gob"
-static void mn_hotmail_mailbox_class_init (MNHotmailMailboxClass * class) G_GNUC_UNUSED;
-#line 76 "mn-hotmail-mailbox.c"
-#line 71 "src/mn-hotmail-mailbox.gob"
-static void mn_hotmail_mailbox_init_inbox_mappings (void) G_GNUC_UNUSED;
-#line 79 "mn-hotmail-mailbox.c"
-#line 86 "src/mn-hotmail-mailbox.gob"
-static void mn_hotmail_mailbox_init (MNHotmailMailbox * self) G_GNUC_UNUSED;
-#line 82 "mn-hotmail-mailbox.c"
-#line 92 "src/mn-hotmail-mailbox.gob"
-static void mn_hotmail_mailbox_parse_language (const char * code, char ** language, char ** country) G_GNUC_UNUSED;
-#line 85 "mn-hotmail-mailbox.c"
-#line 123 "src/mn-hotmail-mailbox.gob"
-static const char * mn_hotmail_mailbox_get_localized_folder (const char * folder) G_GNUC_UNUSED;
-#line 88 "mn-hotmail-mailbox.c"
-#line 165 "src/mn-hotmail-mailbox.gob"
-static char * mn_hotmail_mailbox_encode_with_character_references (const char * str) G_GNUC_UNUSED;
-#line 91 "mn-hotmail-mailbox.c"
-#line 185 "src/mn-hotmail-mailbox.gob"
-static char * mn_hotmail_mailbox_create_config_file (MNHotmailMailbox * self, const char * spool_file, gboolean getlive_pre_1_40, GError ** err) G_GNUC_UNUSED;
-#line 94 "mn-hotmail-mailbox.c"
-#line 277 "src/mn-hotmail-mailbox.gob"
-static char * ___8_mn_hotmail_mailbox_get_error_message (MNWebmailMailbox * mailbox, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure) G_GNUC_UNUSED;
-#line 97 "mn-hotmail-mailbox.c"
-#line 291 "src/mn-hotmail-mailbox.gob"
-static gboolean mn_hotmail_mailbox_run_getlive (MNHotmailMailbox * self, const char * config_file, GError ** err) G_GNUC_UNUSED;
-#line 100 "mn-hotmail-mailbox.c"
-#line 304 "src/mn-hotmail-mailbox.gob"
-static gboolean mn_hotmail_mailbox_get_getlive_cvs_revision (int * major, int * minor) G_GNUC_UNUSED;
-#line 103 "mn-hotmail-mailbox.c"
-#line 359 "src/mn-hotmail-mailbox.gob"
-static gboolean ___b_mn_hotmail_mailbox_webmail_check (MNWebmailMailbox * mailbox, GError ** err) G_GNUC_UNUSED;
-#line 106 "mn-hotmail-mailbox.c"
-
-/* pointer to the class of our parent */
-static MNWebmailMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_init_inbox_mappings mn_hotmail_mailbox_init_inbox_mappings
-#define self_parse_language mn_hotmail_mailbox_parse_language
-#define self_get_localized_folder mn_hotmail_mailbox_get_localized_folder
-#define self_encode_with_character_references mn_hotmail_mailbox_encode_with_character_references
-#define self_create_config_file mn_hotmail_mailbox_create_config_file
-#define self_run_getlive mn_hotmail_mailbox_run_getlive
-#define self_get_getlive_cvs_revision mn_hotmail_mailbox_get_getlive_cvs_revision
-GType
-mn_hotmail_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNHotmailMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_hotmail_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNHotmailMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_hotmail_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_WEBMAIL_MAILBOX, "MNHotmailMailbox", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNHotmailMailbox *)g_object_new(mn_hotmail_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNHotmailMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNHotmailMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNHotmailMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNHotmailMailbox *)g_object_new_valist (mn_hotmail_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-#line 59 "src/mn-hotmail-mailbox.gob"
-static void
-mn_hotmail_mailbox_class_init (MNHotmailMailboxClass * class G_GNUC_UNUSED)
-{
-#line 165 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::class_init"
- MNWebmailMailboxClass *mn_webmail_mailbox_class = (MNWebmailMailboxClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_WEBMAIL_MAILBOX);
-
-#line 277 "src/mn-hotmail-mailbox.gob"
- mn_webmail_mailbox_class->get_error_message = ___8_mn_hotmail_mailbox_get_error_message;
-#line 359 "src/mn-hotmail-mailbox.gob"
- mn_webmail_mailbox_class->webmail_check = ___b_mn_hotmail_mailbox_webmail_check;
-#line 175 "mn-hotmail-mailbox.c"
- {
-#line 60 "src/mn-hotmail-mailbox.gob"
-
- MN_MAILBOX_CLASS(class)->type = "hotmail";
-
- /* 5 minutes is a good default */
- MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
-
- MN_WEBMAIL_MAILBOX_CLASS(class)->default_domain = "hotmail.com";
-
- self_init_inbox_mappings();
-
-#line 188 "mn-hotmail-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 86 "src/mn-hotmail-mailbox.gob"
-static void
-mn_hotmail_mailbox_init (MNHotmailMailbox * self G_GNUC_UNUSED)
-{
-#line 196 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::init"
- {
-#line 87 "src/mn-hotmail-mailbox.gob"
-
- mn_mailbox_set_format(MN_MAILBOX(self), "Windows Live Hotmail");
- mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_HOTMAIL);
-
-#line 204 "mn-hotmail-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-#line 71 "src/mn-hotmail-mailbox.gob"
-static void
-mn_hotmail_mailbox_init_inbox_mappings (void)
-{
-#line 214 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::init_inbox_mappings"
-{
-#line 73 "src/mn-hotmail-mailbox.gob"
-
- int i;
-
- inbox_mappings = g_hash_table_new(g_str_hash, g_str_equal);
-
- for (i = 0; i < G_N_ELEMENTS(inbox_mappings_array); i++)
- {
- const InboxMapping *mapping = &inbox_mappings_array[i];
-
- g_hash_table_insert(inbox_mappings, (gpointer) mapping->code, (gpointer) mapping->folder);
- }
- }}
-#line 230 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-
-#line 92 "src/mn-hotmail-mailbox.gob"
-static void
-mn_hotmail_mailbox_parse_language (const char * code, char ** language, char ** country)
-{
-#line 238 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::parse_language"
-#line 92 "src/mn-hotmail-mailbox.gob"
- g_return_if_fail (code != NULL);
-#line 242 "mn-hotmail-mailbox.c"
-{
-#line 96 "src/mn-hotmail-mailbox.gob"
-
- char *stripped = NULL;
- char *sep;
-
- /* strip the charset if any */
- sep = strchr(code, '.');
- if (sep)
- {
- stripped = g_strndup(code, sep - code);
- code = stripped;
- }
-
- sep = strchr(code, '_');
- if (sep)
- {
- *language = g_strndup(code, sep - code);
- *country = g_strdup(sep + 1);
- }
- else
- {
- *language = g_strdup(code);
- *country = NULL;
- }
-
- g_free(stripped);
- }}
-#line 271 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 123 "src/mn-hotmail-mailbox.gob"
-static const char *
-mn_hotmail_mailbox_get_localized_folder (const char * folder)
-{
-#line 278 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::get_localized_folder"
-#line 123 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (folder != NULL, (const char * )0);
-#line 282 "mn-hotmail-mailbox.c"
-{
-#line 125 "src/mn-hotmail-mailbox.gob"
-
- if (! strcmp(folder, "Inbox"))
- {
- int i;
- const char* const *language_codes;
-
- language_codes = g_get_language_names();
-
- for (i = 0; language_codes[i]; i++)
- {
- const char *code = language_codes[i];
- char *language;
- char *country;
- const char *mapping = NULL;
-
- self_parse_language(code, &language, &country);
-
- if (country)
- {
- char *full;
-
- full = g_strdup_printf("%s_%s", language, country);
- mapping = g_hash_table_lookup(inbox_mappings, full);
- g_free(full);
- }
-
- if (! mapping)
- mapping = g_hash_table_lookup(inbox_mappings, language);
-
- g_free(language);
- g_free(country);
-
- if (mapping)
- return mapping;
- }
- }
-
- return folder;
- }}
-#line 324 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 165 "src/mn-hotmail-mailbox.gob"
-static char *
-mn_hotmail_mailbox_encode_with_character_references (const char * str)
-{
-#line 331 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::encode_with_character_references"
-#line 165 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (str != NULL, (char * )0);
-#line 335 "mn-hotmail-mailbox.c"
-{
-#line 167 "src/mn-hotmail-mailbox.gob"
-
- GString *encoded;
- const char *p;
-
- encoded = g_string_new(NULL);
- for (p = str; *p; p = g_utf8_next_char(p))
- {
- gunichar c = g_utf8_get_char(p);
-
- if (c < 128 && (g_ascii_isalnum(c) || g_ascii_isspace(c) || c == '.'))
- g_string_append_c(encoded, c);
- else
- g_string_append_printf(encoded, "&#%i;", (int) c);
- }
-
- return g_string_free(encoded, FALSE);
- }}
-#line 355 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 185 "src/mn-hotmail-mailbox.gob"
-static char *
-mn_hotmail_mailbox_create_config_file (MNHotmailMailbox * self, const char * spool_file, gboolean getlive_pre_1_40, GError ** err)
-{
-#line 362 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::create_config_file"
-#line 185 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 185 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (MN_IS_HOTMAIL_MAILBOX (self), (char * )0);
-#line 185 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (spool_file != NULL, (char * )0);
-#line 370 "mn-hotmail-mailbox.c"
-{
-#line 190 "src/mn-hotmail-mailbox.gob"
-
- char *username;
- char *domain;
- const char *localized_folder;
- char *folder;
- GString *contents;
- char *filename;
- const char *charset;
-
- mn_webmail_mailbox_parse_username(MN_WEBMAIL_MAILBOX(self), &username, &domain);
-
- contents = g_string_new(NULL);
-
- localized_folder = self_get_localized_folder(MN_WEBMAIL_MAILBOX(self)->folder);
-
- if (getlive_pre_1_40)
- folder = self_encode_with_character_references(localized_folder);
- else
- folder = g_strdup(localized_folder);
-
- g_string_append_printf(contents,
- "UserName = %s\n"
- "Domain = %s\n"
- "Password = %s\n"
- "FetchOnlyUnread = Yes\n"
- "Folder = %s\n"
- "Processor = cat >> '%s'\n"
- "MarkRead = No\n",
- username,
- domain,
- MN_AUTHENTICATED_MAILBOX(self)->runtime_password,
- folder,
- spool_file);
-
- g_free(username);
- g_free(domain);
- g_free(folder);
-
- if (mn_conf_get_bool(MN_CONF_SYSTEM_HTTP_PROXY_USE_HTTP_PROXY))
- {
- char *host;
-
- host = mn_conf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_HOST);
- if (host && *host)
- {
- g_string_append_printf(contents, "Proxy = %s:%i\n", host, mn_conf_get_int(MN_CONF_SYSTEM_HTTP_PROXY_PORT));
-
- if (mn_conf_get_bool(MN_CONF_SYSTEM_HTTP_PROXY_USE_AUTHENTICATION))
- {
- char *user;
- char *password;
-
- user = mn_conf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_USER);
- password = mn_conf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_PASSWORD);
-
- if (user && *user && password && *password)
- g_string_append_printf(contents, "ProxyAuth = %s:%s\n", user, password);
-
- g_free(user);
- g_free(password);
- }
- }
- g_free(host);
- }
-
- mn_webmail_mailbox_print_config(MN_WEBMAIL_MAILBOX(self), contents->str);
-
- /*
- * As of this commit:
- *
- * http://getlive.cvs.sourceforge.net/getlive/GetLive/GetLive.pl?r1=1.39&r2=1.40
- *
- * GetLive expects the config file to be encoded in the charset of
- * the user's locale.
- */
- if (getlive_pre_1_40)
- charset = "UTF-8";
- else
- g_get_charset(&charset);
-
- filename = mn_webmail_mailbox_write_temporary_file(contents->str, charset, err);
-
- g_string_free(contents, TRUE);
-
- return filename;
- }}
-#line 459 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 277 "src/mn-hotmail-mailbox.gob"
-static char *
-___8_mn_hotmail_mailbox_get_error_message (MNWebmailMailbox * mailbox G_GNUC_UNUSED, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure)
-#line 465 "mn-hotmail-mailbox.c"
-#define PARENT_HANDLER(___mailbox,___helper_stdout,___helper_stderr,___is_auth_failure) \
- ((MN_WEBMAIL_MAILBOX_CLASS(parent_class)->get_error_message)? \
- (* MN_WEBMAIL_MAILBOX_CLASS(parent_class)->get_error_message)(___mailbox,___helper_stdout,___helper_stderr,___is_auth_failure): \
- ((char * )0))
-{
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::get_error_message"
-{
-#line 282 "src/mn-hotmail-mailbox.gob"
-
- if (helper_stderr && mn_ascii_strcasestr(helper_stderr, "error logging in"))
- {
- *is_auth_failure = TRUE;
- return g_strdup(_("authentication failed"));
- }
- return NULL;
- }}
-#line 482 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 291 "src/mn-hotmail-mailbox.gob"
-static gboolean
-mn_hotmail_mailbox_run_getlive (MNHotmailMailbox * self, const char * config_file, GError ** err)
-{
-#line 490 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::run_getlive"
-#line 291 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 291 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (MN_IS_HOTMAIL_MAILBOX (self), (gboolean )0);
-#line 291 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (config_file != NULL, (gboolean )0);
-#line 498 "mn-hotmail-mailbox.c"
-{
-#line 293 "src/mn-hotmail-mailbox.gob"
-
- char *command;
- gboolean status;
-
- command = g_strdup_printf("GetLive --config-file %s", config_file);
- status = mn_webmail_mailbox_run_helper(MN_WEBMAIL_MAILBOX(self), "GetLive", command, err);
- g_free(command);
-
- return status;
- }}
-#line 511 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 304 "src/mn-hotmail-mailbox.gob"
-static gboolean
-mn_hotmail_mailbox_get_getlive_cvs_revision (int * major, int * minor)
-{
-#line 518 "mn-hotmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::get_getlive_cvs_revision"
-#line 304 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (major != NULL, (gboolean )0);
-#line 304 "src/mn-hotmail-mailbox.gob"
- g_return_val_if_fail (minor != NULL, (gboolean )0);
-#line 524 "mn-hotmail-mailbox.c"
-{
-#line 306 "src/mn-hotmail-mailbox.gob"
-
- char *getlive_stderr;
- char **lines;
- int i;
-
- if (! g_spawn_command_line_sync("GetLive --version", NULL, &getlive_stderr, NULL, NULL))
- return FALSE;
-
- lines = g_strsplit(getlive_stderr, "\n", 0);
- g_free(getlive_stderr);
-
- for (i = 0; lines[i]; i++)
- {
- char *str;
-
- str = mn_strstr_span(lines[i], "GetLive $Revision: ");
- if (str)
- {
- char *end;
-
- end = strchr(str, ' ');
- if (end)
- {
- char *rev;
- char **versions;
-
- rev = g_strndup(str, end - str);
- versions = g_strsplit(rev, ".", 0);
- g_free(rev);
-
- if (g_strv_length(versions) >= 2
- && mn_str_isnumeric(versions[0])
- && mn_str_isnumeric(versions[1]))
- {
- *major = atoi(versions[0]);
- *minor = atoi(versions[1]);
-
- g_strfreev(versions);
- g_strfreev(lines);
-
- return TRUE;
- }
-
- g_strfreev(versions);
- }
- }
- }
-
- g_strfreev(lines);
-
- return FALSE;
- }}
-#line 579 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 359 "src/mn-hotmail-mailbox.gob"
-static gboolean
-___b_mn_hotmail_mailbox_webmail_check (MNWebmailMailbox * mailbox G_GNUC_UNUSED, GError ** err)
-#line 585 "mn-hotmail-mailbox.c"
-#define PARENT_HANDLER(___mailbox,___err) \
- ((MN_WEBMAIL_MAILBOX_CLASS(parent_class)->webmail_check)? \
- (* MN_WEBMAIL_MAILBOX_CLASS(parent_class)->webmail_check)(___mailbox,___err): \
- ((gboolean )0))
-{
-#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::webmail_check"
-{
-#line 361 "src/mn-hotmail-mailbox.gob"
-
- Self *self = SELF(mailbox);
- int getlive_major;
- int getlive_minor;
- gboolean getlive_pre_1_40;
- char *spool_file;
- char *config_file = NULL;
- gboolean status = FALSE;
-
- /* see https://sourceforge.net/tracker/?func=detail&atid=948290&aid=1881842&group_id=194154 */
- getlive_pre_1_40 = ! self_get_getlive_cvs_revision(&getlive_major, &getlive_minor)
- || getlive_major < 1
- || (getlive_major == 1 && getlive_minor < 40);
-
- /*
- * We create an empty spool file beforehand to make sure it is not
- * world-readable.
- */
- spool_file = mn_webmail_mailbox_create_spool_file(err);
- if (! spool_file)
- return FALSE;
-
- config_file = self_create_config_file(self, spool_file, getlive_pre_1_40, err);
- if (! config_file)
- goto end;
-
- if (! self_run_getlive(self, config_file, err))
- goto end;
-
- if (! mn_webmail_mailbox_read_spool_file(mailbox, spool_file, err))
- goto end;
-
- status = TRUE;
-
- end:
- unlink(spool_file);
- g_free(spool_file);
-
- if (config_file)
- {
- unlink(config_file);
- g_free(config_file);
- }
-
- return status;
- }}
-#line 640 "mn-hotmail-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
diff --git a/build/src/mn-hotmail-mailbox.gob.stamp b/build/src/mn-hotmail-mailbox.gob.stamp
diff --git a/build/src/mn-hotmail-mailbox.h b/build/src/mn-hotmail-mailbox.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-webmail-mailbox.h"
-
-#ifndef __MN_HOTMAIL_MAILBOX_H__
-#define __MN_HOTMAIL_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_HOTMAIL_MAILBOX (mn_hotmail_mailbox_get_type())
-#define MN_HOTMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_hotmail_mailbox_get_type(), MNHotmailMailbox)
-#define MN_HOTMAIL_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_hotmail_mailbox_get_type(), MNHotmailMailbox const)
-#define MN_HOTMAIL_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_hotmail_mailbox_get_type(), MNHotmailMailboxClass)
-#define MN_IS_HOTMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_hotmail_mailbox_get_type ())
-
-#define MN_HOTMAIL_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_hotmail_mailbox_get_type(), MNHotmailMailboxClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_HOTMAIL_MAILBOX__
-#define __TYPEDEF_MN_HOTMAIL_MAILBOX__
-typedef struct _MNHotmailMailbox MNHotmailMailbox;
-#endif
-struct _MNHotmailMailbox {
- MNWebmailMailbox __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNHotmailMailboxClass MNHotmailMailboxClass;
-struct _MNHotmailMailboxClass {
- MNWebmailMailboxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_hotmail_mailbox_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-imap-mailbox-private.h b/build/src/mn-imap-mailbox-private.h
@@ -1,30 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_IMAP_MAILBOX_PRIVATE_H__
-#define __MN_IMAP_MAILBOX_PRIVATE_H__
-
-#include "mn-imap-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 38 "src/mn-imap-mailbox.gob"
-
-#include "mn-client-session.h"
-
-#line 18 "mn-imap-mailbox-private.h"
-struct _MNIMAPMailboxPrivate {
-#line 160 "src/mn-imap-mailbox.gob"
- GMutex * mutex;
-#line 162 "src/mn-imap-mailbox.gob"
- MNClientSessionPrivate * idle_session;
-#line 24 "mn-imap-mailbox-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-imap-mailbox-properties-private.h b/build/src/mn-imap-mailbox-properties-private.h
@@ -1,34 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_IMAP_MAILBOX_PROPERTIES_PRIVATE_H__
-#define __MN_IMAP_MAILBOX_PROPERTIES_PRIVATE_H__
-
-#include "mn-imap-mailbox-properties.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 24 "src/mn-imap-mailbox-properties.gob"
-
-#include "mn-imap-mailbox.h"
-
-#line 18 "mn-imap-mailbox-properties-private.h"
-struct _MNIMAPMailboxPropertiesPrivate {
-#line 41 "src/mn-imap-mailbox-properties.gob"
- GtkWidget * inbox_radio;
-#line 42 "src/mn-imap-mailbox-properties.gob"
- GtkWidget * other_radio;
-#line 43 "src/mn-imap-mailbox-properties.gob"
- GtkWidget * mailbox_entry;
-#line 44 "src/mn-imap-mailbox-properties.gob"
- GtkWidget * use_idle_radio[MN_IMAP_MAILBOX_N_USE_IDLE];
-#line 28 "mn-imap-mailbox-properties-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-imap-mailbox-properties.c b/build/src/mn-imap-mailbox-properties.c
@@ -1,433 +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-imap-mailbox-properties.h"
-
-#include "mn-imap-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-imap-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-pi-mailbox-properties-private.h"
-#include "mn-auth-combo-box.h"
-#include "mn-util.h"
-#include "mn-properties-dialog.h"
-
-#line 37 "mn-imap-mailbox-properties.c"
-/* self casting macros */
-#define SELF(x) MN_IMAP_MAILBOX_PROPERTIES(x)
-#define SELF_CONST(x) MN_IMAP_MAILBOX_PROPERTIES_CONST(x)
-#define IS_SELF(x) MN_IS_IMAP_MAILBOX_PROPERTIES(x)
-#define TYPE_SELF MN_TYPE_IMAP_MAILBOX_PROPERTIES
-#define SELF_CLASS(x) MN_IMAP_MAILBOX_PROPERTIES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_IMAP_MAILBOX_PROPERTIES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNIMAPMailboxProperties Self;
-typedef MNIMAPMailboxPropertiesClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-#line 90 "src/mn-imap-mailbox-properties.gob"
-static void mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class) G_GNUC_UNUSED;
-#line 55 "mn-imap-mailbox-properties.c"
-#line 98 "src/mn-imap-mailbox-properties.gob"
-static void mn_imap_mailbox_properties_init (MNIMAPMailboxProperties * self) G_GNUC_UNUSED;
-#line 58 "mn-imap-mailbox-properties.c"
-#line 156 "src/mn-imap-mailbox-properties.gob"
-static void mn_imap_mailbox_properties_add_idle_usage (MNIMAPMailboxProperties * self, GtkBox * idle_vbox, MNIMAPMailboxUseIDLE usage, const char * mnemonic) G_GNUC_UNUSED;
-#line 61 "mn-imap-mailbox-properties.c"
-#line 170 "src/mn-imap-mailbox-properties.gob"
-static void mn_imap_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) G_GNUC_UNUSED;
-#line 64 "mn-imap-mailbox-properties.c"
-#line 181 "src/mn-imap-mailbox-properties.gob"
-static void ___5_mn_imap_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 67 "mn-imap-mailbox-properties.c"
-#line 200 "src/mn-imap-mailbox-properties.gob"
-static MNMailbox * ___6_mn_imap_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
-#line 70 "mn-imap-mailbox-properties.c"
-
-enum {
- PROP_0,
- PROP_COMPLETE,
- PROP_DEFAULT_NAME
-};
-
-/* pointer to the class of our parent */
-static MNPIMailboxPropertiesClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_add_idle_usage mn_imap_mailbox_properties_add_idle_usage
-#define self_radio_toggled_h mn_imap_mailbox_properties_radio_toggled_h
-GType
-mn_imap_mailbox_properties_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNIMAPMailboxPropertiesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_imap_mailbox_properties_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNIMAPMailboxProperties),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_imap_mailbox_properties_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_PI_MAILBOX_PROPERTIES, "MNIMAPMailboxProperties", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNIMAPMailboxProperties *)g_object_new(mn_imap_mailbox_properties_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNIMAPMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNIMAPMailboxProperties *
-GET_NEW_VARG (const char *first, ...)
-{
- MNIMAPMailboxProperties *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNIMAPMailboxProperties *)g_object_new_valist (mn_imap_mailbox_properties_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::finalize"
- MNIMAPMailboxProperties *self G_GNUC_UNUSED = MN_IMAP_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 90 "src/mn-imap-mailbox-properties.gob"
-static void
-mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GNUC_UNUSED)
-{
-#line 142 "mn-imap-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:IMAP: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(MNIMAPMailboxPropertiesPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_PI_MAILBOX_PROPERTIES);
-
-#line 181 "src/mn-imap-mailbox-properties.gob"
- mn_mailbox_properties_class->set_mailbox = ___5_mn_imap_mailbox_properties_set_mailbox;
-#line 200 "src/mn-imap-mailbox-properties.gob"
- mn_mailbox_properties_class->get_mailbox = ___6_mn_imap_mailbox_properties_get_mailbox;
-#line 155 "mn-imap-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 91 "src/mn-imap-mailbox-properties.gob"
-
- MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
-
- p_class->type = "imap";
- p_class->combo_label = "IMAP";
-
-#line 174 "mn-imap-mailbox-properties.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 98 "src/mn-imap-mailbox-properties.gob"
-static void
-mn_imap_mailbox_properties_init (MNIMAPMailboxProperties * self G_GNUC_UNUSED)
-{
-#line 182 "mn-imap-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_IMAP_MAILBOX_PROPERTIES,MNIMAPMailboxPropertiesPrivate);
- {
-#line 99 "src/mn-imap-mailbox-properties.gob"
-
- MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
- MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
- GtkWidget *hbox;
- GtkWidget *folder_vbox;
- GtkWidget *idle_section;
- GtkWidget *idle_vbox;
- int i;
-
- /* translators: header capitalization */
- folder_vbox = mn_mailbox_properties_add_general_section(properties, _("IMAP Mailbox"));
-
- selfp->inbox_radio = gtk_radio_button_new_with_mnemonic(NULL, _("In_box"));
- gtk_size_group_add_widget(properties->label_size_group, selfp->inbox_radio);
-
- gtk_box_pack_start(GTK_BOX(folder_vbox), selfp->inbox_radio, FALSE, FALSE, 0);
-
- selfp->other_radio = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(selfp->inbox_radio), _("_Other:"));
- gtk_size_group_add_widget(properties->label_size_group, selfp->other_radio);
-
- selfp->mailbox_entry = gtk_entry_new();
- gtk_widget_set_sensitive(selfp->mailbox_entry, FALSE);
-
- hbox = gtk_hbox_new(FALSE, 12);
- gtk_box_pack_start(GTK_BOX(hbox), selfp->other_radio, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), selfp->mailbox_entry, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(folder_vbox), hbox, FALSE, FALSE, 0);
- gtk_widget_show_all(folder_vbox);
-
- /* translators: header capitalization */
- idle_section = mn_hig_section_new_with_box(_("Use the IDLE Extension"), NULL, &idle_vbox);
- gtk_box_pack_start(GTK_BOX(pi->connection_page), idle_section, FALSE, FALSE, 0);
- gtk_widget_show(idle_section);
-
- self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_NEVER, Q_("IMAP connection tab|_Never"));
- self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT, _("A_utodetect"));
- self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_ALWAYS, _("Al_ways"));
-
- /* by default, autodetect is enabled */
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->use_idle_radio[MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT]), TRUE);
-
- mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+LOGIN", "IMAP LOGIN");
-
- for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(pi->port_spin[i]), mn_imap_mailbox_default_ports[i]);
-
- properties->entries = g_slist_append(properties->entries, selfp->mailbox_entry);
-
- g_signal_connect(selfp->inbox_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
- g_signal_connect(selfp->other_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
-
- g_object_connect(selfp->mailbox_entry,
- "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
- "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
- NULL);
-
-#line 243 "mn-imap-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:IMAP:Mailbox:Properties::get_property"
-{
- MNIMAPMailboxProperties *self G_GNUC_UNUSED;
-
- self = MN_IMAP_MAILBOX_PROPERTIES (object);
-
- switch (property_id) {
- case PROP_COMPLETE:
- {
-#line 48 "src/mn-imap-mailbox-properties.gob"
-
- gboolean complete;
-
- complete = mn_pi_mailbox_properties_is_complete(MN_PI_MAILBOX_PROPERTIES(self));
- if (complete)
- {
- gboolean other_active;
- const char *mailbox;
-
- other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
- mailbox = gtk_entry_get_text(GTK_ENTRY(selfp->mailbox_entry));
-
- if (other_active && ! *mailbox)
- complete = FALSE;
- }
-
- g_value_set_boolean(VAL, complete);
-
-#line 281 "mn-imap-mailbox-properties.c"
- }
- break;
- case PROP_DEFAULT_NAME:
- {
-#line 69 "src/mn-imap-mailbox-properties.gob"
-
- const char *username;
- const char *server;
- gboolean other_active;
- const char *mailbox;
-
- mn_authenticated_mailbox_properties_get_contents(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self),
- &username,
- NULL);
- mn_pi_mailbox_properties_get_contents(MN_PI_MAILBOX_PROPERTIES(self),
- NULL,
- NULL,
- &server,
- NULL);
-
- other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
- mailbox = gtk_entry_get_text(GTK_ENTRY(selfp->mailbox_entry));
-
- g_value_take_string(VAL, mn_imap_mailbox_build_name(username, server, other_active ? mailbox : NULL));
-
-#line 307 "mn-imap-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 156 "src/mn-imap-mailbox-properties.gob"
-static void
-mn_imap_mailbox_properties_add_idle_usage (MNIMAPMailboxProperties * self, GtkBox * idle_vbox, MNIMAPMailboxUseIDLE usage, const char * mnemonic)
-{
-#line 328 "mn-imap-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::add_idle_usage"
-#line 156 "src/mn-imap-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 156 "src/mn-imap-mailbox-properties.gob"
- g_return_if_fail (MN_IS_IMAP_MAILBOX_PROPERTIES (self));
-#line 156 "src/mn-imap-mailbox-properties.gob"
- g_return_if_fail (idle_vbox != NULL);
-#line 156 "src/mn-imap-mailbox-properties.gob"
- g_return_if_fail (mnemonic != NULL);
-#line 338 "mn-imap-mailbox-properties.c"
-{
-#line 161 "src/mn-imap-mailbox-properties.gob"
-
- selfp->use_idle_radio[usage] = usage == 0
- ? gtk_radio_button_new_with_mnemonic(NULL, mnemonic)
- : gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(selfp->use_idle_radio[0]), mnemonic);
-
- gtk_box_pack_start(idle_vbox, selfp->use_idle_radio[usage], TRUE, TRUE, 0);
- gtk_widget_show(selfp->use_idle_radio[usage]);
- }}
-#line 349 "mn-imap-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 170 "src/mn-imap-mailbox-properties.gob"
-static void
-mn_imap_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data)
-{
-#line 356 "mn-imap-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::radio_toggled_h"
-{
-#line 172 "src/mn-imap-mailbox-properties.gob"
-
- Self *self = user_data;
-
- gtk_widget_set_sensitive(selfp->mailbox_entry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio)));
-
- g_object_notify(G_OBJECT(self), "complete");
- g_object_notify(G_OBJECT(self), "default-name");
- }}
-#line 368 "mn-imap-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 181 "src/mn-imap-mailbox-properties.gob"
-static void
-___5_mn_imap_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 374 "mn-imap-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:IMAP:Mailbox:Properties::set_mailbox"
-{
-#line 183 "src/mn-imap-mailbox-properties.gob"
-
- Self *self = SELF(properties);
- MNIMAPMailbox *imap_mailbox = MN_IMAP_MAILBOX(mailbox);
-
- PARENT_HANDLER(properties, mailbox);
-
- if (! mn_utf8_strcasecmp(imap_mailbox->mailbox, "INBOX"))
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->inbox_radio), TRUE);
- else
- {
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->other_radio), TRUE);
- gtk_entry_set_text(GTK_ENTRY(selfp->mailbox_entry), imap_mailbox->mailbox);
- }
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->use_idle_radio[imap_mailbox->use_idle_extension]), TRUE);
- }}
-#line 398 "mn-imap-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 200 "src/mn-imap-mailbox-properties.gob"
-static MNMailbox *
-___6_mn_imap_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 405 "mn-imap-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:IMAP:Mailbox:Properties::get_mailbox"
-{
-#line 202 "src/mn-imap-mailbox-properties.gob"
-
- Self *self = SELF(properties);
- MNIMAPMailboxUseIDLE use_idle;
- MNMailbox *mailbox;
-
- mailbox = PARENT_HANDLER(properties);
-
- for (use_idle = 0; use_idle < MN_IMAP_MAILBOX_N_USE_IDLE; use_idle++)
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->use_idle_radio[use_idle])))
- break;
-
- g_object_set(mailbox, MN_IMAP_MAILBOX_PROP_USE_IDLE_EXTENSION(use_idle), NULL);
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio)))
- g_object_set(mailbox, MN_IMAP_MAILBOX_PROP_MAILBOX((char *) gtk_entry_get_text(GTK_ENTRY(selfp->mailbox_entry))), NULL);
-
- return mailbox;
- }}
-#line 432 "mn-imap-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
diff --git a/build/src/mn-imap-mailbox-properties.gob.stamp b/build/src/mn-imap-mailbox-properties.gob.stamp
diff --git a/build/src/mn-imap-mailbox-properties.h b/build/src/mn-imap-mailbox-properties.h
@@ -1,74 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-pi-mailbox-properties.h"
-
-#ifndef __MN_IMAP_MAILBOX_PROPERTIES_H__
-#define __MN_IMAP_MAILBOX_PROPERTIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_IMAP_MAILBOX_PROPERTIES (mn_imap_mailbox_properties_get_type())
-#define MN_IMAP_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_imap_mailbox_properties_get_type(), MNIMAPMailboxProperties)
-#define MN_IMAP_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_imap_mailbox_properties_get_type(), MNIMAPMailboxProperties const)
-#define MN_IMAP_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_imap_mailbox_properties_get_type(), MNIMAPMailboxPropertiesClass)
-#define MN_IS_IMAP_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_imap_mailbox_properties_get_type ())
-
-#define MN_IMAP_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_imap_mailbox_properties_get_type(), MNIMAPMailboxPropertiesClass)
-
-/* Private structure type */
-typedef struct _MNIMAPMailboxPropertiesPrivate MNIMAPMailboxPropertiesPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_IMAP_MAILBOX_PROPERTIES__
-#define __TYPEDEF_MN_IMAP_MAILBOX_PROPERTIES__
-typedef struct _MNIMAPMailboxProperties MNIMAPMailboxProperties;
-#endif
-struct _MNIMAPMailboxProperties {
- MNPIMailboxProperties __parent__;
- /*< private >*/
- MNIMAPMailboxPropertiesPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNIMAPMailboxPropertiesClass MNIMAPMailboxPropertiesClass;
-struct _MNIMAPMailboxPropertiesClass {
- MNPIMailboxPropertiesClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_imap_mailbox_properties_get_type (void) G_GNUC_CONST;
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_IMAP_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
-#define MN_IMAP_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_IMAP_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
-#define MN_IMAP_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-imap-mailbox.c b/build/src/mn-imap-mailbox.c
@@ -1,2867 +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-imap-mailbox.h"
-
-#include "mn-imap-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 42 "src/mn-imap-mailbox.gob"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include "mn-mailbox-private.h"
-#include "mn-authenticated-mailbox-private.h"
-#include "mn-pi-mailbox-private.h"
-#include "mn-util.h"
-#include "mn-message-mime.h"
-
-#define HAS_CURRENT_TAG(response, priv) (! strcmp((response)->tag, (priv)->tag))
-#define IS(response, token) (! g_ascii_strcasecmp((response)->response, (token)))
-#define IS_OK(response) IS(response, "OK")
-#define IS_NO(response) IS(response, "NO")
-#define IS_BAD(response) IS(response, "BAD")
-#define IS_BYE(response) IS(response, "BYE")
-
-enum
-{
- STATE_GREETING = MN_CLIENT_SESSION_INITIAL_STATE,
- STATE_CAPABILITY,
-#if WITH_SSL
- STATE_STARTTLS,
-#endif
-#if WITH_SASL
- STATE_AUTHENTICATE,
-#endif
- STATE_LOGIN,
- STATE_EXAMINE,
- STATE_SEARCH_UNSEEN,
- STATE_SEARCH_RECENT,
- STATE_FETCH_UID,
- STATE_FETCH,
- STATE_IDLE,
- STATE_LOGOUT
-};
-
-typedef enum
-{
- IDLE_STATE_PRE_IDLE,
- IDLE_STATE_IDLE,
- IDLE_STATE_POST_IDLE
-} IdleState;
-
-struct _MNClientSessionPrivate
-{
- MN_PI_MAILBOX_SESSION_PRIVATE;
- MNIMAPMailbox *self;
-
- const char *server_software;
- gboolean server_software_supports_idle;
-
- int numeric_tag;
- char tag[5];
-
- char **capabilities;
- GSList *auth_mechanisms;
- gboolean authenticated;
-
- /*
- * RFC 3501 specifies that UIDVALIDITY is a 32-bit number, but we do
- * not need it to be one. Use a string for interoperability purposes
- * (in case some server vendors did not read the RFC properly).
- */
- char *uidvalidity;
-
- int num_errors;
- GHashTable *messages;
-
-#if WITH_SSL
- gboolean starttls_completed;
-#endif
-#if WITH_SASL
- GSList *sasl_remaining_mechanisms;
- const char *sasl_mechanism;
-#endif
-
- IdleState idle_state;
- unsigned int idle_inactivity_timeout_id;
- gboolean idle_inactivity;
- gboolean could_idle; /* could idle at least once */
-};
-
-struct _MNClientSessionResponse
-{
- char *continuation;
- char *tag;
- char *response;
- char *code;
- char *arguments;
-};
-
-typedef struct
-{
- MNMessage *message;
- char *mid;
- int number;
- MNMessageFlags flags;
-} MessageInfo;
-
-int mn_imap_mailbox_default_ports[MN_PI_MAILBOX_N_CONNECTION_TYPES] = { 143, 143, 993 };
-
-/* variable taken from Evolution (camel-utf8.c) */
-static const char *utf7_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,";
-
-#line 133 "mn-imap-mailbox.c"
-static const GEnumValue _mn_imap_mailbox_use_idle_values[] = {
- { MN_IMAP_MAILBOX_USE_IDLE_NEVER, (char *)"MN_IMAP_MAILBOX_USE_IDLE_NEVER", (char *)"never" },
- { MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT, (char *)"MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT", (char *)"autodetect" },
- { MN_IMAP_MAILBOX_USE_IDLE_ALWAYS, (char *)"MN_IMAP_MAILBOX_USE_IDLE_ALWAYS", (char *)"always" },
- { 0, NULL, NULL }
-};
-
-GType
-mn_imap_mailbox_use_idle_get_type (void)
-{
- static GType type = 0;
- if ___GOB_UNLIKELY(type == 0)
- type = g_enum_register_static ("MNIMAPMailboxUseIDLE", _mn_imap_mailbox_use_idle_values);
- return type;
-}
-
-/* self casting macros */
-#define SELF(x) MN_IMAP_MAILBOX(x)
-#define SELF_CONST(x) MN_IMAP_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_IMAP_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_IMAP_MAILBOX
-#define SELF_CLASS(x) MN_IMAP_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_IMAP_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNIMAPMailbox Self;
-typedef MNIMAPMailboxClass 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 179 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_class_init (MNIMAPMailboxClass * class) G_GNUC_UNUSED;
-#line 168 "mn-imap-mailbox.c"
-#line 185 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_init (MNIMAPMailbox * self) G_GNUC_UNUSED;
-#line 171 "mn-imap-mailbox.c"
-#line 190 "src/mn-imap-mailbox.gob"
-static void ___3_mn_imap_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 174 "mn-imap-mailbox.c"
-#line 219 "src/mn-imap-mailbox.gob"
-static MNMailbox * ___4_mn_imap_mailbox_parse_uri (MNMailbox * dummy, const char * uri) G_GNUC_UNUSED;
-#line 177 "mn-imap-mailbox.c"
-#line 289 "src/mn-imap-mailbox.gob"
-static gboolean mn_imap_mailbox_split_uri_location (const char * location, int maxlen, char * hostport, char * path, gboolean * has_path) G_GNUC_UNUSED;
-#line 180 "mn-imap-mailbox.c"
-#line 316 "src/mn-imap-mailbox.gob"
-static void ___6_mn_imap_mailbox_removed (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 183 "mn-imap-mailbox.c"
-#line 332 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 186 "mn-imap-mailbox.c"
-#line 362 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_capability_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 189 "mn-imap-mailbox.c"
-#line 369 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_capability_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 192 "mn-imap-mailbox.c"
-#line 404 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_starttls_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 195 "mn-imap-mailbox.c"
-#line 416 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_starttls_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 198 "mn-imap-mailbox.c"
-#line 452 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_authenticate_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 201 "mn-imap-mailbox.c"
-#line 485 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_authenticate_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 204 "mn-imap-mailbox.c"
-#line 545 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_login_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 207 "mn-imap-mailbox.c"
-#line 574 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_login_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 210 "mn-imap-mailbox.c"
-#line 602 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_examine_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 213 "mn-imap-mailbox.c"
-#line 620 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_examine_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 216 "mn-imap-mailbox.c"
-#line 662 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_search_unseen_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 219 "mn-imap-mailbox.c"
-#line 676 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_search_unseen_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 222 "mn-imap-mailbox.c"
-#line 733 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_search_recent_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 225 "mn-imap-mailbox.c"
-#line 740 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_search_recent_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 228 "mn-imap-mailbox.c"
-#line 800 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_fetch_uid_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 231 "mn-imap-mailbox.c"
-#line 820 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_build_fetch_uid_set_cb (gpointer key, gpointer value, gpointer user_data) G_GNUC_UNUSED;
-#line 234 "mn-imap-mailbox.c"
-#line 832 "src/mn-imap-mailbox.gob"
-static char * mn_imap_mailbox_parse_fetch_uid_response (const char * response) G_GNUC_UNUSED;
-#line 237 "mn-imap-mailbox.c"
-#line 855 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_fetch_uid_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 240 "mn-imap-mailbox.c"
-#line 925 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_fetch_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 243 "mn-imap-mailbox.c"
-#line 949 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_build_fetch_set_cb (gpointer key, gpointer value, gpointer user_data) G_GNUC_UNUSED;
-#line 246 "mn-imap-mailbox.c"
-#line 964 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 249 "mn-imap-mailbox.c"
-#line 1060 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_idle_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 252 "mn-imap-mailbox.c"
-#line 1103 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_idle_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 255 "mn-imap-mailbox.c"
-#line 1201 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_enter_logout_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 258 "mn-imap-mailbox.c"
-#line 1208 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_handle_logout_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 261 "mn-imap-mailbox.c"
-#line 1228 "src/mn-imap-mailbox.gob"
-static void ___21_mn_imap_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
-#line 264 "mn-imap-mailbox.c"
-#line 1337 "src/mn-imap-mailbox.gob"
-static MNClientSessionResponse * mn_imap_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 267 "mn-imap-mailbox.c"
-#line 1413 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 270 "mn-imap-mailbox.c"
-#line 1426 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_default_handler (MNClientSessionResponse * response, MNClientSessionPrivate * priv, int error_code_when_bye) G_GNUC_UNUSED;
-#line 273 "mn-imap-mailbox.c"
-#line 1437 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_pre_read_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 276 "mn-imap-mailbox.c"
-#line 1458 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_post_read_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 279 "mn-imap-mailbox.c"
-#line 1475 "src/mn-imap-mailbox.gob"
-static gboolean mn_imap_mailbox_idle_inactivity_timeout_cb (gpointer data) G_GNUC_UNUSED;
-#line 282 "mn-imap-mailbox.c"
-#line 1495 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_session_write (MNClientSessionPrivate * priv, const char * format, ...)
-G_GNUC_PRINTF(2, 3) G_GNUC_UNUSED;
-#line 286 "mn-imap-mailbox.c"
-#line 1516 "src/mn-imap-mailbox.gob"
-static gboolean mn_imap_mailbox_session_handle_capability_code (MNClientSessionPrivate * priv, MNClientSessionResponse * response) G_GNUC_UNUSED;
-#line 289 "mn-imap-mailbox.c"
-#line 1537 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_session_parse_capabilities (MNClientSessionPrivate * priv, const char * capabilities) G_GNUC_UNUSED;
-#line 292 "mn-imap-mailbox.c"
-#line 1564 "src/mn-imap-mailbox.gob"
-static gboolean mn_imap_mailbox_session_has_capability (MNClientSessionPrivate * priv, const char * capability) G_GNUC_UNUSED;
-#line 295 "mn-imap-mailbox.c"
-#line 1579 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_session_after_capability (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 298 "mn-imap-mailbox.c"
-#line 1603 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 301 "mn-imap-mailbox.c"
-#line 1643 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_login) G_GNUC_UNUSED;
-#line 304 "mn-imap-mailbox.c"
-#line 1689 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_session_detect_imapd (MNClientSession * session, MNClientSessionResponse * greeting_response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 307 "mn-imap-mailbox.c"
-#line 1713 "src/mn-imap-mailbox.gob"
-static int mn_imap_mailbox_session_got_messages (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 310 "mn-imap-mailbox.c"
-#line 1751 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_get_messages_list_cb (gpointer key, gpointer value, gpointer user_data) G_GNUC_UNUSED;
-#line 313 "mn-imap-mailbox.c"
-#line 1761 "src/mn-imap-mailbox.gob"
-static MessageInfo * mn_imap_mailbox_session_get_message_info (MNClientSessionPrivate * priv, int number) G_GNUC_UNUSED;
-#line 316 "mn-imap-mailbox.c"
-#line 1768 "src/mn-imap-mailbox.gob"
-static MessageInfo * mn_imap_mailbox_session_ensure_message_info (MNClientSessionPrivate * priv, int number) G_GNUC_UNUSED;
-#line 319 "mn-imap-mailbox.c"
-#line 1784 "src/mn-imap-mailbox.gob"
-static MessageInfo * mn_imap_mailbox_message_info_new (int number) G_GNUC_UNUSED;
-#line 322 "mn-imap-mailbox.c"
-#line 1795 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_message_info_free (MessageInfo * info) G_GNUC_UNUSED;
-#line 325 "mn-imap-mailbox.c"
-#line 1812 "src/mn-imap-mailbox.gob"
-static char * mn_imap_mailbox_quote (const char * str) G_GNUC_UNUSED;
-#line 328 "mn-imap-mailbox.c"
-#line 1837 "src/mn-imap-mailbox.gob"
-static char * mn_imap_mailbox_utf8_to_imap_utf7 (const char * str) G_GNUC_UNUSED;
-#line 331 "mn-imap-mailbox.c"
-#line 1896 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_imap_utf7_closeb64 (GString * out, guint32 v, guint32 i) G_GNUC_UNUSED;
-#line 334 "mn-imap-mailbox.c"
-#line 1932 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_lock (MNIMAPMailbox * self) G_GNUC_UNUSED;
-#line 337 "mn-imap-mailbox.c"
-#line 1938 "src/mn-imap-mailbox.gob"
-static void mn_imap_mailbox_unlock (MNIMAPMailbox * self) G_GNUC_UNUSED;
-#line 340 "mn-imap-mailbox.c"
-
-enum {
- PROP_0,
- PROP_MAILBOX,
- PROP_USE_IDLE_EXTENSION
-};
-
-/* pointer to the class of our parent */
-static MNPIMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_split_uri_location mn_imap_mailbox_split_uri_location
-#define self_handle_greeting_cb mn_imap_mailbox_handle_greeting_cb
-#define self_enter_capability_cb mn_imap_mailbox_enter_capability_cb
-#define self_handle_capability_cb mn_imap_mailbox_handle_capability_cb
-#define self_enter_starttls_cb mn_imap_mailbox_enter_starttls_cb
-#define self_handle_starttls_cb mn_imap_mailbox_handle_starttls_cb
-#define self_enter_authenticate_cb mn_imap_mailbox_enter_authenticate_cb
-#define self_handle_authenticate_cb mn_imap_mailbox_handle_authenticate_cb
-#define self_enter_login_cb mn_imap_mailbox_enter_login_cb
-#define self_handle_login_cb mn_imap_mailbox_handle_login_cb
-#define self_enter_examine_cb mn_imap_mailbox_enter_examine_cb
-#define self_handle_examine_cb mn_imap_mailbox_handle_examine_cb
-#define self_enter_search_unseen_cb mn_imap_mailbox_enter_search_unseen_cb
-#define self_handle_search_unseen_cb mn_imap_mailbox_handle_search_unseen_cb
-#define self_enter_search_recent_cb mn_imap_mailbox_enter_search_recent_cb
-#define self_handle_search_recent_cb mn_imap_mailbox_handle_search_recent_cb
-#define self_enter_fetch_uid_cb mn_imap_mailbox_enter_fetch_uid_cb
-#define self_build_fetch_uid_set_cb mn_imap_mailbox_build_fetch_uid_set_cb
-#define self_parse_fetch_uid_response mn_imap_mailbox_parse_fetch_uid_response
-#define self_handle_fetch_uid_cb mn_imap_mailbox_handle_fetch_uid_cb
-#define self_enter_fetch_cb mn_imap_mailbox_enter_fetch_cb
-#define self_build_fetch_set_cb mn_imap_mailbox_build_fetch_set_cb
-#define self_handle_fetch_cb mn_imap_mailbox_handle_fetch_cb
-#define self_enter_idle_cb mn_imap_mailbox_enter_idle_cb
-#define self_handle_idle_cb mn_imap_mailbox_handle_idle_cb
-#define self_enter_logout_cb mn_imap_mailbox_enter_logout_cb
-#define self_handle_logout_cb mn_imap_mailbox_handle_logout_cb
-#define self_response_new_cb mn_imap_mailbox_response_new_cb
-#define self_response_free_cb mn_imap_mailbox_response_free_cb
-#define self_default_handler mn_imap_mailbox_default_handler
-#define self_pre_read_cb mn_imap_mailbox_pre_read_cb
-#define self_post_read_cb mn_imap_mailbox_post_read_cb
-#define self_idle_inactivity_timeout_cb mn_imap_mailbox_idle_inactivity_timeout_cb
-#define self_session_write mn_imap_mailbox_session_write
-#define self_session_handle_capability_code mn_imap_mailbox_session_handle_capability_code
-#define self_session_parse_capabilities mn_imap_mailbox_session_parse_capabilities
-#define self_session_has_capability mn_imap_mailbox_session_has_capability
-#define self_session_after_capability mn_imap_mailbox_session_after_capability
-#define self_session_authenticate mn_imap_mailbox_session_authenticate
-#define self_session_authenticate_fallback mn_imap_mailbox_session_authenticate_fallback
-#define self_session_detect_imapd mn_imap_mailbox_session_detect_imapd
-#define self_session_got_messages mn_imap_mailbox_session_got_messages
-#define self_get_messages_list_cb mn_imap_mailbox_get_messages_list_cb
-#define self_session_get_message_info mn_imap_mailbox_session_get_message_info
-#define self_session_ensure_message_info mn_imap_mailbox_session_ensure_message_info
-#define self_message_info_new mn_imap_mailbox_message_info_new
-#define self_message_info_free mn_imap_mailbox_message_info_free
-#define self_quote mn_imap_mailbox_quote
-#define self_utf8_to_imap_utf7 mn_imap_mailbox_utf8_to_imap_utf7
-#define self_imap_utf7_closeb64 mn_imap_mailbox_imap_utf7_closeb64
-#define self_build_name mn_imap_mailbox_build_name
-#define self_lock mn_imap_mailbox_lock
-#define self_unlock mn_imap_mailbox_unlock
-GType
-mn_imap_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNIMAPMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_imap_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNIMAPMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_imap_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_PI_MAILBOX, "MNIMAPMailbox", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNIMAPMailbox *)g_object_new(mn_imap_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNIMAPMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNIMAPMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNIMAPMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNIMAPMailbox *)g_object_new_valist (mn_imap_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::finalize"
- MNIMAPMailbox *self G_GNUC_UNUSED = MN_IMAP_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 160 "src/mn-imap-mailbox.gob"
- if(self->_priv->mutex) { g_mutex_free ((gpointer) self->_priv->mutex); self->_priv->mutex = NULL; }
-#line 458 "mn-imap-mailbox.c"
-#line 164 "src/mn-imap-mailbox.gob"
- if(self->mailbox) { g_free ((gpointer) self->mailbox); self->mailbox = NULL; }
-#line 461 "mn-imap-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-
-#line 179 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_class_init (MNIMAPMailboxClass * class G_GNUC_UNUSED)
-{
-#line 469 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP: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(MNIMAPMailboxPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_PI_MAILBOX);
-
-#line 190 "src/mn-imap-mailbox.gob"
- mn_mailbox_class->seal = ___3_mn_imap_mailbox_seal;
-#line 219 "src/mn-imap-mailbox.gob"
- mn_mailbox_class->parse_uri = ___4_mn_imap_mailbox_parse_uri;
-#line 316 "src/mn-imap-mailbox.gob"
- mn_mailbox_class->removed = ___6_mn_imap_mailbox_removed;
-#line 1228 "src/mn-imap-mailbox.gob"
- mn_authenticated_mailbox_class->authenticated_check = ___21_mn_imap_mailbox_authenticated_check;
-#line 487 "mn-imap-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
- ("mailbox" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- "INBOX" /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_IGNORE_CASE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (g_object_class,
- PROP_MAILBOX,
- param_spec);
- param_spec = g_param_spec_enum
- ("use_idle_extension" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- MN_TYPE_IMAP_MAILBOX_USE_IDLE /* enum_type */,
- MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (g_object_class,
- PROP_USE_IDLE_EXTENSION,
- param_spec);
- }
- {
-#line 180 "src/mn-imap-mailbox.gob"
-
- MN_MAILBOX_CLASS(class)->type = "imap";
- MN_PI_MAILBOX_CLASS(class)->default_ports = mn_imap_mailbox_default_ports;
-
-#line 520 "mn-imap-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 185 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_init (MNIMAPMailbox * self G_GNUC_UNUSED)
-{
-#line 528 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_IMAP_MAILBOX,MNIMAPMailboxPrivate);
-#line 160 "src/mn-imap-mailbox.gob"
- self->_priv->mutex = g_mutex_new();
-#line 533 "mn-imap-mailbox.c"
- {
-#line 186 "src/mn-imap-mailbox.gob"
-
- mn_mailbox_set_format(MN_MAILBOX(self), "IMAP");
-
-#line 539 "mn-imap-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:IMAP:Mailbox::set_property"
-{
- MNIMAPMailbox *self G_GNUC_UNUSED;
-
- self = MN_IMAP_MAILBOX (object);
-
- switch (property_id) {
- case PROP_MAILBOX:
- {
-#line 165 "src/mn-imap-mailbox.gob"
-{ char *old = self->mailbox; self->mailbox = g_value_dup_string (VAL); g_free (old); }
-#line 560 "mn-imap-mailbox.c"
- }
- break;
- case PROP_USE_IDLE_EXTENSION:
- {
-#line 173 "src/mn-imap-mailbox.gob"
-self->use_idle_extension = g_value_get_enum (VAL);
-#line 567 "mn-imap-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:IMAP:Mailbox::get_property"
-{
- MNIMAPMailbox *self G_GNUC_UNUSED;
-
- self = MN_IMAP_MAILBOX (object);
-
- switch (property_id) {
- case PROP_MAILBOX:
- {
-#line 165 "src/mn-imap-mailbox.gob"
-g_value_set_string (VAL, self->mailbox);
-#line 598 "mn-imap-mailbox.c"
- }
- break;
- case PROP_USE_IDLE_EXTENSION:
- {
-#line 173 "src/mn-imap-mailbox.gob"
-g_value_set_enum (VAL, self->use_idle_extension);
-#line 605 "mn-imap-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 190 "src/mn-imap-mailbox.gob"
-static void
-___3_mn_imap_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 625 "mn-imap-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->seal) \
- (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::seal"
-{
-#line 192 "src/mn-imap-mailbox.gob"
-
- MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
- Self *self = SELF(mailbox);
-
- PARENT_HANDLER(mailbox);
-
- if (! mailbox->runtime_name)
- mailbox->runtime_name = self_build_name(MN_AUTHENTICATED_MAILBOX(mailbox)->username,
- MN_PI_MAILBOX(mailbox)->hostname,
- self->mailbox);
-
-#if WITH_SSL
- if (MN_PI_MAILBOX(self)->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL)
- auth_mailbox->keyring_protocol = g_strdup("imaps");
- else
-#endif
- auth_mailbox->keyring_protocol = g_strdup("imap");
- }}
-#line 651 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 219 "src/mn-imap-mailbox.gob"
-static MNMailbox *
-___4_mn_imap_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * uri)
-#line 658 "mn-imap-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:IMAP:Mailbox::parse_uri"
-{
-#line 221 "src/mn-imap-mailbox.gob"
-
- int len;
- int buflen;
- char *username = NULL;
- char *authmech = NULL;
- char *hostname;
- char *path = NULL;
- int port;
- MNMailbox *mailbox;
-
- len = strlen(uri);
- buflen = len + 1;
-
- {
- char scheme_buf[buflen];
- char auth_buf[buflen];
- char location_buf[buflen];
- char hostport_buf[buflen];
- char path_buf[buflen];
- char username_buf[buflen];
- char authmech_buf[buflen];
- char hostname_buf[buflen];
- gboolean has_path;
- gboolean has_authmech = FALSE;
-
- if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf))
- return NULL;
-
- if (strcmp(scheme_buf, "imap"))
- return NULL;
-
- if (! self_split_uri_location(location_buf, len, hostport_buf, path_buf, &has_path))
- return NULL;
-
- if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_authmech))
- return NULL;
-
- if (has_authmech && ! strcmp(authmech_buf, "*"))
- has_authmech = FALSE;
-
- mn_pi_mailbox_split_uri_hostport(hostport_buf, len, hostname_buf, &port);
-
- username = gnome_vfs_unescape_string(username_buf, NULL);
- if (has_authmech)
- authmech = gnome_vfs_unescape_string(authmech_buf, NULL);
- hostname = gnome_vfs_unescape_string(hostname_buf, NULL);
- if (has_path)
- path = gnome_vfs_unescape_string(path_buf, NULL);
- }
-
- mailbox = mn_mailbox_new("imap",
- "username", username,
- "authmech", authmech,
- "hostname", hostname,
- "port", port,
- NULL);
-
- if (path)
- g_object_set(mailbox, MN_IMAP_MAILBOX_PROP_MAILBOX(path), NULL);
-
- g_free(username);
- g_free(authmech);
- g_free(hostname);
- g_free(path);
-
- return mailbox;
- }}
-#line 734 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 289 "src/mn-imap-mailbox.gob"
-static gboolean
-mn_imap_mailbox_split_uri_location (const char * location, int maxlen, char * hostport, char * path, gboolean * has_path)
-{
-#line 742 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::split_uri_location"
-#line 289 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (location != NULL, (gboolean )0);
-#line 289 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (hostport != NULL, (gboolean )0);
-#line 289 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (path != NULL, (gboolean )0);
-#line 289 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (has_path != NULL, (gboolean )0);
-#line 752 "mn-imap-mailbox.c"
-{
-#line 295 "src/mn-imap-mailbox.gob"
-
- char *pat;
- int n;
-
- pat = g_strdup_printf("%%%i[^/]/%%%is", maxlen, maxlen);
- n = sscanf(location, pat, hostport, path);
- g_free(pat);
-
- g_return_val_if_fail(n >= 1, FALSE);
-
- *has_path = n == 2;
- if (*has_path)
- {
- /* we only handle enc_mailbox (see the RFC 2192 ABNF) */
- if (strspn(path, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$-_.+!*'(),%&=~:@/") != strlen(path))
- return FALSE; /* more than enc_mailbox, unhandled */
- }
-
- return TRUE;
- }}
-#line 775 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 316 "src/mn-imap-mailbox.gob"
-static void
-___6_mn_imap_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 781 "mn-imap-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->removed) \
- (* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::removed"
-{
-#line 318 "src/mn-imap-mailbox.gob"
-
- Self *self = SELF(mailbox);
-
- PARENT_HANDLER(mailbox);
-
- self_lock(self);
- if (selfp->idle_session)
- {
- mn_client_session_write(selfp->idle_session->session, "DONE");
- selfp->idle_session->idle_state = IDLE_STATE_POST_IDLE;
- }
- self_unlock(self);
- }}
-#line 802 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 332 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 810 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_greeting_cb"
-{
-#line 336 "src/mn-imap-mailbox.gob"
-
- priv->session = session;
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (! response->tag && IS_OK(response))
- {
- self_session_detect_imapd(session, response, priv);
- return self_session_handle_capability_code(priv, response)
- ? self_session_after_capability(priv)
- : STATE_CAPABILITY;
- }
- else if (! response->tag && IS(response, "PREAUTH"))
- {
- priv->authenticated = TRUE;
- self_session_detect_imapd(session, response, priv);
- return self_session_handle_capability_code(priv, response)
- ? self_session_after_capability(priv)
- : STATE_CAPABILITY;
- }
- else if (! response->tag && IS_BYE(response))
- return mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }}
-#line 839 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 362 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_capability_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 846 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_capability_cb"
-{
-#line 365 "src/mn-imap-mailbox.gob"
-
- return self_session_write(priv, "CAPABILITY");
- }}
-#line 853 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 369 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_capability_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 860 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_capability_cb"
-{
-#line 373 "src/mn-imap-mailbox.gob"
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- return priv->capabilities
- ? self_session_after_capability(priv)
- : mn_client_session_set_error(session, MN_CLIENT_SESSION_ERROR_OTHER, _("server did not send capabilities"));
- }
- else if (IS_BAD(response))
- {
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_LOGOUT;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (IS(response, "CAPABILITY"))
- {
- self_session_parse_capabilities(priv, response->arguments);
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
- }}
-#line 894 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 404 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_starttls_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 901 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_starttls_cb"
-{
-#line 407 "src/mn-imap-mailbox.gob"
-
-#if WITH_SSL
- return self_session_write(priv, "STARTTLS");
-#else
- g_assert_not_reached();
- return 0;
-#endif /* WITH_SSL */
- }}
-#line 913 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 416 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_starttls_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 920 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_starttls_cb"
-{
-#line 420 "src/mn-imap-mailbox.gob"
-
-#if WITH_SSL
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- priv->starttls_completed = TRUE;
- return mn_client_session_enable_ssl(session)
- ? STATE_CAPABILITY
- : MN_CLIENT_SESSION_RESULT_DISCONNECT;
- }
- else if (IS_BAD(response))
- {
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_LOGOUT;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
-#else
- g_assert_not_reached();
- return 0;
-#endif /* WITH_SSL */
- }}
-#line 955 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 452 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_authenticate_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 962 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_authenticate_cb"
-{
-#line 455 "src/mn-imap-mailbox.gob"
-
-#if WITH_SASL
- priv->sasl_mechanism = NULL;
-
- if (mn_client_session_sasl_authentication_start(priv->session,
- "imap",
- priv->sasl_remaining_mechanisms,
- priv->pi_mailbox->authmech,
- &priv->sasl_mechanism,
- NULL, /* [1] */
- NULL)) /* [1] */
- {
- g_assert(priv->sasl_mechanism != NULL);
- return self_session_write(priv, "AUTHENTICATE %s", priv->sasl_mechanism);
- }
- else
- return priv->auth_mailbox->auth_cancelled
- ? STATE_LOGOUT
- : self_session_authenticate_fallback(priv, FALSE);
-
- /*
- * [1] RFC 3501 6.2.2 specifies that the IMAP protocol does not
- * support the initial client response feature of SASL.
- */
-#else
- g_assert_not_reached();
- return 0;
-#endif /* WITH_SASL */
- }}
-#line 995 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 485 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_authenticate_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1002 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_authenticate_cb"
-{
-#line 489 "src/mn-imap-mailbox.gob"
-
-#if WITH_SASL
- if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- if (mn_client_session_sasl_authentication_done(session))
- {
- priv->authenticated = TRUE;
-
- /*
- * RFC 3501 2.2.2:
- *
- * A server MAY include a CAPABILITY response code
- * in the tagged OK response of a successful
- * AUTHENTICATE command in order to send
- * capabilities automatically. It is unnecessary
- * for a client to send a separate CAPABILITY
- * command if it recognizes these automatic
- * capabilities. This should only be done if a
- * security layer was not negotiated by the
- * AUTHENTICATE command, because the tagged OK
- * response as part of an AUTHENTICATE command is
- * not protected by encryption/integrity checking.
- * [SASL] requires the client to re-issue a
- * CAPABILITY command in this case.
- */
- return self_session_handle_capability_code(priv, response) && mn_client_session_sasl_get_ssf(session)
- ? STATE_EXAMINE
- : STATE_CAPABILITY;
- }
- else
- return MN_CLIENT_SESSION_RESULT_DISCONNECT;
- }
- else if (IS_NO(response) || IS_BAD(response))
- {
- return priv->auth_mailbox->auth_cancelled
- ? STATE_LOGOUT
- : self_session_authenticate_fallback(priv, FALSE);
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (response->continuation)
- return mn_client_session_sasl_authentication_step(session, response->continuation);
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
-#else
- g_assert_not_reached();
- return 0;
-#endif /* WITH_SASL */
- }}
-#line 1061 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 545 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_login_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1068 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_login_cb"
-{
-#line 548 "src/mn-imap-mailbox.gob"
-
- if (self_session_has_capability(priv, "LOGINDISABLED"))
- {
- mn_client_session_notice(session, _("server advertised LOGINDISABLED, not using LOGIN authentication"));
- mn_client_session_set_error(session, MN_CLIENT_SESSION_ERROR_OTHER, _("unable to login"));
- return STATE_LOGOUT;
- }
- else
- {
- char *quoted_username;
- char *quoted_password;
- int result;
-
- if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
- return STATE_LOGOUT;
-
- quoted_username = self_quote(priv->auth_mailbox->username);
- quoted_password = self_quote(priv->auth_mailbox->runtime_password);
- result = self_session_write(priv, "LOGIN %s %s", quoted_username, quoted_password);
- g_free(quoted_username);
- g_free(quoted_password);
-
- return result;
- }
- }}
-#line 1097 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 574 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_login_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1104 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_login_cb"
-{
-#line 578 "src/mn-imap-mailbox.gob"
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- priv->authenticated = TRUE;
- return self_session_handle_capability_code(priv, response)
- ? STATE_EXAMINE
- : STATE_CAPABILITY;
- }
- else if (IS_NO(response) || IS_BAD(response))
- return self_session_authenticate_fallback(priv, TRUE);
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
- }}
-#line 1131 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 602 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_examine_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1138 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_examine_cb"
-{
-#line 605 "src/mn-imap-mailbox.gob"
-
- char *utf7_mailbox;
- char *quoted_mailbox;
- int result;
-
- utf7_mailbox = self_utf8_to_imap_utf7(priv->self->mailbox);
- quoted_mailbox = self_quote(utf7_mailbox);
- g_free(utf7_mailbox);
-
- result = self_session_write(priv, "EXAMINE %s", quoted_mailbox);
- g_free(quoted_mailbox);
-
- return result;
- }}
-#line 1156 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 620 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_examine_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1163 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_examine_cb"
-{
-#line 624 "src/mn-imap-mailbox.gob"
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- return STATE_SEARCH_UNSEEN;
- else if (IS_NO(response) || IS_BAD(response))
- {
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_LOGOUT;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (IS(response, "OK"))
- {
- if (response->code)
- {
- char **fields;
-
- fields = g_strsplit(response->code, " ", 0);
- if (g_strv_length(fields) == 2
- && ! g_ascii_strcasecmp(fields[0], "UIDVALIDITY"))
- {
- g_free(priv->uidvalidity);
- priv->uidvalidity = g_strdup(fields[1]);
- }
- g_strfreev(fields);
- }
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
- }}
-#line 1204 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 662 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_search_unseen_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1211 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_search_unseen_cb"
-{
-#line 665 "src/mn-imap-mailbox.gob"
-
- priv->num_errors = 0;
-
- if (priv->messages)
- g_hash_table_remove_all(priv->messages);
- else
- priv->messages = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) self_message_info_free);
-
- return self_session_write(priv, "SEARCH UNSEEN");
- }}
-#line 1225 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 676 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_search_unseen_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1232 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_search_unseen_cb"
-{
-#line 680 "src/mn-imap-mailbox.gob"
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- /*
- * Some uncompliant IMAP server implementations do not
- * send an untagged SEARCH response when there are no
- * search results (#18876). We are tolerant.
- */
- if (g_hash_table_size(priv->messages) != 0)
- return STATE_SEARCH_RECENT;
- else
- return self_session_got_messages(priv);
- }
- else if (IS_NO(response) || IS_BAD(response))
- {
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_LOGOUT;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (IS(response, "SEARCH"))
- {
- if (response->arguments)
- {
- char **strings;
- int i;
-
- strings = g_strsplit(response->arguments, " ", 0);
-
- for (i = 0; strings[i]; i++)
- if (mn_str_isnumeric(strings[i]))
- {
- int n = atoi(strings[i]);
- self_session_ensure_message_info(priv, n);
- }
-
- g_strfreev(strings);
- }
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
- }}
-#line 1288 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 733 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_search_recent_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1295 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_search_recent_cb"
-{
-#line 736 "src/mn-imap-mailbox.gob"
-
- return self_session_write(priv, "SEARCH RECENT");
- }}
-#line 1302 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 740 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_search_recent_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1309 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_search_recent_cb"
-{
-#line 744 "src/mn-imap-mailbox.gob"
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- if (priv->uidvalidity)
- return STATE_FETCH_UID;
- else
- return STATE_FETCH;
- }
- else if (IS_NO(response) || IS_BAD(response))
- {
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_LOGOUT;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (IS(response, "SEARCH"))
- {
- if (response->arguments)
- {
- char **strings;
- int i;
-
- strings = g_strsplit(response->arguments, " ", 0);
-
- for (i = 0; strings[i]; i++)
- if (mn_str_isnumeric(strings[i]))
- {
- int n = atoi(strings[i]);
- MessageInfo *info;
-
- info = self_session_get_message_info(priv, n);
- if (info)
- info->flags |= MN_MESSAGE_NEW;
- /*
- * Otherwise the message is recent but not unseen,
- * and we must ignore it (fixes #230425).
- */
- }
-
- g_strfreev(strings);
- }
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
- }}
-#line 1368 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 800 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_fetch_uid_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1375 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_fetch_uid_cb"
-{
-#line 802 "src/mn-imap-mailbox.gob"
-
- GString *set;
- int result;
-
- g_assert(priv->messages != NULL);
- g_assert(g_hash_table_size(priv->messages) > 0);
-
- set = g_string_new(NULL);
-
- g_hash_table_foreach(priv->messages, self_build_fetch_uid_set_cb, set);
-
- result = self_session_write(priv, "FETCH %s UID", set->str);
-
- g_string_free(set, TRUE);
-
- return result;
- }}
-#line 1396 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 820 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_build_fetch_uid_set_cb (gpointer key, gpointer value, gpointer user_data)
-{
-#line 1403 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::build_fetch_uid_set_cb"
-{
-#line 822 "src/mn-imap-mailbox.gob"
-
- MessageInfo *info = value;
- GString *set = user_data;
-
- if (*set->str)
- g_string_append_c(set, ',');
-
- g_string_append_printf(set, "%i", info->number);
- }}
-#line 1416 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 832 "src/mn-imap-mailbox.gob"
-static char *
-mn_imap_mailbox_parse_fetch_uid_response (const char * response)
-{
-#line 1423 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::parse_fetch_uid_response"
-#line 832 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (response != NULL, (char * )0);
-#line 1427 "mn-imap-mailbox.c"
-{
-#line 834 "src/mn-imap-mailbox.gob"
-
- char *start;
- char *end;
-
- start = mn_ascii_strcasestr_span(response, "UID ");
- if (! start)
- return NULL;
-
- /*
- * The UID should be the only list element, but we are tolerant
- * and allow a space in case other elements are present, eg:
- *
- * * 1 FETCH (UID 17 OTHER_ELEMENT)
- */
- end = strpbrk(start, " )");
- if (! end || end == start)
- return NULL;
-
- return g_strndup(start, end - start);
- }}
-#line 1450 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 855 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_fetch_uid_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1457 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_fetch_uid_cb"
-{
-#line 859 "src/mn-imap-mailbox.gob"
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- /* a failure (NO or BAD) is not fatal */
- if (IS_OK(response) || IS_NO(response) || IS_BAD(response))
- return STATE_FETCH;
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (mn_str_isnumeric(response->response)
- && response->arguments
- && mn_ascii_str_case_has_prefix(response->arguments, "FETCH "))
- {
- char *uid;
-
- uid = self_parse_fetch_uid_response(response->arguments);
- if (uid)
- {
- int n;
- MessageInfo *info;
-
- n = atoi(response->response);
-
- info = self_session_get_message_info(priv, n);
- if (info && ! info->mid)
- {
- MNMessage *message;
-
- g_assert(info->message == NULL);
-
- /*
- * RFC 3501 specifies that UID is a 32-bit number,
- * but we do not need it to be one. Use a string
- * for interoperability purposes (in case some
- * server vendors did not read the RFC properly).
- */
- info->mid = g_strdup_printf("%s:%s", priv->uidvalidity, uid);
-
- message = mn_mailbox_get_message_from_mid(priv->mailbox, info->mid);
- if (message)
- /*
- * We create a new instance rather than reusing
- * the existing one since the flags might be
- * different and a MNMessage is immutable (so we
- * cannot change the flags of the existing
- * message).
- */
- info->message = mn_g_object_clone(message,
- MN_MESSAGE_PROP_FLAGS(info->flags),
- NULL);
- }
-
- g_free(uid);
- }
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
- }}
-#line 1526 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 925 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_fetch_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1533 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_fetch_cb"
-{
-#line 927 "src/mn-imap-mailbox.gob"
-
- GString *set;
- int result;
-
- g_assert(priv->messages != NULL);
- g_assert(g_hash_table_size(priv->messages) > 0);
-
- set = g_string_new(NULL);
-
- g_hash_table_foreach(priv->messages, self_build_fetch_set_cb, set);
-
- if (*set->str)
- result = self_session_write(priv, "FETCH %s BODY.PEEK[HEADER]", set->str);
- else
- /* all the unseen messages were cached, no message to fetch */
- result = self_session_got_messages(priv);
-
- g_string_free(set, TRUE);
-
- return result;
- }}
-#line 1558 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 949 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_build_fetch_set_cb (gpointer key, gpointer value, gpointer user_data)
-{
-#line 1565 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::build_fetch_set_cb"
-{
-#line 951 "src/mn-imap-mailbox.gob"
-
- MessageInfo *info = value;
- GString *set = user_data;
-
- if (! info->message)
- {
- if (*set->str)
- g_string_append_c(set, ',');
-
- g_string_append_printf(set, "%i", info->number);
- }
- }}
-#line 1581 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 964 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1588 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_fetch_cb"
-{
-#line 968 "src/mn-imap-mailbox.gob"
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- /*
- * Note that in previous versions we required the
- * fetch results to include all the unseen messages,
- * but it caused problems in some cases (#20132).
- */
-
- return self_session_got_messages(priv);
- }
- else if (IS_NO(response) || IS_BAD(response))
- {
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_LOGOUT;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (mn_str_isnumeric(response->response)
- && response->arguments
- && mn_ascii_str_case_has_prefix(response->arguments, "FETCH ")
- && (mn_ascii_strcasestr(response->arguments, "BODY[HEADER]")
- || mn_ascii_strcasestr(response->arguments, "BODY[HEADER "))) /* [1] */
- /*
- * [1] Non-compliant response (see RFC 3501 BNF), sent by Binc
- * IMAP and maybe others. We are tolerant.
- */
- {
- int n;
- MessageInfo *info;
-
- n = atoi(response->response);
-
- info = self_session_get_message_info(priv, n);
- if (info && ! info->message)
- {
- char *p;
- int len;
-
- /* we assume the header string will be in literal form */
-
- p = strrchr(response->arguments, '{');
- if (p && sscanf(p, "{%d}", &len) == 1 && len >= 0)
- {
- gconstpointer buf;
- GError *err = NULL;
-
- buf = mn_client_session_read(session, len);
- if (! buf)
- return MN_CLIENT_SESSION_RESULT_DISCONNECT;
-
- info->message = mn_message_new_from_buffer(priv->mailbox,
- buf,
- len,
- info->mid,
- info->flags,
- FALSE,
- &err);
-
- if (err)
- {
- mn_client_session_warning(session, "cannot read message %i: %s", n, err->message);
- g_error_free(err);
-
- priv->num_errors++;
- }
-
- /* read end of line (after literal) */
- if (! mn_client_session_read_line(session))
- return MN_CLIENT_SESSION_RESULT_DISCONNECT;
- }
- else
- {
- mn_client_session_warning(session, "cannot retrieve message %i", n);
- priv->num_errors++;
- }
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
- }}
-#line 1683 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1060 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_idle_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1690 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_idle_cb"
-{
-#line 1063 "src/mn-imap-mailbox.gob"
-
- if (mn_mailbox_get_active(priv->mailbox))
- {
- if (priv->self->use_idle_extension == MN_IMAP_MAILBOX_USE_IDLE_NEVER)
- mn_client_session_notice(session, _("\"Use the IDLE extension\" set to \"never\" in the mailbox properties, logging out"));
- else
- {
- if (self_session_has_capability(priv, "IDLE"))
- {
- switch (priv->self->use_idle_extension)
- {
- case MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT:
- if (priv->server_software_supports_idle)
- goto idle;
- else
- mn_client_session_notice(session, _("the remote server runs %s, not using the IDLE extension"), priv->server_software);
- break;
-
- case MN_IMAP_MAILBOX_USE_IDLE_ALWAYS:
- if (! priv->server_software_supports_idle)
- mn_client_session_warning(session, _("the remote server runs %s, the IDLE extension might not function properly"), priv->server_software);
- goto idle;
- break;
-
- default:
- g_assert_not_reached();
- }
- }
- else
- mn_client_session_notice(session, _("the remote server does not support the IDLE extension, logging out"));
- }
- }
-
- return STATE_LOGOUT;
-
- idle:
- priv->idle_state = IDLE_STATE_PRE_IDLE;
- return self_session_write(priv, "IDLE");
- }}
-#line 1733 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1103 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_idle_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1740 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_idle_cb"
-{
-#line 1107 "src/mn-imap-mailbox.gob"
-
- switch (priv->idle_state)
- {
- case IDLE_STATE_PRE_IDLE:
- if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_NO(response) || IS_BAD(response))
- /*
- * The server advertised IDLE but does not actually
- * support it.
- *
- * Although strictly speaking this can be considered a
- * compliance fault, we'll be tolerant and just logout
- * without setting an error.
- */
- return STATE_LOGOUT;
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (response->continuation)
- {
- /* we're now in the idle loop */
- priv->idle_state = IDLE_STATE_IDLE;
- priv->idle_inactivity = FALSE;
- priv->could_idle = TRUE;
-
- GDK_THREADS_ENTER();
- mn_mailbox_set_poll(priv->mailbox, FALSE);
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
- break;
-
- case IDLE_STATE_IDLE:
- if (response->continuation || response->tag)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
-
- if (IS_BYE(response))
- {
- priv->idle_state = IDLE_STATE_POST_IDLE;
- return MN_CLIENT_SESSION_RESULT_DISCONNECT; /* we'll reconnect */
- }
- else if (response->arguments
- && mn_str_isnumeric(response->response)
- && (! g_ascii_strcasecmp(response->arguments, "EXISTS")
- || ! g_ascii_strcasecmp(response->arguments, "RECENT")
- || ! g_ascii_strcasecmp(response->arguments, "EXPUNGE")
- || mn_ascii_str_case_has_prefix(response->arguments, "FETCH ")))
- {
- priv->idle_state = IDLE_STATE_POST_IDLE;
- return mn_client_session_write(session, "DONE"); /* wake up */
- }
- break;
-
- case IDLE_STATE_POST_IDLE:
- if (response->tag)
- {
- if (HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- {
- if (! mn_mailbox_get_active(priv->mailbox))
- return STATE_LOGOUT;
- else if (priv->idle_inactivity)
- return STATE_IDLE; /* anti-inactivity, re-enter */
- else
- return STATE_SEARCH_UNSEEN;
- }
- else if (IS_NO(response) || IS_BAD(response))
- {
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_LOGOUT;
- }
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }
- else if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- break;
-
- default:
- g_assert_not_reached();
- break;
- }
-
- return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
- }}
-#line 1837 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1201 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_enter_logout_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1844 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_logout_cb"
-{
-#line 1204 "src/mn-imap-mailbox.gob"
-
- return self_session_write(priv, "LOGOUT");
- }}
-#line 1851 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1208 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_handle_logout_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1858 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_logout_cb"
-{
-#line 1212 "src/mn-imap-mailbox.gob"
-
- if (response->continuation)
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- else if (response->tag && HAS_CURRENT_TAG(response, priv))
- {
- if (IS_OK(response))
- return MN_CLIENT_SESSION_RESULT_DISCONNECT;
- else if (IS_BAD(response))
- return mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- else
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- else
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }}
-#line 1877 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1228 "src/mn-imap-mailbox.gob"
-static void
-___21_mn_imap_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
-#line 1883 "mn-imap-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:IMAP:Mailbox::authenticated_check"
-{
-#line 1230 "src/mn-imap-mailbox.gob"
-
- Self *self = SELF(mailbox);
- static const MNClientSessionState states[] = {
- { STATE_GREETING, NULL, self_handle_greeting_cb },
- { STATE_CAPABILITY, self_enter_capability_cb, self_handle_capability_cb },
-#if WITH_SSL
- { STATE_STARTTLS, self_enter_starttls_cb, self_handle_starttls_cb },
-#endif
-#if WITH_SASL
- { STATE_AUTHENTICATE, self_enter_authenticate_cb, self_handle_authenticate_cb },
-#endif
- { STATE_LOGIN, self_enter_login_cb, self_handle_login_cb },
- { STATE_EXAMINE, self_enter_examine_cb, self_handle_examine_cb },
- { STATE_SEARCH_UNSEEN, self_enter_search_unseen_cb, self_handle_search_unseen_cb },
- { STATE_SEARCH_RECENT, self_enter_search_recent_cb, self_handle_search_recent_cb },
- { STATE_FETCH_UID, self_enter_fetch_uid_cb, self_handle_fetch_uid_cb },
- { STATE_FETCH, self_enter_fetch_cb, self_handle_fetch_cb },
- { STATE_IDLE, self_enter_idle_cb, self_handle_idle_cb },
- { STATE_LOGOUT, self_enter_logout_cb, self_handle_logout_cb },
-
- MN_CLIENT_SESSION_STATES_END
- };
- static const MNClientSessionCallbacks callbacks = {
- mn_pi_mailbox_notice_cb,
- mn_pi_mailbox_warning_cb,
- self_response_new_cb,
- self_response_free_cb,
- self_pre_read_cb,
- self_post_read_cb,
-#if WITH_SASL
- mn_pi_mailbox_sasl_get_credentials_cb,
-#endif
-#if WITH_SSL
- mn_pi_mailbox_ssl_trust_server_cb,
-#endif
- };
- MNClientSessionPrivate priv;
- gboolean status;
- GError *err = NULL;
-
- PARENT_HANDLER(mailbox);
-
- /* check if the parent handler has disabled the mailbox */
- if (! mn_mailbox_get_poll(MN_MAILBOX(self)))
- return;
-
- again:
- g_clear_error(&err);
-
- memset(&priv, 0, sizeof(priv));
- mn_pi_mailbox_session_private_init(MN_PI_MAILBOX(self), &priv);
- priv.self = self;
- priv.server_software_supports_idle = TRUE; /* assume it does */
-
- status = mn_client_session_run(states,
- &callbacks,
-#if WITH_SSL
- priv.pi_mailbox->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL,
-#endif
- priv.pi_mailbox->hostname,
- priv.pi_mailbox->runtime_port,
- &priv,
- &err);
-
- g_strfreev(priv.capabilities);
- mn_g_slist_free_deep(priv.auth_mechanisms);
-
- g_free(priv.uidvalidity);
-
- if (priv.messages)
- g_hash_table_destroy(priv.messages);
-
-#if WITH_SASL
- g_slist_free(priv.sasl_remaining_mechanisms);
-#endif
-
- if (priv.could_idle && mn_mailbox_get_active(priv.mailbox))
- {
- if (status)
- goto again;
- /* some servers abruptly disconnect for inactivity */
- else if (g_error_matches(err, MN_CLIENT_SESSION_ERROR, MN_CLIENT_SESSION_ERROR_CONNECTION_LOST))
- {
- /* g_log() escapes unsafe and non UTF-8 characters, so this is safe */
- mn_mailbox_notice(priv.mailbox, "%s", err->message);
- goto again;
- }
- }
-
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_poll(MN_MAILBOX(self), TRUE);
- if (! status)
- {
- char *escaped;
-
- escaped = mn_utf8_escape(err->message);
- g_error_free(err);
-
- mn_mailbox_set_error(MN_MAILBOX(self), "%s", escaped);
- g_free(escaped);
- }
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }}
-#line 1997 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 1337 "src/mn-imap-mailbox.gob"
-static MNClientSessionResponse *
-mn_imap_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv)
-{
-#line 2005 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::response_new_cb"
-{
-#line 1341 "src/mn-imap-mailbox.gob"
-
- MNClientSessionResponse *response = NULL;
-
- /*
- * About character set handling:
- *
- * RFC 3501 section 1.2 specifies that "characters are 7-bit
- * US-ASCII unless otherwise specified", and the ABNF formal
- * syntax found in section 9 confirms it. However, we follow the
- * RFC 793 robustness principle ("be liberal in what you accept")
- * and do not require responses to be valid 7-bit US-ASCII.
- *
- * Safety:
- * - we ensure that GTK+ will only receive UTF-8 data by
- * escaping error messages in authenticated_check()
- * - responses ending up in mn_mailbox_notice() need not be
- * valid UTF-8, since g_log() escapes unsafe and non UTF-8
- * characters
- * - messages do not go through this function; they are handled
- * in handle_fetch_cb() and passed to our mn-message-mime
- * implementation, which handles character set conversions
- */
-
- if (! strcmp(input, "+"))
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->continuation = g_strdup("");
- }
- else if (g_str_has_prefix(input, "+ "))
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->continuation = g_strdup(input + 2);
- }
- else
- {
- char **tokens;
-
- tokens = g_strsplit(input, " ", 3);
- if (tokens[0] && tokens[1])
- {
- if (tokens[2] && tokens[2][0] == '[')
- {
- char *code_start;
- char *code_end;
-
- code_start = tokens[2] + 1;
- code_end = strchr(code_start, ']');
- if (code_end)
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->code = g_strndup(code_start, code_end - code_start);
- response->arguments = code_end[1] ? g_strdup(code_end + 2) : NULL;
- }
- }
- else
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->arguments = g_strdup(tokens[2]);
- }
-
- if (response)
- {
- response->tag = ! strcmp(tokens[0], "*") ? NULL : g_strdup(tokens[0]);
- response->response = g_strdup(tokens[1]);
- }
- }
- g_strfreev(tokens);
- }
-
- return response;
- }}
-#line 2080 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1413 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 2087 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::response_free_cb"
-{
-#line 1417 "src/mn-imap-mailbox.gob"
-
- g_free(response->continuation);
- g_free(response->tag);
- g_free(response->response);
- g_free(response->code);
- g_free(response->arguments);
- g_free(response);
- }}
-#line 2099 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1426 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_default_handler (MNClientSessionResponse * response, MNClientSessionPrivate * priv, int error_code_when_bye)
-{
-#line 2106 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::default_handler"
-#line 1426 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (response != NULL, (int )0);
-#line 1426 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 2112 "mn-imap-mailbox.c"
-{
-#line 1430 "src/mn-imap-mailbox.gob"
-
- if (! response->tag && IS_BYE(response))
- return mn_client_session_set_error_from_response(priv->session, error_code_when_bye, response->arguments);
- else
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }}
-#line 2121 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1437 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_pre_read_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 2128 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::pre_read_cb"
-{
-#line 1440 "src/mn-imap-mailbox.gob"
-
- if (priv->idle_state == IDLE_STATE_IDLE)
- {
- Self *self = priv->self;
-
- self_lock(self);
-
- selfp->idle_session = priv;
-
- /* cycle IDLE in 29 minutes, as advised by RFC 2177 */
-
- g_assert(priv->idle_inactivity_timeout_id == 0);
- priv->idle_inactivity_timeout_id = g_timeout_add(60 * 29 * 1000, self_idle_inactivity_timeout_cb, self);
-
- self_unlock(self);
- }
- }}
-#line 2149 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1458 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_post_read_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 2156 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::post_read_cb"
-{
-#line 1461 "src/mn-imap-mailbox.gob"
-
- Self *self = priv->self;
-
- self_lock(self);
-
- if (priv->idle_state >= IDLE_STATE_IDLE)
- {
- selfp->idle_session = NULL;
- mn_source_clear(&priv->idle_inactivity_timeout_id);
- }
-
- self_unlock(self);
- }}
-#line 2173 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1475 "src/mn-imap-mailbox.gob"
-static gboolean
-mn_imap_mailbox_idle_inactivity_timeout_cb (gpointer data)
-{
-#line 2180 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::idle_inactivity_timeout_cb"
-{
-#line 1477 "src/mn-imap-mailbox.gob"
-
- Self *self = data;
-
- self_lock(self);
-
- if (selfp->idle_session)
- {
- mn_client_session_write(selfp->idle_session->session, "DONE");
- selfp->idle_session->idle_state = IDLE_STATE_POST_IDLE;
- selfp->idle_session->idle_inactivity = TRUE;
- selfp->idle_session->idle_inactivity_timeout_id = 0;
- }
-
- self_unlock(self);
-
- return FALSE;
- }}
-#line 2201 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1495 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_session_write (MNClientSessionPrivate * priv, const char * format, ...)
-{
-#line 2208 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_write"
-#line 1495 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1495 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (format != NULL, (int )0);
-#line 2214 "mn-imap-mailbox.c"
-{
-#line 1500 "src/mn-imap-mailbox.gob"
-
- char *command;
- int result;
-
- MN_STRDUP_VPRINTF(command, format);
-
- if (priv->numeric_tag == 1000)
- priv->numeric_tag = 0;
- sprintf(priv->tag, "a%03i", priv->numeric_tag++);
-
- result = mn_client_session_write(priv->session, "%s %s", priv->tag, command);
- g_free(command);
-
- return result;
- }}
-#line 2232 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1516 "src/mn-imap-mailbox.gob"
-static gboolean
-mn_imap_mailbox_session_handle_capability_code (MNClientSessionPrivate * priv, MNClientSessionResponse * response)
-{
-#line 2239 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_handle_capability_code"
-#line 1516 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (gboolean )0);
-#line 1516 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (response != NULL, (gboolean )0);
-#line 2245 "mn-imap-mailbox.c"
-{
-#line 1519 "src/mn-imap-mailbox.gob"
-
- if (response->code)
- {
- if (! g_ascii_strcasecmp(response->code, "CAPABILITY"))
- {
- self_session_parse_capabilities(priv, NULL);
- return TRUE;
- }
- else if (mn_ascii_str_case_has_prefix(response->code, "CAPABILITY "))
- {
- self_session_parse_capabilities(priv, response->code + 11);
- return TRUE;
- }
- }
-
- return FALSE;
- }}
-#line 2265 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1537 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_session_parse_capabilities (MNClientSessionPrivate * priv, const char * capabilities)
-{
-#line 2272 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_parse_capabilities"
-#line 1537 "src/mn-imap-mailbox.gob"
- g_return_if_fail (priv != NULL);
-#line 2276 "mn-imap-mailbox.c"
-{
-#line 1540 "src/mn-imap-mailbox.gob"
-
- g_strfreev(priv->capabilities);
- priv->capabilities = NULL;
-
- mn_g_slist_clear_deep(&priv->auth_mechanisms);
-
-#if WITH_SASL
- mn_g_slist_clear(&priv->sasl_remaining_mechanisms);
-#endif
-
- if (capabilities)
- {
- int i;
-
- priv->capabilities = g_strsplit(capabilities, " ", 0);
-
- for (i = 0; priv->capabilities[i]; i++)
- if (g_str_has_prefix(priv->capabilities[i], "AUTH="))
- priv->auth_mechanisms = g_slist_append(priv->auth_mechanisms, g_strdup(priv->capabilities[i] + 5));
- }
- else
- priv->capabilities = g_new0(char *, 1);
- }}
-#line 2302 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1564 "src/mn-imap-mailbox.gob"
-static gboolean
-mn_imap_mailbox_session_has_capability (MNClientSessionPrivate * priv, const char * capability)
-{
-#line 2309 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_has_capability"
-#line 1564 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (gboolean )0);
-#line 1564 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (capability != NULL, (gboolean )0);
-#line 2315 "mn-imap-mailbox.c"
-{
-#line 1567 "src/mn-imap-mailbox.gob"
-
- int i;
-
- g_return_val_if_fail(priv->capabilities != NULL, FALSE);
-
- for (i = 0; priv->capabilities[i]; i++)
- if (! g_ascii_strcasecmp(priv->capabilities[i], capability))
- return TRUE;
-
- return FALSE;
- }}
-#line 2329 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1579 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_session_after_capability (MNClientSessionPrivate * priv)
-{
-#line 2336 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_after_capability"
-#line 1579 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 2340 "mn-imap-mailbox.c"
-{
-#line 1581 "src/mn-imap-mailbox.gob"
-
- if (priv->authenticated)
- return STATE_EXAMINE;
- else
- {
-#if WITH_SSL
- if (priv->pi_mailbox->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL
- && ! priv->starttls_completed)
- {
- if (self_session_has_capability(priv, "STARTTLS"))
- return STATE_STARTTLS;
- else
- {
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("server does not support in-band SSL/TLS"));
- return STATE_LOGOUT;
- }
- }
-#endif /* WITH_SSL */
- return self_session_authenticate(priv);
- }
- }}
-#line 2364 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1603 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv)
-{
-#line 2371 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_authenticate"
-#line 1603 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 2375 "mn-imap-mailbox.c"
-{
-#line 1605 "src/mn-imap-mailbox.gob"
-
-#if WITH_SASL
- g_slist_free(priv->sasl_remaining_mechanisms);
- priv->sasl_remaining_mechanisms = g_slist_copy(priv->auth_mechanisms);
-#endif /* WITH_SASL */
-
- if (priv->pi_mailbox->authmech)
- {
- if (*priv->pi_mailbox->authmech != '+')
- {
-#if WITH_SASL
- return STATE_AUTHENTICATE;
-#else
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
- return STATE_LOGOUT;
-#endif /* WITH_SASL */
- }
- else
- {
- if (! strcmp(priv->pi_mailbox->authmech, "+LOGIN"))
- return STATE_LOGIN;
- else
- {
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("unknown authentication mechanism \"%s\""), priv->pi_mailbox->authmech);
- return STATE_LOGOUT;
- }
- }
- }
- else
- {
-#if WITH_SASL
- if (priv->sasl_remaining_mechanisms)
- return STATE_AUTHENTICATE;
-#endif /* WITH_SASL */
- return STATE_LOGIN;
- }
- }}
-#line 2415 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1643 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_login)
-{
-#line 2422 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_authenticate_fallback"
-#line 1643 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 2426 "mn-imap-mailbox.c"
-{
-#line 1646 "src/mn-imap-mailbox.gob"
-
- if (! priv->pi_mailbox->authmech)
- {
-#if WITH_SASL
- if (priv->sasl_mechanism)
- {
- GSList *elem;
-
- elem = mn_g_str_slist_find(priv->sasl_remaining_mechanisms, priv->sasl_mechanism);
- if (elem)
- {
- priv->sasl_remaining_mechanisms = g_slist_delete_link(priv->sasl_remaining_mechanisms, elem);
- if (priv->sasl_remaining_mechanisms)
- {
- mn_client_session_notice(priv->session, _("disabling mechanism \"%s\" and retrying SASL authentication"), priv->sasl_mechanism);
- return STATE_AUTHENTICATE;
- }
- }
- }
-
- /* SASL is not needed anymore, save some memory */
- mn_client_session_sasl_dispose(priv->session);
-#endif /* WITH_SASL */
-
- if (! tried_login)
- {
- mn_client_session_notice(priv->session, _("falling back to IMAP LOGIN authentication"));
- return STATE_LOGIN;
- }
- }
-
- if (priv->auth_mailbox->auth_prompted)
- {
- mn_authenticated_mailbox_auth_failed(priv->auth_mailbox);
- return self_session_authenticate(priv);
- }
- else
- {
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("authentication failed"));
- return STATE_LOGOUT;
- }
- }}
-#line 2471 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1689 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_session_detect_imapd (MNClientSession * session, MNClientSessionResponse * greeting_response, MNClientSessionPrivate * priv)
-{
-#line 2478 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_detect_imapd"
-#line 1689 "src/mn-imap-mailbox.gob"
- g_return_if_fail (session != NULL);
-#line 1689 "src/mn-imap-mailbox.gob"
- g_return_if_fail (greeting_response != NULL);
-#line 1689 "src/mn-imap-mailbox.gob"
- g_return_if_fail (priv != NULL);
-#line 2486 "mn-imap-mailbox.c"
-{
-#line 1693 "src/mn-imap-mailbox.gob"
-
- if (greeting_response->arguments)
- {
- char *str;
-
- /*
- * Try to detect UW imapd by looking for " IMAP4rev1 YEAR."
- */
-
- if ((str = mn_strstr_span(greeting_response->arguments, " IMAP4rev1 "))
- && strspn(str, "0123456789") == 4
- && str[4] == '.')
- {
- priv->server_software = "UW imapd";
- priv->server_software_supports_idle = FALSE;
- return;
- }
- }
- }}
-#line 2508 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1713 "src/mn-imap-mailbox.gob"
-static int
-mn_imap_mailbox_session_got_messages (MNClientSessionPrivate * priv)
-{
-#line 2515 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_got_messages"
-#line 1713 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 2519 "mn-imap-mailbox.c"
-{
-#line 1715 "src/mn-imap-mailbox.gob"
-
- GSList *messages = NULL;
-
- g_hash_table_foreach(priv->messages, self_get_messages_list_cb, &messages);
-
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_messages(priv->mailbox, messages);
-
- if (priv->num_errors == 0)
- mn_mailbox_set_error(priv->mailbox, NULL);
- else
- mn_mailbox_set_error(priv->mailbox,
- ngettext("cannot retrieve %i message",
- "cannot retrieve %i messages",
- priv->num_errors),
- priv->num_errors);
-
- /*
- * In authenticated_check(), we do not hold the GDK lock while
- * destroying the messages hash table. We have just exposed the
- * messages to other threads through our mn_mailbox_set_messages()
- * call, so destroy the hash table here, while we hold the GDK
- * lock.
- */
- g_hash_table_destroy(priv->messages);
- priv->messages = NULL;
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- g_slist_free(messages);
-
- return STATE_IDLE;
- }}
-#line 2557 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1751 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_get_messages_list_cb (gpointer key, gpointer value, gpointer user_data)
-{
-#line 2564 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::get_messages_list_cb"
-{
-#line 1753 "src/mn-imap-mailbox.gob"
-
- MessageInfo *info = value;
- GSList **list = user_data;
-
- if (info->message)
- *list = g_slist_prepend(*list, info->message);
- }}
-#line 2575 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1761 "src/mn-imap-mailbox.gob"
-static MessageInfo *
-mn_imap_mailbox_session_get_message_info (MNClientSessionPrivate * priv, int number)
-{
-#line 2582 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_get_message_info"
-#line 1761 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (MessageInfo * )0);
-#line 2586 "mn-imap-mailbox.c"
-{
-#line 1764 "src/mn-imap-mailbox.gob"
-
- return g_hash_table_lookup(priv->messages, GINT_TO_POINTER(number));
- }}
-#line 2592 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1768 "src/mn-imap-mailbox.gob"
-static MessageInfo *
-mn_imap_mailbox_session_ensure_message_info (MNClientSessionPrivate * priv, int number)
-{
-#line 2599 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_ensure_message_info"
-#line 1768 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (MessageInfo * )0);
-#line 2603 "mn-imap-mailbox.c"
-{
-#line 1771 "src/mn-imap-mailbox.gob"
-
- MessageInfo *info;
-
- info = self_session_get_message_info(priv, number);
- if (! info)
- {
- info = self_message_info_new(number);
- g_hash_table_insert(priv->messages, GINT_TO_POINTER(number), info);
- }
-
- return info;
- }}
-#line 2618 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1784 "src/mn-imap-mailbox.gob"
-static MessageInfo *
-mn_imap_mailbox_message_info_new (int number)
-{
-#line 2625 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::message_info_new"
-{
-#line 1786 "src/mn-imap-mailbox.gob"
-
- MessageInfo *info;
-
- info = g_new0(MessageInfo, 1);
- info->number = number;
-
- return info;
- }}
-#line 2637 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1795 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_message_info_free (MessageInfo * info)
-{
-#line 2644 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::message_info_free"
-#line 1795 "src/mn-imap-mailbox.gob"
- g_return_if_fail (info != NULL);
-#line 2648 "mn-imap-mailbox.c"
-{
-#line 1797 "src/mn-imap-mailbox.gob"
-
- if (info->message)
- g_object_unref(info->message);
- g_free(info->mid);
- g_free(info);
- }}
-#line 2657 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-/**
- * mn_imap_mailbox_quote:
- * @str: the string to quote
- *
- * Quotes a string using RFC 3501 BNF rules.
- *
- * Return value: the quoted string.
- **/
-#line 1812 "src/mn-imap-mailbox.gob"
-static char *
-mn_imap_mailbox_quote (const char * str)
-{
-#line 2672 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::quote"
-#line 1812 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (str != NULL, (char * )0);
-#line 2676 "mn-imap-mailbox.c"
-{
-#line 1814 "src/mn-imap-mailbox.gob"
-
- GString *quoted;
- int i;
-
- quoted = g_string_new("\"");
- for (i = 0; str[i]; i++)
- if (str[i] == '"' || str[i] == '\\') /* quoted-specials in BNF */
- g_string_append_printf(quoted, "\\%c", str[i]);
- else
- g_string_append_c(quoted, str[i]);
- g_string_append_c(quoted, '"');
-
- return g_string_free(quoted, FALSE);
- }}
-#line 2693 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-/**
- * mn_imap_mailbox_utf8_to_imap_utf7:
- * @str: the UTF-8 string to convert to modified UTF-7
- *
- * Converts a string from UTF-8 to modified UTF-7 as defined by RFC 3501.
- *
- * Return value: the string converted to modified UTF-7.
- **/
-#line 1837 "src/mn-imap-mailbox.gob"
-static char *
-mn_imap_mailbox_utf8_to_imap_utf7 (const char * str)
-{
-#line 2708 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::utf8_to_imap_utf7"
-#line 1837 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (str != NULL, (char * )0);
-#line 2712 "mn-imap-mailbox.c"
-{
-#line 1839 "src/mn-imap-mailbox.gob"
-
- gunichar c;
- guint32 x, v = 0;
- int state = 0;
- GString *out;
- int i = 0;
-
- /*
- * Taken from the Ximian Evolution sources (camel-utf8.c) and
- * edited for style.
- */
-
- out = g_string_new(NULL);
-
- while ((c = g_utf8_get_char(str)))
- {
- if (c >= 0x20 && c <= 0x7e)
- {
- if (state == 1)
- {
- self_imap_utf7_closeb64(out, v, i);
- state = 0;
- i = 0;
- }
- if (c == '&')
- g_string_append(out, "&-");
- else
- g_string_append_c(out, c);
- }
- else
- {
- if (state == 0)
- {
- g_string_append_c(out, '&');
- state = 1;
- }
-
- v = (v << 16) | c;
- i += 16;
-
- while (i >= 6)
- {
- x = (v >> (i - 6)) & 0x3f;
- g_string_append_c(out, utf7_alphabet[x]);
- i -= 6;
- }
- }
-
- str = g_utf8_next_char(str);
- }
-
- if (state == 1)
- self_imap_utf7_closeb64(out, v, i);
-
- return g_string_free(out, FALSE);
- }}
-#line 2771 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1896 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_imap_utf7_closeb64 (GString * out, guint32 v, guint32 i)
-{
-#line 2778 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::imap_utf7_closeb64"
-#line 1896 "src/mn-imap-mailbox.gob"
- g_return_if_fail (out != NULL);
-#line 2782 "mn-imap-mailbox.c"
-{
-#line 1898 "src/mn-imap-mailbox.gob"
-
- /*
- * Taken from the Ximian Evolution sources (camel-utf8.c) and
- * edited for style.
- */
-
- if (i > 0)
- {
- guint32 x;
-
- x = (v << (6 - i)) & 0x3f;
- g_string_append_c(out, utf7_alphabet[x]);
- }
-
- g_string_append_c(out, '-');
- }}
-#line 2801 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1915 "src/mn-imap-mailbox.gob"
-char *
-mn_imap_mailbox_build_name (const char * username, const char * server, const char * mailbox)
-{
-#line 2808 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::build_name"
-#line 1915 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (username != NULL, (char * )0);
-#line 1915 "src/mn-imap-mailbox.gob"
- g_return_val_if_fail (server != NULL, (char * )0);
-#line 2814 "mn-imap-mailbox.c"
-{
-#line 1919 "src/mn-imap-mailbox.gob"
-
- GString *name;
-
- name = g_string_new(NULL);
-
- g_string_append_printf(name, "%s@%s", username, server);
-
- if (mailbox && mn_utf8_strcasecmp(mailbox, "INBOX"))
- g_string_append_printf(name, "/%s", mailbox);
-
- return g_string_free(name, FALSE);
- }}
-#line 2829 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1932 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_lock (MNIMAPMailbox * self)
-{
-#line 2836 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::lock"
-#line 1932 "src/mn-imap-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 1932 "src/mn-imap-mailbox.gob"
- g_return_if_fail (MN_IS_IMAP_MAILBOX (self));
-#line 2842 "mn-imap-mailbox.c"
-{
-#line 1934 "src/mn-imap-mailbox.gob"
-
- g_mutex_lock(selfp->mutex);
- }}
-#line 2848 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1938 "src/mn-imap-mailbox.gob"
-static void
-mn_imap_mailbox_unlock (MNIMAPMailbox * self)
-{
-#line 2855 "mn-imap-mailbox.c"
-#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::unlock"
-#line 1938 "src/mn-imap-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 1938 "src/mn-imap-mailbox.gob"
- g_return_if_fail (MN_IS_IMAP_MAILBOX (self));
-#line 2861 "mn-imap-mailbox.c"
-{
-#line 1940 "src/mn-imap-mailbox.gob"
-
- g_mutex_unlock(selfp->mutex);
- }}
-#line 2867 "mn-imap-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-imap-mailbox.gob.stamp b/build/src/mn-imap-mailbox.gob.stamp
diff --git a/build/src/mn-imap-mailbox.h b/build/src/mn-imap-mailbox.h
@@ -1,101 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-pi-mailbox.h"
-
-#ifndef __MN_IMAP_MAILBOX_H__
-#define __MN_IMAP_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-#define MN_IMAP_MAILBOX_N_USE_IDLE 3
-
-extern int mn_imap_mailbox_default_ports[MN_PI_MAILBOX_N_CONNECTION_TYPES];
-
-
-typedef enum {
- MN_IMAP_MAILBOX_USE_IDLE_NEVER,
- MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT,
- MN_IMAP_MAILBOX_USE_IDLE_ALWAYS
-} MNIMAPMailboxUseIDLE;
-#define MN_TYPE_IMAP_MAILBOX_USE_IDLE mn_imap_mailbox_use_idle_get_type()
-GType mn_imap_mailbox_use_idle_get_type (void) G_GNUC_CONST;
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_IMAP_MAILBOX (mn_imap_mailbox_get_type())
-#define MN_IMAP_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_imap_mailbox_get_type(), MNIMAPMailbox)
-#define MN_IMAP_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_imap_mailbox_get_type(), MNIMAPMailbox const)
-#define MN_IMAP_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_imap_mailbox_get_type(), MNIMAPMailboxClass)
-#define MN_IS_IMAP_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_imap_mailbox_get_type ())
-
-#define MN_IMAP_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_imap_mailbox_get_type(), MNIMAPMailboxClass)
-
-/* Private structure type */
-typedef struct _MNIMAPMailboxPrivate MNIMAPMailboxPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_IMAP_MAILBOX__
-#define __TYPEDEF_MN_IMAP_MAILBOX__
-typedef struct _MNIMAPMailbox MNIMAPMailbox;
-#endif
-struct _MNIMAPMailbox {
- MNPIMailbox __parent__;
- /*< public >*/
- char * mailbox;
- MNIMAPMailboxUseIDLE use_idle_extension;
- /*< private >*/
- MNIMAPMailboxPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNIMAPMailboxClass MNIMAPMailboxClass;
-struct _MNIMAPMailboxClass {
- MNPIMailboxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_imap_mailbox_get_type (void) G_GNUC_CONST;
-#line 1915 "src/mn-imap-mailbox.gob"
-char * mn_imap_mailbox_build_name (const char * username,
- const char * server,
- const char * mailbox);
-#line 80 "mn-imap-mailbox.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_IMAP_MAILBOX_PROP_MAILBOX(arg) "mailbox", __extension__ ({gchar *z = (arg); z;})
-#define MN_IMAP_MAILBOX_GET_PROP_MAILBOX(arg) "mailbox", __extension__ ({gchar **z = (arg); z;})
-#define MN_IMAP_MAILBOX_PROP_USE_IDLE_EXTENSION(arg) "use_idle_extension", __extension__ ({gint z = (arg); z;})
-#define MN_IMAP_MAILBOX_GET_PROP_USE_IDLE_EXTENSION(arg) "use_idle_extension", __extension__ ({gint *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_IMAP_MAILBOX_PROP_MAILBOX(arg) "mailbox",(gchar *)(arg)
-#define MN_IMAP_MAILBOX_GET_PROP_MAILBOX(arg) "mailbox",(gchar **)(arg)
-#define MN_IMAP_MAILBOX_PROP_USE_IDLE_EXTENSION(arg) "use_idle_extension",(gint )(arg)
-#define MN_IMAP_MAILBOX_GET_PROP_USE_IDLE_EXTENSION(arg) "use_idle_extension",(gint *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mail-icon-private.h b/build/src/mn-mail-icon-private.h
@@ -1,36 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAIL_ICON_PRIVATE_H__
-#define __MN_MAIL_ICON_PRIVATE_H__
-
-#include "mn-mail-icon.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 31 "src/mn-mail-icon.gob"
-
-#include "mn-tooltips.h"
-
-#line 18 "mn-mail-icon-private.h"
-struct _MNMailIconPrivate {
-#line 45 "src/mn-mail-icon.gob"
- MNTooltips * tooltips;
-#line 46 "src/mn-mail-icon.gob"
- GtkWidget * widget;
-#line 48 "src/mn-mail-icon.gob"
- char * stock_id;
-#line 49 "src/mn-mail-icon.gob"
- int size;
-#line 51 "src/mn-mail-icon.gob"
- GtkWidget * menu;
-#line 30 "mn-mail-icon-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mail-icon-widget-private.h b/build/src/mn-mail-icon-widget-private.h
@@ -1,34 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAIL_ICON_WIDGET_PRIVATE_H__
-#define __MN_MAIL_ICON_WIDGET_PRIVATE_H__
-
-#include "mn-mail-icon-widget.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNMailIconWidgetPrivate {
-#line 40 "src/mn-mail-icon-widget.gob"
- gboolean blinking;
-#line 67 "src/mn-mail-icon-widget.gob"
- PangoLayout * count_layout;
-#line 69 "src/mn-mail-icon-widget.gob"
- int count;
-#line 86 "src/mn-mail-icon-widget.gob"
- unsigned int blink_timeout_id;
-#line 87 "src/mn-mail-icon-widget.gob"
- gboolean is_on;
-#line 89 "src/mn-mail-icon-widget.gob"
- char * stock_id;
-#line 90 "src/mn-mail-icon-widget.gob"
- GtkIconSize icon_size;
-#line 28 "mn-mail-icon-widget-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mail-icon-widget.c b/build/src/mn-mail-icon-widget.c
@@ -1,714 +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-mail-icon-widget.h"
-
-#include "mn-mail-icon-widget-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-mail-icon-widget.gob"
-
-#include <math.h>
-#include "mn-util.h"
-
-#define ICON_XALIGN 0.5
-#define ICON_YALIGN 0.5
-
-#define COUNT_BOX_XPAD 3
-#define COUNT_BOX_YPAD 3
-
-#define COUNT_BOX_XMARGIN 0
-#define COUNT_BOX_YMARGIN 0
-
-#line 40 "mn-mail-icon-widget.c"
-/* self casting macros */
-#define SELF(x) MN_MAIL_ICON_WIDGET(x)
-#define SELF_CONST(x) MN_MAIL_ICON_WIDGET_CONST(x)
-#define IS_SELF(x) MN_IS_MAIL_ICON_WIDGET(x)
-#define TYPE_SELF MN_TYPE_MAIL_ICON_WIDGET
-#define SELF_CLASS(x) MN_MAIL_ICON_WIDGET_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAIL_ICON_WIDGET_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMailIconWidget Self;
-typedef MNMailIconWidgetClass 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-mail-icon-widget.gob"
-static void mn_mail_icon_widget_class_init (MNMailIconWidgetClass * c) G_GNUC_UNUSED;
-#line 59 "mn-mail-icon-widget.c"
-#line 92 "src/mn-mail-icon-widget.gob"
-static void mn_mail_icon_widget_init (MNMailIconWidget * self) G_GNUC_UNUSED;
-#line 62 "mn-mail-icon-widget.c"
-#line 105 "src/mn-mail-icon-widget.gob"
-static void mn_mail_icon_widget_dispose (MNMailIconWidget * self) G_GNUC_UNUSED;
-#line 65 "mn-mail-icon-widget.c"
-#line 110 "src/mn-mail-icon-widget.gob"
-static void ___7_mn_mail_icon_widget_size_request (GtkWidget * widget, GtkRequisition * requisition) G_GNUC_UNUSED;
-#line 68 "mn-mail-icon-widget.c"
-#line 132 "src/mn-mail-icon-widget.gob"
-static gboolean ___8_mn_mail_icon_widget_expose_event (GtkWidget * widget, GdkEventExpose * event) G_GNUC_UNUSED;
-#line 71 "mn-mail-icon-widget.c"
-#line 244 "src/mn-mail-icon-widget.gob"
-static GdkPixbuf * mn_mail_icon_widget_render_icon (MNMailIconWidget * self) G_GNUC_UNUSED;
-#line 74 "mn-mail-icon-widget.c"
-#line 256 "src/mn-mail-icon-widget.gob"
-static void mn_mail_icon_widget_context_changed (MNMailIconWidget * self) G_GNUC_UNUSED;
-#line 77 "mn-mail-icon-widget.c"
-#line 266 "src/mn-mail-icon-widget.gob"
-static void mn_mail_icon_widget_invalidate_count_layout (MNMailIconWidget * self) G_GNUC_UNUSED;
-#line 80 "mn-mail-icon-widget.c"
-#line 276 "src/mn-mail-icon-widget.gob"
-static gboolean mn_mail_icon_widget_blink_timeout_cb (gpointer data) G_GNUC_UNUSED;
-#line 83 "mn-mail-icon-widget.c"
-
-enum {
- PROP_0,
- PROP_BLINKING,
- PROP_COUNT
-};
-
-/* pointer to the class of our parent */
-static GtkWidgetClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_get_blinking mn_mail_icon_widget_get_blinking
-#define self_set_blinking mn_mail_icon_widget_set_blinking
-#define self_get_count mn_mail_icon_widget_get_count
-#define self_set_count mn_mail_icon_widget_set_count
-#define self_render_icon mn_mail_icon_widget_render_icon
-#define self_context_changed mn_mail_icon_widget_context_changed
-#define self_invalidate_count_layout mn_mail_icon_widget_invalidate_count_layout
-#define self_blink_timeout_cb mn_mail_icon_widget_blink_timeout_cb
-#define self_new mn_mail_icon_widget_new
-#define self_set_from_stock mn_mail_icon_widget_set_from_stock
-GType
-mn_mail_icon_widget_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMailIconWidgetClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mail_icon_widget_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMailIconWidget),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mail_icon_widget_init,
- NULL
- };
-
- type = g_type_register_static (GTK_TYPE_WIDGET, "MNMailIconWidget", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMailIconWidget *)g_object_new(mn_mail_icon_widget_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMailIconWidget * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMailIconWidget *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMailIconWidget *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMailIconWidget *)g_object_new_valist (mn_mail_icon_widget_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::dispose"
- MNMailIconWidget *self G_GNUC_UNUSED = MN_MAIL_ICON_WIDGET (obj_self);
-#line 105 "src/mn-mail-icon-widget.gob"
- mn_mail_icon_widget_dispose (self);
-#line 155 "mn-mail-icon-widget.c"
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 67 "src/mn-mail-icon-widget.gob"
- if(self->_priv->count_layout) { g_object_unref ((gpointer) self->_priv->count_layout); self->_priv->count_layout = NULL; }
-#line 160 "mn-mail-icon-widget.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::finalize"
- MNMailIconWidget *self G_GNUC_UNUSED = MN_MAIL_ICON_WIDGET (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 89 "src/mn-mail-icon-widget.gob"
- if(self->_priv->stock_id) { g_free ((gpointer) self->_priv->stock_id); self->_priv->stock_id = NULL; }
-#line 175 "mn-mail-icon-widget.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_mail_icon_widget_class_init (MNMailIconWidgetClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- GtkWidgetClass *gtk_widget_class = (GtkWidgetClass *)c;
-
- g_type_class_add_private(c,sizeof(MNMailIconWidgetPrivate));
-
- parent_class = g_type_class_ref (GTK_TYPE_WIDGET);
-
-#line 110 "src/mn-mail-icon-widget.gob"
- gtk_widget_class->size_request = ___7_mn_mail_icon_widget_size_request;
-#line 132 "src/mn-mail-icon-widget.gob"
- gtk_widget_class->expose_event = ___8_mn_mail_icon_widget_expose_event;
-#line 194 "mn-mail-icon-widget.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_boolean
- ("blinking" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
- g_object_class_install_property (g_object_class,
- PROP_BLINKING,
- param_spec);
- param_spec = g_param_spec_int
- ("count" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- G_MININT /* minimum */,
- G_MAXINT /* maximum */,
- 0 /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
- g_object_class_install_property (g_object_class,
- PROP_COUNT,
- param_spec);
- }
-}
-#undef __GOB_FUNCTION__
-#line 92 "src/mn-mail-icon-widget.gob"
-static void
-mn_mail_icon_widget_init (MNMailIconWidget * self G_GNUC_UNUSED)
-{
-#line 229 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAIL_ICON_WIDGET,MNMailIconWidgetPrivate);
-#line 82 "src/mn-mail-icon-widget.gob"
- self->_priv->is_on = TRUE;
-#line 234 "mn-mail-icon-widget.c"
- {
-#line 93 "src/mn-mail-icon-widget.gob"
-
- GTK_WIDGET_SET_FLAGS(self, GTK_NO_WINDOW);
-
- gtk_widget_set_name(GTK_WIDGET(self), "mn-mail-icon");
-
- g_object_connect(self,
- "swapped-signal::size-allocate", self_invalidate_count_layout, self,
- "swapped-signal::style-set", self_context_changed, self,
- "swapped-signal::direction-changed", self_context_changed, self,
- NULL);
-
-#line 248 "mn-mail-icon-widget.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:Mail:Icon:Widget::set_property"
-{
- MNMailIconWidget *self G_GNUC_UNUSED;
-
- self = MN_MAIL_ICON_WIDGET (object);
-
- switch (property_id) {
- case PROP_BLINKING:
- {
-#line 43 "src/mn-mail-icon-widget.gob"
-
- gboolean blinking = g_value_get_boolean(VAL);
- if (blinking != selfp->blinking)
- {
- selfp->blinking = blinking;
- if (blinking)
- {
- g_assert(selfp->blink_timeout_id == 0);
- selfp->blink_timeout_id = gdk_threads_add_timeout(500, self_blink_timeout_cb, self);
- }
- else
- {
- g_assert(selfp->blink_timeout_id != 0);
- mn_source_clear(&selfp->blink_timeout_id);
- selfp->is_on = TRUE;
- gtk_widget_queue_draw(GTK_WIDGET(self));
- }
- }
-
-#line 287 "mn-mail-icon-widget.c"
- }
- break;
- case PROP_COUNT:
- {
-#line 72 "src/mn-mail-icon-widget.gob"
-
- int count = g_value_get_int(VAL);
- if (count != selfp->count)
- {
- selfp->count = count;
- self_invalidate_count_layout(self);
- gtk_widget_queue_draw(GTK_WIDGET(self));
- }
-
-#line 302 "mn-mail-icon-widget.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:Mail:Icon:Widget::get_property"
-{
- MNMailIconWidget *self G_GNUC_UNUSED;
-
- self = MN_MAIL_ICON_WIDGET (object);
-
- switch (property_id) {
- case PROP_BLINKING:
- {
-#line 63 "src/mn-mail-icon-widget.gob"
-
- g_value_set_boolean(VAL, selfp->blinking);
-
-#line 335 "mn-mail-icon-widget.c"
- }
- break;
- case PROP_COUNT:
- {
-#line 82 "src/mn-mail-icon-widget.gob"
-
- g_value_set_int(VAL, selfp->count);
-
-#line 344 "mn-mail-icon-widget.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 63 "src/mn-mail-icon-widget.gob"
-gboolean
-mn_mail_icon_widget_get_blinking (MNMailIconWidget * self)
-{
-#line 364 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::get_blinking"
-{
-#line 41 "src/mn-mail-icon-widget.gob"
- gboolean val; g_object_get (G_OBJECT (self), "blinking", &val, NULL); return val;
-}}
-#line 370 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 43 "src/mn-mail-icon-widget.gob"
-void
-mn_mail_icon_widget_set_blinking (MNMailIconWidget * self, gboolean val)
-{
-#line 377 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::set_blinking"
-{
-#line 41 "src/mn-mail-icon-widget.gob"
- g_object_set (G_OBJECT (self), "blinking", val, NULL);
-}}
-#line 383 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 82 "src/mn-mail-icon-widget.gob"
-gint
-mn_mail_icon_widget_get_count (MNMailIconWidget * self)
-{
-#line 390 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::get_count"
-{
-#line 70 "src/mn-mail-icon-widget.gob"
- gint val; g_object_get (G_OBJECT (self), "count", &val, NULL); return val;
-}}
-#line 396 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 72 "src/mn-mail-icon-widget.gob"
-void
-mn_mail_icon_widget_set_count (MNMailIconWidget * self, gint val)
-{
-#line 403 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::set_count"
-{
-#line 70 "src/mn-mail-icon-widget.gob"
- g_object_set (G_OBJECT (self), "count", val, NULL);
-}}
-#line 409 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-
-#line 105 "src/mn-mail-icon-widget.gob"
-static void
-mn_mail_icon_widget_dispose (MNMailIconWidget * self G_GNUC_UNUSED)
-{
-#line 417 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::dispose"
-{
-#line 106 "src/mn-mail-icon-widget.gob"
-
- mn_source_clear(&selfp->blink_timeout_id);
- }}
-#line 424 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 110 "src/mn-mail-icon-widget.gob"
-static void
-___7_mn_mail_icon_widget_size_request (GtkWidget * widget G_GNUC_UNUSED, GtkRequisition * requisition)
-#line 430 "mn-mail-icon-widget.c"
-#define PARENT_HANDLER(___widget,___requisition) \
- { if(GTK_WIDGET_CLASS(parent_class)->size_request) \
- (* GTK_WIDGET_CLASS(parent_class)->size_request)(___widget,___requisition); }
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::size_request"
-{
-#line 112 "src/mn-mail-icon-widget.gob"
-
- Self *self = SELF(widget);
- GdkPixbuf *pixbuf;
-
- pixbuf = self_render_icon(self);
-
- if (pixbuf)
- {
- requisition->width = gdk_pixbuf_get_width(pixbuf);
- requisition->height = gdk_pixbuf_get_height(pixbuf);
-
- g_object_unref(pixbuf);
- }
- else
- {
- requisition->width = 0;
- requisition->height = 0;
- }
- }}
-#line 457 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 132 "src/mn-mail-icon-widget.gob"
-static gboolean
-___8_mn_mail_icon_widget_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
-#line 464 "mn-mail-icon-widget.c"
-#define PARENT_HANDLER(___widget,___event) \
- ((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
- (* GTK_WIDGET_CLASS(parent_class)->expose_event)(___widget,___event): \
- ((gboolean )0))
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::expose_event"
-{
-#line 134 "src/mn-mail-icon-widget.gob"
-
- Self *self = SELF(widget);
-
- if (! GTK_WIDGET_DRAWABLE(widget) || ! selfp->stock_id)
- return FALSE;
-
- if (selfp->is_on)
- {
- int x;
- int y;
- GdkRectangle image_area;
-
- /* note: widget->requisition is the pixbuf size, see size_request() */
-
- x = floor(widget->allocation.x + ((widget->allocation.width - widget->requisition.width) * ICON_XALIGN));
- y = floor(widget->allocation.y + ((widget->allocation.height - widget->requisition.height) * ICON_YALIGN));
-
- image_area.x = x;
- image_area.y = y;
- image_area.width = widget->requisition.width;
- image_area.height = widget->requisition.height;
-
- if (gdk_rectangle_intersect(&event->area, &image_area, &image_area))
- {
- GdkPixbuf *pixbuf;
-
- pixbuf = self_render_icon(self);
-
- gdk_draw_pixbuf(widget->window,
- NULL,
- pixbuf,
- image_area.x - x,
- image_area.y - y,
- image_area.x,
- image_area.y,
- image_area.width,
- image_area.height,
- GDK_RGB_DITHER_NORMAL,
- 0,
- 0);
-
- g_object_unref(pixbuf);
- }
- }
-
- if (selfp->count)
- {
- PangoRectangle count_rect;
- int count_x;
- int count_y;
- int box_x;
- int box_y;
- int box_width;
- int box_height;
-
- if (! selfp->count_layout)
- {
- const char *size;
- char *markup;
-
- if (widget->allocation.height < 32)
- size = "small";
- else
- size = "medium";
-
- selfp->count_layout = gtk_widget_create_pango_layout(widget, NULL);
-
- markup = g_strdup_printf("<span size=\"%s\">%i</span>", size, selfp->count);
- pango_layout_set_markup(selfp->count_layout, markup, -1);
- g_free(markup);
- }
-
- pango_layout_get_pixel_extents(selfp->count_layout, &count_rect, NULL);
-
- box_width = count_rect.width + COUNT_BOX_XPAD * 2;
- box_height = count_rect.height + COUNT_BOX_YPAD * 2;
-
- box_x = widget->allocation.x + widget->allocation.width - box_width - COUNT_BOX_XMARGIN;
- box_y = widget->allocation.y + widget->allocation.height - box_height - COUNT_BOX_YMARGIN;
-
- count_x = box_x - count_rect.x + COUNT_BOX_XPAD;
- count_y = box_y - count_rect.y + COUNT_BOX_YPAD;
-
- gtk_paint_box(widget->style,
- widget->window,
- GTK_WIDGET_STATE(widget),
- GTK_SHADOW_OUT,
- &event->area,
- widget,
- NULL,
- box_x,
- box_y,
- box_width,
- box_height);
-
- gtk_paint_layout(widget->style,
- widget->window,
- GTK_WIDGET_STATE(widget),
- FALSE,
- &event->area,
- widget,
- NULL,
- count_x,
- count_y,
- selfp->count_layout);
- }
-
- return FALSE;
- }}
-#line 582 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 244 "src/mn-mail-icon-widget.gob"
-static GdkPixbuf *
-mn_mail_icon_widget_render_icon (MNMailIconWidget * self)
-{
-#line 590 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::render_icon"
-#line 244 "src/mn-mail-icon-widget.gob"
- g_return_val_if_fail (self != NULL, (GdkPixbuf * )0);
-#line 244 "src/mn-mail-icon-widget.gob"
- g_return_val_if_fail (MN_IS_MAIL_ICON_WIDGET (self), (GdkPixbuf * )0);
-#line 596 "mn-mail-icon-widget.c"
-{
-#line 246 "src/mn-mail-icon-widget.gob"
-
- if (selfp->stock_id)
- return gtk_widget_render_icon(GTK_WIDGET(self),
- selfp->stock_id,
- selfp->icon_size,
- NULL);
- else
- return NULL;
- }}
-#line 608 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 256 "src/mn-mail-icon-widget.gob"
-static void
-mn_mail_icon_widget_context_changed (MNMailIconWidget * self)
-{
-#line 615 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::context_changed"
-#line 256 "src/mn-mail-icon-widget.gob"
- g_return_if_fail (self != NULL);
-#line 256 "src/mn-mail-icon-widget.gob"
- g_return_if_fail (MN_IS_MAIL_ICON_WIDGET (self));
-#line 621 "mn-mail-icon-widget.c"
-{
-#line 258 "src/mn-mail-icon-widget.gob"
-
- if (selfp->count_layout)
- {
- pango_layout_context_changed(selfp->count_layout);
- gtk_widget_queue_draw(GTK_WIDGET(self));
- }
- }}
-#line 631 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 266 "src/mn-mail-icon-widget.gob"
-static void
-mn_mail_icon_widget_invalidate_count_layout (MNMailIconWidget * self)
-{
-#line 638 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::invalidate_count_layout"
-#line 266 "src/mn-mail-icon-widget.gob"
- g_return_if_fail (self != NULL);
-#line 266 "src/mn-mail-icon-widget.gob"
- g_return_if_fail (MN_IS_MAIL_ICON_WIDGET (self));
-#line 644 "mn-mail-icon-widget.c"
-{
-#line 268 "src/mn-mail-icon-widget.gob"
-
- if (selfp->count_layout)
- {
- g_object_unref(selfp->count_layout);
- selfp->count_layout = NULL;
- }
- }}
-#line 654 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 276 "src/mn-mail-icon-widget.gob"
-static gboolean
-mn_mail_icon_widget_blink_timeout_cb (gpointer data)
-{
-#line 661 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::blink_timeout_cb"
-{
-#line 278 "src/mn-mail-icon-widget.gob"
-
- Self *self = data;
-
- selfp->is_on = ! selfp->is_on;
-
- gtk_widget_queue_draw(GTK_WIDGET(self));
-
- return TRUE;
- }}
-#line 674 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 288 "src/mn-mail-icon-widget.gob"
-GtkWidget *
-mn_mail_icon_widget_new (void)
-{
-#line 681 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::new"
-{
-#line 290 "src/mn-mail-icon-widget.gob"
-
- return GTK_WIDGET(GET_NEW);
- }}
-#line 688 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
-
-#line 294 "src/mn-mail-icon-widget.gob"
-void
-mn_mail_icon_widget_set_from_stock (MNMailIconWidget * self, const char * stock_id, GtkIconSize icon_size)
-{
-#line 695 "mn-mail-icon-widget.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::set_from_stock"
-#line 294 "src/mn-mail-icon-widget.gob"
- g_return_if_fail (self != NULL);
-#line 294 "src/mn-mail-icon-widget.gob"
- g_return_if_fail (MN_IS_MAIL_ICON_WIDGET (self));
-#line 294 "src/mn-mail-icon-widget.gob"
- g_return_if_fail (stock_id != NULL);
-#line 703 "mn-mail-icon-widget.c"
-{
-#line 298 "src/mn-mail-icon-widget.gob"
-
- g_free(selfp->stock_id);
- selfp->stock_id = g_strdup(stock_id);
- selfp->icon_size = icon_size;
-
- /* affects the size request: call queue_resize(), not queue_draw() */
- gtk_widget_queue_resize(GTK_WIDGET(self));
- }}
-#line 714 "mn-mail-icon-widget.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-mail-icon-widget.gob.stamp b/build/src/mn-mail-icon-widget.gob.stamp
diff --git a/build/src/mn-mail-icon-widget.h b/build/src/mn-mail-icon-widget.h
@@ -1,100 +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_MAIL_ICON_WIDGET_H__
-#define __MN_MAIL_ICON_WIDGET_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAIL_ICON_WIDGET (mn_mail_icon_widget_get_type())
-#define MN_MAIL_ICON_WIDGET(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mail_icon_widget_get_type(), MNMailIconWidget)
-#define MN_MAIL_ICON_WIDGET_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mail_icon_widget_get_type(), MNMailIconWidget const)
-#define MN_MAIL_ICON_WIDGET_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mail_icon_widget_get_type(), MNMailIconWidgetClass)
-#define MN_IS_MAIL_ICON_WIDGET(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mail_icon_widget_get_type ())
-
-#define MN_MAIL_ICON_WIDGET_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mail_icon_widget_get_type(), MNMailIconWidgetClass)
-
-/* Private structure type */
-typedef struct _MNMailIconWidgetPrivate MNMailIconWidgetPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAIL_ICON_WIDGET__
-#define __TYPEDEF_MN_MAIL_ICON_WIDGET__
-typedef struct _MNMailIconWidget MNMailIconWidget;
-#endif
-struct _MNMailIconWidget {
- GtkWidget __parent__;
- /*< private >*/
- MNMailIconWidgetPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMailIconWidgetClass MNMailIconWidgetClass;
-struct _MNMailIconWidgetClass {
- GtkWidgetClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_mail_icon_widget_get_type (void) G_GNUC_CONST;
-#line 63 "src/mn-mail-icon-widget.gob"
-gboolean mn_mail_icon_widget_get_blinking (MNMailIconWidget * self);
-#line 60 "mn-mail-icon-widget.h"
-#line 43 "src/mn-mail-icon-widget.gob"
-void mn_mail_icon_widget_set_blinking (MNMailIconWidget * self,
- gboolean val);
-#line 64 "mn-mail-icon-widget.h"
-#line 82 "src/mn-mail-icon-widget.gob"
-gint mn_mail_icon_widget_get_count (MNMailIconWidget * self);
-#line 67 "mn-mail-icon-widget.h"
-#line 72 "src/mn-mail-icon-widget.gob"
-void mn_mail_icon_widget_set_count (MNMailIconWidget * self,
- gint val);
-#line 71 "mn-mail-icon-widget.h"
-#line 288 "src/mn-mail-icon-widget.gob"
-GtkWidget * mn_mail_icon_widget_new (void);
-#line 74 "mn-mail-icon-widget.h"
-#line 294 "src/mn-mail-icon-widget.gob"
-void mn_mail_icon_widget_set_from_stock (MNMailIconWidget * self,
- const char * stock_id,
- GtkIconSize icon_size);
-#line 79 "mn-mail-icon-widget.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_MAIL_ICON_WIDGET_PROP_BLINKING(arg) "blinking", __extension__ ({gboolean z = (arg); z;})
-#define MN_MAIL_ICON_WIDGET_GET_PROP_BLINKING(arg) "blinking", __extension__ ({gboolean *z = (arg); z;})
-#define MN_MAIL_ICON_WIDGET_PROP_COUNT(arg) "count", __extension__ ({gint z = (arg); z;})
-#define MN_MAIL_ICON_WIDGET_GET_PROP_COUNT(arg) "count", __extension__ ({gint *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_MAIL_ICON_WIDGET_PROP_BLINKING(arg) "blinking",(gboolean )(arg)
-#define MN_MAIL_ICON_WIDGET_GET_PROP_BLINKING(arg) "blinking",(gboolean *)(arg)
-#define MN_MAIL_ICON_WIDGET_PROP_COUNT(arg) "count",(gint )(arg)
-#define MN_MAIL_ICON_WIDGET_GET_PROP_COUNT(arg) "count",(gint *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mail-icon.c b/build/src/mn-mail-icon.c
@@ -1,967 +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-mail-icon.h"
-
-#include "mn-mail-icon-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 35 "src/mn-mail-icon.gob"
-
-#include <glib/gi18n.h>
-#include <gdk/gdkkeysyms.h>
-#include "mn-stock.h"
-#include "mn-util.h"
-#include "mn-mail-icon-widget.h"
-
-#line 34 "mn-mail-icon.c"
-/* self casting macros */
-#define SELF(x) MN_MAIL_ICON(x)
-#define SELF_CONST(x) MN_MAIL_ICON_CONST(x)
-#define IS_SELF(x) MN_IS_MAIL_ICON(x)
-#define TYPE_SELF MN_TYPE_MAIL_ICON
-#define SELF_CLASS(x) MN_MAIL_ICON_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAIL_ICON_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMailIcon Self;
-typedef MNMailIconClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-mail-icon.gob"
-static void mn_mail_icon_class_init (MNMailIconClass * c) G_GNUC_UNUSED;
-#line 51 "mn-mail-icon.c"
-#line 57 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate (MNMailIcon * self) G_GNUC_UNUSED;
-#line 54 "mn-mail-icon.c"
-#line 59 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate_mail_reader (MNMailIcon * self) G_GNUC_UNUSED;
-#line 57 "mn-mail-icon.c"
-#line 61 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate_open_latest_message (MNMailIcon * self) G_GNUC_UNUSED;
-#line 60 "mn-mail-icon.c"
-#line 63 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate_consider_new_mail_as_read (MNMailIcon * self) G_GNUC_UNUSED;
-#line 63 "mn-mail-icon.c"
-#line 65 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate_update (MNMailIcon * self) G_GNUC_UNUSED;
-#line 66 "mn-mail-icon.c"
-#line 67 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate_properties (MNMailIcon * self) G_GNUC_UNUSED;
-#line 69 "mn-mail-icon.c"
-#line 69 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate_help (MNMailIcon * self) G_GNUC_UNUSED;
-#line 72 "mn-mail-icon.c"
-#line 71 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate_about (MNMailIcon * self) G_GNUC_UNUSED;
-#line 75 "mn-mail-icon.c"
-#line 73 "src/mn-mail-icon.gob"
-static void mn_mail_icon_activate_remove (MNMailIcon * self) G_GNUC_UNUSED;
-#line 78 "mn-mail-icon.c"
-#line 76 "src/mn-mail-icon.gob"
-static void mn_mail_icon_init (MNMailIcon * self) G_GNUC_UNUSED;
-#line 81 "mn-mail-icon.c"
-#line 131 "src/mn-mail-icon.gob"
-static void mn_mail_icon_size_allocate_h (GtkWidget * widget, GtkAllocation * allocation, gpointer user_data) G_GNUC_UNUSED;
-#line 84 "mn-mail-icon.c"
-#line 154 "src/mn-mail-icon.gob"
-static GtkIconSize mn_mail_icon_find_icon_size (GtkWidget * widget, int pixel_size) G_GNUC_UNUSED;
-#line 87 "mn-mail-icon.c"
-#line 190 "src/mn-mail-icon.gob"
-static void mn_mail_icon_update_image (MNMailIcon * self) G_GNUC_UNUSED;
-#line 90 "mn-mail-icon.c"
-#line 199 "src/mn-mail-icon.gob"
-static gboolean mn_mail_icon_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data) G_GNUC_UNUSED;
-#line 93 "mn-mail-icon.c"
-#line 217 "src/mn-mail-icon.gob"
-static gboolean mn_mail_icon_button_release_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data) G_GNUC_UNUSED;
-#line 96 "mn-mail-icon.c"
-#line 233 "src/mn-mail-icon.gob"
-static void mn_mail_icon_popup_menu_position_cb (GtkMenu * menu, int * x, int * y, gboolean * push_in, gpointer user_data) G_GNUC_UNUSED;
-#line 99 "mn-mail-icon.c"
-
-/*
- * Signal connection wrapper macro shortcuts
- */
-#define self_connect__activate(object,func,data) mn_mail_icon_connect__activate((object),(func),(data))
-#define self_connect_after__activate(object,func,data) mn_mail_icon_connect_after__activate((object),(func),(data))
-#define self_connect_data__activate(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_mail_reader(object,func,data) mn_mail_icon_connect__activate_mail_reader((object),(func),(data))
-#define self_connect_after__activate_mail_reader(object,func,data) mn_mail_icon_connect_after__activate_mail_reader((object),(func),(data))
-#define self_connect_data__activate_mail_reader(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_mail_reader((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_open_latest_message(object,func,data) mn_mail_icon_connect__activate_open_latest_message((object),(func),(data))
-#define self_connect_after__activate_open_latest_message(object,func,data) mn_mail_icon_connect_after__activate_open_latest_message((object),(func),(data))
-#define self_connect_data__activate_open_latest_message(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_open_latest_message((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_consider_new_mail_as_read(object,func,data) mn_mail_icon_connect__activate_consider_new_mail_as_read((object),(func),(data))
-#define self_connect_after__activate_consider_new_mail_as_read(object,func,data) mn_mail_icon_connect_after__activate_consider_new_mail_as_read((object),(func),(data))
-#define self_connect_data__activate_consider_new_mail_as_read(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_consider_new_mail_as_read((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_update(object,func,data) mn_mail_icon_connect__activate_update((object),(func),(data))
-#define self_connect_after__activate_update(object,func,data) mn_mail_icon_connect_after__activate_update((object),(func),(data))
-#define self_connect_data__activate_update(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_update((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_properties(object,func,data) mn_mail_icon_connect__activate_properties((object),(func),(data))
-#define self_connect_after__activate_properties(object,func,data) mn_mail_icon_connect_after__activate_properties((object),(func),(data))
-#define self_connect_data__activate_properties(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_properties((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_help(object,func,data) mn_mail_icon_connect__activate_help((object),(func),(data))
-#define self_connect_after__activate_help(object,func,data) mn_mail_icon_connect_after__activate_help((object),(func),(data))
-#define self_connect_data__activate_help(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_help((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_about(object,func,data) mn_mail_icon_connect__activate_about((object),(func),(data))
-#define self_connect_after__activate_about(object,func,data) mn_mail_icon_connect_after__activate_about((object),(func),(data))
-#define self_connect_data__activate_about(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_about((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_remove(object,func,data) mn_mail_icon_connect__activate_remove((object),(func),(data))
-#define self_connect_after__activate_remove(object,func,data) mn_mail_icon_connect_after__activate_remove((object),(func),(data))
-#define self_connect_data__activate_remove(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_remove((object),(func),(data),(destroy_data),(flags))
-
-enum {
- ACTIVATE_SIGNAL,
- ACTIVATE_MAIL_READER_SIGNAL,
- ACTIVATE_OPEN_LATEST_MESSAGE_SIGNAL,
- ACTIVATE_CONSIDER_NEW_MAIL_AS_READ_SIGNAL,
- ACTIVATE_UPDATE_SIGNAL,
- ACTIVATE_PROPERTIES_SIGNAL,
- ACTIVATE_HELP_SIGNAL,
- ACTIVATE_ABOUT_SIGNAL,
- ACTIVATE_REMOVE_SIGNAL,
- LAST_SIGNAL
-};
-
-static guint object_signals[LAST_SIGNAL] = {0};
-
-/* pointer to the class of our parent */
-static EggTrayIconClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_activate mn_mail_icon_activate
-#define self_activate_mail_reader mn_mail_icon_activate_mail_reader
-#define self_activate_open_latest_message mn_mail_icon_activate_open_latest_message
-#define self_activate_consider_new_mail_as_read mn_mail_icon_activate_consider_new_mail_as_read
-#define self_activate_update mn_mail_icon_activate_update
-#define self_activate_properties mn_mail_icon_activate_properties
-#define self_activate_help mn_mail_icon_activate_help
-#define self_activate_about mn_mail_icon_activate_about
-#define self_activate_remove mn_mail_icon_activate_remove
-#define self_size_allocate_h mn_mail_icon_size_allocate_h
-#define self_find_icon_size mn_mail_icon_find_icon_size
-#define self_update_image mn_mail_icon_update_image
-#define self_button_press_event_h mn_mail_icon_button_press_event_h
-#define self_button_release_event_h mn_mail_icon_button_release_event_h
-#define self_popup_menu_position_cb mn_mail_icon_popup_menu_position_cb
-#define self_set_from_stock mn_mail_icon_set_from_stock
-#define self_set_blinking mn_mail_icon_set_blinking
-#define self_set_count mn_mail_icon_set_count
-#define self_set_tip mn_mail_icon_set_tip
-#define self_set_tip_widget mn_mail_icon_set_tip_widget
-#define self_new mn_mail_icon_new
-GType
-mn_mail_icon_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMailIconClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mail_icon_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMailIcon),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mail_icon_init,
- NULL
- };
-
- type = g_type_register_static (EGG_TYPE_TRAY_ICON, "MNMailIcon", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMailIcon *)g_object_new(mn_mail_icon_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMailIcon * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMailIcon *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMailIcon *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMailIcon *)g_object_new_valist (mn_mail_icon_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon::dispose"
- MNMailIcon *self G_GNUC_UNUSED = MN_MAIL_ICON (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 45 "src/mn-mail-icon.gob"
- if(self->_priv->tooltips) { g_object_unref ((gpointer) self->_priv->tooltips); self->_priv->tooltips = NULL; }
-#line 224 "mn-mail-icon.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon::finalize"
- MNMailIcon *self G_GNUC_UNUSED = MN_MAIL_ICON (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-mail-icon.gob"
- if(self->_priv->stock_id) { g_free ((gpointer) self->_priv->stock_id); self->_priv->stock_id = NULL; }
-#line 239 "mn-mail-icon.c"
-#line 51 "src/mn-mail-icon.gob"
- if(self->_priv->menu) { gtk_widget_destroy ((gpointer) self->_priv->menu); self->_priv->menu = NULL; }
-#line 242 "mn-mail-icon.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_mail_icon_class_init (MNMailIconClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNMailIconPrivate));
-
- parent_class = g_type_class_ref (EGG_TYPE_TRAY_ICON);
-
- object_signals[ACTIVATE_SIGNAL] =
- g_signal_new ("activate",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_MAIL_READER_SIGNAL] =
- g_signal_new ("activate_mail_reader",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_mail_reader),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_OPEN_LATEST_MESSAGE_SIGNAL] =
- g_signal_new ("activate_open_latest_message",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_open_latest_message),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_CONSIDER_NEW_MAIL_AS_READ_SIGNAL] =
- g_signal_new ("activate_consider_new_mail_as_read",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_consider_new_mail_as_read),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_UPDATE_SIGNAL] =
- g_signal_new ("activate_update",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_update),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_PROPERTIES_SIGNAL] =
- g_signal_new ("activate_properties",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_properties),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_HELP_SIGNAL] =
- g_signal_new ("activate_help",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_help),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_ABOUT_SIGNAL] =
- g_signal_new ("activate_about",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_about),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_REMOVE_SIGNAL] =
- g_signal_new ("activate_remove",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailIconClass, activate_remove),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- c->activate = NULL;
- c->activate_mail_reader = NULL;
- c->activate_open_latest_message = NULL;
- c->activate_consider_new_mail_as_read = NULL;
- c->activate_update = NULL;
- c->activate_properties = NULL;
- c->activate_help = NULL;
- c->activate_about = NULL;
- c->activate_remove = NULL;
- g_object_class->dispose = ___dispose;
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-#line 76 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_init (MNMailIcon * self G_GNUC_UNUSED)
-{
-#line 346 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAIL_ICON,MNMailIconPrivate);
-#line 45 "src/mn-mail-icon.gob"
- self->_priv->tooltips = mn_tooltips_new();
-#line 351 "mn-mail-icon.c"
-#line 46 "src/mn-mail-icon.gob"
- self->_priv->widget = mn_mail_icon_widget_new();
-#line 354 "mn-mail-icon.c"
-#line 51 "src/mn-mail-icon.gob"
- self->_priv->menu = gtk_menu_new();
-#line 357 "mn-mail-icon.c"
- {
-#line 77 "src/mn-mail-icon.gob"
-
- GtkMenuShell *shell;
- GtkWidget *properties_item;
- GtkWidget *help_item;
- GtkWidget *about_item;
- GtkWidget *remove_item;
-
- shell = GTK_MENU_SHELL(selfp->menu);
- /* translators: header capitalization */
- self->mail_reader_item = mn_menu_shell_append(shell, MN_STOCK_MAIL_READER, _("_Mail Reader"));
- /* translators: header capitalization */
- self->open_latest_message_item = mn_menu_shell_append(shell, MN_STOCK_OPEN_MESSAGE, _("_Open Latest Message"));
-
- mn_menu_shell_append(shell, NULL, NULL);
-
- /* translators: header capitalization */
- self->consider_new_mail_as_read_item = mn_menu_shell_append(shell, MN_STOCK_CONSIDER_NEW_MAIL_AS_READ, _("_Consider New Mail as Read"));
- /* translators: header capitalization */
- self->update_item = mn_menu_shell_append(shell, GTK_STOCK_REFRESH, _("_Update"));
-
- mn_menu_shell_append(shell, NULL, NULL);
-
- properties_item = mn_menu_shell_append(shell, GTK_STOCK_PROPERTIES, NULL);
- help_item = mn_menu_shell_append(shell, GTK_STOCK_HELP, NULL);
- about_item = mn_menu_shell_append(shell, GTK_STOCK_ABOUT, NULL);
-
- mn_menu_shell_append(shell, NULL, NULL);
-
- /* translators: header capitalization */
- remove_item = mn_menu_shell_append(shell, GTK_STOCK_REMOVE, _("R_emove From Notification Area"));
-
- g_signal_connect_swapped(self->mail_reader_item, "activate", G_CALLBACK(self_activate_mail_reader), self);
- g_signal_connect_swapped(self->open_latest_message_item, "activate", G_CALLBACK(self_activate_open_latest_message), self);
- g_signal_connect_swapped(self->consider_new_mail_as_read_item, "activate", G_CALLBACK(self_activate_consider_new_mail_as_read), self);
- g_signal_connect_swapped(self->update_item, "activate", G_CALLBACK(self_activate_update), self);
- g_signal_connect_swapped(properties_item, "activate", G_CALLBACK(self_activate_properties), self);
- g_signal_connect_swapped(help_item, "activate", G_CALLBACK(self_activate_help), self);
- g_signal_connect_swapped(about_item, "activate", G_CALLBACK(self_activate_about), self);
- g_signal_connect_swapped(remove_item, "activate", G_CALLBACK(self_activate_remove), self);
-
- gtk_widget_add_events(GTK_WIDGET(self), GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
-
- gtk_container_add(GTK_CONTAINER(self), selfp->widget);
-
- g_object_connect(self,
- "signal::button-press-event", self_button_press_event_h, self,
- "signal::button-release-event", self_button_release_event_h, self,
- NULL);
-
- g_signal_connect(selfp->widget, "size-allocate", G_CALLBACK(self_size_allocate_h), self);
-
- gtk_widget_show(selfp->widget);
-
-#line 413 "mn-mail-icon.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-#line 57 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate (MNMailIcon * self)
-{
-#line 423 "mn-mail-icon.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 57 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 57 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 434 "mn-mail-icon.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[ACTIVATE_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 59 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate_mail_reader (MNMailIcon * self)
-{
-#line 452 "mn-mail-icon.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 59 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 59 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 463 "mn-mail-icon.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[ACTIVATE_MAIL_READER_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 61 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate_open_latest_message (MNMailIcon * self)
-{
-#line 481 "mn-mail-icon.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 61 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 61 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 492 "mn-mail-icon.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[ACTIVATE_OPEN_LATEST_MESSAGE_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 63 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate_consider_new_mail_as_read (MNMailIcon * self)
-{
-#line 510 "mn-mail-icon.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 63 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 63 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 521 "mn-mail-icon.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[ACTIVATE_CONSIDER_NEW_MAIL_AS_READ_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 65 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate_update (MNMailIcon * self)
-{
-#line 539 "mn-mail-icon.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 65 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 65 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 550 "mn-mail-icon.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[ACTIVATE_UPDATE_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 67 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate_properties (MNMailIcon * self)
-{
-#line 568 "mn-mail-icon.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-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 67 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 579 "mn-mail-icon.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[ACTIVATE_PROPERTIES_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 69 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate_help (MNMailIcon * self)
-{
-#line 597 "mn-mail-icon.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 69 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 69 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 608 "mn-mail-icon.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[ACTIVATE_HELP_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 71 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate_about (MNMailIcon * self)
-{
-#line 626 "mn-mail-icon.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 71 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 71 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 637 "mn-mail-icon.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[ACTIVATE_ABOUT_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 73 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_activate_remove (MNMailIcon * self)
-{
-#line 655 "mn-mail-icon.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 73 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 73 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 666 "mn-mail-icon.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[ACTIVATE_REMOVE_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-
-#line 131 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_size_allocate_h (GtkWidget * widget, GtkAllocation * allocation, gpointer user_data)
-{
-#line 685 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::size_allocate_h"
-{
-#line 135 "src/mn-mail-icon.gob"
-
- Self *self = user_data;
- GtkOrientation orientation;
- int size;
-
- orientation = egg_tray_icon_get_orientation(EGG_TRAY_ICON(self));
-
- if (orientation == GTK_ORIENTATION_HORIZONTAL)
- size = allocation->height;
- else
- size = allocation->width;
-
- if (selfp->size != size)
- {
- selfp->size = size;
- self_update_image(self);
- }
- }}
-#line 707 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 154 "src/mn-mail-icon.gob"
-static GtkIconSize
-mn_mail_icon_find_icon_size (GtkWidget * widget, int pixel_size)
-{
-#line 714 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::find_icon_size"
-#line 154 "src/mn-mail-icon.gob"
- g_return_val_if_fail (widget != NULL, (GtkIconSize )0);
-#line 154 "src/mn-mail-icon.gob"
- g_return_val_if_fail (GTK_IS_WIDGET (widget), (GtkIconSize )0);
-#line 720 "mn-mail-icon.c"
-{
-#line 156 "src/mn-mail-icon.gob"
-
- GdkScreen *screen;
- GtkSettings *settings;
- GtkIconSize s, size;
- int w, h, d, dist;
-
- screen = gtk_widget_get_screen(widget);
-
- if (! screen)
- return GTK_ICON_SIZE_MENU;
-
- settings = gtk_settings_get_for_screen(screen);
-
- dist = G_MAXINT;
- size = GTK_ICON_SIZE_MENU;
-
- for (s = GTK_ICON_SIZE_MENU; s < GTK_ICON_SIZE_DIALOG; s++)
- {
- if (gtk_icon_size_lookup_for_settings(settings, s, &w, &h)
- && w <= pixel_size
- && h <= pixel_size)
- {
- d = MAX(pixel_size - w, pixel_size - h);
- if (d < dist)
- {
- dist = d;
- size = s;
- }
- }
- }
-
- return size;
- }}
-#line 756 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 190 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_update_image (MNMailIcon * self)
-{
-#line 763 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::update_image"
-#line 190 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 190 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 769 "mn-mail-icon.c"
-{
-#line 192 "src/mn-mail-icon.gob"
-
- GtkIconSize size;
-
- size = self_find_icon_size(selfp->widget, selfp->size);
- mn_mail_icon_widget_set_from_stock(MN_MAIL_ICON_WIDGET(selfp->widget), selfp->stock_id, size);
- }}
-#line 778 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 199 "src/mn-mail-icon.gob"
-static gboolean
-mn_mail_icon_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-{
-#line 785 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::button_press_event_h"
-{
-#line 203 "src/mn-mail-icon.gob"
-
- Self *self = user_data;
-
- if (event->button == 1)
- self_activate(self);
- else if (event->button == 3)
- {
- gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, self_popup_menu_position_cb, self, event->button, event->time);
- return TRUE; /* do not propagate event */
- }
-
- return FALSE; /* propagate event */
- }}
-#line 802 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 217 "src/mn-mail-icon.gob"
-static gboolean
-mn_mail_icon_button_release_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-{
-#line 809 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::button_release_event_h"
-{
-#line 221 "src/mn-mail-icon.gob"
-
- Self *self = user_data;
-
- if (event->button == 3)
- {
- gtk_menu_popdown(GTK_MENU(selfp->menu));
- return TRUE; /* do not propagate event */
- }
-
- return FALSE; /* propagate event */
- }}
-#line 824 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 233 "src/mn-mail-icon.gob"
-static void
-mn_mail_icon_popup_menu_position_cb (GtkMenu * menu, int * x, int * y, gboolean * push_in, gpointer user_data)
-{
-#line 831 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::popup_menu_position_cb"
-{
-#line 239 "src/mn-mail-icon.gob"
-
- GtkWidget *widget = user_data;
-
- gdk_window_get_origin(widget->window, x, y);
-
- *x += widget->allocation.x;
- *y += widget->allocation.y;
-
- if (*y > gdk_screen_get_height(gtk_widget_get_screen(widget)) / 2)
- {
- GtkRequisition req;
-
- gtk_widget_size_request(GTK_WIDGET(menu), &req);
- *y -= req.height;
- }
- else
- *y += widget->allocation.height;
-
- *push_in = TRUE;
- }}
-#line 855 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 260 "src/mn-mail-icon.gob"
-void
-mn_mail_icon_set_from_stock (MNMailIcon * self, const char * stock_id)
-{
-#line 862 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::set_from_stock"
-#line 260 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 260 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 868 "mn-mail-icon.c"
-{
-#line 262 "src/mn-mail-icon.gob"
-
- g_free(selfp->stock_id);
- selfp->stock_id = g_strdup(stock_id);
-
- self_update_image(self);
- }}
-#line 877 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 269 "src/mn-mail-icon.gob"
-void
-mn_mail_icon_set_blinking (MNMailIcon * self, gboolean blinking)
-{
-#line 884 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::set_blinking"
-#line 269 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 269 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 890 "mn-mail-icon.c"
-{
-#line 271 "src/mn-mail-icon.gob"
-
- mn_mail_icon_widget_set_blinking(MN_MAIL_ICON_WIDGET(selfp->widget), blinking);
- }}
-#line 896 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 275 "src/mn-mail-icon.gob"
-void
-mn_mail_icon_set_count (MNMailIcon * self, int count)
-{
-#line 903 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::set_count"
-#line 275 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 275 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 909 "mn-mail-icon.c"
-{
-#line 277 "src/mn-mail-icon.gob"
-
- mn_mail_icon_widget_set_count(MN_MAIL_ICON_WIDGET(selfp->widget), count);
- }}
-#line 915 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 281 "src/mn-mail-icon.gob"
-void
-mn_mail_icon_set_tip (MNMailIcon * self, const char * tip)
-{
-#line 922 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::set_tip"
-#line 281 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 281 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 928 "mn-mail-icon.c"
-{
-#line 283 "src/mn-mail-icon.gob"
-
- mn_tooltips_set_tip(selfp->tooltips, GTK_WIDGET(self), tip);
- }}
-#line 934 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 287 "src/mn-mail-icon.gob"
-void
-mn_mail_icon_set_tip_widget (MNMailIcon * self, GtkWidget * tip_widget)
-{
-#line 941 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::set_tip_widget"
-#line 287 "src/mn-mail-icon.gob"
- g_return_if_fail (self != NULL);
-#line 287 "src/mn-mail-icon.gob"
- g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 947 "mn-mail-icon.c"
-{
-#line 289 "src/mn-mail-icon.gob"
-
- mn_tooltips_set_tip_widget(selfp->tooltips, GTK_WIDGET(self), tip_widget);
- }}
-#line 953 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 293 "src/mn-mail-icon.gob"
-GtkWidget *
-mn_mail_icon_new (void)
-{
-#line 960 "mn-mail-icon.c"
-#define __GOB_FUNCTION__ "MN:Mail:Icon::new"
-{
-#line 295 "src/mn-mail-icon.gob"
-
- return GTK_WIDGET(GET_NEW_VARG("title", _("Mail Notification"), NULL));
- }}
-#line 967 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-mail-icon.gob.stamp b/build/src/mn-mail-icon.gob.stamp
diff --git a/build/src/mn-mail-icon.h b/build/src/mn-mail-icon.h
@@ -1,162 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <gtk/gtk.h>
-#include "eggtrayicon.h"
-
-#ifndef __MN_MAIL_ICON_H__
-#define __MN_MAIL_ICON_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAIL_ICON (mn_mail_icon_get_type())
-#define MN_MAIL_ICON(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mail_icon_get_type(), MNMailIcon)
-#define MN_MAIL_ICON_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mail_icon_get_type(), MNMailIcon const)
-#define MN_MAIL_ICON_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mail_icon_get_type(), MNMailIconClass)
-#define MN_IS_MAIL_ICON(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mail_icon_get_type ())
-
-#define MN_MAIL_ICON_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mail_icon_get_type(), MNMailIconClass)
-
-/* Private structure type */
-typedef struct _MNMailIconPrivate MNMailIconPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAIL_ICON__
-#define __TYPEDEF_MN_MAIL_ICON__
-typedef struct _MNMailIcon MNMailIcon;
-#endif
-struct _MNMailIcon {
- EggTrayIcon __parent__;
- /*< public >*/
- GtkWidget * mail_reader_item;
- GtkWidget * open_latest_message_item;
- GtkWidget * update_item;
- GtkWidget * consider_new_mail_as_read_item;
- /*< private >*/
- MNMailIconPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMailIconClass MNMailIconClass;
-struct _MNMailIconClass {
- EggTrayIconClass __parent__;
- /*signal*/void (* activate) (MNMailIcon * self);
- /*signal*/void (* activate_mail_reader) (MNMailIcon * self);
- /*signal*/void (* activate_open_latest_message) (MNMailIcon * self);
- /*signal*/void (* activate_consider_new_mail_as_read) (MNMailIcon * self);
- /*signal*/void (* activate_update) (MNMailIcon * self);
- /*signal*/void (* activate_properties) (MNMailIcon * self);
- /*signal*/void (* activate_help) (MNMailIcon * self);
- /*signal*/void (* activate_about) (MNMailIcon * self);
- /*signal*/void (* activate_remove) (MNMailIcon * self);
-};
-
-
-/*
- * Public methods
- */
-GType mn_mail_icon_get_type (void) G_GNUC_CONST;
-#line 260 "src/mn-mail-icon.gob"
-void mn_mail_icon_set_from_stock (MNMailIcon * self,
- const char * stock_id);
-#line 76 "mn-mail-icon.h"
-#line 269 "src/mn-mail-icon.gob"
-void mn_mail_icon_set_blinking (MNMailIcon * self,
- gboolean blinking);
-#line 80 "mn-mail-icon.h"
-#line 275 "src/mn-mail-icon.gob"
-void mn_mail_icon_set_count (MNMailIcon * self,
- int count);
-#line 84 "mn-mail-icon.h"
-#line 281 "src/mn-mail-icon.gob"
-void mn_mail_icon_set_tip (MNMailIcon * self,
- const char * tip);
-#line 88 "mn-mail-icon.h"
-#line 287 "src/mn-mail-icon.gob"
-void mn_mail_icon_set_tip_widget (MNMailIcon * self,
- GtkWidget * tip_widget);
-#line 92 "mn-mail-icon.h"
-#line 293 "src/mn-mail-icon.gob"
-GtkWidget * mn_mail_icon_new (void);
-#line 95 "mn-mail-icon.h"
-
-/*
- * Signal connection wrapper macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define mn_mail_icon_connect__activate(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate",(GCallback) __extension__ ({void (* ___activate) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate; }), (data))
-#define mn_mail_icon_connect_after__activate(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate",(GCallback) __extension__ ({void (* ___activate) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate; }), (data))
-#define mn_mail_icon_connect_data__activate(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate",(GCallback) __extension__ ({void (* ___activate) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_mail_reader(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_mail_reader",(GCallback) __extension__ ({void (* ___activate_mail_reader) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_mail_reader; }), (data))
-#define mn_mail_icon_connect_after__activate_mail_reader(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_mail_reader",(GCallback) __extension__ ({void (* ___activate_mail_reader) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_mail_reader; }), (data))
-#define mn_mail_icon_connect_data__activate_mail_reader(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_mail_reader",(GCallback) __extension__ ({void (* ___activate_mail_reader) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_mail_reader; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_open_latest_message(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_open_latest_message",(GCallback) __extension__ ({void (* ___activate_open_latest_message) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_open_latest_message; }), (data))
-#define mn_mail_icon_connect_after__activate_open_latest_message(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_open_latest_message",(GCallback) __extension__ ({void (* ___activate_open_latest_message) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_open_latest_message; }), (data))
-#define mn_mail_icon_connect_data__activate_open_latest_message(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_open_latest_message",(GCallback) __extension__ ({void (* ___activate_open_latest_message) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_open_latest_message; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_consider_new_mail_as_read(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_consider_new_mail_as_read",(GCallback) __extension__ ({void (* ___activate_consider_new_mail_as_read) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_consider_new_mail_as_read; }), (data))
-#define mn_mail_icon_connect_after__activate_consider_new_mail_as_read(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_consider_new_mail_as_read",(GCallback) __extension__ ({void (* ___activate_consider_new_mail_as_read) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_consider_new_mail_as_read; }), (data))
-#define mn_mail_icon_connect_data__activate_consider_new_mail_as_read(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_consider_new_mail_as_read",(GCallback) __extension__ ({void (* ___activate_consider_new_mail_as_read) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_consider_new_mail_as_read; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_update(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data))
-#define mn_mail_icon_connect_after__activate_update(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data))
-#define mn_mail_icon_connect_data__activate_update(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_properties(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_properties",(GCallback) __extension__ ({void (* ___activate_properties) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_properties; }), (data))
-#define mn_mail_icon_connect_after__activate_properties(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_properties",(GCallback) __extension__ ({void (* ___activate_properties) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_properties; }), (data))
-#define mn_mail_icon_connect_data__activate_properties(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_properties",(GCallback) __extension__ ({void (* ___activate_properties) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_properties; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_help(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_help",(GCallback) __extension__ ({void (* ___activate_help) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_help; }), (data))
-#define mn_mail_icon_connect_after__activate_help(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_help",(GCallback) __extension__ ({void (* ___activate_help) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_help; }), (data))
-#define mn_mail_icon_connect_data__activate_help(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_help",(GCallback) __extension__ ({void (* ___activate_help) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_help; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_about(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_about",(GCallback) __extension__ ({void (* ___activate_about) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_about; }), (data))
-#define mn_mail_icon_connect_after__activate_about(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_about",(GCallback) __extension__ ({void (* ___activate_about) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_about; }), (data))
-#define mn_mail_icon_connect_data__activate_about(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_about",(GCallback) __extension__ ({void (* ___activate_about) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_about; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_remove(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_remove",(GCallback) __extension__ ({void (* ___activate_remove) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_remove; }), (data))
-#define mn_mail_icon_connect_after__activate_remove(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_remove",(GCallback) __extension__ ({void (* ___activate_remove) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_remove; }), (data))
-#define mn_mail_icon_connect_data__activate_remove(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_remove",(GCallback) __extension__ ({void (* ___activate_remove) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_remove; }), (data), (destroy_data), (GConnectFlags)(flags))
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define mn_mail_icon_connect__activate(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_mail_reader(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_mail_reader",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_mail_reader(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_mail_reader",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_mail_reader(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_mail_reader",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_open_latest_message(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_open_latest_message",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_open_latest_message(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_open_latest_message",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_open_latest_message(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_open_latest_message",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_consider_new_mail_as_read(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_consider_new_mail_as_read",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_consider_new_mail_as_read(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_consider_new_mail_as_read",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_consider_new_mail_as_read(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_consider_new_mail_as_read",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_update(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_update",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_update(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_update",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_update(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_update",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_properties(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_properties",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_properties(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_properties",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_properties(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_properties",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_help(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_help",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_help(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_help",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_help(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_help",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_about(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_about",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_about(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_about",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_about(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_about",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mail_icon_connect__activate_remove(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_remove",(GCallback)(func),(data))
-#define mn_mail_icon_connect_after__activate_remove(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_remove",(GCallback)(func),(data))
-#define mn_mail_icon_connect_data__activate_remove(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_remove",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailbox-private.h b/build/src/mn-mailbox-private.h
@@ -1,79 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAILBOX_PRIVATE_H__
-#define __MN_MAILBOX_PRIVATE_H__
-
-#include "mn-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 34 "src/mn-mailbox.gob"
-
-#include "mn-xml.h"
-
-typedef enum
-{
- /* load from mailboxes.xml */
- MN_MAILBOX_PARAM_LOAD = MN_XML_PARAM_IMPORT,
-
- /* save to mailboxes.xml */
- MN_MAILBOX_PARAM_SAVE = MN_XML_PARAM_EXPORT,
-
- /* load from and save to mailboxes.xml */
- MN_MAILBOX_PARAM_LOAD_SAVE = MN_MAILBOX_PARAM_LOAD | MN_MAILBOX_PARAM_SAVE,
-
- /* ignore the case of a string property when checking if it has the default value */
- MN_MAILBOX_PARAM_IGNORE_CASE = MN_XML_PARAM_IGNORE_CASE,
-
- /* require a string property to be non-empty */
- MN_MAILBOX_PARAM_REQUIRED = 1 << (MN_XML_PARAM_USER_SHIFT + 0),
-} MNMailboxParamFlags;
-
-#line 36 "mn-mailbox-private.h"
-struct _MNMailboxPrivate {
-#line 133 "src/mn-mailbox.gob"
- gboolean _active;
-#line 215 "src/mn-mailbox.gob"
- unsigned int check_timeout_id;
-#line 224 "src/mn-mailbox.gob"
- gboolean poll;
-#line 271 "src/mn-mailbox.gob"
- gboolean all_messages_set;
-#line 274 "src/mn-mailbox.gob"
- GHashTable * all_messages;
-#line 277 "src/mn-mailbox.gob"
- GHashTable * all_messages_by_mid;
-#line 1126 "src/mn-mailbox.gob"
- gboolean checking_enabled;
-#line 52 "mn-mailbox-private.h"
-};
-#line 291 "src/mn-mailbox.gob"
-void mn_mailbox_set_messages (MNMailbox * self, GSList * messages);
-#line 56 "mn-mailbox-private.h"
-#line 509 "src/mn-mailbox.gob"
-void mn_mailbox_set_error (MNMailbox * self, const char * format, ...)
-G_GNUC_PRINTF(2, 3);
-#line 60 "mn-mailbox-private.h"
-#line 1128 "src/mn-mailbox.gob"
-void mn_mailbox_enable_checking (MNMailbox * self);
-#line 63 "mn-mailbox-private.h"
-#line 1138 "src/mn-mailbox.gob"
-void mn_mailbox_notice (MNMailbox * self, const char * format, ...)
-G_GNUC_PRINTF(2, 3);
-#line 67 "mn-mailbox-private.h"
-#line 1156 "src/mn-mailbox.gob"
-void mn_mailbox_warning (MNMailbox * self, const char * format, ...)
-G_GNUC_PRINTF(2, 3);
-#line 71 "mn-mailbox-private.h"
-#line 1174 "src/mn-mailbox.gob"
-MNMessage * mn_mailbox_get_message_from_mid (MNMailbox * self, const char * mid);
-#line 74 "mn-mailbox-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailbox-properties-dialog-private.h b/build/src/mn-mailbox-properties-dialog-private.h
@@ -1,84 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE_H__
-#define __MN_MAILBOX_PROPERTIES_DIALOG_PRIVATE_H__
-
-#include "mn-mailbox-properties-dialog.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 25 "src/mn-mailbox-properties-dialog.gob"
-
-#include "mn-mailbox-properties.h"
-
-#line 18 "mn-mailbox-properties-dialog-private.h"
-struct _MNMailboxPropertiesDialogPrivate {
-#line 80 "src/mn-mailbox-properties-dialog.gob"
- GtkWindow * dialog_parent;
-#line 83 "src/mn-mailbox-properties-dialog.gob"
- MNMailbox * mailbox;
-#line 116 "src/mn-mailbox-properties-dialog.gob"
- gboolean apply_used;
-#line 119 "src/mn-mailbox-properties-dialog.gob"
- MNMailboxConfiguration * orig_mailbox_configuration;
-#line 123 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * type_label;
-#line 124 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * type_combo;
-#line 125 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * name_default_radio;
-#line 126 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * name_default_label;
-#line 127 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * name_other_radio;
-#line 128 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * name_entry;
-#line 129 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * delay_vbox;
-#line 130 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * delay_default_radio;
-#line 131 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * delay_default_label;
-#line 132 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * delay_other_radio;
-#line 133 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * delay_scale;
-#line 135 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * apply_button;
-#line 136 "src/mn-mailbox-properties-dialog.gob"
- GtkWidget * accept_button;
-#line 138 "src/mn-mailbox-properties-dialog.gob"
- GtkListStore * store;
-#line 140 "src/mn-mailbox-properties-dialog.gob"
- MNMailboxProperties * active_properties;
-#line 142 "src/mn-mailbox-properties-dialog.gob"
- GtkSizeGroup * details_size_group;
-#line 60 "mn-mailbox-properties-dialog-private.h"
-};
-#line 626 "src/mn-mailbox-properties-dialog.gob"
-void mn_mailbox_properties_dialog_set_help_section (GtkWidget * page, const char * section);
-#line 64 "mn-mailbox-properties-dialog-private.h"
-#line 643 "src/mn-mailbox-properties-dialog.gob"
-void mn_mailbox_properties_dialog_type_changed_h (MNMailboxPropertiesDialog * self, GtkComboBox * combobox);
-#line 67 "mn-mailbox-properties-dialog-private.h"
-#line 666 "src/mn-mailbox-properties-dialog.gob"
-void mn_mailbox_properties_dialog_name_toggled_h (MNMailboxPropertiesDialog * self, GtkToggleButton * button);
-#line 70 "mn-mailbox-properties-dialog-private.h"
-#line 672 "src/mn-mailbox-properties-dialog.gob"
-void mn_mailbox_properties_dialog_delay_toggled_h (MNMailboxPropertiesDialog * self, GtkToggleButton * button);
-#line 73 "mn-mailbox-properties-dialog-private.h"
-#line 678 "src/mn-mailbox-properties-dialog.gob"
-char * mn_mailbox_properties_dialog_delay_format_value_h (MNMailboxPropertiesDialog * self, double arg, GtkScale * scale);
-#line 76 "mn-mailbox-properties-dialog-private.h"
-#line 684 "src/mn-mailbox-properties-dialog.gob"
-void mn_mailbox_properties_dialog_entry_activate_h (MNMailboxPropertiesDialog * self, GtkEntry * entry);
-#line 79 "mn-mailbox-properties-dialog-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailbox-properties-dialog.c b/build/src/mn-mailbox-properties-dialog.c
@@ -1,1330 +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-mailbox-properties-dialog.h"
-
-#include "mn-mailbox-properties-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 29 "src/mn-mailbox-properties-dialog.gob"
-
-#include <glib/gi18n.h>
-#include "mn-autodetect-mailbox-properties.h"
-#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
-#include "mn-system-vfs-mailbox-properties.h"
-#endif
-#if WITH_POP3
-#include "mn-pop3-mailbox-properties.h"
-#endif
-#if WITH_IMAP
-#include "mn-imap-mailbox-properties.h"
-#endif
-#if WITH_GMAIL
-#include "mn-gmail-mailbox-properties.h"
-#endif
-#if WITH_YAHOO
-#include "mn-yahoo-mailbox-properties.h"
-#endif
-#if WITH_HOTMAIL
-#include "mn-hotmail-mailbox-properties.h"
-#endif
-#if WITH_EVOLUTION
-#include "mn-evolution-mailbox-properties.h"
-#endif
-#include "mn-util.h"
-#include "mn-mailboxes.h"
-#include "mn-shell.h"
-#include "mn-non-linear-range.h"
-
-#define HELP_SECTION "mn-mailbox-properties-help-section"
-
-enum {
- COLUMN_PROPERTIES,
- COLUMN_STOCK_ID,
- COLUMN_LABEL,
- N_COLUMNS
-};
-
-static GType selected_type = 0;
-
-static const MNNonLinearRangeBlock delay_blocks[] = {
- { MN_SECS(10), MN_SECS(60), MN_SECS(10) },
- { MN_MINS(2), MN_MINS(10), MN_MINS(1) },
- { MN_MINS(15), MN_MINS(60), MN_MINS(5) },
- { MN_HOURS(2), MN_HOURS(24), MN_HOURS(1) }
-};
-
-#line 74 "mn-mailbox-properties-dialog.c"
-/* self casting macros */
-#define SELF(x) MN_MAILBOX_PROPERTIES_DIALOG(x)
-#define SELF_CONST(x) MN_MAILBOX_PROPERTIES_DIALOG_CONST(x)
-#define IS_SELF(x) MN_IS_MAILBOX_PROPERTIES_DIALOG(x)
-#define TYPE_SELF MN_TYPE_MAILBOX_PROPERTIES_DIALOG
-#define SELF_CLASS(x) MN_MAILBOX_PROPERTIES_DIALOG_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAILBOX_PROPERTIES_DIALOG_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMailboxPropertiesDialog Self;
-typedef MNMailboxPropertiesDialogClass 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-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_init (MNMailboxPropertiesDialog * o) G_GNUC_UNUSED;
-#line 93 "mn-mailbox-properties-dialog.c"
-#line 0 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_class_init (MNMailboxPropertiesDialogClass * c) G_GNUC_UNUSED;
-#line 96 "mn-mailbox-properties-dialog.c"
-#line 144 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_constructor (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 99 "mn-mailbox-properties-dialog.c"
-#line 253 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_setup_type_combo (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 102 "mn-mailbox-properties-dialog.c"
-#line 305 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED;
-#line 105 "mn-mailbox-properties-dialog.c"
-#line 330 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_add_type (MNMailboxPropertiesDialog * self, GType type) G_GNUC_UNUSED;
-#line 108 "mn-mailbox-properties-dialog.c"
-#line 361 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_set_active_properties (MNMailboxPropertiesDialog * self, MNMailboxProperties * properties) G_GNUC_UNUSED;
-#line 111 "mn-mailbox-properties-dialog.c"
-#line 383 "src/mn-mailbox-properties-dialog.gob"
-static MNMailboxProperties * mn_mailbox_properties_dialog_get_active_properties (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 114 "mn-mailbox-properties-dialog.c"
-#line 395 "src/mn-mailbox-properties-dialog.gob"
-static MNMailboxProperties * mn_mailbox_properties_dialog_get_properties_by_type (MNMailboxPropertiesDialog * self, const char * type) G_GNUC_UNUSED;
-#line 117 "mn-mailbox-properties-dialog.c"
-#line 419 "src/mn-mailbox-properties-dialog.gob"
-static MNMailboxProperties * mn_mailbox_properties_dialog_get_properties_by_g_type (MNMailboxPropertiesDialog * self, GType type) G_GNUC_UNUSED;
-#line 120 "mn-mailbox-properties-dialog.c"
-#line 496 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_update_complete (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 123 "mn-mailbox-properties-dialog.c"
-#line 515 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_update_name_sensitivity (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 126 "mn-mailbox-properties-dialog.c"
-#line 521 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_update_delay_sensitivity (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 129 "mn-mailbox-properties-dialog.c"
-#line 527 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_update_delay_visibility (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 132 "mn-mailbox-properties-dialog.c"
-#line 560 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_update_default_name (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 135 "mn-mailbox-properties-dialog.c"
-#line 595 "src/mn-mailbox-properties-dialog.gob"
-static void mn_mailbox_properties_dialog_update_default_check_delay (MNMailboxPropertiesDialog * self) G_GNUC_UNUSED;
-#line 138 "mn-mailbox-properties-dialog.c"
-
-enum {
- PROP_0,
- PROP_DIALOG_PARENT,
- PROP_MAILBOX
-};
-
-/* pointer to the class of our parent */
-static MNDialogClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_get_mailbox mn_mailbox_properties_dialog_get_mailbox
-#define self_set_mailbox mn_mailbox_properties_dialog_set_mailbox
-#define self_setup_type_combo mn_mailbox_properties_dialog_setup_type_combo
-#define self_response_h mn_mailbox_properties_dialog_response_h
-#define self_add_type mn_mailbox_properties_dialog_add_type
-#define self_set_active_properties mn_mailbox_properties_dialog_set_active_properties
-#define self_get_active_properties mn_mailbox_properties_dialog_get_active_properties
-#define self_get_properties_by_type mn_mailbox_properties_dialog_get_properties_by_type
-#define self_get_properties_by_g_type mn_mailbox_properties_dialog_get_properties_by_g_type
-#define self_get_current_mailbox mn_mailbox_properties_dialog_get_current_mailbox
-#define self_apply mn_mailbox_properties_dialog_apply
-#define self_cancel mn_mailbox_properties_dialog_cancel
-#define self_update_complete mn_mailbox_properties_dialog_update_complete
-#define self_update_name_sensitivity mn_mailbox_properties_dialog_update_name_sensitivity
-#define self_update_delay_sensitivity mn_mailbox_properties_dialog_update_delay_sensitivity
-#define self_update_delay_visibility mn_mailbox_properties_dialog_update_delay_visibility
-#define self_update_default_name mn_mailbox_properties_dialog_update_default_name
-#define self_update_default_check_delay mn_mailbox_properties_dialog_update_default_check_delay
-#define self_set_help_section mn_mailbox_properties_dialog_set_help_section
-#define self_new mn_mailbox_properties_dialog_new
-#define self_type_changed_h mn_mailbox_properties_dialog_type_changed_h
-#define self_name_toggled_h mn_mailbox_properties_dialog_name_toggled_h
-#define self_delay_toggled_h mn_mailbox_properties_dialog_delay_toggled_h
-#define self_delay_format_value_h mn_mailbox_properties_dialog_delay_format_value_h
-#define self_entry_activate_h mn_mailbox_properties_dialog_entry_activate_h
-GType
-mn_mailbox_properties_dialog_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMailboxPropertiesDialogClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mailbox_properties_dialog_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMailboxPropertiesDialog),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mailbox_properties_dialog_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_DIALOG, "MNMailboxPropertiesDialog", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMailboxPropertiesDialog *)g_object_new(mn_mailbox_properties_dialog_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMailboxPropertiesDialog * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMailboxPropertiesDialog *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMailboxPropertiesDialog *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMailboxPropertiesDialog *)g_object_new_valist (mn_mailbox_properties_dialog_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:Mailbox:Properties:Dialog::constructor"
- GObject *obj_self;
- MNMailboxPropertiesDialog *self;
- obj_self = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
- self = MN_MAILBOX_PROPERTIES_DIALOG (obj_self);
-#line 144 "src/mn-mailbox-properties-dialog.gob"
- mn_mailbox_properties_dialog_constructor (self);
-#line 228 "mn-mailbox-properties-dialog.c"
- return obj_self;
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::dispose"
- MNMailboxPropertiesDialog *self G_GNUC_UNUSED = MN_MAILBOX_PROPERTIES_DIALOG (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 83 "src/mn-mailbox-properties-dialog.gob"
- if(self->_priv->mailbox) { g_object_unref ((gpointer) self->_priv->mailbox); self->_priv->mailbox = NULL; }
-#line 243 "mn-mailbox-properties-dialog.c"
-#line 138 "src/mn-mailbox-properties-dialog.gob"
- if(self->_priv->store) { g_object_unref ((gpointer) self->_priv->store); self->_priv->store = NULL; }
-#line 246 "mn-mailbox-properties-dialog.c"
-#line 140 "src/mn-mailbox-properties-dialog.gob"
- if(self->_priv->active_properties) { g_object_unref ((gpointer) self->_priv->active_properties); self->_priv->active_properties = NULL; }
-#line 249 "mn-mailbox-properties-dialog.c"
-#line 142 "src/mn-mailbox-properties-dialog.gob"
- if(self->_priv->details_size_group) { g_object_unref ((gpointer) self->_priv->details_size_group); self->_priv->details_size_group = NULL; }
-#line 252 "mn-mailbox-properties-dialog.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::finalize"
- MNMailboxPropertiesDialog *self G_GNUC_UNUSED = MN_MAILBOX_PROPERTIES_DIALOG (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 119 "src/mn-mailbox-properties-dialog.gob"
- if(self->_priv->orig_mailbox_configuration) { mn_mailbox_configuration_free ((gpointer) self->_priv->orig_mailbox_configuration); self->_priv->orig_mailbox_configuration = NULL; }
-#line 267 "mn-mailbox-properties-dialog.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_mailbox_properties_dialog_init (MNMailboxPropertiesDialog * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_MAILBOX_PROPERTIES_DIALOG,MNMailboxPropertiesDialogPrivate);
-#line 142 "src/mn-mailbox-properties-dialog.gob"
- o->_priv->details_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
-#line 278 "mn-mailbox-properties-dialog.c"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_mailbox_properties_dialog_class_init (MNMailboxPropertiesDialogClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNMailboxPropertiesDialogPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_DIALOG);
-
- g_object_class->constructor = ___constructor;
- 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_pointer
- ("dialog_parent" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_DIALOG_PARENT,
- param_spec);
- param_spec = g_param_spec_object
- ("mailbox" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- MN_TYPE_MAILBOX /* object_type */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (g_object_class,
- PROP_MAILBOX,
- 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:Mailbox:Properties:Dialog::set_property"
-{
- MNMailboxPropertiesDialog *self G_GNUC_UNUSED;
-
- self = MN_MAILBOX_PROPERTIES_DIALOG (object);
-
- switch (property_id) {
- case PROP_DIALOG_PARENT:
- {
-#line 81 "src/mn-mailbox-properties-dialog.gob"
-self->_priv->dialog_parent = g_value_get_pointer (VAL);
-#line 336 "mn-mailbox-properties-dialog.c"
- }
- break;
- case PROP_MAILBOX:
- {
-#line 89 "src/mn-mailbox-properties-dialog.gob"
-
- GObject *obj;
-
- if (selfp->mailbox)
- {
- g_object_unref(selfp->mailbox);
- selfp->mailbox = NULL;
- }
-
- obj = g_value_dup_object(VAL);
- if (obj)
- {
- char *title;
-
- selfp->mailbox = MN_MAILBOX(obj);
-
- /* translators: header capitalization */
- title = g_strdup_printf(_("%s Properties"), selfp->mailbox->runtime_name);
- gtk_window_set_title(GTK_WINDOW(self), title);
- g_free(title);
- }
-
-#line 364 "mn-mailbox-properties-dialog.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:Mailbox:Properties:Dialog::get_property"
-{
- MNMailboxPropertiesDialog *self G_GNUC_UNUSED;
-
- self = MN_MAILBOX_PROPERTIES_DIALOG (object);
-
- switch (property_id) {
- case PROP_DIALOG_PARENT:
- {
-#line 81 "src/mn-mailbox-properties-dialog.gob"
-g_value_set_pointer (VAL, self->_priv->dialog_parent);
-#line 395 "mn-mailbox-properties-dialog.c"
- }
- break;
- case PROP_MAILBOX:
- {
-#line 112 "src/mn-mailbox-properties-dialog.gob"
-
- g_value_set_object(VAL, selfp->mailbox);
-
-#line 404 "mn-mailbox-properties-dialog.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 112 "src/mn-mailbox-properties-dialog.gob"
-MNMailbox *
-mn_mailbox_properties_dialog_get_mailbox (MNMailboxPropertiesDialog * self)
-{
-#line 425 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_mailbox"
-{
-#line 84 "src/mn-mailbox-properties-dialog.gob"
- MNMailbox* val; g_object_get (G_OBJECT (self), "mailbox", &val, NULL); return val;
-}}
-#line 431 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 89 "src/mn-mailbox-properties-dialog.gob"
-void
-mn_mailbox_properties_dialog_set_mailbox (MNMailboxPropertiesDialog * self, MNMailbox * val)
-{
-#line 438 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::set_mailbox"
-{
-#line 84 "src/mn-mailbox-properties-dialog.gob"
- g_object_set (G_OBJECT (self), "mailbox", val, NULL);
-}}
-#line 444 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 144 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_constructor (MNMailboxPropertiesDialog * self G_GNUC_UNUSED)
-{
-#line 451 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::constructor"
-{
-#line 145 "src/mn-mailbox-properties-dialog.gob"
-
- GtkWidget *page;
- MNMailboxProperties *properties;
-
- mn_container_create_interface(GTK_CONTAINER(self),
- PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.glade",
- "notebook",
- "mn_mailbox_properties_dialog_",
- "notebook", &self->notebook,
- "general_vbox", &self->general_vbox,
- "type_label", &selfp->type_label,
- "type_combo", &selfp->type_combo,
- "name_default_radio", &selfp->name_default_radio,
- "name_default_label", &selfp->name_default_label,
- "name_other_radio", &selfp->name_other_radio,
- "name_entry", &selfp->name_entry,
- "delay_vbox", &selfp->delay_vbox,
- "delay_default_radio", &selfp->delay_default_radio,
- "delay_default_label", &selfp->delay_default_label,
- "delay_other_radio", &selfp->delay_other_radio,
- "delay_scale", &selfp->delay_scale,
- NULL);
-
- gtk_window_set_resizable(GTK_WINDOW(self), FALSE);
-
- if (selfp->dialog_parent)
- gtk_window_set_transient_for(GTK_WINDOW(self), selfp->dialog_parent);
-
- page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(self->notebook), 0);
- self_set_help_section(page, "mailbox-properties-general");
-
- page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(self->notebook), 1);
- self_set_help_section(page, "mailbox-properties-details");
-
- self_setup_type_combo(self);
-
- mn_non_linear_range_setup_static(GTK_RANGE(selfp->delay_scale), delay_blocks, G_N_ELEMENTS(delay_blocks));
-
- /* set a good general default value */
- mn_non_linear_range_set_value(GTK_RANGE(selfp->delay_scale), MN_MINS(5));
-
- gtk_size_group_add_widget(selfp->details_size_group, selfp->name_default_radio);
- gtk_size_group_add_widget(selfp->details_size_group, selfp->name_other_radio);
-
- /* setup the dialog depending on the mode (edit or add) */
- gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_HELP, GTK_RESPONSE_HELP);
- if (selfp->mailbox)
- {
- selfp->apply_button = gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_APPLY, GTK_RESPONSE_APPLY);
- gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
- selfp->accept_button = gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_OK, GTK_RESPONSE_OK);
-
- properties = self_get_properties_by_type(self, MN_MAILBOX_GET_CLASS(selfp->mailbox)->type);
- }
- else
- {
- gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
- selfp->accept_button = gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT);
-
- if (! selected_type)
- selected_type = MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES;
-
- properties = self_get_properties_by_g_type(self, selected_type);
-
- /* translators: header capitalization */
- gtk_window_set_title(GTK_WINDOW(self), _("Add a Mailbox"));
- }
-
- self_set_active_properties(self, properties);
-
- if (selfp->mailbox)
- {
- selfp->orig_mailbox_configuration = mn_mailbox_get_configuration(selfp->mailbox);
-
- mn_mailbox_properties_set_mailbox(properties, selfp->mailbox);
-
- if (selfp->mailbox->name)
- {
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->name_other_radio), TRUE);
- gtk_entry_set_text(GTK_ENTRY(selfp->name_entry), selfp->mailbox->name);
- }
-
- if (selfp->mailbox->check_delay != -1)
- {
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->delay_other_radio), TRUE);
- mn_non_linear_range_set_value(GTK_RANGE(selfp->delay_scale), selfp->mailbox->check_delay);
- }
- }
-
- g_object_unref(properties);
-
- gtk_widget_grab_default(selfp->accept_button);
-
- /*
- * HIG chapter 3:
- * "When opening a dialog, provide initial keyboard focus to the
- * component that you expect users to operate first. This focus is
- * especially important for users who must use a keyboard to
- * navigate your application."
- */
- gtk_widget_grab_focus(selfp->type_combo);
-
- self_update_name_sensitivity(self);
- self_update_delay_sensitivity(self);
-
- g_signal_connect(self, "response", G_CALLBACK(self_response_h), NULL);
- }}
-#line 562 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 253 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_setup_type_combo (MNMailboxPropertiesDialog * self)
-{
-#line 569 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::setup_type_combo"
-#line 253 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 253 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 575 "mn-mailbox-properties-dialog.c"
-{
-#line 255 "src/mn-mailbox-properties-dialog.gob"
-
- GtkCellRenderer *renderer;
-
- selfp->store = gtk_list_store_new(N_COLUMNS,
- MN_TYPE_MAILBOX_PROPERTIES,
- G_TYPE_STRING,
- G_TYPE_STRING);
-
- self_add_type(self, MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES);
-#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
- self_add_type(self, MN_TYPE_SYSTEM_VFS_MAILBOX_PROPERTIES);
-#endif
-#if WITH_POP3
- self_add_type(self, MN_TYPE_POP3_MAILBOX_PROPERTIES);
-#endif
-#if WITH_IMAP
- self_add_type(self, MN_TYPE_IMAP_MAILBOX_PROPERTIES);
-#endif
-#if WITH_GMAIL
- self_add_type(self, MN_TYPE_GMAIL_MAILBOX_PROPERTIES);
-#endif
-#if WITH_YAHOO
- self_add_type(self, MN_TYPE_YAHOO_MAILBOX_PROPERTIES);
-#endif
-#if WITH_HOTMAIL
- self_add_type(self, MN_TYPE_HOTMAIL_MAILBOX_PROPERTIES);
-#endif
-#if WITH_EVOLUTION
- self_add_type(self, MN_TYPE_EVOLUTION_MAILBOX_PROPERTIES);
-#endif
-
- gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(selfp->store), COLUMN_LABEL, GTK_SORT_ASCENDING);
-
- renderer = gtk_cell_renderer_pixbuf_new();
- g_object_set(renderer, "stock-size", GTK_ICON_SIZE_MENU, NULL);
- gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(selfp->type_combo), renderer, FALSE);
- gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(selfp->type_combo), renderer,
- "stock-id", COLUMN_STOCK_ID,
- NULL);
-
- renderer = gtk_cell_renderer_text_new();
- g_object_set(renderer, "xpad", 6, NULL);
- gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(selfp->type_combo), renderer, TRUE);
- gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(selfp->type_combo), renderer,
- "text", COLUMN_LABEL,
- NULL);
-
- gtk_combo_box_set_model(GTK_COMBO_BOX(selfp->type_combo), GTK_TREE_MODEL(selfp->store));
- }}
-#line 627 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 305 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_response_h (GtkDialog * dialog, int response, gpointer user_data)
-{
-#line 634 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::response_h"
-{
-#line 307 "src/mn-mailbox-properties-dialog.gob"
-
- Self *self = SELF(dialog);
-
- if (response == GTK_RESPONSE_HELP)
- {
- int page_number;
- GtkWidget *page;
- const char *section;
-
- page_number = gtk_notebook_get_current_page(GTK_NOTEBOOK(self->notebook));
-
- page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(self->notebook), page_number);
- g_assert(page != NULL);
-
- section = g_object_get_data(G_OBJECT(page), HELP_SECTION);
- g_assert(section != NULL);
-
- mn_show_help(GTK_WINDOW(self), section);
- }
-
- /* other responses are handled by the client */
- }}
-#line 660 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 330 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_add_type (MNMailboxPropertiesDialog * self, GType type)
-{
-#line 667 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::add_type"
-#line 330 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 330 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 330 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (type != 0);
-#line 675 "mn-mailbox-properties-dialog.c"
-{
-#line 332 "src/mn-mailbox-properties-dialog.gob"
-
- MNMailboxProperties *properties;
- MNMailboxPropertiesClass *p_class;
- GtkTreeIter iter;
- GSList *l;
-
- properties = g_object_new(type, MN_MAILBOX_PROPERTIES_PROP_DIALOG(GTK_WIDGET(self)), NULL);
-
- p_class = MN_MAILBOX_PROPERTIES_GET_CLASS(properties);
-
- gtk_list_store_append(selfp->store, &iter);
- gtk_list_store_set(selfp->store, &iter,
- COLUMN_PROPERTIES, properties,
- COLUMN_STOCK_ID, p_class->stock_id,
- COLUMN_LABEL, p_class->combo_label,
- -1);
-
- g_object_connect(properties,
- "swapped-signal::notify::complete", self_update_complete, self,
- "swapped-signal::notify::default-name", self_update_default_name, self,
- "swapped-signal::notify::default-check-delay", self_update_default_check_delay, self,
- NULL);
-
- MN_LIST_FOREACH(l, properties->entries)
- g_signal_connect_swapped(l->data, "activate", G_CALLBACK(self_entry_activate_h), self);
-
- g_object_unref(properties); /* now it belongs to the store */
- }}
-#line 706 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 361 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_set_active_properties (MNMailboxPropertiesDialog * self, MNMailboxProperties * properties)
-{
-#line 713 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::set_active_properties"
-#line 361 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 361 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 361 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (properties != NULL);
-#line 361 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (properties));
-#line 723 "mn-mailbox-properties-dialog.c"
-{
-#line 364 "src/mn-mailbox-properties-dialog.gob"
-
- gboolean valid;
- GtkTreeIter iter;
-
- MN_TREE_MODEL_FOREACH(valid, &iter, GTK_TREE_MODEL(selfp->store))
- {
- MNMailboxProperties *these_properties;
-
- gtk_tree_model_get(GTK_TREE_MODEL(selfp->store), &iter, COLUMN_PROPERTIES, &these_properties, -1);
- g_object_unref(these_properties);
-
- if (these_properties == properties)
- {
- gtk_combo_box_set_active_iter(GTK_COMBO_BOX(selfp->type_combo), &iter);
- break;
- }
- }
- }}
-#line 744 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 383 "src/mn-mailbox-properties-dialog.gob"
-static MNMailboxProperties *
-mn_mailbox_properties_dialog_get_active_properties (MNMailboxPropertiesDialog * self)
-{
-#line 751 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_active_properties"
-#line 383 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (self != NULL, (MNMailboxProperties * )0);
-#line 383 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (MNMailboxProperties * )0);
-#line 757 "mn-mailbox-properties-dialog.c"
-{
-#line 385 "src/mn-mailbox-properties-dialog.gob"
-
- GtkTreeIter iter;
- MNMailboxProperties *properties = NULL;
-
- if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(selfp->type_combo), &iter))
- gtk_tree_model_get(GTK_TREE_MODEL(selfp->store), &iter, COLUMN_PROPERTIES, &properties, -1);
-
- return properties;
- }}
-#line 769 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 395 "src/mn-mailbox-properties-dialog.gob"
-static MNMailboxProperties *
-mn_mailbox_properties_dialog_get_properties_by_type (MNMailboxPropertiesDialog * self, const char * type)
-{
-#line 776 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_properties_by_type"
-#line 395 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (self != NULL, (MNMailboxProperties * )0);
-#line 395 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (MNMailboxProperties * )0);
-#line 395 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (type != NULL, (MNMailboxProperties * )0);
-#line 784 "mn-mailbox-properties-dialog.c"
-{
-#line 397 "src/mn-mailbox-properties-dialog.gob"
-
- gboolean valid;
- GtkTreeIter iter;
-
- MN_TREE_MODEL_FOREACH(valid, &iter, GTK_TREE_MODEL(selfp->store))
- {
- MNMailboxProperties *properties;
- MNMailboxPropertiesClass *class;
-
- gtk_tree_model_get(GTK_TREE_MODEL(selfp->store), &iter, COLUMN_PROPERTIES, &properties, -1);
-
- class = MN_MAILBOX_PROPERTIES_GET_CLASS(properties);
-
- if (class->type && ! strcmp(class->type, type))
- return properties;
-
- g_object_unref(properties);
- }
-
- return NULL;
- }}
-#line 808 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 419 "src/mn-mailbox-properties-dialog.gob"
-static MNMailboxProperties *
-mn_mailbox_properties_dialog_get_properties_by_g_type (MNMailboxPropertiesDialog * self, GType type)
-{
-#line 815 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_properties_by_g_type"
-#line 419 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (self != NULL, (MNMailboxProperties * )0);
-#line 419 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (MNMailboxProperties * )0);
-#line 419 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (type != 0, (MNMailboxProperties * )0);
-#line 823 "mn-mailbox-properties-dialog.c"
-{
-#line 421 "src/mn-mailbox-properties-dialog.gob"
-
- gboolean valid;
- GtkTreeIter iter;
-
- MN_TREE_MODEL_FOREACH(valid, &iter, GTK_TREE_MODEL(selfp->store))
- {
- MNMailboxProperties *properties;
-
- gtk_tree_model_get(GTK_TREE_MODEL(selfp->store), &iter, COLUMN_PROPERTIES, &properties, -1);
-
- if (G_TYPE_CHECK_INSTANCE_TYPE(properties, type))
- return properties;
-
- g_object_unref(properties);
- }
-
- return NULL;
- }}
-#line 844 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 440 "src/mn-mailbox-properties-dialog.gob"
-MNMailbox *
-mn_mailbox_properties_dialog_get_current_mailbox (MNMailboxPropertiesDialog * self)
-{
-#line 851 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_current_mailbox"
-#line 440 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (self != NULL, (MNMailbox * )0);
-#line 440 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (MNMailbox * )0);
-#line 857 "mn-mailbox-properties-dialog.c"
-{
-#line 442 "src/mn-mailbox-properties-dialog.gob"
-
- MNMailboxProperties *properties;
- MNMailbox *mailbox;
-
- properties = self_get_active_properties(self);
- mailbox = mn_mailbox_properties_get_mailbox(properties);
- g_object_unref(properties);
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->name_other_radio)))
- g_object_set(G_OBJECT(mailbox), MN_MAILBOX_PROP_NAME((char *) gtk_entry_get_text(GTK_ENTRY(selfp->name_entry))), NULL);
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->delay_other_radio)))
- g_object_set(G_OBJECT(mailbox), MN_MAILBOX_PROP_CHECK_DELAY(mn_non_linear_range_get_value(GTK_RANGE(selfp->delay_scale))), NULL);
-
- return mailbox;
- }}
-#line 876 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 459 "src/mn-mailbox-properties-dialog.gob"
-void
-mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog * self)
-{
-#line 883 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::apply"
-#line 459 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 459 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 889 "mn-mailbox-properties-dialog.c"
-{
-#line 461 "src/mn-mailbox-properties-dialog.gob"
-
- MNMailbox *new_mailbox;
-
- selfp->apply_used = TRUE;
-
- new_mailbox = self_get_current_mailbox(self);
- g_assert(MN_IS_MAILBOX(new_mailbox));
-
- mn_mailbox_seal(new_mailbox);
-
- mn_mailboxes_queue_remove(mn_shell->mailboxes, selfp->mailbox);
- mn_mailboxes_queue_add(mn_shell->mailboxes, new_mailbox);
-
- self_set_mailbox(self, new_mailbox);
- g_object_unref(new_mailbox);
- }}
-#line 908 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 478 "src/mn-mailbox-properties-dialog.gob"
-void
-mn_mailbox_properties_dialog_cancel (MNMailboxPropertiesDialog * self)
-{
-#line 915 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::cancel"
-#line 478 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 478 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 921 "mn-mailbox-properties-dialog.c"
-{
-#line 480 "src/mn-mailbox-properties-dialog.gob"
-
- MNMailbox *orig_mailbox;
-
- if (! selfp->apply_used)
- return;
-
- orig_mailbox = mn_mailbox_new_from_configuration(selfp->orig_mailbox_configuration);
-
- mn_mailbox_seal(orig_mailbox);
-
- mn_mailboxes_queue_remove(mn_shell->mailboxes, selfp->mailbox);
- mn_mailboxes_queue_add(mn_shell->mailboxes, orig_mailbox);
-
- g_object_unref(orig_mailbox);
- }}
-#line 939 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 496 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_update_complete (MNMailboxPropertiesDialog * self)
-{
-#line 946 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_complete"
-#line 496 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 496 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 952 "mn-mailbox-properties-dialog.c"
-{
-#line 498 "src/mn-mailbox-properties-dialog.gob"
-
- MNMailboxProperties *properties;
-
- properties = self_get_active_properties(self);
- if (properties)
- {
- gboolean complete;
-
- g_object_get(G_OBJECT(properties), MN_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(&complete), NULL);
- g_object_unref(properties);
-
- if (selfp->apply_button)
- gtk_widget_set_sensitive(selfp->apply_button, complete);
- gtk_widget_set_sensitive(selfp->accept_button, complete);
- }
- }}
-#line 971 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 515 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_update_name_sensitivity (MNMailboxPropertiesDialog * self)
-{
-#line 978 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_name_sensitivity"
-#line 515 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 515 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 984 "mn-mailbox-properties-dialog.c"
-{
-#line 517 "src/mn-mailbox-properties-dialog.gob"
-
- gtk_widget_set_sensitive(selfp->name_entry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->name_other_radio)));
- }}
-#line 990 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 521 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_update_delay_sensitivity (MNMailboxPropertiesDialog * self)
-{
-#line 997 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_delay_sensitivity"
-#line 521 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 521 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1003 "mn-mailbox-properties-dialog.c"
-{
-#line 523 "src/mn-mailbox-properties-dialog.gob"
-
- gtk_widget_set_sensitive(selfp->delay_scale, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->delay_other_radio)));
- }}
-#line 1009 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 527 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_update_delay_visibility (MNMailboxPropertiesDialog * self)
-{
-#line 1016 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_delay_visibility"
-#line 527 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 527 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1022 "mn-mailbox-properties-dialog.c"
-{
-#line 529 "src/mn-mailbox-properties-dialog.gob"
-
- MNMailboxProperties *properties;
- gboolean visible = TRUE;
-
- properties = self_get_active_properties(self);
- if (properties)
- {
- visible = MN_MAILBOX_PROPERTIES_GET_CLASS(properties)->enable_check_delay;
- g_object_unref(properties);
- }
-
- if (visible)
- {
- if (! g_slist_find(gtk_size_group_get_widgets(selfp->details_size_group), selfp->delay_default_radio))
- gtk_size_group_add_widget(selfp->details_size_group, selfp->delay_default_radio);
- if (! g_slist_find(gtk_size_group_get_widgets(selfp->details_size_group), selfp->delay_other_radio))
- gtk_size_group_add_widget(selfp->details_size_group, selfp->delay_other_radio);
-
- gtk_widget_show(selfp->delay_vbox);
- }
- else
- {
- if (g_slist_find(gtk_size_group_get_widgets(selfp->details_size_group), selfp->delay_default_radio))
- gtk_size_group_remove_widget(selfp->details_size_group, selfp->delay_default_radio);
- if (g_slist_find(gtk_size_group_get_widgets(selfp->details_size_group), selfp->delay_other_radio))
- gtk_size_group_remove_widget(selfp->details_size_group, selfp->delay_other_radio);
-
- gtk_widget_hide(selfp->delay_vbox);
- }
- }}
-#line 1055 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 560 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_update_default_name (MNMailboxPropertiesDialog * self)
-{
-#line 1062 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_default_name"
-#line 560 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 560 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1068 "mn-mailbox-properties-dialog.c"
-{
-#line 562 "src/mn-mailbox-properties-dialog.gob"
-
- MNMailboxProperties *properties;
- char *name = NULL;
- const char *radio_label;
-
- properties = self_get_active_properties(self);
- if (properties)
- {
- gboolean complete;
-
- g_object_get(G_OBJECT(properties),
- MN_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(&complete),
- NULL);
-
- if (complete)
- g_object_get(G_OBJECT(properties),
- MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(&name),
- NULL);
-
- g_object_unref(properties);
- }
-
- if (name)
- radio_label = _("_Default:");
- else
- radio_label = _("_Default");
-
- gtk_button_set_label(GTK_BUTTON(selfp->name_default_radio), radio_label);
- gtk_label_set_text(GTK_LABEL(selfp->name_default_label), name);
-
- g_free(name);
- }}
-#line 1103 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 595 "src/mn-mailbox-properties-dialog.gob"
-static void
-mn_mailbox_properties_dialog_update_default_check_delay (MNMailboxPropertiesDialog * self)
-{
-#line 1110 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_default_check_delay"
-#line 595 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 595 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1116 "mn-mailbox-properties-dialog.c"
-{
-#line 597 "src/mn-mailbox-properties-dialog.gob"
-
- MNMailboxProperties *properties;
- int delay = -1;
- const char *radio_label;
- char *delay_str = NULL;
-
- properties = self_get_active_properties(self);
- if (properties)
- {
- g_object_get(G_OBJECT(properties),
- MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_CHECK_DELAY(&delay),
- NULL);
- g_object_unref(properties);
- }
-
- if (delay != -1)
- {
- radio_label = _("D_efault:");
- delay_str = mn_format_seconds(delay);
- }
- else
- radio_label = _("D_efault");
-
- gtk_button_set_label(GTK_BUTTON(selfp->delay_default_radio), radio_label);
- gtk_label_set_text(GTK_LABEL(selfp->delay_default_label), delay_str);
-
- g_free(delay_str);
- }}
-#line 1147 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 626 "src/mn-mailbox-properties-dialog.gob"
-void
-mn_mailbox_properties_dialog_set_help_section (GtkWidget * page, const char * section)
-{
-#line 1154 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::set_help_section"
-#line 626 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (page != NULL);
-#line 626 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (GTK_IS_WIDGET (page));
-#line 626 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (section != NULL);
-#line 1162 "mn-mailbox-properties-dialog.c"
-{
-#line 629 "src/mn-mailbox-properties-dialog.gob"
-
- g_object_set_data_full(G_OBJECT(page), HELP_SECTION, g_strdup(section), g_free);
- }}
-#line 1168 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 633 "src/mn-mailbox-properties-dialog.gob"
-GtkWidget *
-mn_mailbox_properties_dialog_new (GtkWindow * parent, MNMailbox * mailbox)
-{
-#line 1175 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::new"
-{
-#line 635 "src/mn-mailbox-properties-dialog.gob"
-
- return GTK_WIDGET(GET_NEW_VARG(MN_MAILBOX_PROPERTIES_DIALOG_PROP_DIALOG_PARENT(parent),
- MN_MAILBOX_PROPERTIES_DIALOG_PROP_MAILBOX(mailbox),
- NULL));
- }}
-#line 1184 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 643 "src/mn-mailbox-properties-dialog.gob"
-void
-mn_mailbox_properties_dialog_type_changed_h (MNMailboxPropertiesDialog * self, GtkComboBox * combobox)
-{
-#line 1191 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::type_changed_h"
-#line 643 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 643 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1197 "mn-mailbox-properties-dialog.c"
-{
-#line 645 "src/mn-mailbox-properties-dialog.gob"
-
- if (selfp->active_properties)
- {
- mn_mailbox_properties_deactivate(selfp->active_properties);
- gtk_size_group_remove_widget(selfp->active_properties->label_size_group, selfp->type_label);
- g_object_unref(selfp->active_properties);
- }
-
- selfp->active_properties = self_get_active_properties(self);
- mn_mailbox_properties_activate(selfp->active_properties);
- gtk_size_group_add_widget(selfp->active_properties->label_size_group, selfp->type_label);
-
- if (! selfp->mailbox) /* mode is add */
- selected_type = G_OBJECT_TYPE(selfp->active_properties);
-
- self_update_complete(self);
- self_update_delay_visibility(self);
- self_update_default_name(self);
- self_update_default_check_delay(self);
- }}
-#line 1220 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 666 "src/mn-mailbox-properties-dialog.gob"
-void
-mn_mailbox_properties_dialog_name_toggled_h (MNMailboxPropertiesDialog * self, GtkToggleButton * button)
-{
-#line 1227 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::name_toggled_h"
-#line 666 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 666 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1233 "mn-mailbox-properties-dialog.c"
-{
-#line 668 "src/mn-mailbox-properties-dialog.gob"
-
- self_update_name_sensitivity(self);
- }}
-#line 1239 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 672 "src/mn-mailbox-properties-dialog.gob"
-void
-mn_mailbox_properties_dialog_delay_toggled_h (MNMailboxPropertiesDialog * self, GtkToggleButton * button)
-{
-#line 1246 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::delay_toggled_h"
-#line 672 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 672 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1252 "mn-mailbox-properties-dialog.c"
-{
-#line 674 "src/mn-mailbox-properties-dialog.gob"
-
- self_update_delay_sensitivity(self);
- }}
-#line 1258 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 678 "src/mn-mailbox-properties-dialog.gob"
-char *
-mn_mailbox_properties_dialog_delay_format_value_h (MNMailboxPropertiesDialog * self, double arg, GtkScale * scale)
-{
-#line 1265 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::delay_format_value_h"
-#line 678 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 678 "src/mn-mailbox-properties-dialog.gob"
- g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (char * )0);
-#line 1271 "mn-mailbox-properties-dialog.c"
-{
-#line 680 "src/mn-mailbox-properties-dialog.gob"
-
- return mn_format_seconds(mn_non_linear_range_get_value(GTK_RANGE(scale)));
- }}
-#line 1277 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 684 "src/mn-mailbox-properties-dialog.gob"
-void
-mn_mailbox_properties_dialog_entry_activate_h (MNMailboxPropertiesDialog * self, GtkEntry * entry)
-{
-#line 1284 "mn-mailbox-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::entry_activate_h"
-#line 684 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 684 "src/mn-mailbox-properties-dialog.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1290 "mn-mailbox-properties-dialog.c"
-{
-#line 686 "src/mn-mailbox-properties-dialog.gob"
-
- if (GTK_WIDGET_IS_SENSITIVE(GTK_WINDOW(self)->default_widget))
- gtk_window_activate_default(GTK_WINDOW(self));
- else
- {
- MNMailboxProperties *properties;
- GtkWidget *next = NULL;
- GSList *elem;
-
- properties = self_get_active_properties(self);
- g_assert(properties != NULL);
-
- elem = g_slist_find(properties->entries, entry);
- g_assert(elem != NULL);
-
- do
- {
- elem = elem->next;
- if (! elem)
- elem = properties->entries;
-
- if (elem->data == entry)
- break;
-
- if (GTK_WIDGET_MAPPED(elem->data)
- && GTK_WIDGET_VISIBLE(elem->data)
- && GTK_WIDGET_SENSITIVE(elem->data))
- next = elem->data;
- }
- while (! next);
-
- if (next)
- gtk_widget_grab_focus(next);
-
- g_object_unref(properties);
- }
- }}
-#line 1330 "mn-mailbox-properties-dialog.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-mailbox-properties-dialog.gob.stamp b/build/src/mn-mailbox-properties-dialog.gob.stamp
diff --git a/build/src/mn-mailbox-properties-dialog.h b/build/src/mn-mailbox-properties-dialog.h
@@ -1,101 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-dialog.h"
-#include "mn-mailbox.h"
-
-#ifndef __MN_MAILBOX_PROPERTIES_DIALOG_H__
-#define __MN_MAILBOX_PROPERTIES_DIALOG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAILBOX_PROPERTIES_DIALOG (mn_mailbox_properties_dialog_get_type())
-#define MN_MAILBOX_PROPERTIES_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailbox_properties_dialog_get_type(), MNMailboxPropertiesDialog)
-#define MN_MAILBOX_PROPERTIES_DIALOG_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailbox_properties_dialog_get_type(), MNMailboxPropertiesDialog const)
-#define MN_MAILBOX_PROPERTIES_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mailbox_properties_dialog_get_type(), MNMailboxPropertiesDialogClass)
-#define MN_IS_MAILBOX_PROPERTIES_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mailbox_properties_dialog_get_type ())
-
-#define MN_MAILBOX_PROPERTIES_DIALOG_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mailbox_properties_dialog_get_type(), MNMailboxPropertiesDialogClass)
-
-/* Private structure type */
-typedef struct _MNMailboxPropertiesDialogPrivate MNMailboxPropertiesDialogPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAILBOX_PROPERTIES_DIALOG__
-#define __TYPEDEF_MN_MAILBOX_PROPERTIES_DIALOG__
-typedef struct _MNMailboxPropertiesDialog MNMailboxPropertiesDialog;
-#endif
-struct _MNMailboxPropertiesDialog {
- MNDialog __parent__;
- /*< private >*/
- GtkWidget * notebook; /* protected */
- GtkWidget * general_vbox; /* protected */
- MNMailboxPropertiesDialogPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMailboxPropertiesDialogClass MNMailboxPropertiesDialogClass;
-struct _MNMailboxPropertiesDialogClass {
- MNDialogClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_mailbox_properties_dialog_get_type (void) G_GNUC_CONST;
-#line 112 "src/mn-mailbox-properties-dialog.gob"
-MNMailbox * mn_mailbox_properties_dialog_get_mailbox (MNMailboxPropertiesDialog * self);
-#line 63 "mn-mailbox-properties-dialog.h"
-#line 89 "src/mn-mailbox-properties-dialog.gob"
-void mn_mailbox_properties_dialog_set_mailbox (MNMailboxPropertiesDialog * self,
- MNMailbox * val);
-#line 67 "mn-mailbox-properties-dialog.h"
-#line 440 "src/mn-mailbox-properties-dialog.gob"
-MNMailbox * mn_mailbox_properties_dialog_get_current_mailbox (MNMailboxPropertiesDialog * self);
-#line 70 "mn-mailbox-properties-dialog.h"
-#line 459 "src/mn-mailbox-properties-dialog.gob"
-void mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog * self);
-#line 73 "mn-mailbox-properties-dialog.h"
-#line 478 "src/mn-mailbox-properties-dialog.gob"
-void mn_mailbox_properties_dialog_cancel (MNMailboxPropertiesDialog * self);
-#line 76 "mn-mailbox-properties-dialog.h"
-#line 633 "src/mn-mailbox-properties-dialog.gob"
-GtkWidget * mn_mailbox_properties_dialog_new (GtkWindow * parent,
- MNMailbox * mailbox);
-#line 80 "mn-mailbox-properties-dialog.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_MAILBOX_PROPERTIES_DIALOG_PROP_DIALOG_PARENT(arg) "dialog_parent", __extension__ ({GtkWindow * z = (arg); z;})
-#define MN_MAILBOX_PROPERTIES_DIALOG_GET_PROP_DIALOG_PARENT(arg) "dialog_parent", __extension__ ({GtkWindow * *z = (arg); z;})
-#define MN_MAILBOX_PROPERTIES_DIALOG_PROP_MAILBOX(arg) "mailbox", __extension__ ({MNMailbox * z = (arg); z;})
-#define MN_MAILBOX_PROPERTIES_DIALOG_GET_PROP_MAILBOX(arg) "mailbox", __extension__ ({MNMailbox * *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_MAILBOX_PROPERTIES_DIALOG_PROP_DIALOG_PARENT(arg) "dialog_parent",(GtkWindow * )(arg)
-#define MN_MAILBOX_PROPERTIES_DIALOG_GET_PROP_DIALOG_PARENT(arg) "dialog_parent",(GtkWindow * *)(arg)
-#define MN_MAILBOX_PROPERTIES_DIALOG_PROP_MAILBOX(arg) "mailbox",(MNMailbox * )(arg)
-#define MN_MAILBOX_PROPERTIES_DIALOG_GET_PROP_MAILBOX(arg) "mailbox",(MNMailbox * *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailbox-properties-private.h b/build/src/mn-mailbox-properties-private.h
@@ -1,34 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAILBOX_PROPERTIES_PRIVATE_H__
-#define __MN_MAILBOX_PROPERTIES_PRIVATE_H__
-
-#include "mn-mailbox-properties.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNMailboxPropertiesPrivate {
-#line 44 "src/mn-mailbox-properties.gob"
- GSList * general_sections;
-#line 16 "mn-mailbox-properties-private.h"
-};
-#line 77 "src/mn-mailbox-properties.gob"
-GtkWidget * mn_mailbox_properties_add_general_section (MNMailboxProperties * self, const char * title);
-#line 20 "mn-mailbox-properties-private.h"
-#line 111 "src/mn-mailbox-properties.gob"
-void mn_mailbox_properties_notify_complete (MNMailboxProperties * self);
-#line 23 "mn-mailbox-properties-private.h"
-#line 117 "src/mn-mailbox-properties.gob"
-void mn_mailbox_properties_notify_default_name (MNMailboxProperties * self);
-#line 26 "mn-mailbox-properties-private.h"
-#line 123 "src/mn-mailbox-properties.gob"
-void mn_mailbox_properties_notify_default_check_delay (MNMailboxProperties * self);
-#line 29 "mn-mailbox-properties-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailbox-properties.c b/build/src/mn-mailbox-properties.c
@@ -1,543 +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-mailbox-properties.h"
-
-#include "mn-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-mailbox-properties.gob"
-
-#include "mn-util.h"
-#include "mn-mailbox-properties-dialog.h"
-
-#line 31 "mn-mailbox-properties.c"
-/* self casting macros */
-#define SELF(x) MN_MAILBOX_PROPERTIES(x)
-#define SELF_CONST(x) MN_MAILBOX_PROPERTIES_CONST(x)
-#define IS_SELF(x) MN_IS_MAILBOX_PROPERTIES(x)
-#define TYPE_SELF MN_TYPE_MAILBOX_PROPERTIES
-#define SELF_CLASS(x) MN_MAILBOX_PROPERTIES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAILBOX_PROPERTIES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMailboxProperties Self;
-typedef MNMailboxPropertiesClass 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-mailbox-properties.gob"
-static void mn_mailbox_properties_init (MNMailboxProperties * o) G_GNUC_UNUSED;
-#line 50 "mn-mailbox-properties.c"
-#line 0 "src/mn-mailbox-properties.gob"
-static void mn_mailbox_properties_class_init (MNMailboxPropertiesClass * c) G_GNUC_UNUSED;
-#line 53 "mn-mailbox-properties.c"
-static MNMailbox * ___real_mn_mailbox_properties_get_mailbox (MNMailboxProperties * self);
-#line 91 "src/mn-mailbox-properties.gob"
-static void ___6_mn_mailbox_properties_activate (MNMailboxProperties * properties) G_GNUC_UNUSED;
-#line 57 "mn-mailbox-properties.c"
-#line 101 "src/mn-mailbox-properties.gob"
-static void ___7_mn_mailbox_properties_deactivate (MNMailboxProperties * properties) G_GNUC_UNUSED;
-#line 60 "mn-mailbox-properties.c"
-
-enum {
- PROP_0,
- PROP_DIALOG,
- PROP_COMPLETE,
- PROP_DEFAULT_NAME,
- PROP_DEFAULT_CHECK_DELAY
-};
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_activate mn_mailbox_properties_activate
-#define self_deactivate mn_mailbox_properties_deactivate
-#define self_set_mailbox mn_mailbox_properties_set_mailbox
-#define self_get_mailbox mn_mailbox_properties_get_mailbox
-#define self_add_general_section mn_mailbox_properties_add_general_section
-#define self_notify_complete mn_mailbox_properties_notify_complete
-#define self_notify_default_name mn_mailbox_properties_notify_default_name
-#define self_notify_default_check_delay mn_mailbox_properties_notify_default_check_delay
-GType
-mn_mailbox_properties_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMailboxPropertiesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mailbox_properties_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMailboxProperties),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mailbox_properties_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNMailboxProperties", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMailboxProperties *)g_object_new(mn_mailbox_properties_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMailboxProperties *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMailboxProperties *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMailboxProperties *)g_object_new_valist (mn_mailbox_properties_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::dispose"
- MNMailboxProperties *self G_GNUC_UNUSED = MN_MAILBOX_PROPERTIES (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 40 "src/mn-mailbox-properties.gob"
- if(self->label_size_group) { g_object_unref ((gpointer) self->label_size_group); self->label_size_group = NULL; }
-#line 134 "mn-mailbox-properties.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::finalize"
- MNMailboxProperties *self G_GNUC_UNUSED = MN_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 42 "src/mn-mailbox-properties.gob"
- if(self->entries) { g_slist_free ((gpointer) self->entries); self->entries = NULL; }
-#line 149 "mn-mailbox-properties.c"
-#line 44 "src/mn-mailbox-properties.gob"
- if(self->_priv->general_sections) { mn_g_object_slist_free ((gpointer) self->_priv->general_sections); self->_priv->general_sections = NULL; }
-#line 152 "mn-mailbox-properties.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_mailbox_properties_init (MNMailboxProperties * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_MAILBOX_PROPERTIES,MNMailboxPropertiesPrivate);
-#line 40 "src/mn-mailbox-properties.gob"
- o->label_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
-#line 163 "mn-mailbox-properties.c"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_mailbox_properties_class_init (MNMailboxPropertiesClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN: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(MNMailboxPropertiesPrivate));
-#line 25 "src/mn-mailbox-properties.gob"
- c->enable_check_delay = TRUE;
-#line 176 "mn-mailbox-properties.c"
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- c->activate = NULL;
- c->deactivate = NULL;
- c->set_mailbox = NULL;
-#line 71 "src/mn-mailbox-properties.gob"
- c->get_mailbox = ___real_mn_mailbox_properties_get_mailbox;
-#line 91 "src/mn-mailbox-properties.gob"
- mn_mailbox_properties_class->activate = ___6_mn_mailbox_properties_activate;
-#line 101 "src/mn-mailbox-properties.gob"
- mn_mailbox_properties_class->deactivate = ___7_mn_mailbox_properties_deactivate;
-#line 189 "mn-mailbox-properties.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_pointer
- ("dialog" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_DIALOG,
- param_spec);
- param_spec = g_param_spec_boolean
- ("complete" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE));
- g_object_class_install_property (g_object_class,
- PROP_COMPLETE,
- param_spec);
- param_spec = g_param_spec_string
- ("default_name" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE));
- g_object_class_install_property (g_object_class,
- PROP_DEFAULT_NAME,
- param_spec);
- param_spec = g_param_spec_int
- ("default_check_delay" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- G_MININT /* minimum */,
- G_MAXINT /* maximum */,
- 0 /* default_value */,
- (GParamFlags)(G_PARAM_READABLE));
- g_object_class_install_property (g_object_class,
- PROP_DEFAULT_CHECK_DELAY,
- 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:Mailbox:Properties::set_property"
-{
- MNMailboxProperties *self G_GNUC_UNUSED;
-
- self = MN_MAILBOX_PROPERTIES (object);
-
- switch (property_id) {
- case PROP_DIALOG:
- {
-#line 38 "src/mn-mailbox-properties.gob"
-self->dialog = g_value_get_pointer (VAL);
-#line 254 "mn-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__
-
-static void
-___object_get_property (GObject *object,
- guint property_id,
- GValue *VAL G_GNUC_UNUSED,
- GParamSpec *pspec G_GNUC_UNUSED)
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::get_property"
-{
- MNMailboxProperties *self G_GNUC_UNUSED;
-
- self = MN_MAILBOX_PROPERTIES (object);
-
- switch (property_id) {
- case PROP_DIALOG:
- {
-#line 38 "src/mn-mailbox-properties.gob"
-g_value_set_pointer (VAL, self->dialog);
-#line 285 "mn-mailbox-properties.c"
- }
- break;
- case PROP_COMPLETE:
- {
-#line 47 "src/mn-mailbox-properties.gob"
- g_value_set_boolean(VAL, TRUE);
-#line 292 "mn-mailbox-properties.c"
- }
- break;
- case PROP_DEFAULT_NAME:
- {
-#line 50 "src/mn-mailbox-properties.gob"
- g_value_set_string(VAL, NULL);
-#line 299 "mn-mailbox-properties.c"
- }
- break;
- case PROP_DEFAULT_CHECK_DELAY:
- {
-#line 54 "src/mn-mailbox-properties.gob"
-
- MNMailboxClass *class;
-
- class = mn_mailbox_get_class_from_name(SELF_GET_CLASS(self)->type);
- g_value_set_int(VAL, class->default_check_delay);
- g_type_class_unref(class);
-
-#line 312 "mn-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 62 "src/mn-mailbox-properties.gob"
-void
-mn_mailbox_properties_activate (MNMailboxProperties * self)
-{
-#line 333 "mn-mailbox-properties.c"
- MNMailboxPropertiesClass *klass;
-#line 62 "src/mn-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 62 "src/mn-mailbox-properties.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 339 "mn-mailbox-properties.c"
- klass = MN_MAILBOX_PROPERTIES_GET_CLASS(self);
-
- if(klass->activate)
- (*klass->activate)(self);
-}
-
-#line 65 "src/mn-mailbox-properties.gob"
-void
-mn_mailbox_properties_deactivate (MNMailboxProperties * self)
-{
-#line 350 "mn-mailbox-properties.c"
- MNMailboxPropertiesClass *klass;
-#line 65 "src/mn-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 65 "src/mn-mailbox-properties.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 356 "mn-mailbox-properties.c"
- klass = MN_MAILBOX_PROPERTIES_GET_CLASS(self);
-
- if(klass->deactivate)
- (*klass->deactivate)(self);
-}
-
-#line 68 "src/mn-mailbox-properties.gob"
-void
-mn_mailbox_properties_set_mailbox (MNMailboxProperties * self, MNMailbox * mailbox)
-{
-#line 367 "mn-mailbox-properties.c"
- MNMailboxPropertiesClass *klass;
-#line 68 "src/mn-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 68 "src/mn-mailbox-properties.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 68 "src/mn-mailbox-properties.gob"
- g_return_if_fail (mailbox != NULL);
-#line 68 "src/mn-mailbox-properties.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 377 "mn-mailbox-properties.c"
- klass = MN_MAILBOX_PROPERTIES_GET_CLASS(self);
-
- if(klass->set_mailbox)
- (*klass->set_mailbox)(self,mailbox);
-}
-
-#line 71 "src/mn-mailbox-properties.gob"
-MNMailbox *
-mn_mailbox_properties_get_mailbox (MNMailboxProperties * self)
-{
-#line 388 "mn-mailbox-properties.c"
- MNMailboxPropertiesClass *klass;
-#line 71 "src/mn-mailbox-properties.gob"
- g_return_val_if_fail (self != NULL, (MNMailbox * )0);
-#line 71 "src/mn-mailbox-properties.gob"
- g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (MNMailbox * )0);
-#line 394 "mn-mailbox-properties.c"
- klass = MN_MAILBOX_PROPERTIES_GET_CLASS(self);
-
- if(klass->get_mailbox)
- return (*klass->get_mailbox)(self);
- else
- return (MNMailbox * )(0);
-}
-#line 71 "src/mn-mailbox-properties.gob"
-static MNMailbox *
-___real_mn_mailbox_properties_get_mailbox (MNMailboxProperties * self G_GNUC_UNUSED)
-{
-#line 406 "mn-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::get_mailbox"
-{
-#line 73 "src/mn-mailbox-properties.gob"
-
- return mn_mailbox_new(SELF_GET_CLASS(self)->type, NULL);
- }}
-#line 413 "mn-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 77 "src/mn-mailbox-properties.gob"
-GtkWidget *
-mn_mailbox_properties_add_general_section (MNMailboxProperties * self, const char * title)
-{
-#line 420 "mn-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::add_general_section"
-#line 77 "src/mn-mailbox-properties.gob"
- g_return_val_if_fail (self != NULL, (GtkWidget * )0);
-#line 77 "src/mn-mailbox-properties.gob"
- g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (GtkWidget * )0);
-#line 77 "src/mn-mailbox-properties.gob"
- g_return_val_if_fail (title != NULL, (GtkWidget * )0);
-#line 428 "mn-mailbox-properties.c"
-{
-#line 79 "src/mn-mailbox-properties.gob"
-
- GtkWidget *section;
- GtkWidget *vbox;
-
- section = mn_hig_section_new_with_box(title, NULL, &vbox);
- g_object_ref_sink(section);
- gtk_widget_show(section);
-
- selfp->general_sections = g_slist_append(selfp->general_sections, section);
- return vbox;
- }}
-#line 442 "mn-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 91 "src/mn-mailbox-properties.gob"
-static void
-___6_mn_mailbox_properties_activate (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 448 "mn-mailbox-properties.c"
-#define PARENT_HANDLER(___properties) \
- { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->activate) \
- (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->activate)(___properties); }
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::activate"
-{
-#line 93 "src/mn-mailbox-properties.gob"
-
- Self *self = SELF(properties);
- GSList *l;
-
- MN_LIST_FOREACH(l, selfp->general_sections)
- gtk_box_pack_start(GTK_BOX(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->general_vbox), l->data, FALSE, FALSE, 0);
- }}
-#line 463 "mn-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 101 "src/mn-mailbox-properties.gob"
-static void
-___7_mn_mailbox_properties_deactivate (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 470 "mn-mailbox-properties.c"
-#define PARENT_HANDLER(___properties) \
- { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->deactivate) \
- (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->deactivate)(___properties); }
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::deactivate"
-{
-#line 103 "src/mn-mailbox-properties.gob"
-
- Self *self = SELF(properties);
- GSList *l;
-
- MN_LIST_FOREACH(l, selfp->general_sections)
- gtk_container_remove(GTK_CONTAINER(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->general_vbox), l->data);
- }}
-#line 485 "mn-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 111 "src/mn-mailbox-properties.gob"
-void
-mn_mailbox_properties_notify_complete (MNMailboxProperties * self)
-{
-#line 493 "mn-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::notify_complete"
-#line 111 "src/mn-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 111 "src/mn-mailbox-properties.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 499 "mn-mailbox-properties.c"
-{
-#line 113 "src/mn-mailbox-properties.gob"
-
- g_object_notify(G_OBJECT(self), "complete");
- }}
-#line 505 "mn-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 117 "src/mn-mailbox-properties.gob"
-void
-mn_mailbox_properties_notify_default_name (MNMailboxProperties * self)
-{
-#line 512 "mn-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::notify_default_name"
-#line 117 "src/mn-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 117 "src/mn-mailbox-properties.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 518 "mn-mailbox-properties.c"
-{
-#line 119 "src/mn-mailbox-properties.gob"
-
- g_object_notify(G_OBJECT(self), "default-name");
- }}
-#line 524 "mn-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 123 "src/mn-mailbox-properties.gob"
-void
-mn_mailbox_properties_notify_default_check_delay (MNMailboxProperties * self)
-{
-#line 531 "mn-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:Properties::notify_default_check_delay"
-#line 123 "src/mn-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 123 "src/mn-mailbox-properties.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 537 "mn-mailbox-properties.c"
-{
-#line 125 "src/mn-mailbox-properties.gob"
-
- g_object_notify(G_OBJECT(self), "default-check-delay");
- }}
-#line 543 "mn-mailbox-properties.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-mailbox-properties.gob.stamp b/build/src/mn-mailbox-properties.gob.stamp
diff --git a/build/src/mn-mailbox-properties.h b/build/src/mn-mailbox-properties.h
@@ -1,105 +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.h"
-
-#ifndef __MN_MAILBOX_PROPERTIES_H__
-#define __MN_MAILBOX_PROPERTIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAILBOX_PROPERTIES (mn_mailbox_properties_get_type())
-#define MN_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailbox_properties_get_type(), MNMailboxProperties)
-#define MN_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailbox_properties_get_type(), MNMailboxProperties const)
-#define MN_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mailbox_properties_get_type(), MNMailboxPropertiesClass)
-#define MN_IS_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mailbox_properties_get_type ())
-
-#define MN_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mailbox_properties_get_type(), MNMailboxPropertiesClass)
-
-/* Private structure type */
-typedef struct _MNMailboxPropertiesPrivate MNMailboxPropertiesPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAILBOX_PROPERTIES__
-#define __TYPEDEF_MN_MAILBOX_PROPERTIES__
-typedef struct _MNMailboxProperties MNMailboxProperties;
-#endif
-struct _MNMailboxProperties {
- GObject __parent__;
- /*< private >*/
- GtkWidget * dialog; /* protected */
- GtkSizeGroup * label_size_group; /* protected */
- GSList * entries; /* protected */
- MNMailboxPropertiesPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMailboxPropertiesClass MNMailboxPropertiesClass;
-struct _MNMailboxPropertiesClass {
- GObjectClass __parent__;
- void (* activate) (MNMailboxProperties * self);
- void (* deactivate) (MNMailboxProperties * self);
- void (* set_mailbox) (MNMailboxProperties * self, MNMailbox * mailbox);
- MNMailbox * (* get_mailbox) (MNMailboxProperties * self);
- const char * type;
- const char * stock_id;
- const char * combo_label;
- gboolean enable_check_delay;
-};
-
-
-/*
- * Public methods
- */
-GType mn_mailbox_properties_get_type (void) G_GNUC_CONST;
-#line 62 "src/mn-mailbox-properties.gob"
-void mn_mailbox_properties_activate (MNMailboxProperties * self);
-#line 72 "mn-mailbox-properties.h"
-#line 65 "src/mn-mailbox-properties.gob"
-void mn_mailbox_properties_deactivate (MNMailboxProperties * self);
-#line 75 "mn-mailbox-properties.h"
-#line 68 "src/mn-mailbox-properties.gob"
-void mn_mailbox_properties_set_mailbox (MNMailboxProperties * self,
- MNMailbox * mailbox);
-#line 79 "mn-mailbox-properties.h"
-#line 71 "src/mn-mailbox-properties.gob"
-MNMailbox * mn_mailbox_properties_get_mailbox (MNMailboxProperties * self);
-#line 82 "mn-mailbox-properties.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_MAILBOX_PROPERTIES_PROP_DIALOG(arg) "dialog", __extension__ ({GtkWidget * z = (arg); z;})
-#define MN_MAILBOX_PROPERTIES_GET_PROP_DIALOG(arg) "dialog", __extension__ ({GtkWidget * *z = (arg); z;})
-#define MN_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
-#define MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;})
-#define MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_CHECK_DELAY(arg) "default_check_delay", __extension__ ({gint *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_MAILBOX_PROPERTIES_PROP_DIALOG(arg) "dialog",(GtkWidget * )(arg)
-#define MN_MAILBOX_PROPERTIES_GET_PROP_DIALOG(arg) "dialog",(GtkWidget * *)(arg)
-#define MN_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
-#define MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name",(gchar **)(arg)
-#define MN_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-mailbox-view-private.h b/build/src/mn-mailbox-view-private.h
@@ -1,36 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAILBOX_VIEW_PRIVATE_H__
-#define __MN_MAILBOX_VIEW_PRIVATE_H__
-
-#include "mn-mailbox-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNMailboxViewPrivate {
-#line 75 "src/mn-mailbox-view.gob"
- GtkWidget * menu;
-#line 76 "src/mn-mailbox-view.gob"
- GtkWidget * properties_item;
-#line 77 "src/mn-mailbox-view.gob"
- GtkWidget * update_item;
-#line 78 "src/mn-mailbox-view.gob"
- GtkWidget * remove_item;
-#line 79 "src/mn-mailbox-view.gob"
- GtkWidget * cut_item;
-#line 80 "src/mn-mailbox-view.gob"
- GtkWidget * copy_item;
-#line 81 "src/mn-mailbox-view.gob"
- GtkWidget * paste_item;
-#line 82 "src/mn-mailbox-view.gob"
- GtkWidget * select_all_item;
-#line 30 "mn-mailbox-view-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailbox-view.c b/build/src/mn-mailbox-view.c
@@ -1,1756 +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-mailbox-view.h"
-
-#include "mn-mailbox-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-mailbox-view.gob"
-
-#include <string.h>
-#include <glib/gi18n.h>
-#include <gdk/gdkkeysyms.h>
-#include "mn-util.h"
-#include "mn-shell.h"
-#include "mn-stock.h"
-#include "mn-mailbox-properties-dialog.h"
-#include "mn-conf.h"
-#include "mn-mailbox.h"
-#include "nautilus-cell-renderer-pixbuf-emblem.h"
-#include "mn-test-mailbox.h"
-
-enum
-{
- COLUMN_MAILBOX,
- COLUMN_ICON,
- COLUMN_EMBLEM,
- COLUMN_PIXBUF,
- COLUMN_LABEL,
- COLUMN_RAW_LABEL,
- N_COLUMNS
-};
-
-enum
-{
- TARGET_MAILBOXES,
- TARGET_GNOME_COPIED_FILES,
- N_TARGETS
-};
-
-typedef struct
-{
- gboolean has_manually_checkable;
- gboolean has_selection;
-} SensitivityInfo;
-
-static struct
-{
- char *name;
- GdkAtom atom;
-} clipboard_info[N_TARGETS] = {
- { "x-special/mail-notification-mailboxes" },
- { "x-special/gnome-copied-files" }
-};
-
-static GtkClipboard *global_clipboard;
-
-#line 73 "mn-mailbox-view.c"
-/* self casting macros */
-#define SELF(x) MN_MAILBOX_VIEW(x)
-#define SELF_CONST(x) MN_MAILBOX_VIEW_CONST(x)
-#define IS_SELF(x) MN_IS_MAILBOX_VIEW(x)
-#define TYPE_SELF MN_TYPE_MAILBOX_VIEW
-#define SELF_CLASS(x) MN_MAILBOX_VIEW_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAILBOX_VIEW_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMailboxView Self;
-typedef MNMailboxViewClass SelfClass;
-
-/* here are local prototypes */
-static void ___real_mn_mailbox_view_activate_update (MNMailboxView * self);
-#line 93 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_activate_update_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) G_GNUC_UNUSED;
-#line 91 "mn-mailbox-view.c"
-static void ___real_mn_mailbox_view_activate_properties (MNMailboxView * self);
-#line 116 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_activate_properties_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) G_GNUC_UNUSED;
-#line 95 "mn-mailbox-view.c"
-static void ___real_mn_mailbox_view_activate_add (MNMailboxView * self);
-static void ___real_mn_mailbox_view_activate_remove (MNMailboxView * self);
-static void ___real_mn_mailbox_view_activate_cut (MNMailboxView * self);
-static void ___real_mn_mailbox_view_activate_copy (MNMailboxView * self);
-static void ___real_mn_mailbox_view_activate_paste (MNMailboxView * self);
-#line 262 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_class_init (MNMailboxViewClass * class) G_GNUC_UNUSED;
-#line 103 "mn-mailbox-view.c"
-#line 294 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_init (MNMailboxView * self) G_GNUC_UNUSED;
-#line 106 "mn-mailbox-view.c"
-#line 418 "src/mn-mailbox-view.gob"
-static int mn_mailbox_view_sort_cb (GtkTreeModel * model, GtkTreeIter * a, GtkTreeIter * b, gpointer user_data) G_GNUC_UNUSED;
-#line 109 "mn-mailbox-view.c"
-#line 439 "src/mn-mailbox-view.gob"
-static gboolean mn_mailbox_view_search_equal_cb (GtkTreeModel * model, int column, const char * key, GtkTreeIter * iter, gpointer search_data) G_GNUC_UNUSED;
-#line 112 "mn-mailbox-view.c"
-#line 503 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_append (MNMailboxView * self, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 115 "mn-mailbox-view.c"
-#line 514 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_mailbox_added_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data) G_GNUC_UNUSED;
-#line 118 "mn-mailbox-view.c"
-#line 525 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_mailbox_notify_h (MNMailboxes * mailboxes, MNMailbox * mailbox, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
-#line 121 "mn-mailbox-view.c"
-#line 538 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data) G_GNUC_UNUSED;
-#line 124 "mn-mailbox-view.c"
-#line 555 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_update_iter (MNMailboxView * self, GtkTreeIter * iter, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 127 "mn-mailbox-view.c"
-#line 620 "src/mn-mailbox-view.gob"
-static gboolean mn_mailbox_view_find_mailbox (MNMailboxView * self, MNMailbox * mailbox, GtkTreeIter * iter) G_GNUC_UNUSED;
-#line 130 "mn-mailbox-view.c"
-#line 650 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_update_sensitivity (MNMailboxView * self) G_GNUC_UNUSED;
-#line 133 "mn-mailbox-view.c"
-#line 673 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_update_sensitivity_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) G_GNUC_UNUSED;
-#line 136 "mn-mailbox-view.c"
-#line 693 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_remove_mailbox (MNMailboxView * self) G_GNUC_UNUSED;
-#line 139 "mn-mailbox-view.c"
-#line 702 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_remove_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) G_GNUC_UNUSED;
-#line 142 "mn-mailbox-view.c"
-#line 715 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_copy_mailbox (MNMailboxView * self) G_GNUC_UNUSED;
-#line 145 "mn-mailbox-view.c"
-#line 737 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_copy_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data) G_GNUC_UNUSED;
-#line 148 "mn-mailbox-view.c"
-#line 763 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_get_clipboard_cb (GtkClipboard * clipboard, GtkSelectionData * selection_data, unsigned int info, gpointer user_data_or_owner) G_GNUC_UNUSED;
-#line 151 "mn-mailbox-view.c"
-#line 780 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_clear_clipboard_cb (GtkClipboard * clipboard, gpointer user_data_or_owner) G_GNUC_UNUSED;
-#line 154 "mn-mailbox-view.c"
-#line 788 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_select_all (MNMailboxView * self) G_GNUC_UNUSED;
-#line 157 "mn-mailbox-view.c"
-#line 797 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_properties_add_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED;
-#line 160 "mn-mailbox-view.c"
-#line 825 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_properties_edit_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED;
-#line 163 "mn-mailbox-view.c"
-#line 848 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_popup_menu (MNMailboxView * self, unsigned int button, guint32 activate_time) G_GNUC_UNUSED;
-#line 166 "mn-mailbox-view.c"
-#line 865 "src/mn-mailbox-view.gob"
-static gboolean mn_mailbox_view_can_paste (GdkAtom * atoms, int n_atoms) G_GNUC_UNUSED;
-#line 169 "mn-mailbox-view.c"
-#line 878 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_popup_menu_targets_received_cb (GtkClipboard * clipboard, GdkAtom * atoms, int n_atoms, gpointer data) G_GNUC_UNUSED;
-#line 172 "mn-mailbox-view.c"
-#line 898 "src/mn-mailbox-view.gob"
-static gboolean mn_mailbox_view_popup_menu_h (GtkWidget * widget, gpointer user_data) G_GNUC_UNUSED;
-#line 175 "mn-mailbox-view.c"
-#line 909 "src/mn-mailbox-view.gob"
-static gboolean mn_mailbox_view_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data) G_GNUC_UNUSED;
-#line 178 "mn-mailbox-view.c"
-#line 920 "src/mn-mailbox-view.gob"
-static void mn_mailbox_view_row_activated_h (GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * column, gpointer user_data) G_GNUC_UNUSED;
-#line 181 "mn-mailbox-view.c"
-
-/*
- * Signal connection wrapper macro shortcuts
- */
-#define self_connect__activate_update(object,func,data) mn_mailbox_view_connect__activate_update((object),(func),(data))
-#define self_connect_after__activate_update(object,func,data) mn_mailbox_view_connect_after__activate_update((object),(func),(data))
-#define self_connect_data__activate_update(object,func,data,destroy_data,flags) mn_mailbox_view_connect_data__activate_update((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_properties(object,func,data) mn_mailbox_view_connect__activate_properties((object),(func),(data))
-#define self_connect_after__activate_properties(object,func,data) mn_mailbox_view_connect_after__activate_properties((object),(func),(data))
-#define self_connect_data__activate_properties(object,func,data,destroy_data,flags) mn_mailbox_view_connect_data__activate_properties((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_add(object,func,data) mn_mailbox_view_connect__activate_add((object),(func),(data))
-#define self_connect_after__activate_add(object,func,data) mn_mailbox_view_connect_after__activate_add((object),(func),(data))
-#define self_connect_data__activate_add(object,func,data,destroy_data,flags) mn_mailbox_view_connect_data__activate_add((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_remove(object,func,data) mn_mailbox_view_connect__activate_remove((object),(func),(data))
-#define self_connect_after__activate_remove(object,func,data) mn_mailbox_view_connect_after__activate_remove((object),(func),(data))
-#define self_connect_data__activate_remove(object,func,data,destroy_data,flags) mn_mailbox_view_connect_data__activate_remove((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_cut(object,func,data) mn_mailbox_view_connect__activate_cut((object),(func),(data))
-#define self_connect_after__activate_cut(object,func,data) mn_mailbox_view_connect_after__activate_cut((object),(func),(data))
-#define self_connect_data__activate_cut(object,func,data,destroy_data,flags) mn_mailbox_view_connect_data__activate_cut((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_copy(object,func,data) mn_mailbox_view_connect__activate_copy((object),(func),(data))
-#define self_connect_after__activate_copy(object,func,data) mn_mailbox_view_connect_after__activate_copy((object),(func),(data))
-#define self_connect_data__activate_copy(object,func,data,destroy_data,flags) mn_mailbox_view_connect_data__activate_copy((object),(func),(data),(destroy_data),(flags))
-#define self_connect__activate_paste(object,func,data) mn_mailbox_view_connect__activate_paste((object),(func),(data))
-#define self_connect_after__activate_paste(object,func,data) mn_mailbox_view_connect_after__activate_paste((object),(func),(data))
-#define self_connect_data__activate_paste(object,func,data,destroy_data,flags) mn_mailbox_view_connect_data__activate_paste((object),(func),(data),(destroy_data),(flags))
-
-enum {
- ACTIVATE_UPDATE_SIGNAL,
- ACTIVATE_PROPERTIES_SIGNAL,
- ACTIVATE_ADD_SIGNAL,
- ACTIVATE_REMOVE_SIGNAL,
- ACTIVATE_CUT_SIGNAL,
- ACTIVATE_COPY_SIGNAL,
- ACTIVATE_PASTE_SIGNAL,
- LAST_SIGNAL
-};
-
-static guint object_signals[LAST_SIGNAL] = {0};
-
-/* pointer to the class of our parent */
-static GtkTreeViewClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_activate_update mn_mailbox_view_activate_update
-#define self_activate_update_cb mn_mailbox_view_activate_update_cb
-#define self_activate_properties mn_mailbox_view_activate_properties
-#define self_activate_properties_cb mn_mailbox_view_activate_properties_cb
-#define self_activate_add mn_mailbox_view_activate_add
-#define self_activate_remove mn_mailbox_view_activate_remove
-#define self_activate_cut mn_mailbox_view_activate_cut
-#define self_activate_copy mn_mailbox_view_activate_copy
-#define self_activate_paste mn_mailbox_view_activate_paste
-#define self_sort_cb mn_mailbox_view_sort_cb
-#define self_search_equal_cb mn_mailbox_view_search_equal_cb
-#define self_append mn_mailbox_view_append
-#define self_mailbox_added_h mn_mailbox_view_mailbox_added_h
-#define self_mailbox_notify_h mn_mailbox_view_mailbox_notify_h
-#define self_mailbox_removed_h mn_mailbox_view_mailbox_removed_h
-#define self_update_iter mn_mailbox_view_update_iter
-#define self_find_mailbox mn_mailbox_view_find_mailbox
-#define self_update_sensitivity mn_mailbox_view_update_sensitivity
-#define self_update_sensitivity_cb mn_mailbox_view_update_sensitivity_cb
-#define self_remove_mailbox mn_mailbox_view_remove_mailbox
-#define self_remove_mailbox_cb mn_mailbox_view_remove_mailbox_cb
-#define self_copy_mailbox mn_mailbox_view_copy_mailbox
-#define self_copy_mailbox_cb mn_mailbox_view_copy_mailbox_cb
-#define self_get_clipboard_cb mn_mailbox_view_get_clipboard_cb
-#define self_clear_clipboard_cb mn_mailbox_view_clear_clipboard_cb
-#define self_select_all mn_mailbox_view_select_all
-#define self_properties_add_response_h mn_mailbox_view_properties_add_response_h
-#define self_properties_edit_response_h mn_mailbox_view_properties_edit_response_h
-#define self_popup_menu mn_mailbox_view_popup_menu
-#define self_can_paste mn_mailbox_view_can_paste
-#define self_popup_menu_targets_received_cb mn_mailbox_view_popup_menu_targets_received_cb
-#define self_popup_menu_h mn_mailbox_view_popup_menu_h
-#define self_button_press_event_h mn_mailbox_view_button_press_event_h
-#define self_row_activated_h mn_mailbox_view_row_activated_h
-#define self_new mn_mailbox_view_new
-GType
-mn_mailbox_view_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMailboxViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mailbox_view_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMailboxView),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mailbox_view_init,
- NULL
- };
-
- type = g_type_register_static (GTK_TYPE_TREE_VIEW, "MNMailboxView", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMailboxView *)g_object_new(mn_mailbox_view_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMailboxView * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMailboxView *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMailboxView *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMailboxView *)g_object_new_valist (mn_mailbox_view_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox:View::finalize"
- MNMailboxView *self G_GNUC_UNUSED = MN_MAILBOX_VIEW (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 75 "src/mn-mailbox-view.gob"
- if(self->_priv->menu) { gtk_widget_destroy ((gpointer) self->_priv->menu); self->_priv->menu = NULL; }
-#line 313 "mn-mailbox-view.c"
-}
-#undef __GOB_FUNCTION__
-
-#line 262 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_class_init (MNMailboxViewClass * class G_GNUC_UNUSED)
-{
-#line 321 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
-
- g_type_class_add_private(class,sizeof(MNMailboxViewPrivate));
-
- parent_class = g_type_class_ref (GTK_TYPE_TREE_VIEW);
-
- object_signals[ACTIVATE_UPDATE_SIGNAL] =
- g_signal_new ("activate_update",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxViewClass, activate_update),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_PROPERTIES_SIGNAL] =
- g_signal_new ("activate_properties",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxViewClass, activate_properties),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_ADD_SIGNAL] =
- g_signal_new ("activate_add",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxViewClass, activate_add),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_REMOVE_SIGNAL] =
- g_signal_new ("activate_remove",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxViewClass, activate_remove),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_CUT_SIGNAL] =
- g_signal_new ("activate_cut",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxViewClass, activate_cut),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_COPY_SIGNAL] =
- g_signal_new ("activate_copy",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxViewClass, activate_copy),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[ACTIVATE_PASTE_SIGNAL] =
- g_signal_new ("activate_paste",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxViewClass, activate_paste),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
-#line 84 "src/mn-mailbox-view.gob"
- class->activate_update = ___real_mn_mailbox_view_activate_update;
-#line 107 "src/mn-mailbox-view.gob"
- class->activate_properties = ___real_mn_mailbox_view_activate_properties;
-#line 147 "src/mn-mailbox-view.gob"
- class->activate_add = ___real_mn_mailbox_view_activate_add;
-#line 162 "src/mn-mailbox-view.gob"
- class->activate_remove = ___real_mn_mailbox_view_activate_remove;
-#line 168 "src/mn-mailbox-view.gob"
- class->activate_cut = ___real_mn_mailbox_view_activate_cut;
-#line 175 "src/mn-mailbox-view.gob"
- class->activate_copy = ___real_mn_mailbox_view_activate_copy;
-#line 181 "src/mn-mailbox-view.gob"
- class->activate_paste = ___real_mn_mailbox_view_activate_paste;
-#line 400 "mn-mailbox-view.c"
- g_object_class->finalize = ___finalize;
- {
-#line 263 "src/mn-mailbox-view.gob"
-
- GtkBindingSet *binding_set;
- int i;
-
- global_clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
-
- for (i = 0; i < N_TARGETS; i++)
- clipboard_info[i].atom = gdk_atom_intern(clipboard_info[i].name, FALSE);
-
- binding_set = gtk_binding_set_by_class(class);
-
- /* Delete removes a row */
- gtk_binding_entry_add_signal(binding_set, GDK_Delete, 0, "activate-remove", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_KP_Delete, 0, "activate-remove", 0);
-
- /* HIG 2.0 cut/copy/paste shortcuts */
- gtk_binding_entry_add_signal(binding_set, GDK_x, GDK_CONTROL_MASK, "activate-cut", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_c, GDK_CONTROL_MASK, "activate-copy", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_v, GDK_CONTROL_MASK, "activate-paste", 0);
-
- /* cut/copy/paste shortcuts taken from gtkentry.c */
- gtk_binding_entry_add_signal(binding_set, GDK_Delete, GDK_SHIFT_MASK, "activate-cut", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_Insert, GDK_CONTROL_MASK, "activate-copy", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_Insert, GDK_SHIFT_MASK, "activate-paste", 0);
-
- /* HIG 2.0 properties */
- gtk_binding_entry_add_signal(binding_set, GDK_Return, GDK_MOD1_MASK, "activate-properties", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
-
-#line 434 "mn-mailbox-view.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 294 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
-{
-#line 442 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAILBOX_VIEW,MNMailboxViewPrivate);
-#line 75 "src/mn-mailbox-view.gob"
- self->_priv->menu = gtk_menu_new();
-#line 447 "mn-mailbox-view.c"
- {
-#line 295 "src/mn-mailbox-view.gob"
-
- GtkMenuShell *shell;
- GtkWidget *add_item;
- GtkListStore *store;
- GtkTreeViewColumn *column;
- GtkCellRenderer *renderer;
- GtkTreeSelection *selection;
- GList *l;
-
- /* popup menu */
-
- shell = GTK_MENU_SHELL(selfp->menu);
-
- /* ordered according to chapter 4 of the HIG */
-
- selfp->properties_item = mn_menu_shell_append(shell, GTK_STOCK_PROPERTIES, NULL);
- /* translators: header capitalization */
- selfp->update_item = mn_menu_shell_append(shell, GTK_STOCK_REFRESH, _("_Update"));
- mn_menu_shell_append(shell, NULL, NULL);
- add_item = mn_menu_shell_append(shell, GTK_STOCK_ADD, NULL);
- selfp->remove_item = mn_menu_shell_append(shell, GTK_STOCK_REMOVE, NULL);
- mn_menu_shell_append(shell, NULL, NULL);
- selfp->cut_item = mn_menu_shell_append(shell, GTK_STOCK_CUT, NULL);
- selfp->copy_item = mn_menu_shell_append(shell, GTK_STOCK_COPY, NULL);
- selfp->paste_item = mn_menu_shell_append(shell, GTK_STOCK_PASTE, NULL);
- mn_menu_shell_append(shell, NULL, NULL);
- selfp->select_all_item = mn_menu_shell_append(shell, GTK_STOCK_SELECT_ALL, NULL);
-
- g_signal_connect_swapped(selfp->properties_item, "activate", G_CALLBACK(self_activate_properties), self);
- g_signal_connect_swapped(selfp->update_item, "activate", G_CALLBACK(self_activate_update), self);
- g_signal_connect_swapped(add_item, "activate", G_CALLBACK(self_activate_add), self);
- g_signal_connect_swapped(selfp->remove_item, "activate", G_CALLBACK(self_activate_remove), self);
- g_signal_connect_swapped(selfp->cut_item, "activate", G_CALLBACK(self_activate_cut), self);
- g_signal_connect_swapped(selfp->copy_item, "activate", G_CALLBACK(self_activate_copy), self);
- g_signal_connect_swapped(selfp->paste_item, "activate", G_CALLBACK(self_activate_paste), self);
- g_signal_connect_swapped(selfp->select_all_item, "activate", G_CALLBACK(self_select_all), self);
-
- /* store */
-
- store = gtk_list_store_new(N_COLUMNS,
- MN_TYPE_MAILBOX,
- G_TYPE_STRING,
- GDK_TYPE_PIXBUF,
- GDK_TYPE_PIXBUF,
- G_TYPE_STRING,
- G_TYPE_STRING);
-
- 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);
-
- gtk_tree_view_set_model(GTK_TREE_VIEW(self), GTK_TREE_MODEL(store));
-
- column = gtk_tree_view_column_new();
-
- gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
-
- renderer = nautilus_cell_renderer_pixbuf_emblem_new();
- g_object_set(renderer, "stock-size", GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
- gtk_tree_view_column_pack_start(column, renderer, FALSE);
- gtk_tree_view_column_set_attributes(column, renderer,
- "stock-id", COLUMN_ICON,
- "pixbuf-emblem", COLUMN_EMBLEM,
- "pixbuf", COLUMN_PIXBUF,
- NULL);
-
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(column, renderer, TRUE);
- gtk_tree_view_column_add_attribute(column, renderer, "markup", COLUMN_LABEL);
-
- gtk_tree_view_append_column(GTK_TREE_VIEW(self), column);
-
- /* misc */
-
- gtk_tree_view_set_search_column(GTK_TREE_VIEW(self), COLUMN_RAW_LABEL);
- gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(self), self_search_equal_cb, NULL, NULL);
-
- gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(self), FALSE);
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
- gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
-
- MN_LIST_FOREACH(l, mn_shell->mailboxes->list)
- {
- MNMailbox *mailbox = l->data;
-
- if (! MN_IS_TEST_MAILBOX(mailbox))
- self_append(self, l->data);
- }
-
- self_update_sensitivity(self);
-
- g_object_connect(store,
- /* for the sensitivity of "Select All" */
- "swapped-signal::row-inserted", self_update_sensitivity, self,
- "swapped-signal::row-deleted", self_update_sensitivity, self,
- NULL);
-
- mn_g_object_connect(self,
- mn_shell->mailboxes,
- "signal::mailbox-added", self_mailbox_added_h, self,
- "signal::mailbox-notify::stock-id", self_mailbox_notify_h, self,
- "swapped-signal::mailbox-notify::manually-checkable", self_update_sensitivity, self,
- "signal::mailbox-notify::format", self_mailbox_notify_h, self,
- "signal::mailbox-notify::error", self_mailbox_notify_h, self,
- "signal::mailbox-removed", self_mailbox_removed_h, self,
- NULL);
-
- g_signal_connect_swapped(selection, "changed", G_CALLBACK(self_update_sensitivity), self);
-
- g_object_connect(self,
- "signal::popup-menu", self_popup_menu_h, NULL,
- "signal::button-press-event", self_button_press_event_h, NULL,
- "signal::row-activated", self_row_activated_h, NULL,
- NULL);
-
- g_object_unref(store);
-
-#line 572 "mn-mailbox-view.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-#line 84 "src/mn-mailbox-view.gob"
-void
-mn_mailbox_view_activate_update (MNMailboxView * self)
-{
-#line 581 "mn-mailbox-view.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 84 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 84 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 592 "mn-mailbox-view.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[ACTIVATE_UPDATE_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 84 "src/mn-mailbox-view.gob"
-static void
-___real_mn_mailbox_view_activate_update (MNMailboxView * self G_GNUC_UNUSED)
-{
-#line 609 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_update"
-{
-#line 86 "src/mn-mailbox-view.gob"
-
- GtkTreeSelection *selection;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
- gtk_tree_selection_selected_foreach(selection, self_activate_update_cb, self);
- }}
-#line 619 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 93 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_activate_update_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-{
-#line 626 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_update_cb"
-{
-#line 98 "src/mn-mailbox-view.gob"
-
- MNMailbox *mailbox;
-
- gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
- if (mn_mailbox_get_manually_checkable(mailbox))
- mn_mailbox_check(mailbox);
- g_object_unref(mailbox);
- }}
-#line 638 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 107 "src/mn-mailbox-view.gob"
-void
-mn_mailbox_view_activate_properties (MNMailboxView * self)
-{
-#line 645 "mn-mailbox-view.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 107 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 107 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 656 "mn-mailbox-view.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[ACTIVATE_PROPERTIES_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 107 "src/mn-mailbox-view.gob"
-static void
-___real_mn_mailbox_view_activate_properties (MNMailboxView * self G_GNUC_UNUSED)
-{
-#line 673 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_properties"
-{
-#line 109 "src/mn-mailbox-view.gob"
-
- GtkTreeSelection *selection;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
- gtk_tree_selection_selected_foreach(selection, self_activate_properties_cb, self);
- }}
-#line 683 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 116 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_activate_properties_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-{
-#line 690 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_properties_cb"
-{
-#line 121 "src/mn-mailbox-view.gob"
-
- Self *self = data;
- MNMailbox *mailbox;
- GtkWidget *dialog;
-
- gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
-
- dialog = (GtkWidget *) mn_shell_get_mailbox_properties_dialog(mn_shell, mailbox);
- if (dialog)
- mn_window_present_from_event(GTK_WINDOW(dialog));
- else
- {
- dialog = mn_mailbox_properties_dialog_new(mn_widget_get_parent_window(GTK_WIDGET(self)), mailbox);
-
- g_signal_connect(dialog,
- "response",
- G_CALLBACK(self_properties_edit_response_h),
- NULL);
-
- mn_shell_add_mailbox_properties_dialog(mn_shell, MN_MAILBOX_PROPERTIES_DIALOG(dialog));
- gtk_widget_show(dialog);
- }
-
- g_object_unref(mailbox);
- }}
-#line 719 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 147 "src/mn-mailbox-view.gob"
-void
-mn_mailbox_view_activate_add (MNMailboxView * self)
-{
-#line 726 "mn-mailbox-view.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 147 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 147 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 737 "mn-mailbox-view.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[ACTIVATE_ADD_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 147 "src/mn-mailbox-view.gob"
-static void
-___real_mn_mailbox_view_activate_add (MNMailboxView * self G_GNUC_UNUSED)
-{
-#line 754 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_add"
-{
-#line 149 "src/mn-mailbox-view.gob"
-
- GtkWidget *dialog;
-
- dialog = mn_mailbox_properties_dialog_new(mn_widget_get_parent_window(GTK_WIDGET(self)), NULL);
-
- g_signal_connect(dialog,
- "response",
- G_CALLBACK(self_properties_add_response_h),
- NULL);
-
- gtk_widget_show(dialog);
- }}
-#line 770 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 162 "src/mn-mailbox-view.gob"
-void
-mn_mailbox_view_activate_remove (MNMailboxView * self)
-{
-#line 777 "mn-mailbox-view.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 162 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 162 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 788 "mn-mailbox-view.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[ACTIVATE_REMOVE_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 162 "src/mn-mailbox-view.gob"
-static void
-___real_mn_mailbox_view_activate_remove (MNMailboxView * self G_GNUC_UNUSED)
-{
-#line 805 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_remove"
-{
-#line 164 "src/mn-mailbox-view.gob"
-
- self_remove_mailbox(self);
- }}
-#line 812 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 168 "src/mn-mailbox-view.gob"
-void
-mn_mailbox_view_activate_cut (MNMailboxView * self)
-{
-#line 819 "mn-mailbox-view.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 168 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 168 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 830 "mn-mailbox-view.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[ACTIVATE_CUT_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 168 "src/mn-mailbox-view.gob"
-static void
-___real_mn_mailbox_view_activate_cut (MNMailboxView * self G_GNUC_UNUSED)
-{
-#line 847 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_cut"
-{
-#line 170 "src/mn-mailbox-view.gob"
-
- self_copy_mailbox(self);
- self_remove_mailbox(self);
- }}
-#line 855 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 175 "src/mn-mailbox-view.gob"
-void
-mn_mailbox_view_activate_copy (MNMailboxView * self)
-{
-#line 862 "mn-mailbox-view.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 175 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 175 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 873 "mn-mailbox-view.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[ACTIVATE_COPY_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 175 "src/mn-mailbox-view.gob"
-static void
-___real_mn_mailbox_view_activate_copy (MNMailboxView * self G_GNUC_UNUSED)
-{
-#line 890 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_copy"
-{
-#line 177 "src/mn-mailbox-view.gob"
-
- self_copy_mailbox(self);
- }}
-#line 897 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 181 "src/mn-mailbox-view.gob"
-void
-mn_mailbox_view_activate_paste (MNMailboxView * self)
-{
-#line 904 "mn-mailbox-view.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 181 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 181 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 915 "mn-mailbox-view.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[ACTIVATE_PASTE_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 181 "src/mn-mailbox-view.gob"
-static void
-___real_mn_mailbox_view_activate_paste (MNMailboxView * self G_GNUC_UNUSED)
-{
-#line 932 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_paste"
-{
-#line 183 "src/mn-mailbox-view.gob"
-
- GtkSelectionData *data;
-
- data = gtk_clipboard_wait_for_contents(global_clipboard, clipboard_info[TARGET_MAILBOXES].atom);
- if (data)
- {
- GSList *configurations;
- GSList *l;
-
- memcpy(&configurations, data->data, data->length);
-
- MN_LIST_FOREACH(l, configurations)
- {
- MNMailbox *mailbox;
-
- mailbox = mn_mailbox_new_from_configuration(l->data);
-
- mn_mailbox_seal(mailbox);
- mn_mailboxes_queue_add(mn_shell->mailboxes, mailbox);
-
- g_object_unref(mailbox);
- }
-
- gtk_selection_data_free(data);
- return;
- }
-
- data = gtk_clipboard_wait_for_contents(global_clipboard, clipboard_info[TARGET_GNOME_COPIED_FILES].atom);
- if (data)
- {
- if (data->format == 8 && data->length > 0)
- {
- char *gnome_copied_files;
- gboolean status;
- MNGnomeCopiedFilesType type;
- GSList *uri_list;
-
- gnome_copied_files = g_strndup(data->data, data->length);
- status = mn_parse_gnome_copied_files(gnome_copied_files, &type, &uri_list);
- g_free(gnome_copied_files);
-
- if (status)
- {
- if (type == MN_GNOME_COPIED_FILES_COPY)
- {
- GSList *l;
- GSList *invalid_uri_list = NULL;
-
- MN_LIST_FOREACH(l, uri_list)
- {
- const char *uri = l->data;
- MNMailbox *mailbox;
-
- mailbox = mn_mailbox_new_from_uri(uri);
- if (mailbox)
- {
- mn_mailbox_seal(mailbox);
- mn_mailboxes_queue_add(mn_shell->mailboxes, mailbox);
- g_object_unref(mailbox);
- }
- else
- invalid_uri_list = g_slist_append(invalid_uri_list, (gpointer) uri);
- }
-
- if (invalid_uri_list)
- {
- mn_show_invalid_uri_list_dialog(mn_widget_get_parent_window(GTK_WIDGET(self)), _("A paste error has occurred"), invalid_uri_list);
- g_slist_free(invalid_uri_list);
- }
- }
-
- mn_g_slist_free_deep(uri_list);
- }
- }
-
- gtk_selection_data_free(data);
- }
- }}
-#line 1014 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-
-
-#line 418 "src/mn-mailbox-view.gob"
-static int
-mn_mailbox_view_sort_cb (GtkTreeModel * model, GtkTreeIter * a, GtkTreeIter * b, gpointer user_data)
-{
-#line 1023 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::sort_cb"
-{
-#line 423 "src/mn-mailbox-view.gob"
-
- MNMailbox *mailbox_a;
- MNMailbox *mailbox_b;
- int cmp;
-
- gtk_tree_model_get(model, a, COLUMN_MAILBOX, &mailbox_a, -1);
- gtk_tree_model_get(model, b, COLUMN_MAILBOX, &mailbox_b, -1);
-
- cmp = mn_mailboxes_compare_by_name_func(mailbox_a, mailbox_b);
-
- g_object_unref(mailbox_a);
- g_object_unref(mailbox_b);
-
- return cmp;
- }}
-#line 1042 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 439 "src/mn-mailbox-view.gob"
-static gboolean
-mn_mailbox_view_search_equal_cb (GtkTreeModel * model, int column, const char * key, GtkTreeIter * iter, gpointer search_data)
-{
-#line 1049 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::search_equal_cb"
-{
-#line 445 "src/mn-mailbox-view.gob"
-
- gboolean status = TRUE;
- GValue value = { 0, };
- GValue transformed = { 0, };
- const char *str;
- char *normalized_string;
- char *normalized_key;
-
- /*
- * The stock gtk_tree_view_search_equal_func() only searches the
- * start of the string, using strncmp(). We use strstr(), to
- * search anywhere inside the string.
- */
-
- gtk_tree_model_get_value(model, iter, column, &value);
-
- g_value_init(&transformed, G_TYPE_STRING);
-
- if (! g_value_transform(&value, &transformed))
- {
- g_value_unset(&value);
- return TRUE;
- }
-
- g_value_unset(&value);
-
- str = g_value_get_string(&transformed);
- if (! str)
- {
- g_value_unset(&transformed);
- return TRUE;
- }
-
- normalized_string = g_utf8_normalize(str, -1, G_NORMALIZE_ALL);
- normalized_key = g_utf8_normalize(key, -1, G_NORMALIZE_ALL);
-
- if (normalized_string && normalized_key)
- {
- char *case_normalized_string;
- char *case_normalized_key;
-
- case_normalized_string = g_utf8_casefold(normalized_string, -1);
- case_normalized_key = g_utf8_casefold(normalized_key, -1);
-
- if (strstr(case_normalized_string, case_normalized_key))
- status = FALSE;
-
- g_free(case_normalized_string);
- g_free(case_normalized_key);
- }
-
- g_value_unset (&transformed);
- g_free(normalized_key);
- g_free(normalized_string);
-
- return status;
- }}
-#line 1110 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 503 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_append (MNMailboxView * self, MNMailbox * mailbox)
-{
-#line 1117 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::append"
-#line 503 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 503 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 503 "src/mn-mailbox-view.gob"
- g_return_if_fail (mailbox != NULL);
-#line 503 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1127 "mn-mailbox-view.c"
-{
-#line 505 "src/mn-mailbox-view.gob"
-
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(self));
- gtk_list_store_append(GTK_LIST_STORE(model), &iter);
- self_update_iter(self, &iter, mailbox);
- }}
-#line 1138 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 514 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_mailbox_added_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data)
-{
-#line 1145 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::mailbox_added_h"
-{
-#line 518 "src/mn-mailbox-view.gob"
-
- Self *self = user_data;
-
- if (! MN_IS_TEST_MAILBOX(mailbox))
- self_append(self, mailbox);
- }}
-#line 1155 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 525 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_mailbox_notify_h (MNMailboxes * mailboxes, MNMailbox * mailbox, GParamSpec * pspec, gpointer user_data)
-{
-#line 1162 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::mailbox_notify_h"
-{
-#line 530 "src/mn-mailbox-view.gob"
-
- Self *self = user_data;
- GtkTreeIter iter;
-
- if (self_find_mailbox(self, mailbox, &iter))
- self_update_iter(self, &iter, mailbox);
- }}
-#line 1173 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 538 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data)
-{
-#line 1180 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::mailbox_removed_h"
-{
-#line 542 "src/mn-mailbox-view.gob"
-
- Self *self = user_data;
- GtkTreeIter iter;
-
- if (self_find_mailbox(self, mailbox, &iter))
- {
- GtkTreeModel *model;
-
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(self));
- gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
- }
- }}
-#line 1196 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 555 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_update_iter (MNMailboxView * self, GtkTreeIter * iter, MNMailbox * mailbox)
-{
-#line 1203 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::update_iter"
-#line 555 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 555 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 555 "src/mn-mailbox-view.gob"
- g_return_if_fail (iter != NULL);
-#line 555 "src/mn-mailbox-view.gob"
- g_return_if_fail (mailbox != NULL);
-#line 555 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1215 "mn-mailbox-view.c"
-{
-#line 559 "src/mn-mailbox-view.gob"
-
- GtkTreeModel *model;
- char *status;
- const char *emblem_stock_id = NULL;
- GdkPixbuf *emblem = NULL;
- char *markup;
- char *text;
-
- if (mailbox->format)
- {
- if (mailbox->error)
- {
- status = g_strdup_printf(_("unhandled %s mailbox (%s)"), mailbox->format, mailbox->error);
- emblem_stock_id = MN_STOCK_ERROR;
- }
- else
- status = g_strdup_printf(_("%s mailbox"), mailbox->format);
- }
- else
- {
- if (mailbox->error)
- {
- status = g_strdup(mailbox->error);
- emblem_stock_id = MN_STOCK_ERROR;
- }
- else
- {
- status = g_strdup(_("detecting mailbox type..."));
- emblem_stock_id = GTK_STOCK_EXECUTE;
- }
- }
-
- if (emblem_stock_id)
- emblem = gtk_widget_render_icon(GTK_WIDGET(self),
- emblem_stock_id,
- GTK_ICON_SIZE_MENU,
- NULL);
-
- markup = g_markup_printf_escaped("<span weight=\"bold\">%s</span>\n%s",
- mailbox->runtime_name,
- status);
- text = g_strdup_printf("%s\n%s", mailbox->runtime_name, status);
- g_free(status);
-
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(self));
- gtk_list_store_set(GTK_LIST_STORE(model), iter,
- COLUMN_MAILBOX, mailbox,
- COLUMN_ICON, mailbox->stock_id,
- COLUMN_EMBLEM, emblem,
- COLUMN_PIXBUF, NULL,
- COLUMN_LABEL, markup,
- COLUMN_RAW_LABEL, text,
- -1);
-
- if (emblem)
- g_object_unref(emblem);
-
- g_free(markup);
- g_free(text);
- }}
-#line 1278 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 620 "src/mn-mailbox-view.gob"
-static gboolean
-mn_mailbox_view_find_mailbox (MNMailboxView * self, MNMailbox * mailbox, GtkTreeIter * iter)
-{
-#line 1285 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::find_mailbox"
-#line 620 "src/mn-mailbox-view.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 620 "src/mn-mailbox-view.gob"
- g_return_val_if_fail (MN_IS_MAILBOX_VIEW (self), (gboolean )0);
-#line 620 "src/mn-mailbox-view.gob"
- g_return_val_if_fail (mailbox != NULL, (gboolean )0);
-#line 620 "src/mn-mailbox-view.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (gboolean )0);
-#line 620 "src/mn-mailbox-view.gob"
- g_return_val_if_fail (iter != NULL, (gboolean )0);
-#line 1297 "mn-mailbox-view.c"
-{
-#line 624 "src/mn-mailbox-view.gob"
-
- GtkTreeModel *model;
- GtkTreeIter our_iter;
- gboolean valid;
-
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(self));
-
- MN_TREE_MODEL_FOREACH(valid, &our_iter, model)
- {
- MNMailbox *this_mailbox;
- gboolean is;
-
- gtk_tree_model_get(model, &our_iter, COLUMN_MAILBOX, &this_mailbox, -1);
- is = mailbox == this_mailbox;
- g_object_unref(this_mailbox);
-
- if (is)
- {
- *iter = our_iter;
- return TRUE;
- }
- }
-
- return FALSE;
- }}
-#line 1325 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 650 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_update_sensitivity (MNMailboxView * self)
-{
-#line 1332 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::update_sensitivity"
-#line 650 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 650 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1338 "mn-mailbox-view.c"
-{
-#line 652 "src/mn-mailbox-view.gob"
-
- GtkTreeSelection *selection;
- SensitivityInfo info = { FALSE, FALSE };
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean has_mailboxes;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
- gtk_tree_selection_selected_foreach(selection, self_update_sensitivity_cb, &info);
-
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(self));
- has_mailboxes = gtk_tree_model_get_iter_first(model, &iter);
-
- gtk_widget_set_sensitive(selfp->properties_item, info.has_selection);
- gtk_widget_set_sensitive(selfp->update_item, info.has_manually_checkable);
- gtk_widget_set_sensitive(selfp->remove_item, info.has_selection);
- gtk_widget_set_sensitive(selfp->cut_item, info.has_selection);
- gtk_widget_set_sensitive(selfp->copy_item, info.has_selection);
- gtk_widget_set_sensitive(selfp->select_all_item, has_mailboxes);
- }}
-#line 1361 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 673 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_update_sensitivity_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-{
-#line 1368 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::update_sensitivity_cb"
-{
-#line 678 "src/mn-mailbox-view.gob"
-
- SensitivityInfo *info = data;
-
- info->has_selection = TRUE;
- if (! info->has_manually_checkable)
- {
- MNMailbox *mailbox;
-
- gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
- if (mn_mailbox_get_manually_checkable(mailbox))
- info->has_manually_checkable = TRUE;
- g_object_unref(mailbox);
- }
- }}
-#line 1386 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 693 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_remove_mailbox (MNMailboxView * self)
-{
-#line 1393 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::remove_mailbox"
-#line 693 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 693 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1399 "mn-mailbox-view.c"
-{
-#line 695 "src/mn-mailbox-view.gob"
-
- GtkTreeSelection *selection;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
- gtk_tree_selection_selected_foreach(selection, self_remove_mailbox_cb, NULL);
- }}
-#line 1408 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 702 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_remove_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-{
-#line 1415 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::remove_mailbox_cb"
-{
-#line 707 "src/mn-mailbox-view.gob"
-
- MNMailbox *mailbox;
-
- gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
- mn_mailboxes_queue_remove(mn_shell->mailboxes, mailbox);
- g_object_unref(mailbox);
- }}
-#line 1426 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 715 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_copy_mailbox (MNMailboxView * self)
-{
-#line 1433 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::copy_mailbox"
-#line 715 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 715 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1439 "mn-mailbox-view.c"
-{
-#line 717 "src/mn-mailbox-view.gob"
-
- GSList *configurations = NULL;
- GtkTreeSelection *selection;
- const GtkTargetEntry targets[] = {
- { clipboard_info[TARGET_MAILBOXES].name, 0, TARGET_MAILBOXES }
- };
- gboolean status;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
- gtk_tree_selection_selected_foreach(selection, self_copy_mailbox_cb, &configurations);
-
- status = gtk_clipboard_set_with_data(global_clipboard,
- targets,
- G_N_ELEMENTS(targets),
- self_get_clipboard_cb,
- self_clear_clipboard_cb,
- configurations);
- g_assert(status == TRUE);
- }}
-#line 1461 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 737 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_copy_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-{
-#line 1468 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::copy_mailbox_cb"
-{
-#line 742 "src/mn-mailbox-view.gob"
-
- GSList **configurations = data;
- MNMailbox *mailbox;
-
- /*
- * Note that the MNMailboxConfiguration object returned by
- * mn_mailbox_get_configuration() does not include the keyring
- * password. This is not a problem unless the user copies a
- * mailbox, removes the password from the keyring and then pastes
- * the mailbox: the pasted mailbox will have no password.
- *
- * Including the password in MNMailboxConfiguration would require
- * to cope with the fact that gnome-keyring requests can block the
- * UI. It's really not worth the effort.
- */
-
- gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
- *configurations = g_slist_append(*configurations, mn_mailbox_get_configuration(mailbox));
- g_object_unref(mailbox);
- }}
-#line 1492 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 763 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_get_clipboard_cb (GtkClipboard * clipboard, GtkSelectionData * selection_data, unsigned int info, gpointer user_data_or_owner)
-{
-#line 1499 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::get_clipboard_cb"
-{
-#line 768 "src/mn-mailbox-view.gob"
-
- GSList *configurations = user_data_or_owner;
-
- g_assert(info == TARGET_MAILBOXES);
-
- gtk_selection_data_set(selection_data,
- clipboard_info[info].atom,
- 8,
- (unsigned char *) &configurations,
- sizeof(configurations));
- }}
-#line 1514 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 780 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_clear_clipboard_cb (GtkClipboard * clipboard, gpointer user_data_or_owner)
-{
-#line 1521 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::clear_clipboard_cb"
-{
-#line 782 "src/mn-mailbox-view.gob"
-
- GSList *configurations = user_data_or_owner;
-
- mn_g_slist_free_deep_custom(configurations, (GFunc) mn_mailbox_configuration_free, NULL);
- }}
-#line 1530 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 788 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_select_all (MNMailboxView * self)
-{
-#line 1537 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::select_all"
-#line 788 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 788 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1543 "mn-mailbox-view.c"
-{
-#line 790 "src/mn-mailbox-view.gob"
-
- GtkTreeSelection *selection;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
- gtk_tree_selection_select_all(selection);
- }}
-#line 1552 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 797 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_properties_add_response_h (GtkDialog * dialog, int response, gpointer user_data)
-{
-#line 1559 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::properties_add_response_h"
-{
-#line 801 "src/mn-mailbox-view.gob"
-
- switch (response)
- {
- case GTK_RESPONSE_CANCEL:
- gtk_widget_destroy(GTK_WIDGET(dialog));
- break;
-
- case GTK_RESPONSE_ACCEPT:
- {
- MNMailbox *mailbox;
-
- mailbox = mn_mailbox_properties_dialog_get_current_mailbox(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
- g_assert(MN_IS_MAILBOX(mailbox));
-
- mn_mailbox_seal(mailbox);
- mn_mailboxes_add(mn_shell->mailboxes, mailbox);
- g_object_unref(mailbox);
-
- gtk_widget_destroy(GTK_WIDGET(dialog));
- }
- break;
- }
- }}
-#line 1586 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 825 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_properties_edit_response_h (GtkDialog * dialog, int response, gpointer user_data)
-{
-#line 1593 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::properties_edit_response_h"
-{
-#line 829 "src/mn-mailbox-view.gob"
-
- switch (response)
- {
- case GTK_RESPONSE_APPLY:
- mn_mailbox_properties_dialog_apply(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
- break;
-
- case GTK_RESPONSE_CANCEL:
- mn_mailbox_properties_dialog_cancel(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
- gtk_widget_destroy(GTK_WIDGET(dialog));
- break;
-
- case GTK_RESPONSE_OK:
- mn_mailbox_properties_dialog_apply(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
- gtk_widget_destroy(GTK_WIDGET(dialog));
- break;
- }
- }}
-#line 1615 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 848 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_popup_menu (MNMailboxView * self, unsigned int button, guint32 activate_time)
-{
-#line 1622 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu"
-#line 848 "src/mn-mailbox-view.gob"
- g_return_if_fail (self != NULL);
-#line 848 "src/mn-mailbox-view.gob"
- g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1628 "mn-mailbox-view.c"
-{
-#line 850 "src/mn-mailbox-view.gob"
-
- Self **self_box;
-
- gtk_widget_set_sensitive(selfp->paste_item, FALSE);
-
- /* do not crash if self is finalized before the request completes */
- self_box = g_new(Self *, 1);
- *self_box = self;
- mn_add_weak_pointer(self_box);
-
- gtk_clipboard_request_targets(global_clipboard, self_popup_menu_targets_received_cb, self_box);
-
- gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, NULL, NULL, button, activate_time);
- }}
-#line 1645 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 865 "src/mn-mailbox-view.gob"
-static gboolean
-mn_mailbox_view_can_paste (GdkAtom * atoms, int n_atoms)
-{
-#line 1652 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::can_paste"
-{
-#line 867 "src/mn-mailbox-view.gob"
-
- int i;
-
- for (i = 0; i < n_atoms; i++)
- if (atoms[i] == clipboard_info[TARGET_MAILBOXES].atom
- || atoms[i] == clipboard_info[TARGET_GNOME_COPIED_FILES].atom)
- return TRUE;
-
- return FALSE;
- }}
-#line 1666 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 878 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_popup_menu_targets_received_cb (GtkClipboard * clipboard, GdkAtom * atoms, int n_atoms, gpointer data)
-{
-#line 1673 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu_targets_received_cb"
-{
-#line 883 "src/mn-mailbox-view.gob"
-
- Self **self_box = data;
- Self *self = *self_box;
-
- if (self)
- {
- if (atoms)
- gtk_widget_set_sensitive(selfp->paste_item, self_can_paste(atoms, n_atoms));
-
- mn_remove_weak_pointer(self_box);
- }
-
- g_free(self_box);
- }}
-#line 1691 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 898 "src/mn-mailbox-view.gob"
-static gboolean
-mn_mailbox_view_popup_menu_h (GtkWidget * widget, gpointer user_data)
-{
-#line 1698 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu_h"
-{
-#line 900 "src/mn-mailbox-view.gob"
-
- Self *self = SELF(widget);
-
- self_popup_menu(self, 0, gtk_get_current_event_time());
- gtk_menu_shell_select_first(GTK_MENU_SHELL(selfp->menu), FALSE);
-
- return TRUE; /* a menu was activated */
- }}
-#line 1710 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 909 "src/mn-mailbox-view.gob"
-static gboolean
-mn_mailbox_view_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-{
-#line 1717 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::button_press_event_h"
-{
-#line 913 "src/mn-mailbox-view.gob"
-
- if (event->button == 3)
- self_popup_menu(SELF(widget), event->button, event->time);
-
- return FALSE; /* propagate event */
- }}
-#line 1727 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 920 "src/mn-mailbox-view.gob"
-static void
-mn_mailbox_view_row_activated_h (GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * column, gpointer user_data)
-{
-#line 1734 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::row_activated_h"
-{
-#line 925 "src/mn-mailbox-view.gob"
-
- self_activate_properties(SELF(treeview));
- }}
-#line 1741 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
-
-#line 929 "src/mn-mailbox-view.gob"
-GtkWidget *
-mn_mailbox_view_new (void)
-{
-#line 1748 "mn-mailbox-view.c"
-#define __GOB_FUNCTION__ "MN:Mailbox:View::new"
-{
-#line 931 "src/mn-mailbox-view.gob"
-
- g_return_val_if_fail(mn_shell != NULL, NULL);
- return GTK_WIDGET(GET_NEW);
- }}
-#line 1756 "mn-mailbox-view.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-mailbox-view.gob.stamp b/build/src/mn-mailbox-view.gob.stamp
diff --git a/build/src/mn-mailbox-view.h b/build/src/mn-mailbox-view.h
@@ -1,143 +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_MAILBOX_VIEW_H__
-#define __MN_MAILBOX_VIEW_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAILBOX_VIEW (mn_mailbox_view_get_type())
-#define MN_MAILBOX_VIEW(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailbox_view_get_type(), MNMailboxView)
-#define MN_MAILBOX_VIEW_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailbox_view_get_type(), MNMailboxView const)
-#define MN_MAILBOX_VIEW_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mailbox_view_get_type(), MNMailboxViewClass)
-#define MN_IS_MAILBOX_VIEW(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mailbox_view_get_type ())
-
-#define MN_MAILBOX_VIEW_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mailbox_view_get_type(), MNMailboxViewClass)
-
-/* Private structure type */
-typedef struct _MNMailboxViewPrivate MNMailboxViewPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAILBOX_VIEW__
-#define __TYPEDEF_MN_MAILBOX_VIEW__
-typedef struct _MNMailboxView MNMailboxView;
-#endif
-struct _MNMailboxView {
- GtkTreeView __parent__;
- /*< private >*/
- MNMailboxViewPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMailboxViewClass MNMailboxViewClass;
-struct _MNMailboxViewClass {
- GtkTreeViewClass __parent__;
- /*signal*/void (* activate_update) (MNMailboxView * self);
- /*signal*/void (* activate_properties) (MNMailboxView * self);
- /*signal*/void (* activate_add) (MNMailboxView * self);
- /*signal*/void (* activate_remove) (MNMailboxView * self);
- /*signal*/void (* activate_cut) (MNMailboxView * self);
- /*signal*/void (* activate_copy) (MNMailboxView * self);
- /*signal*/void (* activate_paste) (MNMailboxView * self);
-};
-
-
-/*
- * Public methods
- */
-GType mn_mailbox_view_get_type (void) G_GNUC_CONST;
-#line 84 "src/mn-mailbox-view.gob"
-void mn_mailbox_view_activate_update (MNMailboxView * self);
-#line 67 "mn-mailbox-view.h"
-#line 107 "src/mn-mailbox-view.gob"
-void mn_mailbox_view_activate_properties (MNMailboxView * self);
-#line 70 "mn-mailbox-view.h"
-#line 147 "src/mn-mailbox-view.gob"
-void mn_mailbox_view_activate_add (MNMailboxView * self);
-#line 73 "mn-mailbox-view.h"
-#line 162 "src/mn-mailbox-view.gob"
-void mn_mailbox_view_activate_remove (MNMailboxView * self);
-#line 76 "mn-mailbox-view.h"
-#line 168 "src/mn-mailbox-view.gob"
-void mn_mailbox_view_activate_cut (MNMailboxView * self);
-#line 79 "mn-mailbox-view.h"
-#line 175 "src/mn-mailbox-view.gob"
-void mn_mailbox_view_activate_copy (MNMailboxView * self);
-#line 82 "mn-mailbox-view.h"
-#line 181 "src/mn-mailbox-view.gob"
-void mn_mailbox_view_activate_paste (MNMailboxView * self);
-#line 85 "mn-mailbox-view.h"
-#line 929 "src/mn-mailbox-view.gob"
-GtkWidget * mn_mailbox_view_new (void);
-#line 88 "mn-mailbox-view.h"
-
-/*
- * Signal connection wrapper macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define mn_mailbox_view_connect__activate_update(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data))
-#define mn_mailbox_view_connect_after__activate_update(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data))
-#define mn_mailbox_view_connect_data__activate_update(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_properties(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_properties",(GCallback) __extension__ ({void (* ___activate_properties) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_properties; }), (data))
-#define mn_mailbox_view_connect_after__activate_properties(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_properties",(GCallback) __extension__ ({void (* ___activate_properties) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_properties; }), (data))
-#define mn_mailbox_view_connect_data__activate_properties(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_properties",(GCallback) __extension__ ({void (* ___activate_properties) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_properties; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_add(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_add",(GCallback) __extension__ ({void (* ___activate_add) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_add; }), (data))
-#define mn_mailbox_view_connect_after__activate_add(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_add",(GCallback) __extension__ ({void (* ___activate_add) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_add; }), (data))
-#define mn_mailbox_view_connect_data__activate_add(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_add",(GCallback) __extension__ ({void (* ___activate_add) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_add; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_remove(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_remove",(GCallback) __extension__ ({void (* ___activate_remove) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_remove; }), (data))
-#define mn_mailbox_view_connect_after__activate_remove(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_remove",(GCallback) __extension__ ({void (* ___activate_remove) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_remove; }), (data))
-#define mn_mailbox_view_connect_data__activate_remove(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_remove",(GCallback) __extension__ ({void (* ___activate_remove) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_remove; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_cut(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_cut",(GCallback) __extension__ ({void (* ___activate_cut) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_cut; }), (data))
-#define mn_mailbox_view_connect_after__activate_cut(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_cut",(GCallback) __extension__ ({void (* ___activate_cut) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_cut; }), (data))
-#define mn_mailbox_view_connect_data__activate_cut(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_cut",(GCallback) __extension__ ({void (* ___activate_cut) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_cut; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_copy(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_copy",(GCallback) __extension__ ({void (* ___activate_copy) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_copy; }), (data))
-#define mn_mailbox_view_connect_after__activate_copy(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_copy",(GCallback) __extension__ ({void (* ___activate_copy) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_copy; }), (data))
-#define mn_mailbox_view_connect_data__activate_copy(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_copy",(GCallback) __extension__ ({void (* ___activate_copy) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_copy; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_paste(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_paste",(GCallback) __extension__ ({void (* ___activate_paste) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_paste; }), (data))
-#define mn_mailbox_view_connect_after__activate_paste(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_paste",(GCallback) __extension__ ({void (* ___activate_paste) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_paste; }), (data))
-#define mn_mailbox_view_connect_data__activate_paste(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(__extension__ ({MNMailboxView *___object = (object); ___object; })),"activate_paste",(GCallback) __extension__ ({void (* ___activate_paste) (MNMailboxView * ___fake___self, gpointer ___data ) = (func); ___activate_paste; }), (data), (destroy_data), (GConnectFlags)(flags))
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define mn_mailbox_view_connect__activate_update(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(object),"activate_update",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_after__activate_update(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(object),"activate_update",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_data__activate_update(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(object),"activate_update",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_properties(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(object),"activate_properties",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_after__activate_properties(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(object),"activate_properties",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_data__activate_properties(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(object),"activate_properties",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_add(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(object),"activate_add",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_after__activate_add(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(object),"activate_add",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_data__activate_add(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(object),"activate_add",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_remove(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(object),"activate_remove",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_after__activate_remove(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(object),"activate_remove",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_data__activate_remove(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(object),"activate_remove",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_cut(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(object),"activate_cut",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_after__activate_cut(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(object),"activate_cut",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_data__activate_cut(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(object),"activate_cut",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_copy(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(object),"activate_copy",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_after__activate_copy(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(object),"activate_copy",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_data__activate_copy(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(object),"activate_copy",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailbox_view_connect__activate_paste(object,func,data) g_signal_connect(MN_MAILBOX_VIEW(object),"activate_paste",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_after__activate_paste(object,func,data) g_signal_connect_after(MN_MAILBOX_VIEW(object),"activate_paste",(GCallback)(func),(data))
-#define mn_mailbox_view_connect_data__activate_paste(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX_VIEW(object),"activate_paste",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailbox.c b/build/src/mn-mailbox.c
@@ -1,2397 +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-mailbox.h"
-
-#include "mn-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 56 "src/mn-mailbox.gob"
-
-#include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs.h>
-#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
-#include "mn-system-vfs-mailbox.h"
-#include "mn-custom-vfs-mailbox.h"
-#endif
-#if WITH_POP3
-#include "mn-pop3-mailbox.h"
-#endif
-#if WITH_IMAP
-#include "mn-imap-mailbox.h"
-#endif
-#if WITH_GMAIL
-#include "mn-gmail-mailbox.h"
-#endif
-#if WITH_YAHOO
-#include "mn-yahoo-mailbox.h"
-#endif
-#if WITH_HOTMAIL
-#include "mn-hotmail-mailbox.h"
-#endif
-#if WITH_EVOLUTION
-#include "mn-evolution-mailbox.h"
-#endif
-#include "mn-util.h"
-#include "mn-message.h"
-#include "mn-conf.h"
-#include "mn-locked-callback.h"
-#include "mn-shell.h"
-
-struct _MNMailboxConfiguration
-{
- GType type;
- unsigned int n_parameters;
- GParameter *parameters;
-};
-
-GType mn_mailbox_types[MN_MAILBOX_MAX_TYPES + 1];
-
-typedef struct
-{
- MNMailbox *self;
- GHashTable *messages;
- GHashTable *messages_considered_as_read;
- gboolean display_seen_mail;
-} FilterMessagesInfo;
-
-typedef struct
-{
- GHashTable *other;
- gboolean changed;
-} CompareMessagesInfo;
-
-static unsigned int cleanup_messages_considered_as_read_idle_id = 0;
-
-#line 83 "mn-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_MAILBOX(x)
-#define SELF_CONST(x) MN_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_MAILBOX
-#define SELF_CLASS(x) MN_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMailbox Self;
-typedef MNMailboxClass 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-mailbox.gob"
-static void mn_mailbox_class_init (MNMailboxClass * c) G_GNUC_UNUSED;
-#line 102 "mn-mailbox.c"
-#line 141 "src/mn-mailbox.gob"
-static void mn_mailbox_set_active (MNMailbox * self, gboolean value) G_GNUC_UNUSED;
-#line 105 "mn-mailbox.c"
-static void ___real_mn_mailbox_added (MNMailbox * self);
-static void ___real_mn_mailbox_removed (MNMailbox * self);
-#line 259 "src/mn-mailbox.gob"
-static void mn_mailbox_update_check_timeout (MNMailbox * self) G_GNUC_UNUSED;
-#line 110 "mn-mailbox.c"
-#line 330 "src/mn-mailbox.gob"
-static void mn_mailbox_filter_messages (MNMailbox * self) G_GNUC_UNUSED;
-#line 113 "mn-mailbox.c"
-#line 366 "src/mn-mailbox.gob"
-static void mn_mailbox_filter_messages_cb (const char * id, MNMessage * message, FilterMessagesInfo * info) G_GNUC_UNUSED;
-#line 116 "mn-mailbox.c"
-#line 395 "src/mn-mailbox.gob"
-static gboolean mn_mailbox_compare_messages (GHashTable * messages1, GHashTable * messages2) G_GNUC_UNUSED;
-#line 119 "mn-mailbox.c"
-#line 407 "src/mn-mailbox.gob"
-static void mn_mailbox_compare_messages_cb (const char * id, MNMessage * message, CompareMessagesInfo * info) G_GNUC_UNUSED;
-#line 122 "mn-mailbox.c"
-#line 416 "src/mn-mailbox.gob"
-static void mn_mailbox_queue_cleanup_messages_considered_as_read (void) G_GNUC_UNUSED;
-#line 125 "mn-mailbox.c"
-#line 423 "src/mn-mailbox.gob"
-static gboolean mn_mailbox_cleanup_messages_considered_as_read_cb (gpointer data) G_GNUC_UNUSED;
-#line 128 "mn-mailbox.c"
-#line 444 "src/mn-mailbox.gob"
-static void mn_mailbox_cleanup_messages_considered_as_read (void) G_GNUC_UNUSED;
-#line 131 "mn-mailbox.c"
-#line 472 "src/mn-mailbox.gob"
-static gboolean mn_mailbox_cleanup_messages_considered_as_read_remove_cb (const char * id, gpointer value, gpointer user_data) G_GNUC_UNUSED;
-#line 134 "mn-mailbox.c"
-#line 503 "src/mn-mailbox.gob"
-static void mn_mailbox_messages_changed (MNMailbox * self, gboolean has_new) G_GNUC_UNUSED;
-#line 137 "mn-mailbox.c"
-#line 596 "src/mn-mailbox.gob"
-static void mn_mailbox_init (MNMailbox * self) G_GNUC_UNUSED;
-#line 140 "mn-mailbox.c"
-#line 604 "src/mn-mailbox.gob"
-static void mn_mailbox_finalize (MNMailbox * self) G_GNUC_UNUSED;
-#line 143 "mn-mailbox.c"
-#line 615 "src/mn-mailbox.gob"
-static void mn_mailbox_notify_display_seen_messages_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-#line 146 "mn-mailbox.c"
-#line 626 "src/mn-mailbox.gob"
-static void mn_mailbox_notify_messages_considered_as_read_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-#line 149 "mn-mailbox.c"
-#line 811 "src/mn-mailbox.gob"
-static MNMailbox * mn_mailbox_parse_obsolete_uri (const char * uri) G_GNUC_UNUSED;
-#line 152 "mn-mailbox.c"
-#line 1035 "src/mn-mailbox.gob"
-static gboolean mn_mailbox_check_timeout_cb (gpointer data) G_GNUC_UNUSED;
-#line 155 "mn-mailbox.c"
-#line 1045 "src/mn-mailbox.gob"
-static gboolean mn_mailbox_validate (MNMailbox * self, GError ** err) G_GNUC_UNUSED;
-#line 158 "mn-mailbox.c"
-static void ___real_mn_mailbox_seal (MNMailbox * self);
-#line 1109 "src/mn-mailbox.gob"
-static MNMailbox * mn_mailbox_parse_uri (MNMailbox * self, const char * uri) G_GNUC_UNUSED;
-#line 162 "mn-mailbox.c"
-static void ___real_mn_mailbox_check (MNMailbox * self);
-
-/*
- * Signal connection wrapper macro shortcuts
- */
-#define self_connect__added(object,func,data) mn_mailbox_connect__added((object),(func),(data))
-#define self_connect_after__added(object,func,data) mn_mailbox_connect_after__added((object),(func),(data))
-#define self_connect_data__added(object,func,data,destroy_data,flags) mn_mailbox_connect_data__added((object),(func),(data),(destroy_data),(flags))
-#define self_connect__removed(object,func,data) mn_mailbox_connect__removed((object),(func),(data))
-#define self_connect_after__removed(object,func,data) mn_mailbox_connect_after__removed((object),(func),(data))
-#define self_connect_data__removed(object,func,data,destroy_data,flags) mn_mailbox_connect_data__removed((object),(func),(data),(destroy_data),(flags))
-#define self_connect__messages_changed(object,func,data) mn_mailbox_connect__messages_changed((object),(func),(data))
-#define self_connect_after__messages_changed(object,func,data) mn_mailbox_connect_after__messages_changed((object),(func),(data))
-#define self_connect_data__messages_changed(object,func,data,destroy_data,flags) mn_mailbox_connect_data__messages_changed((object),(func),(data),(destroy_data),(flags))
-
-typedef void (*___Sig1) (MNMailbox *, gboolean , 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 ((MNMailbox *)data1,
- (gboolean ) g_value_get_boolean (param_values + 1),
- data2);
-}
-
-
-enum {
- ADDED_SIGNAL,
- REMOVED_SIGNAL,
- MESSAGES_CHANGED_SIGNAL,
- LAST_SIGNAL
-};
-
-enum {
- PROP_0,
- PROP_NAME,
- PROP_OPEN_COMMAND,
- PROP_MARK_AS_READ_COMMAND,
- PROP_MARK_AS_SPAM_COMMAND,
- PROP_DELETE_COMMAND,
- PROP_STOCK_ID,
- PROP_FORMAT,
- PROP_CHECK_DELAY,
- PROP_POLL,
- PROP_MANUALLY_CHECKABLE,
- PROP_MESSAGES,
- PROP_ERROR
-};
-
-static guint object_signals[LAST_SIGNAL] = {0};
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_get_active mn_mailbox_get_active
-#define self_set_active mn_mailbox_set_active
-#define self_added mn_mailbox_added
-#define self_removed mn_mailbox_removed
-#define self_get_stock_id mn_mailbox_get_stock_id
-#define self_set_stock_id mn_mailbox_set_stock_id
-#define self_get_format mn_mailbox_get_format
-#define self_set_format mn_mailbox_set_format
-#define self_get_poll mn_mailbox_get_poll
-#define self_set_poll mn_mailbox_set_poll
-#define self_get_manually_checkable mn_mailbox_get_manually_checkable
-#define self_update_check_timeout mn_mailbox_update_check_timeout
-#define self_set_messages mn_mailbox_set_messages
-#define self_filter_messages mn_mailbox_filter_messages
-#define self_filter_messages_cb mn_mailbox_filter_messages_cb
-#define self_compare_messages mn_mailbox_compare_messages
-#define self_compare_messages_cb mn_mailbox_compare_messages_cb
-#define self_queue_cleanup_messages_considered_as_read mn_mailbox_queue_cleanup_messages_considered_as_read
-#define self_cleanup_messages_considered_as_read_cb mn_mailbox_cleanup_messages_considered_as_read_cb
-#define self_cleanup_messages_considered_as_read mn_mailbox_cleanup_messages_considered_as_read
-#define self_cleanup_messages_considered_as_read_remove_cb mn_mailbox_cleanup_messages_considered_as_read_remove_cb
-#define self_messages_changed mn_mailbox_messages_changed
-#define self_set_error mn_mailbox_set_error
-#define self_init_types mn_mailbox_init_types
-#define self_get_class_from_name mn_mailbox_get_class_from_name
-#define self_get_type_from_name mn_mailbox_get_type_from_name
-#define self_notify_display_seen_messages_cb mn_mailbox_notify_display_seen_messages_cb
-#define self_notify_messages_considered_as_read_cb mn_mailbox_notify_messages_considered_as_read_cb
-#define self_new mn_mailbox_new
-#define self_new_from_xml_node mn_mailbox_new_from_xml_node
-#define self_xml_node_new mn_mailbox_xml_node_new
-#define self_new_from_uri mn_mailbox_new_from_uri
-#define self_new_from_configuration mn_mailbox_new_from_configuration
-#define self_get_configuration mn_mailbox_get_configuration
-#define self_configuration_free mn_mailbox_configuration_free
-#define self_new_from_obsolete_uri mn_mailbox_new_from_obsolete_uri
-#define self_parse_obsolete_uri mn_mailbox_parse_obsolete_uri
-#define self_check_timeout_cb mn_mailbox_check_timeout_cb
-#define self_validate mn_mailbox_validate
-#define self_seal mn_mailbox_seal
-#define self_parse_uri mn_mailbox_parse_uri
-#define self_check mn_mailbox_check
-#define self_enable_checking mn_mailbox_enable_checking
-#define self_notice mn_mailbox_notice
-#define self_warning mn_mailbox_warning
-#define self_get_message_from_mid mn_mailbox_get_message_from_mid
-#define self_get_command mn_mailbox_get_command
-#define self_has_command mn_mailbox_has_command
-GType
-mn_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNMailbox", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMailbox *)g_object_new(mn_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMailbox *)g_object_new_valist (mn_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox::finalize"
- MNMailbox *self G_GNUC_UNUSED = MN_MAILBOX (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 604 "src/mn-mailbox.gob"
- mn_mailbox_finalize (self);
-#line 338 "mn-mailbox.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 192 "src/mn-mailbox.gob"
- if(self->runtime_name) { g_free ((gpointer) self->runtime_name); self->runtime_name = NULL; }
-#line 343 "mn-mailbox.c"
-#line 194 "src/mn-mailbox.gob"
- if(self->name) { g_free ((gpointer) self->name); self->name = NULL; }
-#line 346 "mn-mailbox.c"
-#line 197 "src/mn-mailbox.gob"
- if(self->open_command) { g_free ((gpointer) self->open_command); self->open_command = NULL; }
-#line 349 "mn-mailbox.c"
-#line 200 "src/mn-mailbox.gob"
- if(self->mark_as_read_command) { g_free ((gpointer) self->mark_as_read_command); self->mark_as_read_command = NULL; }
-#line 352 "mn-mailbox.c"
-#line 203 "src/mn-mailbox.gob"
- if(self->mark_as_spam_command) { g_free ((gpointer) self->mark_as_spam_command); self->mark_as_spam_command = NULL; }
-#line 355 "mn-mailbox.c"
-#line 206 "src/mn-mailbox.gob"
- if(self->delete_command) { g_free ((gpointer) self->delete_command); self->delete_command = NULL; }
-#line 358 "mn-mailbox.c"
-#line 209 "src/mn-mailbox.gob"
- if(self->stock_id) { g_free ((gpointer) self->stock_id); self->stock_id = NULL; }
-#line 361 "mn-mailbox.c"
-#line 212 "src/mn-mailbox.gob"
- if(self->format) { g_free ((gpointer) self->format); self->format = NULL; }
-#line 364 "mn-mailbox.c"
-#line 274 "src/mn-mailbox.gob"
- if(self->_priv->all_messages) { g_hash_table_destroy ((gpointer) self->_priv->all_messages); self->_priv->all_messages = NULL; }
-#line 367 "mn-mailbox.c"
-#line 277 "src/mn-mailbox.gob"
- if(self->_priv->all_messages_by_mid) { g_hash_table_destroy ((gpointer) self->_priv->all_messages_by_mid); self->_priv->all_messages_by_mid = NULL; }
-#line 370 "mn-mailbox.c"
-#line 280 "src/mn-mailbox.gob"
- if(self->messages) { g_hash_table_destroy ((gpointer) self->messages); self->messages = NULL; }
-#line 373 "mn-mailbox.c"
-#line 506 "src/mn-mailbox.gob"
- if(self->error) { g_free ((gpointer) self->error); self->error = NULL; }
-#line 376 "mn-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mailbox::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNMailboxPrivate));
-#line 56 "src/mn-mailbox.gob"
- c->default_check_delay = -1;
-#line 389 "mn-mailbox.c"
-#line 56 "src/mn-mailbox.gob"
- c->enable_checking_when_added = TRUE;
-#line 392 "mn-mailbox.c"
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- object_signals[ADDED_SIGNAL] =
- g_signal_new ("added",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxClass, added),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[REMOVED_SIGNAL] =
- g_signal_new ("removed",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
- G_STRUCT_OFFSET (MNMailboxClass, removed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[MESSAGES_CHANGED_SIGNAL] =
- g_signal_new ("messages_changed",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST),
- G_STRUCT_OFFSET (MNMailboxClass, messages_changed),
- NULL, NULL,
- ___marshal_Sig1,
- G_TYPE_NONE, 1,
- G_TYPE_BOOLEAN);
- if ___GOB_UNLIKELY(sizeof(gboolean ) != sizeof(gboolean ) || parent_class == NULL /* avoid warning */) {
- g_error("src/mn-mailbox.gob line 503: Type mismatch of \"messages_changed\" signal signature");
- }
-
-#line 154 "src/mn-mailbox.gob"
- c->added = ___real_mn_mailbox_added;
-#line 170 "src/mn-mailbox.gob"
- c->removed = ___real_mn_mailbox_removed;
-#line 429 "mn-mailbox.c"
- c->messages_changed = NULL;
-#line 1094 "src/mn-mailbox.gob"
- c->seal = ___real_mn_mailbox_seal;
-#line 433 "mn-mailbox.c"
- c->parse_uri = NULL;
-#line 1112 "src/mn-mailbox.gob"
- c->check = ___real_mn_mailbox_check;
-#line 437 "mn-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
- ("name" /* 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_NAME,
- param_spec);
- param_spec = g_param_spec_string
- ("open_command" /* 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_OPEN_COMMAND,
- param_spec);
- param_spec = g_param_spec_string
- ("mark_as_read_command" /* 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_MARK_AS_READ_COMMAND,
- param_spec);
- param_spec = g_param_spec_string
- ("mark_as_spam_command" /* 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_MARK_AS_SPAM_COMMAND,
- param_spec);
- param_spec = g_param_spec_string
- ("delete_command" /* 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_DELETE_COMMAND,
- param_spec);
- param_spec = g_param_spec_string
- ("stock_id" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
- g_object_class_install_property (g_object_class,
- PROP_STOCK_ID,
- param_spec);
- param_spec = g_param_spec_string
- ("format" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
- g_object_class_install_property (g_object_class,
- PROP_FORMAT,
- param_spec);
- param_spec = g_param_spec_int
- ("check_delay" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- G_MININT /* minimum */,
- G_MAXINT /* maximum */,
- -1 /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (g_object_class,
- PROP_CHECK_DELAY,
- param_spec);
- param_spec = g_param_spec_boolean
- ("poll" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
- g_object_class_install_property (g_object_class,
- PROP_POLL,
- param_spec);
- param_spec = g_param_spec_boolean
- ("manually_checkable" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE));
- g_object_class_install_property (g_object_class,
- PROP_MANUALLY_CHECKABLE,
- param_spec);
- param_spec = g_param_spec_pointer
- ("messages" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- (GParamFlags)(G_PARAM_READABLE));
- g_object_class_install_property (g_object_class,
- PROP_MESSAGES,
- param_spec);
- param_spec = g_param_spec_string
- ("error" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
- g_object_class_install_property (g_object_class,
- PROP_ERROR,
- param_spec);
- }
-}
-#undef __GOB_FUNCTION__
-#line 596 "src/mn-mailbox.gob"
-static void
-mn_mailbox_init (MNMailbox * self G_GNUC_UNUSED)
-{
-#line 560 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAILBOX,MNMailboxPrivate);
-#line 172 "src/mn-mailbox.gob"
- self->_priv->poll = TRUE;
-#line 565 "mn-mailbox.c"
-#line 274 "src/mn-mailbox.gob"
- self->_priv->all_messages = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_object_unref);
-#line 568 "mn-mailbox.c"
-#line 277 "src/mn-mailbox.gob"
- self->_priv->all_messages_by_mid = g_hash_table_new(g_str_hash, g_str_equal);
-#line 571 "mn-mailbox.c"
-#line 280 "src/mn-mailbox.gob"
- self->messages = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_object_unref);
-#line 574 "mn-mailbox.c"
- {
-#line 597 "src/mn-mailbox.gob"
-
- mn_g_object_gconf_notifications_add_gdk_locked(self,
- MN_CONF_DISPLAY_SEEN_MAIL, self_notify_display_seen_messages_cb, self,
- MN_CONF_MESSAGES_CONSIDERED_AS_READ, self_notify_messages_considered_as_read_cb, self,
- NULL);
-
-#line 583 "mn-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:Mailbox::set_property"
-{
- MNMailbox *self G_GNUC_UNUSED;
-
- self = MN_MAILBOX (object);
-
- switch (property_id) {
- case PROP_NAME:
- {
-#line 195 "src/mn-mailbox.gob"
-{ char *old = self->name; self->name = g_value_dup_string (VAL); g_free (old); }
-#line 604 "mn-mailbox.c"
- }
- break;
- case PROP_OPEN_COMMAND:
- {
-#line 198 "src/mn-mailbox.gob"
-{ char *old = self->open_command; self->open_command = g_value_dup_string (VAL); g_free (old); }
-#line 611 "mn-mailbox.c"
- }
- break;
- case PROP_MARK_AS_READ_COMMAND:
- {
-#line 201 "src/mn-mailbox.gob"
-{ char *old = self->mark_as_read_command; self->mark_as_read_command = g_value_dup_string (VAL); g_free (old); }
-#line 618 "mn-mailbox.c"
- }
- break;
- case PROP_MARK_AS_SPAM_COMMAND:
- {
-#line 204 "src/mn-mailbox.gob"
-{ char *old = self->mark_as_spam_command; self->mark_as_spam_command = g_value_dup_string (VAL); g_free (old); }
-#line 625 "mn-mailbox.c"
- }
- break;
- case PROP_DELETE_COMMAND:
- {
-#line 207 "src/mn-mailbox.gob"
-{ char *old = self->delete_command; self->delete_command = g_value_dup_string (VAL); g_free (old); }
-#line 632 "mn-mailbox.c"
- }
- break;
- case PROP_STOCK_ID:
- {
-#line 210 "src/mn-mailbox.gob"
-{ char *old = self->stock_id; self->stock_id = g_value_dup_string (VAL); g_free (old); }
-#line 639 "mn-mailbox.c"
- }
- break;
- case PROP_FORMAT:
- {
-#line 213 "src/mn-mailbox.gob"
-{ char *old = self->format; self->format = g_value_dup_string (VAL); g_free (old); }
-#line 646 "mn-mailbox.c"
- }
- break;
- case PROP_CHECK_DELAY:
- {
-#line 220 "src/mn-mailbox.gob"
-self->check_delay = g_value_get_int (VAL);
-#line 653 "mn-mailbox.c"
- }
- break;
- case PROP_POLL:
- {
-#line 227 "src/mn-mailbox.gob"
-
- gboolean new_poll = g_value_get_boolean(VAL);
-
- /*
- * We do nothing unless the property has changed, because we do
- * not want to reset an already existing check timeout.
- */
- if (new_poll != selfp->poll)
- {
- selfp->poll = new_poll;
- if (self_get_active(self) && selfp->checking_enabled)
- self_update_check_timeout(self);
-
- g_object_notify(G_OBJECT(self), "manually-checkable");
- }
-
-#line 675 "mn-mailbox.c"
- }
- break;
- case PROP_ERROR:
- {
-#line 507 "src/mn-mailbox.gob"
-{ char *old = self->error; self->error = g_value_dup_string (VAL); g_free (old); }
-#line 682 "mn-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:Mailbox::get_property"
-{
- MNMailbox *self G_GNUC_UNUSED;
-
- self = MN_MAILBOX (object);
-
- switch (property_id) {
- case PROP_NAME:
- {
-#line 195 "src/mn-mailbox.gob"
-g_value_set_string (VAL, self->name);
-#line 713 "mn-mailbox.c"
- }
- break;
- case PROP_OPEN_COMMAND:
- {
-#line 198 "src/mn-mailbox.gob"
-g_value_set_string (VAL, self->open_command);
-#line 720 "mn-mailbox.c"
- }
- break;
- case PROP_MARK_AS_READ_COMMAND:
- {
-#line 201 "src/mn-mailbox.gob"
-g_value_set_string (VAL, self->mark_as_read_command);
-#line 727 "mn-mailbox.c"
- }
- break;
- case PROP_MARK_AS_SPAM_COMMAND:
- {
-#line 204 "src/mn-mailbox.gob"
-g_value_set_string (VAL, self->mark_as_spam_command);
-#line 734 "mn-mailbox.c"
- }
- break;
- case PROP_DELETE_COMMAND:
- {
-#line 207 "src/mn-mailbox.gob"
-g_value_set_string (VAL, self->delete_command);
-#line 741 "mn-mailbox.c"
- }
- break;
- case PROP_STOCK_ID:
- {
-#line 210 "src/mn-mailbox.gob"
-g_value_set_string (VAL, self->stock_id);
-#line 748 "mn-mailbox.c"
- }
- break;
- case PROP_FORMAT:
- {
-#line 213 "src/mn-mailbox.gob"
-g_value_set_string (VAL, self->format);
-#line 755 "mn-mailbox.c"
- }
- break;
- case PROP_CHECK_DELAY:
- {
-#line 220 "src/mn-mailbox.gob"
-g_value_set_int (VAL, self->check_delay);
-#line 762 "mn-mailbox.c"
- }
- break;
- case PROP_POLL:
- {
-#line 244 "src/mn-mailbox.gob"
-
- g_value_set_boolean(VAL, selfp->poll);
-
-#line 771 "mn-mailbox.c"
- }
- break;
- case PROP_MANUALLY_CHECKABLE:
- {
-#line 255 "src/mn-mailbox.gob"
-
- g_value_set_boolean(VAL, selfp->checking_enabled && selfp->poll);
-
-#line 780 "mn-mailbox.c"
- }
- break;
- case PROP_MESSAGES:
- {
-#line 287 "src/mn-mailbox.gob"
-
- g_value_set_pointer(VAL, self->messages);
-
-#line 789 "mn-mailbox.c"
- }
- break;
- case PROP_ERROR:
- {
-#line 507 "src/mn-mailbox.gob"
-g_value_set_string (VAL, self->error);
-#line 796 "mn-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 135 "src/mn-mailbox.gob"
-gboolean
-mn_mailbox_get_active (MNMailbox * self)
-{
-#line 816 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_active"
-#line 135 "src/mn-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 135 "src/mn-mailbox.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (self), (gboolean )0);
-#line 822 "mn-mailbox.c"
-{
-#line 137 "src/mn-mailbox.gob"
-
- return g_atomic_int_get(&selfp->_active);
- }}
-#line 828 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 141 "src/mn-mailbox.gob"
-static void
-mn_mailbox_set_active (MNMailbox * self, gboolean value)
-{
-#line 835 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::set_active"
-#line 141 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 141 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 841 "mn-mailbox.c"
-{
-#line 143 "src/mn-mailbox.gob"
-
- g_atomic_int_set(&selfp->_active, value);
- }}
-#line 847 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-/**
- * mn_mailbox_added:
- * @self: the object which received the signal
- *
- * This signal gets emitted after the mailbox is added to the
- * mailboxes list.
- **/
-#line 154 "src/mn-mailbox.gob"
-void
-mn_mailbox_added (MNMailbox * self)
-{
-#line 861 "mn-mailbox.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 154 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 154 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 872 "mn-mailbox.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[ADDED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 154 "src/mn-mailbox.gob"
-static void
-___real_mn_mailbox_added (MNMailbox * self G_GNUC_UNUSED)
-{
-#line 889 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::added"
-{
-#line 156 "src/mn-mailbox.gob"
-
- self_set_active(self, TRUE);
-
- if (SELF_GET_CLASS(self)->enable_checking_when_added)
- self_enable_checking(self);
- }}
-#line 899 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-/**
- * mn_mailbox_removed:
- * @self: the object which received the signal
- *
- * This signal gets emitted after the mailbox is removed from the
- * mailboxes list.
- **/
-#line 170 "src/mn-mailbox.gob"
-void
-mn_mailbox_removed (MNMailbox * self)
-{
-#line 913 "mn-mailbox.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 170 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 170 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 924 "mn-mailbox.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[REMOVED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 170 "src/mn-mailbox.gob"
-static void
-___real_mn_mailbox_removed (MNMailbox * self G_GNUC_UNUSED)
-{
-#line 941 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::removed"
-{
-#line 172 "src/mn-mailbox.gob"
-
- self_set_active(self, FALSE);
-
- mn_source_clear(&selfp->check_timeout_id);
-
- /*
- * Do not queue a cleanup of the messages-considered-as-read GConf
- * setting: it should not be done if the mailbox is only being
- * replaced (eg. from mn_mailbox_properties_dialog_apply()).
- *
- * If however the mailbox is being permanently removed, its
- * messages considered as read will be cleaned up the next time
- * another mailbox is checked, which is good enough.
- *
- * Note that we could queue a cleanup from here by adding and
- * testing a "gboolean replacing" signal parameter, but it is not
- * worth the effort.
- */
- }}
-#line 964 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 210 "src/mn-mailbox.gob"
-gchar *
-mn_mailbox_get_stock_id (MNMailbox * self)
-{
-#line 971 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_stock_id"
-{
-#line 210 "src/mn-mailbox.gob"
- gchar* val; g_object_get (G_OBJECT (self), "stock_id", &val, NULL); return val;
-}}
-#line 977 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 210 "src/mn-mailbox.gob"
-void
-mn_mailbox_set_stock_id (MNMailbox * self, gchar * val)
-{
-#line 984 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::set_stock_id"
-{
-#line 210 "src/mn-mailbox.gob"
- g_object_set (G_OBJECT (self), "stock_id", val, NULL);
-}}
-#line 990 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 213 "src/mn-mailbox.gob"
-gchar *
-mn_mailbox_get_format (MNMailbox * self)
-{
-#line 997 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_format"
-{
-#line 213 "src/mn-mailbox.gob"
- gchar* val; g_object_get (G_OBJECT (self), "format", &val, NULL); return val;
-}}
-#line 1003 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 213 "src/mn-mailbox.gob"
-void
-mn_mailbox_set_format (MNMailbox * self, gchar * val)
-{
-#line 1010 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::set_format"
-{
-#line 213 "src/mn-mailbox.gob"
- g_object_set (G_OBJECT (self), "format", val, NULL);
-}}
-#line 1016 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 244 "src/mn-mailbox.gob"
-gboolean
-mn_mailbox_get_poll (MNMailbox * self)
-{
-#line 1023 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_poll"
-{
-#line 225 "src/mn-mailbox.gob"
- gboolean val; g_object_get (G_OBJECT (self), "poll", &val, NULL); return val;
-}}
-#line 1029 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 227 "src/mn-mailbox.gob"
-void
-mn_mailbox_set_poll (MNMailbox * self, gboolean val)
-{
-#line 1036 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::set_poll"
-{
-#line 225 "src/mn-mailbox.gob"
- g_object_set (G_OBJECT (self), "poll", val, NULL);
-}}
-#line 1042 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 255 "src/mn-mailbox.gob"
-gboolean
-mn_mailbox_get_manually_checkable (MNMailbox * self)
-{
-#line 1049 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_manually_checkable"
-{
-#line 253 "src/mn-mailbox.gob"
- gboolean val; g_object_get (G_OBJECT (self), "manually_checkable", &val, NULL); return val;
-}}
-#line 1055 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 259 "src/mn-mailbox.gob"
-static void
-mn_mailbox_update_check_timeout (MNMailbox * self)
-{
-#line 1062 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::update_check_timeout"
-#line 259 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 259 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1068 "mn-mailbox.c"
-{
-#line 261 "src/mn-mailbox.gob"
-
- g_assert(self_get_active(self) == TRUE);
- g_assert(selfp->checking_enabled == TRUE);
-
- mn_source_clear(&selfp->check_timeout_id);
- if (selfp->poll && self->runtime_check_delay > 0)
- selfp->check_timeout_id = gdk_threads_add_timeout(self->runtime_check_delay * 1000, self_check_timeout_cb, self);
- }}
-#line 1079 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 291 "src/mn-mailbox.gob"
-void
-mn_mailbox_set_messages (MNMailbox * self, GSList * messages)
-{
-#line 1086 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::set_messages"
-#line 291 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 291 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1092 "mn-mailbox.c"
-{
-#line 293 "src/mn-mailbox.gob"
-
- GSList *l;
-
- selfp->all_messages_set = TRUE;
-
- g_hash_table_remove_all(selfp->all_messages);
- g_hash_table_remove_all(selfp->all_messages_by_mid);
-
- MN_LIST_FOREACH(l, messages)
- {
- MNMessage *message = l->data;
-
- g_hash_table_replace(selfp->all_messages, message->id, g_object_ref(message));
-
- if (message->mid)
- /* do not ref message, it is owned by all_messages */
- g_hash_table_replace(selfp->all_messages_by_mid, message->mid, message);
- }
-
- /*
- * Some messages might be gone, queue a cleanup of the
- * considered-as-read GConf setting.
- */
- self_queue_cleanup_messages_considered_as_read();
-
- self_filter_messages(self);
- }}
-#line 1122 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-/**
- * mn_mailbox_filter_messages:
- * @self: the mailbox to act upon
- *
- * Filters @self->all_messages with the "seen mail" filter and the
- * considered-as-read GConf list, and stores the resulting set in
- * @self->messages. Additionally, if @self->messages has changed,
- * emits the "messages-changed" signal.
- **/
-#line 330 "src/mn-mailbox.gob"
-static void
-mn_mailbox_filter_messages (MNMailbox * self)
-{
-#line 1138 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::filter_messages"
-#line 330 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 330 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1144 "mn-mailbox.c"
-{
-#line 332 "src/mn-mailbox.gob"
-
- FilterMessagesInfo info;
- gboolean changed = FALSE;
- gboolean has_new = FALSE;
-
- /* filter messages */
-
- self->timestamp = 0;
-
- info.self = self;
- info.messages = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_object_unref);
- info.messages_considered_as_read = mn_conf_get_string_hash_set(MN_CONF_MESSAGES_CONSIDERED_AS_READ);
- info.display_seen_mail = mn_conf_get_bool(MN_CONF_DISPLAY_SEEN_MAIL);
-
- g_hash_table_foreach(selfp->all_messages, (GHFunc) self_filter_messages_cb, &info);
-
- g_hash_table_destroy(info.messages_considered_as_read);
-
- /* detect changes */
-
- if (self_compare_messages(self->messages, info.messages))
- changed = TRUE;
- if (self_compare_messages(info.messages, self->messages))
- changed = has_new = TRUE;
-
- g_hash_table_destroy(self->messages);
- self->messages = info.messages;
-
- g_object_notify(G_OBJECT(self), "messages");
-
- if (changed)
- self_messages_changed(self, has_new);
- }}
-#line 1180 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 366 "src/mn-mailbox.gob"
-static void
-mn_mailbox_filter_messages_cb (const char * id, MNMessage * message, FilterMessagesInfo * info)
-{
-#line 1187 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::filter_messages_cb"
-{
-#line 370 "src/mn-mailbox.gob"
-
- Self *self = info->self;
-
- if (! info->display_seen_mail && (message->flags & MN_MESSAGE_NEW) == 0)
- return;
-
- if (g_hash_table_lookup(info->messages_considered_as_read, message->id))
- return;
-
- if (message->sent_time > self->timestamp)
- self->timestamp = message->sent_time;
-
- g_hash_table_replace(info->messages, message->id, g_object_ref(message));
- }}
-#line 1205 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-/**
- * mn_mailbox_compare_messages:
- * @messages1: a %GHashTable containing %MNMessage objects
- * @messages2: another %GHashTable containing %MNMessage objects
- *
- * Compares @messages1 and @messages2.
- *
- * Return value: %TRUE if @messages1 contains messages not present
- * in @messages2, %FALSE otherwise.
- **/
-#line 395 "src/mn-mailbox.gob"
-static gboolean
-mn_mailbox_compare_messages (GHashTable * messages1, GHashTable * messages2)
-{
-#line 1222 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::compare_messages"
-{
-#line 397 "src/mn-mailbox.gob"
-
- CompareMessagesInfo info;
-
- info.other = messages2;
- info.changed = FALSE;
- g_hash_table_foreach(messages1, (GHFunc) self_compare_messages_cb, &info);
-
- return info.changed;
- }}
-#line 1235 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 407 "src/mn-mailbox.gob"
-static void
-mn_mailbox_compare_messages_cb (const char * id, MNMessage * message, CompareMessagesInfo * info)
-{
-#line 1242 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::compare_messages_cb"
-{
-#line 411 "src/mn-mailbox.gob"
-
- if (! info->changed && ! g_hash_table_lookup(info->other, id))
- info->changed = TRUE;
- }}
-#line 1250 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 416 "src/mn-mailbox.gob"
-static void
-mn_mailbox_queue_cleanup_messages_considered_as_read (void)
-{
-#line 1257 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::queue_cleanup_messages_considered_as_read"
-{
-#line 418 "src/mn-mailbox.gob"
-
- if (! cleanup_messages_considered_as_read_idle_id)
- cleanup_messages_considered_as_read_idle_id = gdk_threads_add_idle(self_cleanup_messages_considered_as_read_cb, NULL);
- }}
-#line 1265 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 423 "src/mn-mailbox.gob"
-static gboolean
-mn_mailbox_cleanup_messages_considered_as_read_cb (gpointer data)
-{
-#line 1272 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::cleanup_messages_considered_as_read_cb"
-{
-#line 425 "src/mn-mailbox.gob"
-
- self_cleanup_messages_considered_as_read();
-
- cleanup_messages_considered_as_read_idle_id = 0;
- return FALSE; /* remove source */
- }}
-#line 1282 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 444 "src/mn-mailbox.gob"
-static void
-mn_mailbox_cleanup_messages_considered_as_read (void)
-{
-#line 1289 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::cleanup_messages_considered_as_read"
-{
-#line 446 "src/mn-mailbox.gob"
-
- GList *l;
- GHashTable *set;
-
- /*
- * If there is a mailbox which has not been successfully checked
- * yet, abort. Otherwise, the messages of that mailbox could be
- * mistakenly cleaned up.
- */
- MN_LIST_FOREACH(l, mn_shell->mailboxes->list)
- {
- MNMailbox *mailbox = l->data;
-
- if (! mailbox->_priv->all_messages_set)
- return;
- }
-
- set = mn_conf_get_string_hash_set(MN_CONF_MESSAGES_CONSIDERED_AS_READ);
-
- if (g_hash_table_foreach_remove(set, (GHRFunc) self_cleanup_messages_considered_as_read_remove_cb, NULL))
- /* one or more messages were removed, reflect the changes */
- mn_conf_set_string_hash_set(MN_CONF_MESSAGES_CONSIDERED_AS_READ, set);
-
- g_hash_table_destroy(set);
- }}
-#line 1318 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 472 "src/mn-mailbox.gob"
-static gboolean
-mn_mailbox_cleanup_messages_considered_as_read_remove_cb (const char * id, gpointer value, gpointer user_data)
-{
-#line 1325 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::cleanup_messages_considered_as_read_remove_cb"
-{
-#line 476 "src/mn-mailbox.gob"
-
- GList *l;
-
- MN_LIST_FOREACH(l, mn_shell->mailboxes->list)
- {
- MNMailbox *mailbox = l->data;
-
- if (g_hash_table_lookup(mailbox->_priv->all_messages, id))
- return FALSE; /* message still exists, do not remove it */
- }
-
- return TRUE; /* message no longer exists, remove it */
- }}
-#line 1342 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 503 "src/mn-mailbox.gob"
-static void
-mn_mailbox_messages_changed (MNMailbox * self, gboolean has_new)
-{
-#line 1349 "mn-mailbox.c"
- GValue ___param_values[2];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 503 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 503 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1360 "mn-mailbox.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_BOOLEAN);
- g_value_set_boolean (&___param_values[1], (gboolean ) has_new);
-
- g_signal_emitv (___param_values,
- object_signals[MESSAGES_CHANGED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
- g_value_unset (&___param_values[1]);
-}
-
-#line 509 "src/mn-mailbox.gob"
-void
-mn_mailbox_set_error (MNMailbox * self, const char * format, ...)
-{
-#line 1383 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::set_error"
-#line 509 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 509 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1389 "mn-mailbox.c"
-{
-#line 512 "src/mn-mailbox.gob"
-
- char *error = NULL;
-
- if (format)
- MN_STRDUP_VPRINTF(error, format);
-
- g_object_set(G_OBJECT(self), MN_MAILBOX_PROP_ERROR(error), NULL);
- g_free(error);
- }}
-#line 1401 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 522 "src/mn-mailbox.gob"
-void
-mn_mailbox_init_types (void)
-{
-#line 1408 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::init_types"
-{
-#line 524 "src/mn-mailbox.gob"
-
- int i = 0;
-
-#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
- /*
- * MNSystemVFSMailbox must be registered before
- * MNCustomVFSMailbox, because the latter's parse_uri() method
- * will accept any URI.
- */
- mn_mailbox_types[i++] = MN_TYPE_SYSTEM_VFS_MAILBOX;
- mn_mailbox_types[i++] = MN_TYPE_CUSTOM_VFS_MAILBOX;
-#endif
-#if WITH_POP3
- mn_mailbox_types[i++] = MN_TYPE_POP3_MAILBOX;
-#endif
-#if WITH_IMAP
- mn_mailbox_types[i++] = MN_TYPE_IMAP_MAILBOX;
-#endif
-#if WITH_GMAIL
- mn_mailbox_types[i++] = MN_TYPE_GMAIL_MAILBOX;
-#endif
-#if WITH_YAHOO
- mn_mailbox_types[i++] = MN_TYPE_YAHOO_MAILBOX;
-#endif
-#if WITH_HOTMAIL
- mn_mailbox_types[i++] = MN_TYPE_HOTMAIL_MAILBOX;
-#endif
-#if WITH_EVOLUTION
- mn_mailbox_types[i++] = MN_TYPE_EVOLUTION_MAILBOX;
-#endif
- mn_mailbox_types[i] = 0;
- }}
-#line 1444 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 558 "src/mn-mailbox.gob"
-MNMailboxClass *
-mn_mailbox_get_class_from_name (const char * type)
-{
-#line 1451 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_class_from_name"
-#line 558 "src/mn-mailbox.gob"
- g_return_val_if_fail (type != NULL, (MNMailboxClass * )0);
-#line 1455 "mn-mailbox.c"
-{
-#line 560 "src/mn-mailbox.gob"
-
- int i;
-
- for (i = 0; mn_mailbox_types[i]; i++)
- {
- SelfClass *class;
-
- class = g_type_class_ref(mn_mailbox_types[i]);
- if (! strcmp(class->type, type))
- return class;
-
- g_type_class_unref(class);
- }
-
- return NULL;
- }}
-#line 1474 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 577 "src/mn-mailbox.gob"
-GType
-mn_mailbox_get_type_from_name (const char * type)
-{
-#line 1481 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_type_from_name"
-#line 577 "src/mn-mailbox.gob"
- g_return_val_if_fail (type != NULL, (GType )0);
-#line 1485 "mn-mailbox.c"
-{
-#line 579 "src/mn-mailbox.gob"
-
- SelfClass *class;
-
- class = self_get_class_from_name(type);
- if (class)
- {
- GType gtype;
-
- gtype = G_OBJECT_CLASS_TYPE(class);
- g_type_class_unref(class);
-
- return gtype;
- }
-
- return 0;
- }}
-#line 1504 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-
-#line 604 "src/mn-mailbox.gob"
-static void
-mn_mailbox_finalize (MNMailbox * self G_GNUC_UNUSED)
-{
-#line 1512 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::finalize"
-{
-#line 605 "src/mn-mailbox.gob"
-
- /*
- * Even though we clear the source in removed(), it might have
- * been reinstalled afterwards (by a mn_mailbox_set_poll() call
- * from a check thread, etc).
- */
- if (selfp->check_timeout_id)
- g_source_remove(selfp->check_timeout_id);
- }}
-#line 1525 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 615 "src/mn-mailbox.gob"
-static void
-mn_mailbox_notify_display_seen_messages_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-{
-#line 1532 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::notify_display_seen_messages_cb"
-{
-#line 620 "src/mn-mailbox.gob"
-
- Self *self = user_data;
-
- self_filter_messages(self);
- }}
-#line 1541 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 626 "src/mn-mailbox.gob"
-static void
-mn_mailbox_notify_messages_considered_as_read_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-{
-#line 1548 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::notify_messages_considered_as_read_cb"
-{
-#line 631 "src/mn-mailbox.gob"
-
- Self *self = user_data;
-
- self_filter_messages(self);
- }}
-#line 1557 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 637 "src/mn-mailbox.gob"
-MNMailbox *
-mn_mailbox_new (const char * type, ...)
-{
-#line 1564 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::new"
-#line 637 "src/mn-mailbox.gob"
- g_return_val_if_fail (type != NULL, (MNMailbox * )0);
-#line 1568 "mn-mailbox.c"
-{
-#line 640 "src/mn-mailbox.gob"
-
- va_list args;
- GType type_id;
- const char *first_property_name;
- GObject *object;
-
- type_id = self_get_type_from_name(type);
- if (! type_id)
- return NULL;
-
- va_start(args, type);
- first_property_name = va_arg(args, const char *);
- object = g_object_new_valist(type_id, first_property_name, args);
- va_end(args);
-
- return SELF(object);
- }}
-#line 1588 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 658 "src/mn-mailbox.gob"
-MNMailbox *
-mn_mailbox_new_from_xml_node (xmlNode * node, GError ** err)
-{
-#line 1595 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::new_from_xml_node"
-#line 658 "src/mn-mailbox.gob"
- g_return_val_if_fail (node != NULL, (MNMailbox * )0);
-#line 1599 "mn-mailbox.c"
-{
-#line 660 "src/mn-mailbox.gob"
-
- char *type;
- Self *self = NULL;
-
- type = xmlGetProp(node, "type");
- if (! type)
- {
- g_set_error(err, 0, 0, _("\"type\" attribute missing"));
- return NULL;
- }
-
- self = self_new(type, NULL);
- if (! self)
- {
- g_set_error(err, 0, 0, _("unknown mailbox type \"%s\""), type);
- goto end;
- }
-
- mn_xml_import_properties(G_OBJECT(self), node);
-
- if (! self_validate(self, err))
- {
- g_object_unref(self);
- self = NULL;
- }
-
- end:
- g_free(type);
- return self;
- }}
-#line 1632 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 691 "src/mn-mailbox.gob"
-xmlNode *
-mn_mailbox_xml_node_new (MNMailbox * self)
-{
-#line 1639 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::xml_node_new"
-#line 691 "src/mn-mailbox.gob"
- g_return_val_if_fail (self != NULL, (xmlNode * )0);
-#line 691 "src/mn-mailbox.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (self), (xmlNode * )0);
-#line 1645 "mn-mailbox.c"
-{
-#line 693 "src/mn-mailbox.gob"
-
- xmlNode *node;
-
- node = xmlNewNode(NULL, "mailbox");
- xmlSetProp(node, "type", SELF_GET_CLASS(self)->type);
- mn_xml_export_properties(G_OBJECT(self), node);
-
- return node;
- }}
-#line 1657 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 703 "src/mn-mailbox.gob"
-MNMailbox *
-mn_mailbox_new_from_uri (const char * uri)
-{
-#line 1664 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::new_from_uri"
-#line 703 "src/mn-mailbox.gob"
- g_return_val_if_fail (uri != NULL, (MNMailbox * )0);
-#line 1668 "mn-mailbox.c"
-{
-#line 705 "src/mn-mailbox.gob"
-
- int i;
-
- for (i = 0; mn_mailbox_types[i]; i++)
- {
- MNMailboxClass *class;
- MNMailbox *mailbox;
-
- class = g_type_class_ref(mn_mailbox_types[i]);
- mailbox = class->parse_uri ? class->parse_uri(NULL, uri) : NULL;
- g_type_class_unref(class);
-
- if (mailbox)
- return mailbox;
- }
-
- return NULL;
- }}
-#line 1689 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 724 "src/mn-mailbox.gob"
-MNMailbox *
-mn_mailbox_new_from_configuration (MNMailboxConfiguration * config)
-{
-#line 1696 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::new_from_configuration"
-#line 724 "src/mn-mailbox.gob"
- g_return_val_if_fail (config != NULL, (MNMailbox * )0);
-#line 1700 "mn-mailbox.c"
-{
-#line 726 "src/mn-mailbox.gob"
-
- return g_object_newv(config->type, config->n_parameters, config->parameters);
- }}
-#line 1706 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 730 "src/mn-mailbox.gob"
-MNMailboxConfiguration *
-mn_mailbox_get_configuration (MNMailbox * self)
-{
-#line 1713 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_configuration"
-#line 730 "src/mn-mailbox.gob"
- g_return_val_if_fail (self != NULL, (MNMailboxConfiguration * )0);
-#line 730 "src/mn-mailbox.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (self), (MNMailboxConfiguration * )0);
-#line 1719 "mn-mailbox.c"
-{
-#line 732 "src/mn-mailbox.gob"
-
- GObject *object = G_OBJECT(self);
- GArray *parameters;
- GParamSpec **properties;
- unsigned int n_properties;
- int i;
- MNMailboxConfiguration *config;
-
- parameters = g_array_new(FALSE, FALSE, sizeof(GParameter));
-
- properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
- for (i = 0; i < n_properties; i++)
- if ((properties[i]->flags & MN_MAILBOX_PARAM_SAVE) != 0)
- {
- GParameter parameter = { NULL, { 0, } };
-
- parameter.name = g_param_spec_get_name(properties[i]);
-
- g_value_init(¶meter.value, G_PARAM_SPEC_VALUE_TYPE(properties[i]));
- g_object_get_property(object, parameter.name, ¶meter.value);
-
- g_array_append_val(parameters, parameter);
- }
- g_free(properties);
-
- config = g_new0(MNMailboxConfiguration, 1);
- config->type = G_OBJECT_TYPE(self);
- config->n_parameters = parameters->len;
- config->parameters = (GParameter *) g_array_free(parameters, FALSE);
-
- return config;
- }}
-#line 1754 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 765 "src/mn-mailbox.gob"
-void
-mn_mailbox_configuration_free (MNMailboxConfiguration * config)
-{
-#line 1761 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::configuration_free"
-#line 765 "src/mn-mailbox.gob"
- g_return_if_fail (config != NULL);
-#line 1765 "mn-mailbox.c"
-{
-#line 767 "src/mn-mailbox.gob"
-
- int i;
-
- for (i = 0; i < config->n_parameters; i++)
- g_value_unset(&config->parameters[i].value);
-
- g_free(config->parameters);
- g_free(config);
- }}
-#line 1777 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 777 "src/mn-mailbox.gob"
-MNMailbox *
-mn_mailbox_new_from_obsolete_uri (const char * uri)
-{
-#line 1784 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::new_from_obsolete_uri"
-#line 777 "src/mn-mailbox.gob"
- g_return_val_if_fail (uri != NULL, (MNMailbox * )0);
-#line 1788 "mn-mailbox.c"
-{
-#line 779 "src/mn-mailbox.gob"
-
- char *real_uri;
- char *scheme;
- gboolean obsolete = FALSE;
- Self *self = NULL;
-
- real_uri = g_str_has_prefix(uri, "pop3:") /* also handle very old pop3 locators */
- ? g_strconcat("pop://", uri + 5, NULL)
- : g_strdup(uri);
-
- scheme = gnome_vfs_get_uri_scheme(real_uri);
- if (scheme)
- {
- if (! strcmp(scheme, "pop") || ! strcmp(scheme, "pops")
- || ! strcmp(scheme, "imap") || ! strcmp(scheme, "imaps")
- || ! strcmp(scheme, "gmail"))
- obsolete = TRUE;
- g_free(scheme);
- }
-
- self = obsolete ? self_parse_obsolete_uri(real_uri) : self_new_from_uri(real_uri);
- g_free(real_uri);
-
- if (self && ! self_validate(self, NULL))
- {
- g_object_unref(self);
- self = NULL;
- }
-
- return self;
- }}
-#line 1822 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 811 "src/mn-mailbox.gob"
-static MNMailbox *
-mn_mailbox_parse_obsolete_uri (const char * uri)
-{
-#line 1829 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::parse_obsolete_uri"
-#line 811 "src/mn-mailbox.gob"
- g_return_val_if_fail (uri != NULL, (MNMailbox * )0);
-#line 1833 "mn-mailbox.c"
-{
-#line 813 "src/mn-mailbox.gob"
-
- int len;
- int buflen;
- char *scheme;
- char *username;
- char *password;
- char *authmech;
- char *hostname;
- int port;
- char *path;
- char **queries;
- Self *self = NULL;
-
- len = strlen(uri);
- buflen = len + 1;
-
- {
- char *pat;
- char scheme_buf[buflen];
- char auth_buf[buflen];
- char location_buf[buflen];
- char username_buf[buflen];
- char password_buf[buflen];
- char authmech_buf[buflen];
- char hostname_buf[buflen];
- int _port;
- char path_buf[buflen];
- char queries_buf[buflen];
- gboolean has_location = FALSE;
- gboolean has_password = FALSE;
- gboolean has_authmech = FALSE;
- gboolean has_port = FALSE;
- gboolean has_path = FALSE;
- gboolean has_queries = FALSE;
- int n;
-
- /* split URI in 3 parts: scheme, auth and location */
-
- pat = g_strdup_printf("%%%i[^:]://%%%i[^@]@%%%is", len, len, len);
- n = sscanf(uri, pat, scheme_buf, auth_buf, location_buf);
- g_free(pat);
-
- if (n >= 2)
- {
- if (n == 3)
- has_location = TRUE;
- }
- else
- return NULL; /* unparsable */
-
- /* split auth part in 3 subparts: username, password and authmech */
-
- /*
- * For backward compatibility with previous versions of Mail
- * Notification, we also support ;auth= (in lowercase).
- */
-
- pat = g_strdup_printf("%%%i[^:]:%%%i[^;];%%*1[aA]%%*1[uU]%%*1[tT]%%*1[hH]=%%%is", len, len, len);
- n = sscanf(auth_buf, pat, username_buf, password_buf, authmech_buf);
- g_free(pat);
-
- if (n >= 2)
- {
- has_password = TRUE;
- if (n == 3)
- has_authmech = TRUE;
- }
- else
- {
- pat = g_strdup_printf("%%%i[^;];%%*1[aA]%%*1[uU]%%*1[tT]%%*1[hH]=%%%is", len, len);
- n = sscanf(auth_buf, pat, username_buf, authmech_buf);
- g_free(pat);
-
- if (n >= 1)
- {
- if (n == 2)
- has_authmech = TRUE;
- }
- else
- return NULL; /* unparsable */
- }
-
- if (has_location)
- {
- char hostport_buf[buflen];
-
- /* split location part in 3 subparts: hostport, path and queries */
-
- pat = g_strdup_printf("%%%i[^/]/%%%i[^?]?%%%is", len, len, len);
- n = sscanf(location_buf, pat, hostport_buf, path_buf, queries_buf);
- g_free(pat);
-
- if (n >= 2)
- {
- has_path = TRUE;
- if (n == 3)
- has_queries = TRUE;
- }
- else
- {
- pat = g_strdup_printf("%%%i[^?]?%%%is", len, len);
- n = sscanf(location_buf, pat, hostport_buf, queries_buf);
- g_free(pat);
-
- if (n == 2)
- has_queries = TRUE;
- }
-
- /* split hostport in 2 subparts: host and port */
-
- pat = g_strdup_printf("[%%%i[^]]]:%%u", len);
- n = sscanf(hostport_buf, pat, hostname_buf, &_port);
- g_free(pat);
-
- if (n < 1)
- {
- pat = g_strdup_printf("%%%i[^:]:%%u", len);
- n = sscanf(hostport_buf, pat, hostname_buf, &_port);
- g_free(pat);
- }
-
- if (n == 2)
- has_port = TRUE;
- }
-
- scheme = gnome_vfs_unescape_string(scheme_buf, NULL);
- username = gnome_vfs_unescape_string(username_buf, NULL);
- password = has_password ? gnome_vfs_unescape_string(password_buf, NULL) : NULL;
- authmech = has_authmech ? gnome_vfs_unescape_string(authmech_buf, NULL) : NULL;
- hostname = has_location ? gnome_vfs_unescape_string(hostname_buf, NULL) : NULL;
- port = has_port ? _port : 0;
- path = has_path ? gnome_vfs_unescape_string(path_buf, NULL) : NULL;
- if (has_queries)
- {
- int i;
-
- queries = g_strsplit(queries_buf, "&", 0);
- for (i = 0; queries[i]; i++)
- {
- char *unescaped;
-
- unescaped = gnome_vfs_unescape_string(queries[i], NULL);
-
- g_free(queries[i]);
- queries[i] = unescaped;
- }
- }
- else
- queries = NULL;
- }
-
- if (! strcmp(scheme, "pop") || ! strcmp(scheme, "pops"))
- {
-#if WITH_POP3
- MNPIMailboxConnectionType connection_type;
-
- if (queries && mn_strv_find(queries, "STLS") != -1)
- connection_type = MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL;
- else
- connection_type = ! strcmp(scheme, "pops")
- ? MN_PI_MAILBOX_CONNECTION_TYPE_SSL
- : MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL;
-
- self = self_new("pop3",
- "connection-type", connection_type,
- "username", username,
- "password", password,
- "authmech", authmech,
- "hostname", hostname,
- "port", port,
- NULL);
-#endif
- }
- else if (! strcmp(scheme, "imap") || ! strcmp(scheme, "imaps"))
- {
-#if WITH_IMAP
- MNPIMailboxConnectionType connection_type;
-
- if (queries && mn_strv_find(queries, "STARTTLS") != -1)
- connection_type = MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL;
- else
- connection_type = ! strcmp(scheme, "imaps")
- ? MN_PI_MAILBOX_CONNECTION_TYPE_SSL
- : MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL;
-
- self = self_new("imap",
- "connection-type", connection_type,
- "username", username,
- "password", password,
- "authmech", authmech,
- "hostname", hostname,
- "port", port,
- NULL);
-
- if (path)
- g_object_set(self, MN_IMAP_MAILBOX_PROP_MAILBOX(path), NULL);
-
- if (queries && mn_strv_find(queries, "noidle") != -1)
- g_object_set(G_OBJECT(self), MN_IMAP_MAILBOX_PROP_USE_IDLE_EXTENSION(MN_IMAP_MAILBOX_USE_IDLE_NEVER), NULL);
-#endif
- }
- else if (! strcmp(scheme, "gmail"))
- {
-#if WITH_GMAIL
- self = self_new("gmail",
- "username", username,
- "password", password,
- NULL);
-#endif
- }
-
- g_free(scheme);
- g_free(username);
- g_free(password);
- g_free(authmech);
- g_free(hostname);
- g_free(path);
- g_strfreev(queries);
-
- return self;
- }}
-#line 2057 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1035 "src/mn-mailbox.gob"
-static gboolean
-mn_mailbox_check_timeout_cb (gpointer data)
-{
-#line 2064 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::check_timeout_cb"
-{
-#line 1037 "src/mn-mailbox.gob"
-
- Self *self = data;
-
- self_check(self);
-
- return TRUE; /* continue */
- }}
-#line 2075 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1045 "src/mn-mailbox.gob"
-static gboolean
-mn_mailbox_validate (MNMailbox * self, GError ** err)
-{
-#line 2082 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::validate"
-#line 1045 "src/mn-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 1045 "src/mn-mailbox.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (self), (gboolean )0);
-#line 2088 "mn-mailbox.c"
-{
-#line 1047 "src/mn-mailbox.gob"
-
- GParamSpec **properties;
- unsigned int n_properties;
- int i;
- gboolean status = TRUE;
-
- properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
- for (i = 0; i < n_properties; i++)
- if ((properties[i]->flags & MN_MAILBOX_PARAM_REQUIRED) != 0)
- {
- GValue value = { 0, };
- const char *str;
- gboolean is_empty;
-
- g_assert(G_IS_PARAM_SPEC_STRING(properties[i]));
-
- g_value_init(&value, G_TYPE_STRING);
- g_object_get_property(G_OBJECT(self), g_param_spec_get_name(properties[i]), &value);
-
- str = g_value_get_string(&value);
- is_empty = ! str || ! *str;
-
- g_value_unset(&value);
-
- if (is_empty)
- {
- g_set_error(err, 0, 0, _("property \"%s\" has no value"), g_param_spec_get_name(properties[i]));
- status = FALSE;
- break;
- }
- }
- g_free(properties);
-
- return status;
- }}
-#line 2126 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-/**
- * mn_mailbox_seal:
- * @self: a mailbox
- *
- * Seals the mailbox before it is made operational by being added to
- * the mailboxes list. The point of this function is to allow
- * subclasses to perform initialization which needs to consult the
- * value of properties loaded from mailboxes.xml or set by the
- * properties dialog. That would not be possible from init(), since
- * these properties are only set after the mailbox is constructed.
- **/
-#line 1094 "src/mn-mailbox.gob"
-void
-mn_mailbox_seal (MNMailbox * self)
-{
-#line 2144 "mn-mailbox.c"
- MNMailboxClass *klass;
-#line 1094 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 1094 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 2150 "mn-mailbox.c"
- klass = MN_MAILBOX_GET_CLASS(self);
-
- if(klass->seal)
- (*klass->seal)(self);
-}
-#line 1094 "src/mn-mailbox.gob"
-static void
-___real_mn_mailbox_seal (MNMailbox * self G_GNUC_UNUSED)
-{
-#line 2160 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::seal"
-{
-#line 1096 "src/mn-mailbox.gob"
-
- if (self->name)
- {
- g_free(self->runtime_name);
- self->runtime_name = g_strdup(self->name);
- }
-
- self->runtime_check_delay = self->check_delay != -1
- ? self->check_delay
- : SELF_GET_CLASS(self)->default_check_delay;
- }}
-#line 2175 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1109 "src/mn-mailbox.gob"
-static MNMailbox *
-mn_mailbox_parse_uri (MNMailbox * self, const char * uri)
-{
-#line 2182 "mn-mailbox.c"
- MNMailboxClass *klass;
-#line 1109 "src/mn-mailbox.gob"
- g_return_val_if_fail (self != NULL, (MNMailbox * )0);
-#line 1109 "src/mn-mailbox.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (self), (MNMailbox * )0);
-#line 1109 "src/mn-mailbox.gob"
- g_return_val_if_fail (uri != NULL, (MNMailbox * )0);
-#line 2190 "mn-mailbox.c"
- klass = MN_MAILBOX_GET_CLASS(self);
-
- if(klass->parse_uri)
- return (*klass->parse_uri)(self,uri);
- else
- return (MNMailbox * )(0);
-}
-
-#line 1112 "src/mn-mailbox.gob"
-void
-mn_mailbox_check (MNMailbox * self)
-{
-#line 2203 "mn-mailbox.c"
- MNMailboxClass *klass;
-#line 1112 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 1112 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 2209 "mn-mailbox.c"
- klass = MN_MAILBOX_GET_CLASS(self);
-
- if(klass->check)
- (*klass->check)(self);
-}
-#line 1112 "src/mn-mailbox.gob"
-static void
-___real_mn_mailbox_check (MNMailbox * self G_GNUC_UNUSED)
-{
-#line 2219 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::check"
-{
-#line 1114 "src/mn-mailbox.gob"
-
- g_assert(self_get_active(self) == TRUE);
- g_assert(selfp->checking_enabled == TRUE);
- }}
-#line 2227 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1128 "src/mn-mailbox.gob"
-void
-mn_mailbox_enable_checking (MNMailbox * self)
-{
-#line 2234 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::enable_checking"
-#line 1128 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 1128 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 2240 "mn-mailbox.c"
-{
-#line 1130 "src/mn-mailbox.gob"
-
- selfp->checking_enabled = TRUE;
- g_object_notify(G_OBJECT(self), "manually-checkable");
-
- self_update_check_timeout(self);
- self_check(self);
- }}
-#line 2250 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1138 "src/mn-mailbox.gob"
-void
-mn_mailbox_notice (MNMailbox * self, const char * format, ...)
-{
-#line 2257 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::notice"
-#line 1138 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 1138 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1138 "src/mn-mailbox.gob"
- g_return_if_fail (format != NULL);
-#line 2265 "mn-mailbox.c"
-{
-#line 1141 "src/mn-mailbox.gob"
-
- char *message;
-
- /*
- * Disregard messages sent by a threaded check still in progress
- * after the mailbox has been removed.
- */
- if (! self_get_active(self))
- return;
-
- MN_STRDUP_VPRINTF(message, format);
- mn_info(_("%s: %s"), self->runtime_name, message);
- g_free(message);
- }}
-#line 2282 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1156 "src/mn-mailbox.gob"
-void
-mn_mailbox_warning (MNMailbox * self, const char * format, ...)
-{
-#line 2289 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::warning"
-#line 1156 "src/mn-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 1156 "src/mn-mailbox.gob"
- g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1156 "src/mn-mailbox.gob"
- g_return_if_fail (format != NULL);
-#line 2297 "mn-mailbox.c"
-{
-#line 1159 "src/mn-mailbox.gob"
-
- char *message;
-
- /*
- * Disregard messages sent by a threaded check still in progress
- * after the mailbox has been removed.
- */
- if (! self_get_active(self))
- return;
-
- MN_STRDUP_VPRINTF(message, format);
- g_warning(_("%s: %s"), self->runtime_name, message);
- g_free(message);
- }}
-#line 2314 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1174 "src/mn-mailbox.gob"
-MNMessage *
-mn_mailbox_get_message_from_mid (MNMailbox * self, const char * mid)
-{
-#line 2321 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_message_from_mid"
-#line 1174 "src/mn-mailbox.gob"
- g_return_val_if_fail (self != NULL, (MNMessage * )0);
-#line 1174 "src/mn-mailbox.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (self), (MNMessage * )0);
-#line 1174 "src/mn-mailbox.gob"
- g_return_val_if_fail (mid != NULL, (MNMessage * )0);
-#line 2329 "mn-mailbox.c"
-{
-#line 1176 "src/mn-mailbox.gob"
-
- return g_hash_table_lookup(selfp->all_messages_by_mid, mid);
- }}
-#line 2335 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1180 "src/mn-mailbox.gob"
-char *
-mn_mailbox_get_command (MNMailbox * self, const char * id)
-{
-#line 2342 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::get_command"
-#line 1180 "src/mn-mailbox.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 1180 "src/mn-mailbox.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (self), (char * )0);
-#line 1180 "src/mn-mailbox.gob"
- g_return_val_if_fail (id != NULL, (char * )0);
-#line 2350 "mn-mailbox.c"
-{
-#line 1182 "src/mn-mailbox.gob"
-
- char *prop;
- char *command;
-
- prop = g_strconcat(id, "-command", NULL);
- g_object_get(self, prop, &command, NULL);
- g_free(prop);
-
- if (command && ! *command)
- {
- g_free(command);
- return NULL;
- }
-
- return command;
- }}
-#line 2369 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1199 "src/mn-mailbox.gob"
-gboolean
-mn_mailbox_has_command (MNMailbox * self, const char * id)
-{
-#line 2376 "mn-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Mailbox::has_command"
-#line 1199 "src/mn-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 1199 "src/mn-mailbox.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (self), (gboolean )0);
-#line 1199 "src/mn-mailbox.gob"
- g_return_val_if_fail (id != NULL, (gboolean )0);
-#line 2384 "mn-mailbox.c"
-{
-#line 1201 "src/mn-mailbox.gob"
-
- char *command;
- gboolean has;
-
- command = self_get_command(self, id);
- has = command != NULL;
- g_free(command);
-
- return has;
- }}
-#line 2397 "mn-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-mailbox.gob.stamp b/build/src/mn-mailbox.gob.stamp
diff --git a/build/src/mn-mailbox.h b/build/src/mn-mailbox.h
@@ -1,256 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <stdarg.h>
-#include <time.h>
-#include <libxml/tree.h>
-#include "mn-decls.h"
-
-#ifndef __MN_MAILBOX_H__
-#define __MN_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-#define MN_MAILBOX_MAX_TYPES 8
-extern GType mn_mailbox_types[MN_MAILBOX_MAX_TYPES + 1];
-
-typedef struct _MNMailboxConfiguration MNMailboxConfiguration;
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAILBOX (mn_mailbox_get_type())
-#define MN_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailbox_get_type(), MNMailbox)
-#define MN_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailbox_get_type(), MNMailbox const)
-#define MN_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mailbox_get_type(), MNMailboxClass)
-#define MN_IS_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mailbox_get_type ())
-
-#define MN_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mailbox_get_type(), MNMailboxClass)
-
-/* Private structure type */
-typedef struct _MNMailboxPrivate MNMailboxPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAILBOX__
-#define __TYPEDEF_MN_MAILBOX__
-typedef struct _MNMailbox MNMailbox;
-#endif
-struct _MNMailbox {
- GObject __parent__;
- /*< public >*/
- char * runtime_name;
- char * name;
- char * open_command;
- char * mark_as_read_command;
- char * mark_as_spam_command;
- char * delete_command;
- char * stock_id;
- char * format;
- int runtime_check_delay;
- int check_delay;
- GHashTable * messages;
- time_t timestamp;
- char * error;
- /*< private >*/
- MNMailboxPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMailboxClass MNMailboxClass;
-struct _MNMailboxClass {
- GObjectClass __parent__;
- /*signal*/void (* added) (MNMailbox * self);
- /*signal*/void (* removed) (MNMailbox * self);
- /*signal*/void (* messages_changed) (MNMailbox * self, gboolean has_new);
- void (* seal) (MNMailbox * self);
- MNMailbox * (* parse_uri) (MNMailbox * self, const char * uri);
- void (* check) (MNMailbox * self);
- const char * type;
- int default_check_delay;
- gboolean enable_checking_when_added;
-};
-
-
-/*
- * Public methods
- */
-GType mn_mailbox_get_type (void) G_GNUC_CONST;
-#line 135 "src/mn-mailbox.gob"
-gboolean mn_mailbox_get_active (MNMailbox * self);
-#line 93 "mn-mailbox.h"
-#line 154 "src/mn-mailbox.gob"
-void mn_mailbox_added (MNMailbox * self);
-#line 96 "mn-mailbox.h"
-#line 170 "src/mn-mailbox.gob"
-void mn_mailbox_removed (MNMailbox * self);
-#line 99 "mn-mailbox.h"
-#line 210 "src/mn-mailbox.gob"
-gchar * mn_mailbox_get_stock_id (MNMailbox * self);
-#line 102 "mn-mailbox.h"
-#line 210 "src/mn-mailbox.gob"
-void mn_mailbox_set_stock_id (MNMailbox * self,
- gchar * val);
-#line 106 "mn-mailbox.h"
-#line 213 "src/mn-mailbox.gob"
-gchar * mn_mailbox_get_format (MNMailbox * self);
-#line 109 "mn-mailbox.h"
-#line 213 "src/mn-mailbox.gob"
-void mn_mailbox_set_format (MNMailbox * self,
- gchar * val);
-#line 113 "mn-mailbox.h"
-#line 244 "src/mn-mailbox.gob"
-gboolean mn_mailbox_get_poll (MNMailbox * self);
-#line 116 "mn-mailbox.h"
-#line 227 "src/mn-mailbox.gob"
-void mn_mailbox_set_poll (MNMailbox * self,
- gboolean val);
-#line 120 "mn-mailbox.h"
-#line 255 "src/mn-mailbox.gob"
-gboolean mn_mailbox_get_manually_checkable (MNMailbox * self);
-#line 123 "mn-mailbox.h"
-#line 522 "src/mn-mailbox.gob"
-void mn_mailbox_init_types (void);
-#line 126 "mn-mailbox.h"
-#line 558 "src/mn-mailbox.gob"
-MNMailboxClass * mn_mailbox_get_class_from_name (const char * type);
-#line 129 "mn-mailbox.h"
-#line 577 "src/mn-mailbox.gob"
-GType mn_mailbox_get_type_from_name (const char * type);
-#line 132 "mn-mailbox.h"
-#line 637 "src/mn-mailbox.gob"
-MNMailbox * mn_mailbox_new (const char * type,
- ...)
-G_GNUC_NULL_TERMINATED;
-#line 137 "mn-mailbox.h"
-#line 658 "src/mn-mailbox.gob"
-MNMailbox * mn_mailbox_new_from_xml_node (xmlNode * node,
- GError ** err);
-#line 141 "mn-mailbox.h"
-#line 691 "src/mn-mailbox.gob"
-xmlNode * mn_mailbox_xml_node_new (MNMailbox * self);
-#line 144 "mn-mailbox.h"
-#line 703 "src/mn-mailbox.gob"
-MNMailbox * mn_mailbox_new_from_uri (const char * uri);
-#line 147 "mn-mailbox.h"
-#line 724 "src/mn-mailbox.gob"
-MNMailbox * mn_mailbox_new_from_configuration (MNMailboxConfiguration * config);
-#line 150 "mn-mailbox.h"
-#line 730 "src/mn-mailbox.gob"
-MNMailboxConfiguration * mn_mailbox_get_configuration (MNMailbox * self);
-#line 153 "mn-mailbox.h"
-#line 765 "src/mn-mailbox.gob"
-void mn_mailbox_configuration_free (MNMailboxConfiguration * config);
-#line 156 "mn-mailbox.h"
-#line 777 "src/mn-mailbox.gob"
-MNMailbox * mn_mailbox_new_from_obsolete_uri (const char * uri);
-#line 159 "mn-mailbox.h"
-#line 1094 "src/mn-mailbox.gob"
-void mn_mailbox_seal (MNMailbox * self);
-#line 162 "mn-mailbox.h"
-#line 1112 "src/mn-mailbox.gob"
-void mn_mailbox_check (MNMailbox * self);
-#line 165 "mn-mailbox.h"
-#line 1180 "src/mn-mailbox.gob"
-char * mn_mailbox_get_command (MNMailbox * self,
- const char * id);
-#line 169 "mn-mailbox.h"
-#line 1199 "src/mn-mailbox.gob"
-gboolean mn_mailbox_has_command (MNMailbox * self,
- const char * id);
-#line 173 "mn-mailbox.h"
-
-/*
- * Signal connection wrapper macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define mn_mailbox_connect__added(object,func,data) g_signal_connect(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"added",(GCallback) __extension__ ({void (* ___added) (MNMailbox * ___fake___self, gpointer ___data ) = (func); ___added; }), (data))
-#define mn_mailbox_connect_after__added(object,func,data) g_signal_connect_after(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"added",(GCallback) __extension__ ({void (* ___added) (MNMailbox * ___fake___self, gpointer ___data ) = (func); ___added; }), (data))
-#define mn_mailbox_connect_data__added(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"added",(GCallback) __extension__ ({void (* ___added) (MNMailbox * ___fake___self, gpointer ___data ) = (func); ___added; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailbox_connect__removed(object,func,data) g_signal_connect(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"removed",(GCallback) __extension__ ({void (* ___removed) (MNMailbox * ___fake___self, gpointer ___data ) = (func); ___removed; }), (data))
-#define mn_mailbox_connect_after__removed(object,func,data) g_signal_connect_after(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"removed",(GCallback) __extension__ ({void (* ___removed) (MNMailbox * ___fake___self, gpointer ___data ) = (func); ___removed; }), (data))
-#define mn_mailbox_connect_data__removed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"removed",(GCallback) __extension__ ({void (* ___removed) (MNMailbox * ___fake___self, gpointer ___data ) = (func); ___removed; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailbox_connect__messages_changed(object,func,data) g_signal_connect(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailbox * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data))
-#define mn_mailbox_connect_after__messages_changed(object,func,data) g_signal_connect_after(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailbox * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data))
-#define mn_mailbox_connect_data__messages_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX(__extension__ ({MNMailbox *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailbox * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data), (destroy_data), (GConnectFlags)(flags))
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define mn_mailbox_connect__added(object,func,data) g_signal_connect(MN_MAILBOX(object),"added",(GCallback)(func),(data))
-#define mn_mailbox_connect_after__added(object,func,data) g_signal_connect_after(MN_MAILBOX(object),"added",(GCallback)(func),(data))
-#define mn_mailbox_connect_data__added(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX(object),"added",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailbox_connect__removed(object,func,data) g_signal_connect(MN_MAILBOX(object),"removed",(GCallback)(func),(data))
-#define mn_mailbox_connect_after__removed(object,func,data) g_signal_connect_after(MN_MAILBOX(object),"removed",(GCallback)(func),(data))
-#define mn_mailbox_connect_data__removed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX(object),"removed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailbox_connect__messages_changed(object,func,data) g_signal_connect(MN_MAILBOX(object),"messages_changed",(GCallback)(func),(data))
-#define mn_mailbox_connect_after__messages_changed(object,func,data) g_signal_connect_after(MN_MAILBOX(object),"messages_changed",(GCallback)(func),(data))
-#define mn_mailbox_connect_data__messages_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOX(object),"messages_changed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_MAILBOX_PROP_NAME(arg) "name", __extension__ ({gchar *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_NAME(arg) "name", __extension__ ({gchar **z = (arg); z;})
-#define MN_MAILBOX_PROP_OPEN_COMMAND(arg) "open_command", __extension__ ({gchar *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_OPEN_COMMAND(arg) "open_command", __extension__ ({gchar **z = (arg); z;})
-#define MN_MAILBOX_PROP_MARK_AS_READ_COMMAND(arg) "mark_as_read_command", __extension__ ({gchar *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_MARK_AS_READ_COMMAND(arg) "mark_as_read_command", __extension__ ({gchar **z = (arg); z;})
-#define MN_MAILBOX_PROP_MARK_AS_SPAM_COMMAND(arg) "mark_as_spam_command", __extension__ ({gchar *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_MARK_AS_SPAM_COMMAND(arg) "mark_as_spam_command", __extension__ ({gchar **z = (arg); z;})
-#define MN_MAILBOX_PROP_DELETE_COMMAND(arg) "delete_command", __extension__ ({gchar *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_DELETE_COMMAND(arg) "delete_command", __extension__ ({gchar **z = (arg); z;})
-#define MN_MAILBOX_PROP_STOCK_ID(arg) "stock_id", __extension__ ({gchar *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_STOCK_ID(arg) "stock_id", __extension__ ({gchar **z = (arg); z;})
-#define MN_MAILBOX_PROP_FORMAT(arg) "format", __extension__ ({gchar *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_FORMAT(arg) "format", __extension__ ({gchar **z = (arg); z;})
-#define MN_MAILBOX_PROP_CHECK_DELAY(arg) "check_delay", __extension__ ({gint z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_CHECK_DELAY(arg) "check_delay", __extension__ ({gint *z = (arg); z;})
-#define MN_MAILBOX_PROP_POLL(arg) "poll", __extension__ ({gboolean z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_POLL(arg) "poll", __extension__ ({gboolean *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_MANUALLY_CHECKABLE(arg) "manually_checkable", __extension__ ({gboolean *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_MESSAGES(arg) "messages", __extension__ ({GHashTable * *z = (arg); z;})
-#define MN_MAILBOX_PROP_ERROR(arg) "error", __extension__ ({gchar *z = (arg); z;})
-#define MN_MAILBOX_GET_PROP_ERROR(arg) "error", __extension__ ({gchar **z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_MAILBOX_PROP_NAME(arg) "name",(gchar *)(arg)
-#define MN_MAILBOX_GET_PROP_NAME(arg) "name",(gchar **)(arg)
-#define MN_MAILBOX_PROP_OPEN_COMMAND(arg) "open_command",(gchar *)(arg)
-#define MN_MAILBOX_GET_PROP_OPEN_COMMAND(arg) "open_command",(gchar **)(arg)
-#define MN_MAILBOX_PROP_MARK_AS_READ_COMMAND(arg) "mark_as_read_command",(gchar *)(arg)
-#define MN_MAILBOX_GET_PROP_MARK_AS_READ_COMMAND(arg) "mark_as_read_command",(gchar **)(arg)
-#define MN_MAILBOX_PROP_MARK_AS_SPAM_COMMAND(arg) "mark_as_spam_command",(gchar *)(arg)
-#define MN_MAILBOX_GET_PROP_MARK_AS_SPAM_COMMAND(arg) "mark_as_spam_command",(gchar **)(arg)
-#define MN_MAILBOX_PROP_DELETE_COMMAND(arg) "delete_command",(gchar *)(arg)
-#define MN_MAILBOX_GET_PROP_DELETE_COMMAND(arg) "delete_command",(gchar **)(arg)
-#define MN_MAILBOX_PROP_STOCK_ID(arg) "stock_id",(gchar *)(arg)
-#define MN_MAILBOX_GET_PROP_STOCK_ID(arg) "stock_id",(gchar **)(arg)
-#define MN_MAILBOX_PROP_FORMAT(arg) "format",(gchar *)(arg)
-#define MN_MAILBOX_GET_PROP_FORMAT(arg) "format",(gchar **)(arg)
-#define MN_MAILBOX_PROP_CHECK_DELAY(arg) "check_delay",(gint )(arg)
-#define MN_MAILBOX_GET_PROP_CHECK_DELAY(arg) "check_delay",(gint *)(arg)
-#define MN_MAILBOX_PROP_POLL(arg) "poll",(gboolean )(arg)
-#define MN_MAILBOX_GET_PROP_POLL(arg) "poll",(gboolean *)(arg)
-#define MN_MAILBOX_GET_PROP_MANUALLY_CHECKABLE(arg) "manually_checkable",(gboolean *)(arg)
-#define MN_MAILBOX_GET_PROP_MESSAGES(arg) "messages",(GHashTable * *)(arg)
-#define MN_MAILBOX_PROP_ERROR(arg) "error",(gchar *)(arg)
-#define MN_MAILBOX_GET_PROP_ERROR(arg) "error",(gchar **)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailboxes-private.h b/build/src/mn-mailboxes-private.h
@@ -1,26 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAILBOXES_PRIVATE_H__
-#define __MN_MAILBOXES_PRIVATE_H__
-
-#include "mn-mailboxes.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNMailboxesPrivate {
-#line 52 "src/mn-mailboxes.gob"
- GSList * add_queue;
-#line 53 "src/mn-mailboxes.gob"
- GSList * remove_queue;
-#line 54 "src/mn-mailboxes.gob"
- unsigned int queue_idle_id;
-#line 20 "mn-mailboxes-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mailboxes.c b/build/src/mn-mailboxes.c
@@ -1,1652 +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-mailboxes.h"
-
-#include "mn-mailboxes-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-mailboxes.gob"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <glib/gi18n.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include "mn-conf.h"
-#include "mn-message.h"
-#include "mn-mailbox-private.h"
-#include "mn-test-mailbox.h"
-#include "mn-shell.h"
-#include "mn-util.h"
-
-#line 44 "mn-mailboxes.c"
-/* self casting macros */
-#define SELF(x) MN_MAILBOXES(x)
-#define SELF_CONST(x) MN_MAILBOXES_CONST(x)
-#define IS_SELF(x) MN_IS_MAILBOXES(x)
-#define TYPE_SELF MN_TYPE_MAILBOXES
-#define SELF_CLASS(x) MN_MAILBOXES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAILBOXES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMailboxes Self;
-typedef MNMailboxesClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-#line 0 "src/mn-mailboxes.gob"
-static void mn_mailboxes_class_init (MNMailboxesClass * c) G_GNUC_UNUSED;
-#line 62 "mn-mailboxes.c"
-static void ___real_mn_mailboxes_mailbox_added (MNMailboxes * self, MNMailbox * mailbox);
-#line 70 "src/mn-mailboxes.gob"
-static void mn_mailboxes_mailbox_added (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 66 "mn-mailboxes.c"
-static void ___real_mn_mailboxes_mailbox_removed (MNMailboxes * self, MNMailbox * mailbox);
-#line 87 "src/mn-mailboxes.gob"
-static void mn_mailboxes_mailbox_removed (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 70 "mn-mailboxes.c"
-#line 101 "src/mn-mailboxes.gob"
-static void mn_mailboxes_mailbox_notify (MNMailboxes * self, MNMailbox * mailbox, GParamSpec * pspec) G_GNUC_UNUSED;
-#line 73 "mn-mailboxes.c"
-static void ___real_mn_mailboxes_list_changed (MNMailboxes * self);
-#line 114 "src/mn-mailboxes.gob"
-static void mn_mailboxes_list_changed (MNMailboxes * self) G_GNUC_UNUSED;
-#line 77 "mn-mailboxes.c"
-static void ___real_mn_mailboxes_messages_changed (MNMailboxes * self, gboolean has_new);
-#line 135 "src/mn-mailboxes.gob"
-static void mn_mailboxes_messages_changed (MNMailboxes * self, gboolean has_new) G_GNUC_UNUSED;
-#line 81 "mn-mailboxes.c"
-#line 155 "src/mn-mailboxes.gob"
-static void mn_mailboxes_messages_changed_cb (const char * id, MNMessage * message, Self * self) G_GNUC_UNUSED;
-#line 84 "mn-mailboxes.c"
-#line 164 "src/mn-mailboxes.gob"
-static int mn_mailboxes_messages_sort_cb (MNMessage ** a, MNMessage ** b) G_GNUC_UNUSED;
-#line 87 "mn-mailboxes.c"
-#line 180 "src/mn-mailboxes.gob"
-static void mn_mailboxes_error_changed (MNMailboxes * self) G_GNUC_UNUSED;
-#line 90 "mn-mailboxes.c"
-#line 203 "src/mn-mailboxes.gob"
-static void mn_mailboxes_init (MNMailboxes * self) G_GNUC_UNUSED;
-#line 93 "mn-mailboxes.c"
-#line 258 "src/mn-mailboxes.gob"
-static void mn_mailboxes_finalize (MNMailboxes * self) G_GNUC_UNUSED;
-#line 96 "mn-mailboxes.c"
-#line 276 "src/mn-mailboxes.gob"
-static void mn_mailboxes_connect_mailbox_signals (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 99 "mn-mailboxes.c"
-#line 287 "src/mn-mailboxes.gob"
-static void mn_mailboxes_disconnect_mailbox_signals (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 102 "mn-mailboxes.c"
-#line 298 "src/mn-mailboxes.gob"
-static void mn_mailboxes_load (MNMailboxes * self) G_GNUC_UNUSED;
-#line 105 "mn-mailboxes.c"
-#line 313 "src/mn-mailboxes.gob"
-static void mn_mailboxes_add_error (GString ** errors, int * n_errors, const char * format, ...)
-G_GNUC_PRINTF(3, 4) G_GNUC_UNUSED;
-#line 109 "mn-mailboxes.c"
-#line 334 "src/mn-mailboxes.gob"
-static gboolean mn_mailboxes_load_real (MNMailboxes * self, GError ** err) G_GNUC_UNUSED;
-#line 112 "mn-mailboxes.c"
-#line 419 "src/mn-mailboxes.gob"
-static void mn_mailboxes_save (MNMailboxes * self) G_GNUC_UNUSED;
-#line 115 "mn-mailboxes.c"
-#line 431 "src/mn-mailboxes.gob"
-static gboolean mn_mailboxes_save_real (MNMailboxes * self, GError ** err) G_GNUC_UNUSED;
-#line 118 "mn-mailboxes.c"
-#line 545 "src/mn-mailboxes.gob"
-static void mn_mailboxes_mailbox_messages_changed_h (MNMailbox * mailbox, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
-#line 121 "mn-mailboxes.c"
-#line 561 "src/mn-mailboxes.gob"
-static void mn_mailboxes_mailbox_notify_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
-#line 124 "mn-mailboxes.c"
-#line 572 "src/mn-mailboxes.gob"
-static void mn_mailboxes_mailbox_notify_error_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
-#line 127 "mn-mailboxes.c"
-#line 586 "src/mn-mailboxes.gob"
-static void mn_mailboxes_mailbox_notify_manually_checkable_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
-#line 130 "mn-mailboxes.c"
-#line 611 "src/mn-mailboxes.gob"
-static void mn_mailboxes_add_real (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 133 "mn-mailboxes.c"
-#line 639 "src/mn-mailboxes.gob"
-static void mn_mailboxes_remove_real (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 136 "mn-mailboxes.c"
-#line 666 "src/mn-mailboxes.gob"
-static gboolean mn_mailboxes_queue_idle_cb (gpointer data) G_GNUC_UNUSED;
-#line 139 "mn-mailboxes.c"
-
-/*
- * Signal connection wrapper macro shortcuts
- */
-#define self_connect__mailbox_added(object,func,data) mn_mailboxes_connect__mailbox_added((object),(func),(data))
-#define self_connect_after__mailbox_added(object,func,data) mn_mailboxes_connect_after__mailbox_added((object),(func),(data))
-#define self_connect_data__mailbox_added(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__mailbox_added((object),(func),(data),(destroy_data),(flags))
-#define self_connect__mailbox_removed(object,func,data) mn_mailboxes_connect__mailbox_removed((object),(func),(data))
-#define self_connect_after__mailbox_removed(object,func,data) mn_mailboxes_connect_after__mailbox_removed((object),(func),(data))
-#define self_connect_data__mailbox_removed(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__mailbox_removed((object),(func),(data),(destroy_data),(flags))
-#define self_connect__mailbox_notify(object,func,data) mn_mailboxes_connect__mailbox_notify((object),(func),(data))
-#define self_connect_after__mailbox_notify(object,func,data) mn_mailboxes_connect_after__mailbox_notify((object),(func),(data))
-#define self_connect_data__mailbox_notify(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__mailbox_notify((object),(func),(data),(destroy_data),(flags))
-#define self_connect__list_changed(object,func,data) mn_mailboxes_connect__list_changed((object),(func),(data))
-#define self_connect_after__list_changed(object,func,data) mn_mailboxes_connect_after__list_changed((object),(func),(data))
-#define self_connect_data__list_changed(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__list_changed((object),(func),(data),(destroy_data),(flags))
-#define self_connect__messages_changed(object,func,data) mn_mailboxes_connect__messages_changed((object),(func),(data))
-#define self_connect_after__messages_changed(object,func,data) mn_mailboxes_connect_after__messages_changed((object),(func),(data))
-#define self_connect_data__messages_changed(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__messages_changed((object),(func),(data),(destroy_data),(flags))
-#define self_connect__error_changed(object,func,data) mn_mailboxes_connect__error_changed((object),(func),(data))
-#define self_connect_after__error_changed(object,func,data) mn_mailboxes_connect_after__error_changed((object),(func),(data))
-#define self_connect_data__error_changed(object,func,data,destroy_data,flags) mn_mailboxes_connect_data__error_changed((object),(func),(data),(destroy_data),(flags))
-
-typedef void (*___Sig1) (MNMailboxes *, GObject *, 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 ((MNMailboxes *)data1,
- (GObject *) g_value_get_object (param_values + 1),
- data2);
-}
-
-
-typedef void (*___Sig2) (MNMailboxes *, GObject *, gpointer , gpointer);
-
-static void
-___marshal_Sig2 (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 ___Sig2 callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
-
- g_return_if_fail (n_param_values == 3);
-
- 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 = (___Sig2) (marshal_data != NULL ? marshal_data : cc->callback);
-
- callback ((MNMailboxes *)data1,
- (GObject *) g_value_get_object (param_values + 1),
- (gpointer ) g_value_get_pointer (param_values + 2),
- data2);
-}
-
-
-typedef void (*___Sig3) (MNMailboxes *, gboolean , gpointer);
-
-static void
-___marshal_Sig3 (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 ___Sig3 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 = (___Sig3) (marshal_data != NULL ? marshal_data : cc->callback);
-
- callback ((MNMailboxes *)data1,
- (gboolean ) g_value_get_boolean (param_values + 1),
- data2);
-}
-
-
-enum {
- MAILBOX_ADDED_SIGNAL,
- MAILBOX_REMOVED_SIGNAL,
- MAILBOX_NOTIFY_SIGNAL,
- LIST_CHANGED_SIGNAL,
- MESSAGES_CHANGED_SIGNAL,
- ERROR_CHANGED_SIGNAL,
- LAST_SIGNAL
-};
-
-enum {
- PROP_0,
- PROP_MANUALLY_CHECKABLE
-};
-
-static guint object_signals[LAST_SIGNAL] = {0};
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_mailbox_added mn_mailboxes_mailbox_added
-#define self_mailbox_removed mn_mailboxes_mailbox_removed
-#define self_mailbox_notify mn_mailboxes_mailbox_notify
-#define self_list_changed mn_mailboxes_list_changed
-#define self_messages_changed mn_mailboxes_messages_changed
-#define self_messages_changed_cb mn_mailboxes_messages_changed_cb
-#define self_messages_sort_cb mn_mailboxes_messages_sort_cb
-#define self_error_changed mn_mailboxes_error_changed
-#define self_get_manually_checkable mn_mailboxes_get_manually_checkable
-#define self_connect_mailbox_signals mn_mailboxes_connect_mailbox_signals
-#define self_disconnect_mailbox_signals mn_mailboxes_disconnect_mailbox_signals
-#define self_load mn_mailboxes_load
-#define self_add_error mn_mailboxes_add_error
-#define self_load_real mn_mailboxes_load_real
-#define self_save mn_mailboxes_save
-#define self_save_real mn_mailboxes_save_real
-#define self_mailbox_messages_changed_h mn_mailboxes_mailbox_messages_changed_h
-#define self_mailbox_notify_h mn_mailboxes_mailbox_notify_h
-#define self_mailbox_notify_error_h mn_mailboxes_mailbox_notify_error_h
-#define self_mailbox_notify_manually_checkable_h mn_mailboxes_mailbox_notify_manually_checkable_h
-#define self_check mn_mailboxes_check
-#define self_add_real mn_mailboxes_add_real
-#define self_add mn_mailboxes_add
-#define self_queue_add mn_mailboxes_queue_add
-#define self_remove_real mn_mailboxes_remove_real
-#define self_remove mn_mailboxes_remove
-#define self_queue_remove mn_mailboxes_queue_remove
-#define self_queue_idle_cb mn_mailboxes_queue_idle_cb
-#define self_compare_by_name_func mn_mailboxes_compare_by_name_func
-#define self_new mn_mailboxes_new
-GType
-mn_mailboxes_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMailboxesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mailboxes_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMailboxes),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mailboxes_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNMailboxes", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMailboxes *)g_object_new(mn_mailboxes_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMailboxes * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMailboxes *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMailboxes *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMailboxes *)g_object_new_valist (mn_mailboxes_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Mailboxes::finalize"
- MNMailboxes *self G_GNUC_UNUSED = MN_MAILBOXES (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 258 "src/mn-mailboxes.gob"
- mn_mailboxes_finalize (self);
-#line 362 "mn-mailboxes.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 47 "src/mn-mailboxes.gob"
- if(self->messages) { mn_g_object_ptr_array_free ((gpointer) self->messages); self->messages = NULL; }
-#line 367 "mn-mailboxes.c"
-#line 50 "src/mn-mailboxes.gob"
- if(self->messages_hash_table) { g_hash_table_destroy ((gpointer) self->messages_hash_table); self->messages_hash_table = NULL; }
-#line 370 "mn-mailboxes.c"
-#line 52 "src/mn-mailboxes.gob"
- if(self->_priv->add_queue) { mn_g_object_slist_free ((gpointer) self->_priv->add_queue); self->_priv->add_queue = NULL; }
-#line 373 "mn-mailboxes.c"
-#line 53 "src/mn-mailboxes.gob"
- if(self->_priv->remove_queue) { mn_g_object_slist_free ((gpointer) self->_priv->remove_queue); self->_priv->remove_queue = NULL; }
-#line 376 "mn-mailboxes.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mailboxes::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNMailboxesPrivate));
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- object_signals[MAILBOX_ADDED_SIGNAL] =
- g_signal_new ("mailbox_added",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_FIRST),
- G_STRUCT_OFFSET (MNMailboxesClass, mailbox_added),
- NULL, NULL,
- ___marshal_Sig1,
- G_TYPE_NONE, 1,
- G_TYPE_OBJECT);
- if ___GOB_UNLIKELY(sizeof(MNMailbox * ) != sizeof(GObject *) || parent_class == NULL /* avoid warning */) {
- g_error("src/mn-mailboxes.gob line 70: Type mismatch of \"mailbox_added\" signal signature");
- }
- object_signals[MAILBOX_REMOVED_SIGNAL] =
- g_signal_new ("mailbox_removed",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_FIRST),
- G_STRUCT_OFFSET (MNMailboxesClass, mailbox_removed),
- NULL, NULL,
- ___marshal_Sig1,
- G_TYPE_NONE, 1,
- G_TYPE_OBJECT);
- if ___GOB_UNLIKELY(sizeof(MNMailbox * ) != sizeof(GObject *) || parent_class == NULL /* avoid warning */) {
- g_error("src/mn-mailboxes.gob line 87: Type mismatch of \"mailbox_removed\" signal signature");
- }
- object_signals[MAILBOX_NOTIFY_SIGNAL] =
- g_signal_new ("mailbox_notify",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED),
- G_STRUCT_OFFSET (MNMailboxesClass, mailbox_notify),
- NULL, NULL,
- ___marshal_Sig2,
- G_TYPE_NONE, 2,
- G_TYPE_OBJECT,
- G_TYPE_POINTER);
- if ___GOB_UNLIKELY(sizeof(MNMailbox * ) != sizeof(GObject *) || sizeof(GParamSpec * ) != sizeof(gpointer ) || parent_class == NULL /* avoid warning */) {
- g_error("src/mn-mailboxes.gob line 101: Type mismatch of \"mailbox_notify\" signal signature");
- }
- object_signals[LIST_CHANGED_SIGNAL] =
- g_signal_new ("list_changed",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_FIRST),
- G_STRUCT_OFFSET (MNMailboxesClass, list_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- object_signals[MESSAGES_CHANGED_SIGNAL] =
- g_signal_new ("messages_changed",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_FIRST),
- G_STRUCT_OFFSET (MNMailboxesClass, messages_changed),
- NULL, NULL,
- ___marshal_Sig3,
- G_TYPE_NONE, 1,
- G_TYPE_BOOLEAN);
- if ___GOB_UNLIKELY(sizeof(gboolean ) != sizeof(gboolean ) || parent_class == NULL /* avoid warning */) {
- g_error("src/mn-mailboxes.gob line 135: Type mismatch of \"messages_changed\" signal signature");
- }
- object_signals[ERROR_CHANGED_SIGNAL] =
- g_signal_new ("error_changed",
- G_TYPE_FROM_CLASS (g_object_class),
- (GSignalFlags)(G_SIGNAL_RUN_LAST),
- G_STRUCT_OFFSET (MNMailboxesClass, error_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
-#line 70 "src/mn-mailboxes.gob"
- c->mailbox_added = ___real_mn_mailboxes_mailbox_added;
-#line 87 "src/mn-mailboxes.gob"
- c->mailbox_removed = ___real_mn_mailboxes_mailbox_removed;
-#line 460 "mn-mailboxes.c"
- c->mailbox_notify = NULL;
-#line 114 "src/mn-mailboxes.gob"
- c->list_changed = ___real_mn_mailboxes_list_changed;
-#line 135 "src/mn-mailboxes.gob"
- c->messages_changed = ___real_mn_mailboxes_messages_changed;
-#line 466 "mn-mailboxes.c"
- c->error_changed = NULL;
- g_object_class->finalize = ___finalize;
- g_object_class->get_property = ___object_get_property;
- {
- GParamSpec *param_spec;
-
- param_spec = g_param_spec_boolean
- ("manually_checkable" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE));
- g_object_class_install_property (g_object_class,
- PROP_MANUALLY_CHECKABLE,
- param_spec);
- }
-}
-#undef __GOB_FUNCTION__
-#line 203 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_init (MNMailboxes * self G_GNUC_UNUSED)
-{
-#line 489 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAILBOXES,MNMailboxesPrivate);
-#line 47 "src/mn-mailboxes.gob"
- self->messages = g_ptr_array_new();
-#line 494 "mn-mailboxes.c"
-#line 50 "src/mn-mailboxes.gob"
- self->messages_hash_table = g_hash_table_new(g_str_hash, g_str_equal);
-#line 497 "mn-mailboxes.c"
- {
-#line 204 "src/mn-mailboxes.gob"
-
- char *filename;
- gboolean exists;
-
- mn_shell->mailboxes = self;
-
- filename = g_build_filename(mn_conf_dot_dir, "mailboxes.xml", NULL);
- exists = g_file_test(filename, G_FILE_TEST_EXISTS);
- g_free(filename);
-
- if (exists)
- self_load(self);
- else if (mn_conf_is_set(MN_CONF_OBSOLETE_MAILBOXES))
- {
- GSList *gconf_mailboxes;
- GSList *l;
- GSList *invalid_uri_list = NULL;
- gboolean list_changed = FALSE;
-
- gconf_mailboxes = mn_conf_get_string_list(MN_CONF_OBSOLETE_MAILBOXES);
- MN_LIST_FOREACH(l, gconf_mailboxes)
- {
- const char *uri = l->data;
- MNMailbox *mailbox;
-
- mailbox = mn_mailbox_new_from_obsolete_uri(uri);
- if (mailbox)
- {
- mn_mailbox_seal(mailbox);
- self_add_real(self, mailbox);
- g_object_unref(mailbox);
-
- list_changed = TRUE;
- }
- else
- invalid_uri_list = g_slist_append(invalid_uri_list, (gpointer) uri);
- }
-
- if (list_changed)
- {
- self_list_changed(self);
- self_save(self); /* save the imported mailboxes */
- }
-
- if (invalid_uri_list)
- {
- mn_show_invalid_uri_list_dialog(NULL, _("An error has occurred while importing old mailboxes"), invalid_uri_list);
- g_slist_free(invalid_uri_list);
- }
-
- mn_g_slist_free_deep(gconf_mailboxes);
- }
-
-#line 553 "mn-mailboxes.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:Mailboxes::get_property"
-{
- MNMailboxes *self G_GNUC_UNUSED;
-
- self = MN_MAILBOXES (object);
-
- switch (property_id) {
- case PROP_MANUALLY_CHECKABLE:
- {
-#line 185 "src/mn-mailboxes.gob"
-
- GList *l;
- gboolean value = FALSE;
-
- MN_LIST_FOREACH(l, self->list)
- {
- MNMailbox *mailbox = l->data;
-
- if (mn_mailbox_get_manually_checkable(mailbox))
- {
- value = TRUE;
- break;
- }
- }
-
- g_value_set_boolean(VAL, value);
-
-#line 590 "mn-mailboxes.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-mailboxes.gob"
-static void
-mn_mailboxes_mailbox_added (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 610 "mn-mailboxes.c"
- GValue ___param_values[2];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 70 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 70 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 70 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 70 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 625 "mn-mailboxes.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_OBJECT);
- g_value_set_object (&___param_values[1], (GObject *) mailbox);
-
- g_signal_emitv (___param_values,
- object_signals[MAILBOX_ADDED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
- g_value_unset (&___param_values[1]);
-}
-#line 70 "src/mn-mailboxes.gob"
-static void
-___real_mn_mailboxes_mailbox_added (MNMailboxes * self G_GNUC_UNUSED, MNMailbox * mailbox)
-{
-#line 647 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_added"
-{
-#line 72 "src/mn-mailboxes.gob"
-
- self_connect_mailbox_signals(self, mailbox);
-
- /* emit the "added" signal on the mailbox */
- mn_mailbox_added(mailbox);
- }}
-#line 657 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 87 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_mailbox_removed (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 664 "mn-mailboxes.c"
- GValue ___param_values[2];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 87 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 87 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 87 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 87 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 679 "mn-mailboxes.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_OBJECT);
- g_value_set_object (&___param_values[1], (GObject *) mailbox);
-
- g_signal_emitv (___param_values,
- object_signals[MAILBOX_REMOVED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
- g_value_unset (&___param_values[1]);
-}
-#line 87 "src/mn-mailboxes.gob"
-static void
-___real_mn_mailboxes_mailbox_removed (MNMailboxes * self G_GNUC_UNUSED, MNMailbox * mailbox)
-{
-#line 701 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_removed"
-{
-#line 89 "src/mn-mailboxes.gob"
-
- self_disconnect_mailbox_signals(self, mailbox);
-
- /* emit the "removed" signal on the mailbox */
- mn_mailbox_removed(mailbox);
-
- /* messages and error have possibly changed */
- self_messages_changed(self, FALSE);
- self_error_changed(self);
- }}
-#line 715 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 101 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_mailbox_notify (MNMailboxes * self, MNMailbox * mailbox, GParamSpec * pspec)
-{
-#line 722 "mn-mailboxes.c"
- GValue ___param_values[3];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 101 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 101 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 101 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 101 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 101 "src/mn-mailboxes.gob"
- g_return_if_fail (pspec != NULL);
-#line 739 "mn-mailboxes.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_OBJECT);
- g_value_set_object (&___param_values[1], (GObject *) mailbox);
-
- ___param_values[2].g_type = 0;
- g_value_init (&___param_values[2], G_TYPE_POINTER);
- g_value_set_pointer (&___param_values[2], (gpointer ) pspec);
-
- g_signal_emitv (___param_values,
- object_signals[MAILBOX_NOTIFY_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
- g_value_unset (&___param_values[1]);
- g_value_unset (&___param_values[2]);
-}
-
-#line 114 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_list_changed (MNMailboxes * self)
-{
-#line 767 "mn-mailboxes.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 114 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 114 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 778 "mn-mailboxes.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[LIST_CHANGED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-#line 114 "src/mn-mailboxes.gob"
-static void
-___real_mn_mailboxes_list_changed (MNMailboxes * self G_GNUC_UNUSED)
-{
-#line 795 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::list_changed"
-{
-#line 116 "src/mn-mailboxes.gob"
-
- /* manually-checkable has possibly changed */
- g_object_notify(G_OBJECT(self), "manually-checkable");
- }}
-#line 803 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 135 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_messages_changed (MNMailboxes * self, gboolean has_new)
-{
-#line 810 "mn-mailboxes.c"
- GValue ___param_values[2];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 135 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 135 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 821 "mn-mailboxes.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_BOOLEAN);
- g_value_set_boolean (&___param_values[1], (gboolean ) has_new);
-
- g_signal_emitv (___param_values,
- object_signals[MESSAGES_CHANGED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
- g_value_unset (&___param_values[1]);
-}
-#line 135 "src/mn-mailboxes.gob"
-static void
-___real_mn_mailboxes_messages_changed (MNMailboxes * self G_GNUC_UNUSED, gboolean has_new)
-{
-#line 843 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::messages_changed"
-{
-#line 137 "src/mn-mailboxes.gob"
-
- GList *l;
-
- mn_g_object_ptr_array_free(self->messages);
- self->messages = g_ptr_array_new();
-
- g_hash_table_remove_all(self->messages_hash_table);
-
- MN_LIST_FOREACH(l, self->list)
- {
- MNMailbox *mailbox = l->data;
-
- g_hash_table_foreach(mailbox->messages, (GHFunc) self_messages_changed_cb, self);
- }
-
- g_ptr_array_sort(self->messages, (GCompareFunc) self_messages_sort_cb);
- }}
-#line 864 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 155 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_messages_changed_cb (const char * id, MNMessage * message, Self * self)
-{
-#line 871 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::messages_changed_cb"
-{
-#line 159 "src/mn-mailboxes.gob"
-
- g_ptr_array_add(self->messages, g_object_ref(message));
- g_hash_table_insert(self->messages_hash_table, message->id, message);
- }}
-#line 879 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 164 "src/mn-mailboxes.gob"
-static int
-mn_mailboxes_messages_sort_cb (MNMessage ** a, MNMessage ** b)
-{
-#line 886 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::messages_sort_cb"
-{
-#line 166 "src/mn-mailboxes.gob"
-
- /* sort by sent time in descending order */
- return (*b)->sent_time - (*a)->sent_time;
- }}
-#line 894 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 180 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_error_changed (MNMailboxes * self)
-{
-#line 901 "mn-mailboxes.c"
- GValue ___param_values[1];
- GValue ___return_val;
-
-memset (&___return_val, 0, sizeof (___return_val));
-memset (&___param_values, 0, sizeof (___param_values));
-
-#line 180 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 180 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 912 "mn-mailboxes.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[ERROR_CHANGED_SIGNAL],
- 0 /* detail */,
- &___return_val);
-
- g_value_unset (&___param_values[0]);
-}
-
-#line 185 "src/mn-mailboxes.gob"
-gboolean
-mn_mailboxes_get_manually_checkable (MNMailboxes * self)
-{
-#line 930 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::get_manually_checkable"
-{
-#line 183 "src/mn-mailboxes.gob"
- gboolean val; g_object_get (G_OBJECT (self), "manually_checkable", &val, NULL); return val;
-}}
-#line 936 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-
-#line 258 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_finalize (MNMailboxes * self G_GNUC_UNUSED)
-{
-#line 944 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::finalize"
-{
-#line 259 "src/mn-mailboxes.gob"
-
- GList *l;
-
- /*
- * We need to disconnect the mailbox signals because on exit, a
- * mailbox can survive the MNMailboxes object (if a check thread
- * is running).
- */
- MN_LIST_FOREACH(l, self->list)
- self_disconnect_mailbox_signals(self, l->data);
-
- mn_g_object_list_free(self->list);
-
- if (selfp->queue_idle_id)
- g_source_remove(selfp->queue_idle_id);
- }}
-#line 964 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 276 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_connect_mailbox_signals (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 971 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::connect_mailbox_signals"
-#line 276 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 276 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 276 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 276 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 981 "mn-mailboxes.c"
-{
-#line 278 "src/mn-mailboxes.gob"
-
- g_object_connect(mailbox,
- "signal::messages-changed", self_mailbox_messages_changed_h, self,
- "signal::notify", self_mailbox_notify_h, self,
- "signal::notify::error", self_mailbox_notify_error_h, self,
- "signal::notify::manually-checkable", self_mailbox_notify_manually_checkable_h, self,
- NULL);
- }}
-#line 992 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 287 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_disconnect_mailbox_signals (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 999 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::disconnect_mailbox_signals"
-#line 287 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 287 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 287 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 287 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1009 "mn-mailboxes.c"
-{
-#line 289 "src/mn-mailboxes.gob"
-
- g_object_disconnect(mailbox,
- "any-signal", self_mailbox_messages_changed_h, self,
- "any-signal", self_mailbox_notify_h, self,
- "any-signal", self_mailbox_notify_error_h, self,
- "any-signal", self_mailbox_notify_manually_checkable_h, self,
- NULL);
- }}
-#line 1020 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 298 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_load (MNMailboxes * self)
-{
-#line 1027 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::load"
-#line 298 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 298 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 1033 "mn-mailboxes.c"
-{
-#line 300 "src/mn-mailboxes.gob"
-
- GError *err = NULL;
-
- if (! self_load_real(self, &err))
- {
- mn_show_error_dialog(NULL, _("Unable to load the mailboxes configuration"), "%s", err->message);
- g_error_free(err);
- }
-
- if (self->must_save_after_load)
- self_save(self);
- }}
-#line 1048 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 313 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_add_error (GString ** errors, int * n_errors, const char * format, ...)
-{
-#line 1055 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::add_error"
-#line 313 "src/mn-mailboxes.gob"
- g_return_if_fail (errors != NULL);
-#line 313 "src/mn-mailboxes.gob"
- g_return_if_fail (n_errors != NULL);
-#line 1061 "mn-mailboxes.c"
-{
-#line 319 "src/mn-mailboxes.gob"
-
- char *message;
-
- if (*errors)
- g_string_append_c(*errors, '\n');
- else
- *errors = g_string_new(NULL);
-
- MN_STRDUP_VPRINTF(message, format);
- g_string_append(*errors, message);
- g_free(message);
-
- (*n_errors)++;
- }}
-#line 1078 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 334 "src/mn-mailboxes.gob"
-static gboolean
-mn_mailboxes_load_real (MNMailboxes * self, GError ** err)
-{
-#line 1085 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::load_real"
-#line 334 "src/mn-mailboxes.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 334 "src/mn-mailboxes.gob"
- g_return_val_if_fail (MN_IS_MAILBOXES (self), (gboolean )0);
-#line 1091 "mn-mailboxes.c"
-{
-#line 336 "src/mn-mailboxes.gob"
-
- char *filename;
- xmlDoc *doc;
- xmlNode *root;
- xmlNode *node;
- gboolean list_changed = FALSE;
- gboolean status = TRUE;
- GString *errors = NULL;
- int n_errors = 0;
-
- filename = g_build_filename(mn_conf_dot_dir, "mailboxes.xml", NULL);
- doc = xmlParseFile(filename);
- g_free(filename);
-
- if (! doc)
- {
- g_set_error(err, 0, 0, _("Unable to parse the XML document."));
- return FALSE;
- }
-
- root = xmlDocGetRootElement(doc);
- if (! root)
- {
- g_set_error(err, 0, 0, _("The root element is missing."));
- goto error;
- }
-
- if (strcmp(root->name, "mailboxes"))
- {
- g_set_error(err, 0, 0, _("The root element \"%s\" is invalid."), root->name);
- goto error;
- }
-
- for (node = root->children; node; node = node->next)
- if (node->type == XML_ELEMENT_NODE)
- {
- if (! strcmp(node->name, "mailbox"))
- {
- MNMailbox *mailbox;
- GError *tmp_err = NULL;
-
- mailbox = mn_mailbox_new_from_xml_node(node, &tmp_err);
- if (mailbox)
- {
- mn_mailbox_seal(mailbox);
- self_add_real(self, mailbox);
- g_object_unref(mailbox);
- list_changed = TRUE;
- }
- else
- {
- self_add_error(&errors, &n_errors, _("On line %i: %s."), node->line, tmp_err->message);
- g_error_free(tmp_err);
- }
- }
- else
- self_add_error(&errors, &n_errors, _("On line %i: unknown element \"%s\"."), node->line, node->name);
- }
-
- if (list_changed)
- self_list_changed(self);
-
- if (errors)
- {
- mn_show_error_dialog(NULL,
- ngettext("An error has occurred while loading the mailboxes configuration",
- "Errors have occurred while loading the mailboxes configuration",
- n_errors),
- "%s", errors->str);
- g_string_free(errors, TRUE);
- }
-
- goto end;
-
- error:
- status = FALSE;
-
- end:
- xmlFreeDoc(doc);
-
- return status;
- }}
-#line 1176 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 419 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_save (MNMailboxes * self)
-{
-#line 1183 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::save"
-#line 419 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 419 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 1189 "mn-mailboxes.c"
-{
-#line 421 "src/mn-mailboxes.gob"
-
- GError *err = NULL;
-
- if (! self_save_real(self, &err))
- {
- mn_show_error_dialog(NULL, _("Unable to save the mailboxes configuration"), "%s", err->message);
- g_error_free(err);
- }
- }}
-#line 1201 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 431 "src/mn-mailboxes.gob"
-static gboolean
-mn_mailboxes_save_real (MNMailboxes * self, GError ** err)
-{
-#line 1208 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::save_real"
-#line 431 "src/mn-mailboxes.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 431 "src/mn-mailboxes.gob"
- g_return_val_if_fail (MN_IS_MAILBOXES (self), (gboolean )0);
-#line 1214 "mn-mailboxes.c"
-{
-#line 433 "src/mn-mailboxes.gob"
-
- int indent;
- xmlDoc *doc;
- xmlNode *root;
- GList *l;
- char *filename;
- char *tmp_filename;
- char *old_filename;
- int fd = -1;
- FILE *f = NULL;
- gboolean old_exists;
- gboolean status = TRUE;
-
- indent = xmlIndentTreeOutput;
- xmlIndentTreeOutput = 1;
-
- doc = xmlNewDoc("1.0");
- root = xmlNewNode(NULL, "mailboxes");
- xmlDocSetRootElement(doc, root);
-
- MN_LIST_FOREACH(l, self->list)
- {
- MNMailbox *mailbox = l->data;
- xmlNode *node;
-
- if (! MN_IS_TEST_MAILBOX(mailbox))
- {
- node = mn_mailbox_xml_node_new(mailbox);
- xmlAddChild(root, node); /* owns node */
- }
- }
-
- filename = g_build_filename(mn_conf_dot_dir, "mailboxes.xml", NULL);
- tmp_filename = g_strconcat(filename, ".tmp", NULL);
- old_filename = g_strconcat(filename, ".old", NULL);
-
- if (g_file_test(tmp_filename, G_FILE_TEST_EXISTS) && unlink(tmp_filename) < 0)
- {
- g_set_error(err, 0, 0, _("Unable to remove %s: %s."), tmp_filename, g_strerror(errno));
- goto error;
- }
-
- /* the file may contain passwords; restrict permissions (600) */
- fd = open(tmp_filename, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
- if (fd < 0)
- {
- g_set_error(err, 0, 0, _("Unable to create %s: %s."), tmp_filename, g_strerror(errno));
- goto error;
- }
-
- f = fdopen(fd, "w");
- if (! f)
- {
- g_set_error(err, 0, 0, _("Unable to open %s for writing: %s."), tmp_filename, g_strerror(errno));
- goto error;
- }
- fd = -1; /* now owned by f */
-
- if (xmlDocFormatDump(f, doc, 1) < 0)
- {
- g_set_error(err, 0, 0, _("Unable to write the XML document."));
- goto error;
- }
-
- if (fclose(f) != 0)
- {
- g_set_error(err, 0, 0, _("Unable to close %s: %s."), tmp_filename, g_strerror(errno));
- goto error;
- }
- f = NULL;
-
- old_exists = g_file_test(filename, G_FILE_TEST_EXISTS);
- if (old_exists)
- {
- if (rename(filename, old_filename) < 0)
- {
- g_set_error(err, 0, 0, _("Unable to rename %s to %s: %s."), filename, old_filename, g_strerror(errno));
- goto error;
- }
- }
-
- if (rename(tmp_filename, filename) < 0)
- {
- g_set_error(err, 0, 0, _("Unable to rename %s to %s: %s."), tmp_filename, filename, g_strerror(errno));
- goto error;
- }
-
- if (old_exists)
- if (unlink(old_filename) < 0) /* non fatal */
- g_warning(_("unable to delete %s: %s"), old_filename, g_strerror(errno));
-
- goto end; /* success */
-
- error:
- status = FALSE;
-
- end:
- xmlFreeDoc(doc);
- xmlIndentTreeOutput = indent;
-
- g_free(filename);
- g_free(tmp_filename);
- g_free(old_filename);
-
- if (fd >= 0)
- close(fd);
- if (f)
- fclose(f);
-
- return status;
- }}
-#line 1328 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 545 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_mailbox_messages_changed_h (MNMailbox * mailbox, gboolean has_new, gpointer user_data)
-{
-#line 1335 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_messages_changed_h"
-{
-#line 549 "src/mn-mailboxes.gob"
-
- Self *self = user_data;
- int num_messages;
-
- num_messages = g_hash_table_size(mailbox->messages);
-
- mn_info(ngettext("%s has %i new message", "%s has %i new messages", num_messages),
- mailbox->runtime_name, num_messages);
-
- self_messages_changed(self, has_new);
- }}
-#line 1350 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 561 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_mailbox_notify_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-{
-#line 1357 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_notify_h"
-{
-#line 563 "src/mn-mailboxes.gob"
-
- Self *self = user_data;
- char *detailed_signal;
-
- detailed_signal = g_strconcat("mailbox-notify::", g_param_spec_get_name(pspec), NULL);
- g_signal_emit_by_name(self, detailed_signal, object, pspec);
- g_free(detailed_signal);
- }}
-#line 1369 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 572 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_mailbox_notify_error_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-{
-#line 1376 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_notify_error_h"
-{
-#line 576 "src/mn-mailboxes.gob"
-
- Self *self = user_data;
- MNMailbox *mailbox = MN_MAILBOX(object);
-
- if (mailbox->error)
- mn_info(_("%s reported an error: %s"), mailbox->runtime_name, mailbox->error);
-
- self_error_changed(self);
- }}
-#line 1389 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 586 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_mailbox_notify_manually_checkable_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-{
-#line 1396 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_notify_manually_checkable_h"
-{
-#line 590 "src/mn-mailboxes.gob"
-
- Self *self = user_data;
-
- /* manually-checkable has possibly changed */
- g_object_notify(G_OBJECT(self), "manually-checkable");
- }}
-#line 1406 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 597 "src/mn-mailboxes.gob"
-void
-mn_mailboxes_check (MNMailboxes * self)
-{
-#line 1413 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::check"
-#line 597 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 597 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 1419 "mn-mailboxes.c"
-{
-#line 599 "src/mn-mailboxes.gob"
-
- GList *l;
-
- MN_LIST_FOREACH(l, self->list)
- {
- MNMailbox *mailbox = l->data;
-
- if (mn_mailbox_get_manually_checkable(mailbox))
- mn_mailbox_check(mailbox);
- }
- }}
-#line 1433 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 611 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_add_real (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 1440 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::add_real"
-#line 611 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 611 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 611 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 611 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1450 "mn-mailboxes.c"
-{
-#line 613 "src/mn-mailboxes.gob"
-
- g_object_ref(mailbox);
- self->list = g_list_insert_sorted(self->list, mailbox, self_compare_by_name_func);
- self_mailbox_added(self, mailbox);
- }}
-#line 1458 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 619 "src/mn-mailboxes.gob"
-void
-mn_mailboxes_add (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 1465 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::add"
-#line 619 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 619 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 619 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 619 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1475 "mn-mailboxes.c"
-{
-#line 621 "src/mn-mailboxes.gob"
-
- self_add_real(self, mailbox);
- self_list_changed(self);
-
- if (! MN_IS_TEST_MAILBOX(mailbox))
- self_save(self);
- }}
-#line 1485 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 629 "src/mn-mailboxes.gob"
-void
-mn_mailboxes_queue_add (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 1492 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::queue_add"
-#line 629 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 629 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 629 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 629 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1502 "mn-mailboxes.c"
-{
-#line 631 "src/mn-mailboxes.gob"
-
- g_object_ref(mailbox);
- selfp->add_queue = g_slist_append(selfp->add_queue, mailbox);
-
- if (! selfp->queue_idle_id)
- selfp->queue_idle_id = gdk_threads_add_idle(self_queue_idle_cb, self);
- }}
-#line 1512 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 639 "src/mn-mailboxes.gob"
-static void
-mn_mailboxes_remove_real (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 1519 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::remove_real"
-#line 639 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 639 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 639 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 639 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1529 "mn-mailboxes.c"
-{
-#line 641 "src/mn-mailboxes.gob"
-
- self->list = g_list_remove(self->list, mailbox);
- self_mailbox_removed(self, mailbox);
- g_object_unref(mailbox);
- }}
-#line 1537 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 647 "src/mn-mailboxes.gob"
-void
-mn_mailboxes_remove (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 1544 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::remove"
-#line 647 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 647 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 647 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 647 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1554 "mn-mailboxes.c"
-{
-#line 649 "src/mn-mailboxes.gob"
-
- self_remove_real(self, mailbox);
- self_list_changed(self);
- if (! MN_IS_TEST_MAILBOX(mailbox))
- self_save(self);
- }}
-#line 1563 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 656 "src/mn-mailboxes.gob"
-void
-mn_mailboxes_queue_remove (MNMailboxes * self, MNMailbox * mailbox)
-{
-#line 1570 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::queue_remove"
-#line 656 "src/mn-mailboxes.gob"
- g_return_if_fail (self != NULL);
-#line 656 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 656 "src/mn-mailboxes.gob"
- g_return_if_fail (mailbox != NULL);
-#line 656 "src/mn-mailboxes.gob"
- g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1580 "mn-mailboxes.c"
-{
-#line 658 "src/mn-mailboxes.gob"
-
- g_object_ref(mailbox);
- selfp->remove_queue = g_slist_append(selfp->remove_queue, mailbox);
-
- if (! selfp->queue_idle_id)
- selfp->queue_idle_id = gdk_threads_add_idle(self_queue_idle_cb, self);
- }}
-#line 1590 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 666 "src/mn-mailboxes.gob"
-static gboolean
-mn_mailboxes_queue_idle_cb (gpointer data)
-{
-#line 1597 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::queue_idle_cb"
-{
-#line 668 "src/mn-mailboxes.gob"
-
- Self *self = data;
- GSList *l;
-
- MN_LIST_FOREACH(l, selfp->add_queue)
- self_add_real(self, l->data);
-
- mn_g_object_slist_clear(&selfp->add_queue);
-
- MN_LIST_FOREACH(l, selfp->remove_queue)
- self_remove_real(self, l->data);
-
- mn_g_object_slist_clear(&selfp->remove_queue);
-
- self_list_changed(self);
- self_save(self);
-
- selfp->queue_idle_id = 0;
- return FALSE; /* remove */
- }}
-#line 1621 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 689 "src/mn-mailboxes.gob"
-int
-mn_mailboxes_compare_by_name_func (gconstpointer a, gconstpointer b)
-{
-#line 1628 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::compare_by_name_func"
-{
-#line 691 "src/mn-mailboxes.gob"
-
- MNMailbox *mailbox_a = (MNMailbox *) a;
- MNMailbox *mailbox_b = (MNMailbox *) b;
-
- return g_utf8_collate(mailbox_a->runtime_name, mailbox_b->runtime_name);
- }}
-#line 1638 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
-
-#line 698 "src/mn-mailboxes.gob"
-MNMailboxes *
-mn_mailboxes_new (void)
-{
-#line 1645 "mn-mailboxes.c"
-#define __GOB_FUNCTION__ "MN:Mailboxes::new"
-{
-#line 700 "src/mn-mailboxes.gob"
-
- return GET_NEW;
- }}
-#line 1652 "mn-mailboxes.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-mailboxes.gob.stamp b/build/src/mn-mailboxes.gob.stamp
diff --git a/build/src/mn-mailboxes.h b/build/src/mn-mailboxes.h
@@ -1,156 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-mailbox.h"
-
-#ifndef __MN_MAILBOXES_H__
-#define __MN_MAILBOXES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAILBOXES (mn_mailboxes_get_type())
-#define MN_MAILBOXES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailboxes_get_type(), MNMailboxes)
-#define MN_MAILBOXES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mailboxes_get_type(), MNMailboxes const)
-#define MN_MAILBOXES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mailboxes_get_type(), MNMailboxesClass)
-#define MN_IS_MAILBOXES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mailboxes_get_type ())
-
-#define MN_MAILBOXES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mailboxes_get_type(), MNMailboxesClass)
-
-/* Private structure type */
-typedef struct _MNMailboxesPrivate MNMailboxesPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAILBOXES__
-#define __TYPEDEF_MN_MAILBOXES__
-typedef struct _MNMailboxes MNMailboxes;
-#endif
-struct _MNMailboxes {
- GObject __parent__;
- /*< public >*/
- GList * list;
- GPtrArray * messages;
- GHashTable * messages_hash_table;
- gboolean must_save_after_load;
- /*< private >*/
- MNMailboxesPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMailboxesClass MNMailboxesClass;
-struct _MNMailboxesClass {
- GObjectClass __parent__;
- /*signal*/void (* mailbox_added) (MNMailboxes * self, MNMailbox * mailbox);
- /*signal*/void (* mailbox_removed) (MNMailboxes * self, MNMailbox * mailbox);
- /*signal*/void (* mailbox_notify) (MNMailboxes * self, MNMailbox * mailbox, GParamSpec * pspec);
- /*signal*/void (* list_changed) (MNMailboxes * self);
- /*signal*/void (* messages_changed) (MNMailboxes * self, gboolean has_new);
- /*signal*/void (* error_changed) (MNMailboxes * self);
-};
-
-
-/*
- * Public methods
- */
-GType mn_mailboxes_get_type (void) G_GNUC_CONST;
-#line 185 "src/mn-mailboxes.gob"
-gboolean mn_mailboxes_get_manually_checkable (MNMailboxes * self);
-#line 71 "mn-mailboxes.h"
-#line 597 "src/mn-mailboxes.gob"
-void mn_mailboxes_check (MNMailboxes * self);
-#line 74 "mn-mailboxes.h"
-#line 619 "src/mn-mailboxes.gob"
-void mn_mailboxes_add (MNMailboxes * self,
- MNMailbox * mailbox);
-#line 78 "mn-mailboxes.h"
-#line 629 "src/mn-mailboxes.gob"
-void mn_mailboxes_queue_add (MNMailboxes * self,
- MNMailbox * mailbox);
-#line 82 "mn-mailboxes.h"
-#line 647 "src/mn-mailboxes.gob"
-void mn_mailboxes_remove (MNMailboxes * self,
- MNMailbox * mailbox);
-#line 86 "mn-mailboxes.h"
-#line 656 "src/mn-mailboxes.gob"
-void mn_mailboxes_queue_remove (MNMailboxes * self,
- MNMailbox * mailbox);
-#line 90 "mn-mailboxes.h"
-#line 689 "src/mn-mailboxes.gob"
-int mn_mailboxes_compare_by_name_func (gconstpointer a,
- gconstpointer b);
-#line 94 "mn-mailboxes.h"
-#line 698 "src/mn-mailboxes.gob"
-MNMailboxes * mn_mailboxes_new (void);
-#line 97 "mn-mailboxes.h"
-
-/*
- * Signal connection wrapper macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define mn_mailboxes_connect__mailbox_added(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_added",(GCallback) __extension__ ({void (* ___mailbox_added) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, gpointer ___data ) = (func); ___mailbox_added; }), (data))
-#define mn_mailboxes_connect_after__mailbox_added(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_added",(GCallback) __extension__ ({void (* ___mailbox_added) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, gpointer ___data ) = (func); ___mailbox_added; }), (data))
-#define mn_mailboxes_connect_data__mailbox_added(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_added",(GCallback) __extension__ ({void (* ___mailbox_added) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, gpointer ___data ) = (func); ___mailbox_added; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailboxes_connect__mailbox_removed(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_removed",(GCallback) __extension__ ({void (* ___mailbox_removed) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, gpointer ___data ) = (func); ___mailbox_removed; }), (data))
-#define mn_mailboxes_connect_after__mailbox_removed(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_removed",(GCallback) __extension__ ({void (* ___mailbox_removed) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, gpointer ___data ) = (func); ___mailbox_removed; }), (data))
-#define mn_mailboxes_connect_data__mailbox_removed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_removed",(GCallback) __extension__ ({void (* ___mailbox_removed) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, gpointer ___data ) = (func); ___mailbox_removed; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailboxes_connect__mailbox_notify(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_notify",(GCallback) __extension__ ({void (* ___mailbox_notify) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, GParamSpec * ___fake___pspec, gpointer ___data ) = (func); ___mailbox_notify; }), (data))
-#define mn_mailboxes_connect_after__mailbox_notify(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_notify",(GCallback) __extension__ ({void (* ___mailbox_notify) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, GParamSpec * ___fake___pspec, gpointer ___data ) = (func); ___mailbox_notify; }), (data))
-#define mn_mailboxes_connect_data__mailbox_notify(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"mailbox_notify",(GCallback) __extension__ ({void (* ___mailbox_notify) (MNMailboxes * ___fake___self, MNMailbox * ___fake___mailbox, GParamSpec * ___fake___pspec, gpointer ___data ) = (func); ___mailbox_notify; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailboxes_connect__list_changed(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"list_changed",(GCallback) __extension__ ({void (* ___list_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___list_changed; }), (data))
-#define mn_mailboxes_connect_after__list_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"list_changed",(GCallback) __extension__ ({void (* ___list_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___list_changed; }), (data))
-#define mn_mailboxes_connect_data__list_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"list_changed",(GCallback) __extension__ ({void (* ___list_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___list_changed; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailboxes_connect__messages_changed(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailboxes * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data))
-#define mn_mailboxes_connect_after__messages_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailboxes * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data))
-#define mn_mailboxes_connect_data__messages_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"messages_changed",(GCallback) __extension__ ({void (* ___messages_changed) (MNMailboxes * ___fake___self, gboolean ___fake___has_new, gpointer ___data ) = (func); ___messages_changed; }), (data), (destroy_data), (GConnectFlags)(flags))
-#define mn_mailboxes_connect__error_changed(object,func,data) g_signal_connect(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"error_changed",(GCallback) __extension__ ({void (* ___error_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___error_changed; }), (data))
-#define mn_mailboxes_connect_after__error_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"error_changed",(GCallback) __extension__ ({void (* ___error_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___error_changed; }), (data))
-#define mn_mailboxes_connect_data__error_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(__extension__ ({MNMailboxes *___object = (object); ___object; })),"error_changed",(GCallback) __extension__ ({void (* ___error_changed) (MNMailboxes * ___fake___self, gpointer ___data ) = (func); ___error_changed; }), (data), (destroy_data), (GConnectFlags)(flags))
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define mn_mailboxes_connect__mailbox_added(object,func,data) g_signal_connect(MN_MAILBOXES(object),"mailbox_added",(GCallback)(func),(data))
-#define mn_mailboxes_connect_after__mailbox_added(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"mailbox_added",(GCallback)(func),(data))
-#define mn_mailboxes_connect_data__mailbox_added(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"mailbox_added",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailboxes_connect__mailbox_removed(object,func,data) g_signal_connect(MN_MAILBOXES(object),"mailbox_removed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_after__mailbox_removed(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"mailbox_removed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_data__mailbox_removed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"mailbox_removed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailboxes_connect__mailbox_notify(object,func,data) g_signal_connect(MN_MAILBOXES(object),"mailbox_notify",(GCallback)(func),(data))
-#define mn_mailboxes_connect_after__mailbox_notify(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"mailbox_notify",(GCallback)(func),(data))
-#define mn_mailboxes_connect_data__mailbox_notify(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"mailbox_notify",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailboxes_connect__list_changed(object,func,data) g_signal_connect(MN_MAILBOXES(object),"list_changed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_after__list_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"list_changed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_data__list_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"list_changed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailboxes_connect__messages_changed(object,func,data) g_signal_connect(MN_MAILBOXES(object),"messages_changed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_after__messages_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"messages_changed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_data__messages_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"messages_changed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#define mn_mailboxes_connect__error_changed(object,func,data) g_signal_connect(MN_MAILBOXES(object),"error_changed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_after__error_changed(object,func,data) g_signal_connect_after(MN_MAILBOXES(object),"error_changed",(GCallback)(func),(data))
-#define mn_mailboxes_connect_data__error_changed(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAILBOXES(object),"error_changed",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_MAILBOXES_GET_PROP_MANUALLY_CHECKABLE(arg) "manually_checkable", __extension__ ({gboolean *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_MAILBOXES_GET_PROP_MANUALLY_CHECKABLE(arg) "manually_checkable",(gboolean *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-maildir-mailbox-backend-private.h b/build/src/mn-maildir-mailbox-backend-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAILDIR_MAILBOX_BACKEND_PRIVATE_H__
-#define __MN_MAILDIR_MAILBOX_BACKEND_PRIVATE_H__
-
-#include "mn-maildir-mailbox-backend.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-maildir-mailbox-backend.c b/build/src/mn-maildir-mailbox-backend.c
@@ -1,472 +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-maildir-mailbox-backend.h"
-
-#include "mn-maildir-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 24 "src/mn-maildir-mailbox-backend.gob"
-
-#include <string.h>
-#include <stdlib.h>
-#include <glib/gi18n.h>
-#include "mn-mailbox-private.h"
-#include "mn-reentrant-mailbox-private.h"
-#include "mn-vfs-mailbox-backend-private.h"
-#include "mn-vfs.h"
-#include "mn-util.h"
-#include "mn-message-mime.h"
-#include "mn-maildir-message.h"
-
-#line 37 "mn-maildir-mailbox-backend.c"
-/* self casting macros */
-#define SELF(x) MN_MAILDIR_MAILBOX_BACKEND(x)
-#define SELF_CONST(x) MN_MAILDIR_MAILBOX_BACKEND_CONST(x)
-#define IS_SELF(x) MN_IS_MAILDIR_MAILBOX_BACKEND(x)
-#define TYPE_SELF MN_TYPE_MAILDIR_MAILBOX_BACKEND
-#define SELF_CLASS(x) MN_MAILDIR_MAILBOX_BACKEND_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAILDIR_MAILBOX_BACKEND_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMaildirMailboxBackend Self;
-typedef MNMaildirMailboxBackendClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-maildir-mailbox-backend.gob"
-static void mn_maildir_mailbox_backend_init (MNMaildirMailboxBackend * o) G_GNUC_UNUSED;
-#line 54 "mn-maildir-mailbox-backend.c"
-#line 39 "src/mn-maildir-mailbox-backend.gob"
-static void mn_maildir_mailbox_backend_class_init (MNMaildirMailboxBackendClass * class) G_GNUC_UNUSED;
-#line 57 "mn-maildir-mailbox-backend.c"
-#line 44 "src/mn-maildir-mailbox-backend.gob"
-static void ___2_mn_maildir_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
-#line 60 "mn-maildir-mailbox-backend.c"
-#line 66 "src/mn-maildir-mailbox-backend.gob"
-static gboolean mn_maildir_mailbox_backend_dir_exists (MNVFSMailbox * mailbox, const char * name) G_GNUC_UNUSED;
-#line 63 "mn-maildir-mailbox-backend.c"
-#line 80 "src/mn-maildir-mailbox-backend.gob"
-static gboolean ___4_mn_maildir_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
-#line 66 "mn-maildir-mailbox-backend.c"
-#line 90 "src/mn-maildir-mailbox-backend.gob"
-static void mn_maildir_mailbox_backend_monitor_directory (MNMaildirMailboxBackend * self, int check_id, const char * dir) G_GNUC_UNUSED;
-#line 69 "mn-maildir-mailbox-backend.c"
-#line 105 "src/mn-maildir-mailbox-backend.gob"
-static gboolean mn_maildir_mailbox_backend_scan_directory (MNMaildirMailboxBackend * self, int check_id, const char * dir, gboolean new, GSList ** messages, int * num_errors, GError ** err) G_GNUC_UNUSED;
-#line 72 "mn-maildir-mailbox-backend.c"
-#line 240 "src/mn-maildir-mailbox-backend.gob"
-static void ___7_mn_maildir_mailbox_backend_check (MNVFSMailboxBackend * backend, int check_id) G_GNUC_UNUSED;
-#line 75 "mn-maildir-mailbox-backend.c"
-
-/* pointer to the class of our parent */
-static MNVFSMailboxBackendClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_dir_exists mn_maildir_mailbox_backend_dir_exists
-#define self_monitor_directory mn_maildir_mailbox_backend_monitor_directory
-#define self_scan_directory mn_maildir_mailbox_backend_scan_directory
-GType
-mn_maildir_mailbox_backend_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMaildirMailboxBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_maildir_mailbox_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMaildirMailboxBackend),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_maildir_mailbox_backend_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_VFS_MAILBOX_BACKEND, "MNMaildirMailboxBackend", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMaildirMailboxBackend *)g_object_new(mn_maildir_mailbox_backend_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMaildirMailboxBackend * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMaildirMailboxBackend *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMaildirMailboxBackend *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMaildirMailboxBackend *)g_object_new_valist (mn_maildir_mailbox_backend_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_maildir_mailbox_backend_init (MNMaildirMailboxBackend * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::init"
-}
-#undef __GOB_FUNCTION__
-#line 39 "src/mn-maildir-mailbox-backend.gob"
-static void
-mn_maildir_mailbox_backend_class_init (MNMaildirMailboxBackendClass * class G_GNUC_UNUSED)
-{
-#line 136 "mn-maildir-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::class_init"
- MNVFSMailboxBackendClass *mn_vfs_mailbox_backend_class = (MNVFSMailboxBackendClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX_BACKEND);
-
-#line 44 "src/mn-maildir-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->monitor_cb = ___2_mn_maildir_mailbox_backend_monitor_cb;
-#line 80 "src/mn-maildir-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->is = ___4_mn_maildir_mailbox_backend_is;
-#line 240 "src/mn-maildir-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->check = ___7_mn_maildir_mailbox_backend_check;
-#line 148 "mn-maildir-mailbox-backend.c"
- {
-#line 40 "src/mn-maildir-mailbox-backend.gob"
-
- MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "Maildir";
-
-#line 154 "mn-maildir-mailbox-backend.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 44 "src/mn-maildir-mailbox-backend.gob"
-static void
-___2_mn_maildir_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
-#line 164 "mn-maildir-mailbox-backend.c"
-#define PARENT_HANDLER(___backend,___info_uri,___event_type) \
- { if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb) \
- (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb)(___backend,___info_uri,___event_type); }
-{
-#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::monitor_cb"
-{
-#line 48 "src/mn-maildir-mailbox-backend.gob"
-
- if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
- || event_type == GNOME_VFS_MONITOR_EVENT_DELETED
- || event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
- {
- char *filename;
-
- filename = mn_vfs_uri_extract_short_name(info_uri);
- if (filename)
- {
- if (filename[0] != '.')
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(backend->mailbox));
-
- g_free(filename);
- }
- }
- }}
-#line 189 "mn-maildir-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 66 "src/mn-maildir-mailbox-backend.gob"
-static gboolean
-mn_maildir_mailbox_backend_dir_exists (MNVFSMailbox * mailbox, const char * name)
-{
-#line 197 "mn-maildir-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::dir_exists"
-#line 66 "src/mn-maildir-mailbox-backend.gob"
- g_return_val_if_fail (mailbox != NULL, (gboolean )0);
-#line 66 "src/mn-maildir-mailbox-backend.gob"
- g_return_val_if_fail (MN_IS_VFS_MAILBOX (mailbox), (gboolean )0);
-#line 66 "src/mn-maildir-mailbox-backend.gob"
- g_return_val_if_fail (name != NULL, (gboolean )0);
-#line 205 "mn-maildir-mailbox-backend.c"
-{
-#line 69 "src/mn-maildir-mailbox-backend.gob"
-
- GnomeVFSURI *dir_uri;
- gboolean exists;
-
- dir_uri = gnome_vfs_uri_append_path(mailbox->vfs_uri, name);
- exists = mn_vfs_test(dir_uri, G_FILE_TEST_IS_DIR);
- gnome_vfs_uri_unref(dir_uri);
-
- return exists;
- }}
-#line 218 "mn-maildir-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 80 "src/mn-maildir-mailbox-backend.gob"
-static gboolean
-___4_mn_maildir_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
-#line 224 "mn-maildir-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:Maildir:Mailbox:Backend::is"
-{
-#line 84 "src/mn-maildir-mailbox-backend.gob"
-
- return self_dir_exists(mailbox, "cur")
- && self_dir_exists(mailbox, "new")
- && self_dir_exists(mailbox, "tmp");
- }}
-#line 238 "mn-maildir-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 90 "src/mn-maildir-mailbox-backend.gob"
-static void
-mn_maildir_mailbox_backend_monitor_directory (MNMaildirMailboxBackend * self, int check_id, const char * dir)
-{
-#line 246 "mn-maildir-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::monitor_directory"
-#line 90 "src/mn-maildir-mailbox-backend.gob"
- g_return_if_fail (self != NULL);
-#line 90 "src/mn-maildir-mailbox-backend.gob"
- g_return_if_fail (MN_IS_MAILDIR_MAILBOX_BACKEND (self));
-#line 90 "src/mn-maildir-mailbox-backend.gob"
- g_return_if_fail (dir != NULL);
-#line 254 "mn-maildir-mailbox-backend.c"
-{
-#line 92 "src/mn-maildir-mailbox-backend.gob"
-
- MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
- GnomeVFSURI *uri;
- char *text_uri;
-
- uri = gnome_vfs_uri_append_path(backend->mailbox->vfs_uri, dir);
- text_uri = gnome_vfs_uri_to_string(uri, GNOME_VFS_URI_HIDE_NONE);
- gnome_vfs_uri_unref(uri);
-
- mn_vfs_mailbox_backend_monitor(backend, check_id, text_uri, GNOME_VFS_MONITOR_DIRECTORY);
- g_free(text_uri);
- }}
-#line 269 "mn-maildir-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 105 "src/mn-maildir-mailbox-backend.gob"
-static gboolean
-mn_maildir_mailbox_backend_scan_directory (MNMaildirMailboxBackend * self, int check_id, const char * dir, gboolean new, GSList ** messages, int * num_errors, GError ** err)
-{
-#line 276 "mn-maildir-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::scan_directory"
-#line 105 "src/mn-maildir-mailbox-backend.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 105 "src/mn-maildir-mailbox-backend.gob"
- g_return_val_if_fail (MN_IS_MAILDIR_MAILBOX_BACKEND (self), (gboolean )0);
-#line 105 "src/mn-maildir-mailbox-backend.gob"
- g_return_val_if_fail (dir != NULL, (gboolean )0);
-#line 105 "src/mn-maildir-mailbox-backend.gob"
- g_return_val_if_fail (messages != NULL, (gboolean )0);
-#line 105 "src/mn-maildir-mailbox-backend.gob"
- g_return_val_if_fail (num_errors != NULL, (gboolean )0);
-#line 288 "mn-maildir-mailbox-backend.c"
-{
-#line 113 "src/mn-maildir-mailbox-backend.gob"
-
- MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
- GnomeVFSURI *uri;
- GnomeVFSResult result;
- GnomeVFSResult close_result;
- GnomeVFSDirectoryHandle *handle;
- GnomeVFSFileInfo *file_info;
- gboolean aborted = FALSE;
-
- uri = gnome_vfs_uri_append_path(backend->mailbox->vfs_uri, dir);
-
- result = gnome_vfs_directory_open_from_uri(&handle, uri, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result != GNOME_VFS_OK)
- {
- g_set_error(err, 0, 0, _("unable to open folder \"%s\": %s"), dir, gnome_vfs_result_to_string(result));
- gnome_vfs_uri_unref(uri);
- return FALSE;
- }
-
- file_info = gnome_vfs_file_info_new();
- while ((result = gnome_vfs_directory_read_next(handle, file_info)) == GNOME_VFS_OK)
- if (file_info->name[0] != '.')
- {
- char *mid;
- MNMessageFlags flags = 0;
- MNVFSMessage *message = NULL;
-
- if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- {
- aborted = TRUE;
- break;
- }
-
- if (new)
- {
- mid = g_strdup(file_info->name);
- flags |= MN_MESSAGE_NEW;
- }
- else
- {
- char *info;
-
- /* http://cr.yp.to/proto/maildir.html */
-
- info = strrchr(file_info->name, ':');
- if (! info
- || ! g_str_has_prefix(info + 1, "2,")
- || strpbrk(info + 3, "ST"))
- continue; /* no info, or message seen/trashed: ignore it */
-
- mid = g_strndup(file_info->name, info - file_info->name);
- }
-
- /*
- * Hold the GDK lock while using
- * mn_mailbox_get_message_from_mid(), since for
- * MNReentrantMailbox, mail checks can run concurrently, so
- * another check could be modifying the MID hash table.
- */
- GDK_THREADS_ENTER();
-
- message = MN_VFS_MESSAGE(mn_mailbox_get_message_from_mid(MN_MAILBOX(backend->mailbox), mid));
- if (message)
- message = mn_vfs_message_new_from_message(message,
- uri,
- file_info->name,
- flags);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- if (! message)
- {
- GError *tmp_err = NULL;
-
- message = mn_vfs_message_new(MN_TYPE_MAILDIR_MESSAGE,
- backend,
- mid,
- uri,
- file_info->name,
- flags,
- FALSE,
- &tmp_err);
-
- if (tmp_err)
- {
- GnomeVFSURI *message_uri;
- char *message_text_uri;
-
- message_uri = gnome_vfs_uri_append_file_name(uri, file_info->name);
- message_text_uri = gnome_vfs_uri_to_string(message_uri, GNOME_VFS_URI_HIDE_PASSWORD);
- gnome_vfs_uri_unref(message_uri);
-
- mn_mailbox_warning(MN_MAILBOX(backend->mailbox), "cannot read message \"%s\": %s",
- message_text_uri, tmp_err->message);
- g_free(message_text_uri);
- g_error_free(tmp_err);
-
- (*num_errors)++;
- }
- }
-
- g_free(mid);
-
- if (message)
- *messages = g_slist_prepend(*messages, message);
- }
- gnome_vfs_uri_unref(uri);
- gnome_vfs_file_info_unref(file_info);
- close_result = gnome_vfs_directory_close(handle);
-
- if (! aborted)
- {
- if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
- {
- if (close_result == GNOME_VFS_OK)
- return TRUE;
- else
- g_set_error(err, 0, 0, _("unable to close folder \"%s\": %s"), dir, gnome_vfs_result_to_string(close_result));
- }
- else
- g_set_error(err, 0, 0, _("error while reading folder \"%s\": %s"), dir, gnome_vfs_result_to_string(result));
- }
-
- return FALSE;
- }}
-#line 417 "mn-maildir-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 240 "src/mn-maildir-mailbox-backend.gob"
-static void
-___7_mn_maildir_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, int check_id)
-#line 423 "mn-maildir-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:Maildir:Mailbox:Backend::check"
-{
-#line 242 "src/mn-maildir-mailbox-backend.gob"
-
- Self *self = SELF(backend);
- GSList *messages = NULL;
- GError *err = NULL;
- int num_errors = 0;
- gboolean status;
-
- self_monitor_directory(self, check_id, "cur");
- self_monitor_directory(self, check_id, "new");
-
- status = self_scan_directory(self, check_id, "cur", FALSE, &messages, &num_errors, &err)
- && self_scan_directory(self, check_id, "new", TRUE, &messages, &num_errors, &err);
-
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- {
- if (status)
- {
- mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
-
- if (num_errors != 0)
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox),
- ngettext("cannot read %i message",
- "cannot read %i messages",
- num_errors),
- num_errors);
- }
- else
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), "%s", err->message);
- }
-
- mn_g_object_slist_free(messages);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- if (err)
- g_error_free(err);
- }}
-#line 471 "mn-maildir-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
diff --git a/build/src/mn-maildir-mailbox-backend.gob.stamp b/build/src/mn-maildir-mailbox-backend.gob.stamp
diff --git a/build/src/mn-maildir-mailbox-backend.h b/build/src/mn-maildir-mailbox-backend.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-vfs-mailbox-backend.h"
-
-#ifndef __MN_MAILDIR_MAILBOX_BACKEND_H__
-#define __MN_MAILDIR_MAILBOX_BACKEND_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAILDIR_MAILBOX_BACKEND (mn_maildir_mailbox_backend_get_type())
-#define MN_MAILDIR_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_maildir_mailbox_backend_get_type(), MNMaildirMailboxBackend)
-#define MN_MAILDIR_MAILBOX_BACKEND_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_maildir_mailbox_backend_get_type(), MNMaildirMailboxBackend const)
-#define MN_MAILDIR_MAILBOX_BACKEND_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_maildir_mailbox_backend_get_type(), MNMaildirMailboxBackendClass)
-#define MN_IS_MAILDIR_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_maildir_mailbox_backend_get_type ())
-
-#define MN_MAILDIR_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_maildir_mailbox_backend_get_type(), MNMaildirMailboxBackendClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAILDIR_MAILBOX_BACKEND__
-#define __TYPEDEF_MN_MAILDIR_MAILBOX_BACKEND__
-typedef struct _MNMaildirMailboxBackend MNMaildirMailboxBackend;
-#endif
-struct _MNMaildirMailboxBackend {
- MNVFSMailboxBackend __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMaildirMailboxBackendClass MNMaildirMailboxBackendClass;
-struct _MNMaildirMailboxBackendClass {
- MNVFSMailboxBackendClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_maildir_mailbox_backend_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-maildir-message-private.h b/build/src/mn-maildir-message-private.h
@@ -1,23 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MAILDIR_MESSAGE_PRIVATE_H__
-#define __MN_MAILDIR_MESSAGE_PRIVATE_H__
-
-#include "mn-maildir-message.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 24 "src/mn-maildir-message.gob"
-
-#include <gtk/gtk.h>
-
-#line 18 "mn-maildir-message-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-maildir-message.c b/build/src/mn-maildir-message.c
@@ -1,449 +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-maildir-message.h"
-
-#include "mn-maildir-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 28 "src/mn-maildir-message.gob"
-
-#include <glib/gi18n.h>
-#include "mn-vfs-mailbox.h"
-#include "mn-vfs.h"
-#include "mn-util.h"
-#include "mn-message-private.h"
-#include "mn-shell.h"
-
-#define DELETE_DIALOG_MESSAGE "mn-maildir-message-delete-dialog-message"
-
-#line 37 "mn-maildir-message.c"
-/* self casting macros */
-#define SELF(x) MN_MAILDIR_MESSAGE(x)
-#define SELF_CONST(x) MN_MAILDIR_MESSAGE_CONST(x)
-#define IS_SELF(x) MN_IS_MAILDIR_MESSAGE(x)
-#define TYPE_SELF MN_TYPE_MAILDIR_MESSAGE
-#define SELF_CLASS(x) MN_MAILDIR_MESSAGE_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MAILDIR_MESSAGE_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMaildirMessage Self;
-typedef MNMaildirMessageClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-maildir-message.gob"
-static void mn_maildir_message_init (MNMaildirMessage * o) G_GNUC_UNUSED;
-#line 54 "mn-maildir-message.c"
-#line 0 "src/mn-maildir-message.gob"
-static void mn_maildir_message_class_init (MNMaildirMessageClass * c) G_GNUC_UNUSED;
-#line 57 "mn-maildir-message.c"
-#line 41 "src/mn-maildir-message.gob"
-static int mn_maildir_message_flags_sort_cb (const void * a, const void * b) G_GNUC_UNUSED;
-#line 60 "mn-maildir-message.c"
-#line 52 "src/mn-maildir-message.gob"
-static void ___2_mn_maildir_message_builtin_mark_as_read (MNMessage * message, MNMessageActionRequest * request) G_GNUC_UNUSED;
-#line 63 "mn-maildir-message.c"
-#line 58 "src/mn-maildir-message.gob"
-static GError * mn_maildir_message_builtin_mark_as_read_cb (MNMessage * message, gpointer data) G_GNUC_UNUSED;
-#line 66 "mn-maildir-message.c"
-#line 114 "src/mn-maildir-message.gob"
-static GnomeVFSURI * mn_maildir_message_get_trash_uri (MNMaildirMessage * self) G_GNUC_UNUSED;
-#line 69 "mn-maildir-message.c"
-#line 144 "src/mn-maildir-message.gob"
-static GError * mn_maildir_message_delete_with_prompt (MNMaildirMessage * self, const char * format, ...)
-G_GNUC_PRINTF(2, 3) G_GNUC_UNUSED;
-#line 73 "mn-maildir-message.c"
-#line 192 "src/mn-maildir-message.gob"
-static void mn_maildir_message_delete_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
-#line 76 "mn-maildir-message.c"
-#line 207 "src/mn-maildir-message.gob"
-static void ___7_mn_maildir_message_builtin_delete (MNMessage * message, MNMessageActionRequest * request) G_GNUC_UNUSED;
-#line 79 "mn-maildir-message.c"
-#line 213 "src/mn-maildir-message.gob"
-static GError * mn_maildir_message_builtin_delete_cb (MNMessage * message, gpointer data) G_GNUC_UNUSED;
-#line 82 "mn-maildir-message.c"
-
-/* pointer to the class of our parent */
-static MNVFSMessageClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_flags_sort_cb mn_maildir_message_flags_sort_cb
-#define self_builtin_mark_as_read_cb mn_maildir_message_builtin_mark_as_read_cb
-#define self_get_trash_uri mn_maildir_message_get_trash_uri
-#define self_delete_with_prompt mn_maildir_message_delete_with_prompt
-#define self_delete_messages_changed_h mn_maildir_message_delete_messages_changed_h
-#define self_builtin_delete_cb mn_maildir_message_builtin_delete_cb
-GType
-mn_maildir_message_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMaildirMessageClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_maildir_message_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMaildirMessage),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_maildir_message_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_VFS_MESSAGE, "MNMaildirMessage", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMaildirMessage *)g_object_new(mn_maildir_message_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMaildirMessage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMaildirMessage *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMaildirMessage *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMaildirMessage *)g_object_new_valist (mn_maildir_message_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_maildir_message_init (MNMaildirMessage * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Maildir:Message::init"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_maildir_message_class_init (MNMaildirMessageClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Maildir:Message::class_init"
- MNMessageClass *mn_message_class = (MNMessageClass *)c;
-
- parent_class = g_type_class_ref (MN_TYPE_VFS_MESSAGE);
-
-#line 52 "src/mn-maildir-message.gob"
- mn_message_class->builtin_mark_as_read = ___2_mn_maildir_message_builtin_mark_as_read;
-#line 207 "src/mn-maildir-message.gob"
- mn_message_class->builtin_delete = ___7_mn_maildir_message_builtin_delete;
-#line 154 "mn-maildir-message.c"
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 41 "src/mn-maildir-message.gob"
-static int
-mn_maildir_message_flags_sort_cb (const void * a, const void * b)
-{
-#line 164 "mn-maildir-message.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Message::flags_sort_cb"
-{
-#line 43 "src/mn-maildir-message.gob"
-
- char ca = *((char *) a);
- char cb = *((char *) b);
-
- /* sort flags using ASCII order, see http://cr.yp.to/proto/maildir.html */
-
- return ca - cb;
- }}
-#line 176 "mn-maildir-message.c"
-#undef __GOB_FUNCTION__
-
-#line 52 "src/mn-maildir-message.gob"
-static void
-___2_mn_maildir_message_builtin_mark_as_read (MNMessage * message G_GNUC_UNUSED, MNMessageActionRequest * request)
-#line 182 "mn-maildir-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:Maildir:Message::builtin_mark_as_read"
-{
-#line 54 "src/mn-maildir-message.gob"
-
- mn_message_perform_action_in_thread(request, self_builtin_mark_as_read_cb, NULL);
- }}
-#line 193 "mn-maildir-message.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 58 "src/mn-maildir-message.gob"
-static GError *
-mn_maildir_message_builtin_mark_as_read_cb (MNMessage * message, gpointer data)
-{
-#line 201 "mn-maildir-message.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Message::builtin_mark_as_read_cb"
-{
-#line 60 "src/mn-maildir-message.gob"
-
- MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
- char *old_flags;
- char *old_filename;
- char *new_filename;
- GnomeVFSURI *dir_uri;
- GnomeVFSURI *new_uri;
- GError *err = NULL;
-
- /* http://cr.yp.to/proto/maildir.html */
-
- old_filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
-
- old_flags = strrchr(old_filename, ',');
- if (old_flags)
- {
- char *new_flags;
- int old_len;
- char *base_filename;
-
- /* append the S (seen) flag */
-
- old_flags++;
- g_assert(strchr(old_flags, 'S') == NULL);
-
- old_len = strlen(old_flags);
- new_flags = g_new(char, old_len + 2); /* + space for S and nul */
- memcpy(new_flags, old_flags, old_len);
- new_flags[old_len] = 'S';
- new_flags[old_len + 1] = 0;
- qsort(new_flags, old_len + 1, sizeof(char), self_flags_sort_cb);
-
- base_filename = g_strndup(old_filename, old_flags - old_filename - 1);
- new_filename = g_strdup_printf("%s,%s", base_filename, new_flags);
- g_free(base_filename);
- g_free(new_flags);
- }
- else
- new_filename = g_strconcat(old_filename, ":2,S", NULL);
-
- g_free(old_filename);
-
- dir_uri = gnome_vfs_uri_append_path(MN_VFS_MAILBOX(message->mailbox)->vfs_uri, "cur");
- new_uri = gnome_vfs_uri_append_file_name(dir_uri, new_filename);
- gnome_vfs_uri_unref(dir_uri);
- g_free(new_filename);
-
- mn_vfs_result_to_g_error(gnome_vfs_move_uri(vmessage->vfs_uri, new_uri, TRUE), &err);
- gnome_vfs_uri_unref(new_uri);
-
- return err;
- }}
-#line 257 "mn-maildir-message.c"
-#undef __GOB_FUNCTION__
-
-#line 114 "src/mn-maildir-message.gob"
-static GnomeVFSURI *
-mn_maildir_message_get_trash_uri (MNMaildirMessage * self)
-{
-#line 264 "mn-maildir-message.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Message::get_trash_uri"
-#line 114 "src/mn-maildir-message.gob"
- g_return_val_if_fail (self != NULL, (GnomeVFSURI * )0);
-#line 114 "src/mn-maildir-message.gob"
- g_return_val_if_fail (MN_IS_MAILDIR_MESSAGE (self), (GnomeVFSURI * )0);
-#line 270 "mn-maildir-message.c"
-{
-#line 116 "src/mn-maildir-message.gob"
-
- MNVFSMessage *vmessage = MN_VFS_MESSAGE(self);
- GnomeVFSURI *trash_uri;
-
- /*
- * Do what is advised in the gnome_vfs_find_directory()
- * documentation: first pass find_if_needed, then create_if_needed.
- */
-
- if (gnome_vfs_find_directory(vmessage->vfs_uri,
- GNOME_VFS_DIRECTORY_KIND_TRASH,
- &trash_uri,
- FALSE,
- TRUE,
- 0) == GNOME_VFS_OK)
- return trash_uri;
-
- if (gnome_vfs_find_directory(vmessage->vfs_uri,
- GNOME_VFS_DIRECTORY_KIND_TRASH,
- &trash_uri,
- TRUE,
- FALSE,
- S_IRUSR | S_IWUSR | S_IXUSR) == GNOME_VFS_OK)
- return trash_uri;
-
- return NULL;
- }}
-#line 300 "mn-maildir-message.c"
-#undef __GOB_FUNCTION__
-
-#line 144 "src/mn-maildir-message.gob"
-static GError *
-mn_maildir_message_delete_with_prompt (MNMaildirMessage * self, const char * format, ...)
-{
-#line 307 "mn-maildir-message.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Message::delete_with_prompt"
-#line 144 "src/mn-maildir-message.gob"
- g_return_val_if_fail (self != NULL, (GError * )0);
-#line 144 "src/mn-maildir-message.gob"
- g_return_val_if_fail (MN_IS_MAILDIR_MESSAGE (self), (GError * )0);
-#line 144 "src/mn-maildir-message.gob"
- g_return_val_if_fail (format != NULL, (GError * )0);
-#line 315 "mn-maildir-message.c"
-{
-#line 147 "src/mn-maildir-message.gob"
-
- GtkWidget *dialog;
- char *prompt;
- int response;
-
- MN_STRDUP_VPRINTF(prompt, format);
-
- GDK_THREADS_ENTER();
-
- dialog = mn_alert_dialog_new(NULL,
- GTK_MESSAGE_WARNING,
- 0,
- _("Delete message?"),
- prompt);
- g_free(prompt);
-
- gtk_dialog_add_buttons(GTK_DIALOG(dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_DELETE, GTK_RESPONSE_OK,
- NULL);
-
- g_object_set_data(G_OBJECT(dialog), DELETE_DIALOG_MESSAGE, self);
-
- mn_g_object_connect(dialog, mn_shell->mailboxes,
- "signal::messages-changed", self_delete_messages_changed_h, dialog,
- NULL);
-
- response = mn_dialog_run_nonmodal(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- if (response == GTK_RESPONSE_OK)
- {
- GError *err = NULL;
-
- mn_vfs_result_to_g_error(gnome_vfs_unlink_from_uri(MN_VFS_MESSAGE(self)->vfs_uri), &err);
-
- return err;
- }
- else
- return g_error_new(MN_MESSAGE_ACTION_ERROR, MN_MESSAGE_ACTION_ERROR_CANCELLED, "cancelled");
- }}
-#line 362 "mn-maildir-message.c"
-#undef __GOB_FUNCTION__
-
-#line 192 "src/mn-maildir-message.gob"
-static void
-mn_maildir_message_delete_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data)
-{
-#line 369 "mn-maildir-message.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Message::delete_messages_changed_h"
-{
-#line 196 "src/mn-maildir-message.gob"
-
- GtkWidget *dialog = user_data;
- Self *self;
-
- self = g_object_get_data(G_OBJECT(dialog), DELETE_DIALOG_MESSAGE);
-
- /* if the message was removed, close the dialog */
- if (! g_hash_table_lookup(mn_shell->mailboxes->messages_hash_table, MN_MESSAGE(self)->id))
- gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_CANCEL);
- }}
-#line 383 "mn-maildir-message.c"
-#undef __GOB_FUNCTION__
-
-#line 207 "src/mn-maildir-message.gob"
-static void
-___7_mn_maildir_message_builtin_delete (MNMessage * message G_GNUC_UNUSED, MNMessageActionRequest * request)
-#line 389 "mn-maildir-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:Maildir:Message::builtin_delete"
-{
-#line 209 "src/mn-maildir-message.gob"
-
- mn_message_perform_action_in_thread(request, self_builtin_delete_cb, NULL);
- }}
-#line 400 "mn-maildir-message.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 213 "src/mn-maildir-message.gob"
-static GError *
-mn_maildir_message_builtin_delete_cb (MNMessage * message, gpointer data)
-{
-#line 408 "mn-maildir-message.c"
-#define __GOB_FUNCTION__ "MN:Maildir:Message::builtin_delete_cb"
-{
-#line 215 "src/mn-maildir-message.gob"
-
- Self *self = SELF(message);
- MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
- GnomeVFSURI *trash_uri;
- char *filename;
- GnomeVFSURI *dest_uri;
- GnomeVFSResult result;
-
- trash_uri = self_get_trash_uri(self);
- if (! trash_uri)
- return self_delete_with_prompt(self, _("The message cannot be moved to the trash. Permanently delete it?"));
-
- filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
- dest_uri = gnome_vfs_uri_append_file_name(trash_uri, filename);
- gnome_vfs_uri_unref(trash_uri);
- g_free(filename);
-
- /*
- * Use gnome_vfs_xfer_uri() rather than gnome_vfs_move_uri(), in
- * case the trash resides on a different file system than the
- * message.
- */
- result = gnome_vfs_xfer_uri(vmessage->vfs_uri,
- dest_uri,
- GNOME_VFS_XFER_REMOVESOURCE
- | GNOME_VFS_XFER_FOLLOW_LINKS,
- GNOME_VFS_XFER_ERROR_MODE_ABORT,
- GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
- NULL,
- NULL);
- gnome_vfs_uri_unref(dest_uri);
-
- if (result == GNOME_VFS_OK)
- return NULL;
- else
- return self_delete_with_prompt(self, _("The message could not be moved to the trash (%s). Permanently delete it?"), gnome_vfs_result_to_string(result));
- }}
-#line 449 "mn-maildir-message.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-maildir-message.gob.stamp b/build/src/mn-maildir-message.gob.stamp
diff --git a/build/src/mn-maildir-message.h b/build/src/mn-maildir-message.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-vfs-message.h"
-
-#ifndef __MN_MAILDIR_MESSAGE_H__
-#define __MN_MAILDIR_MESSAGE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MAILDIR_MESSAGE (mn_maildir_message_get_type())
-#define MN_MAILDIR_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_maildir_message_get_type(), MNMaildirMessage)
-#define MN_MAILDIR_MESSAGE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_maildir_message_get_type(), MNMaildirMessage const)
-#define MN_MAILDIR_MESSAGE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_maildir_message_get_type(), MNMaildirMessageClass)
-#define MN_IS_MAILDIR_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_maildir_message_get_type ())
-
-#define MN_MAILDIR_MESSAGE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_maildir_message_get_type(), MNMaildirMessageClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MAILDIR_MESSAGE__
-#define __TYPEDEF_MN_MAILDIR_MESSAGE__
-typedef struct _MNMaildirMessage MNMaildirMessage;
-#endif
-struct _MNMaildirMessage {
- MNVFSMessage __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMaildirMessageClass MNMaildirMessageClass;
-struct _MNMaildirMessageClass {
- MNVFSMessageClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_maildir_message_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mbox-mailbox-backend-private.h b/build/src/mn-mbox-mailbox-backend-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MBOX_MAILBOX_BACKEND_PRIVATE_H__
-#define __MN_MBOX_MAILBOX_BACKEND_PRIVATE_H__
-
-#include "mn-mbox-mailbox-backend.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mbox-mailbox-backend.c b/build/src/mn-mbox-mailbox-backend.c
@@ -1,148 +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-mbox-mailbox-backend.h"
-
-#include "mn-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 24 "src/mn-mbox-mailbox-backend.gob"
-
-#include "mn-base-mbox-mailbox-backend-private.h"
-#include "mn-message-mime.h"
-
-#line 31 "mn-mbox-mailbox-backend.c"
-/* self casting macros */
-#define SELF(x) MN_MBOX_MAILBOX_BACKEND(x)
-#define SELF_CONST(x) MN_MBOX_MAILBOX_BACKEND_CONST(x)
-#define IS_SELF(x) MN_IS_MBOX_MAILBOX_BACKEND(x)
-#define TYPE_SELF MN_TYPE_MBOX_MAILBOX_BACKEND
-#define SELF_CLASS(x) MN_MBOX_MAILBOX_BACKEND_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MBOX_MAILBOX_BACKEND_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMboxMailboxBackend Self;
-typedef MNMboxMailboxBackendClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-mbox-mailbox-backend.gob"
-static void mn_mbox_mailbox_backend_init (MNMboxMailboxBackend * o) G_GNUC_UNUSED;
-#line 48 "mn-mbox-mailbox-backend.c"
-#line 31 "src/mn-mbox-mailbox-backend.gob"
-static void mn_mbox_mailbox_backend_class_init (MNMboxMailboxBackendClass * class) G_GNUC_UNUSED;
-#line 51 "mn-mbox-mailbox-backend.c"
-#line 36 "src/mn-mbox-mailbox-backend.gob"
-static MNMessage * ___2_mn_mbox_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * backend, GMimeMessage * mime_message) G_GNUC_UNUSED;
-#line 54 "mn-mbox-mailbox-backend.c"
-
-/* pointer to the class of our parent */
-static MNBaseMboxMailboxBackendClass *parent_class = NULL;
-
-GType
-mn_mbox_mailbox_backend_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMboxMailboxBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mbox_mailbox_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMboxMailboxBackend),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mbox_mailbox_backend_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_BASE_MBOX_MAILBOX_BACKEND, "MNMboxMailboxBackend", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMboxMailboxBackend *)g_object_new(mn_mbox_mailbox_backend_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMboxMailboxBackend * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMboxMailboxBackend *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMboxMailboxBackend *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMboxMailboxBackend *)g_object_new_valist (mn_mbox_mailbox_backend_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_mbox_mailbox_backend_init (MNMboxMailboxBackend * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mbox:Mailbox:Backend::init"
-}
-#undef __GOB_FUNCTION__
-#line 31 "src/mn-mbox-mailbox-backend.gob"
-static void
-mn_mbox_mailbox_backend_class_init (MNMboxMailboxBackendClass * class G_GNUC_UNUSED)
-{
-#line 111 "mn-mbox-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Mbox:Mailbox:Backend::class_init"
- MNBaseMboxMailboxBackendClass *mn_base_mbox_mailbox_backend_class = (MNBaseMboxMailboxBackendClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_BASE_MBOX_MAILBOX_BACKEND);
-
-#line 36 "src/mn-mbox-mailbox-backend.gob"
- mn_base_mbox_mailbox_backend_class->get_new_message = ___2_mn_mbox_mailbox_backend_get_new_message;
-#line 119 "mn-mbox-mailbox-backend.c"
- {
-#line 32 "src/mn-mbox-mailbox-backend.gob"
-
- MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "mbox";
-
-#line 125 "mn-mbox-mailbox-backend.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 36 "src/mn-mbox-mailbox-backend.gob"
-static MNMessage *
-___2_mn_mbox_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * backend G_GNUC_UNUSED, GMimeMessage * mime_message)
-#line 135 "mn-mbox-mailbox-backend.c"
-#define PARENT_HANDLER(___backend,___mime_message) \
- ((MN_BASE_MBOX_MAILBOX_BACKEND_CLASS(parent_class)->get_new_message)? \
- (* MN_BASE_MBOX_MAILBOX_BACKEND_CLASS(parent_class)->get_new_message)(___backend,___mime_message): \
- ((MNMessage * )0))
-{
-#define __GOB_FUNCTION__ "MN:Mbox:Mailbox:Backend::get_new_message"
-{
-#line 38 "src/mn-mbox-mailbox-backend.gob"
-
- return mn_message_new_from_mime_message(MN_MAILBOX(MN_VFS_MAILBOX_BACKEND(backend)->mailbox), mime_message, NULL, 0, TRUE);
- }}
-#line 147 "mn-mbox-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
diff --git a/build/src/mn-mbox-mailbox-backend.gob.stamp b/build/src/mn-mbox-mailbox-backend.gob.stamp
diff --git a/build/src/mn-mbox-mailbox-backend.h b/build/src/mn-mbox-mailbox-backend.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-base-mbox-mailbox-backend.h"
-
-#ifndef __MN_MBOX_MAILBOX_BACKEND_H__
-#define __MN_MBOX_MAILBOX_BACKEND_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MBOX_MAILBOX_BACKEND (mn_mbox_mailbox_backend_get_type())
-#define MN_MBOX_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mbox_mailbox_backend_get_type(), MNMboxMailboxBackend)
-#define MN_MBOX_MAILBOX_BACKEND_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mbox_mailbox_backend_get_type(), MNMboxMailboxBackend const)
-#define MN_MBOX_MAILBOX_BACKEND_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mbox_mailbox_backend_get_type(), MNMboxMailboxBackendClass)
-#define MN_IS_MBOX_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mbox_mailbox_backend_get_type ())
-
-#define MN_MBOX_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mbox_mailbox_backend_get_type(), MNMboxMailboxBackendClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MBOX_MAILBOX_BACKEND__
-#define __TYPEDEF_MN_MBOX_MAILBOX_BACKEND__
-typedef struct _MNMboxMailboxBackend MNMboxMailboxBackend;
-#endif
-struct _MNMboxMailboxBackend {
- MNBaseMboxMailboxBackend __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMboxMailboxBackendClass MNMboxMailboxBackendClass;
-struct _MNMboxMailboxBackendClass {
- MNBaseMboxMailboxBackendClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_mbox_mailbox_backend_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-message-private.h b/build/src/mn-message-private.h
@@ -1,37 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MESSAGE_PRIVATE_H__
-#define __MN_MESSAGE_PRIVATE_H__
-
-#include "mn-message.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 64 "src/mn-message.gob"
-
-#include "mn-xml.h"
-
-typedef enum
-{
- /* include in the XML summary and allow as a command format */
- MN_MESSAGE_PARAM_EXPORT = MN_XML_PARAM_EXPORT,
-} MNMessageParamFlags;
-
-typedef GError *(*MNMessageActionPerformCallback) (MNMessage *message, gpointer data);
-
-#line 26 "mn-message-private.h"
-#line 376 "src/mn-message.gob"
-void mn_message_perform_action_in_thread (MNMessageActionRequest * request, MNMessageActionPerformCallback callback, gpointer user_data);
-#line 29 "mn-message-private.h"
-#line 423 "src/mn-message.gob"
-void mn_message_action_done (MNMessageActionRequest * request, GError * err);
-#line 32 "mn-message-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-message-view-private.h b/build/src/mn-message-view-private.h
@@ -1,31 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MESSAGE_VIEW_PRIVATE_H__
-#define __MN_MESSAGE_VIEW_PRIVATE_H__
-
-#include "mn-message-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 25 "src/mn-message-view.gob"
-
-#include <time.h>
-
-#line 18 "mn-message-view-private.h"
-struct _MNMessageViewPrivate {
-#line 48 "src/mn-message-view.gob"
- GSList * past_time_cells;
-#line 22 "mn-message-view-private.h"
-};
-#line 94 "src/mn-message-view.gob"
-void mn_message_view_append_past_time_cell (MNMessageView * self, time_t past_time, time_t now);
-#line 26 "mn-message-view-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-message-view.c b/build/src/mn-message-view.c
@@ -1,445 +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-message-view.h"
-
-#include "mn-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 29 "src/mn-message-view.gob"
-
-#include "mn-util.h"
-#include <glib/gi18n.h>
-
-typedef struct
-{
- MNMessageView *self;
- MNTextTableCell *cell;
- GList *link;
- time_t past_time;
-} PastTimeCell;
-
-/* use a GQueue for O(1) append and removal */
-static GQueue past_time_cells = G_QUEUE_INIT;
-static unsigned int past_time_cells_timeout_id = 0;
-
-#line 43 "mn-message-view.c"
-/* self casting macros */
-#define SELF(x) MN_MESSAGE_VIEW(x)
-#define SELF_CONST(x) MN_MESSAGE_VIEW_CONST(x)
-#define IS_SELF(x) MN_IS_MESSAGE_VIEW(x)
-#define TYPE_SELF MN_TYPE_MESSAGE_VIEW
-#define SELF_CLASS(x) MN_MESSAGE_VIEW_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MESSAGE_VIEW_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMessageView Self;
-typedef MNMessageViewClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-message-view.gob"
-static void mn_message_view_init (MNMessageView * o) G_GNUC_UNUSED;
-#line 60 "mn-message-view.c"
-#line 0 "src/mn-message-view.gob"
-static void mn_message_view_class_init (MNMessageViewClass * c) G_GNUC_UNUSED;
-#line 63 "mn-message-view.c"
-#line 50 "src/mn-message-view.gob"
-static void mn_message_view_finalize (MNMessageView * self) G_GNUC_UNUSED;
-#line 66 "mn-message-view.c"
-#line 55 "src/mn-message-view.gob"
-static void ___2_mn_message_view_clear (MNTextTable * table) G_GNUC_UNUSED;
-#line 69 "mn-message-view.c"
-#line 85 "src/mn-message-view.gob"
-static void mn_message_view_append_header (MNMessageView * self) G_GNUC_UNUSED;
-#line 72 "mn-message-view.c"
-#line 88 "src/mn-message-view.gob"
-static void mn_message_view_append_message (MNMessageView * self, MNMessage * message, time_t now) G_GNUC_UNUSED;
-#line 75 "mn-message-view.c"
-#line 91 "src/mn-message-view.gob"
-static void mn_message_view_append_message_separator (MNMessageView * self) G_GNUC_UNUSED;
-#line 78 "mn-message-view.c"
-#line 115 "src/mn-message-view.gob"
-static void mn_message_view_clear_past_time_cells (MNMessageView * self) G_GNUC_UNUSED;
-#line 81 "mn-message-view.c"
-#line 137 "src/mn-message-view.gob"
-static void mn_message_view_install_past_time_cells_timeout (void) G_GNUC_UNUSED;
-#line 84 "mn-message-view.c"
-#line 149 "src/mn-message-view.gob"
-static gboolean mn_message_view_update_past_time_cells_cb (gpointer data) G_GNUC_UNUSED;
-#line 87 "mn-message-view.c"
-#line 163 "src/mn-message-view.gob"
-static void mn_message_view_update_past_time_cell (PastTimeCell * pcell, time_t now) G_GNUC_UNUSED;
-#line 90 "mn-message-view.c"
-
-/* pointer to the class of our parent */
-static MNTextTableClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_set_messages mn_message_view_set_messages
-#define self_append_header mn_message_view_append_header
-#define self_append_message mn_message_view_append_message
-#define self_append_message_separator mn_message_view_append_message_separator
-#define self_append_past_time_cell mn_message_view_append_past_time_cell
-#define self_clear_past_time_cells mn_message_view_clear_past_time_cells
-#define self_install_past_time_cells_timeout mn_message_view_install_past_time_cells_timeout
-#define self_update_past_time_cells_cb mn_message_view_update_past_time_cells_cb
-#define self_update_past_time_cell mn_message_view_update_past_time_cell
-GType
-mn_message_view_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMessageViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_message_view_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMessageView),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_message_view_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_TEXT_TABLE, "MNMessageView", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMessageView *)g_object_new(mn_message_view_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMessageView * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMessageView *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMessageView *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMessageView *)g_object_new_valist (mn_message_view_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Message:View::finalize"
- MNMessageView *self G_GNUC_UNUSED = MN_MESSAGE_VIEW (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 50 "src/mn-message-view.gob"
- mn_message_view_finalize (self);
-#line 156 "mn-message-view.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_message_view_init (MNMessageView * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Message:View::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_MESSAGE_VIEW,MNMessageViewPrivate);
-}
-#undef __GOB_FUNCTION__
-static void
-mn_message_view_class_init (MNMessageViewClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Message:View::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- MNTextTableClass *mn_text_table_class = (MNTextTableClass *)c;
-
- g_type_class_add_private(c,sizeof(MNMessageViewPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_TEXT_TABLE);
-
-#line 55 "src/mn-message-view.gob"
- mn_text_table_class->clear = ___2_mn_message_view_clear;
-#line 182 "mn-message-view.c"
- c->append_header = NULL;
- c->append_message = NULL;
- c->append_message_separator = NULL;
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 50 "src/mn-message-view.gob"
-static void
-mn_message_view_finalize (MNMessageView * self G_GNUC_UNUSED)
-{
-#line 196 "mn-message-view.c"
-#define __GOB_FUNCTION__ "MN:Message:View::finalize"
-{
-#line 51 "src/mn-message-view.gob"
-
- self_clear_past_time_cells(self);
- }}
-#line 203 "mn-message-view.c"
-#undef __GOB_FUNCTION__
-
-#line 55 "src/mn-message-view.gob"
-static void
-___2_mn_message_view_clear (MNTextTable * table G_GNUC_UNUSED)
-#line 209 "mn-message-view.c"
-#define PARENT_HANDLER(___table) \
- { if(MN_TEXT_TABLE_CLASS(parent_class)->clear) \
- (* MN_TEXT_TABLE_CLASS(parent_class)->clear)(___table); }
-{
-#define __GOB_FUNCTION__ "MN:Message:View::clear"
-{
-#line 57 "src/mn-message-view.gob"
-
- self_clear_past_time_cells(SELF(table));
-
- PARENT_HANDLER(table);
- }}
-#line 222 "mn-message-view.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 63 "src/mn-message-view.gob"
-void
-mn_message_view_set_messages (MNMessageView * self, GSList * messages)
-{
-#line 230 "mn-message-view.c"
-#define __GOB_FUNCTION__ "MN:Message:View::set_messages"
-#line 63 "src/mn-message-view.gob"
- g_return_if_fail (self != NULL);
-#line 63 "src/mn-message-view.gob"
- g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
-#line 236 "mn-message-view.c"
-{
-#line 65 "src/mn-message-view.gob"
-
- time_t now;
- GSList *l;
-
- mn_text_table_clear(MN_TEXT_TABLE(self));
-
- self_append_header(self);
-
- now = mn_time();
-
- MN_LIST_FOREACH(l, messages)
- {
- MNMessage *message = l->data;
-
- self_append_message(self, message, now);
- if (l->next)
- self_append_message_separator(self);
- }
- }}
-#line 258 "mn-message-view.c"
-#undef __GOB_FUNCTION__
-
-#line 85 "src/mn-message-view.gob"
-static void
-mn_message_view_append_header (MNMessageView * self)
-{
-#line 265 "mn-message-view.c"
- MNMessageViewClass *klass;
-#line 85 "src/mn-message-view.gob"
- g_return_if_fail (self != NULL);
-#line 85 "src/mn-message-view.gob"
- g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
-#line 271 "mn-message-view.c"
- klass = MN_MESSAGE_VIEW_GET_CLASS(self);
-
- if(klass->append_header)
- (*klass->append_header)(self);
-}
-
-#line 88 "src/mn-message-view.gob"
-static void
-mn_message_view_append_message (MNMessageView * self, MNMessage * message, time_t now)
-{
-#line 282 "mn-message-view.c"
- MNMessageViewClass *klass;
-#line 88 "src/mn-message-view.gob"
- g_return_if_fail (self != NULL);
-#line 88 "src/mn-message-view.gob"
- g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
-#line 88 "src/mn-message-view.gob"
- g_return_if_fail (message != NULL);
-#line 88 "src/mn-message-view.gob"
- g_return_if_fail (MN_IS_MESSAGE (message));
-#line 292 "mn-message-view.c"
- klass = MN_MESSAGE_VIEW_GET_CLASS(self);
-
- if(klass->append_message)
- (*klass->append_message)(self,message,now);
-}
-
-#line 91 "src/mn-message-view.gob"
-static void
-mn_message_view_append_message_separator (MNMessageView * self)
-{
-#line 303 "mn-message-view.c"
- MNMessageViewClass *klass;
-#line 91 "src/mn-message-view.gob"
- g_return_if_fail (self != NULL);
-#line 91 "src/mn-message-view.gob"
- g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
-#line 309 "mn-message-view.c"
- klass = MN_MESSAGE_VIEW_GET_CLASS(self);
-
- if(klass->append_message_separator)
- (*klass->append_message_separator)(self);
-}
-
-#line 94 "src/mn-message-view.gob"
-void
-mn_message_view_append_past_time_cell (MNMessageView * self, time_t past_time, time_t now)
-{
-#line 320 "mn-message-view.c"
-#define __GOB_FUNCTION__ "MN:Message:View::append_past_time_cell"
-#line 94 "src/mn-message-view.gob"
- g_return_if_fail (self != NULL);
-#line 94 "src/mn-message-view.gob"
- g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
-#line 326 "mn-message-view.c"
-{
-#line 96 "src/mn-message-view.gob"
-
- PastTimeCell *pcell;
-
- pcell = g_new(PastTimeCell, 1);
- pcell->self = self;
- pcell->cell = mn_text_table_append_text_cell(MN_TEXT_TABLE(self), NULL);
- pcell->link = g_list_alloc();
- pcell->link->data = pcell;
- pcell->past_time = past_time;
-
- self_update_past_time_cell(pcell, now);
-
- selfp->past_time_cells = g_slist_prepend(selfp->past_time_cells, pcell);
- g_queue_push_tail_link(&past_time_cells, pcell->link);
-
- if (! past_time_cells_timeout_id)
- self_install_past_time_cells_timeout();
- }}
-#line 347 "mn-message-view.c"
-#undef __GOB_FUNCTION__
-
-#line 115 "src/mn-message-view.gob"
-static void
-mn_message_view_clear_past_time_cells (MNMessageView * self)
-{
-#line 354 "mn-message-view.c"
-#define __GOB_FUNCTION__ "MN:Message:View::clear_past_time_cells"
-#line 115 "src/mn-message-view.gob"
- g_return_if_fail (self != NULL);
-#line 115 "src/mn-message-view.gob"
- g_return_if_fail (MN_IS_MESSAGE_VIEW (self));
-#line 360 "mn-message-view.c"
-{
-#line 117 "src/mn-message-view.gob"
-
- GSList *l;
-
- if (! selfp->past_time_cells)
- return;
-
- MN_LIST_FOREACH(l, selfp->past_time_cells)
- {
- PastTimeCell *pcell = l->data;
-
- g_queue_delete_link(&past_time_cells, pcell->link);
- g_free(pcell);
- }
-
- mn_g_slist_clear(&selfp->past_time_cells);
-
- if (g_queue_is_empty(&past_time_cells))
- mn_source_clear(&past_time_cells_timeout_id);
- }}
-#line 382 "mn-message-view.c"
-#undef __GOB_FUNCTION__
-
-#line 137 "src/mn-message-view.gob"
-static void
-mn_message_view_install_past_time_cells_timeout (void)
-{
-#line 389 "mn-message-view.c"
-#define __GOB_FUNCTION__ "MN:Message:View::install_past_time_cells_timeout"
-{
-#line 139 "src/mn-message-view.gob"
-
- GTimeVal now;
- int timeout;
-
- g_get_current_time(&now);
- timeout = (G_USEC_PER_SEC - now.tv_usec) / 1000 + 1;
-
- past_time_cells_timeout_id = gdk_threads_add_timeout(timeout, self_update_past_time_cells_cb, NULL);
- }}
-#line 402 "mn-message-view.c"
-#undef __GOB_FUNCTION__
-
-#line 149 "src/mn-message-view.gob"
-static gboolean
-mn_message_view_update_past_time_cells_cb (gpointer data)
-{
-#line 409 "mn-message-view.c"
-#define __GOB_FUNCTION__ "MN:Message:View::update_past_time_cells_cb"
-{
-#line 151 "src/mn-message-view.gob"
-
- time_t now;
- GList *l;
-
- now = mn_time();
- MN_QUEUE_FOREACH(l, &past_time_cells)
- self_update_past_time_cell(l->data, now);
-
- self_install_past_time_cells_timeout();
- return FALSE; /* remove source */
- }}
-#line 424 "mn-message-view.c"
-#undef __GOB_FUNCTION__
-
-#line 163 "src/mn-message-view.gob"
-static void
-mn_message_view_update_past_time_cell (PastTimeCell * pcell, time_t now)
-{
-#line 431 "mn-message-view.c"
-#define __GOB_FUNCTION__ "MN:Message:View::update_past_time_cell"
-#line 163 "src/mn-message-view.gob"
- g_return_if_fail (pcell != NULL);
-#line 435 "mn-message-view.c"
-{
-#line 165 "src/mn-message-view.gob"
-
- char *formatted;
-
- formatted = mn_format_past_time(pcell->past_time, now);
- mn_text_table_cell_set_text(MN_TEXT_TABLE(pcell->self), pcell->cell, formatted);
- g_free(formatted);
- }}
-#line 445 "mn-message-view.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-message-view.gob.stamp b/build/src/mn-message-view.gob.stamp
diff --git a/build/src/mn-message-view.h b/build/src/mn-message-view.h
@@ -1,70 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-text-table.h"
-#include "mn-message.h"
-
-#ifndef __MN_MESSAGE_VIEW_H__
-#define __MN_MESSAGE_VIEW_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MESSAGE_VIEW (mn_message_view_get_type())
-#define MN_MESSAGE_VIEW(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_message_view_get_type(), MNMessageView)
-#define MN_MESSAGE_VIEW_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_message_view_get_type(), MNMessageView const)
-#define MN_MESSAGE_VIEW_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_message_view_get_type(), MNMessageViewClass)
-#define MN_IS_MESSAGE_VIEW(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_message_view_get_type ())
-
-#define MN_MESSAGE_VIEW_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_message_view_get_type(), MNMessageViewClass)
-
-/* Private structure type */
-typedef struct _MNMessageViewPrivate MNMessageViewPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MESSAGE_VIEW__
-#define __TYPEDEF_MN_MESSAGE_VIEW__
-typedef struct _MNMessageView MNMessageView;
-#endif
-struct _MNMessageView {
- MNTextTable __parent__;
- /*< private >*/
- MNMessageViewPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMessageViewClass MNMessageViewClass;
-struct _MNMessageViewClass {
- MNTextTableClass __parent__;
- void (* append_header) (MNMessageView * self);
- void (* append_message) (MNMessageView * self, MNMessage * message, time_t now);
- void (* append_message_separator) (MNMessageView * self);
-};
-
-
-/*
- * Public methods
- */
-GType mn_message_view_get_type (void) G_GNUC_CONST;
-#line 63 "src/mn-message-view.gob"
-void mn_message_view_set_messages (MNMessageView * self,
- GSList * messages);
-#line 65 "mn-message-view.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-message.c b/build/src/mn-message.c
@@ -1,1385 +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-message.h"
-
-#include "mn-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 76 "src/mn-message.gob"
-
-#include <errno.h>
-#include <glib/gi18n.h>
-#include <gnome.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include "mn-conf.h"
-#include "mn-util.h"
-
-typedef struct
-{
- MNMessageActionRequest *request;
- MNMessageActionPerformCallback callback;
- gpointer user_data;
-} PerformInfo;
-
-#line 42 "mn-message.c"
-/* self casting macros */
-#define SELF(x) MN_MESSAGE(x)
-#define SELF_CONST(x) MN_MESSAGE_CONST(x)
-#define IS_SELF(x) MN_IS_MESSAGE(x)
-#define TYPE_SELF MN_TYPE_MESSAGE
-#define SELF_CLASS(x) MN_MESSAGE_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MESSAGE_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMessage Self;
-typedef MNMessageClass 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-message.gob"
-static void mn_message_init (MNMessage * o) G_GNUC_UNUSED;
-#line 61 "mn-message.c"
-#line 0 "src/mn-message.gob"
-static void mn_message_class_init (MNMessageClass * c) G_GNUC_UNUSED;
-#line 64 "mn-message.c"
-#line 225 "src/mn-message.gob"
-static void mn_message_constructor (MNMessage * self) G_GNUC_UNUSED;
-#line 67 "mn-message.c"
-#line 267 "src/mn-message.gob"
-static gboolean mn_message_subst_command_cb (const char * name, char ** value, gpointer data) G_GNUC_UNUSED;
-#line 70 "mn-message.c"
-#line 297 "src/mn-message.gob"
-static gboolean mn_message_execute_command_real (MNMessage * self, const char * command, GError ** err) G_GNUC_UNUSED;
-#line 73 "mn-message.c"
-#line 325 "src/mn-message.gob"
-static gboolean mn_message_execute_command (MNMessage * self, const char * id, GError ** err) G_GNUC_UNUSED;
-#line 76 "mn-message.c"
-#line 394 "src/mn-message.gob"
-static void mn_message_perform_action_in_thread_cb (PerformInfo * info) G_GNUC_UNUSED;
-#line 79 "mn-message.c"
-#line 412 "src/mn-message.gob"
-static void mn_message_action_done_real (MNMessage * self, MNMessageAction * action, GError * err, MNMessageActionResultCallback callback, gpointer data) G_GNUC_UNUSED;
-#line 82 "mn-message.c"
-static gboolean ___real_mn_message_builtin_can_open (MNMessage * self);
-#line 440 "src/mn-message.gob"
-static gboolean mn_message_builtin_can_open (MNMessage * self) G_GNUC_UNUSED;
-#line 86 "mn-message.c"
-static void ___real_mn_message_builtin_open (MNMessage * self, MNMessageActionRequest * request);
-#line 446 "src/mn-message.gob"
-static void mn_message_builtin_open (MNMessage * self, MNMessageActionRequest * request) G_GNUC_UNUSED;
-#line 90 "mn-message.c"
-#line 456 "src/mn-message.gob"
-static void mn_message_open_done (MNMessage * self, GError * err) G_GNUC_UNUSED;
-#line 93 "mn-message.c"
-static gboolean ___real_mn_message_builtin_can_mark_as_read (MNMessage * self);
-#line 463 "src/mn-message.gob"
-static gboolean mn_message_builtin_can_mark_as_read (MNMessage * self) G_GNUC_UNUSED;
-#line 97 "mn-message.c"
-#line 469 "src/mn-message.gob"
-static void mn_message_builtin_mark_as_read (MNMessage * self, MNMessageActionRequest * request) G_GNUC_UNUSED;
-#line 100 "mn-message.c"
-#line 472 "src/mn-message.gob"
-static void mn_message_mark_as_read_done (MNMessage * self, GError * err) G_GNUC_UNUSED;
-#line 103 "mn-message.c"
-static gboolean ___real_mn_message_builtin_can_mark_as_spam (MNMessage * self);
-#line 479 "src/mn-message.gob"
-static gboolean mn_message_builtin_can_mark_as_spam (MNMessage * self) G_GNUC_UNUSED;
-#line 107 "mn-message.c"
-#line 485 "src/mn-message.gob"
-static void mn_message_builtin_mark_as_spam (MNMessage * self, MNMessageActionRequest * request) G_GNUC_UNUSED;
-#line 110 "mn-message.c"
-#line 488 "src/mn-message.gob"
-static void mn_message_mark_as_spam_done (MNMessage * self, GError * err) G_GNUC_UNUSED;
-#line 113 "mn-message.c"
-static gboolean ___real_mn_message_builtin_can_delete (MNMessage * self);
-#line 495 "src/mn-message.gob"
-static gboolean mn_message_builtin_can_delete (MNMessage * self) G_GNUC_UNUSED;
-#line 117 "mn-message.c"
-#line 501 "src/mn-message.gob"
-static void mn_message_builtin_delete (MNMessage * self, MNMessageActionRequest * request) G_GNUC_UNUSED;
-#line 120 "mn-message.c"
-#line 504 "src/mn-message.gob"
-static void mn_message_delete_done (MNMessage * self, GError * err) G_GNUC_UNUSED;
-#line 123 "mn-message.c"
-
-enum {
- PROP_0,
- PROP_MAILBOX,
- PROP_SENT_TIME,
- PROP_ID,
- PROP_MID,
- PROP_FROM,
- PROP_SUBJECT,
- PROP_URI,
- PROP_FILENAME,
- PROP_FLAGS
-};
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_get_action mn_message_get_action
-#define self_subst_command_cb mn_message_subst_command_cb
-#define self_execute_command_real mn_message_execute_command_real
-#define self_execute_command mn_message_execute_command
-#define self_can_perform_action mn_message_can_perform_action
-#define self_perform_action mn_message_perform_action
-#define self_perform_action_in_thread mn_message_perform_action_in_thread
-#define self_perform_action_in_thread_cb mn_message_perform_action_in_thread_cb
-#define self_action_done_real mn_message_action_done_real
-#define self_action_done mn_message_action_done
-#define self_action_error_quark mn_message_action_error_quark
-#define self_builtin_can_open mn_message_builtin_can_open
-#define self_builtin_open mn_message_builtin_open
-#define self_open_done mn_message_open_done
-#define self_builtin_can_mark_as_read mn_message_builtin_can_mark_as_read
-#define self_builtin_mark_as_read mn_message_builtin_mark_as_read
-#define self_mark_as_read_done mn_message_mark_as_read_done
-#define self_builtin_can_mark_as_spam mn_message_builtin_can_mark_as_spam
-#define self_builtin_mark_as_spam mn_message_builtin_mark_as_spam
-#define self_mark_as_spam_done mn_message_mark_as_spam_done
-#define self_builtin_can_delete mn_message_builtin_can_delete
-#define self_builtin_delete mn_message_builtin_delete
-#define self_delete_done mn_message_delete_done
-#define self_consider_as_read mn_message_consider_as_read
-#define self_consider_as_read_list mn_message_consider_as_read_list
-#define self_new mn_message_new
-#define self_xml_node_new mn_message_xml_node_new
-GType
-mn_message_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMessageClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_message_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMessage),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_message_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNMessage", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMessage *)g_object_new(mn_message_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMessage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMessage *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMessage *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMessage *)g_object_new_valist (mn_message_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-#line 92 "src/mn-message.gob"
-
-static const MNMessageAction message_actions[] = {
- {
- "open",
- "mail-open",
- /* translators: header capitalization */
- N_("Open"),
- N_("Unable to open message"),
- self_builtin_can_open,
- self_builtin_open,
- self_open_done
- },
- {
- "mark-as-read",
- "mark",
- /* translators: header capitalization */
- N_("Mark as Read"),
- N_("Unable to mark message as read"),
- self_builtin_can_mark_as_read,
- self_builtin_mark_as_read,
- self_mark_as_read_done
- },
- {
- "mark-as-spam",
- "spam",
- /* translators: header capitalization */
- N_("Mark as Spam"),
- N_("Unable to mark message as spam"),
- self_builtin_can_mark_as_spam,
- self_builtin_mark_as_spam,
- self_mark_as_spam_done
- },
- {
- "delete",
- "delete",
- /* translators: header capitalization */
- N_("Delete"),
- N_("Unable to mark message as spam"),
- self_builtin_can_delete,
- self_builtin_delete,
- self_delete_done
- }
-};
-
-#line 257 "mn-message.c"
-
-static GObject *
-___constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties)
-{
-#define __GOB_FUNCTION__ "MN:Message::constructor"
- GObject *obj_self;
- MNMessage *self;
- obj_self = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
- self = MN_MESSAGE (obj_self);
-#line 225 "src/mn-message.gob"
- mn_message_constructor (self);
-#line 269 "mn-message.c"
- return obj_self;
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Message::finalize"
- MNMessage *self G_GNUC_UNUSED = MN_MESSAGE (obj_self);
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 164 "src/mn-message.gob"
- if(self->id) { g_free ((gpointer) self->id); self->id = NULL; }
-#line 284 "mn-message.c"
-#line 179 "src/mn-message.gob"
- if(self->mid) { g_free ((gpointer) self->mid); self->mid = NULL; }
-#line 287 "mn-message.c"
-#line 183 "src/mn-message.gob"
- if(self->from) { g_free ((gpointer) self->from); self->from = NULL; }
-#line 290 "mn-message.c"
-#line 187 "src/mn-message.gob"
- if(self->subject) { g_free ((gpointer) self->subject); self->subject = NULL; }
-#line 293 "mn-message.c"
-#line 191 "src/mn-message.gob"
- if(self->uri) { g_free ((gpointer) self->uri); self->uri = NULL; }
-#line 296 "mn-message.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_message_init (MNMessage * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Message::init"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_message_class_init (MNMessageClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Message::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
-#line 440 "src/mn-message.gob"
- c->builtin_can_open = ___real_mn_message_builtin_can_open;
-#line 446 "src/mn-message.gob"
- c->builtin_open = ___real_mn_message_builtin_open;
-#line 463 "src/mn-message.gob"
- c->builtin_can_mark_as_read = ___real_mn_message_builtin_can_mark_as_read;
-#line 320 "mn-message.c"
- c->builtin_mark_as_read = NULL;
-#line 479 "src/mn-message.gob"
- c->builtin_can_mark_as_spam = ___real_mn_message_builtin_can_mark_as_spam;
-#line 324 "mn-message.c"
- c->builtin_mark_as_spam = NULL;
-#line 495 "src/mn-message.gob"
- c->builtin_can_delete = ___real_mn_message_builtin_can_delete;
-#line 328 "mn-message.c"
- c->builtin_delete = 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_pointer
- ("mailbox" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_MAILBOX,
- param_spec);
- param_spec = g_param_spec_ulong
- ("sent_time" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- 0 /* minimum */,
- G_MAXULONG /* maximum */,
- 0 /* 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_SENT_TIME,
- param_spec);
- param_spec = g_param_spec_string
- ("id" /* 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_ID,
- param_spec);
- param_spec = g_param_spec_string
- ("mid" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_MID,
- param_spec);
- param_spec = g_param_spec_string
- ("from" /* 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_FROM,
- param_spec);
- param_spec = g_param_spec_string
- ("subject" /* 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_SUBJECT,
- 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_MESSAGE_PARAM_EXPORT | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_URI,
- param_spec);
- param_spec = g_param_spec_string
- ("filename" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | MN_MESSAGE_PARAM_EXPORT));
- g_object_class_install_property (g_object_class,
- PROP_FILENAME,
- param_spec);
- param_spec = g_param_spec_uint
- ("flags" /* 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_FLAGS,
- 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:Message::set_property"
-{
- MNMessage *self G_GNUC_UNUSED;
-
- self = MN_MESSAGE (object);
-
- switch (property_id) {
- case PROP_MAILBOX:
- {
-#line 147 "src/mn-message.gob"
-self->mailbox = g_value_get_pointer (VAL);
-#line 441 "mn-message.c"
- }
- break;
- case PROP_SENT_TIME:
- {
-#line 151 "src/mn-message.gob"
-self->sent_time = g_value_get_ulong (VAL);
-#line 448 "mn-message.c"
- }
- break;
- case PROP_ID:
- {
-#line 165 "src/mn-message.gob"
-{ char *old = self->id; self->id = g_value_dup_string (VAL); g_free (old); }
-#line 455 "mn-message.c"
- }
- break;
- case PROP_MID:
- {
-#line 180 "src/mn-message.gob"
-{ char *old = self->mid; self->mid = g_value_dup_string (VAL); g_free (old); }
-#line 462 "mn-message.c"
- }
- break;
- case PROP_FROM:
- {
-#line 184 "src/mn-message.gob"
-{ char *old = self->from; self->from = g_value_dup_string (VAL); g_free (old); }
-#line 469 "mn-message.c"
- }
- break;
- case PROP_SUBJECT:
- {
-#line 188 "src/mn-message.gob"
-{ char *old = self->subject; self->subject = g_value_dup_string (VAL); g_free (old); }
-#line 476 "mn-message.c"
- }
- break;
- case PROP_URI:
- {
-#line 192 "src/mn-message.gob"
-{ char *old = self->uri; self->uri = g_value_dup_string (VAL); g_free (old); }
-#line 483 "mn-message.c"
- }
- break;
- case PROP_FLAGS:
- {
-#line 201 "src/mn-message.gob"
-self->flags = g_value_get_uint (VAL);
-#line 490 "mn-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:Message::get_property"
-{
- MNMessage *self G_GNUC_UNUSED;
-
- self = MN_MESSAGE (object);
-
- switch (property_id) {
- case PROP_MAILBOX:
- {
-#line 147 "src/mn-message.gob"
-g_value_set_pointer (VAL, self->mailbox);
-#line 521 "mn-message.c"
- }
- break;
- case PROP_SENT_TIME:
- {
-#line 151 "src/mn-message.gob"
-g_value_set_ulong (VAL, self->sent_time);
-#line 528 "mn-message.c"
- }
- break;
- case PROP_ID:
- {
-#line 165 "src/mn-message.gob"
-g_value_set_string (VAL, self->id);
-#line 535 "mn-message.c"
- }
- break;
- case PROP_MID:
- {
-#line 180 "src/mn-message.gob"
-g_value_set_string (VAL, self->mid);
-#line 542 "mn-message.c"
- }
- break;
- case PROP_FROM:
- {
-#line 184 "src/mn-message.gob"
-g_value_set_string (VAL, self->from);
-#line 549 "mn-message.c"
- }
- break;
- case PROP_SUBJECT:
- {
-#line 188 "src/mn-message.gob"
-g_value_set_string (VAL, self->subject);
-#line 556 "mn-message.c"
- }
- break;
- case PROP_URI:
- {
-#line 192 "src/mn-message.gob"
-g_value_set_string (VAL, self->uri);
-#line 563 "mn-message.c"
- }
- break;
- case PROP_FILENAME:
- {
-#line 196 "src/mn-message.gob"
-
- g_value_take_string(VAL, self->uri ? gnome_vfs_get_local_path_from_uri(self->uri) : NULL);
-
-#line 572 "mn-message.c"
- }
- break;
- case PROP_FLAGS:
- {
-#line 201 "src/mn-message.gob"
-g_value_set_uint (VAL, self->flags);
-#line 579 "mn-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 203 "src/mn-message.gob"
-MNMessageAction *
-mn_message_get_action (const char * name)
-{
-#line 600 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::get_action"
-#line 203 "src/mn-message.gob"
- g_return_val_if_fail (name != NULL, (MNMessageAction * )0);
-#line 604 "mn-message.c"
-{
-#line 205 "src/mn-message.gob"
-
- static GHashTable *actions = NULL;
-
- if (! actions)
- {
- int i;
-
- actions = g_hash_table_new(g_str_hash, g_str_equal);
-
- for (i = 0; i < G_N_ELEMENTS(message_actions); i++)
- {
- const MNMessageAction *action = &message_actions[i];
-
- g_hash_table_insert(actions, (gpointer) action->name, (gpointer) action);
- }
- }
-
- return g_hash_table_lookup(actions, name);
- }}
-#line 626 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 225 "src/mn-message.gob"
-static void
-mn_message_constructor (MNMessage * self G_GNUC_UNUSED)
-{
-#line 633 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::constructor"
-{
-#line 226 "src/mn-message.gob"
-
- g_assert(MN_IS_MAILBOX(self->mailbox));
-
- if (! self->id)
- {
- GString *id;
-
- /* no ID was provided, try to generate a persistent one */
-
- id = g_string_new(NULL);
-
- if (self->sent_time > 0)
- g_string_append_printf(id, ":sent-time:%i:", (int) self->sent_time);
- if (self->from)
- g_string_append_printf(id, ":from:%s:", self->from);
- if (self->subject)
- g_string_append_printf(id, ":subject:%s:", self->subject);
-
- if (! *id->str)
- {
- static int unique = 0;
-
- /*
- * We could not generate a persistent ID. Fallback to a
- * non-persistent one.
- */
-
- g_string_append_printf(id, "%i", g_atomic_int_exchange_and_add(&unique, 1));
- }
-
- self->id = g_string_free(id, FALSE);
- }
-
- /* these fields must only be filled after we have generated an ID */
-
- if (! self->from)
- self->from = g_strdup("");
- if (! self->subject)
- self->subject = g_strdup("");
- }}
-#line 677 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 267 "src/mn-message.gob"
-static gboolean
-mn_message_subst_command_cb (const char * name, char ** value, gpointer data)
-{
-#line 684 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::subst_command_cb"
-{
-#line 269 "src/mn-message.gob"
-
- Self *self = data;
- GParamSpec **properties;
- unsigned int n_properties;
- gboolean status = FALSE;
- int i;
-
- properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
- for (i = 0; i < n_properties; i++)
- if ((properties[i]->flags & MN_MESSAGE_PARAM_EXPORT) != 0
- && ! strcmp(g_param_spec_get_name(properties[i]), name))
- {
- GValue gvalue = { 0, };
-
- g_value_init(&gvalue, G_PARAM_SPEC_VALUE_TYPE(properties[i]));
- g_object_get_property(G_OBJECT(self), name, &gvalue);
-
- *value = mn_g_value_to_string(&gvalue);
- g_value_unset(&gvalue);
-
- status = TRUE;
- break;
- }
- g_free(properties);
-
- return status;
- }}
-#line 715 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 297 "src/mn-message.gob"
-static gboolean
-mn_message_execute_command_real (MNMessage * self, const char * command, GError ** err)
-{
-#line 722 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::execute_command_real"
-#line 297 "src/mn-message.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 297 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 297 "src/mn-message.gob"
- g_return_val_if_fail (command != NULL, (gboolean )0);
-#line 730 "mn-message.c"
-{
-#line 301 "src/mn-message.gob"
-
- char *subst;
- int status;
-
- subst = mn_subst_command(command, self_subst_command_cb, self, err);
- if (! subst)
- return FALSE;
-
- status = gnome_execute_shell(NULL, subst);
- g_free(subst);
-
- if (status < 0)
- {
- g_set_error(err, 0, 0, "%s", g_strerror(errno));
- return FALSE;
- }
-
- return TRUE;
- }}
-#line 752 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 325 "src/mn-message.gob"
-static gboolean
-mn_message_execute_command (MNMessage * self, const char * id, GError ** err)
-{
-#line 759 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::execute_command"
-#line 325 "src/mn-message.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 325 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 325 "src/mn-message.gob"
- g_return_val_if_fail (id != NULL, (gboolean )0);
-#line 767 "mn-message.c"
-{
-#line 327 "src/mn-message.gob"
-
- char *command;
- GError *tmp_err = NULL;
-
- command = mn_mailbox_get_command(self->mailbox, id);
- if (! command)
- return FALSE;
-
- if (! self_execute_command_real(self, command, &tmp_err))
- {
- g_set_error(err, 0, 0, _("Unable to execute \"%s\": %s."), command, tmp_err->message);
- g_error_free(tmp_err);
- }
-
- g_free(command);
- return TRUE;
- }}
-#line 787 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 345 "src/mn-message.gob"
-gboolean
-mn_message_can_perform_action (MNMessage * self, MNMessageAction * action)
-{
-#line 794 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::can_perform_action"
-#line 345 "src/mn-message.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 345 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 345 "src/mn-message.gob"
- g_return_val_if_fail (action != NULL, (gboolean )0);
-#line 802 "mn-message.c"
-{
-#line 347 "src/mn-message.gob"
-
- return mn_mailbox_has_command(self->mailbox, action->name)
- || action->can_perform(self);
- }}
-#line 809 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 352 "src/mn-message.gob"
-void
-mn_message_perform_action (MNMessage * self, MNMessageAction * action, MNMessageActionResultCallback callback, gpointer data)
-{
-#line 816 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::perform_action"
-#line 352 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 352 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 352 "src/mn-message.gob"
- g_return_if_fail (action != NULL);
-#line 352 "src/mn-message.gob"
- g_return_if_fail (callback != NULL);
-#line 826 "mn-message.c"
-{
-#line 357 "src/mn-message.gob"
-
- GError *err = NULL;
-
- if (self_execute_command(self, action->name, &err))
- self_action_done_real(self, action, err, callback, data);
- else
- {
- MNMessageActionRequest *request;
-
- request = g_new0(MNMessageActionRequest, 1);
- request->message = g_object_ref(self);
- request->action = action;
- request->callback = callback;
- request->data = data;
-
- action->perform(self, request);
- }
- }}
-#line 847 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 376 "src/mn-message.gob"
-void
-mn_message_perform_action_in_thread (MNMessageActionRequest * request, MNMessageActionPerformCallback callback, gpointer user_data)
-{
-#line 854 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::perform_action_in_thread"
-#line 376 "src/mn-message.gob"
- g_return_if_fail (request != NULL);
-#line 376 "src/mn-message.gob"
- g_return_if_fail (callback != NULL);
-#line 860 "mn-message.c"
-{
-#line 380 "src/mn-message.gob"
-
- PerformInfo *info;
-
- info = g_new0(PerformInfo, 1);
- info->request = request;
- info->callback = callback;
- info->user_data = user_data;
-
- g_object_ref(request->message);
- g_object_ref(request->message->mailbox);
-
- mn_thread_create((GThreadFunc) self_perform_action_in_thread_cb, info);
- }}
-#line 876 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 394 "src/mn-message.gob"
-static void
-mn_message_perform_action_in_thread_cb (PerformInfo * info)
-{
-#line 883 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::perform_action_in_thread_cb"
-{
-#line 396 "src/mn-message.gob"
-
- GError *err;
-
- err = info->callback(info->request->message, info->user_data);
-
- GDK_THREADS_ENTER();
-
- self_action_done(info->request, err);
-
- g_object_unref(info->request->message->mailbox);
- g_object_unref(info->request->message);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }}
-#line 902 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 412 "src/mn-message.gob"
-static void
-mn_message_action_done_real (MNMessage * self, MNMessageAction * action, GError * err, MNMessageActionResultCallback callback, gpointer data)
-{
-#line 909 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::action_done_real"
-#line 412 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 412 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 412 "src/mn-message.gob"
- g_return_if_fail (action != NULL);
-#line 917 "mn-message.c"
-{
-#line 418 "src/mn-message.gob"
-
- action->done(self, err);
- callback(action, err, data);
- }}
-#line 924 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 423 "src/mn-message.gob"
-void
-mn_message_action_done (MNMessageActionRequest * request, GError * err)
-{
-#line 931 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::action_done"
-#line 423 "src/mn-message.gob"
- g_return_if_fail (request != NULL);
-#line 935 "mn-message.c"
-{
-#line 425 "src/mn-message.gob"
-
- Self *self = request->message;
-
- self_action_done_real(self, request->action, err, request->callback, request->data);
-
- g_object_unref(request->message);
- g_free(request);
- }}
-#line 946 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 434 "src/mn-message.gob"
-GQuark
-mn_message_action_error_quark (void)
-{
-#line 953 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::action_error_quark"
-{
-#line 436 "src/mn-message.gob"
-
- return g_quark_from_static_string("mn-message-action-error");
- }}
-#line 960 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 440 "src/mn-message.gob"
-static gboolean
-mn_message_builtin_can_open (MNMessage * self)
-{
-#line 967 "mn-message.c"
- MNMessageClass *klass;
-#line 440 "src/mn-message.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 440 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 973 "mn-message.c"
- klass = MN_MESSAGE_GET_CLASS(self);
-
- if(klass->builtin_can_open)
- return (*klass->builtin_can_open)(self);
- else
- return (gboolean )(0);
-}
-#line 440 "src/mn-message.gob"
-static gboolean
-___real_mn_message_builtin_can_open (MNMessage * self G_GNUC_UNUSED)
-{
-#line 985 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::builtin_can_open"
-{
-#line 442 "src/mn-message.gob"
-
- return self->uri != NULL;
- }}
-#line 992 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 446 "src/mn-message.gob"
-static void
-mn_message_builtin_open (MNMessage * self, MNMessageActionRequest * request)
-{
-#line 999 "mn-message.c"
- MNMessageClass *klass;
-#line 446 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 446 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1005 "mn-message.c"
- klass = MN_MESSAGE_GET_CLASS(self);
-
- if(klass->builtin_open)
- (*klass->builtin_open)(self,request);
-}
-#line 446 "src/mn-message.gob"
-static void
-___real_mn_message_builtin_open (MNMessage * self G_GNUC_UNUSED, MNMessageActionRequest * request)
-{
-#line 1015 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::builtin_open"
-{
-#line 448 "src/mn-message.gob"
-
- GError *err = NULL;
-
- gnome_url_show(self->uri, &err);
-
- self_action_done(request, err);
- }}
-#line 1026 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 456 "src/mn-message.gob"
-static void
-mn_message_open_done (MNMessage * self, GError * err)
-{
-#line 1033 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::open_done"
-#line 456 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 456 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1039 "mn-message.c"
-{
-#line 458 "src/mn-message.gob"
-
- if (! err)
- self_consider_as_read(self); /* [1] */
- }}
-#line 1046 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 463 "src/mn-message.gob"
-static gboolean
-mn_message_builtin_can_mark_as_read (MNMessage * self)
-{
-#line 1053 "mn-message.c"
- MNMessageClass *klass;
-#line 463 "src/mn-message.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 463 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1059 "mn-message.c"
- klass = MN_MESSAGE_GET_CLASS(self);
-
- if(klass->builtin_can_mark_as_read)
- return (*klass->builtin_can_mark_as_read)(self);
- else
- return (gboolean )(0);
-}
-#line 463 "src/mn-message.gob"
-static gboolean
-___real_mn_message_builtin_can_mark_as_read (MNMessage * self G_GNUC_UNUSED)
-{
-#line 1071 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::builtin_can_mark_as_read"
-{
-#line 465 "src/mn-message.gob"
-
- return SELF_GET_CLASS(self)->builtin_mark_as_read != NULL;
- }}
-#line 1078 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 469 "src/mn-message.gob"
-static void
-mn_message_builtin_mark_as_read (MNMessage * self, MNMessageActionRequest * request)
-{
-#line 1085 "mn-message.c"
- MNMessageClass *klass;
-#line 469 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 469 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1091 "mn-message.c"
- klass = MN_MESSAGE_GET_CLASS(self);
-
- if(klass->builtin_mark_as_read)
- (*klass->builtin_mark_as_read)(self,request);
-}
-
-#line 472 "src/mn-message.gob"
-static void
-mn_message_mark_as_read_done (MNMessage * self, GError * err)
-{
-#line 1102 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::mark_as_read_done"
-#line 472 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 472 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1108 "mn-message.c"
-{
-#line 474 "src/mn-message.gob"
-
- if (! err)
- self_consider_as_read(self); /* [1] */
- }}
-#line 1115 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 479 "src/mn-message.gob"
-static gboolean
-mn_message_builtin_can_mark_as_spam (MNMessage * self)
-{
-#line 1122 "mn-message.c"
- MNMessageClass *klass;
-#line 479 "src/mn-message.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 479 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1128 "mn-message.c"
- klass = MN_MESSAGE_GET_CLASS(self);
-
- if(klass->builtin_can_mark_as_spam)
- return (*klass->builtin_can_mark_as_spam)(self);
- else
- return (gboolean )(0);
-}
-#line 479 "src/mn-message.gob"
-static gboolean
-___real_mn_message_builtin_can_mark_as_spam (MNMessage * self G_GNUC_UNUSED)
-{
-#line 1140 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::builtin_can_mark_as_spam"
-{
-#line 481 "src/mn-message.gob"
-
- return SELF_GET_CLASS(self)->builtin_mark_as_spam != NULL;
- }}
-#line 1147 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 485 "src/mn-message.gob"
-static void
-mn_message_builtin_mark_as_spam (MNMessage * self, MNMessageActionRequest * request)
-{
-#line 1154 "mn-message.c"
- MNMessageClass *klass;
-#line 485 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 485 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1160 "mn-message.c"
- klass = MN_MESSAGE_GET_CLASS(self);
-
- if(klass->builtin_mark_as_spam)
- (*klass->builtin_mark_as_spam)(self,request);
-}
-
-#line 488 "src/mn-message.gob"
-static void
-mn_message_mark_as_spam_done (MNMessage * self, GError * err)
-{
-#line 1171 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::mark_as_spam_done"
-#line 488 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 488 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1177 "mn-message.c"
-{
-#line 490 "src/mn-message.gob"
-
- if (! err)
- self_consider_as_read(self); /* [1] */
- }}
-#line 1184 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 495 "src/mn-message.gob"
-static gboolean
-mn_message_builtin_can_delete (MNMessage * self)
-{
-#line 1191 "mn-message.c"
- MNMessageClass *klass;
-#line 495 "src/mn-message.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 495 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1197 "mn-message.c"
- klass = MN_MESSAGE_GET_CLASS(self);
-
- if(klass->builtin_can_delete)
- return (*klass->builtin_can_delete)(self);
- else
- return (gboolean )(0);
-}
-#line 495 "src/mn-message.gob"
-static gboolean
-___real_mn_message_builtin_can_delete (MNMessage * self G_GNUC_UNUSED)
-{
-#line 1209 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::builtin_can_delete"
-{
-#line 497 "src/mn-message.gob"
-
- return SELF_GET_CLASS(self)->builtin_delete != NULL;
- }}
-#line 1216 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 501 "src/mn-message.gob"
-static void
-mn_message_builtin_delete (MNMessage * self, MNMessageActionRequest * request)
-{
-#line 1223 "mn-message.c"
- MNMessageClass *klass;
-#line 501 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 501 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1229 "mn-message.c"
- klass = MN_MESSAGE_GET_CLASS(self);
-
- if(klass->builtin_delete)
- (*klass->builtin_delete)(self,request);
-}
-
-#line 504 "src/mn-message.gob"
-static void
-mn_message_delete_done (MNMessage * self, GError * err)
-{
-#line 1240 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::delete_done"
-#line 504 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 504 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1246 "mn-message.c"
-{
-#line 506 "src/mn-message.gob"
-
- if (! err)
- self_consider_as_read(self); /* [1] */
- }}
-#line 1253 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 511 "src/mn-message.gob"
-void
-mn_message_consider_as_read (MNMessage * self)
-{
-#line 1260 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::consider_as_read"
-#line 511 "src/mn-message.gob"
- g_return_if_fail (self != NULL);
-#line 511 "src/mn-message.gob"
- g_return_if_fail (MN_IS_MESSAGE (self));
-#line 1266 "mn-message.c"
-{
-#line 513 "src/mn-message.gob"
-
- GSList *list;
- GSList *l;
- gboolean exists = FALSE;
-
- list = mn_conf_get_string_list(MN_CONF_MESSAGES_CONSIDERED_AS_READ);
-
- MN_LIST_FOREACH(l, list)
- {
- const char *id = l->data;
-
- if (! strcmp(id, self->id))
- {
- exists = TRUE;
- break;
- }
- }
-
- if (! exists)
- {
- list = g_slist_prepend(list, g_strdup(self->id));
-
- mn_conf_set_string_list(MN_CONF_MESSAGES_CONSIDERED_AS_READ, list);
- }
-
- mn_g_slist_free_deep(list);
- }}
-#line 1296 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 545 "src/mn-message.gob"
-void
-mn_message_consider_as_read_list (GList * messages)
-{
-#line 1303 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::consider_as_read_list"
-{
-#line 547 "src/mn-message.gob"
-
- GHashTable *set;
- unsigned int old_size;
- GList *l;
-
- set = mn_conf_get_string_hash_set(MN_CONF_MESSAGES_CONSIDERED_AS_READ);
-
- old_size = g_hash_table_size(set);
-
- MN_LIST_FOREACH(l, messages)
- {
- MNMessage *message = l->data;
-
- g_hash_table_replace(set, g_strdup(message->id), GINT_TO_POINTER(TRUE));
- }
-
- if (g_hash_table_size(set) != old_size)
- mn_conf_set_string_hash_set(MN_CONF_MESSAGES_CONSIDERED_AS_READ, set);
-
- g_hash_table_destroy(set);
- }}
-#line 1328 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 569 "src/mn-message.gob"
-MNMessage *
-mn_message_new (MNMailbox * mailbox, time_t sent_time, const char * id, const char * mid, const char * from, const char * subject, const char * uri, MNMessageFlags flags)
-{
-#line 1335 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::new"
-#line 569 "src/mn-message.gob"
- g_return_val_if_fail (mailbox != NULL, (MNMessage * )0);
-#line 569 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (MNMessage * )0);
-#line 1341 "mn-message.c"
-{
-#line 578 "src/mn-message.gob"
-
- return GET_NEW_VARG(MN_MESSAGE_PROP_MAILBOX(mailbox),
- MN_MESSAGE_PROP_SENT_TIME(sent_time),
- MN_MESSAGE_PROP_ID((char *) id),
- MN_MESSAGE_PROP_MID((char *) mid),
- MN_MESSAGE_PROP_FROM((char *) from),
- MN_MESSAGE_PROP_SUBJECT((char *) subject),
- MN_MESSAGE_PROP_URI((char *) uri),
- MN_MESSAGE_PROP_FLAGS(flags),
- NULL);
- }}
-#line 1355 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 590 "src/mn-message.gob"
-xmlNode *
-mn_message_xml_node_new (MNMessage * self)
-{
-#line 1362 "mn-message.c"
-#define __GOB_FUNCTION__ "MN:Message::xml_node_new"
-#line 590 "src/mn-message.gob"
- g_return_val_if_fail (self != NULL, (xmlNode * )0);
-#line 590 "src/mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (xmlNode * )0);
-#line 1368 "mn-message.c"
-{
-#line 592 "src/mn-message.gob"
-
- xmlNode *node;
-
- node = xmlNewNode(NULL, "message");
-
- xmlSetProp(node, "mailbox", self->mailbox->runtime_name);
-
- if ((self->flags & MN_MESSAGE_NEW) != 0)
- xmlSetProp(node, "new", "true");
-
- mn_xml_export_properties(G_OBJECT(self), node);
-
- return node;
- }}
-#line 1385 "mn-message.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-message.gob.stamp b/build/src/mn-message.gob.stamp
diff --git a/build/src/mn-message.h b/build/src/mn-message.h
@@ -1,191 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <time.h>
-#include "mn-mailbox.h"
-
-#ifndef __MN_MESSAGE_H__
-#define __MN_MESSAGE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-typedef enum
-{
- MN_MESSAGE_NEW = 1 << 0 /* unseen message */
-} MNMessageFlags;
-
-typedef struct _MNMessageAction MNMessageAction;
-
-typedef void (*MNMessageActionResultCallback) (MNMessageAction *action, GError *err, gpointer data);
-
-typedef struct
-{
- MNMessageAction *action;
- MNMessage *message;
- MNMessageActionResultCallback callback;
- gpointer data;
-} MNMessageActionRequest;
-
-struct _MNMessageAction
-{
- const char *name;
- const char *icon;
- const char *label;
- const char *error_message;
-
- gboolean (*can_perform) (MNMessage *message);
- void (*perform) (MNMessage *message, MNMessageActionRequest *request);
- void (*done) (MNMessage *message, GError *err);
-};
-
-#define MN_MESSAGE_ACTION_ERROR (mn_message_action_error_quark())
-
-typedef enum
-{
- MN_MESSAGE_ACTION_ERROR_OTHER,
- MN_MESSAGE_ACTION_ERROR_CANCELLED
-} MNMessageActionError;
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MESSAGE (mn_message_get_type())
-#define MN_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_message_get_type(), MNMessage)
-#define MN_MESSAGE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_message_get_type(), MNMessage const)
-#define MN_MESSAGE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_message_get_type(), MNMessageClass)
-#define MN_IS_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_message_get_type ())
-
-#define MN_MESSAGE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_message_get_type(), MNMessageClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MESSAGE__
-#define __TYPEDEF_MN_MESSAGE__
-typedef struct _MNMessage MNMessage;
-#endif
-struct _MNMessage {
- GObject __parent__;
- /*< public >*/
- MNMailbox * mailbox;
- time_t sent_time;
- char * id;
- char * mid;
- char * from;
- char * subject;
- char * uri;
- MNMessageFlags flags;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMessageClass MNMessageClass;
-struct _MNMessageClass {
- GObjectClass __parent__;
- gboolean (* builtin_can_open) (MNMessage * self);
- void (* builtin_open) (MNMessage * self, MNMessageActionRequest * request);
- gboolean (* builtin_can_mark_as_read) (MNMessage * self);
- void (* builtin_mark_as_read) (MNMessage * self, MNMessageActionRequest * request);
- gboolean (* builtin_can_mark_as_spam) (MNMessage * self);
- void (* builtin_mark_as_spam) (MNMessage * self, MNMessageActionRequest * request);
- gboolean (* builtin_can_delete) (MNMessage * self);
- void (* builtin_delete) (MNMessage * self, MNMessageActionRequest * request);
-};
-
-
-/*
- * Public methods
- */
-GType mn_message_get_type (void) G_GNUC_CONST;
-#line 203 "src/mn-message.gob"
-MNMessageAction * mn_message_get_action (const char * name);
-#line 112 "mn-message.h"
-#line 345 "src/mn-message.gob"
-gboolean mn_message_can_perform_action (MNMessage * self,
- MNMessageAction * action);
-#line 116 "mn-message.h"
-#line 352 "src/mn-message.gob"
-void mn_message_perform_action (MNMessage * self,
- MNMessageAction * action,
- MNMessageActionResultCallback callback,
- gpointer data);
-#line 122 "mn-message.h"
-#line 434 "src/mn-message.gob"
-GQuark mn_message_action_error_quark (void);
-#line 125 "mn-message.h"
-#line 511 "src/mn-message.gob"
-void mn_message_consider_as_read (MNMessage * self);
-#line 128 "mn-message.h"
-#line 545 "src/mn-message.gob"
-void mn_message_consider_as_read_list (GList * messages);
-#line 131 "mn-message.h"
-#line 569 "src/mn-message.gob"
-MNMessage * mn_message_new (MNMailbox * mailbox,
- time_t sent_time,
- const char * id,
- const char * mid,
- const char * from,
- const char * subject,
- const char * uri,
- MNMessageFlags flags);
-#line 141 "mn-message.h"
-#line 590 "src/mn-message.gob"
-xmlNode * mn_message_xml_node_new (MNMessage * self);
-#line 144 "mn-message.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_MESSAGE_PROP_MAILBOX(arg) "mailbox", __extension__ ({MNMailbox * z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_MAILBOX(arg) "mailbox", __extension__ ({MNMailbox * *z = (arg); z;})
-#define MN_MESSAGE_PROP_SENT_TIME(arg) "sent_time", __extension__ ({time_t z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_SENT_TIME(arg) "sent_time", __extension__ ({time_t *z = (arg); z;})
-#define MN_MESSAGE_PROP_ID(arg) "id", __extension__ ({gchar *z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_ID(arg) "id", __extension__ ({gchar **z = (arg); z;})
-#define MN_MESSAGE_PROP_MID(arg) "mid", __extension__ ({gchar *z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_MID(arg) "mid", __extension__ ({gchar **z = (arg); z;})
-#define MN_MESSAGE_PROP_FROM(arg) "from", __extension__ ({gchar *z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_FROM(arg) "from", __extension__ ({gchar **z = (arg); z;})
-#define MN_MESSAGE_PROP_SUBJECT(arg) "subject", __extension__ ({gchar *z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_SUBJECT(arg) "subject", __extension__ ({gchar **z = (arg); z;})
-#define MN_MESSAGE_PROP_URI(arg) "uri", __extension__ ({gchar *z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_URI(arg) "uri", __extension__ ({gchar **z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_FILENAME(arg) "filename", __extension__ ({gchar **z = (arg); z;})
-#define MN_MESSAGE_PROP_FLAGS(arg) "flags", __extension__ ({guint z = (arg); z;})
-#define MN_MESSAGE_GET_PROP_FLAGS(arg) "flags", __extension__ ({guint *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_MESSAGE_PROP_MAILBOX(arg) "mailbox",(MNMailbox * )(arg)
-#define MN_MESSAGE_GET_PROP_MAILBOX(arg) "mailbox",(MNMailbox * *)(arg)
-#define MN_MESSAGE_PROP_SENT_TIME(arg) "sent_time",(time_t )(arg)
-#define MN_MESSAGE_GET_PROP_SENT_TIME(arg) "sent_time",(time_t *)(arg)
-#define MN_MESSAGE_PROP_ID(arg) "id",(gchar *)(arg)
-#define MN_MESSAGE_GET_PROP_ID(arg) "id",(gchar **)(arg)
-#define MN_MESSAGE_PROP_MID(arg) "mid",(gchar *)(arg)
-#define MN_MESSAGE_GET_PROP_MID(arg) "mid",(gchar **)(arg)
-#define MN_MESSAGE_PROP_FROM(arg) "from",(gchar *)(arg)
-#define MN_MESSAGE_GET_PROP_FROM(arg) "from",(gchar **)(arg)
-#define MN_MESSAGE_PROP_SUBJECT(arg) "subject",(gchar *)(arg)
-#define MN_MESSAGE_GET_PROP_SUBJECT(arg) "subject",(gchar **)(arg)
-#define MN_MESSAGE_PROP_URI(arg) "uri",(gchar *)(arg)
-#define MN_MESSAGE_GET_PROP_URI(arg) "uri",(gchar **)(arg)
-#define MN_MESSAGE_GET_PROP_FILENAME(arg) "filename",(gchar **)(arg)
-#define MN_MESSAGE_PROP_FLAGS(arg) "flags",(guint )(arg)
-#define MN_MESSAGE_GET_PROP_FLAGS(arg) "flags",(guint *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mh-mailbox-backend-private.h b/build/src/mn-mh-mailbox-backend-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MH_MAILBOX_BACKEND_PRIVATE_H__
-#define __MN_MH_MAILBOX_BACKEND_PRIVATE_H__
-
-#include "mn-mh-mailbox-backend.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mh-mailbox-backend.c b/build/src/mn-mh-mailbox-backend.c
@@ -1,417 +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-mh-mailbox-backend.h"
-
-#include "mn-mh-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 24 "src/mn-mh-mailbox-backend.gob"
-
-#include <glib/gi18n.h>
-#include "mn-mailbox-private.h"
-#include "mn-reentrant-mailbox-private.h"
-#include "mn-vfs-mailbox-backend-private.h"
-#include "mn-vfs.h"
-#include "mn-util.h"
-#include "mn-message-mime.h"
-
-#define SEQUENCES_FILE ".mh_sequences"
-#define XMH_CACHE_FILE ".xmhcache"
-
-#line 39 "mn-mh-mailbox-backend.c"
-/* self casting macros */
-#define SELF(x) MN_MH_MAILBOX_BACKEND(x)
-#define SELF_CONST(x) MN_MH_MAILBOX_BACKEND_CONST(x)
-#define IS_SELF(x) MN_IS_MH_MAILBOX_BACKEND(x)
-#define TYPE_SELF MN_TYPE_MH_MAILBOX_BACKEND
-#define SELF_CLASS(x) MN_MH_MAILBOX_BACKEND_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MH_MAILBOX_BACKEND_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMHMailboxBackend Self;
-typedef MNMHMailboxBackendClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-mh-mailbox-backend.gob"
-static void mn_mh_mailbox_backend_init (MNMHMailboxBackend * o) G_GNUC_UNUSED;
-#line 56 "mn-mh-mailbox-backend.c"
-#line 39 "src/mn-mh-mailbox-backend.gob"
-static void mn_mh_mailbox_backend_class_init (MNMHMailboxBackendClass * class) G_GNUC_UNUSED;
-#line 59 "mn-mh-mailbox-backend.c"
-#line 44 "src/mn-mh-mailbox-backend.gob"
-static void mn_mh_mailbox_backend_constructor (MNMHMailboxBackend * self) G_GNUC_UNUSED;
-#line 62 "mn-mh-mailbox-backend.c"
-#line 56 "src/mn-mh-mailbox-backend.gob"
-static void ___3_mn_mh_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
-#line 65 "mn-mh-mailbox-backend.c"
-#line 78 "src/mn-mh-mailbox-backend.gob"
-static gboolean ___4_mn_mh_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
-#line 68 "mn-mh-mailbox-backend.c"
-#line 102 "src/mn-mh-mailbox-backend.gob"
-static void ___5_mn_mh_mailbox_backend_check (MNVFSMailboxBackend * backend, int check_id) G_GNUC_UNUSED;
-#line 71 "mn-mh-mailbox-backend.c"
-
-/* pointer to the class of our parent */
-static MNVFSMailboxBackendClass *parent_class = NULL;
-
-GType
-mn_mh_mailbox_backend_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMHMailboxBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mh_mailbox_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMHMailboxBackend),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mh_mailbox_backend_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_VFS_MAILBOX_BACKEND, "MNMHMailboxBackend", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMHMailboxBackend *)g_object_new(mn_mh_mailbox_backend_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMHMailboxBackend * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMHMailboxBackend *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMHMailboxBackend *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMHMailboxBackend *)g_object_new_valist (mn_mh_mailbox_backend_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:MH:Mailbox:Backend::constructor"
- GObject *obj_self;
- MNMHMailboxBackend *self;
- obj_self = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
- self = MN_MH_MAILBOX_BACKEND (obj_self);
-#line 44 "src/mn-mh-mailbox-backend.gob"
- mn_mh_mailbox_backend_constructor (self);
-#line 129 "mn-mh-mailbox-backend.c"
- return obj_self;
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_mh_mailbox_backend_init (MNMHMailboxBackend * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::init"
-}
-#undef __GOB_FUNCTION__
-#line 39 "src/mn-mh-mailbox-backend.gob"
-static void
-mn_mh_mailbox_backend_class_init (MNMHMailboxBackendClass * class G_GNUC_UNUSED)
-{
-#line 144 "mn-mh-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
- MNVFSMailboxBackendClass *mn_vfs_mailbox_backend_class = (MNVFSMailboxBackendClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX_BACKEND);
-
-#line 56 "src/mn-mh-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->monitor_cb = ___3_mn_mh_mailbox_backend_monitor_cb;
-#line 78 "src/mn-mh-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->is = ___4_mn_mh_mailbox_backend_is;
-#line 102 "src/mn-mh-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->check = ___5_mn_mh_mailbox_backend_check;
-#line 157 "mn-mh-mailbox-backend.c"
- g_object_class->constructor = ___constructor;
- {
-#line 40 "src/mn-mh-mailbox-backend.gob"
-
- MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "MH";
-
-#line 164 "mn-mh-mailbox-backend.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 44 "src/mn-mh-mailbox-backend.gob"
-static void
-mn_mh_mailbox_backend_constructor (MNMHMailboxBackend * self G_GNUC_UNUSED)
-{
-#line 175 "mn-mh-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::constructor"
-{
-#line 45 "src/mn-mh-mailbox-backend.gob"
-
- MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
-
- /*
- * There is no standard way of locking a MH mailbox, so avoid race
- * conditions by setting a check latency of 3 seconds.
- */
-
- backend->check_latency = 3000;
- }}
-#line 189 "mn-mh-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 56 "src/mn-mh-mailbox-backend.gob"
-static void
-___3_mn_mh_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
-#line 195 "mn-mh-mailbox-backend.c"
-#define PARENT_HANDLER(___backend,___info_uri,___event_type) \
- { if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb) \
- (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb)(___backend,___info_uri,___event_type); }
-{
-#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::monitor_cb"
-{
-#line 60 "src/mn-mh-mailbox-backend.gob"
-
- if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
- || event_type == GNOME_VFS_MONITOR_EVENT_DELETED
- || event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
- {
- char *filename;
-
- filename = mn_vfs_uri_extract_short_name(info_uri);
- if (filename)
- {
- if (! strcmp(filename, SEQUENCES_FILE) || mn_str_isnumeric(filename))
- mn_vfs_mailbox_backend_queue_check(backend);
-
- g_free(filename);
- }
- }
- }}
-#line 220 "mn-mh-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 78 "src/mn-mh-mailbox-backend.gob"
-static gboolean
-___4_mn_mh_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
-#line 227 "mn-mh-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:MH:Mailbox:Backend::is"
-{
-#line 82 "src/mn-mh-mailbox-backend.gob"
-
- GnomeVFSURI *sequences_uri;
- gboolean is;
-
- sequences_uri = gnome_vfs_uri_append_file_name(mailbox->vfs_uri, SEQUENCES_FILE);
- is = mn_vfs_test(sequences_uri, G_FILE_TEST_IS_REGULAR);
- gnome_vfs_uri_unref(sequences_uri);
-
- if (! is)
- {
- GnomeVFSURI *cache_uri;
-
- cache_uri = gnome_vfs_uri_append_file_name(mailbox->vfs_uri, XMH_CACHE_FILE);
- is = mn_vfs_test(cache_uri, G_FILE_TEST_IS_REGULAR);
- gnome_vfs_uri_unref(cache_uri);
- }
-
- return is;
- }}
-#line 255 "mn-mh-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 102 "src/mn-mh-mailbox-backend.gob"
-static void
-___5_mn_mh_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, int check_id)
-#line 262 "mn-mh-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:MH:Mailbox:Backend::check"
-{
-#line 104 "src/mn-mh-mailbox-backend.gob"
-
- GnomeVFSURI *sequences_uri;
- GnomeVFSResult result;
- GnomeVFSHandle *handle;
-
- mn_vfs_mailbox_backend_monitor(backend, check_id, backend->mailbox->uri, GNOME_VFS_MONITOR_DIRECTORY);
-
- sequences_uri = gnome_vfs_uri_append_file_name(backend->mailbox->vfs_uri, SEQUENCES_FILE);
- result = gnome_vfs_open_uri(&handle, sequences_uri, GNOME_VFS_OPEN_READ);
- gnome_vfs_uri_unref(sequences_uri);
-
- if (result == GNOME_VFS_OK)
- {
- MNVFSReadLineContext *context = NULL;
- const char *line;
- GSList *messages = NULL;
- int num_errors = 0;
- GnomeVFSResult close_result;
-
- while ((result = mn_vfs_read_line(&context, handle, &line)) == GNOME_VFS_OK)
- if (g_str_has_prefix(line, "unseen: "))
- {
- int first;
- char **elements;
- int i;
-
- elements = g_strsplit(line + 8, " ", 0);
- for (i = 0; elements[i]; i++)
- {
- int last;
- int n;
-
- n = sscanf(elements[i], "%d-%d", &first, &last);
- if (n >= 1)
- {
- int j;
-
- if (n == 1)
- last = first;
-
- for (j = first; j <= last; j++)
- {
- char *filename;
- GnomeVFSURI *message_uri;
- MNMessage *message;
- GError *err = NULL;
-
- if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- {
- g_strfreev(elements);
- goto loop_end;
- }
-
- filename = g_strdup_printf("%i", j);
- message_uri = gnome_vfs_uri_append_file_name(backend->mailbox->vfs_uri, filename);
- g_free(filename);
-
- /*
- * We set handle_status to FALSE, since
- * messages in the unseen sequence are by
- * definition unseen (that is, new).
- */
-
- message = mn_message_new_from_uri(MN_MAILBOX(backend->mailbox),
- message_uri,
- MN_MESSAGE_NEW,
- FALSE,
- &err);
- if (message)
- messages = g_slist_prepend(messages, message);
- else if (err)
- {
- char *message_text_uri;
-
- message_text_uri = gnome_vfs_uri_to_string(message_uri, GNOME_VFS_URI_HIDE_PASSWORD);
- mn_mailbox_warning(MN_MAILBOX(backend->mailbox), "cannot read message \"%s\": %s",
- message_text_uri, err->message);
- g_free(message_text_uri);
- g_error_free(err);
-
- num_errors++;
- }
-
- gnome_vfs_uri_unref(message_uri);
- }
- }
- }
- g_strfreev(elements);
- }
-
- loop_end:
- mn_vfs_read_line_context_free(context);
- close_result = gnome_vfs_close(handle);
-
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- {
- if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
- {
- if (close_result == GNOME_VFS_OK)
- {
- mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
-
- if (num_errors != 0)
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox),
- ngettext("cannot read %i message",
- "cannot read %i messages",
- num_errors),
- num_errors);
- }
- else
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to close %s: %s"), SEQUENCES_FILE, gnome_vfs_result_to_string(close_result));
- }
- else
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("error while reading %s: %s"), SEQUENCES_FILE, gnome_vfs_result_to_string(result));
- }
-
- mn_g_object_slist_free(messages);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
- else
- {
- GnomeVFSURI *cache_uri;
- gboolean cache_exists;
-
- cache_uri = gnome_vfs_uri_append_file_name(backend->mailbox->vfs_uri, XMH_CACHE_FILE);
- cache_exists = mn_vfs_test(cache_uri, G_FILE_TEST_IS_REGULAR);
- gnome_vfs_uri_unref(cache_uri);
-
- if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- {
- GDK_THREADS_ENTER();
-
- if (cache_exists)
- mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), NULL);
- else
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open %s: %s"), SEQUENCES_FILE, gnome_vfs_result_to_string(result));
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
- }
- }}
-#line 416 "mn-mh-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
diff --git a/build/src/mn-mh-mailbox-backend.gob.stamp b/build/src/mn-mh-mailbox-backend.gob.stamp
diff --git a/build/src/mn-mh-mailbox-backend.h b/build/src/mn-mh-mailbox-backend.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-vfs-mailbox-backend.h"
-
-#ifndef __MN_MH_MAILBOX_BACKEND_H__
-#define __MN_MH_MAILBOX_BACKEND_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MH_MAILBOX_BACKEND (mn_mh_mailbox_backend_get_type())
-#define MN_MH_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mh_mailbox_backend_get_type(), MNMHMailboxBackend)
-#define MN_MH_MAILBOX_BACKEND_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mh_mailbox_backend_get_type(), MNMHMailboxBackend const)
-#define MN_MH_MAILBOX_BACKEND_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mh_mailbox_backend_get_type(), MNMHMailboxBackendClass)
-#define MN_IS_MH_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mh_mailbox_backend_get_type ())
-
-#define MN_MH_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mh_mailbox_backend_get_type(), MNMHMailboxBackendClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MH_MAILBOX_BACKEND__
-#define __TYPEDEF_MN_MH_MAILBOX_BACKEND__
-typedef struct _MNMHMailboxBackend MNMHMailboxBackend;
-#endif
-struct _MNMHMailboxBackend {
- MNVFSMailboxBackend __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMHMailboxBackendClass MNMHMailboxBackendClass;
-struct _MNMHMailboxBackendClass {
- MNVFSMailboxBackendClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_mh_mailbox_backend_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mozilla-mailbox-backend-private.h b/build/src/mn-mozilla-mailbox-backend-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_MOZILLA_MAILBOX_BACKEND_PRIVATE_H__
-#define __MN_MOZILLA_MAILBOX_BACKEND_PRIVATE_H__
-
-#include "mn-mozilla-mailbox-backend.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-mozilla-mailbox-backend.c b/build/src/mn-mozilla-mailbox-backend.c
@@ -1,204 +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-mozilla-mailbox-backend.h"
-
-#include "mn-mozilla-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 24 "src/mn-mozilla-mailbox-backend.gob"
-
-#include <stdlib.h>
-#include <limits.h>
-#include "mn-base-mbox-mailbox-backend-private.h"
-#include "mn-message-mime.h"
-#include "mn-util.h"
-
-/* taken from base/public/nsMsgMessageFlags.h in the Mozilla Mail&News sources */
-/* in X-Mozilla-Status */
-#define MOZILLA_MSG_FLAG_READ 0x0001
-#define MOZILLA_MSG_FLAG_EXPUNGED 0x0008
-/* in X-Mozilla-Status2 */
-#define MOZILLA_MSG_FLAG_NEW 0x10000
-
-#line 41 "mn-mozilla-mailbox-backend.c"
-/* self casting macros */
-#define SELF(x) MN_MOZILLA_MAILBOX_BACKEND(x)
-#define SELF_CONST(x) MN_MOZILLA_MAILBOX_BACKEND_CONST(x)
-#define IS_SELF(x) MN_IS_MOZILLA_MAILBOX_BACKEND(x)
-#define TYPE_SELF MN_TYPE_MOZILLA_MAILBOX_BACKEND
-#define SELF_CLASS(x) MN_MOZILLA_MAILBOX_BACKEND_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_MOZILLA_MAILBOX_BACKEND_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNMozillaMailboxBackend Self;
-typedef MNMozillaMailboxBackendClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-mozilla-mailbox-backend.gob"
-static void mn_mozilla_mailbox_backend_init (MNMozillaMailboxBackend * o) G_GNUC_UNUSED;
-#line 58 "mn-mozilla-mailbox-backend.c"
-#line 41 "src/mn-mozilla-mailbox-backend.gob"
-static void mn_mozilla_mailbox_backend_class_init (MNMozillaMailboxBackendClass * class) G_GNUC_UNUSED;
-#line 61 "mn-mozilla-mailbox-backend.c"
-#line 46 "src/mn-mozilla-mailbox-backend.gob"
-static MNMessage * ___2_mn_mozilla_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * backend, GMimeMessage * mime_message) G_GNUC_UNUSED;
-#line 64 "mn-mozilla-mailbox-backend.c"
-#line 66 "src/mn-mozilla-mailbox-backend.gob"
-static int mn_mozilla_mailbox_backend_get_status_flags (GMimeMessage * mime_message, const char * header_name) G_GNUC_UNUSED;
-#line 67 "mn-mozilla-mailbox-backend.c"
-
-/* pointer to the class of our parent */
-static MNBaseMboxMailboxBackendClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_get_status_flags mn_mozilla_mailbox_backend_get_status_flags
-GType
-mn_mozilla_mailbox_backend_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNMozillaMailboxBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_mozilla_mailbox_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNMozillaMailboxBackend),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_mozilla_mailbox_backend_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_BASE_MBOX_MAILBOX_BACKEND, "MNMozillaMailboxBackend", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNMozillaMailboxBackend *)g_object_new(mn_mozilla_mailbox_backend_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNMozillaMailboxBackend * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNMozillaMailboxBackend *
-GET_NEW_VARG (const char *first, ...)
-{
- MNMozillaMailboxBackend *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNMozillaMailboxBackend *)g_object_new_valist (mn_mozilla_mailbox_backend_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_mozilla_mailbox_backend_init (MNMozillaMailboxBackend * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Mozilla:Mailbox:Backend::init"
-}
-#undef __GOB_FUNCTION__
-#line 41 "src/mn-mozilla-mailbox-backend.gob"
-static void
-mn_mozilla_mailbox_backend_class_init (MNMozillaMailboxBackendClass * class G_GNUC_UNUSED)
-{
-#line 126 "mn-mozilla-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Mozilla:Mailbox:Backend::class_init"
- MNBaseMboxMailboxBackendClass *mn_base_mbox_mailbox_backend_class = (MNBaseMboxMailboxBackendClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_BASE_MBOX_MAILBOX_BACKEND);
-
-#line 46 "src/mn-mozilla-mailbox-backend.gob"
- mn_base_mbox_mailbox_backend_class->get_new_message = ___2_mn_mozilla_mailbox_backend_get_new_message;
-#line 134 "mn-mozilla-mailbox-backend.c"
- {
-#line 42 "src/mn-mozilla-mailbox-backend.gob"
-
- MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "Mozilla";
-
-#line 140 "mn-mozilla-mailbox-backend.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 46 "src/mn-mozilla-mailbox-backend.gob"
-static MNMessage *
-___2_mn_mozilla_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * backend G_GNUC_UNUSED, GMimeMessage * mime_message)
-#line 150 "mn-mozilla-mailbox-backend.c"
-#define PARENT_HANDLER(___backend,___mime_message) \
- ((MN_BASE_MBOX_MAILBOX_BACKEND_CLASS(parent_class)->get_new_message)? \
- (* MN_BASE_MBOX_MAILBOX_BACKEND_CLASS(parent_class)->get_new_message)(___backend,___mime_message): \
- ((MNMessage * )0))
-{
-#define __GOB_FUNCTION__ "MN:Mozilla:Mailbox:Backend::get_new_message"
-{
-#line 48 "src/mn-mozilla-mailbox-backend.gob"
-
- int flags;
-
- flags = self_get_status_flags(mime_message, "X-Mozilla-Status");
- if ((flags & MOZILLA_MSG_FLAG_READ) == 0
- && (flags & MOZILLA_MSG_FLAG_EXPUNGED) == 0)
- {
- int mn_flags = 0;
-
- if ((self_get_status_flags(mime_message, "X-Mozilla-Status2") & MOZILLA_MSG_FLAG_NEW) != 0)
- mn_flags |= MN_MESSAGE_NEW;
-
- return mn_message_new_from_mime_message(MN_MAILBOX(MN_VFS_MAILBOX_BACKEND(backend)->mailbox), mime_message, NULL, mn_flags, FALSE);
- }
- else
- return NULL;
- }}
-#line 176 "mn-mozilla-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 66 "src/mn-mozilla-mailbox-backend.gob"
-static int
-mn_mozilla_mailbox_backend_get_status_flags (GMimeMessage * mime_message, const char * header_name)
-{
-#line 184 "mn-mozilla-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Mozilla:Mailbox:Backend::get_status_flags"
-#line 66 "src/mn-mozilla-mailbox-backend.gob"
- g_return_val_if_fail (mime_message != NULL, (int )0);
-#line 66 "src/mn-mozilla-mailbox-backend.gob"
- g_return_val_if_fail (GMIME_IS_MESSAGE (mime_message), (int )0);
-#line 66 "src/mn-mozilla-mailbox-backend.gob"
- g_return_val_if_fail (header_name != NULL, (int )0);
-#line 192 "mn-mozilla-mailbox-backend.c"
-{
-#line 69 "src/mn-mozilla-mailbox-backend.gob"
-
- const char *header;
-
- header = g_mime_message_get_header(mime_message, header_name);
- if (header && mn_str_ishex(header))
- return strtol(header, NULL, 16);
- else
- return 0;
- }}
-#line 204 "mn-mozilla-mailbox-backend.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-mozilla-mailbox-backend.gob.stamp b/build/src/mn-mozilla-mailbox-backend.gob.stamp
diff --git a/build/src/mn-mozilla-mailbox-backend.h b/build/src/mn-mozilla-mailbox-backend.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-base-mbox-mailbox-backend.h"
-
-#ifndef __MN_MOZILLA_MAILBOX_BACKEND_H__
-#define __MN_MOZILLA_MAILBOX_BACKEND_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_MOZILLA_MAILBOX_BACKEND (mn_mozilla_mailbox_backend_get_type())
-#define MN_MOZILLA_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mozilla_mailbox_backend_get_type(), MNMozillaMailboxBackend)
-#define MN_MOZILLA_MAILBOX_BACKEND_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mozilla_mailbox_backend_get_type(), MNMozillaMailboxBackend const)
-#define MN_MOZILLA_MAILBOX_BACKEND_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mozilla_mailbox_backend_get_type(), MNMozillaMailboxBackendClass)
-#define MN_IS_MOZILLA_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mozilla_mailbox_backend_get_type ())
-
-#define MN_MOZILLA_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mozilla_mailbox_backend_get_type(), MNMozillaMailboxBackendClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_MOZILLA_MAILBOX_BACKEND__
-#define __TYPEDEF_MN_MOZILLA_MAILBOX_BACKEND__
-typedef struct _MNMozillaMailboxBackend MNMozillaMailboxBackend;
-#endif
-struct _MNMozillaMailboxBackend {
- MNBaseMboxMailboxBackend __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNMozillaMailboxBackendClass MNMozillaMailboxBackendClass;
-struct _MNMozillaMailboxBackendClass {
- MNBaseMboxMailboxBackendClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_mozilla_mailbox_backend_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-pi-mailbox-private.h b/build/src/mn-pi-mailbox-private.h
@@ -1,59 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_PI_MAILBOX_PRIVATE_H__
-#define __MN_PI_MAILBOX_PRIVATE_H__
-
-#include "mn-pi-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 28 "src/mn-pi-mailbox.gob"
-
-#include <gtk/gtk.h>
-#include "mn-client-session.h"
-
-#define MN_PI_MAILBOX_SESSION_PRIVATE \
- MNMailbox *mailbox; \
- MNAuthenticatedMailbox *auth_mailbox; \
- MNPIMailbox *pi_mailbox; \
- MNClientSession *session
-
-#line 25 "mn-pi-mailbox-private.h"
-struct _MNPIMailboxPrivate {
-#line 85 "src/mn-pi-mailbox.gob"
- GtkWidget * untrusted_dialog;
-#line 29 "mn-pi-mailbox-private.h"
-};
-#line 156 "src/mn-pi-mailbox.gob"
-gboolean mn_pi_mailbox_split_uri (const char * uri, int maxlen, char * scheme, char * auth, char * location);
-#line 33 "mn-pi-mailbox-private.h"
-#line 173 "src/mn-pi-mailbox.gob"
-gboolean mn_pi_mailbox_split_uri_auth (const char * auth, int maxlen, char * username, char * authmech, gboolean * has_authmech);
-#line 36 "mn-pi-mailbox-private.h"
-#line 195 "src/mn-pi-mailbox.gob"
-void mn_pi_mailbox_split_uri_hostport (const char * hostport, int maxlen, char * hostname, int * port);
-#line 39 "mn-pi-mailbox-private.h"
-#line 223 "src/mn-pi-mailbox.gob"
-void mn_pi_mailbox_session_private_init (MNPIMailbox * self, MNClientSessionPrivate * priv);
-#line 42 "mn-pi-mailbox-private.h"
-#line 231 "src/mn-pi-mailbox.gob"
-gboolean mn_pi_mailbox_sasl_get_credentials_cb (MNClientSession * session, MNClientSessionPrivate * priv, const char ** username, const char ** password);
-#line 45 "mn-pi-mailbox-private.h"
-#line 264 "src/mn-pi-mailbox.gob"
-gboolean mn_pi_mailbox_ssl_trust_server_cb (MNClientSession * session, const char * server, int port, const char * fingerprint, const char * verify_error, MNClientSessionPrivate * priv);
-#line 48 "mn-pi-mailbox-private.h"
-#line 384 "src/mn-pi-mailbox.gob"
-void mn_pi_mailbox_notice_cb (MNClientSession * session, const char * message, MNClientSessionPrivate * priv);
-#line 51 "mn-pi-mailbox-private.h"
-#line 392 "src/mn-pi-mailbox.gob"
-void mn_pi_mailbox_warning_cb (MNClientSession * session, const char * message, MNClientSessionPrivate * priv);
-#line 54 "mn-pi-mailbox-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-pi-mailbox-properties-private.h b/build/src/mn-pi-mailbox-properties-private.h
@@ -1,23 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_PI_MAILBOX_PROPERTIES_PRIVATE_H__
-#define __MN_PI_MAILBOX_PROPERTIES_PRIVATE_H__
-
-#include "mn-pi-mailbox-properties.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#line 265 "src/mn-pi-mailbox-properties.gob"
-void mn_pi_mailbox_properties_get_contents (MNPIMailboxProperties * self, MNPIMailboxConnectionType * connection_type, char ** authmech, const char ** server, int * port);
-#line 15 "mn-pi-mailbox-properties-private.h"
-#line 300 "src/mn-pi-mailbox-properties.gob"
-gboolean mn_pi_mailbox_properties_is_complete (MNPIMailboxProperties * self);
-#line 18 "mn-pi-mailbox-properties-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-pi-mailbox-properties.c b/build/src/mn-pi-mailbox-properties.c
@@ -1,611 +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-pi-mailbox-properties.h"
-
-#include "mn-pi-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 26 "src/mn-pi-mailbox-properties.gob"
-
-#include <glib/gi18n.h>
-#include "mn-mailbox-properties-dialog.h"
-#include "mn-mailbox-properties-dialog-private.h"
-#include "mn-mailbox-properties-private.h"
-#include "mn-authenticated-mailbox-properties-private.h"
-#include "mn-auth-combo-box.h"
-#include "mn-util.h"
-#include "mn-stock.h"
-
-#line 37 "mn-pi-mailbox-properties.c"
-/* self casting macros */
-#define SELF(x) MN_PI_MAILBOX_PROPERTIES(x)
-#define SELF_CONST(x) MN_PI_MAILBOX_PROPERTIES_CONST(x)
-#define IS_SELF(x) MN_IS_PI_MAILBOX_PROPERTIES(x)
-#define TYPE_SELF MN_TYPE_PI_MAILBOX_PROPERTIES
-#define SELF_CLASS(x) MN_PI_MAILBOX_PROPERTIES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_PI_MAILBOX_PROPERTIES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNPIMailboxProperties Self;
-typedef MNPIMailboxPropertiesClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-#line 52 "src/mn-pi-mailbox-properties.gob"
-static void mn_pi_mailbox_properties_class_init (MNPIMailboxPropertiesClass * class) G_GNUC_UNUSED;
-#line 55 "mn-pi-mailbox-properties.c"
-#line 59 "src/mn-pi-mailbox-properties.gob"
-static void mn_pi_mailbox_properties_init (MNPIMailboxProperties * self) G_GNUC_UNUSED;
-#line 58 "mn-pi-mailbox-properties.c"
-#line 133 "src/mn-pi-mailbox-properties.gob"
-static void mn_pi_mailbox_properties_add_connection_type (MNPIMailboxProperties * self, GtkBox * type_vbox, MNPIMailboxConnectionType type, const char * mnemonic) G_GNUC_UNUSED;
-#line 61 "mn-pi-mailbox-properties.c"
-#line 164 "src/mn-pi-mailbox-properties.gob"
-static void mn_pi_mailbox_properties_add_authentication (MNPIMailboxProperties * self) G_GNUC_UNUSED;
-#line 64 "mn-pi-mailbox-properties.c"
-#line 190 "src/mn-pi-mailbox-properties.gob"
-static void mn_pi_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) G_GNUC_UNUSED;
-#line 67 "mn-pi-mailbox-properties.c"
-#line 203 "src/mn-pi-mailbox-properties.gob"
-static void ___6_mn_pi_mailbox_properties_activate (MNMailboxProperties * properties) G_GNUC_UNUSED;
-#line 70 "mn-pi-mailbox-properties.c"
-#line 214 "src/mn-pi-mailbox-properties.gob"
-static void ___7_mn_pi_mailbox_properties_deactivate (MNMailboxProperties * properties) G_GNUC_UNUSED;
-#line 73 "mn-pi-mailbox-properties.c"
-#line 222 "src/mn-pi-mailbox-properties.gob"
-static void ___8_mn_pi_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 76 "mn-pi-mailbox-properties.c"
-#line 236 "src/mn-pi-mailbox-properties.gob"
-static MNMailbox * ___9_mn_pi_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
-#line 79 "mn-pi-mailbox-properties.c"
-
-enum {
- PROP_0,
- PROP_COMPLETE
-};
-
-/* pointer to the class of our parent */
-static MNAuthenticatedMailboxPropertiesClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_add_connection_type mn_pi_mailbox_properties_add_connection_type
-#define self_add_authentication mn_pi_mailbox_properties_add_authentication
-#define self_radio_toggled_h mn_pi_mailbox_properties_radio_toggled_h
-#define self_get_contents mn_pi_mailbox_properties_get_contents
-#define self_is_complete mn_pi_mailbox_properties_is_complete
-GType
-mn_pi_mailbox_properties_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNPIMailboxPropertiesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_pi_mailbox_properties_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNPIMailboxProperties),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_pi_mailbox_properties_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES, "MNPIMailboxProperties", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNPIMailboxProperties *)g_object_new(mn_pi_mailbox_properties_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNPIMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNPIMailboxProperties *
-GET_NEW_VARG (const char *first, ...)
-{
- MNPIMailboxProperties *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNPIMailboxProperties *)g_object_new_valist (mn_pi_mailbox_properties_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::dispose"
- MNPIMailboxProperties *self G_GNUC_UNUSED = MN_PI_MAILBOX_PROPERTIES (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 40 "src/mn-pi-mailbox-properties.gob"
- if(self->connection_page) { g_object_unref ((gpointer) self->connection_page); self->connection_page = NULL; }
-#line 147 "mn-pi-mailbox-properties.c"
-#line 41 "src/mn-pi-mailbox-properties.gob"
- if(self->connection_size_group) { g_object_unref ((gpointer) self->connection_size_group); self->connection_size_group = NULL; }
-#line 150 "mn-pi-mailbox-properties.c"
-}
-#undef __GOB_FUNCTION__
-
-#line 52 "src/mn-pi-mailbox-properties.gob"
-static void
-mn_pi_mailbox_properties_class_init (MNPIMailboxPropertiesClass * class G_GNUC_UNUSED)
-{
-#line 158 "mn-pi-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
- MNMailboxPropertiesClass *mn_mailbox_properties_class = (MNMailboxPropertiesClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES);
-
-#line 203 "src/mn-pi-mailbox-properties.gob"
- mn_mailbox_properties_class->activate = ___6_mn_pi_mailbox_properties_activate;
-#line 214 "src/mn-pi-mailbox-properties.gob"
- mn_mailbox_properties_class->deactivate = ___7_mn_pi_mailbox_properties_deactivate;
-#line 222 "src/mn-pi-mailbox-properties.gob"
- mn_mailbox_properties_class->set_mailbox = ___8_mn_pi_mailbox_properties_set_mailbox;
-#line 236 "src/mn-pi-mailbox-properties.gob"
- mn_mailbox_properties_class->get_mailbox = ___9_mn_pi_mailbox_properties_get_mailbox;
-#line 173 "mn-pi-mailbox-properties.c"
- g_object_class->dispose = ___dispose;
- g_object_class->get_property = ___object_get_property;
- {
- g_object_class_override_property (g_object_class,
- PROP_COMPLETE,
- "complete");
- }
- {
-#line 53 "src/mn-pi-mailbox-properties.gob"
-
- MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
-
- p_class->stock_id = MN_STOCK_REMOTE;
-
-#line 188 "mn-pi-mailbox-properties.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 59 "src/mn-pi-mailbox-properties.gob"
-static void
-mn_pi_mailbox_properties_init (MNPIMailboxProperties * self G_GNUC_UNUSED)
-{
-#line 196 "mn-pi-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::init"
-#line 41 "src/mn-pi-mailbox-properties.gob"
- self->connection_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
-#line 200 "mn-pi-mailbox-properties.c"
- {
-#line 60 "src/mn-pi-mailbox-properties.gob"
-
- MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
- MNAuthenticatedMailboxProperties *auth = MN_AUTHENTICATED_MAILBOX_PROPERTIES(self);
- GtkWidget *hbox;
- GtkWidget *label;
- GtkWidget *type_section;
- GtkWidget *type_vbox;
- int i;
- static const struct
- {
- MNPIMailboxConnectionType type;
- const char *mnemonic;
- } connection_types[] = {
- { MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL, N_("_Standard") },
- { MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL, N_("In-_band SSL/TLS") },
- { MN_PI_MAILBOX_CONNECTION_TYPE_SSL, N_("SSL/TLS on s_eparate port") }
- };
-
- hbox = mn_authenticated_mailbox_properties_field_new(auth,
- _("_Server:"),
- &label,
- &self->server_entry);
-
- gtk_box_pack_start(GTK_BOX(auth->account_vbox), hbox, FALSE, FALSE, 0);
- 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);
-
- properties->entries = mn_g_slist_append_elements(properties->entries,
- self->server_entry,
- auth->username_entry,
- auth->password_entry,
- NULL);
-
- self->connection_page = gtk_vbox_new(FALSE, 18);
- gtk_container_set_border_width(GTK_CONTAINER(self->connection_page), 12);
- mn_mailbox_properties_dialog_set_help_section(self->connection_page, "mailbox-properties-connection");
- g_object_ref_sink(self->connection_page);
-
- /* translators: header capitalization */
- type_section = mn_hig_section_new_with_box(_("Connection Type"), NULL, &type_vbox);
- gtk_box_pack_start(GTK_BOX(self->connection_page), type_section, FALSE, FALSE, 0);
- gtk_widget_show(type_section);
-
- for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
- self_add_connection_type(self,
- GTK_BOX(type_vbox),
- connection_types[i].type,
- _(connection_types[i].mnemonic));
-
-#if ! WITH_SSL
- gtk_widget_set_sensitive(self->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL], FALSE);
- gtk_widget_set_sensitive(self->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_SSL], FALSE);
-#endif
-
- /* by default, standard is enabled */
- gtk_widget_set_sensitive(self->port_spin[MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL], FALSE);
- gtk_widget_set_sensitive(self->port_spin[MN_PI_MAILBOX_CONNECTION_TYPE_SSL], FALSE);
-
- self_add_authentication(self);
-
- gtk_widget_show_all(self->connection_page);
-
- g_object_connect(self->server_entry,
- "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
- "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
- NULL);
-
- 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);
-
-#line 275 "mn-pi-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:PI:Mailbox:Properties::get_property"
-{
- MNPIMailboxProperties *self G_GNUC_UNUSED;
-
- self = MN_PI_MAILBOX_PROPERTIES (object);
-
- switch (property_id) {
- case PROP_COMPLETE:
- {
-#line 48 "src/mn-pi-mailbox-properties.gob"
-
- g_value_set_boolean(VAL, self_is_complete(self));
-
-#line 298 "mn-pi-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 133 "src/mn-pi-mailbox-properties.gob"
-static void
-mn_pi_mailbox_properties_add_connection_type (MNPIMailboxProperties * self, GtkBox * type_vbox, MNPIMailboxConnectionType type, const char * mnemonic)
-{
-#line 319 "mn-pi-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::add_connection_type"
-#line 133 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 133 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self));
-#line 133 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (type_vbox != NULL);
-#line 133 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (mnemonic != NULL);
-#line 329 "mn-pi-mailbox-properties.c"
-{
-#line 138 "src/mn-pi-mailbox-properties.gob"
-
- GtkWidget *hbox;
- GtkWidget *port_label;
-
- self->conn_radio[type] = type == 0
- ? gtk_radio_button_new_with_mnemonic(NULL, mnemonic)
- : gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(self->conn_radio[0]), mnemonic);
-
- port_label = gtk_label_new(_("Port:"));
-
- self->port_spin[type] = gtk_spin_button_new_with_range(0, 0xFFFF, 1);
- gtk_entry_set_activates_default(GTK_ENTRY(self->port_spin[type]), TRUE);
- gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(self->port_spin[type]), TRUE);
-
- hbox = gtk_hbox_new(FALSE, 12);
- gtk_box_pack_start(GTK_BOX(hbox), self->conn_radio[type], FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), port_label, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), self->port_spin[type], FALSE, FALSE, 0);
- gtk_box_pack_start(type_vbox, hbox, FALSE, FALSE, 0);
- gtk_widget_show_all(hbox);
-
- gtk_size_group_add_widget(self->connection_size_group, self->conn_radio[type]);
-
- g_signal_connect(self->conn_radio[type], "toggled", G_CALLBACK(self_radio_toggled_h), self);
- }}
-#line 357 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 164 "src/mn-pi-mailbox-properties.gob"
-static void
-mn_pi_mailbox_properties_add_authentication (MNPIMailboxProperties * self)
-{
-#line 364 "mn-pi-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::add_authentication"
-#line 164 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 164 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self));
-#line 370 "mn-pi-mailbox-properties.c"
-{
-#line 166 "src/mn-pi-mailbox-properties.gob"
-
- GtkWidget *section;
- GtkWidget *vbox;
- GtkWidget *hbox;
- GtkWidget *label;
-
- /* translators: header capitalization */
- section = mn_hig_section_new_with_box(_("Authentication"), NULL, &vbox);
- gtk_box_pack_start(GTK_BOX(self->connection_page), section, FALSE, FALSE, 0);
-
- hbox = gtk_hbox_new(FALSE, 12);
- label = gtk_label_new_with_mnemonic(_("_Mechanism:"));
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-
- self->auth_combo = mn_auth_combo_box_new();
- gtk_label_set_mnemonic_widget(GTK_LABEL(label), self->auth_combo);
-
- gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), self->auth_combo, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
-
- gtk_size_group_add_widget(self->connection_size_group, label);
- }}
-#line 396 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 190 "src/mn-pi-mailbox-properties.gob"
-static void
-mn_pi_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data)
-{
-#line 403 "mn-pi-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::radio_toggled_h"
-#line 190 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (togglebutton != NULL);
-#line 190 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (GTK_IS_TOGGLE_BUTTON (togglebutton));
-#line 190 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (user_data != NULL);
-#line 411 "mn-pi-mailbox-properties.c"
-{
-#line 193 "src/mn-pi-mailbox-properties.gob"
-
- Self *self = user_data;
- int i;
-
- for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
- gtk_widget_set_sensitive(self->port_spin[i], GTK_WIDGET_SENSITIVE(self->conn_radio[i]) && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->conn_radio[i])));
-
- g_object_notify(G_OBJECT(self), "complete");
- }}
-#line 423 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 203 "src/mn-pi-mailbox-properties.gob"
-static void
-___6_mn_pi_mailbox_properties_activate (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 429 "mn-pi-mailbox-properties.c"
-#define PARENT_HANDLER(___properties) \
- { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->activate) \
- (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->activate)(___properties); }
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::activate"
-{
-#line 205 "src/mn-pi-mailbox-properties.gob"
-
- Self *self = SELF(properties);
-
- PARENT_HANDLER(properties);
-
- gtk_notebook_insert_page(GTK_NOTEBOOK(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->notebook), self->connection_page, NULL, 1);
- gtk_notebook_set_tab_label_text(GTK_NOTEBOOK(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->notebook), self->connection_page, _("Connection"));
- }}
-#line 445 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 214 "src/mn-pi-mailbox-properties.gob"
-static void
-___7_mn_pi_mailbox_properties_deactivate (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 452 "mn-pi-mailbox-properties.c"
-#define PARENT_HANDLER(___properties) \
- { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->deactivate) \
- (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->deactivate)(___properties); }
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::deactivate"
-{
-#line 216 "src/mn-pi-mailbox-properties.gob"
-
- PARENT_HANDLER(properties);
-
- gtk_notebook_remove_page(GTK_NOTEBOOK(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->notebook), 1);
- }}
-#line 465 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 222 "src/mn-pi-mailbox-properties.gob"
-static void
-___8_mn_pi_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 472 "mn-pi-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:PI:Mailbox:Properties::set_mailbox"
-{
-#line 224 "src/mn-pi-mailbox-properties.gob"
-
- Self *self = SELF(properties);
- MNPIMailbox *pi_mailbox = MN_PI_MAILBOX(mailbox);
-
- PARENT_HANDLER(properties, mailbox);
-
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->conn_radio[pi_mailbox->connection_type]), TRUE);
- mn_auth_combo_box_set_active_mechanism(MN_AUTH_COMBO_BOX(self->auth_combo), pi_mailbox->authmech);
- gtk_entry_set_text(GTK_ENTRY(self->server_entry), pi_mailbox->hostname);
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(self->port_spin[pi_mailbox->connection_type]), pi_mailbox->runtime_port);
- }}
-#line 491 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 236 "src/mn-pi-mailbox-properties.gob"
-static MNMailbox *
-___9_mn_pi_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 498 "mn-pi-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:PI:Mailbox:Properties::get_mailbox"
-{
-#line 238 "src/mn-pi-mailbox-properties.gob"
-
- MNMailbox *mailbox;
- MNPIMailboxConnectionType connection_type;
- char *authmech;
- const char *server;
- int port;
-
- mailbox = PARENT_HANDLER(properties);
-
- self_get_contents(SELF(properties),
- &connection_type,
- &authmech,
- &server,
- &port);
-
- g_object_set(mailbox,
- MN_PI_MAILBOX_PROP_CONNECTION_TYPE(connection_type),
- MN_PI_MAILBOX_PROP_AUTHMECH(authmech),
- MN_PI_MAILBOX_PROP_HOSTNAME((char *) server),
- MN_PI_MAILBOX_PROP_PORT(port),
- NULL);
-
- g_free(authmech);
-
- return mailbox;
- }}
-#line 533 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 265 "src/mn-pi-mailbox-properties.gob"
-void
-mn_pi_mailbox_properties_get_contents (MNPIMailboxProperties * self, MNPIMailboxConnectionType * connection_type, char ** authmech, const char ** server, int * port)
-{
-#line 541 "mn-pi-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::get_contents"
-#line 265 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (self != NULL);
-#line 265 "src/mn-pi-mailbox-properties.gob"
- g_return_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self));
-#line 547 "mn-pi-mailbox-properties.c"
-{
-#line 271 "src/mn-pi-mailbox-properties.gob"
-
- MNPIMailboxConnectionType _connection_type;
-
- if (connection_type || port)
- {
- int i;
-
- _connection_type = -1;
-
- for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->conn_radio[i])))
- {
- _connection_type = i;
- break;
- }
-
- g_assert(_connection_type != -1);
- }
-
- if (connection_type)
- *connection_type = _connection_type;
- if (authmech)
- *authmech = mn_auth_combo_box_get_active_mechanism(MN_AUTH_COMBO_BOX(self->auth_combo));
- if (server)
- *server = gtk_entry_get_text(GTK_ENTRY(self->server_entry));
- if (port)
- *port = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(self->port_spin[_connection_type]));
- }}
-#line 578 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 300 "src/mn-pi-mailbox-properties.gob"
-gboolean
-mn_pi_mailbox_properties_is_complete (MNPIMailboxProperties * self)
-{
-#line 585 "mn-pi-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::is_complete"
-#line 300 "src/mn-pi-mailbox-properties.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 300 "src/mn-pi-mailbox-properties.gob"
- g_return_val_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self), (gboolean )0);
-#line 591 "mn-pi-mailbox-properties.c"
-{
-#line 302 "src/mn-pi-mailbox-properties.gob"
-
- const char *server;
-
- if (! mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)))
- return FALSE;
-
- server = gtk_entry_get_text(GTK_ENTRY(self->server_entry));
- if (! *server)
- return FALSE;
-
-#if ! WITH_SSL
- if (! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(MN_PI_MAILBOX_PROPERTIES(self)->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL])))
- return FALSE;
-#endif /* WITH_SSL */
-
- return TRUE;
- }}
-#line 611 "mn-pi-mailbox-properties.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-pi-mailbox-properties.gob.stamp b/build/src/mn-pi-mailbox-properties.gob.stamp
diff --git a/build/src/mn-pi-mailbox-properties.h b/build/src/mn-pi-mailbox-properties.h
@@ -1,76 +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"
-#include "mn-pi-mailbox.h"
-
-#ifndef __MN_PI_MAILBOX_PROPERTIES_H__
-#define __MN_PI_MAILBOX_PROPERTIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_PI_MAILBOX_PROPERTIES (mn_pi_mailbox_properties_get_type())
-#define MN_PI_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_pi_mailbox_properties_get_type(), MNPIMailboxProperties)
-#define MN_PI_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_pi_mailbox_properties_get_type(), MNPIMailboxProperties const)
-#define MN_PI_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_pi_mailbox_properties_get_type(), MNPIMailboxPropertiesClass)
-#define MN_IS_PI_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_pi_mailbox_properties_get_type ())
-
-#define MN_PI_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_pi_mailbox_properties_get_type(), MNPIMailboxPropertiesClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_PI_MAILBOX_PROPERTIES__
-#define __TYPEDEF_MN_PI_MAILBOX_PROPERTIES__
-typedef struct _MNPIMailboxProperties MNPIMailboxProperties;
-#endif
-struct _MNPIMailboxProperties {
- MNAuthenticatedMailboxProperties __parent__;
- /*< private >*/
- GtkWidget * server_entry; /* protected */
- GtkWidget * connection_page; /* protected */
- GtkSizeGroup * connection_size_group; /* protected */
- GtkWidget * conn_radio[MN_PI_MAILBOX_N_CONNECTION_TYPES]; /* protected */
- GtkWidget * port_spin[MN_PI_MAILBOX_N_CONNECTION_TYPES]; /* protected */
- GtkWidget * auth_combo; /* protected */
-};
-
-/*
- * Class definition
- */
-typedef struct _MNPIMailboxPropertiesClass MNPIMailboxPropertiesClass;
-struct _MNPIMailboxPropertiesClass {
- MNAuthenticatedMailboxPropertiesClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_pi_mailbox_properties_get_type (void) G_GNUC_CONST;
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_PI_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_PI_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-pi-mailbox.c b/build/src/mn-pi-mailbox.c
@@ -1,795 +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-pi-mailbox.h"
-
-#include "mn-pi-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 39 "src/mn-pi-mailbox.gob"
-
-#include <glib/gi18n.h>
-#include "mn-authenticated-mailbox-private.h"
-#include "mn-mailbox-private.h"
-#include "mn-util.h"
-#include "mn-stock.h"
-#include "mn-conf.h"
-
-struct _MNClientSessionPrivate
-{
- MN_PI_MAILBOX_SESSION_PRIVATE;
-};
-
-#line 40 "mn-pi-mailbox.c"
-static const GEnumValue _mn_pi_mailbox_connection_type_values[] = {
- { MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL, (char *)"MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL", (char *)"normal" },
- { MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL, (char *)"MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL", (char *)"inband-ssl" },
- { MN_PI_MAILBOX_CONNECTION_TYPE_SSL, (char *)"MN_PI_MAILBOX_CONNECTION_TYPE_SSL", (char *)"ssl" },
- { 0, NULL, NULL }
-};
-
-GType
-mn_pi_mailbox_connection_type_get_type (void)
-{
- static GType type = 0;
- if ___GOB_UNLIKELY(type == 0)
- type = g_enum_register_static ("MNPIMailboxConnectionType", _mn_pi_mailbox_connection_type_values);
- return type;
-}
-
-/* self casting macros */
-#define SELF(x) MN_PI_MAILBOX(x)
-#define SELF_CONST(x) MN_PI_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_PI_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_PI_MAILBOX
-#define SELF_CLASS(x) MN_PI_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_PI_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNPIMailbox Self;
-typedef MNPIMailboxClass 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 87 "src/mn-pi-mailbox.gob"
-static void mn_pi_mailbox_class_init (MNPIMailboxClass * class) G_GNUC_UNUSED;
-#line 75 "mn-pi-mailbox.c"
-#line 96 "src/mn-pi-mailbox.gob"
-static void mn_pi_mailbox_init (MNPIMailbox * self) G_GNUC_UNUSED;
-#line 78 "mn-pi-mailbox.c"
-#line 101 "src/mn-pi-mailbox.gob"
-static void ___3_mn_pi_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 81 "mn-pi-mailbox.c"
-#line 121 "src/mn-pi-mailbox.gob"
-static void ___4_mn_pi_mailbox_removed (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 84 "mn-pi-mailbox.c"
-#line 132 "src/mn-pi-mailbox.gob"
-static void ___5_mn_pi_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
-#line 87 "mn-pi-mailbox.c"
-#line 324 "src/mn-pi-mailbox.gob"
-static gboolean mn_pi_mailbox_run_untrusted_dialog (MNPIMailbox * self, const char * server, const char * reason, const char * cert_fingerprint) G_GNUC_UNUSED;
-#line 90 "mn-pi-mailbox.c"
-
-enum {
- PROP_0,
- PROP_CONNECTION_TYPE,
- PROP_AUTHMECH,
- PROP_HOSTNAME,
- PROP_PORT
-};
-
-/* pointer to the class of our parent */
-static MNAuthenticatedMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_split_uri mn_pi_mailbox_split_uri
-#define self_split_uri_auth mn_pi_mailbox_split_uri_auth
-#define self_split_uri_hostport mn_pi_mailbox_split_uri_hostport
-#define self_session_private_init mn_pi_mailbox_session_private_init
-#define self_sasl_get_credentials_cb mn_pi_mailbox_sasl_get_credentials_cb
-#define self_ssl_trust_server_cb mn_pi_mailbox_ssl_trust_server_cb
-#define self_run_untrusted_dialog mn_pi_mailbox_run_untrusted_dialog
-#define self_notice_cb mn_pi_mailbox_notice_cb
-#define self_warning_cb mn_pi_mailbox_warning_cb
-GType
-mn_pi_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNPIMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_pi_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNPIMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_pi_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_AUTHENTICATED_MAILBOX, "MNPIMailbox", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNPIMailbox *)g_object_new(mn_pi_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNPIMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNPIMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNPIMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNPIMailbox *)g_object_new_valist (mn_pi_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::finalize"
- MNPIMailbox *self G_GNUC_UNUSED = MN_PI_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 70 "src/mn-pi-mailbox.gob"
- if(self->authmech) { g_free ((gpointer) self->authmech); self->authmech = NULL; }
-#line 166 "mn-pi-mailbox.c"
-#line 74 "src/mn-pi-mailbox.gob"
- if(self->hostname) { g_free ((gpointer) self->hostname); self->hostname = NULL; }
-#line 169 "mn-pi-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-
-#line 87 "src/mn-pi-mailbox.gob"
-static void
-mn_pi_mailbox_class_init (MNPIMailboxClass * class G_GNUC_UNUSED)
-{
-#line 177 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI: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(MNPIMailboxPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX);
-
-#line 101 "src/mn-pi-mailbox.gob"
- mn_mailbox_class->seal = ___3_mn_pi_mailbox_seal;
-#line 121 "src/mn-pi-mailbox.gob"
- mn_mailbox_class->removed = ___4_mn_pi_mailbox_removed;
-#line 132 "src/mn-pi-mailbox.gob"
- mn_authenticated_mailbox_class->authenticated_check = ___5_mn_pi_mailbox_authenticated_check;
-#line 193 "mn-pi-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_enum
- ("connection_type" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- MN_TYPE_PI_MAILBOX_CONNECTION_TYPE /* enum_type */,
- MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (g_object_class,
- PROP_CONNECTION_TYPE,
- param_spec);
- param_spec = g_param_spec_string
- ("authmech" /* 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_AUTHMECH,
- param_spec);
- param_spec = g_param_spec_string
- ("hostname" /* 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_HOSTNAME,
- param_spec);
- param_spec = g_param_spec_int
- ("port" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- 0 /* minimum */,
- 65535 /* maximum */,
- 0 /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
- g_object_class_install_property (g_object_class,
- PROP_PORT,
- param_spec);
- }
- {
-#line 88 "src/mn-pi-mailbox.gob"
-
- /*
- * 5 minutes is a good default check delay for remote POP3/IMAP
- * mailboxes.
- */
- MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
-
-#line 249 "mn-pi-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 96 "src/mn-pi-mailbox.gob"
-static void
-mn_pi_mailbox_init (MNPIMailbox * self G_GNUC_UNUSED)
-{
-#line 257 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_PI_MAILBOX,MNPIMailboxPrivate);
- {
-#line 97 "src/mn-pi-mailbox.gob"
-
- mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_REMOTE);
-
-#line 265 "mn-pi-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:PI:Mailbox::set_property"
-{
- MNPIMailbox *self G_GNUC_UNUSED;
-
- self = MN_PI_MAILBOX (object);
-
- switch (property_id) {
- case PROP_CONNECTION_TYPE:
- {
-#line 65 "src/mn-pi-mailbox.gob"
-self->connection_type = g_value_get_enum (VAL);
-#line 286 "mn-pi-mailbox.c"
- }
- break;
- case PROP_AUTHMECH:
- {
-#line 71 "src/mn-pi-mailbox.gob"
-{ char *old = self->authmech; self->authmech = g_value_dup_string (VAL); g_free (old); }
-#line 293 "mn-pi-mailbox.c"
- }
- break;
- case PROP_HOSTNAME:
- {
-#line 75 "src/mn-pi-mailbox.gob"
-{ char *old = self->hostname; self->hostname = g_value_dup_string (VAL); g_free (old); }
-#line 300 "mn-pi-mailbox.c"
- }
- break;
- case PROP_PORT:
- {
-#line 78 "src/mn-pi-mailbox.gob"
-self->port = g_value_get_int (VAL);
-#line 307 "mn-pi-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:PI:Mailbox::get_property"
-{
- MNPIMailbox *self G_GNUC_UNUSED;
-
- self = MN_PI_MAILBOX (object);
-
- switch (property_id) {
- case PROP_CONNECTION_TYPE:
- {
-#line 65 "src/mn-pi-mailbox.gob"
-g_value_set_enum (VAL, self->connection_type);
-#line 338 "mn-pi-mailbox.c"
- }
- break;
- case PROP_AUTHMECH:
- {
-#line 71 "src/mn-pi-mailbox.gob"
-g_value_set_string (VAL, self->authmech);
-#line 345 "mn-pi-mailbox.c"
- }
- break;
- case PROP_HOSTNAME:
- {
-#line 75 "src/mn-pi-mailbox.gob"
-g_value_set_string (VAL, self->hostname);
-#line 352 "mn-pi-mailbox.c"
- }
- break;
- case PROP_PORT:
- {
-#line 78 "src/mn-pi-mailbox.gob"
-g_value_set_int (VAL, self->port);
-#line 359 "mn-pi-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 101 "src/mn-pi-mailbox.gob"
-static void
-___3_mn_pi_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 379 "mn-pi-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->seal) \
- (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::seal"
-{
-#line 103 "src/mn-pi-mailbox.gob"
-
- MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
- Self *self = SELF(mailbox);
-
- PARENT_HANDLER(mailbox);
-
- /* do not save default port to mailboxes.xml */
- if (self->port == SELF_GET_CLASS(self)->default_ports[self->connection_type])
- self->port = 0;
-
- self->runtime_port = self->port == 0
- ? SELF_GET_CLASS(self)->default_ports[self->connection_type]
- : self->port;
-
- auth_mailbox->keyring_server = g_strdup(self->hostname);
- auth_mailbox->keyring_port = self->runtime_port;
- }}
-#line 404 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 121 "src/mn-pi-mailbox.gob"
-static void
-___4_mn_pi_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 411 "mn-pi-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->removed) \
- (* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::removed"
-{
-#line 123 "src/mn-pi-mailbox.gob"
-
- Self *self = SELF(mailbox);
-
- PARENT_HANDLER(mailbox);
-
- if (selfp->untrusted_dialog)
- gtk_dialog_response(GTK_DIALOG(selfp->untrusted_dialog), GTK_RESPONSE_CANCEL);
- }}
-#line 427 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 132 "src/mn-pi-mailbox.gob"
-static void
-___5_mn_pi_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
-#line 434 "mn-pi-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:PI:Mailbox::authenticated_check"
-{
-#line 134 "src/mn-pi-mailbox.gob"
-
-#if ! WITH_SSL
- Self *self = SELF(mailbox);
-#endif
-
- PARENT_HANDLER(mailbox);
-
-#if ! WITH_SSL
- if (self->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL
- || self->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL)
- {
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_error(MN_MAILBOX(mailbox), _("SSL/TLS support has not been compiled in"));
- mn_mailbox_set_poll(MN_MAILBOX(mailbox), FALSE); /* disable the mailbox */
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
-#endif
- }}
-#line 463 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 156 "src/mn-pi-mailbox.gob"
-gboolean
-mn_pi_mailbox_split_uri (const char * uri, int maxlen, char * scheme, char * auth, char * location)
-{
-#line 471 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::split_uri"
-#line 156 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 156 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (scheme != NULL, (gboolean )0);
-#line 156 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (auth != NULL, (gboolean )0);
-#line 156 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (location != NULL, (gboolean )0);
-#line 481 "mn-pi-mailbox.c"
-{
-#line 162 "src/mn-pi-mailbox.gob"
-
- char *pat;
- int n;
-
- pat = g_strdup_printf("%%%i[^:]://%%%i[^@]@%%%is", maxlen, maxlen, maxlen);
- n = sscanf(uri, pat, scheme, auth, location);
- g_free(pat);
-
- return n == 3; /* MN requires an username, hence the auth part */
- }}
-#line 494 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 173 "src/mn-pi-mailbox.gob"
-gboolean
-mn_pi_mailbox_split_uri_auth (const char * auth, int maxlen, char * username, char * authmech, gboolean * has_authmech)
-{
-#line 501 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::split_uri_auth"
-#line 173 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (auth != NULL, (gboolean )0);
-#line 173 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (username != NULL, (gboolean )0);
-#line 173 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (authmech != NULL, (gboolean )0);
-#line 173 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (has_authmech != NULL, (gboolean )0);
-#line 511 "mn-pi-mailbox.c"
-{
-#line 179 "src/mn-pi-mailbox.gob"
-
- char *pat;
- int n;
-
- pat = g_strdup_printf("%%%i[^;];AUTH=%%%is", maxlen, maxlen);
- n = sscanf(auth, pat, username, authmech);
- g_free(pat);
-
- if (n < 1)
- return FALSE; /* MN requires an username */
-
- *has_authmech = n == 2;
-
- return TRUE;
- }}
-#line 529 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 195 "src/mn-pi-mailbox.gob"
-void
-mn_pi_mailbox_split_uri_hostport (const char * hostport, int maxlen, char * hostname, int * port)
-{
-#line 536 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::split_uri_hostport"
-#line 195 "src/mn-pi-mailbox.gob"
- g_return_if_fail (hostport != NULL);
-#line 195 "src/mn-pi-mailbox.gob"
- g_return_if_fail (hostname != NULL);
-#line 195 "src/mn-pi-mailbox.gob"
- g_return_if_fail (port != NULL);
-#line 544 "mn-pi-mailbox.c"
-{
-#line 200 "src/mn-pi-mailbox.gob"
-
- char *pat;
- int n;
-
- /* split host:port part in 2 subparts: host and port */
-
- pat = g_strdup_printf("[%%%i[^]]]:%%u", maxlen);
- n = sscanf(hostport, pat, hostname, port);
- g_free(pat);
-
- if (n < 1)
- {
- pat = g_strdup_printf("%%%i[^:]:%%u", maxlen);
- n = sscanf(hostport, pat, hostname, port);
- g_free(pat);
- }
-
- g_assert(n >= 1);
-
- if (n < 2)
- *port = 0;
- }}
-#line 569 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 223 "src/mn-pi-mailbox.gob"
-void
-mn_pi_mailbox_session_private_init (MNPIMailbox * self, MNClientSessionPrivate * priv)
-{
-#line 576 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::session_private_init"
-#line 223 "src/mn-pi-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 223 "src/mn-pi-mailbox.gob"
- g_return_if_fail (MN_IS_PI_MAILBOX (self));
-#line 223 "src/mn-pi-mailbox.gob"
- g_return_if_fail (priv != NULL);
-#line 584 "mn-pi-mailbox.c"
-{
-#line 225 "src/mn-pi-mailbox.gob"
-
- priv->mailbox = MN_MAILBOX(self);
- priv->auth_mailbox = MN_AUTHENTICATED_MAILBOX(self);
- priv->pi_mailbox = MN_PI_MAILBOX(self);
- }}
-#line 592 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 231 "src/mn-pi-mailbox.gob"
-gboolean
-mn_pi_mailbox_sasl_get_credentials_cb (MNClientSession * session, MNClientSessionPrivate * priv, const char ** username, const char ** password)
-{
-#line 599 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::sasl_get_credentials_cb"
-{
-#line 236 "src/mn-pi-mailbox.gob"
-
-#if WITH_SASL
- g_return_val_if_fail(username != NULL || password != NULL, FALSE);
-
- if (username)
- *username = priv->auth_mailbox->username;
-
- if (password)
- {
- if (mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
- *password = priv->auth_mailbox->runtime_password;
- else
- return FALSE;
- }
- else
- /*
- * Reset auth_cancelled ourselves since we did not call
- * mn_authenticated_mailbox_fill_password().
- */
- priv->auth_mailbox->auth_cancelled = FALSE;
-
- return TRUE;
-#else
- g_assert_not_reached();
- return FALSE;
-#endif /* WITH_SASL */
- }}
-#line 630 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 264 "src/mn-pi-mailbox.gob"
-gboolean
-mn_pi_mailbox_ssl_trust_server_cb (MNClientSession * session, const char * server, int port, const char * fingerprint, const char * verify_error, MNClientSessionPrivate * priv)
-{
-#line 637 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::ssl_trust_server_cb"
-{
-#line 271 "src/mn-pi-mailbox.gob"
-
-#if WITH_SSL
- gboolean status = FALSE;
-
- if (fingerprint)
- {
- GSList *gconf_fingerprints;
-
- gconf_fingerprints = mn_conf_get_string_list(MN_CONF_TRUSTED_X509_CERTIFICATES);
-
- if (mn_g_str_slist_find(gconf_fingerprints, fingerprint))
- status = TRUE;
- else
- if (self_run_untrusted_dialog(priv->pi_mailbox, server, verify_error, fingerprint))
- {
- status = TRUE;
- gconf_fingerprints = g_slist_append(gconf_fingerprints, g_strdup(fingerprint));
- mn_conf_set_string_list(MN_CONF_TRUSTED_X509_CERTIFICATES, gconf_fingerprints);
- }
-
- mn_g_slist_free_deep(gconf_fingerprints);
- }
- else
- {
- char *key;
- GSList *gconf_servers = NULL;
-
- key = g_strdup_printf("%s:%i", server, port);
- gconf_servers = mn_conf_get_string_list(MN_CONF_TRUSTED_SERVERS);
-
- if (mn_g_str_slist_find(gconf_servers, key))
- status = TRUE;
- else
- {
- if (self_run_untrusted_dialog(priv->pi_mailbox, server, _("missing certificate"), NULL))
- {
- status = TRUE;
- gconf_servers = g_slist_append(gconf_servers, g_strdup(key));
- mn_conf_set_string_list(MN_CONF_TRUSTED_SERVERS, gconf_servers);
- }
- }
-
- g_free(key);
- mn_g_slist_free_deep(gconf_servers);
- }
-
- return status;
-#else
- g_assert_not_reached();
- return FALSE;
-#endif /* WITH_SSL */
- }}
-#line 693 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 324 "src/mn-pi-mailbox.gob"
-static gboolean
-mn_pi_mailbox_run_untrusted_dialog (MNPIMailbox * self, const char * server, const char * reason, const char * cert_fingerprint)
-{
-#line 700 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::run_untrusted_dialog"
-#line 324 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 324 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (MN_IS_PI_MAILBOX (self), (gboolean )0);
-#line 324 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (server != NULL, (gboolean )0);
-#line 324 "src/mn-pi-mailbox.gob"
- g_return_val_if_fail (reason != NULL, (gboolean )0);
-#line 710 "mn-pi-mailbox.c"
-{
-#line 329 "src/mn-pi-mailbox.gob"
-
-#if WITH_SSL
- GString *secondary;
- gboolean status;
-
- g_return_val_if_fail(server != NULL, FALSE);
- g_return_val_if_fail(reason != NULL, FALSE);
-
- secondary = g_string_new(NULL);
- g_string_printf(secondary,
- _("Mail Notification was unable to trust \"%s\" "
- "(%s). It is possible that someone is "
- "intercepting your communication to obtain "
- "your confidential information.\n"
- "\n"
- "You should only connect to the server if you "
- "are certain you are connected to \"%s\". "
- "If you choose to connect to the server, this "
- "message will not be shown again."),
- server, reason, server);
-
- if (cert_fingerprint)
- {
- g_string_append(secondary, "\n\n");
- g_string_append_printf(secondary, _("Certificate fingerprint: %s."), cert_fingerprint);
- }
-
- GDK_THREADS_ENTER();
-
- selfp->untrusted_dialog = mn_alert_dialog_new(NULL,
- GTK_MESSAGE_WARNING, 0,
- _("Connect to untrusted server?"),
- secondary->str);
- g_string_free(secondary, TRUE);
-
- mn_add_weak_pointer(&selfp->untrusted_dialog);
-
- gtk_dialog_add_buttons(GTK_DIALOG(selfp->untrusted_dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_CONNECT, GTK_RESPONSE_OK,
- NULL);
-
- status = mn_dialog_run_nonmodal(GTK_DIALOG(selfp->untrusted_dialog)) == GTK_RESPONSE_OK;
- gtk_widget_destroy(selfp->untrusted_dialog);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- return status;
-#else
- g_assert_not_reached();
- return FALSE;
-#endif /* WITH_SSL */
- }}
-#line 767 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 384 "src/mn-pi-mailbox.gob"
-void
-mn_pi_mailbox_notice_cb (MNClientSession * session, const char * message, MNClientSessionPrivate * priv)
-{
-#line 774 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::notice_cb"
-{
-#line 388 "src/mn-pi-mailbox.gob"
-
- mn_mailbox_notice(priv->mailbox, "%s", message);
- }}
-#line 781 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 392 "src/mn-pi-mailbox.gob"
-void
-mn_pi_mailbox_warning_cb (MNClientSession * session, const char * message, MNClientSessionPrivate * priv)
-{
-#line 788 "mn-pi-mailbox.c"
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::warning_cb"
-{
-#line 396 "src/mn-pi-mailbox.gob"
-
- mn_mailbox_warning(priv->mailbox, "%s", message);
- }}
-#line 795 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-pi-mailbox.gob.stamp b/build/src/mn-pi-mailbox.gob.stamp
diff --git a/build/src/mn-pi-mailbox.h b/build/src/mn-pi-mailbox.h
@@ -1,106 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-authenticated-mailbox.h"
-
-#ifndef __MN_PI_MAILBOX_H__
-#define __MN_PI_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-#define MN_PI_MAILBOX_N_CONNECTION_TYPES 3
-
-
-typedef enum {
- MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL,
- MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL,
- MN_PI_MAILBOX_CONNECTION_TYPE_SSL
-} MNPIMailboxConnectionType;
-#define MN_TYPE_PI_MAILBOX_CONNECTION_TYPE mn_pi_mailbox_connection_type_get_type()
-GType mn_pi_mailbox_connection_type_get_type (void) G_GNUC_CONST;
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_PI_MAILBOX (mn_pi_mailbox_get_type())
-#define MN_PI_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_pi_mailbox_get_type(), MNPIMailbox)
-#define MN_PI_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_pi_mailbox_get_type(), MNPIMailbox const)
-#define MN_PI_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_pi_mailbox_get_type(), MNPIMailboxClass)
-#define MN_IS_PI_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_pi_mailbox_get_type ())
-
-#define MN_PI_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_pi_mailbox_get_type(), MNPIMailboxClass)
-
-/* Private structure type */
-typedef struct _MNPIMailboxPrivate MNPIMailboxPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_PI_MAILBOX__
-#define __TYPEDEF_MN_PI_MAILBOX__
-typedef struct _MNPIMailbox MNPIMailbox;
-#endif
-struct _MNPIMailbox {
- MNAuthenticatedMailbox __parent__;
- /*< public >*/
- MNPIMailboxConnectionType connection_type;
- char * authmech;
- char * hostname;
- int port;
- int runtime_port;
- /*< private >*/
- MNPIMailboxPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNPIMailboxClass MNPIMailboxClass;
-struct _MNPIMailboxClass {
- MNAuthenticatedMailboxClass __parent__;
- int * default_ports;
-};
-
-
-/*
- * Public methods
- */
-GType mn_pi_mailbox_get_type (void) G_GNUC_CONST;
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_PI_MAILBOX_PROP_CONNECTION_TYPE(arg) "connection_type", __extension__ ({gint z = (arg); z;})
-#define MN_PI_MAILBOX_GET_PROP_CONNECTION_TYPE(arg) "connection_type", __extension__ ({gint *z = (arg); z;})
-#define MN_PI_MAILBOX_PROP_AUTHMECH(arg) "authmech", __extension__ ({gchar *z = (arg); z;})
-#define MN_PI_MAILBOX_GET_PROP_AUTHMECH(arg) "authmech", __extension__ ({gchar **z = (arg); z;})
-#define MN_PI_MAILBOX_PROP_HOSTNAME(arg) "hostname", __extension__ ({gchar *z = (arg); z;})
-#define MN_PI_MAILBOX_GET_PROP_HOSTNAME(arg) "hostname", __extension__ ({gchar **z = (arg); z;})
-#define MN_PI_MAILBOX_PROP_PORT(arg) "port", __extension__ ({gint z = (arg); z;})
-#define MN_PI_MAILBOX_GET_PROP_PORT(arg) "port", __extension__ ({gint *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_PI_MAILBOX_PROP_CONNECTION_TYPE(arg) "connection_type",(gint )(arg)
-#define MN_PI_MAILBOX_GET_PROP_CONNECTION_TYPE(arg) "connection_type",(gint *)(arg)
-#define MN_PI_MAILBOX_PROP_AUTHMECH(arg) "authmech",(gchar *)(arg)
-#define MN_PI_MAILBOX_GET_PROP_AUTHMECH(arg) "authmech",(gchar **)(arg)
-#define MN_PI_MAILBOX_PROP_HOSTNAME(arg) "hostname",(gchar *)(arg)
-#define MN_PI_MAILBOX_GET_PROP_HOSTNAME(arg) "hostname",(gchar **)(arg)
-#define MN_PI_MAILBOX_PROP_PORT(arg) "port",(gint )(arg)
-#define MN_PI_MAILBOX_GET_PROP_PORT(arg) "port",(gint *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-pop3-mailbox-private.h b/build/src/mn-pop3-mailbox-private.h
@@ -1,24 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_POP3_MAILBOX_PRIVATE_H__
-#define __MN_POP3_MAILBOX_PRIVATE_H__
-
-#include "mn-pop3-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNPOP3MailboxPrivate {
-#line 138 "src/mn-pop3-mailbox.gob"
- int login_delay;
-#line 139 "src/mn-pop3-mailbox.gob"
- GTimer * authentication_timer;
-#line 18 "mn-pop3-mailbox-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-pop3-mailbox-properties-private.h b/build/src/mn-pop3-mailbox-properties-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_POP3_MAILBOX_PROPERTIES_PRIVATE_H__
-#define __MN_POP3_MAILBOX_PROPERTIES_PRIVATE_H__
-
-#include "mn-pop3-mailbox-properties.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-pop3-mailbox-properties.c b/build/src/mn-pop3-mailbox-properties.c
@@ -1,205 +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-pop3-mailbox-properties.h"
-
-#include "mn-pop3-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 24 "src/mn-pop3-mailbox-properties.gob"
-
-#include <glib/gi18n.h>
-#include "mn-mailbox-properties.h"
-#include "mn-auth-combo-box.h"
-#include "mn-util.h"
-#include "mn-authenticated-mailbox-properties-private.h"
-#include "mn-pi-mailbox-properties-private.h"
-#include "mn-properties-dialog.h"
-#include "mn-pop3-mailbox.h"
-
-#line 37 "mn-pop3-mailbox-properties.c"
-/* self casting macros */
-#define SELF(x) MN_POP3_MAILBOX_PROPERTIES(x)
-#define SELF_CONST(x) MN_POP3_MAILBOX_PROPERTIES_CONST(x)
-#define IS_SELF(x) MN_IS_POP3_MAILBOX_PROPERTIES(x)
-#define TYPE_SELF MN_TYPE_POP3_MAILBOX_PROPERTIES
-#define SELF_CLASS(x) MN_POP3_MAILBOX_PROPERTIES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_POP3_MAILBOX_PROPERTIES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNPOP3MailboxProperties Self;
-typedef MNPOP3MailboxPropertiesClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-#line 55 "src/mn-pop3-mailbox-properties.gob"
-static void mn_pop3_mailbox_properties_class_init (MNPOP3MailboxPropertiesClass * class) G_GNUC_UNUSED;
-#line 55 "mn-pop3-mailbox-properties.c"
-#line 63 "src/mn-pop3-mailbox-properties.gob"
-static void mn_pop3_mailbox_properties_init (MNPOP3MailboxProperties * self) G_GNUC_UNUSED;
-#line 58 "mn-pop3-mailbox-properties.c"
-
-enum {
- PROP_0,
- PROP_DEFAULT_NAME
-};
-
-/* pointer to the class of our parent */
-static MNPIMailboxPropertiesClass *parent_class = NULL;
-
-GType
-mn_pop3_mailbox_properties_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNPOP3MailboxPropertiesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_pop3_mailbox_properties_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNPOP3MailboxProperties),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_pop3_mailbox_properties_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_PI_MAILBOX_PROPERTIES, "MNPOP3MailboxProperties", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNPOP3MailboxProperties *)g_object_new(mn_pop3_mailbox_properties_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNPOP3MailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNPOP3MailboxProperties *
-GET_NEW_VARG (const char *first, ...)
-{
- MNPOP3MailboxProperties *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNPOP3MailboxProperties *)g_object_new_valist (mn_pop3_mailbox_properties_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-#line 55 "src/mn-pop3-mailbox-properties.gob"
-static void
-mn_pop3_mailbox_properties_class_init (MNPOP3MailboxPropertiesClass * class G_GNUC_UNUSED)
-{
-#line 114 "mn-pop3-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox:Properties::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
-
- parent_class = g_type_class_ref (MN_TYPE_PI_MAILBOX_PROPERTIES);
-
- g_object_class->get_property = ___object_get_property;
- {
- g_object_class_override_property (g_object_class,
- PROP_DEFAULT_NAME,
- "default_name");
- }
- {
-#line 56 "src/mn-pop3-mailbox-properties.gob"
-
- MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
-
- p_class->type = "pop3";
- p_class->combo_label = "POP3";
-
-#line 134 "mn-pop3-mailbox-properties.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 63 "src/mn-pop3-mailbox-properties.gob"
-static void
-mn_pop3_mailbox_properties_init (MNPOP3MailboxProperties * self G_GNUC_UNUSED)
-{
-#line 142 "mn-pop3-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox:Properties::init"
- {
-#line 64 "src/mn-pop3-mailbox-properties.gob"
-
- MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
- int i;
-
- mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+APOP", "APOP");
- mn_auth_combo_box_append(MN_AUTH_COMBO_BOX(pi->auth_combo), "+USERPASS", "USER/PASS");
-
- for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(pi->port_spin[i]), mn_pop3_mailbox_default_ports[i]);
-
-#line 156 "mn-pop3-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:POP3:Mailbox:Properties::get_property"
-{
- MNPOP3MailboxProperties *self G_GNUC_UNUSED;
-
- self = MN_POP3_MAILBOX_PROPERTIES (object);
-
- switch (property_id) {
- case PROP_DEFAULT_NAME:
- {
-#line 39 "src/mn-pop3-mailbox-properties.gob"
-
- const char *username;
- const char *server;
-
- mn_authenticated_mailbox_properties_get_contents(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self),
- &username,
- NULL);
- mn_pi_mailbox_properties_get_contents(MN_PI_MAILBOX_PROPERTIES(self),
- NULL,
- NULL,
- &server,
- NULL);
-
- g_value_take_string(VAL, mn_pop3_mailbox_build_name(username, server));
-
-#line 191 "mn-pop3-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__
-
-
diff --git a/build/src/mn-pop3-mailbox-properties.gob.stamp b/build/src/mn-pop3-mailbox-properties.gob.stamp
diff --git a/build/src/mn-pop3-mailbox-properties.h b/build/src/mn-pop3-mailbox-properties.h
@@ -1,67 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-pi-mailbox-properties.h"
-
-#ifndef __MN_POP3_MAILBOX_PROPERTIES_H__
-#define __MN_POP3_MAILBOX_PROPERTIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_POP3_MAILBOX_PROPERTIES (mn_pop3_mailbox_properties_get_type())
-#define MN_POP3_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_pop3_mailbox_properties_get_type(), MNPOP3MailboxProperties)
-#define MN_POP3_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_pop3_mailbox_properties_get_type(), MNPOP3MailboxProperties const)
-#define MN_POP3_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_pop3_mailbox_properties_get_type(), MNPOP3MailboxPropertiesClass)
-#define MN_IS_POP3_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_pop3_mailbox_properties_get_type ())
-
-#define MN_POP3_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_pop3_mailbox_properties_get_type(), MNPOP3MailboxPropertiesClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_POP3_MAILBOX_PROPERTIES__
-#define __TYPEDEF_MN_POP3_MAILBOX_PROPERTIES__
-typedef struct _MNPOP3MailboxProperties MNPOP3MailboxProperties;
-#endif
-struct _MNPOP3MailboxProperties {
- MNPIMailboxProperties __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNPOP3MailboxPropertiesClass MNPOP3MailboxPropertiesClass;
-struct _MNPOP3MailboxPropertiesClass {
- MNPIMailboxPropertiesClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_pop3_mailbox_properties_get_type (void) G_GNUC_CONST;
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_POP3_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_POP3_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-pop3-mailbox.c b/build/src/mn-pop3-mailbox.c
@@ -1,1855 +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-pop3-mailbox.h"
-
-#include "mn-pop3-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 38 "src/mn-pop3-mailbox.gob"
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#if WITH_SASL
-#include <sasl/saslutil.h>
-#endif /* WITH_SASL */
-#include "mn-mailbox-private.h"
-#include "mn-authenticated-mailbox-private.h"
-#include "mn-pi-mailbox-private.h"
-#include "mn-client-session.h"
-#include "mn-util.h"
-#include "mn-md5.h"
-#include "mn-message-mime.h"
-
-enum
-{
- STATE_GREETING = MN_CLIENT_SESSION_INITIAL_STATE,
- STATE_CAPA,
-#if WITH_SSL
- STATE_STLS,
-#endif
-#if WITH_SASL
- STATE_AUTH,
-#endif
- STATE_APOP,
- STATE_USER,
- STATE_PASS,
- STATE_LIST,
- STATE_UIDL,
- STATE_RETR_TOP,
- STATE_QUIT
-};
-
-struct _MNClientSessionPrivate
-{
- MN_PI_MAILBOX_SESSION_PRIVATE;
- MNPOP3Mailbox *self;
-
- gboolean in_list;
- gboolean in_retr_top;
-
- char *apop_timestamp;
- GSList *auth_mechanisms;
-
- gboolean top_supported;
- gboolean uidl_supported;
-
-#if WITH_SSL
- gboolean stls_supported;
- gboolean stls_completed;
-#endif
-
-#if WITH_SASL
- GSList *sasl_remaining_mechanisms;
- const char *sasl_mechanism;
- gboolean sasl_had_clientout;
-#endif
-
- gboolean authenticated;
-
- gboolean login_delay_user;
-
- int num_errors;
- GSList *messages;
- GSList *message_iter;
- GString *message_buffer;
-};
-
-typedef enum
-{
- RESPONSE_OK,
- RESPONSE_ERR,
- RESPONSE_LIST_ITEM,
- RESPONSE_LIST_END,
- RESPONSE_CONTINUATION
-} ResponseType;
-
-struct _MNClientSessionResponse
-{
- ResponseType type;
- char *arguments;
-};
-
-typedef struct
-{
- MNMessage *message;
- char *mid;
- int number;
-} MessageInfo;
-
-int mn_pop3_mailbox_default_ports[MN_PI_MAILBOX_N_CONNECTION_TYPES] = { 110, 110, 995 };
-
-#line 122 "mn-pop3-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_POP3_MAILBOX(x)
-#define SELF_CONST(x) MN_POP3_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_POP3_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_POP3_MAILBOX
-#define SELF_CLASS(x) MN_POP3_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_POP3_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNPOP3Mailbox Self;
-typedef MNPOP3MailboxClass SelfClass;
-
-/* here are local prototypes */
-#line 141 "src/mn-pop3-mailbox.gob"
-static void mn_pop3_mailbox_class_init (MNPOP3MailboxClass * class) G_GNUC_UNUSED;
-#line 139 "mn-pop3-mailbox.c"
-#line 147 "src/mn-pop3-mailbox.gob"
-static void mn_pop3_mailbox_init (MNPOP3Mailbox * self) G_GNUC_UNUSED;
-#line 142 "mn-pop3-mailbox.c"
-#line 152 "src/mn-pop3-mailbox.gob"
-static void ___3_mn_pop3_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 145 "mn-pop3-mailbox.c"
-#line 174 "src/mn-pop3-mailbox.gob"
-static MNMailbox * ___4_mn_pop3_mailbox_parse_uri (MNMailbox * dummy, const char * uri) G_GNUC_UNUSED;
-#line 148 "mn-pop3-mailbox.c"
-#line 231 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 151 "mn-pop3-mailbox.c"
-#line 265 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_capa_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 154 "mn-pop3-mailbox.c"
-#line 272 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_capa_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 157 "mn-pop3-mailbox.c"
-#line 368 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_stls_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 160 "mn-pop3-mailbox.c"
-#line 380 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_stls_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 163 "mn-pop3-mailbox.c"
-#line 415 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_auth_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 166 "mn-pop3-mailbox.c"
-#line 473 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_auth_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 169 "mn-pop3-mailbox.c"
-#line 519 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_apop_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 172 "mn-pop3-mailbox.c"
-#line 541 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_apop_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 175 "mn-pop3-mailbox.c"
-#line 559 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_user_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 178 "mn-pop3-mailbox.c"
-#line 566 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_user_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 181 "mn-pop3-mailbox.c"
-#line 585 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_pass_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 184 "mn-pop3-mailbox.c"
-#line 595 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_pass_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 187 "mn-pop3-mailbox.c"
-#line 613 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_list_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 190 "mn-pop3-mailbox.c"
-#line 620 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_list_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 193 "mn-pop3-mailbox.c"
-#line 655 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_uidl_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 196 "mn-pop3-mailbox.c"
-#line 662 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_uidl_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 199 "mn-pop3-mailbox.c"
-#line 715 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_retr_top_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 202 "mn-pop3-mailbox.c"
-#line 766 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_retr_top_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 205 "mn-pop3-mailbox.c"
-#line 835 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_enter_quit_cb (MNClientSession * session, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 208 "mn-pop3-mailbox.c"
-#line 842 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_handle_quit_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 211 "mn-pop3-mailbox.c"
-#line 860 "src/mn-pop3-mailbox.gob"
-static void ___1a_mn_pop3_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
-#line 214 "mn-pop3-mailbox.c"
-#line 972 "src/mn-pop3-mailbox.gob"
-static MNClientSessionResponse * mn_pop3_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 217 "mn-pop3-mailbox.c"
-#line 1056 "src/mn-pop3-mailbox.gob"
-static void mn_pop3_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 220 "mn-pop3-mailbox.c"
-#line 1065 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_session_authenticate (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 223 "mn-pop3-mailbox.c"
-#line 1118 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_apop, gboolean tried_pass) G_GNUC_UNUSED;
-#line 226 "mn-pop3-mailbox.c"
-#line 1170 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_session_authenticated (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 229 "mn-pop3-mailbox.c"
-#line 1199 "src/mn-pop3-mailbox.gob"
-static void mn_pop3_mailbox_session_handle_list_response (MNClientSessionPrivate * priv, MNClientSessionResponse * response, gboolean in_retr_top) G_GNUC_UNUSED;
-#line 232 "mn-pop3-mailbox.c"
-#line 1221 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_session_enter_list_or_uidl (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 235 "mn-pop3-mailbox.c"
-#line 1230 "src/mn-pop3-mailbox.gob"
-static int mn_pop3_mailbox_session_enter_retr_top (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 238 "mn-pop3-mailbox.c"
-#line 1238 "src/mn-pop3-mailbox.gob"
-static MessageInfo * mn_pop3_mailbox_session_message_iter_get_message_info (MNClientSessionPrivate * priv) G_GNUC_UNUSED;
-#line 241 "mn-pop3-mailbox.c"
-#line 1252 "src/mn-pop3-mailbox.gob"
-static gboolean mn_pop3_mailbox_parse_uidl_list_item (const char * item, int * number, char ** uid) G_GNUC_UNUSED;
-#line 244 "mn-pop3-mailbox.c"
-#line 1272 "src/mn-pop3-mailbox.gob"
-static MessageInfo * mn_pop3_mailbox_message_info_new (int number) G_GNUC_UNUSED;
-#line 247 "mn-pop3-mailbox.c"
-#line 1283 "src/mn-pop3-mailbox.gob"
-static void mn_pop3_mailbox_message_info_free (MessageInfo * info) G_GNUC_UNUSED;
-#line 250 "mn-pop3-mailbox.c"
-
-/* pointer to the class of our parent */
-static MNPIMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_handle_greeting_cb mn_pop3_mailbox_handle_greeting_cb
-#define self_enter_capa_cb mn_pop3_mailbox_enter_capa_cb
-#define self_handle_capa_cb mn_pop3_mailbox_handle_capa_cb
-#define self_enter_stls_cb mn_pop3_mailbox_enter_stls_cb
-#define self_handle_stls_cb mn_pop3_mailbox_handle_stls_cb
-#define self_enter_auth_cb mn_pop3_mailbox_enter_auth_cb
-#define self_handle_auth_cb mn_pop3_mailbox_handle_auth_cb
-#define self_enter_apop_cb mn_pop3_mailbox_enter_apop_cb
-#define self_handle_apop_cb mn_pop3_mailbox_handle_apop_cb
-#define self_enter_user_cb mn_pop3_mailbox_enter_user_cb
-#define self_handle_user_cb mn_pop3_mailbox_handle_user_cb
-#define self_enter_pass_cb mn_pop3_mailbox_enter_pass_cb
-#define self_handle_pass_cb mn_pop3_mailbox_handle_pass_cb
-#define self_enter_list_cb mn_pop3_mailbox_enter_list_cb
-#define self_handle_list_cb mn_pop3_mailbox_handle_list_cb
-#define self_enter_uidl_cb mn_pop3_mailbox_enter_uidl_cb
-#define self_handle_uidl_cb mn_pop3_mailbox_handle_uidl_cb
-#define self_enter_retr_top_cb mn_pop3_mailbox_enter_retr_top_cb
-#define self_handle_retr_top_cb mn_pop3_mailbox_handle_retr_top_cb
-#define self_enter_quit_cb mn_pop3_mailbox_enter_quit_cb
-#define self_handle_quit_cb mn_pop3_mailbox_handle_quit_cb
-#define self_response_new_cb mn_pop3_mailbox_response_new_cb
-#define self_response_free_cb mn_pop3_mailbox_response_free_cb
-#define self_session_authenticate mn_pop3_mailbox_session_authenticate
-#define self_session_authenticate_fallback mn_pop3_mailbox_session_authenticate_fallback
-#define self_session_authenticated mn_pop3_mailbox_session_authenticated
-#define self_session_handle_list_response mn_pop3_mailbox_session_handle_list_response
-#define self_session_enter_list_or_uidl mn_pop3_mailbox_session_enter_list_or_uidl
-#define self_session_enter_retr_top mn_pop3_mailbox_session_enter_retr_top
-#define self_session_message_iter_get_message_info mn_pop3_mailbox_session_message_iter_get_message_info
-#define self_parse_uidl_list_item mn_pop3_mailbox_parse_uidl_list_item
-#define self_message_info_new mn_pop3_mailbox_message_info_new
-#define self_message_info_free mn_pop3_mailbox_message_info_free
-#define self_build_name mn_pop3_mailbox_build_name
-GType
-mn_pop3_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNPOP3MailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_pop3_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNPOP3Mailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_pop3_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_PI_MAILBOX, "MNPOP3Mailbox", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNPOP3Mailbox *)g_object_new(mn_pop3_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNPOP3Mailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNPOP3Mailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNPOP3Mailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNPOP3Mailbox *)g_object_new_valist (mn_pop3_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::finalize"
- MNPOP3Mailbox *self G_GNUC_UNUSED = MN_POP3_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 139 "src/mn-pop3-mailbox.gob"
- if(self->_priv->authentication_timer) { g_timer_destroy ((gpointer) self->_priv->authentication_timer); self->_priv->authentication_timer = NULL; }
-#line 343 "mn-pop3-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-
-#line 141 "src/mn-pop3-mailbox.gob"
-static void
-mn_pop3_mailbox_class_init (MNPOP3MailboxClass * class G_GNUC_UNUSED)
-{
-#line 351 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3: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(MNPOP3MailboxPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_PI_MAILBOX);
-
-#line 152 "src/mn-pop3-mailbox.gob"
- mn_mailbox_class->seal = ___3_mn_pop3_mailbox_seal;
-#line 174 "src/mn-pop3-mailbox.gob"
- mn_mailbox_class->parse_uri = ___4_mn_pop3_mailbox_parse_uri;
-#line 860 "src/mn-pop3-mailbox.gob"
- mn_authenticated_mailbox_class->authenticated_check = ___1a_mn_pop3_mailbox_authenticated_check;
-#line 367 "mn-pop3-mailbox.c"
- g_object_class->finalize = ___finalize;
- {
-#line 142 "src/mn-pop3-mailbox.gob"
-
- MN_MAILBOX_CLASS(class)->type = "pop3";
- MN_PI_MAILBOX_CLASS(class)->default_ports = mn_pop3_mailbox_default_ports;
-
-#line 375 "mn-pop3-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 147 "src/mn-pop3-mailbox.gob"
-static void
-mn_pop3_mailbox_init (MNPOP3Mailbox * self G_GNUC_UNUSED)
-{
-#line 383 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_POP3_MAILBOX,MNPOP3MailboxPrivate);
- {
-#line 148 "src/mn-pop3-mailbox.gob"
-
- mn_mailbox_set_format(MN_MAILBOX(self), "POP3");
-
-#line 391 "mn-pop3-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 152 "src/mn-pop3-mailbox.gob"
-static void
-___3_mn_pop3_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 401 "mn-pop3-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->seal) \
- (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::seal"
-{
-#line 154 "src/mn-pop3-mailbox.gob"
-
- MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
-
- PARENT_HANDLER(mailbox);
-
- if (! mailbox->runtime_name)
- mailbox->runtime_name = self_build_name(MN_AUTHENTICATED_MAILBOX(mailbox)->username,
- MN_PI_MAILBOX(mailbox)->hostname);
-
-#if WITH_SSL
- if (MN_PI_MAILBOX(mailbox)->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL)
- auth_mailbox->keyring_protocol = g_strdup("pop3s");
- else
-#endif
- auth_mailbox->keyring_protocol = g_strdup("pop3");
- }}
-#line 425 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 174 "src/mn-pop3-mailbox.gob"
-static MNMailbox *
-___4_mn_pop3_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * uri)
-#line 432 "mn-pop3-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:POP3:Mailbox::parse_uri"
-{
-#line 176 "src/mn-pop3-mailbox.gob"
-
- int len;
- int buflen;
- char *username = NULL;
- char *authmech = NULL;
- char *hostname;
- int port;
- MNMailbox *mailbox;
-
- len = strlen(uri);
- buflen = len + 1;
-
- {
- char scheme_buf[buflen];
- char auth_buf[buflen];
- char location_buf[buflen];
- char username_buf[buflen];
- char authmech_buf[buflen];
- char hostname_buf[buflen];
- gboolean has_authmech = FALSE;
-
- if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf))
- return NULL;
-
- if (strcmp(scheme_buf, "pop"))
- return NULL;
-
- if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_authmech))
- return NULL;
-
- if (has_authmech && ! strcmp(authmech_buf, "*"))
- has_authmech = FALSE;
-
- mn_pi_mailbox_split_uri_hostport(location_buf, len, hostname_buf, &port);
-
- username = gnome_vfs_unescape_string(username_buf, NULL);
- if (has_authmech)
- authmech = gnome_vfs_unescape_string(authmech_buf, NULL);
- hostname = gnome_vfs_unescape_string(hostname_buf, NULL);
- }
-
- mailbox = mn_mailbox_new("pop3",
- "username", username,
- "authmech", authmech,
- "hostname", hostname,
- "port", port,
- NULL);
-
- g_free(username);
- g_free(authmech);
- g_free(hostname);
-
- return mailbox;
- }}
-#line 495 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 231 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 503 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_greeting_cb"
-{
-#line 235 "src/mn-pop3-mailbox.gob"
-
- priv->session = session;
-
- switch (response->type)
- {
- case RESPONSE_OK:
- if (response->arguments)
- {
- char *timestamp;
-
- timestamp = strchr(response->arguments, '<');
- if (timestamp)
- {
- char *timestamp_end;
-
- timestamp_end = strchr(timestamp, '>');
- if (timestamp_end)
- priv->apop_timestamp = g_strndup(timestamp, timestamp_end - timestamp + 1);
- }
- }
- return STATE_CAPA;
-
- case RESPONSE_ERR:
- return mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 536 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 265 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_capa_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 543 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_capa_cb"
-{
-#line 268 "src/mn-pop3-mailbox.gob"
-
- return mn_client_session_write(session, "CAPA");
- }}
-#line 550 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 272 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_capa_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 557 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_capa_cb"
-{
-#line 276 "src/mn-pop3-mailbox.gob"
-
- self_session_handle_list_response(priv, response, FALSE);
-
- switch (response->type)
- {
- case RESPONSE_OK:
- mn_g_slist_clear_deep(&priv->auth_mechanisms);
-#if WITH_SASL
- mn_g_slist_clear(&priv->sasl_remaining_mechanisms);
-#endif
- priv->top_supported = FALSE;
- priv->uidl_supported = FALSE;
- priv->self->_priv->login_delay = 0;
- priv->login_delay_user = FALSE;
-#if WITH_SSL
- priv->stls_supported = FALSE;
-#endif
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
-
- case RESPONSE_ERR:
- case RESPONSE_LIST_END:
- if (priv->authenticated)
- return self_session_enter_list_or_uidl(priv);
-
-#if WITH_SSL
- if (priv->pi_mailbox->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL
- && ! priv->stls_completed)
- {
- if (priv->stls_supported)
- return STATE_STLS;
- else
- {
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("server does not support in-band SSL/TLS"));
- return STATE_QUIT;
- }
- }
- else
-#endif /* WITH_SSL */
- return self_session_authenticate(priv);
-
- case RESPONSE_LIST_ITEM:
- {
- char **tokens;
- gboolean login_delay_error = FALSE;
-
- tokens = g_strsplit(response->arguments, " ", 0);
- if (tokens[0])
- {
- if (! strcmp(tokens[0], "SASL"))
- {
- int i;
-
- for (i = 1; tokens[i]; i++)
- priv->auth_mechanisms = g_slist_append(priv->auth_mechanisms, g_strdup(tokens[i]));
- }
- else if (! strcmp(tokens[0], "TOP"))
- priv->top_supported = TRUE;
- else if (! strcmp(tokens[0], "UIDL"))
- priv->uidl_supported = TRUE;
-#if WITH_SSL
- else if (! strcmp(tokens[0], "STLS"))
- priv->stls_supported = TRUE;
-#endif /* WITH_SSL */
- else if (! strcmp(tokens[0], "LOGIN-DELAY"))
- {
- if (tokens[1] && mn_str_isnumeric(tokens[1])
- && (! tokens[2]
- || (! tokens[3]
- && ! priv->authenticated
- && ! strcmp(tokens[2], "USER"))))
- {
- priv->self->_priv->login_delay = atoi(tokens[1]);
- if (tokens[2])
- priv->login_delay_user = TRUE;
- }
- else
- login_delay_error = TRUE;
- }
- }
- g_strfreev(tokens);
-
- if (login_delay_error)
- return mn_client_session_set_error(session, MN_CLIENT_SESSION_ERROR_OTHER, _("invalid arguments for the LOGIN-DELAY capability"));
- }
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 652 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 368 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_stls_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 659 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_stls_cb"
-{
-#line 371 "src/mn-pop3-mailbox.gob"
-
-#if WITH_SSL
- return mn_client_session_write(session, "STLS");
-#else
- g_assert_not_reached();
- return 0;
-#endif /* WITH_SSL */
- }}
-#line 671 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 380 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_stls_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 678 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_stls_cb"
-{
-#line 384 "src/mn-pop3-mailbox.gob"
-
-#if WITH_SSL
- switch (response->type)
- {
- case RESPONSE_OK:
- priv->stls_completed = TRUE;
- return mn_client_session_enable_ssl(session)
- ? STATE_CAPA /* [1] */
- : MN_CLIENT_SESSION_RESULT_DISCONNECT;
-
- /*
- * [1] RFC 2595 4:
- *
- * "Once TLS has been started, the client MUST discard cached
- * information about server capabilities and SHOULD re-issue
- * the CAPA command."
- */
-
- case RESPONSE_ERR:
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_QUIT;
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
-#else
- g_assert_not_reached();
- return 0;
-#endif /* WITH_SSL */
- }}
-#line 712 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 415 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_auth_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 719 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_auth_cb"
-{
-#line 418 "src/mn-pop3-mailbox.gob"
-
-#if WITH_SASL
- /*
- * RFC 2449 6.3 specifies that POP3 supports the initial client
- * response feature of SASL.
- */
- const char *initial_clientout = NULL;
- unsigned int initial_clientoutlen = 0;
-
- priv->sasl_mechanism = NULL;
-
- if (mn_client_session_sasl_authentication_start(priv->session,
- "pop",
- priv->sasl_remaining_mechanisms,
- priv->pi_mailbox->authmech,
- &priv->sasl_mechanism,
- priv->sasl_had_clientout ? NULL : &initial_clientout,
- priv->sasl_had_clientout ? NULL : &initial_clientoutlen))
- {
- g_assert(priv->sasl_mechanism != NULL);
-
- if (initial_clientoutlen > 0)
- {
- char buf64[initial_clientoutlen * 2]; /* Base64 is 33% larger than the data it encodes */
- unsigned int outlen;
- int result;
- char *str;
-
- result = sasl_encode64(initial_clientout, initial_clientoutlen, buf64, sizeof(buf64), &outlen);
- if (result != SASL_OK)
- return mn_client_session_set_error(session, MN_CLIENT_SESSION_ERROR_OTHER, _("unable to encode Base64: %s"), sasl_errstring(result, NULL, NULL));
-
- str = g_strndup(buf64, outlen);
- result = mn_client_session_write(session, "AUTH %s %s", priv->sasl_mechanism, str);
- g_free(str);
-
- priv->sasl_had_clientout = TRUE;
- return result;
- }
- else
- {
- priv->sasl_had_clientout = FALSE;
- return mn_client_session_write(session, "AUTH %s", priv->sasl_mechanism);
- }
- }
- else
- return priv->auth_mailbox->auth_cancelled
- ? STATE_QUIT
- : self_session_authenticate_fallback(priv, FALSE, FALSE);
-#else
- g_assert_not_reached();
- return 0;
-#endif /* WITH_SASL */
- }}
-#line 777 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 473 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_auth_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 784 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_auth_cb"
-{
-#line 477 "src/mn-pop3-mailbox.gob"
-
-#if WITH_SASL
- switch (response->type)
- {
- case RESPONSE_OK:
- return mn_client_session_sasl_authentication_done(session)
- ? self_session_authenticated(priv)
- : MN_CLIENT_SESSION_RESULT_DISCONNECT;
-
- case RESPONSE_ERR:
- if (priv->auth_mailbox->auth_cancelled)
- return STATE_QUIT;
- else
- {
- if (priv->sasl_had_clientout)
- {
- /*
- * Some servers violate RFC 2449 by not supporting a
- * second argument to the AUTH command. Support these
- * servers nevertheless, by retrying without the SASL
- * initial client response.
- */
-
- mn_client_session_notice(session, _("SASL authentication with initial client response failed, retrying without initial client response"));
- return STATE_AUTH;
- }
- else
- return self_session_authenticate_fallback(priv, FALSE, FALSE);
- }
-
- case RESPONSE_CONTINUATION:
- return mn_client_session_sasl_authentication_step(session, response->arguments);
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
-#else
- g_assert_not_reached();
- return 0;
-#endif /* WITH_SASL */
- }}
-#line 829 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 519 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_apop_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 836 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_apop_cb"
-{
-#line 522 "src/mn-pop3-mailbox.gob"
-
- MNMD5Context context;
- char buf[16];
- char hexbuf[33];
-
- g_assert(priv->apop_timestamp != NULL);
-
- if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
- return STATE_QUIT;
-
- mn_md5_init_ctx(&context);
- mn_md5_process_bytes(&context, priv->apop_timestamp, strlen(priv->apop_timestamp));
- mn_md5_process_bytes(&context, priv->auth_mailbox->runtime_password, strlen(priv->auth_mailbox->runtime_password));
- mn_md5_finish_ctx(&context, buf);
- mn_md5_to_hex(buf, hexbuf);
-
- return mn_client_session_write(session, "APOP %s %s", priv->auth_mailbox->username, hexbuf);
- }}
-#line 858 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 541 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_apop_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 865 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_apop_cb"
-#line 541 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (session != NULL, (int )0);
-#line 541 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (response != NULL, (int )0);
-#line 541 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 873 "mn-pop3-mailbox.c"
-{
-#line 545 "src/mn-pop3-mailbox.gob"
-
- switch (response->type)
- {
- case RESPONSE_OK:
- return self_session_authenticated(priv);
-
- case RESPONSE_ERR:
- return self_session_authenticate_fallback(priv, TRUE, FALSE);
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 889 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 559 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_user_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 896 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_user_cb"
-#line 559 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (session != NULL, (int )0);
-#line 559 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 902 "mn-pop3-mailbox.c"
-{
-#line 562 "src/mn-pop3-mailbox.gob"
-
- return mn_client_session_write(session, "USER %s", priv->auth_mailbox->username);
- }}
-#line 908 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 566 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_user_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 915 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_user_cb"
-{
-#line 570 "src/mn-pop3-mailbox.gob"
-
- switch (response->type)
- {
- case RESPONSE_OK:
- return STATE_PASS;
-
- case RESPONSE_ERR:
- mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
- return STATE_QUIT;
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 933 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 585 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_pass_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 940 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_pass_cb"
-{
-#line 588 "src/mn-pop3-mailbox.gob"
-
- if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
- return STATE_QUIT;
-
- return mn_client_session_write(session, "PASS %s", priv->auth_mailbox->runtime_password);
- }}
-#line 950 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 595 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_pass_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 957 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_pass_cb"
-{
-#line 599 "src/mn-pop3-mailbox.gob"
-
- switch (response->type)
- {
- case RESPONSE_OK:
- return self_session_authenticated(priv);
-
- case RESPONSE_ERR:
- return self_session_authenticate_fallback(priv, TRUE, TRUE);
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 974 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 613 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_list_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 981 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_list_cb"
-{
-#line 616 "src/mn-pop3-mailbox.gob"
-
- return mn_client_session_write(session, "LIST");
- }}
-#line 988 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 620 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_list_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 995 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_list_cb"
-{
-#line 624 "src/mn-pop3-mailbox.gob"
-
- self_session_handle_list_response(priv, response, FALSE);
-
- switch (response->type)
- {
- case RESPONSE_OK:
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
-
- case RESPONSE_LIST_END:
- return self_session_enter_retr_top(priv);
-
- case RESPONSE_ERR:
- return mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
-
- case RESPONSE_LIST_ITEM:
- {
- int num;
- int size;
-
- if (sscanf(response->arguments, "%d %d", &num, &size) == 2)
- priv->messages = g_slist_prepend(priv->messages, self_message_info_new(num));
- else /* compliance error */
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 1029 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 655 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_uidl_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1036 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_uidl_cb"
-{
-#line 658 "src/mn-pop3-mailbox.gob"
-
- return mn_client_session_write(session, "UIDL");
- }}
-#line 1043 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 662 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_uidl_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1050 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_uidl_cb"
-{
-#line 666 "src/mn-pop3-mailbox.gob"
-
- self_session_handle_list_response(priv, response, FALSE);
-
- switch (response->type)
- {
- case RESPONSE_OK:
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
-
- case RESPONSE_LIST_END:
- return self_session_enter_retr_top(priv);
-
- case RESPONSE_ERR:
- /*
- * The server advertised UIDL but does not support it,
- * fallback to LIST.
- */
- return STATE_LIST;
-
- case RESPONSE_LIST_ITEM:
- {
- int num;
- char *uid;
-
- if (self_parse_uidl_list_item(response->arguments, &num, &uid))
- {
- MessageInfo *info;
- MNMessage *message;
-
- info = self_message_info_new(num);
- info->mid = uid;
-
- message = mn_mailbox_get_message_from_mid(priv->mailbox, info->mid);
- if (message)
- info->message = g_object_ref(message);
-
- priv->messages = g_slist_prepend(priv->messages, info);
-
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
- }
- else
- /* compliance error */
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 1102 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 715 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_retr_top_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1109 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_retr_top_cb"
-{
-#line 718 "src/mn-pop3-mailbox.gob"
-
- MessageInfo *info;
-
- info = self_session_message_iter_get_message_info(priv);
-
- if (info)
- return mn_client_session_write(session, priv->top_supported ? "TOP %i 0" : "RETR %i", info->number);
- else
- {
- GSList *messages = NULL;
- GSList *l;
-
- MN_LIST_FOREACH(l, priv->messages)
- {
- info = l->data;
-
- if (info->message)
- messages = g_slist_prepend(messages, info->message);
- }
-
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_messages(priv->mailbox, messages);
-
- if (priv->num_errors != 0)
- mn_mailbox_set_error(priv->mailbox,
- ngettext("cannot retrieve %i message",
- "cannot retrieve %i messages",
- priv->num_errors),
- priv->num_errors);
-
- /*
- * In authenticated_check(), we do not hold the GDK lock while
- * unreffing the messages. We have just exposed the messages
- * to other threads through our mn_mailbox_set_messages()
- * call, so unref them here, while we hold the GDK lock.
- */
- mn_g_slist_clear_deep_custom(&priv->messages, (GFunc) self_message_info_free, NULL);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- g_slist_free(messages);
-
- return STATE_QUIT;
- }
- }}
-#line 1160 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 766 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_retr_top_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1167 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_retr_top_cb"
-{
-#line 770 "src/mn-pop3-mailbox.gob"
-
- self_session_handle_list_response(priv, response, TRUE);
-
- switch (response->type)
- {
- case RESPONSE_OK:
- if (priv->message_buffer)
- g_string_free(priv->message_buffer, TRUE);
- priv->message_buffer = g_string_new(NULL);
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
-
- case RESPONSE_LIST_END:
- {
- MessageInfo *info = priv->message_iter->data;
- GError *err = NULL;
-
- g_assert(info->message == NULL);
-
- info->message = mn_message_new_from_buffer(priv->mailbox,
- priv->message_buffer->str,
- priv->message_buffer->len,
- info->mid,
- 0,
- TRUE,
- &err);
- if (err)
- {
- mn_client_session_warning(session,
- "cannot read message %i: %s",
- info->number,
- err->message);
- g_error_free(err);
-
- priv->num_errors++;
- }
-
- priv->message_iter = priv->message_iter->next;
- return STATE_RETR_TOP;
- }
-
- case RESPONSE_ERR:
- {
- MessageInfo *info = priv->message_iter->data;
-
- g_assert(info->message == NULL);
-
- mn_client_session_warning(session,
- "cannot retrieve message %i: %s",
- info->number,
- response->arguments ? response->arguments : "unknown error");
- priv->num_errors++;
-
- priv->message_iter = priv->message_iter->next;
- return STATE_RETR_TOP;
- }
-
- case RESPONSE_LIST_ITEM:
- g_string_append_printf(priv->message_buffer, "%s\n", response->arguments);
- return MN_CLIENT_SESSION_RESULT_CONTINUE;
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 1235 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 835 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_enter_quit_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-{
-#line 1242 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_quit_cb"
-{
-#line 838 "src/mn-pop3-mailbox.gob"
-
- return mn_client_session_write(session, "QUIT");
- }}
-#line 1249 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 842 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_handle_quit_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1256 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_quit_cb"
-{
-#line 846 "src/mn-pop3-mailbox.gob"
-
- switch (response->type)
- {
- case RESPONSE_OK:
- return MN_CLIENT_SESSION_RESULT_DISCONNECT;
-
- case RESPONSE_ERR:
- return mn_client_session_set_error_from_response(session, MN_CLIENT_SESSION_ERROR_OTHER, response->arguments);
-
- default:
- return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
- }
- }}
-#line 1273 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 860 "src/mn-pop3-mailbox.gob"
-static void
-___1a_mn_pop3_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
-#line 1279 "mn-pop3-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:POP3:Mailbox::authenticated_check"
-{
-#line 862 "src/mn-pop3-mailbox.gob"
-
- Self *self = SELF(mailbox);
- static const MNClientSessionState states[] = {
- { STATE_GREETING, NULL, self_handle_greeting_cb },
- { STATE_CAPA, self_enter_capa_cb, self_handle_capa_cb },
-#if WITH_SSL
- { STATE_STLS, self_enter_stls_cb, self_handle_stls_cb },
-#endif
-#if WITH_SASL
- { STATE_AUTH, self_enter_auth_cb, self_handle_auth_cb },
-#endif
- { STATE_APOP, self_enter_apop_cb, self_handle_apop_cb },
- { STATE_USER, self_enter_user_cb, self_handle_user_cb },
- { STATE_PASS, self_enter_pass_cb, self_handle_pass_cb },
- { STATE_LIST, self_enter_list_cb, self_handle_list_cb },
- { STATE_UIDL, self_enter_uidl_cb, self_handle_uidl_cb },
- { STATE_RETR_TOP, self_enter_retr_top_cb, self_handle_retr_top_cb },
- { STATE_QUIT, self_enter_quit_cb, self_handle_quit_cb },
-
- MN_CLIENT_SESSION_STATES_END
- };
- static const MNClientSessionCallbacks callbacks = {
- mn_pi_mailbox_notice_cb,
- mn_pi_mailbox_warning_cb,
- self_response_new_cb,
- self_response_free_cb,
- NULL, /* pre_read */
- NULL, /* post_read */
-#if WITH_SASL
- mn_pi_mailbox_sasl_get_credentials_cb,
-#endif
-#if WITH_SSL
- mn_pi_mailbox_ssl_trust_server_cb,
-#endif
- };
- MNClientSessionPrivate priv;
- gboolean status;
- GError *err = NULL;
-
- PARENT_HANDLER(mailbox);
-
- /* check if the parent handler has disabled the mailbox */
- if (! mn_mailbox_get_poll(MN_MAILBOX(self)))
- return;
-
- if (selfp->login_delay && selfp->authentication_timer)
- {
- double elapsed;
-
- g_timer_stop(selfp->authentication_timer);
- elapsed = g_timer_elapsed(selfp->authentication_timer, NULL);
-
- if (elapsed < selfp->login_delay)
- {
- int sleeptime;
-
- sleeptime = selfp->login_delay - elapsed;
- mn_mailbox_notice(MN_MAILBOX(self),
- ngettext("honouring LOGIN-DELAY, sleeping for %i second",
- "honouring LOGIN-DELAY, sleeping for %i seconds",
- sleeptime),
- sleeptime);
- sleep(sleeptime);
- }
- }
-
- memset(&priv, 0, sizeof(priv));
- mn_pi_mailbox_session_private_init(MN_PI_MAILBOX(self), &priv);
- priv.self = self;
-
- status = mn_client_session_run(states,
- &callbacks,
-#if WITH_SSL
- priv.pi_mailbox->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL,
-#endif
- priv.pi_mailbox->hostname,
- priv.pi_mailbox->runtime_port,
- &priv,
- &err);
-
- if (! status)
- {
- char *escaped;
-
- escaped = mn_utf8_escape(err->message);
- g_error_free(err);
-
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_error(MN_MAILBOX(self), "%s", escaped);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- g_free(escaped);
- }
-
- g_free(priv.apop_timestamp);
- mn_g_slist_free_deep(priv.auth_mechanisms);
-
-#if WITH_SASL
- g_slist_free(priv.sasl_remaining_mechanisms);
-#endif
-
- mn_g_slist_free_deep_custom(priv.messages, (GFunc) self_message_info_free, NULL);
-
- if (priv.message_buffer)
- g_string_free(priv.message_buffer, TRUE);
- }}
-#line 1396 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 972 "src/mn-pop3-mailbox.gob"
-static MNClientSessionResponse *
-mn_pop3_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv)
-{
-#line 1404 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::response_new_cb"
-{
-#line 976 "src/mn-pop3-mailbox.gob"
-
- MNClientSessionResponse *response = NULL;
-
- /*
- * About character set handling:
- *
- * RFC 1939 3 specifies that "keywords and arguments consist of
- * printable ASCII characters", however that refers to
- * commands. Nothing is said about responses. We therefore do not
- * check the encoding of responses.
- *
- * Safety:
- * - we ensure that GTK+ will only receive UTF-8 data by
- * escaping error messages in authenticated_check()
- * - responses ending up in mn_mailbox_notice() need not be
- * valid UTF-8, since g_log() escapes unsafe and non UTF-8
- * characters
- * - RETR/TOP multiline responses are passed to our
- * mn-message-mime implementation, which handles character set
- * conversions
- */
-
- if (priv->in_list)
- {
- response = g_new0(MNClientSessionResponse, 1);
- if (! strcmp(input, "."))
- response->type = RESPONSE_LIST_END;
- else if (g_str_has_prefix(input, ".."))
- {
- response->type = RESPONSE_LIST_ITEM;
- response->arguments = g_strdup(input + 1); /* skip the initial dot */
- }
- else
- {
- response->type = RESPONSE_LIST_ITEM;
- response->arguments = g_strdup(input);
- }
- }
- else
- {
- if (g_str_has_prefix(input, "+ "))
- {
- response = g_new0(MNClientSessionResponse, 1);
- response->type = RESPONSE_CONTINUATION;
- response->arguments = g_strdup(input + 2);
- }
- else
- {
- ResponseType type;
- int after_status = 0;
-
- if (g_str_has_prefix(input, "+OK"))
- {
- type = RESPONSE_OK;
- after_status = 3;
- }
- else if (g_str_has_prefix(input, "-ERR"))
- {
- type = RESPONSE_ERR;
- after_status = 4;
- }
-
- if (after_status)
- {
- char c = input[after_status];
-
- if (c == ' ' || c == ',') /* skip commonly used separators */
- after_status++;
-
- response = g_new0(MNClientSessionResponse, 1);
- response->type = type;
- if (input[after_status] != 0)
- response->arguments = g_strdup(input + after_status);
- }
- }
- }
-
- return response;
- }}
-#line 1487 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1056 "src/mn-pop3-mailbox.gob"
-static void
-mn_pop3_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-{
-#line 1494 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::response_free_cb"
-{
-#line 1060 "src/mn-pop3-mailbox.gob"
-
- g_free(response->arguments);
- g_free(response);
- }}
-#line 1502 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1065 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_session_authenticate (MNClientSessionPrivate * priv)
-{
-#line 1509 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticate"
-#line 1065 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1513 "mn-pop3-mailbox.c"
-{
-#line 1067 "src/mn-pop3-mailbox.gob"
-
-#if WITH_SASL
- g_slist_free(priv->sasl_remaining_mechanisms);
- priv->sasl_remaining_mechanisms = g_slist_copy(priv->auth_mechanisms);
-#endif /* WITH_SASL */
-
- if (priv->pi_mailbox->authmech)
- {
- if (*priv->pi_mailbox->authmech != '+')
- {
-#if WITH_SASL
- return STATE_AUTH;
-#else
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("a SASL authentication mechanism was selected but SASL support has not been compiled in"));
- return STATE_QUIT;
-#endif /* WITH_SASL */
- }
- else
- {
- if (! strcmp(priv->pi_mailbox->authmech, "+APOP"))
- {
- if (priv->apop_timestamp)
- return STATE_APOP;
- else
- {
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("server does not support APOP authentication"));
- return STATE_QUIT;
- }
- }
- else if (! strcmp(priv->pi_mailbox->authmech, "+USERPASS"))
- return STATE_USER;
- else
- {
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("unknown authentication mechanism \"%s\""), priv->pi_mailbox->authmech);
- return STATE_QUIT;
- }
- }
- }
- else
- {
-#if WITH_SASL
- if (priv->sasl_remaining_mechanisms)
- return STATE_AUTH;
-#endif /* WITH_SASL */
- if (priv->apop_timestamp)
- return STATE_APOP;
- else
- return STATE_USER;
- }
- }}
-#line 1566 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1118 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_apop, gboolean tried_pass)
-{
-#line 1573 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticate_fallback"
-#line 1118 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1577 "mn-pop3-mailbox.c"
-{
-#line 1122 "src/mn-pop3-mailbox.gob"
-
- if (! priv->pi_mailbox->authmech)
- {
-#if WITH_SASL
- if (priv->sasl_mechanism)
- {
- GSList *elem;
-
- elem = mn_g_str_slist_find(priv->sasl_remaining_mechanisms, priv->sasl_mechanism);
- if (elem)
- {
- priv->sasl_remaining_mechanisms = g_slist_delete_link(priv->sasl_remaining_mechanisms, elem);
- if (priv->sasl_remaining_mechanisms)
- {
- mn_client_session_notice(priv->session, _("disabling mechanism \"%s\" and retrying SASL authentication"), priv->sasl_mechanism);
- return STATE_AUTH;
- }
- }
- }
-
- /* SASL is not needed anymore, save some memory */
- mn_client_session_sasl_dispose(priv->session);
-#endif /* WITH_SASL */
-
- if (! tried_apop && priv->apop_timestamp)
- {
- mn_client_session_notice(priv->session, _("falling back to APOP authentication"));
- return STATE_APOP;
- }
- else if (! tried_pass)
- {
- mn_client_session_notice(priv->session, _("falling back to USER/PASS authentication"));
- return STATE_USER;
- }
- }
-
- if (priv->auth_mailbox->auth_prompted)
- {
- mn_authenticated_mailbox_auth_failed(priv->auth_mailbox);
- return self_session_authenticate(priv);
- }
- else
- {
- mn_client_session_set_error(priv->session, MN_CLIENT_SESSION_ERROR_OTHER, _("authentication failed"));
- return STATE_QUIT;
- }
- }}
-#line 1627 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1170 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_session_authenticated (MNClientSessionPrivate * priv)
-{
-#line 1634 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticated"
-#line 1170 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1638 "mn-pop3-mailbox.c"
-{
-#line 1172 "src/mn-pop3-mailbox.gob"
-
- priv->authenticated = TRUE;
- if (priv->self->_priv->login_delay)
- {
- if (priv->self->_priv->authentication_timer)
- g_timer_start(priv->self->_priv->authentication_timer);
- else
- priv->self->_priv->authentication_timer = g_timer_new();
- }
-
- /*
- * We are now in transaction state. We must re-issue CAPA if:
- *
- * - the LOGIN-DELAY capability announced in the authorization
- * state contained the USER argument (priv->login_delay_user is
- * true)
- * - the TOP capability was not announced in the authorization
- * state: although RFC 2449 states that "capabilities available
- * in the AUTHORIZATION state MUST be announced in both states",
- * some servers (for instance, pop.gmail.com) violate the RFC
- * and only announce TOP in the transaction state.
- */
- return priv->login_delay_user || ! priv->top_supported
- ? STATE_CAPA
- : self_session_enter_list_or_uidl(priv);
- }}
-#line 1667 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1199 "src/mn-pop3-mailbox.gob"
-static void
-mn_pop3_mailbox_session_handle_list_response (MNClientSessionPrivate * priv, MNClientSessionResponse * response, gboolean in_retr_top)
-{
-#line 1674 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_handle_list_response"
-#line 1199 "src/mn-pop3-mailbox.gob"
- g_return_if_fail (priv != NULL);
-#line 1199 "src/mn-pop3-mailbox.gob"
- g_return_if_fail (response != NULL);
-#line 1680 "mn-pop3-mailbox.c"
-{
-#line 1203 "src/mn-pop3-mailbox.gob"
-
- switch (response->type)
- {
- case RESPONSE_OK:
- priv->in_list = TRUE;
- priv->in_retr_top = in_retr_top;
- break;
-
- case RESPONSE_LIST_ITEM: /* nop */
- break;
-
- default:
- priv->in_list = FALSE;
- priv->in_retr_top = FALSE;
- break;
- }
- }}
-#line 1700 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1221 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_session_enter_list_or_uidl (MNClientSessionPrivate * priv)
-{
-#line 1707 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_enter_list_or_uidl"
-#line 1221 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1711 "mn-pop3-mailbox.c"
-{
-#line 1223 "src/mn-pop3-mailbox.gob"
-
- if (priv->uidl_supported)
- return STATE_UIDL;
- else
- return STATE_LIST;
- }}
-#line 1720 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1230 "src/mn-pop3-mailbox.gob"
-static int
-mn_pop3_mailbox_session_enter_retr_top (MNClientSessionPrivate * priv)
-{
-#line 1727 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_enter_retr_top"
-#line 1230 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (int )0);
-#line 1731 "mn-pop3-mailbox.c"
-{
-#line 1232 "src/mn-pop3-mailbox.gob"
-
- priv->message_iter = priv->messages;
-
- return STATE_RETR_TOP;
- }}
-#line 1739 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1238 "src/mn-pop3-mailbox.gob"
-static MessageInfo *
-mn_pop3_mailbox_session_message_iter_get_message_info (MNClientSessionPrivate * priv)
-{
-#line 1746 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_message_iter_get_message_info"
-#line 1238 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (priv != NULL, (MessageInfo * )0);
-#line 1750 "mn-pop3-mailbox.c"
-{
-#line 1240 "src/mn-pop3-mailbox.gob"
-
- for (; priv->message_iter; priv->message_iter = priv->message_iter->next)
- {
- MessageInfo *info = priv->message_iter->data;
-
- if (! info->message)
- return info;
- }
-
- return NULL;
- }}
-#line 1764 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1252 "src/mn-pop3-mailbox.gob"
-static gboolean
-mn_pop3_mailbox_parse_uidl_list_item (const char * item, int * number, char ** uid)
-{
-#line 1771 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::parse_uidl_list_item"
-#line 1252 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (item != NULL, (gboolean )0);
-#line 1252 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (number != NULL, (gboolean )0);
-#line 1252 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (uid != NULL, (gboolean )0);
-#line 1779 "mn-pop3-mailbox.c"
-{
-#line 1256 "src/mn-pop3-mailbox.gob"
-
- char **fields;
- gboolean status = FALSE;
-
- fields = g_strsplit(item, " ", 2);
- if (g_strv_length(fields) == 2 && mn_str_isnumeric(fields[0]))
- {
- *number = atoi(fields[0]);
- *uid = g_strdup(fields[1]);
- status = TRUE;
- }
- g_strfreev(fields);
-
- return status;
- }}
-#line 1797 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1272 "src/mn-pop3-mailbox.gob"
-static MessageInfo *
-mn_pop3_mailbox_message_info_new (int number)
-{
-#line 1804 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::message_info_new"
-{
-#line 1274 "src/mn-pop3-mailbox.gob"
-
- MessageInfo *info;
-
- info = g_new0(MessageInfo, 1);
- info->number = number;
-
- return info;
- }}
-#line 1816 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1283 "src/mn-pop3-mailbox.gob"
-static void
-mn_pop3_mailbox_message_info_free (MessageInfo * info)
-{
-#line 1823 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::message_info_free"
-#line 1283 "src/mn-pop3-mailbox.gob"
- g_return_if_fail (info != NULL);
-#line 1827 "mn-pop3-mailbox.c"
-{
-#line 1285 "src/mn-pop3-mailbox.gob"
-
- if (info->message)
- g_object_unref(info->message);
- g_free(info->mid);
- g_free(info);
- }}
-#line 1836 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 1292 "src/mn-pop3-mailbox.gob"
-char *
-mn_pop3_mailbox_build_name (const char * username, const char * server)
-{
-#line 1843 "mn-pop3-mailbox.c"
-#define __GOB_FUNCTION__ "MN:POP3:Mailbox::build_name"
-#line 1292 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (username != NULL, (char * )0);
-#line 1292 "src/mn-pop3-mailbox.gob"
- g_return_val_if_fail (server != NULL, (char * )0);
-#line 1849 "mn-pop3-mailbox.c"
-{
-#line 1295 "src/mn-pop3-mailbox.gob"
-
- return g_strdup_printf("%s@%s", username, server);
- }}
-#line 1855 "mn-pop3-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-pop3-mailbox.gob.stamp b/build/src/mn-pop3-mailbox.gob.stamp
diff --git a/build/src/mn-pop3-mailbox.h b/build/src/mn-pop3-mailbox.h
@@ -1,70 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-pi-mailbox.h"
-
-#ifndef __MN_POP3_MAILBOX_H__
-#define __MN_POP3_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-extern int mn_pop3_mailbox_default_ports[MN_PI_MAILBOX_N_CONNECTION_TYPES];
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_POP3_MAILBOX (mn_pop3_mailbox_get_type())
-#define MN_POP3_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_pop3_mailbox_get_type(), MNPOP3Mailbox)
-#define MN_POP3_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_pop3_mailbox_get_type(), MNPOP3Mailbox const)
-#define MN_POP3_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_pop3_mailbox_get_type(), MNPOP3MailboxClass)
-#define MN_IS_POP3_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_pop3_mailbox_get_type ())
-
-#define MN_POP3_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_pop3_mailbox_get_type(), MNPOP3MailboxClass)
-
-/* Private structure type */
-typedef struct _MNPOP3MailboxPrivate MNPOP3MailboxPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_POP3_MAILBOX__
-#define __TYPEDEF_MN_POP3_MAILBOX__
-typedef struct _MNPOP3Mailbox MNPOP3Mailbox;
-#endif
-struct _MNPOP3Mailbox {
- MNPIMailbox __parent__;
- /*< private >*/
- MNPOP3MailboxPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNPOP3MailboxClass MNPOP3MailboxClass;
-struct _MNPOP3MailboxClass {
- MNPIMailboxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_pop3_mailbox_get_type (void) G_GNUC_CONST;
-#line 1292 "src/mn-pop3-mailbox.gob"
-char * mn_pop3_mailbox_build_name (const char * username,
- const char * server);
-#line 65 "mn-pop3-mailbox.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-popup-private.h b/build/src/mn-popup-private.h
@@ -1,22 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_POPUP_PRIVATE_H__
-#define __MN_POPUP_PRIVATE_H__
-
-#include "mn-popup.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNPopupPrivate {
-#line 34 "src/mn-popup.gob"
- MNMessage * message;
-#line 16 "mn-popup-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-popup.c b/build/src/mn-popup.c
@@ -1,555 +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-popup.h"
-
-#include "mn-popup-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-popup.gob"
-
-#include <glib/gi18n.h>
-#include "mn-conf.h"
-#include "mn-shell.h"
-#include "mn-util.h"
-
-#line 33 "mn-popup.c"
-/* self casting macros */
-#define SELF(x) MN_POPUP(x)
-#define SELF_CONST(x) MN_POPUP_CONST(x)
-#define IS_SELF(x) MN_IS_POPUP(x)
-#define TYPE_SELF MN_TYPE_POPUP
-#define SELF_CLASS(x) MN_POPUP_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_POPUP_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNPopup Self;
-typedef MNPopupClass 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-popup.gob"
-static void mn_popup_init (MNPopup * o) G_GNUC_UNUSED;
-#line 52 "mn-popup.c"
-#line 0 "src/mn-popup.gob"
-static void mn_popup_class_init (MNPopupClass * c) G_GNUC_UNUSED;
-#line 55 "mn-popup.c"
-#line 40 "src/mn-popup.gob"
-static void mn_popup_constructor (MNPopup * self) G_GNUC_UNUSED;
-#line 58 "mn-popup.c"
-#line 66 "src/mn-popup.gob"
-static void mn_popup_add_actions (MNPopup * self) G_GNUC_UNUSED;
-#line 61 "mn-popup.c"
-#line 102 "src/mn-popup.gob"
-static void mn_popup_action_cb (NotifyNotification * notification, char * id, gpointer user_data) G_GNUC_UNUSED;
-#line 64 "mn-popup.c"
-#line 115 "src/mn-popup.gob"
-static void mn_popup_action_done_cb (MNMessageAction * action, GError * err, gpointer data) G_GNUC_UNUSED;
-#line 67 "mn-popup.c"
-#line 122 "src/mn-popup.gob"
-static void mn_popup_closed_h (NotifyNotification * notification, gpointer user_data) G_GNUC_UNUSED;
-#line 70 "mn-popup.c"
-#line 129 "src/mn-popup.gob"
-static void mn_popup_append_row (GString * body, const char * name, const char * value) G_GNUC_UNUSED;
-#line 73 "mn-popup.c"
-#line 146 "src/mn-popup.gob"
-static int mn_popup_get_conf_timeout (void) G_GNUC_UNUSED;
-#line 76 "mn-popup.c"
-
-enum {
- PROP_0,
- PROP_MESSAGE
-};
-
-/* pointer to the class of our parent */
-static NotifyNotificationClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_add_actions mn_popup_add_actions
-#define self_action_cb mn_popup_action_cb
-#define self_action_done_cb mn_popup_action_done_cb
-#define self_closed_h mn_popup_closed_h
-#define self_append_row mn_popup_append_row
-#define self_get_conf_timeout mn_popup_get_conf_timeout
-#define self_show mn_popup_show
-#define self_close mn_popup_close
-#define self_new mn_popup_new
-GType
-mn_popup_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNPopupClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_popup_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNPopup),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_popup_init,
- NULL
- };
-
- type = g_type_register_static (NOTIFY_TYPE_NOTIFICATION, "MNPopup", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNPopup *)g_object_new(mn_popup_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNPopup * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNPopup *
-GET_NEW_VARG (const char *first, ...)
-{
- MNPopup *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNPopup *)g_object_new_valist (mn_popup_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:Popup::constructor"
- GObject *obj_self;
- MNPopup *self;
- obj_self = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
- self = MN_POPUP (obj_self);
-#line 40 "src/mn-popup.gob"
- mn_popup_constructor (self);
-#line 149 "mn-popup.c"
- return obj_self;
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Popup::dispose"
- MNPopup *self G_GNUC_UNUSED = MN_POPUP (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 34 "src/mn-popup.gob"
- if(self->_priv->message) { g_object_unref ((gpointer) self->_priv->message); self->_priv->message = NULL; }
-#line 164 "mn-popup.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Popup::finalize"
- MNPopup *self G_GNUC_UNUSED = MN_POPUP (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_popup_init (MNPopup * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Popup::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_POPUP,MNPopupPrivate);
-}
-#undef __GOB_FUNCTION__
-static void
-mn_popup_class_init (MNPopupClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Popup::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNPopupPrivate));
-
- parent_class = g_type_class_ref (NOTIFY_TYPE_NOTIFICATION);
-
- g_object_class->constructor = ___constructor;
- 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_object
- ("message" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- MN_TYPE_MESSAGE /* object_type */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_MESSAGE,
- 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:Popup::set_property"
-{
- MNPopup *self G_GNUC_UNUSED;
-
- self = MN_POPUP (object);
-
- switch (property_id) {
- case PROP_MESSAGE:
- {
-#line 35 "src/mn-popup.gob"
-{ GObject *___old = (GObject *)self->_priv->message; self->_priv->message = (MNMessage *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
-#line 234 "mn-popup.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:Popup::get_property"
-{
- MNPopup *self G_GNUC_UNUSED;
-
- self = MN_POPUP (object);
-
- switch (property_id) {
- case PROP_MESSAGE:
- {
-#line 35 "src/mn-popup.gob"
-g_value_set_object (VAL, (gpointer)self->_priv->message);
-#line 265 "mn-popup.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 40 "src/mn-popup.gob"
-static void
-mn_popup_constructor (MNPopup * self G_GNUC_UNUSED)
-{
-#line 286 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::constructor"
-{
-#line 41 "src/mn-popup.gob"
-
- GString *body;
-
- body = g_string_new(NULL);
- self_append_row(body, _("Mailbox:"), selfp->message->mailbox->runtime_name);
- self_append_row(body, _("From:"), selfp->message->from);
- self_append_row(body, _("Subject:"), selfp->message->subject);
-
- g_object_set(self,
- "body", body->str,
- "icon-name", "stock_mail",
- NULL);
-
- if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED)
- g_object_set(self, "attach-widget", mn_shell->icon, NULL);
-
- g_string_free(body, TRUE);
-
- self_add_actions(self);
-
- notify_notification_set_timeout(NOTIFY_NOTIFICATION(self), self_get_conf_timeout());
-
- g_signal_connect(self, "closed", G_CALLBACK(self_closed_h), NULL);
- }}
-#line 314 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 66 "src/mn-popup.gob"
-static void
-mn_popup_add_actions (MNPopup * self)
-{
-#line 321 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::add_actions"
-#line 66 "src/mn-popup.gob"
- g_return_if_fail (self != NULL);
-#line 66 "src/mn-popup.gob"
- g_return_if_fail (MN_IS_POPUP (self));
-#line 327 "mn-popup.c"
-{
-#line 68 "src/mn-popup.gob"
-
- GSList *actions;
- GSList *l;
-
- /*
- * Note that notification-daemon currently assigns icons to
- * actions by prepending "stock_" to the action ID.
- */
-
- actions = mn_conf_get_string_list(MN_CONF_POPUPS_ACTIONS);
-
- MN_LIST_FOREACH(l, actions)
- {
- char *name = l->data;
- MNMessageAction *action;
-
- action = mn_message_get_action(name);
- if (action)
- {
- if (mn_message_can_perform_action(selfp->message, action))
- notify_notification_add_action(NOTIFY_NOTIFICATION(self),
- action->icon,
- _(action->label),
- self_action_cb,
- action,
- NULL);
- }
- else
- g_warning(_("configuration key %s: there is no action named \"%s\""), MN_CONF_POPUPS_ACTIONS, name);
- }
-
- mn_g_slist_free_deep(actions);
- }}
-#line 363 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 102 "src/mn-popup.gob"
-static void
-mn_popup_action_cb (NotifyNotification * notification, char * id, gpointer user_data)
-{
-#line 370 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::action_cb"
-{
-#line 104 "src/mn-popup.gob"
-
- Self *self = SELF(notification);
- MNMessageAction *action = user_data;
-
- GDK_THREADS_ENTER();
-
- mn_message_perform_action(selfp->message, action, self_action_done_cb, self);
-
- GDK_THREADS_LEAVE();
- }}
-#line 384 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 115 "src/mn-popup.gob"
-static void
-mn_popup_action_done_cb (MNMessageAction * action, GError * err, gpointer data)
-{
-#line 391 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::action_done_cb"
-{
-#line 117 "src/mn-popup.gob"
-
- if (err && ! g_error_matches(err, MN_MESSAGE_ACTION_ERROR, MN_MESSAGE_ACTION_ERROR_CANCELLED))
- mn_show_error_dialog(NULL, _(action->error_message), "%s", err->message);
- }}
-#line 399 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 122 "src/mn-popup.gob"
-static void
-mn_popup_closed_h (NotifyNotification * notification, gpointer user_data)
-{
-#line 406 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::closed_h"
-{
-#line 124 "src/mn-popup.gob"
-
- Self *self = SELF(notification);
- self->visible = FALSE;
- }}
-#line 414 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 129 "src/mn-popup.gob"
-static void
-mn_popup_append_row (GString * body, const char * name, const char * value)
-{
-#line 421 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::append_row"
-#line 129 "src/mn-popup.gob"
- g_return_if_fail (body != NULL);
-#line 129 "src/mn-popup.gob"
- g_return_if_fail (name != NULL);
-#line 129 "src/mn-popup.gob"
- g_return_if_fail (value != NULL);
-#line 429 "mn-popup.c"
-{
-#line 133 "src/mn-popup.gob"
-
- char *escaped;
-
- if (*body->str)
- g_string_append_c(body, '\n');
-
- g_string_append_printf(body, "<span weight=\"bold\">%s</span>", name);
-
- escaped = g_markup_escape_text(value, -1);
- g_string_append_printf(body, " %s", escaped);
- g_free(escaped);
- }}
-#line 444 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 146 "src/mn-popup.gob"
-static int
-mn_popup_get_conf_timeout (void)
-{
-#line 451 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::get_conf_timeout"
-{
-#line 148 "src/mn-popup.gob"
-
- switch (mn_conf_get_enum_value(MN_TYPE_EXPIRATION_ENABLED, MN_CONF_POPUPS_EXPIRATION_ENABLED))
- {
- case MN_EXPIRATION_ENABLED_DEFAULT:
- return NOTIFY_EXPIRES_DEFAULT;
-
- case MN_EXPIRATION_ENABLED_FALSE:
- return NOTIFY_EXPIRES_NEVER;
-
- case MN_EXPIRATION_ENABLED_TRUE:
- return mn_conf_get_int(MN_CONF_POPUPS_EXPIRATION_DELAY) * 1000;
-
- default:
- g_assert_not_reached();
- return 0;
- }
- }}
-#line 472 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 166 "src/mn-popup.gob"
-void
-mn_popup_show (MNPopup * self)
-{
-#line 479 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::show"
-#line 166 "src/mn-popup.gob"
- g_return_if_fail (self != NULL);
-#line 166 "src/mn-popup.gob"
- g_return_if_fail (MN_IS_POPUP (self));
-#line 485 "mn-popup.c"
-{
-#line 168 "src/mn-popup.gob"
-
- GError *err = NULL;
-
- if (self->visible)
- return;
-
- if (! notify_notification_show(NOTIFY_NOTIFICATION(self), &err))
- {
- g_warning(_("unable to show popup: %s"), err->message);
- g_error_free(err);
- }
-
- self->visible = TRUE;
- g_get_current_time(&self->show_timestamp);
- }}
-#line 503 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 184 "src/mn-popup.gob"
-void
-mn_popup_close (MNPopup * self)
-{
-#line 510 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::close"
-#line 184 "src/mn-popup.gob"
- g_return_if_fail (self != NULL);
-#line 184 "src/mn-popup.gob"
- g_return_if_fail (MN_IS_POPUP (self));
-#line 516 "mn-popup.c"
-{
-#line 186 "src/mn-popup.gob"
-
- GError *err = NULL;
-
- if (! self->visible)
- return;
-
- if (! notify_notification_close(NOTIFY_NOTIFICATION(self), &err))
- {
- g_warning(_("unable to close popup: %s"), err->message);
- g_error_free(err);
- }
- }}
-#line 531 "mn-popup.c"
-#undef __GOB_FUNCTION__
-
-#line 199 "src/mn-popup.gob"
-MNPopup *
-mn_popup_new (MNMessage * message)
-{
-#line 538 "mn-popup.c"
-#define __GOB_FUNCTION__ "MN:Popup::new"
-#line 199 "src/mn-popup.gob"
- g_return_val_if_fail (message != NULL, (MNPopup * )0);
-#line 199 "src/mn-popup.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (message), (MNPopup * )0);
-#line 544 "mn-popup.c"
-{
-#line 201 "src/mn-popup.gob"
-
- /* we set the summary here because libnotify requires it */
-
- /* translators: header capitalization */
- return GET_NEW_VARG("summary", _("New Message"),
- MN_POPUP_PROP_MESSAGE(message),
- NULL);
- }}
-#line 555 "mn-popup.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-popup.gob.stamp b/build/src/mn-popup.gob.stamp
diff --git a/build/src/mn-popup.h b/build/src/mn-popup.h
@@ -1,87 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <libnotify/notify.h>
-#include "mn-message.h"
-
-#ifndef __MN_POPUP_H__
-#define __MN_POPUP_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_POPUP (mn_popup_get_type())
-#define MN_POPUP(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_popup_get_type(), MNPopup)
-#define MN_POPUP_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_popup_get_type(), MNPopup const)
-#define MN_POPUP_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_popup_get_type(), MNPopupClass)
-#define MN_IS_POPUP(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_popup_get_type ())
-
-#define MN_POPUP_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_popup_get_type(), MNPopupClass)
-
-/* Private structure type */
-typedef struct _MNPopupPrivate MNPopupPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_POPUP__
-#define __TYPEDEF_MN_POPUP__
-typedef struct _MNPopup MNPopup;
-#endif
-struct _MNPopup {
- NotifyNotification __parent__;
- /*< public >*/
- gboolean visible;
- GTimeVal show_timestamp;
- /*< private >*/
- MNPopupPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNPopupClass MNPopupClass;
-struct _MNPopupClass {
- NotifyNotificationClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_popup_get_type (void) G_GNUC_CONST;
-#line 166 "src/mn-popup.gob"
-void mn_popup_show (MNPopup * self);
-#line 64 "mn-popup.h"
-#line 184 "src/mn-popup.gob"
-void mn_popup_close (MNPopup * self);
-#line 67 "mn-popup.h"
-#line 199 "src/mn-popup.gob"
-MNPopup * mn_popup_new (MNMessage * message);
-#line 70 "mn-popup.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_POPUP_PROP_MESSAGE(arg) "message", __extension__ ({MNMessage * z = (arg); z;})
-#define MN_POPUP_GET_PROP_MESSAGE(arg) "message", __extension__ ({MNMessage * *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_POPUP_PROP_MESSAGE(arg) "message",(MNMessage * )(arg)
-#define MN_POPUP_GET_PROP_MESSAGE(arg) "message",(MNMessage * *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-popups-private.h b/build/src/mn-popups-private.h
@@ -1,22 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_POPUPS_PRIVATE_H__
-#define __MN_POPUPS_PRIVATE_H__
-
-#include "mn-popups.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNPopupsPrivate {
-#line 38 "src/mn-popups.gob"
- GHashTable * popups;
-#line 16 "mn-popups-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-popups.c b/build/src/mn-popups.c
@@ -1,531 +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-popups.h"
-
-#include "mn-popups-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 20 "src/mn-popups.gob"
-
-#include <libnotify/notify.h>
-#include "mn-message.h"
-#include "mn-shell.h"
-#include "mn-util.h"
-#include "mn-conf.h"
-#include "mn-locked-callback.h"
-#include "mn-popup.h"
-#include "mn-properties-dialog.h"
-
-#line 37 "mn-popups.c"
-/* self casting macros */
-#define SELF(x) MN_POPUPS(x)
-#define SELF_CONST(x) MN_POPUPS_CONST(x)
-#define IS_SELF(x) MN_IS_POPUPS(x)
-#define TYPE_SELF MN_TYPE_POPUPS
-#define SELF_CLASS(x) MN_POPUPS_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_POPUPS_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNPopups Self;
-typedef MNPopupsClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-popups.gob"
-static void mn_popups_class_init (MNPopupsClass * c) G_GNUC_UNUSED;
-#line 54 "mn-popups.c"
-#line 40 "src/mn-popups.gob"
-static void mn_popups_init (MNPopups * self) G_GNUC_UNUSED;
-#line 57 "mn-popups.c"
-#line 52 "src/mn-popups.gob"
-static void mn_popups_close_cb (const char * id, MNPopup * popup, gpointer user_data) G_GNUC_UNUSED;
-#line 60 "mn-popups.c"
-#line 59 "src/mn-popups.gob"
-static void mn_popups_close_popups (MNPopups * self) G_GNUC_UNUSED;
-#line 63 "mn-popups.c"
-#line 65 "src/mn-popups.gob"
-static void mn_popups_finalize (MNPopups * self) G_GNUC_UNUSED;
-#line 66 "mn-popups.c"
-#line 71 "src/mn-popups.gob"
-static void mn_popups_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
-#line 69 "mn-popups.c"
-#line 81 "src/mn-popups.gob"
-static void mn_popups_notify_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-#line 72 "mn-popups.c"
-#line 92 "src/mn-popups.gob"
-static int mn_popups_popups_show_timestamp_compare_cb (MNPopup * a, MNPopup * b) G_GNUC_UNUSED;
-#line 75 "mn-popups.c"
-#line 104 "src/mn-popups.gob"
-static void mn_popups_get_visible_popups_cb (const char * id, MNPopup * popup, GSList ** list) G_GNUC_UNUSED;
-#line 78 "mn-popups.c"
-#line 112 "src/mn-popups.gob"
-static GSList * mn_popups_get_visible_popups (MNPopups * self) G_GNUC_UNUSED;
-#line 81 "mn-popups.c"
-#line 122 "src/mn-popups.gob"
-static gboolean mn_popups_close_and_remove_stale_cb (const char * id, MNPopup * popup, GHashTable * messages) G_GNUC_UNUSED;
-#line 84 "mn-popups.c"
-#line 136 "src/mn-popups.gob"
-static gboolean mn_popups_close_and_remove_visible_cb (const char * id, MNPopup * popup, gpointer user_data) G_GNUC_UNUSED;
-#line 87 "mn-popups.c"
-#line 149 "src/mn-popups.gob"
-static void mn_popups_update (MNPopups * self, gboolean reshow_current_popups) G_GNUC_UNUSED;
-#line 90 "mn-popups.c"
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_close_cb mn_popups_close_cb
-#define self_close_popups mn_popups_close_popups
-#define self_messages_changed_h mn_popups_messages_changed_h
-#define self_notify_cb mn_popups_notify_cb
-#define self_popups_show_timestamp_compare_cb mn_popups_popups_show_timestamp_compare_cb
-#define self_get_visible_popups_cb mn_popups_get_visible_popups_cb
-#define self_get_visible_popups mn_popups_get_visible_popups
-#define self_close_and_remove_stale_cb mn_popups_close_and_remove_stale_cb
-#define self_close_and_remove_visible_cb mn_popups_close_and_remove_visible_cb
-#define self_update mn_popups_update
-#define self_new mn_popups_new
-GType
-mn_popups_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNPopupsClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_popups_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNPopups),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_popups_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNPopups", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNPopups *)g_object_new(mn_popups_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNPopups * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNPopups *
-GET_NEW_VARG (const char *first, ...)
-{
- MNPopups *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNPopups *)g_object_new_valist (mn_popups_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Popups::finalize"
- MNPopups *self G_GNUC_UNUSED = MN_POPUPS (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 65 "src/mn-popups.gob"
- mn_popups_finalize (self);
-#line 158 "mn-popups.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 38 "src/mn-popups.gob"
- if(self->_priv->popups) { g_hash_table_destroy ((gpointer) self->_priv->popups); self->_priv->popups = NULL; }
-#line 163 "mn-popups.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_popups_class_init (MNPopupsClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Popups::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNPopupsPrivate));
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-#line 40 "src/mn-popups.gob"
-static void
-mn_popups_init (MNPopups * self G_GNUC_UNUSED)
-{
-#line 184 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_POPUPS,MNPopupsPrivate);
-#line 38 "src/mn-popups.gob"
- self->_priv->popups = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) mn_g_object_null_unref);
-#line 189 "mn-popups.c"
- {
-#line 41 "src/mn-popups.gob"
-
- if (! notify_is_initted())
- return; /* libnotify init failed */
-
- mn_g_object_gconf_notifications_add_gdk_locked(self,
- MN_CONF_POPUPS_NAMESPACE, self_notify_cb, self,
- NULL);
-
- g_signal_connect(mn_shell->mailboxes, "messages-changed", G_CALLBACK(self_messages_changed_h), self);
-
-#line 202 "mn-popups.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 52 "src/mn-popups.gob"
-static void
-mn_popups_close_cb (const char * id, MNPopup * popup, gpointer user_data)
-{
-#line 213 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::close_cb"
-{
-#line 54 "src/mn-popups.gob"
-
- if (popup)
- mn_popup_close(popup);
- }}
-#line 221 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 59 "src/mn-popups.gob"
-static void
-mn_popups_close_popups (MNPopups * self)
-{
-#line 228 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::close_popups"
-#line 59 "src/mn-popups.gob"
- g_return_if_fail (self != NULL);
-#line 59 "src/mn-popups.gob"
- g_return_if_fail (MN_IS_POPUPS (self));
-#line 234 "mn-popups.c"
-{
-#line 61 "src/mn-popups.gob"
-
- g_hash_table_foreach(selfp->popups, (GHFunc) self_close_cb, NULL);
- }}
-#line 240 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 65 "src/mn-popups.gob"
-static void
-mn_popups_finalize (MNPopups * self G_GNUC_UNUSED)
-{
-#line 247 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::finalize"
-{
-#line 66 "src/mn-popups.gob"
-
- /* close popups on exit */
- self_close_popups(self);
- }}
-#line 255 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 71 "src/mn-popups.gob"
-static void
-mn_popups_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data)
-{
-#line 262 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::messages_changed_h"
-{
-#line 75 "src/mn-popups.gob"
-
- Self *self = user_data;
-
- self_update(self, FALSE);
- }}
-#line 271 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 81 "src/mn-popups.gob"
-static void
-mn_popups_notify_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-{
-#line 278 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::notify_cb"
-{
-#line 86 "src/mn-popups.gob"
-
- Self *self = user_data;
-
- self_update(self, TRUE);
- }}
-#line 287 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 92 "src/mn-popups.gob"
-static int
-mn_popups_popups_show_timestamp_compare_cb (MNPopup * a, MNPopup * b)
-{
-#line 294 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::popups_show_timestamp_compare_cb"
-{
-#line 94 "src/mn-popups.gob"
-
- int cmp;
-
- cmp = a->show_timestamp.tv_sec - b->show_timestamp.tv_sec;
- if (cmp != 0)
- return cmp;
-
- return a->show_timestamp.tv_usec - b->show_timestamp.tv_usec;
- }}
-#line 307 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 104 "src/mn-popups.gob"
-static void
-mn_popups_get_visible_popups_cb (const char * id, MNPopup * popup, GSList ** list)
-{
-#line 314 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::get_visible_popups_cb"
-{
-#line 106 "src/mn-popups.gob"
-
- if (popup && popup->visible)
- *list = g_slist_insert_sorted(*list, popup, (GCompareFunc) self_popups_show_timestamp_compare_cb);
- }}
-#line 322 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 112 "src/mn-popups.gob"
-static GSList *
-mn_popups_get_visible_popups (MNPopups * self)
-{
-#line 329 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::get_visible_popups"
-#line 112 "src/mn-popups.gob"
- g_return_val_if_fail (self != NULL, (GSList * )0);
-#line 112 "src/mn-popups.gob"
- g_return_val_if_fail (MN_IS_POPUPS (self), (GSList * )0);
-#line 335 "mn-popups.c"
-{
-#line 114 "src/mn-popups.gob"
-
- GSList *popups = NULL;
-
- g_hash_table_foreach(selfp->popups, (GHFunc) self_get_visible_popups_cb, &popups);
-
- return popups;
- }}
-#line 345 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 122 "src/mn-popups.gob"
-static gboolean
-mn_popups_close_and_remove_stale_cb (const char * id, MNPopup * popup, GHashTable * messages)
-{
-#line 352 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::close_and_remove_stale_cb"
-{
-#line 124 "src/mn-popups.gob"
-
- if (! g_hash_table_lookup(mn_shell->mailboxes->messages_hash_table, id))
- {
- if (popup)
- mn_popup_close(popup);
-
- return TRUE; /* remove */
- }
- else
- return FALSE; /* keep */
- }}
-#line 367 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 136 "src/mn-popups.gob"
-static gboolean
-mn_popups_close_and_remove_visible_cb (const char * id, MNPopup * popup, gpointer user_data)
-{
-#line 374 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::close_and_remove_visible_cb"
-{
-#line 138 "src/mn-popups.gob"
-
- if (popup && popup->visible)
- {
- mn_popup_close(popup);
-
- return TRUE; /* remove */
- }
- else
- return FALSE; /* keep */
- }}
-#line 388 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 149 "src/mn-popups.gob"
-static void
-mn_popups_update (MNPopups * self, gboolean reshow_current_popups)
-{
-#line 395 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::update"
-#line 149 "src/mn-popups.gob"
- g_return_if_fail (self != NULL);
-#line 149 "src/mn-popups.gob"
- g_return_if_fail (MN_IS_POPUPS (self));
-#line 401 "mn-popups.c"
-{
-#line 151 "src/mn-popups.gob"
-
- int i;
-
- /* close and remove stale popups */
- g_hash_table_foreach_remove(selfp->popups, (GHRFunc) self_close_and_remove_stale_cb, NULL);
-
- if (reshow_current_popups)
- /*
- * We have to reshow the currently visible popups, so close and
- * remove them.
- */
- g_hash_table_foreach_remove(selfp->popups, (GHRFunc) self_close_and_remove_visible_cb, NULL);
-
- if (mn_conf_get_bool(MN_CONF_POPUPS_ENABLED))
- {
- GPtrArray *messages; /* for O(1) length retrieval and indexing */
- GSList *visible_popups;
- int num_visible_popups;
- int popup_limit;
- int new_popup_count;
- int messages_to_popup; /* the number of messages to popup */
-
- if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED)
- /* the popup is attached to the icon: allow at most one popup */
- popup_limit = 1;
- else
- popup_limit = mn_conf_get_int(MN_CONF_POPUPS_LIMIT);
-
- /* build a list of messages which are not already known */
-
- messages = g_ptr_array_new();
-
- MN_ARRAY_FOREACH(i, mn_shell->mailboxes->messages)
- {
- MNMessage *message = g_ptr_array_index(mn_shell->mailboxes->messages, i);
- gpointer ptr;
-
- if (! g_hash_table_lookup_extended(selfp->popups, message->id, NULL, &ptr))
- g_ptr_array_add(messages, message);
- }
-
- visible_popups = self_get_visible_popups(self);
- num_visible_popups = g_slist_length(visible_popups);
-
- new_popup_count = num_visible_popups + messages->len;
- if (new_popup_count > popup_limit)
- {
- int to_remove;
-
- /* make room for n new popups by closing the n oldest popups */
-
- to_remove = new_popup_count - popup_limit;
- to_remove = MIN(num_visible_popups, to_remove);
-
- while (to_remove > 0)
- {
- MNPopup *oldest;
-
- g_assert(visible_popups != NULL);
-
- oldest = visible_popups->data;
- mn_popup_close(oldest);
-
- visible_popups = g_slist_delete_link(visible_popups, visible_popups);
- to_remove--;
- }
- }
-
- g_slist_free(visible_popups);
-
- messages_to_popup = MIN(messages->len, popup_limit);
-
- /*
- * Below we iterate over the messages array backwards because
- * it is sorted by sent time most recent first, while we want
- * to popup the oldest messages first.
- */
-
- /* register the messages which we will not popup */
-
- for (i = messages->len - 1; i >= messages_to_popup; i--)
- {
- MNMessage *message = g_ptr_array_index(messages, i);
-
- g_hash_table_replace(selfp->popups, g_strdup(message->id), NULL);
- }
-
- /* popup the first messages_to_popup messages */
-
- for (i = messages_to_popup - 1; i >= 0; i--)
- {
- MNMessage *message = g_ptr_array_index(messages, i);
- MNPopup *popup;
-
- popup = mn_popup_new(message);
- mn_popup_show(popup);
-
- g_hash_table_replace(selfp->popups, g_strdup(message->id), popup);
- }
-
- g_ptr_array_free(messages, TRUE);
- }
- else
- {
- /* register the new messages */
-
- MN_ARRAY_FOREACH(i, mn_shell->mailboxes->messages)
- {
- MNMessage *message = g_ptr_array_index(mn_shell->mailboxes->messages, i);
- g_hash_table_replace(selfp->popups, g_strdup(message->id), NULL);
- }
- }
- }}
-#line 517 "mn-popups.c"
-#undef __GOB_FUNCTION__
-
-#line 265 "src/mn-popups.gob"
-MNPopups *
-mn_popups_new (void)
-{
-#line 524 "mn-popups.c"
-#define __GOB_FUNCTION__ "MN:Popups::new"
-{
-#line 267 "src/mn-popups.gob"
-
- return GET_NEW;
- }}
-#line 531 "mn-popups.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-popups.gob.stamp b/build/src/mn-popups.gob.stamp
diff --git a/build/src/mn-popups.h b/build/src/mn-popups.h
@@ -1,61 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-#ifndef __MN_POPUPS_H__
-#define __MN_POPUPS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_POPUPS (mn_popups_get_type())
-#define MN_POPUPS(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_popups_get_type(), MNPopups)
-#define MN_POPUPS_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_popups_get_type(), MNPopups const)
-#define MN_POPUPS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_popups_get_type(), MNPopupsClass)
-#define MN_IS_POPUPS(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_popups_get_type ())
-
-#define MN_POPUPS_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_popups_get_type(), MNPopupsClass)
-
-/* Private structure type */
-typedef struct _MNPopupsPrivate MNPopupsPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_POPUPS__
-#define __TYPEDEF_MN_POPUPS__
-typedef struct _MNPopups MNPopups;
-#endif
-struct _MNPopups {
- GObject __parent__;
- /*< private >*/
- MNPopupsPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNPopupsClass MNPopupsClass;
-struct _MNPopupsClass {
- GObjectClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_popups_get_type (void) G_GNUC_CONST;
-#line 265 "src/mn-popups.gob"
-MNPopups * mn_popups_new (void);
-#line 56 "mn-popups.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-properties-dialog-private.h b/build/src/mn-properties-dialog-private.h
@@ -1,92 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_PROPERTIES_DIALOG_PRIVATE_H__
-#define __MN_PROPERTIES_DIALOG_PRIVATE_H__
-
-#include "mn-properties-dialog.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 24 "src/mn-properties-dialog.gob"
-
-#include "mn-mailbox.h"
-
-#line 18 "mn-properties-dialog-private.h"
-struct _MNPropertiesDialogPrivate {
-#line 50 "src/mn-properties-dialog.gob"
- GtkWidget * notebook;
-#line 53 "src/mn-properties-dialog.gob"
- GtkWidget * play_sound_hbox;
-#line 54 "src/mn-properties-dialog.gob"
- GtkWidget * play_sound_check;
-#line 55 "src/mn-properties-dialog.gob"
- GtkWidget * play_sound_file_chooser_button;
-#line 56 "src/mn-properties-dialog.gob"
- GtkWidget * scrolled;
-#line 57 "src/mn-properties-dialog.gob"
- GtkWidget * list;
-#line 58 "src/mn-properties-dialog.gob"
- GtkWidget * selected_label;
-#line 59 "src/mn-properties-dialog.gob"
- GtkWidget * add;
-#line 60 "src/mn-properties-dialog.gob"
- GtkWidget * remove;
-#line 61 "src/mn-properties-dialog.gob"
- GtkWidget * properties;
-#line 64 "src/mn-properties-dialog.gob"
- GtkWidget * icon_action_mail_reader_radio;
-#line 65 "src/mn-properties-dialog.gob"
- GtkWidget * icon_action_open_latest_message_radio;
-#line 66 "src/mn-properties-dialog.gob"
- GtkWidget * icon_action_consider_new_mail_as_read_radio;
-#line 67 "src/mn-properties-dialog.gob"
- GtkWidget * icon_action_update_radio;
-#line 70 "src/mn-properties-dialog.gob"
- GtkWidget * popups_enable_check;
-#line 71 "src/mn-properties-dialog.gob"
- GtkWidget * popups_position_section_label;
-#line 72 "src/mn-properties-dialog.gob"
- GtkWidget * popups_position_attached_radio;
-#line 73 "src/mn-properties-dialog.gob"
- GtkWidget * popups_position_free_radio;
-#line 74 "src/mn-properties-dialog.gob"
- GtkWidget * popups_expiration_section_label;
-#line 75 "src/mn-properties-dialog.gob"
- GtkWidget * popups_expiration_default_radio;
-#line 76 "src/mn-properties-dialog.gob"
- GtkWidget * popups_expiration_never_radio;
-#line 77 "src/mn-properties-dialog.gob"
- GtkWidget * popups_expiration_after_radio;
-#line 78 "src/mn-properties-dialog.gob"
- GtkWidget * popups_expiration_scale;
-#line 80 "src/mn-properties-dialog.gob"
- MNMailbox * test_mailbox;
-#line 68 "mn-properties-dialog-private.h"
-};
-#line 279 "src/mn-properties-dialog.gob"
-void mn_properties_dialog_toggled_h (MNPropertiesDialog * self, GtkToggleButton * button);
-#line 72 "mn-properties-dialog-private.h"
-#line 285 "src/mn-properties-dialog.gob"
-void mn_properties_dialog_add_clicked_h (MNPropertiesDialog * self, GtkButton * button);
-#line 75 "mn-properties-dialog-private.h"
-#line 291 "src/mn-properties-dialog.gob"
-void mn_properties_dialog_remove_clicked_h (MNPropertiesDialog * self, GtkButton * button);
-#line 78 "mn-properties-dialog-private.h"
-#line 297 "src/mn-properties-dialog.gob"
-void mn_properties_dialog_properties_clicked_h (MNPropertiesDialog * self, GtkButton * button);
-#line 81 "mn-properties-dialog-private.h"
-#line 303 "src/mn-properties-dialog.gob"
-char * mn_properties_dialog_popups_expiration_format_value_h (MNPropertiesDialog * self, double arg, GtkScale * scale);
-#line 84 "mn-properties-dialog-private.h"
-#line 309 "src/mn-properties-dialog.gob"
-void mn_properties_dialog_test_messages_toggled_h (MNPropertiesDialog * self, GtkToggleButton * button);
-#line 87 "mn-properties-dialog-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-properties-dialog.c b/build/src/mn-properties-dialog.c
@@ -1,564 +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-properties-dialog.h"
-
-#include "mn-properties-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 28 "src/mn-properties-dialog.gob"
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include "mn-conf.h"
-#include "mn-util.h"
-#include "mn-mailbox-view.h"
-#include "mn-shell.h"
-#include "mn-file-chooser-button.h"
-#include "mn-sound-file-chooser-dialog.h"
-#include "mn-test-mailbox.h"
-#include "mn-non-linear-range.h"
-
-static const MNNonLinearRangeBlock expiration_blocks[] = {
- { MN_SECS(1), MN_SECS(10), MN_SECS(1) },
- { MN_SECS(15), MN_SECS(60), MN_SECS(5) },
- { MN_MINS(2), MN_MINS(10), MN_MINS(1) },
- { MN_MINS(15), MN_MINS(60), MN_MINS(5) }
-};
-
-#line 46 "mn-properties-dialog.c"
-/* self casting macros */
-#define SELF(x) MN_PROPERTIES_DIALOG(x)
-#define SELF_CONST(x) MN_PROPERTIES_DIALOG_CONST(x)
-#define IS_SELF(x) MN_IS_PROPERTIES_DIALOG(x)
-#define TYPE_SELF MN_TYPE_PROPERTIES_DIALOG
-#define SELF_CLASS(x) MN_PROPERTIES_DIALOG_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_PROPERTIES_DIALOG_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNPropertiesDialog Self;
-typedef MNPropertiesDialogClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-properties-dialog.gob"
-static void mn_properties_dialog_class_init (MNPropertiesDialogClass * c) G_GNUC_UNUSED;
-#line 63 "mn-properties-dialog.c"
-#line 82 "src/mn-properties-dialog.gob"
-static void mn_properties_dialog_init (MNPropertiesDialog * self) G_GNUC_UNUSED;
-#line 66 "mn-properties-dialog.c"
-#line 178 "src/mn-properties-dialog.gob"
-static GtkFileChooserDialog * mn_properties_dialog_play_sound_file_chooser_create_dialog_cb (gpointer data) G_GNUC_UNUSED;
-#line 69 "mn-properties-dialog.c"
-#line 184 "src/mn-properties-dialog.gob"
-static void mn_properties_dialog_remove_test_mailbox (MNPropertiesDialog * self) G_GNUC_UNUSED;
-#line 72 "mn-properties-dialog.c"
-#line 195 "src/mn-properties-dialog.gob"
-static void mn_properties_dialog_response_h (MNPropertiesDialog * self, int response, gpointer user_data) G_GNUC_UNUSED;
-#line 75 "mn-properties-dialog.c"
-#line 222 "src/mn-properties-dialog.gob"
-static void mn_properties_dialog_update_selected_label (MNPropertiesDialog * self) G_GNUC_UNUSED;
-#line 78 "mn-properties-dialog.c"
-#line 245 "src/mn-properties-dialog.gob"
-static void mn_properties_dialog_update_sensitivity (MNPropertiesDialog * self) G_GNUC_UNUSED;
-#line 81 "mn-properties-dialog.c"
-
-/* pointer to the class of our parent */
-static MNDialogClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_play_sound_file_chooser_create_dialog_cb mn_properties_dialog_play_sound_file_chooser_create_dialog_cb
-#define self_remove_test_mailbox mn_properties_dialog_remove_test_mailbox
-#define self_response_h mn_properties_dialog_response_h
-#define self_update_selected_label mn_properties_dialog_update_selected_label
-#define self_update_sensitivity mn_properties_dialog_update_sensitivity
-#define self_toggled_h mn_properties_dialog_toggled_h
-#define self_add_clicked_h mn_properties_dialog_add_clicked_h
-#define self_remove_clicked_h mn_properties_dialog_remove_clicked_h
-#define self_properties_clicked_h mn_properties_dialog_properties_clicked_h
-#define self_popups_expiration_format_value_h mn_properties_dialog_popups_expiration_format_value_h
-#define self_test_messages_toggled_h mn_properties_dialog_test_messages_toggled_h
-GType
-mn_properties_dialog_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNPropertiesDialogClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_properties_dialog_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNPropertiesDialog),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_properties_dialog_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_DIALOG, "MNPropertiesDialog", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNPropertiesDialog *)g_object_new(mn_properties_dialog_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNPropertiesDialog * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNPropertiesDialog *
-GET_NEW_VARG (const char *first, ...)
-{
- MNPropertiesDialog *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNPropertiesDialog *)g_object_new_valist (mn_properties_dialog_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::finalize"
- MNPropertiesDialog *self G_GNUC_UNUSED = MN_PROPERTIES_DIALOG (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#define test_mailbox (self->_priv->test_mailbox)
-#define VAR test_mailbox
- {
-#line 80 "src/mn-properties-dialog.gob"
- self_remove_test_mailbox(self); }
-#line 154 "mn-properties-dialog.c"
- memset(&test_mailbox, 0, sizeof(test_mailbox));
-#undef VAR
-#undef test_mailbox
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_properties_dialog_class_init (MNPropertiesDialogClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNPropertiesDialogPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_DIALOG);
-
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-#line 82 "src/mn-properties-dialog.gob"
-static void
-mn_properties_dialog_init (MNPropertiesDialog * self G_GNUC_UNUSED)
-{
-#line 178 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_PROPERTIES_DIALOG,MNPropertiesDialogPrivate);
- {
-#line 83 "src/mn-properties-dialog.gob"
-
- GtkTreeSelection *selection;
-
- mn_container_create_interface(GTK_CONTAINER(self),
- PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.glade",
- "main_vbox",
- "mn_properties_dialog_",
- "notebook", &selfp->notebook,
- "play_sound_hbox", &selfp->play_sound_hbox,
- "play_sound_check", &selfp->play_sound_check,
- "scrolled", &selfp->scrolled,
- "selected_label", &selfp->selected_label,
- "add", &selfp->add,
- "remove", &selfp->remove,
- "properties", &selfp->properties,
- "icon_action_mail_reader_radio", &selfp->icon_action_mail_reader_radio,
- "icon_action_open_latest_message_radio", &selfp->icon_action_open_latest_message_radio,
- "icon_action_consider_new_mail_as_read_radio", &selfp->icon_action_consider_new_mail_as_read_radio,
- "icon_action_update_radio", &selfp->icon_action_update_radio,
- "popups_enable_check", &selfp->popups_enable_check,
- "popups_position_section_label", &selfp->popups_position_section_label,
- "popups_position_attached_radio", &selfp->popups_position_attached_radio,
- "popups_position_free_radio", &selfp->popups_position_free_radio,
- "popups_expiration_section_label", &selfp->popups_expiration_section_label,
- "popups_expiration_default_radio", &selfp->popups_expiration_default_radio,
- "popups_expiration_never_radio", &selfp->popups_expiration_never_radio,
- "popups_expiration_after_radio", &selfp->popups_expiration_after_radio,
- "popups_expiration_scale", &selfp->popups_expiration_scale,
- NULL);
-
- /* translators: header capitalization */
- gtk_window_set_title(GTK_WINDOW(self), _("Mail Notification Properties"));
-
- gtk_dialog_add_buttons(GTK_DIALOG(self),
- GTK_STOCK_HELP, GTK_RESPONSE_HELP,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
- NULL);
-
- selfp->play_sound_file_chooser_button = mn_file_chooser_button_new(self_play_sound_file_chooser_create_dialog_cb, NULL);
- gtk_box_pack_start(GTK_BOX(selfp->play_sound_hbox), selfp->play_sound_file_chooser_button, TRUE, TRUE, 0);
- gtk_widget_show(selfp->play_sound_file_chooser_button);
-
- selfp->list = mn_mailbox_view_new();
- gtk_container_add(GTK_CONTAINER(selfp->scrolled), selfp->list);
- gtk_widget_show(selfp->list);
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(selfp->list));
- g_object_connect(selection,
- "swapped-signal::changed", self_update_selected_label, self,
- "swapped-signal::changed", self_update_sensitivity, self,
- NULL);
-
- mn_setup_dnd(selfp->scrolled);
-
- mn_non_linear_range_setup_static(GTK_RANGE(selfp->popups_expiration_scale), expiration_blocks, G_N_ELEMENTS(expiration_blocks));
-
- mn_conf_link_window(GTK_WINDOW(self), MN_CONF_PROPERTIES_DIALOG);
- mn_conf_link_object(selfp->play_sound_check, MN_CONF_SOUNDS_NEW_MAIL_ENABLED, "active");
- mn_conf_link_object(selfp->play_sound_file_chooser_button, MN_CONF_SOUNDS_NEW_MAIL_FILE, "filename");
- mn_conf_link_object(selfp->popups_enable_check, MN_CONF_POPUPS_ENABLED, "active");
- mn_conf_link_non_linear_range(GTK_RANGE(selfp->popups_expiration_scale), MN_CONF_POPUPS_EXPIRATION_DELAY);
- mn_conf_link_radio_group_to_enum(MN_TYPE_ACTION,
- MN_CONF_CLICK_ACTION,
- selfp->icon_action_mail_reader_radio, MN_ACTION_LAUNCH_MAIL_READER,
- selfp->icon_action_open_latest_message_radio, MN_ACTION_OPEN_LATEST_MESSAGE,
- selfp->icon_action_consider_new_mail_as_read_radio, MN_ACTION_CONSIDER_NEW_MAIL_AS_READ,
- selfp->icon_action_update_radio, MN_ACTION_UPDATE_MAIL_STATUS,
- NULL);
- mn_conf_link_radio_group_to_enum(MN_TYPE_POPUP_POSITION,
- MN_CONF_POPUPS_POSITION,
- selfp->popups_position_attached_radio, MN_POPUP_POSITION_ATTACHED,
- selfp->popups_position_free_radio, MN_POPUP_POSITION_FREE,
- NULL);
- mn_conf_link_radio_group_to_enum(MN_TYPE_EXPIRATION_ENABLED,
- MN_CONF_POPUPS_EXPIRATION_ENABLED,
- selfp->popups_expiration_default_radio, MN_EXPIRATION_ENABLED_DEFAULT,
- selfp->popups_expiration_never_radio, MN_EXPIRATION_ENABLED_FALSE,
- selfp->popups_expiration_after_radio, MN_EXPIRATION_ENABLED_TRUE,
- NULL);
-
- self_update_selected_label(self);
- self_update_sensitivity(self);
-
- /*
- * HIG chapter 3:
- * "When opening a dialog, provide initial keyboard focus to the
- * component that you expect users to operate first. This focus is
- * especially important for users who must use a keyboard to
- * navigate your application."
- */
- gtk_widget_grab_focus(selfp->add);
-
- g_signal_connect(self, "response", G_CALLBACK(self_response_h), NULL);
-
-#line 277 "mn-properties-dialog.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 178 "src/mn-properties-dialog.gob"
-static GtkFileChooserDialog *
-mn_properties_dialog_play_sound_file_chooser_create_dialog_cb (gpointer data)
-{
-#line 288 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::play_sound_file_chooser_create_dialog_cb"
-{
-#line 180 "src/mn-properties-dialog.gob"
-
- return GTK_FILE_CHOOSER_DIALOG(mn_sound_file_chooser_dialog_new());
- }}
-#line 295 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 184 "src/mn-properties-dialog.gob"
-static void
-mn_properties_dialog_remove_test_mailbox (MNPropertiesDialog * self)
-{
-#line 302 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::remove_test_mailbox"
-#line 184 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 184 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 308 "mn-properties-dialog.c"
-{
-#line 186 "src/mn-properties-dialog.gob"
-
- if (selfp->test_mailbox)
- {
- mn_mailboxes_remove(mn_shell->mailboxes, selfp->test_mailbox);
- g_object_unref(selfp->test_mailbox);
- selfp->test_mailbox = NULL;
- }
- }}
-#line 319 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 195 "src/mn-properties-dialog.gob"
-static void
-mn_properties_dialog_response_h (MNPropertiesDialog * self, int response, gpointer user_data)
-{
-#line 326 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::response_h"
-#line 195 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 195 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 332 "mn-properties-dialog.c"
-{
-#line 197 "src/mn-properties-dialog.gob"
-
- switch (response)
- {
- case GTK_RESPONSE_HELP:
- {
- int current_page;
- static const char *sections[] = {
- "properties-general",
- "properties-status-icon",
- "properties-message-popups"
- };
-
- current_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(selfp->notebook));
- g_assert(current_page >= 0 && current_page < G_N_ELEMENTS(sections));
-
- mn_show_help(GTK_WINDOW(self), sections[current_page]);
- break;
- }
-
- case GTK_RESPONSE_CLOSE:
- gtk_widget_destroy(GTK_WIDGET(self));
- break;
- }
- }}
-#line 359 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 222 "src/mn-properties-dialog.gob"
-static void
-mn_properties_dialog_update_selected_label (MNPropertiesDialog * self)
-{
-#line 366 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::update_selected_label"
-#line 222 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 222 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 372 "mn-properties-dialog.c"
-{
-#line 224 "src/mn-properties-dialog.gob"
-
- GtkTreeSelection *selection;
- int n_rows;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(selfp->list));
- n_rows = gtk_tree_selection_count_selected_rows(selection);
-
- if (n_rows == 0)
- gtk_label_set_text(GTK_LABEL(selfp->selected_label), _("No mailbox selected."));
- else
- {
- char *str;
-
- str = g_strdup_printf(ngettext("%i mailbox selected.",
- "%i mailboxes selected.",
- n_rows), n_rows);
- gtk_label_set_text(GTK_LABEL(selfp->selected_label), str);
- g_free(str);
- }
- }}
-#line 395 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 245 "src/mn-properties-dialog.gob"
-static void
-mn_properties_dialog_update_sensitivity (MNPropertiesDialog * self)
-{
-#line 402 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::update_sensitivity"
-#line 245 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 245 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 408 "mn-properties-dialog.c"
-{
-#line 247 "src/mn-properties-dialog.gob"
-
- gboolean play_sound_enabled;
- GtkTreeSelection *selection;
- gboolean has_selection;
- gboolean popups_enabled;
- gboolean popups_expiration_after_enabled;
-
- play_sound_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->play_sound_check));
-
- gtk_widget_set_sensitive(selfp->play_sound_file_chooser_button, play_sound_enabled);
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(selfp->list));
- has_selection = gtk_tree_selection_count_selected_rows(selection) > 0;
-
- gtk_widget_set_sensitive(selfp->remove, has_selection);
- gtk_widget_set_sensitive(selfp->properties, has_selection);
-
- popups_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->popups_enable_check));
- popups_expiration_after_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->popups_expiration_after_radio));
-
- gtk_widget_set_sensitive(selfp->popups_position_section_label, popups_enabled);
- gtk_widget_set_sensitive(selfp->popups_position_attached_radio, popups_enabled);
- gtk_widget_set_sensitive(selfp->popups_position_free_radio, popups_enabled);
- gtk_widget_set_sensitive(selfp->popups_expiration_section_label, popups_enabled);
- gtk_widget_set_sensitive(selfp->popups_expiration_default_radio, popups_enabled);
- gtk_widget_set_sensitive(selfp->popups_expiration_never_radio, popups_enabled);
- gtk_widget_set_sensitive(selfp->popups_expiration_after_radio, popups_enabled);
- gtk_widget_set_sensitive(selfp->popups_expiration_scale, popups_enabled && popups_expiration_after_enabled);
- }}
-#line 440 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 279 "src/mn-properties-dialog.gob"
-void
-mn_properties_dialog_toggled_h (MNPropertiesDialog * self, GtkToggleButton * button)
-{
-#line 447 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::toggled_h"
-#line 279 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 279 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 453 "mn-properties-dialog.c"
-{
-#line 281 "src/mn-properties-dialog.gob"
-
- self_update_sensitivity(self);
- }}
-#line 459 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 285 "src/mn-properties-dialog.gob"
-void
-mn_properties_dialog_add_clicked_h (MNPropertiesDialog * self, GtkButton * button)
-{
-#line 466 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::add_clicked_h"
-#line 285 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 285 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 472 "mn-properties-dialog.c"
-{
-#line 287 "src/mn-properties-dialog.gob"
-
- mn_mailbox_view_activate_add(MN_MAILBOX_VIEW(selfp->list));
- }}
-#line 478 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 291 "src/mn-properties-dialog.gob"
-void
-mn_properties_dialog_remove_clicked_h (MNPropertiesDialog * self, GtkButton * button)
-{
-#line 485 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::remove_clicked_h"
-#line 291 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 291 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 491 "mn-properties-dialog.c"
-{
-#line 293 "src/mn-properties-dialog.gob"
-
- mn_mailbox_view_activate_remove(MN_MAILBOX_VIEW(selfp->list));
- }}
-#line 497 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 297 "src/mn-properties-dialog.gob"
-void
-mn_properties_dialog_properties_clicked_h (MNPropertiesDialog * self, GtkButton * button)
-{
-#line 504 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::properties_clicked_h"
-#line 297 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 297 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 510 "mn-properties-dialog.c"
-{
-#line 299 "src/mn-properties-dialog.gob"
-
- mn_mailbox_view_activate_properties(MN_MAILBOX_VIEW(selfp->list));
- }}
-#line 516 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 303 "src/mn-properties-dialog.gob"
-char *
-mn_properties_dialog_popups_expiration_format_value_h (MNPropertiesDialog * self, double arg, GtkScale * scale)
-{
-#line 523 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::popups_expiration_format_value_h"
-#line 303 "src/mn-properties-dialog.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 303 "src/mn-properties-dialog.gob"
- g_return_val_if_fail (MN_IS_PROPERTIES_DIALOG (self), (char * )0);
-#line 529 "mn-properties-dialog.c"
-{
-#line 305 "src/mn-properties-dialog.gob"
-
- return mn_format_seconds(mn_non_linear_range_get_value(GTK_RANGE(scale)));
- }}
-#line 535 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 309 "src/mn-properties-dialog.gob"
-void
-mn_properties_dialog_test_messages_toggled_h (MNPropertiesDialog * self, GtkToggleButton * button)
-{
-#line 542 "mn-properties-dialog.c"
-#define __GOB_FUNCTION__ "MN:Properties:Dialog::test_messages_toggled_h"
-#line 309 "src/mn-properties-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 309 "src/mn-properties-dialog.gob"
- g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 548 "mn-properties-dialog.c"
-{
-#line 311 "src/mn-properties-dialog.gob"
-
- if (gtk_toggle_button_get_active(button))
- {
- if (! selfp->test_mailbox)
- {
- selfp->test_mailbox = mn_test_mailbox_new();
- mn_mailbox_seal(selfp->test_mailbox);
- mn_mailboxes_add(mn_shell->mailboxes, selfp->test_mailbox);
- }
- }
- else
- self_remove_test_mailbox(self);
- }}
-#line 564 "mn-properties-dialog.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-properties-dialog.gob.stamp b/build/src/mn-properties-dialog.gob.stamp
diff --git a/build/src/mn-properties-dialog.h b/build/src/mn-properties-dialog.h
@@ -1,62 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-dialog.h"
-
-#ifndef __MN_PROPERTIES_DIALOG_H__
-#define __MN_PROPERTIES_DIALOG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_PROPERTIES_DIALOG (mn_properties_dialog_get_type())
-#define MN_PROPERTIES_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_properties_dialog_get_type(), MNPropertiesDialog)
-#define MN_PROPERTIES_DIALOG_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_properties_dialog_get_type(), MNPropertiesDialog const)
-#define MN_PROPERTIES_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_properties_dialog_get_type(), MNPropertiesDialogClass)
-#define MN_IS_PROPERTIES_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_properties_dialog_get_type ())
-
-#define MN_PROPERTIES_DIALOG_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_properties_dialog_get_type(), MNPropertiesDialogClass)
-
-/* Private structure type */
-typedef struct _MNPropertiesDialogPrivate MNPropertiesDialogPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_PROPERTIES_DIALOG__
-#define __TYPEDEF_MN_PROPERTIES_DIALOG__
-typedef struct _MNPropertiesDialog MNPropertiesDialog;
-#endif
-struct _MNPropertiesDialog {
- MNDialog __parent__;
- /*< private >*/
- MNPropertiesDialogPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNPropertiesDialogClass MNPropertiesDialogClass;
-struct _MNPropertiesDialogClass {
- MNDialogClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_properties_dialog_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-reentrant-mailbox-private.h b/build/src/mn-reentrant-mailbox-private.h
@@ -1,32 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_REENTRANT_MAILBOX_PRIVATE_H__
-#define __MN_REENTRANT_MAILBOX_PRIVATE_H__
-
-#include "mn-reentrant-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNReentrantMailboxPrivate {
-#line 38 "src/mn-reentrant-mailbox.gob"
- unsigned int queue_check_id;
-#line 40 "src/mn-reentrant-mailbox.gob"
- int check_id;
-#line 41 "src/mn-reentrant-mailbox.gob"
- int check_unique_id;
-#line 20 "mn-reentrant-mailbox-private.h"
-};
-#line 69 "src/mn-reentrant-mailbox.gob"
-void mn_reentrant_mailbox_queue_check (MNReentrantMailbox * self);
-#line 24 "mn-reentrant-mailbox-private.h"
-#line 131 "src/mn-reentrant-mailbox.gob"
-gboolean mn_reentrant_mailbox_check_aborted (MNReentrantMailbox * self, int check_id);
-#line 27 "mn-reentrant-mailbox-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-reentrant-mailbox.c b/build/src/mn-reentrant-mailbox.c
@@ -1,349 +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-reentrant-mailbox.h"
-
-#include "mn-reentrant-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-reentrant-mailbox.gob"
-
-#include <gtk/gtk.h>
-#include "mn-mailbox-private.h"
-#include "mn-util.h"
-
-typedef struct
-{
- MNReentrantMailbox *self;
- int check_id;
-} CheckInfo;
-
-#line 38 "mn-reentrant-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_REENTRANT_MAILBOX(x)
-#define SELF_CONST(x) MN_REENTRANT_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_REENTRANT_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_REENTRANT_MAILBOX
-#define SELF_CLASS(x) MN_REENTRANT_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_REENTRANT_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNReentrantMailbox Self;
-typedef MNReentrantMailboxClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-reentrant-mailbox.gob"
-static void mn_reentrant_mailbox_init (MNReentrantMailbox * o) G_GNUC_UNUSED;
-#line 55 "mn-reentrant-mailbox.c"
-#line 0 "src/mn-reentrant-mailbox.gob"
-static void mn_reentrant_mailbox_class_init (MNReentrantMailboxClass * c) G_GNUC_UNUSED;
-#line 58 "mn-reentrant-mailbox.c"
-#line 43 "src/mn-reentrant-mailbox.gob"
-static void ___1_mn_reentrant_mailbox_removed (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 61 "mn-reentrant-mailbox.c"
-#line 54 "src/mn-reentrant-mailbox.gob"
-static void mn_reentrant_mailbox_finalize (MNReentrantMailbox * self) G_GNUC_UNUSED;
-#line 64 "mn-reentrant-mailbox.c"
-#line 76 "src/mn-reentrant-mailbox.gob"
-static gboolean mn_reentrant_mailbox_queue_check_cb (gpointer data) G_GNUC_UNUSED;
-#line 67 "mn-reentrant-mailbox.c"
-#line 87 "src/mn-reentrant-mailbox.gob"
-static void ___5_mn_reentrant_mailbox_check (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 70 "mn-reentrant-mailbox.c"
-#line 109 "src/mn-reentrant-mailbox.gob"
-static void mn_reentrant_mailbox_check_thread_cb (CheckInfo * info) G_GNUC_UNUSED;
-#line 73 "mn-reentrant-mailbox.c"
-#line 128 "src/mn-reentrant-mailbox.gob"
-static void mn_reentrant_mailbox_reentrant_check (MNReentrantMailbox * self, int check_id) G_GNUC_UNUSED;
-#line 76 "mn-reentrant-mailbox.c"
-
-/* pointer to the class of our parent */
-static MNMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_queue_check mn_reentrant_mailbox_queue_check
-#define self_queue_check_cb mn_reentrant_mailbox_queue_check_cb
-#define self_check_thread_cb mn_reentrant_mailbox_check_thread_cb
-#define self_reentrant_check mn_reentrant_mailbox_reentrant_check
-#define self_check_aborted mn_reentrant_mailbox_check_aborted
-GType
-mn_reentrant_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNReentrantMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_reentrant_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNReentrantMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_reentrant_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_MAILBOX, "MNReentrantMailbox", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNReentrantMailbox *)g_object_new(mn_reentrant_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNReentrantMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNReentrantMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNReentrantMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNReentrantMailbox *)g_object_new_valist (mn_reentrant_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::finalize"
- MNReentrantMailbox *self G_GNUC_UNUSED = MN_REENTRANT_MAILBOX (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 54 "src/mn-reentrant-mailbox.gob"
- mn_reentrant_mailbox_finalize (self);
-#line 138 "mn-reentrant-mailbox.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_reentrant_mailbox_init (MNReentrantMailbox * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_REENTRANT_MAILBOX,MNReentrantMailboxPrivate);
-}
-#undef __GOB_FUNCTION__
-static void
-mn_reentrant_mailbox_class_init (MNReentrantMailboxClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)c;
-
- g_type_class_add_private(c,sizeof(MNReentrantMailboxPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-
-#line 43 "src/mn-reentrant-mailbox.gob"
- mn_mailbox_class->removed = ___1_mn_reentrant_mailbox_removed;
-#line 87 "src/mn-reentrant-mailbox.gob"
- mn_mailbox_class->check = ___5_mn_reentrant_mailbox_check;
-#line 166 "mn-reentrant-mailbox.c"
- c->reentrant_check = NULL;
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 43 "src/mn-reentrant-mailbox.gob"
-static void
-___1_mn_reentrant_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 177 "mn-reentrant-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->removed) \
- (* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::removed"
-{
-#line 45 "src/mn-reentrant-mailbox.gob"
-
- Self *self = SELF(mailbox);
-
- PARENT_HANDLER(mailbox);
-
- /* abort the current check */
- g_atomic_int_set(&selfp->check_id, 0);
- }}
-#line 193 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 54 "src/mn-reentrant-mailbox.gob"
-static void
-mn_reentrant_mailbox_finalize (MNReentrantMailbox * self G_GNUC_UNUSED)
-{
-#line 201 "mn-reentrant-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::finalize"
-{
-#line 55 "src/mn-reentrant-mailbox.gob"
-
- if (selfp->queue_check_id)
- g_source_remove(selfp->queue_check_id);
- }}
-#line 209 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 69 "src/mn-reentrant-mailbox.gob"
-void
-mn_reentrant_mailbox_queue_check (MNReentrantMailbox * self)
-{
-#line 216 "mn-reentrant-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::queue_check"
-#line 69 "src/mn-reentrant-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 69 "src/mn-reentrant-mailbox.gob"
- g_return_if_fail (MN_IS_REENTRANT_MAILBOX (self));
-#line 222 "mn-reentrant-mailbox.c"
-{
-#line 71 "src/mn-reentrant-mailbox.gob"
-
- if (! selfp->queue_check_id)
- selfp->queue_check_id = gdk_threads_add_idle(self_queue_check_cb, self);
- }}
-#line 229 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 76 "src/mn-reentrant-mailbox.gob"
-static gboolean
-mn_reentrant_mailbox_queue_check_cb (gpointer data)
-{
-#line 236 "mn-reentrant-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::queue_check_cb"
-{
-#line 78 "src/mn-reentrant-mailbox.gob"
-
- Self *self = data;
-
- mn_mailbox_check(MN_MAILBOX(self));
-
- selfp->queue_check_id = 0;
- return FALSE; /* remove source */
- }}
-#line 248 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 87 "src/mn-reentrant-mailbox.gob"
-static void
-___5_mn_reentrant_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 254 "mn-reentrant-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->check) \
- (* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::check"
-{
-#line 89 "src/mn-reentrant-mailbox.gob"
-
- Self *self = SELF(mailbox);
- CheckInfo *info;
-
- PARENT_HANDLER(mailbox);
-
- mn_mailbox_set_error(mailbox, NULL);
-
- if (++selfp->check_unique_id == 0)
- ++selfp->check_unique_id;
-
- info = g_new(CheckInfo, 1);
- info->self = g_object_ref(self);
- info->check_id = selfp->check_unique_id;
-
- g_atomic_int_set(&selfp->check_id, info->check_id);
-
- mn_thread_create((GThreadFunc) self_check_thread_cb, info);
- }}
-#line 281 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 109 "src/mn-reentrant-mailbox.gob"
-static void
-mn_reentrant_mailbox_check_thread_cb (CheckInfo * info)
-{
-#line 289 "mn-reentrant-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::check_thread_cb"
-{
-#line 111 "src/mn-reentrant-mailbox.gob"
-
- Self *self = info->self;
-
- self_reentrant_check(self, info->check_id);
-
- g_atomic_int_compare_and_exchange(&selfp->check_id, info->check_id, 0);
-
- GDK_THREADS_ENTER();
-
- g_object_unref(self);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- g_free(info);
- }}
-#line 309 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 128 "src/mn-reentrant-mailbox.gob"
-static void
-mn_reentrant_mailbox_reentrant_check (MNReentrantMailbox * self, int check_id)
-{
-#line 316 "mn-reentrant-mailbox.c"
- MNReentrantMailboxClass *klass;
-#line 128 "src/mn-reentrant-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 128 "src/mn-reentrant-mailbox.gob"
- g_return_if_fail (MN_IS_REENTRANT_MAILBOX (self));
-#line 128 "src/mn-reentrant-mailbox.gob"
- g_return_if_fail (check_id != 0);
-#line 324 "mn-reentrant-mailbox.c"
- klass = MN_REENTRANT_MAILBOX_GET_CLASS(self);
-
- if(klass->reentrant_check)
- (*klass->reentrant_check)(self,check_id);
-}
-
-#line 131 "src/mn-reentrant-mailbox.gob"
-gboolean
-mn_reentrant_mailbox_check_aborted (MNReentrantMailbox * self, int check_id)
-{
-#line 335 "mn-reentrant-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::check_aborted"
-#line 131 "src/mn-reentrant-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 131 "src/mn-reentrant-mailbox.gob"
- g_return_val_if_fail (MN_IS_REENTRANT_MAILBOX (self), (gboolean )0);
-#line 131 "src/mn-reentrant-mailbox.gob"
- g_return_val_if_fail (check_id != 0, (gboolean )0);
-#line 343 "mn-reentrant-mailbox.c"
-{
-#line 133 "src/mn-reentrant-mailbox.gob"
-
- return g_atomic_int_get(&selfp->check_id) != check_id;
- }}
-#line 349 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-reentrant-mailbox.gob.stamp b/build/src/mn-reentrant-mailbox.gob.stamp
diff --git a/build/src/mn-reentrant-mailbox.h b/build/src/mn-reentrant-mailbox.h
@@ -1,63 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-mailbox.h"
-
-#ifndef __MN_REENTRANT_MAILBOX_H__
-#define __MN_REENTRANT_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_REENTRANT_MAILBOX (mn_reentrant_mailbox_get_type())
-#define MN_REENTRANT_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_reentrant_mailbox_get_type(), MNReentrantMailbox)
-#define MN_REENTRANT_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_reentrant_mailbox_get_type(), MNReentrantMailbox const)
-#define MN_REENTRANT_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_reentrant_mailbox_get_type(), MNReentrantMailboxClass)
-#define MN_IS_REENTRANT_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_reentrant_mailbox_get_type ())
-
-#define MN_REENTRANT_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_reentrant_mailbox_get_type(), MNReentrantMailboxClass)
-
-/* Private structure type */
-typedef struct _MNReentrantMailboxPrivate MNReentrantMailboxPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_REENTRANT_MAILBOX__
-#define __TYPEDEF_MN_REENTRANT_MAILBOX__
-typedef struct _MNReentrantMailbox MNReentrantMailbox;
-#endif
-struct _MNReentrantMailbox {
- MNMailbox __parent__;
- /*< private >*/
- MNReentrantMailboxPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNReentrantMailboxClass MNReentrantMailboxClass;
-struct _MNReentrantMailboxClass {
- MNMailboxClass __parent__;
- void (* reentrant_check) (MNReentrantMailbox * self, int check_id);
-};
-
-
-/*
- * Public methods
- */
-GType mn_reentrant_mailbox_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-server-private.h b/build/src/mn-server-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_SERVER_PRIVATE_H__
-#define __MN_SERVER_PRIVATE_H__
-
-#include "mn-server.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-server.c b/build/src/mn-server.c
@@ -1,364 +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-server.h"
-
-#include "mn-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 30 "src/mn-server.gob"
-
-#include <glib/gi18n.h>
-#include <dbus/dbus-glib-bindings.h>
-#include "mn-shell.h"
-#include "mn-util.h"
-
-#line 33 "mn-server.c"
-/* self casting macros */
-#define SELF(x) MN_SERVER(x)
-#define SELF_CONST(x) MN_SERVER_CONST(x)
-#define IS_SELF(x) MN_IS_SERVER(x)
-#define TYPE_SELF MN_TYPE_SERVER
-#define SELF_CLASS(x) MN_SERVER_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_SERVER_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNServer Self;
-typedef MNServerClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-server.gob"
-static void mn_server_init (MNServer * o) G_GNUC_UNUSED;
-#line 50 "mn-server.c"
-#line 48 "src/mn-server.gob"
-static void mn_server_class_init (MNServerClass * class) G_GNUC_UNUSED;
-#line 53 "mn-server.c"
-#line 53 "src/mn-server.gob"
-static gboolean mn_server_has_mailboxes (MNServer * self, gboolean * ret, GError ** err) G_GNUC_UNUSED;
-#line 56 "mn-server.c"
-#line 60 "src/mn-server.gob"
-static gboolean mn_server_get_summary (MNServer * self, char ** ret, GError ** err) G_GNUC_UNUSED;
-#line 59 "mn-server.c"
-#line 67 "src/mn-server.gob"
-static gboolean mn_server_consider_new_mail_as_read (MNServer * self, GError ** err) G_GNUC_UNUSED;
-#line 62 "mn-server.c"
-#line 77 "src/mn-server.gob"
-static gboolean mn_server_update (MNServer * self, GError ** err) G_GNUC_UNUSED;
-#line 65 "mn-server.c"
-#line 87 "src/mn-server.gob"
-static gboolean mn_server_display_properties (MNServer * self, GError ** err) G_GNUC_UNUSED;
-#line 68 "mn-server.c"
-#line 97 "src/mn-server.gob"
-static gboolean mn_server_display_about (MNServer * self, GError ** err) G_GNUC_UNUSED;
-#line 71 "mn-server.c"
-#line 107 "src/mn-server.gob"
-static gboolean mn_server_quit (MNServer * self, GError ** err) G_GNUC_UNUSED;
-#line 74 "mn-server.c"
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_has_mailboxes mn_server_has_mailboxes
-#define self_get_summary mn_server_get_summary
-#define self_consider_new_mail_as_read mn_server_consider_new_mail_as_read
-#define self_update mn_server_update
-#define self_display_properties mn_server_display_properties
-#define self_display_about mn_server_display_about
-#define self_quit mn_server_quit
-#define self_start mn_server_start
-GType
-mn_server_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNServerClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_server_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNServer),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_server_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNServer", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNServer *)g_object_new(mn_server_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNServer * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNServer *
-GET_NEW_VARG (const char *first, ...)
-{
- MNServer *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNServer *)g_object_new_valist (mn_server_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-#line 37 "src/mn-server.gob"
-
-#include "mn-server-dbus.h"
-
-#line 135 "mn-server.c"
-static void
-mn_server_init (MNServer * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Server::init"
-}
-#undef __GOB_FUNCTION__
-#line 48 "src/mn-server.gob"
-static void
-mn_server_class_init (MNServerClass * class G_GNUC_UNUSED)
-{
-#line 146 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::class_init"
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- {
-#line 49 "src/mn-server.gob"
-
- dbus_g_object_type_install_info(TYPE_SELF, &dbus_glib_mn_server_object_info);
-
-#line 156 "mn-server.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 53 "src/mn-server.gob"
-static gboolean
-mn_server_has_mailboxes (MNServer * self, gboolean * ret, GError ** err)
-{
-#line 167 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::has_mailboxes"
-#line 53 "src/mn-server.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 53 "src/mn-server.gob"
- g_return_val_if_fail (MN_IS_SERVER (self), (gboolean )0);
-#line 53 "src/mn-server.gob"
- g_return_val_if_fail (ret != NULL, (gboolean )0);
-#line 175 "mn-server.c"
-{
-#line 55 "src/mn-server.gob"
-
- *ret = mn_shell->mailboxes->list != NULL;
- return TRUE;
- }}
-#line 182 "mn-server.c"
-#undef __GOB_FUNCTION__
-
-#line 60 "src/mn-server.gob"
-static gboolean
-mn_server_get_summary (MNServer * self, char ** ret, GError ** err)
-{
-#line 189 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::get_summary"
-#line 60 "src/mn-server.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 60 "src/mn-server.gob"
- g_return_val_if_fail (MN_IS_SERVER (self), (gboolean )0);
-#line 60 "src/mn-server.gob"
- g_return_val_if_fail (ret != NULL, (gboolean )0);
-#line 197 "mn-server.c"
-{
-#line 62 "src/mn-server.gob"
-
- *ret = mn_shell_get_summary(mn_shell);
- return TRUE;
- }}
-#line 204 "mn-server.c"
-#undef __GOB_FUNCTION__
-
-#line 67 "src/mn-server.gob"
-static gboolean
-mn_server_consider_new_mail_as_read (MNServer * self, GError ** err)
-{
-#line 211 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::consider_new_mail_as_read"
-#line 67 "src/mn-server.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 67 "src/mn-server.gob"
- g_return_val_if_fail (MN_IS_SERVER (self), (gboolean )0);
-#line 217 "mn-server.c"
-{
-#line 69 "src/mn-server.gob"
-
- GDK_THREADS_ENTER();
- mn_shell_consider_new_mail_as_read(mn_shell);
- GDK_THREADS_LEAVE();
-
- return TRUE;
- }}
-#line 227 "mn-server.c"
-#undef __GOB_FUNCTION__
-
-#line 77 "src/mn-server.gob"
-static gboolean
-mn_server_update (MNServer * self, GError ** err)
-{
-#line 234 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::update"
-#line 77 "src/mn-server.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 77 "src/mn-server.gob"
- g_return_val_if_fail (MN_IS_SERVER (self), (gboolean )0);
-#line 240 "mn-server.c"
-{
-#line 79 "src/mn-server.gob"
-
- GDK_THREADS_ENTER();
- mn_shell_update(mn_shell);
- GDK_THREADS_LEAVE();
-
- return TRUE;
- }}
-#line 250 "mn-server.c"
-#undef __GOB_FUNCTION__
-
-#line 87 "src/mn-server.gob"
-static gboolean
-mn_server_display_properties (MNServer * self, GError ** err)
-{
-#line 257 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::display_properties"
-#line 87 "src/mn-server.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 87 "src/mn-server.gob"
- g_return_val_if_fail (MN_IS_SERVER (self), (gboolean )0);
-#line 263 "mn-server.c"
-{
-#line 89 "src/mn-server.gob"
-
- GDK_THREADS_ENTER();
- mn_shell_show_properties_dialog(mn_shell, 0);
- GDK_THREADS_LEAVE();
-
- return TRUE;
- }}
-#line 273 "mn-server.c"
-#undef __GOB_FUNCTION__
-
-#line 97 "src/mn-server.gob"
-static gboolean
-mn_server_display_about (MNServer * self, GError ** err)
-{
-#line 280 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::display_about"
-#line 97 "src/mn-server.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 97 "src/mn-server.gob"
- g_return_val_if_fail (MN_IS_SERVER (self), (gboolean )0);
-#line 286 "mn-server.c"
-{
-#line 99 "src/mn-server.gob"
-
- GDK_THREADS_ENTER();
- mn_shell_show_about_dialog(mn_shell, 0);
- GDK_THREADS_LEAVE();
-
- return TRUE;
- }}
-#line 296 "mn-server.c"
-#undef __GOB_FUNCTION__
-
-#line 107 "src/mn-server.gob"
-static gboolean
-mn_server_quit (MNServer * self, GError ** err)
-{
-#line 303 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::quit"
-#line 107 "src/mn-server.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 107 "src/mn-server.gob"
- g_return_val_if_fail (MN_IS_SERVER (self), (gboolean )0);
-#line 309 "mn-server.c"
-{
-#line 109 "src/mn-server.gob"
-
- GDK_THREADS_ENTER();
- mn_shell_quit(mn_shell);
- GDK_THREADS_LEAVE();
-
- return TRUE;
- }}
-#line 319 "mn-server.c"
-#undef __GOB_FUNCTION__
-
-#line 118 "src/mn-server.gob"
-gboolean
-mn_server_start (DBusGConnection * bus, DBusGProxy * bus_proxy)
-{
-#line 326 "mn-server.c"
-#define __GOB_FUNCTION__ "MN:Server::start"
-#line 118 "src/mn-server.gob"
- g_return_val_if_fail (bus != NULL, (gboolean )0);
-#line 118 "src/mn-server.gob"
- g_return_val_if_fail (bus_proxy != NULL, (gboolean )0);
-#line 118 "src/mn-server.gob"
- g_return_val_if_fail (DBUS_IS_G_PROXY (bus_proxy), (gboolean )0);
-#line 334 "mn-server.c"
-{
-#line 121 "src/mn-server.gob"
-
- Self *self;
- GError *err = NULL;
- unsigned int name_reply;
-
- self = GET_NEW;
-
- dbus_g_connection_register_g_object(bus, MN_SERVER_PATH, G_OBJECT(self));
-
- if (! org_freedesktop_DBus_request_name(bus_proxy,
- MN_SERVER_SERVICE,
- DBUS_NAME_FLAG_DO_NOT_QUEUE,
- &name_reply,
- &err))
- {
- mn_show_fatal_error_dialog(NULL, _("Unable to register the Mail Notification D-Bus server: %s."), err->message);
- g_error_free(err);
- }
-
- if (name_reply != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
- {
- g_object_unref(self);
- return FALSE;
- }
-
- return TRUE;
- }}
-#line 364 "mn-server.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-server.gob.stamp b/build/src/mn-server.gob.stamp
diff --git a/build/src/mn-server.h b/build/src/mn-server.h
@@ -1,67 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <dbus/dbus-glib.h>
-
-#ifndef __MN_SERVER_H__
-#define __MN_SERVER_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-#define MN_SERVER_SERVICE "org.gnome.MailNotification"
-#define MN_SERVER_PATH "/org/gnome/MailNotification"
-#define MN_SERVER_INTERFACE "org.gnome.MailNotification"
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_SERVER (mn_server_get_type())
-#define MN_SERVER(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_server_get_type(), MNServer)
-#define MN_SERVER_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_server_get_type(), MNServer const)
-#define MN_SERVER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_server_get_type(), MNServerClass)
-#define MN_IS_SERVER(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_server_get_type ())
-
-#define MN_SERVER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_server_get_type(), MNServerClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_SERVER__
-#define __TYPEDEF_MN_SERVER__
-typedef struct _MNServer MNServer;
-#endif
-struct _MNServer {
- GObject __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNServerClass MNServerClass;
-struct _MNServerClass {
- GObjectClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_server_get_type (void) G_GNUC_CONST;
-#line 118 "src/mn-server.gob"
-gboolean mn_server_start (DBusGConnection * bus,
- DBusGProxy * bus_proxy);
-#line 62 "mn-server.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-shell-private.h b/build/src/mn-shell-private.h
@@ -1,38 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_SHELL_PRIVATE_H__
-#define __MN_SHELL_PRIVATE_H__
-
-#include "mn-shell.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 29 "src/mn-shell.gob"
-
-#include "mn-sound-player.h"
-
-#line 18 "mn-shell-private.h"
-struct _MNShellPrivate {
-#line 89 "src/mn-shell.gob"
- int unix_signal_pipe_write_end;
-#line 91 "src/mn-shell.gob"
- MNSoundPlayer * sound_player;
-#line 93 "src/mn-shell.gob"
- gboolean has_new;
-#line 95 "src/mn-shell.gob"
- GtkWidget * properties_dialog;
-#line 96 "src/mn-shell.gob"
- GSList * mailbox_properties_dialogs;
-#line 97 "src/mn-shell.gob"
- GtkWidget * about_dialog;
-#line 32 "mn-shell-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-shell.c b/build/src/mn-shell.c
@@ -1,1732 +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-shell.h"
-
-#include "mn-shell-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 33 "src/mn-shell.gob"
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <glib/gi18n.h>
-#include <libxml/tree.h>
-#include "mn-properties-dialog.h"
-#include "mn-util.h"
-#include "mn-conf.h"
-#include "mn-mailboxes.h"
-#include "mn-about-dialog.h"
-#include "mn-standard-message-view.h"
-#include "mn-compact-message-view.h"
-#include "mn-message.h"
-#include "mn-stock.h"
-#include "mn-locked-callback.h"
-
-MNShell *mn_shell = NULL;
-
-typedef struct
-{
- int num;
- const char *name;
-} UnixSignalInfo;
-
-#define SIGNAL_INFO(name) { name, #name }
-
-static const UnixSignalInfo unix_quit_signals[] = {
- SIGNAL_INFO(SIGHUP),
- SIGNAL_INFO(SIGINT),
- SIGNAL_INFO(SIGTERM),
- SIGNAL_INFO(SIGUSR1),
- SIGNAL_INFO(SIGUSR2)
-};
-
-#line 62 "mn-shell.c"
-static const GEnumValue _mn_shell_tooltip_mail_summary_values[] = {
- { MN_SHELL_TOOLTIP_MAIL_SUMMARY_STANDARD, (char *)"MN_SHELL_TOOLTIP_MAIL_SUMMARY_STANDARD", (char *)"standard" },
- { MN_SHELL_TOOLTIP_MAIL_SUMMARY_COMPACT, (char *)"MN_SHELL_TOOLTIP_MAIL_SUMMARY_COMPACT", (char *)"compact" },
- { MN_SHELL_TOOLTIP_MAIL_SUMMARY_NONE, (char *)"MN_SHELL_TOOLTIP_MAIL_SUMMARY_NONE", (char *)"none" },
- { 0, NULL, NULL }
-};
-
-GType
-mn_shell_tooltip_mail_summary_get_type (void)
-{
- static GType type = 0;
- if ___GOB_UNLIKELY(type == 0)
- type = g_enum_register_static ("MNShellTooltipMailSummary", _mn_shell_tooltip_mail_summary_values);
- return type;
-}
-
-/* self casting macros */
-#define SELF(x) MN_SHELL(x)
-#define SELF_CONST(x) MN_SHELL_CONST(x)
-#define IS_SELF(x) MN_IS_SHELL(x)
-#define TYPE_SELF MN_TYPE_SHELL
-#define SELF_CLASS(x) MN_SHELL_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_SHELL_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNShell Self;
-typedef MNShellClass 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-shell.gob"
-static void mn_shell_init (MNShell * o) G_GNUC_UNUSED;
-#line 97 "mn-shell.c"
-#line 0 "src/mn-shell.gob"
-static void mn_shell_class_init (MNShellClass * c) G_GNUC_UNUSED;
-#line 100 "mn-shell.c"
-#line 99 "src/mn-shell.gob"
-static void mn_shell_constructor (MNShell * self) G_GNUC_UNUSED;
-#line 103 "mn-shell.c"
-#line 150 "src/mn-shell.gob"
-static void mn_shell_finalize (MNShell * self) G_GNUC_UNUSED;
-#line 106 "mn-shell.c"
-#line 193 "src/mn-shell.gob"
-static gboolean mn_shell_install_unix_quit_signal_handlers (MNShell * self) G_GNUC_UNUSED;
-#line 109 "mn-shell.c"
-#line 254 "src/mn-shell.gob"
-static void mn_shell_unix_quit_signal_handler (int signum) G_GNUC_UNUSED;
-#line 112 "mn-shell.c"
-#line 260 "src/mn-shell.gob"
-static const UnixSignalInfo * mn_shell_lookup_unix_quit_signal (int signum) G_GNUC_UNUSED;
-#line 115 "mn-shell.c"
-#line 273 "src/mn-shell.gob"
-static gboolean mn_shell_unix_quit_signal_watch_cb (GIOChannel * source, GIOCondition condition, gpointer data) G_GNUC_UNUSED;
-#line 118 "mn-shell.c"
-#line 299 "src/mn-shell.gob"
-static void mn_shell_weak_notify_cb (gpointer data, GObject * former_object) G_GNUC_UNUSED;
-#line 121 "mn-shell.c"
-#line 305 "src/mn-shell.gob"
-static void mn_shell_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
-#line 124 "mn-shell.c"
-#line 328 "src/mn-shell.gob"
-static void mn_shell_play_new_mail_sound (MNShell * self) G_GNUC_UNUSED;
-#line 127 "mn-shell.c"
-#line 344 "src/mn-shell.gob"
-static void mn_shell_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data) G_GNUC_UNUSED;
-#line 130 "mn-shell.c"
-#line 358 "src/mn-shell.gob"
-static void mn_shell_init_icon (MNShell * self) G_GNUC_UNUSED;
-#line 133 "mn-shell.c"
-#line 382 "src/mn-shell.gob"
-static void mn_shell_notify_icon_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-#line 136 "mn-shell.c"
-#line 393 "src/mn-shell.gob"
-static void mn_shell_notify_tooltip_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-#line 139 "mn-shell.c"
-#line 404 "src/mn-shell.gob"
-static void mn_shell_notify_mail_reader_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-#line 142 "mn-shell.c"
-#line 415 "src/mn-shell.gob"
-static void mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-#line 145 "mn-shell.c"
-#line 466 "src/mn-shell.gob"
-static void mn_shell_icon_activate_mail_reader_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-#line 148 "mn-shell.c"
-#line 472 "src/mn-shell.gob"
-static void mn_shell_icon_activate_open_latest_message_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-#line 151 "mn-shell.c"
-#line 479 "src/mn-shell.gob"
-static void mn_shell_icon_activate_properties_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-#line 154 "mn-shell.c"
-#line 486 "src/mn-shell.gob"
-static void mn_shell_icon_activate_help_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-#line 157 "mn-shell.c"
-#line 492 "src/mn-shell.gob"
-static void mn_shell_icon_activate_about_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-#line 160 "mn-shell.c"
-#line 499 "src/mn-shell.gob"
-static void mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data) G_GNUC_UNUSED;
-#line 163 "mn-shell.c"
-#line 508 "src/mn-shell.gob"
-static void mn_shell_update_sensitivity (MNShell * self) G_GNUC_UNUSED;
-#line 166 "mn-shell.c"
-#line 523 "src/mn-shell.gob"
-static void mn_shell_update_icon (MNShell * self) G_GNUC_UNUSED;
-#line 169 "mn-shell.c"
-#line 569 "src/mn-shell.gob"
-static void mn_shell_update_tooltip (MNShell * self) G_GNUC_UNUSED;
-#line 172 "mn-shell.c"
-#line 719 "src/mn-shell.gob"
-static int mn_shell_new_mailboxes_compare_cb (MNMailbox * a, MNMailbox * b) G_GNUC_UNUSED;
-#line 175 "mn-shell.c"
-#line 738 "src/mn-shell.gob"
-static GtkWidget * mn_shell_tooltip_section_new (GtkVBox ** vbox, const char * title) G_GNUC_UNUSED;
-#line 178 "mn-shell.c"
-#line 758 "src/mn-shell.gob"
-static void mn_shell_tooltip_text_section_new (GtkVBox ** vbox, const char * title, const char * text) G_GNUC_UNUSED;
-#line 181 "mn-shell.c"
-#line 775 "src/mn-shell.gob"
-static void mn_shell_open_latest_message (MNShell * self) G_GNUC_UNUSED;
-#line 184 "mn-shell.c"
-#line 792 "src/mn-shell.gob"
-static void mn_shell_open_latest_message_done_cb (MNMessageAction * action, GError * err, gpointer data) G_GNUC_UNUSED;
-#line 187 "mn-shell.c"
-#line 848 "src/mn-shell.gob"
-static void mn_shell_show_window (MNShell * self, GType type, GtkWidget ** ptr, guint32 timestamp) G_GNUC_UNUSED;
-#line 190 "mn-shell.c"
-#line 876 "src/mn-shell.gob"
-static void mn_shell_mailbox_properties_dialog_weak_notify_cb (gpointer data, GObject * former_object) G_GNUC_UNUSED;
-#line 193 "mn-shell.c"
-
-enum {
- PROP_0,
- PROP_SESSION_BUS,
- PROP_SESSION_BUS_PROXY
-};
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_install_unix_quit_signal_handlers mn_shell_install_unix_quit_signal_handlers
-#define self_unix_quit_signal_handler mn_shell_unix_quit_signal_handler
-#define self_lookup_unix_quit_signal mn_shell_lookup_unix_quit_signal
-#define self_unix_quit_signal_watch_cb mn_shell_unix_quit_signal_watch_cb
-#define self_weak_notify_cb mn_shell_weak_notify_cb
-#define self_messages_changed_h mn_shell_messages_changed_h
-#define self_play_new_mail_sound mn_shell_play_new_mail_sound
-#define self_mailbox_removed_h mn_shell_mailbox_removed_h
-#define self_init_icon mn_shell_init_icon
-#define self_notify_icon_cb mn_shell_notify_icon_cb
-#define self_notify_tooltip_cb mn_shell_notify_tooltip_cb
-#define self_notify_mail_reader_cb mn_shell_notify_mail_reader_cb
-#define self_icon_activate_h mn_shell_icon_activate_h
-#define self_icon_activate_mail_reader_h mn_shell_icon_activate_mail_reader_h
-#define self_icon_activate_open_latest_message_h mn_shell_icon_activate_open_latest_message_h
-#define self_icon_activate_properties_h mn_shell_icon_activate_properties_h
-#define self_icon_activate_help_h mn_shell_icon_activate_help_h
-#define self_icon_activate_about_h mn_shell_icon_activate_about_h
-#define self_icon_destroy_h mn_shell_icon_destroy_h
-#define self_update_sensitivity mn_shell_update_sensitivity
-#define self_update_icon mn_shell_update_icon
-#define self_update_tooltip mn_shell_update_tooltip
-#define self_new_mailboxes_compare_cb mn_shell_new_mailboxes_compare_cb
-#define self_tooltip_section_new mn_shell_tooltip_section_new
-#define self_tooltip_text_section_new mn_shell_tooltip_text_section_new
-#define self_open_latest_message mn_shell_open_latest_message
-#define self_open_latest_message_done_cb mn_shell_open_latest_message_done_cb
-#define self_new mn_shell_new
-#define self_consider_new_mail_as_read mn_shell_consider_new_mail_as_read
-#define self_update mn_shell_update
-#define self_quit mn_shell_quit
-#define self_show_properties_dialog mn_shell_show_properties_dialog
-#define self_show_about_dialog mn_shell_show_about_dialog
-#define self_show_window mn_shell_show_window
-#define self_add_mailbox_properties_dialog mn_shell_add_mailbox_properties_dialog
-#define self_mailbox_properties_dialog_weak_notify_cb mn_shell_mailbox_properties_dialog_weak_notify_cb
-#define self_get_mailbox_properties_dialog mn_shell_get_mailbox_properties_dialog
-#define self_get_summary mn_shell_get_summary
-GType
-mn_shell_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNShellClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_shell_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNShell),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_shell_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNShell", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNShell *)g_object_new(mn_shell_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNShell * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNShell *
-GET_NEW_VARG (const char *first, ...)
-{
- MNShell *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNShell *)g_object_new_valist (mn_shell_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:Shell::constructor"
- GObject *obj_self;
- MNShell *self;
- obj_self = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
- self = MN_SHELL (obj_self);
-#line 99 "src/mn-shell.gob"
- mn_shell_constructor (self);
-#line 296 "mn-shell.c"
- return obj_self;
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Shell::finalize"
- MNShell *self G_GNUC_UNUSED = MN_SHELL (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 150 "src/mn-shell.gob"
- mn_shell_finalize (self);
-#line 310 "mn-shell.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_shell_init (MNShell * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Shell::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_SHELL,MNShellPrivate);
-}
-#undef __GOB_FUNCTION__
-static void
-mn_shell_class_init (MNShellClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Shell::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNShellPrivate));
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- 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_pointer
- ("session_bus" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_SESSION_BUS,
- param_spec);
- param_spec = g_param_spec_pointer
- ("session_bus_proxy" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_SESSION_BUS_PROXY,
- 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:Shell::set_property"
-{
- MNShell *self G_GNUC_UNUSED;
-
- self = MN_SHELL (object);
-
- switch (property_id) {
- case PROP_SESSION_BUS:
- {
-#line 84 "src/mn-shell.gob"
-self->session_bus = g_value_get_pointer (VAL);
-#line 376 "mn-shell.c"
- }
- break;
- case PROP_SESSION_BUS_PROXY:
- {
-#line 87 "src/mn-shell.gob"
-self->session_bus_proxy = g_value_get_pointer (VAL);
-#line 383 "mn-shell.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:Shell::get_property"
-{
- MNShell *self G_GNUC_UNUSED;
-
- self = MN_SHELL (object);
-
- switch (property_id) {
- case PROP_SESSION_BUS:
- {
-#line 84 "src/mn-shell.gob"
-g_value_set_pointer (VAL, self->session_bus);
-#line 414 "mn-shell.c"
- }
- break;
- case PROP_SESSION_BUS_PROXY:
- {
-#line 87 "src/mn-shell.gob"
-g_value_set_pointer (VAL, self->session_bus_proxy);
-#line 421 "mn-shell.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 99 "src/mn-shell.gob"
-static void
-mn_shell_constructor (MNShell * self G_GNUC_UNUSED)
-{
-#line 442 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::constructor"
-{
-#line 100 "src/mn-shell.gob"
-
- g_assert(mn_shell == NULL);
-
- mn_shell = self;
- g_object_weak_ref(G_OBJECT(self), self_weak_notify_cb, NULL);
-
- selfp->sound_player = mn_sound_player_new();
- mn_add_weak_pointer(&selfp->sound_player);
-
- /*
- * self->mailboxes is assigned in MNMailboxes itself, so that
- * mailboxes can access it even during construction of
- * MNMailboxes.
- */
- mn_mailboxes_new();
- mn_add_weak_pointer(&self->mailboxes);
-
- self_init_icon(self);
-
- mn_g_object_gconf_notifications_add_gdk_locked(self,
- MN_CONF_BLINK_ON_ERRORS, self_notify_icon_cb, self,
- MN_CONF_ALWAYS_DISPLAY_ICON, self_notify_icon_cb, self,
- MN_CONF_DISPLAY_MESSAGE_COUNT, self_notify_icon_cb, self,
- MN_CONF_GNOME_MAIL_READER_NAMESPACE, self_notify_mail_reader_cb, self,
- MN_CONF_TOOLTIP_MAIL_SUMMARY, self_notify_tooltip_cb, self,
- MN_CONF_TOOLTIP_MAIL_SUMMARY_LIMIT, self_notify_tooltip_cb, self,
- NULL);
-
- g_object_connect(self->mailboxes,
- "signal::messages-changed", self_messages_changed_h, self,
- "signal::mailbox-removed", self_mailbox_removed_h, self,
- "swapped-signal::notify::manually-checkable", self_update_sensitivity, self,
- "swapped-signal::list-changed", self_update_tooltip, self,
- "swapped-signal::list-changed", self_update_icon, self,
- "swapped-signal::error-changed", self_update_tooltip, self,
- "swapped-signal::error-changed", self_update_icon, self,
- NULL);
-
- self->popups = mn_popups_new();
- mn_add_weak_pointer(&self->popups);
-
- /*
- * Exit gracefully (unreferencing our components) when receiving a
- * UNIX signal.
- */
- if (! self_install_unix_quit_signal_handlers(self))
- /* unlikely and unimportant, not worth a translation */
- g_warning("unable to install UNIX quit signal handlers");
- }}
-#line 495 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 150 "src/mn-shell.gob"
-static void
-mn_shell_finalize (MNShell * self G_GNUC_UNUSED)
-{
-#line 502 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::finalize"
-{
-#line 151 "src/mn-shell.gob"
-
- /*
- * We explicitly unreference or destroy each component, even
- * though MN will exit after the shell is finalized. This is done
- * for the sake of respecting encapsulation: we should not know
- * whether a particular component has something to do on exit or
- * not (for instance, MNSoundPlayer must kill the play process).
- *
- * Of course, the order in which we get rid of the components
- * matters: for instance, when destroyed, MNPropertiesDialog might
- * remove the test mailbox and thus requires a valid MNMailboxes
- * object. We destroy the components in the inverse order of their
- * creation.
- *
- * Also note that we do not need to nullify the pointers after
- * destruction since we use mn_add_weak_pointer() at creation
- * time.
- */
-
- g_slist_foreach(selfp->mailbox_properties_dialogs, (GFunc) gtk_widget_destroy, NULL);
- /* the list is freed in mailbox_properties_dialog_weak_notify_cb() */
-
- if (selfp->properties_dialog)
- gtk_widget_destroy(selfp->properties_dialog);
-
- if (selfp->about_dialog)
- gtk_widget_destroy(selfp->about_dialog);
-
- mn_g_object_null_unref(self->popups);
-
- if (self->icon)
- {
- /* do not recreate the icon after we destroy it */
- g_signal_handlers_disconnect_by_func(self->icon, self_icon_destroy_h, self);
- gtk_widget_destroy(GTK_WIDGET(self->icon));
- }
-
- mn_g_object_null_unref(self->mailboxes);
-
- mn_g_object_null_unref(selfp->sound_player);
- }}
-#line 547 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 193 "src/mn-shell.gob"
-static gboolean
-mn_shell_install_unix_quit_signal_handlers (MNShell * self)
-{
-#line 554 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::install_unix_quit_signal_handlers"
-#line 193 "src/mn-shell.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 193 "src/mn-shell.gob"
- g_return_val_if_fail (MN_IS_SHELL (self), (gboolean )0);
-#line 560 "mn-shell.c"
-{
-#line 195 "src/mn-shell.gob"
-
- int sigpipe[2];
- int flags;
- GIOChannel *read_channel = NULL;
- int i;
-
- if (pipe(sigpipe) < 0)
- return FALSE;
-
- /*
- * Enable non-blocking mode for the write end, so that if another
- * signal occurs while the main thread is busy processing the
- * first signal, the signal handler will not block in write().
- */
-
- flags = fcntl(sigpipe[1], F_GETFL);
- if (flags < 0)
- goto error;
-
- if (fcntl(sigpipe[1], F_SETFL, flags | O_NONBLOCK) < 0)
- goto error;
-
- selfp->unix_signal_pipe_write_end = sigpipe[1];
-
- read_channel = g_io_channel_unix_new(sigpipe[0]);
-
- if (g_io_channel_set_encoding(read_channel, NULL, NULL) != G_IO_STATUS_NORMAL)
- goto error;
-
- for (i = 0; i < G_N_ELEMENTS(unix_quit_signals); i++)
- {
- struct sigaction sa;
-
- sa.sa_handler = self_unix_quit_signal_handler;
- sa.sa_flags = 0;
- sigemptyset(&sa.sa_mask);
-
- if (sigaction(unix_quit_signals[i].num, &sa, NULL) < 0)
- goto error;
- }
-
- g_io_add_watch(read_channel, G_IO_IN | G_IO_PRI, self_unix_quit_signal_watch_cb, self);
-
- return TRUE; /* ok */
-
- error:
- if (read_channel)
- {
- g_io_channel_shutdown(read_channel, FALSE, NULL);
- g_io_channel_unref(read_channel);
- }
- else
- close(sigpipe[0]);
-
- close(sigpipe[1]);
-
- return FALSE;
- }}
-#line 621 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 254 "src/mn-shell.gob"
-static void
-mn_shell_unix_quit_signal_handler (int signum)
-{
-#line 628 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::unix_quit_signal_handler"
-{
-#line 256 "src/mn-shell.gob"
-
- write(mn_shell->_priv->unix_signal_pipe_write_end, &signum, sizeof(signum));
- }}
-#line 635 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 260 "src/mn-shell.gob"
-static const UnixSignalInfo *
-mn_shell_lookup_unix_quit_signal (int signum)
-{
-#line 642 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::lookup_unix_quit_signal"
-{
-#line 262 "src/mn-shell.gob"
-
- int i;
-
- for (i = 0; i < G_N_ELEMENTS(unix_quit_signals); i++)
- if (unix_quit_signals[i].num == signum)
- return &unix_quit_signals[i];
-
- g_assert_not_reached();
- return NULL;
- }}
-#line 656 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 273 "src/mn-shell.gob"
-static gboolean
-mn_shell_unix_quit_signal_watch_cb (GIOChannel * source, GIOCondition condition, gpointer data)
-{
-#line 663 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::unix_quit_signal_watch_cb"
-{
-#line 277 "src/mn-shell.gob"
-
- Self *self = data;
- GIOStatus status;
- int signum;
- gsize bytes_read;
- const UnixSignalInfo *info;
-
- status = g_io_channel_read_chars(source, (char *) &signum, sizeof(signum), &bytes_read, NULL);
- g_assert(status == G_IO_STATUS_NORMAL);
- g_assert(bytes_read == sizeof(signum));
-
- info = self_lookup_unix_quit_signal(signum);
-
- g_message(_("received %s signal, exiting"), info->name);
-
- GDK_THREADS_ENTER();
- self_quit(self);
- GDK_THREADS_LEAVE();
-
- return FALSE; /* remove source */
- }}
-#line 688 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 299 "src/mn-shell.gob"
-static void
-mn_shell_weak_notify_cb (gpointer data, GObject * former_object)
-{
-#line 695 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::weak_notify_cb"
-{
-#line 301 "src/mn-shell.gob"
-
- gtk_main_quit();
- }}
-#line 702 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 305 "src/mn-shell.gob"
-static void
-mn_shell_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data)
-{
-#line 709 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::messages_changed_h"
-{
-#line 309 "src/mn-shell.gob"
-
- Self *self = user_data;
-
- if (mn_conf_has_command(MN_CONF_COMMANDS_MAIL_CHANGED_NAMESPACE))
- mn_conf_execute_command(MN_CONF_COMMANDS_MAIL_CHANGED_COMMAND);
-
- if (has_new)
- {
- self_play_new_mail_sound(self);
-
- if (mn_conf_has_command(MN_CONF_COMMANDS_NEW_MAIL_NAMESPACE))
- mn_conf_execute_command(MN_CONF_COMMANDS_NEW_MAIL_COMMAND);
- }
-
- self_update_sensitivity(self);
- self_update_tooltip(self);
- self_update_icon(self);
- }}
-#line 731 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 328 "src/mn-shell.gob"
-static void
-mn_shell_play_new_mail_sound (MNShell * self)
-{
-#line 738 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::play_new_mail_sound"
-#line 328 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 328 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 744 "mn-shell.c"
-{
-#line 330 "src/mn-shell.gob"
-
- char *file;
-
- if (! mn_conf_get_bool(MN_CONF_SOUNDS_NEW_MAIL_ENABLED))
- return;
-
- file = mn_conf_get_string(MN_CONF_SOUNDS_NEW_MAIL_FILE);
-
- if (file && *file)
- mn_sound_player_play(selfp->sound_player, file, NULL);
-
- g_free(file);
- }}
-#line 760 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 344 "src/mn-shell.gob"
-static void
-mn_shell_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data)
-{
-#line 767 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::mailbox_removed_h"
-{
-#line 348 "src/mn-shell.gob"
-
- Self *self = user_data;
- MNMailboxPropertiesDialog *dialog;
-
- /* destroy the associated properties dialog, if any */
- dialog = self_get_mailbox_properties_dialog(self, mailbox);
- if (dialog)
- gtk_widget_destroy(GTK_WIDGET(dialog));
- }}
-#line 780 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 358 "src/mn-shell.gob"
-static void
-mn_shell_init_icon (MNShell * self)
-{
-#line 787 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::init_icon"
-#line 358 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 358 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 793 "mn-shell.c"
-{
-#line 360 "src/mn-shell.gob"
-
- self->icon = MN_MAIL_ICON(mn_mail_icon_new());
- mn_add_weak_pointer(&self->icon);
-
- g_object_connect(self->icon,
- "signal::activate", self_icon_activate_h, self,
- "signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
- "signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
- "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
- "swapped-signal::activate-update", self_update, self,
- "signal::activate-properties", self_icon_activate_properties_h, self,
- "signal::activate-help", self_icon_activate_help_h, self,
- "signal::activate-about", self_icon_activate_about_h, self,
- "swapped-signal::activate-remove", self_quit, self,
- "signal::destroy", self_icon_destroy_h, self,
- NULL);
-
- self_update_sensitivity(self);
- self_update_tooltip(self);
- self_update_icon(self);
- }}
-#line 817 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 382 "src/mn-shell.gob"
-static void
-mn_shell_notify_icon_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-{
-#line 824 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::notify_icon_cb"
-{
-#line 387 "src/mn-shell.gob"
-
- Self *self = user_data;
-
- self_update_icon(self);
- }}
-#line 833 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 393 "src/mn-shell.gob"
-static void
-mn_shell_notify_tooltip_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-{
-#line 840 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::notify_tooltip_cb"
-{
-#line 398 "src/mn-shell.gob"
-
- Self *self = user_data;
-
- self_update_tooltip(self);
- }}
-#line 849 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 404 "src/mn-shell.gob"
-static void
-mn_shell_notify_mail_reader_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-{
-#line 856 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::notify_mail_reader_cb"
-{
-#line 409 "src/mn-shell.gob"
-
- Self *self = user_data;
-
- self_update_sensitivity(self);
- }}
-#line 865 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 415 "src/mn-shell.gob"
-static void
-mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data)
-{
-#line 872 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_h"
-{
-#line 417 "src/mn-shell.gob"
-
- MNShell *self = user_data;
- MNAction action;
-
- action = mn_conf_get_enum_value(MN_TYPE_ACTION, MN_CONF_CLICK_ACTION);
-
- switch (action)
- {
- case MN_ACTION_LAUNCH_MAIL_READER:
- if (mn_conf_has_command(MN_CONF_GNOME_MAIL_READER_NAMESPACE))
- mn_conf_execute_mail_reader();
- else
- mn_show_error_dialog_with_markup(NULL,
- _("No mail reader is configured"),
- _("You can configure a mail reader by choosing <b>System → Preferences → Preferred Applications</b>."));
- break;
-
- case MN_ACTION_OPEN_LATEST_MESSAGE:
- if (self->mailboxes->messages->len != 0)
- {
- MNMessage *message = g_ptr_array_index(self->mailboxes->messages, 0);
-
- if (mn_message_can_perform_action(message, mn_message_get_action("open")))
- self_open_latest_message(self);
- else
- mn_show_error_dialog(NULL,
- _("Unable to open the latest message"),
- _("Messages of mailbox \"%s\" cannot be opened."),
- message->mailbox->runtime_name);
- }
- else
- mn_show_error_dialog(NULL,
- _("Unable to open the latest message"),
- _("You have no new mail."));
- break;
-
- case MN_ACTION_CONSIDER_NEW_MAIL_AS_READ:
- self_consider_new_mail_as_read(self);
- break;
-
- case MN_ACTION_UPDATE_MAIL_STATUS:
- mn_mailboxes_check(self->mailboxes);
- break;
-
- default:
- g_assert_not_reached();
- }
- }}
-#line 924 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 466 "src/mn-shell.gob"
-static void
-mn_shell_icon_activate_mail_reader_h (MNMailIcon * icon, gpointer user_data)
-{
-#line 931 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_mail_reader_h"
-{
-#line 468 "src/mn-shell.gob"
-
- mn_conf_execute_mail_reader();
- }}
-#line 938 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 472 "src/mn-shell.gob"
-static void
-mn_shell_icon_activate_open_latest_message_h (MNMailIcon * icon, gpointer user_data)
-{
-#line 945 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_open_latest_message_h"
-{
-#line 474 "src/mn-shell.gob"
-
- Self *self = user_data;
- self_open_latest_message(self);
- }}
-#line 953 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 479 "src/mn-shell.gob"
-static void
-mn_shell_icon_activate_properties_h (MNMailIcon * icon, gpointer user_data)
-{
-#line 960 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_properties_h"
-{
-#line 481 "src/mn-shell.gob"
-
- Self *self = user_data;
- self_show_properties_dialog(self, gtk_get_current_event_time());
- }}
-#line 968 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 486 "src/mn-shell.gob"
-static void
-mn_shell_icon_activate_help_h (MNMailIcon * icon, gpointer user_data)
-{
-#line 975 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_help_h"
-{
-#line 488 "src/mn-shell.gob"
-
- mn_show_help(NULL, NULL);
- }}
-#line 982 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 492 "src/mn-shell.gob"
-static void
-mn_shell_icon_activate_about_h (MNMailIcon * icon, gpointer user_data)
-{
-#line 989 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_about_h"
-{
-#line 494 "src/mn-shell.gob"
-
- Self *self = user_data;
- self_show_about_dialog(self, gtk_get_current_event_time());
- }}
-#line 997 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 499 "src/mn-shell.gob"
-static void
-mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data)
-{
-#line 1004 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::icon_destroy_h"
-{
-#line 501 "src/mn-shell.gob"
-
- Self *self = user_data;
-
- /* The Notification Area applet has been terminated. Recreate the icon. */
- self_init_icon(self);
- }}
-#line 1014 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 508 "src/mn-shell.gob"
-static void
-mn_shell_update_sensitivity (MNShell * self)
-{
-#line 1021 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::update_sensitivity"
-#line 508 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 508 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1027 "mn-shell.c"
-{
-#line 510 "src/mn-shell.gob"
-
- gtk_widget_set_sensitive(self->icon->mail_reader_item,
- mn_conf_has_command(MN_CONF_GNOME_MAIL_READER_NAMESPACE));
- gtk_widget_set_sensitive(self->icon->open_latest_message_item,
- self->mailboxes->messages->len != 0
- && mn_message_can_perform_action(g_ptr_array_index(self->mailboxes->messages, 0),
- mn_message_get_action("open")));
- gtk_widget_set_sensitive(self->icon->consider_new_mail_as_read_item,
- self->mailboxes->messages->len != 0);
- gtk_widget_set_sensitive(self->icon->update_item,
- mn_mailboxes_get_manually_checkable(self->mailboxes));
- }}
-#line 1042 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 523 "src/mn-shell.gob"
-static void
-mn_shell_update_icon (MNShell * self)
-{
-#line 1049 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::update_icon"
-#line 523 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 523 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1055 "mn-shell.c"
-{
-#line 525 "src/mn-shell.gob"
-
- GList *l;
- gboolean has_new = FALSE;
- gboolean blink = FALSE;
- gboolean always = mn_conf_get_bool(MN_CONF_ALWAYS_DISPLAY_ICON);
-
- MN_LIST_FOREACH(l, self->mailboxes->list)
- {
- MNMailbox *mailbox = l->data;
-
- if (g_hash_table_size(mailbox->messages) != 0)
- has_new = TRUE;
- if (mailbox->error)
- blink = TRUE;
- }
-
- if (selfp->has_new && ! has_new && mn_conf_has_command(MN_CONF_COMMANDS_MAIL_READ_NAMESPACE))
- mn_conf_execute_command(MN_CONF_COMMANDS_MAIL_READ_COMMAND);
- selfp->has_new = has_new;
-
- if (blink && ! mn_conf_get_bool(MN_CONF_BLINK_ON_ERRORS))
- blink = FALSE;
-
- if (has_new || blink || always)
- {
- int count;
-
- if (mn_conf_get_bool(MN_CONF_DISPLAY_MESSAGE_COUNT))
- count = self->mailboxes->messages->len;
- else
- count = 0;
-
- mn_mail_icon_set_from_stock(self->icon, has_new ? MN_STOCK_MAIL : MN_STOCK_NO_MAIL);
- mn_mail_icon_set_blinking(self->icon, blink);
- mn_mail_icon_set_count(self->icon, count);
- gtk_widget_show(GTK_WIDGET(self->icon));
- }
- else
- {
- gtk_widget_hide(GTK_WIDGET(self->icon));
- mn_mail_icon_set_blinking(self->icon, FALSE);
- }
- }}
-#line 1101 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 569 "src/mn-shell.gob"
-static void
-mn_shell_update_tooltip (MNShell * self)
-{
-#line 1108 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::update_tooltip"
-#line 569 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 569 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1114 "mn-shell.c"
-{
-#line 571 "src/mn-shell.gob"
-
- GtkVBox *vbox = NULL;
-
- if (self->mailboxes->list)
- {
- GList *la;
- GSList *lb;
- GSList *new_mailboxes = NULL;
- GSList *error_mailboxes = NULL;
-
- MN_LIST_FOREACH(la, self->mailboxes->list)
- {
- MNMailbox *mailbox = la->data;
-
- if (g_hash_table_size(mailbox->messages) != 0)
- new_mailboxes = g_slist_insert_sorted(new_mailboxes, mailbox, (GCompareFunc) self_new_mailboxes_compare_cb);
-
- if (mailbox->error)
- error_mailboxes = g_slist_insert_sorted(error_mailboxes, mailbox, mn_mailboxes_compare_by_name_func);
- }
-
- if (new_mailboxes)
- {
- GString *string = g_string_new(NULL);
-
- MN_LIST_FOREACH(lb, new_mailboxes)
- {
- MNMailbox *mailbox = lb->data;
-
- g_assert(g_hash_table_size(mailbox->messages) != 0);
-
- if (*string->str)
- g_string_append_c(string, '\n');
-
- g_string_append_printf(string, _("%s (%i)"),
- mailbox->runtime_name,
- (int) g_hash_table_size(mailbox->messages));
- }
- g_slist_free(new_mailboxes);
-
- /* translators: header capitalization */
- self_tooltip_text_section_new(&vbox, _("Mailboxes Having New Mail"), string->str);
- g_string_free(string, TRUE);
- }
-
- if (error_mailboxes)
- {
- GString *string = g_string_new(NULL);
-
- MN_LIST_FOREACH(lb, error_mailboxes)
- {
- MNMailbox *mailbox = lb->data;
-
- if (*string->str)
- g_string_append_c(string, '\n');
- g_string_append_printf(string, _("%s: %s"), mailbox->runtime_name, mailbox->error);
- }
- g_slist_free(error_mailboxes);
-
- /* translators: header capitalization */
- self_tooltip_text_section_new(&vbox, _("Errors"), string->str);
- g_string_free(string, TRUE);
- }
- }
-
- if (self->mailboxes->messages->len != 0)
- {
- MNShellTooltipMailSummary mail_summary;
-
- mail_summary = mn_conf_get_enum_value(MN_TYPE_SHELL_TOOLTIP_MAIL_SUMMARY, MN_CONF_TOOLTIP_MAIL_SUMMARY);
- if (mail_summary != MN_SHELL_TOOLTIP_MAIL_SUMMARY_NONE)
- {
- GtkWidget *alignment;
- GtkWidget *message_view;
- int limit;
- GSList *messages = NULL;
- int num_messages;
- int i;
-
- /* translators: header capitalization */
- alignment = self_tooltip_section_new(&vbox, _("Mail Summary"));
-
- switch (mail_summary)
- {
- case MN_SHELL_TOOLTIP_MAIL_SUMMARY_STANDARD:
- message_view = mn_standard_message_view_new();
- break;
-
- case MN_SHELL_TOOLTIP_MAIL_SUMMARY_COMPACT:
- message_view = mn_compact_message_view_new();
- break;
-
- default:
- g_assert_not_reached();
- break;
- }
-
- gtk_widget_set_name(message_view, "mn-message-view");
-
- limit = mn_conf_get_int(MN_CONF_TOOLTIP_MAIL_SUMMARY_LIMIT);
-
- num_messages = MIN(self->mailboxes->messages->len, limit);
- for (i = num_messages - 1; i >= 0; i--)
- messages = g_slist_prepend(messages, g_ptr_array_index(self->mailboxes->messages, i));
- mn_message_view_set_messages(MN_MESSAGE_VIEW(message_view), messages);
- g_slist_free(messages);
-
- if (self->mailboxes->messages->len <= limit)
- gtk_container_add(GTK_CONTAINER(alignment), message_view);
- else
- {
- int remaining;
- char *markup;
- GtkWidget *label;
- GtkWidget *summary_vbox;
-
- remaining = self->mailboxes->messages->len - limit;
-
- label = gtk_label_new(NULL);
-
- markup = g_strdup_printf(ngettext("<span style=\"italic\">%i message is not displayed</span>",
- "<span style=\"italic\">%i messages are not displayed</span>",
- remaining),
- remaining);
- gtk_label_set_markup(GTK_LABEL(label), markup);
- g_free(markup);
-
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-
- summary_vbox = gtk_vbox_new(FALSE, 12);
-
- gtk_box_pack_start(GTK_BOX(summary_vbox), message_view, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(summary_vbox), label, FALSE, FALSE, 0);
-
- gtk_container_add(GTK_CONTAINER(alignment), summary_vbox);
- }
- }
- }
-
- if (vbox)
- {
- gtk_widget_show_all(GTK_WIDGET(vbox));
- mn_mail_icon_set_tip_widget(self->icon, GTK_WIDGET(vbox));
- }
- else
- mn_mail_icon_set_tip(self->icon, _("You have no new mail."));
- }}
-#line 1264 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 719 "src/mn-shell.gob"
-static int
-mn_shell_new_mailboxes_compare_cb (MNMailbox * a, MNMailbox * b)
-{
-#line 1271 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::new_mailboxes_compare_cb"
-{
-#line 721 "src/mn-shell.gob"
-
- int cmp;
-
- /* sort by timestamp (descending order) */
- cmp = b->timestamp - a->timestamp;
- if (cmp != 0)
- return cmp;
-
- /* sort by number of messages (descending order) */
- cmp = (int) g_hash_table_size(b->messages) - g_hash_table_size(a->messages);
- if (cmp != 0)
- return cmp;
-
- /* sort by name (ascending order) */
- return mn_mailboxes_compare_by_name_func(a, b);
- }}
-#line 1291 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 738 "src/mn-shell.gob"
-static GtkWidget *
-mn_shell_tooltip_section_new (GtkVBox ** vbox, const char * title)
-{
-#line 1298 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::tooltip_section_new"
-#line 738 "src/mn-shell.gob"
- g_return_val_if_fail (vbox != NULL, (GtkWidget * )0);
-#line 738 "src/mn-shell.gob"
- g_return_val_if_fail (title != NULL, (GtkWidget * )0);
-#line 1304 "mn-shell.c"
-{
-#line 741 "src/mn-shell.gob"
-
- GtkWidget *section;
- GtkWidget *label;
- GtkWidget *alignment;
-
- if (! *vbox)
- *vbox = GTK_VBOX(gtk_vbox_new(FALSE, 18));
-
- section = mn_hig_section_new(title, &label, &alignment);
-
- gtk_widget_set_name(label, "mn-tooltip-section-title");
-
- gtk_box_pack_start(GTK_BOX(*vbox), section, TRUE, TRUE, 0);
-
- return alignment;
- }}
-#line 1323 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 758 "src/mn-shell.gob"
-static void
-mn_shell_tooltip_text_section_new (GtkVBox ** vbox, const char * title, const char * text)
-{
-#line 1330 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::tooltip_text_section_new"
-#line 758 "src/mn-shell.gob"
- g_return_if_fail (vbox != NULL);
-#line 758 "src/mn-shell.gob"
- g_return_if_fail (title != NULL);
-#line 758 "src/mn-shell.gob"
- g_return_if_fail (text != NULL);
-#line 1338 "mn-shell.c"
-{
-#line 762 "src/mn-shell.gob"
-
- GtkWidget *alignment;
- GtkWidget *label;
-
- alignment = self_tooltip_section_new(vbox, title);
-
- label = gtk_label_new(text);
- gtk_widget_set_name(label, "mn-tooltip-section-body");
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-
- gtk_container_add(GTK_CONTAINER(alignment), label);
- }}
-#line 1353 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 775 "src/mn-shell.gob"
-static void
-mn_shell_open_latest_message (MNShell * self)
-{
-#line 1360 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::open_latest_message"
-#line 775 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 775 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1366 "mn-shell.c"
-{
-#line 777 "src/mn-shell.gob"
-
- MNMessage *message;
- MNMessageAction *action;
-
- g_return_if_fail(self->mailboxes->messages->len != 0);
-
- message = g_ptr_array_index(self->mailboxes->messages, 0);
-
- action = mn_message_get_action("open");
- g_return_if_fail(action != NULL);
- g_return_if_fail(mn_message_can_perform_action(message, action));
-
- mn_message_perform_action(message, action, self_open_latest_message_done_cb, NULL);
- }}
-#line 1383 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 792 "src/mn-shell.gob"
-static void
-mn_shell_open_latest_message_done_cb (MNMessageAction * action, GError * err, gpointer data)
-{
-#line 1390 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::open_latest_message_done_cb"
-{
-#line 794 "src/mn-shell.gob"
-
- if (err && ! g_error_matches(err, MN_MESSAGE_ACTION_ERROR, MN_MESSAGE_ACTION_ERROR_CANCELLED))
- mn_show_error_dialog(NULL, _("Unable to open the latest message"), "%s", err->message);
- }}
-#line 1398 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 799 "src/mn-shell.gob"
-MNShell *
-mn_shell_new (DBusGConnection * session_bus, DBusGProxy * session_bus_proxy)
-{
-#line 1405 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::new"
-#line 799 "src/mn-shell.gob"
- g_return_val_if_fail (session_bus != NULL, (MNShell * )0);
-#line 799 "src/mn-shell.gob"
- g_return_val_if_fail (session_bus_proxy != NULL, (MNShell * )0);
-#line 1411 "mn-shell.c"
-{
-#line 802 "src/mn-shell.gob"
-
- return GET_NEW_VARG(MN_SHELL_PROP_SESSION_BUS(session_bus),
- MN_SHELL_PROP_SESSION_BUS_PROXY(session_bus_proxy),
- NULL);
- }}
-#line 1419 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 808 "src/mn-shell.gob"
-void
-mn_shell_consider_new_mail_as_read (MNShell * self)
-{
-#line 1426 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::consider_new_mail_as_read"
-#line 808 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 808 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1432 "mn-shell.c"
-{
-#line 810 "src/mn-shell.gob"
-
- GList *l;
-
- MN_LIST_FOREACH(l, self->mailboxes->list)
- {
- MNMailbox *mailbox = l->data;
- GList *list;
-
- list = g_hash_table_get_values(mailbox->messages);
- mn_message_consider_as_read_list(list);
- g_list_free(list);
- }
- }}
-#line 1448 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 824 "src/mn-shell.gob"
-void
-mn_shell_update (MNShell * self)
-{
-#line 1455 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::update"
-#line 824 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 824 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1461 "mn-shell.c"
-{
-#line 826 "src/mn-shell.gob"
-
- mn_mailboxes_check(self->mailboxes);
- }}
-#line 1467 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 830 "src/mn-shell.gob"
-void
-mn_shell_quit (MNShell * self)
-{
-#line 1474 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::quit"
-#line 830 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 830 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1480 "mn-shell.c"
-{
-#line 832 "src/mn-shell.gob"
-
- g_object_unref(self);
- }}
-#line 1486 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 836 "src/mn-shell.gob"
-void
-mn_shell_show_properties_dialog (MNShell * self, guint32 timestamp)
-{
-#line 1493 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::show_properties_dialog"
-#line 836 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 836 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1499 "mn-shell.c"
-{
-#line 838 "src/mn-shell.gob"
-
- self_show_window(self, MN_TYPE_PROPERTIES_DIALOG, &selfp->properties_dialog, timestamp);
- }}
-#line 1505 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 842 "src/mn-shell.gob"
-void
-mn_shell_show_about_dialog (MNShell * self, guint32 timestamp)
-{
-#line 1512 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::show_about_dialog"
-#line 842 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 842 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 1518 "mn-shell.c"
-{
-#line 844 "src/mn-shell.gob"
-
- self_show_window(self, MN_TYPE_ABOUT_DIALOG, &selfp->about_dialog, timestamp);
- }}
-#line 1524 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 848 "src/mn-shell.gob"
-static void
-mn_shell_show_window (MNShell * self, GType type, GtkWidget ** ptr, guint32 timestamp)
-{
-#line 1531 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::show_window"
-#line 848 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 848 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 848 "src/mn-shell.gob"
- g_return_if_fail (type != 0);
-#line 848 "src/mn-shell.gob"
- g_return_if_fail (ptr != NULL);
-#line 1541 "mn-shell.c"
-{
-#line 853 "src/mn-shell.gob"
-
- if (*ptr)
- {
- if (timestamp)
- gtk_window_present_with_time(GTK_WINDOW(*ptr), timestamp);
- else
- gtk_window_present(GTK_WINDOW(*ptr));
- return;
- }
-
- *ptr = g_object_new(type, NULL);
- mn_add_weak_pointer(ptr);
-
- gtk_widget_show(*ptr);
- }}
-#line 1559 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 869 "src/mn-shell.gob"
-void
-mn_shell_add_mailbox_properties_dialog (MNShell * self, MNMailboxPropertiesDialog * dialog)
-{
-#line 1566 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::add_mailbox_properties_dialog"
-#line 869 "src/mn-shell.gob"
- g_return_if_fail (self != NULL);
-#line 869 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_SHELL (self));
-#line 869 "src/mn-shell.gob"
- g_return_if_fail (dialog != NULL);
-#line 869 "src/mn-shell.gob"
- g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (dialog));
-#line 1576 "mn-shell.c"
-{
-#line 871 "src/mn-shell.gob"
-
- selfp->mailbox_properties_dialogs = g_slist_append(selfp->mailbox_properties_dialogs, dialog);
- g_object_weak_ref(G_OBJECT(dialog), self_mailbox_properties_dialog_weak_notify_cb, self);
- }}
-#line 1583 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 876 "src/mn-shell.gob"
-static void
-mn_shell_mailbox_properties_dialog_weak_notify_cb (gpointer data, GObject * former_object)
-{
-#line 1590 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::mailbox_properties_dialog_weak_notify_cb"
-{
-#line 879 "src/mn-shell.gob"
-
- Self *self = data;
-
- selfp->mailbox_properties_dialogs = g_slist_remove(selfp->mailbox_properties_dialogs, former_object);
- }}
-#line 1599 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 885 "src/mn-shell.gob"
-MNMailboxPropertiesDialog *
-mn_shell_get_mailbox_properties_dialog (MNShell * self, MNMailbox * mailbox)
-{
-#line 1606 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::get_mailbox_properties_dialog"
-#line 885 "src/mn-shell.gob"
- g_return_val_if_fail (self != NULL, (MNMailboxPropertiesDialog * )0);
-#line 885 "src/mn-shell.gob"
- g_return_val_if_fail (MN_IS_SHELL (self), (MNMailboxPropertiesDialog * )0);
-#line 885 "src/mn-shell.gob"
- g_return_val_if_fail (mailbox != NULL, (MNMailboxPropertiesDialog * )0);
-#line 885 "src/mn-shell.gob"
- g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (MNMailboxPropertiesDialog * )0);
-#line 1616 "mn-shell.c"
-{
-#line 887 "src/mn-shell.gob"
-
- GSList *l;
-
- MN_LIST_FOREACH(l, selfp->mailbox_properties_dialogs)
- {
- MNMailboxPropertiesDialog *dialog = l->data;
- MNMailbox *this_mailbox;
- gboolean found;
-
- this_mailbox = mn_mailbox_properties_dialog_get_mailbox(dialog);
- found = this_mailbox == mailbox;
- g_object_unref(this_mailbox);
-
- if (found)
- return dialog;
- }
-
- return NULL;
- }}
-#line 1638 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 907 "src/mn-shell.gob"
-char *
-mn_shell_get_summary (MNShell * self)
-{
-#line 1645 "mn-shell.c"
-#define __GOB_FUNCTION__ "MN:Shell::get_summary"
-#line 907 "src/mn-shell.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 907 "src/mn-shell.gob"
- g_return_val_if_fail (MN_IS_SHELL (self), (char * )0);
-#line 1651 "mn-shell.c"
-{
-#line 909 "src/mn-shell.gob"
-
- int indent;
- xmlDoc *doc;
- xmlNode *root;
- int i;
- xmlChar *summary;
-
- indent = xmlIndentTreeOutput;
- xmlIndentTreeOutput = 1;
-
- doc = xmlNewDoc("1.0");
- root = xmlNewNode(NULL, "messages");
- xmlDocSetRootElement(doc, root);
-
- MN_ARRAY_FOREACH(i, self->mailboxes->messages)
- {
- MNMessage *message = g_ptr_array_index(self->mailboxes->messages, i);
- xmlNode *node;
-
- node = mn_message_xml_node_new(message);
- xmlAddChild(root, node); /* owns node */
- }
-
- xmlDocDumpFormatMemory(doc, &summary, NULL, 1);
-
- xmlFreeDoc(doc);
- xmlIndentTreeOutput = indent;
-
- return summary;
- }}
-#line 1684 "mn-shell.c"
-#undef __GOB_FUNCTION__
-static const GEnumValue _mn_action_values[] = {
- { MN_ACTION_LAUNCH_MAIL_READER, (char *)"MN_ACTION_LAUNCH_MAIL_READER", (char *)"launch-mail-reader" },
- { MN_ACTION_OPEN_LATEST_MESSAGE, (char *)"MN_ACTION_OPEN_LATEST_MESSAGE", (char *)"open-latest-message" },
- { MN_ACTION_CONSIDER_NEW_MAIL_AS_READ, (char *)"MN_ACTION_CONSIDER_NEW_MAIL_AS_READ", (char *)"consider-new-mail-as-read" },
- { MN_ACTION_UPDATE_MAIL_STATUS, (char *)"MN_ACTION_UPDATE_MAIL_STATUS", (char *)"update-mail-status" },
- { 0, NULL, NULL }
-};
-
-GType
-mn_action_get_type (void)
-{
- static GType type = 0;
- if ___GOB_UNLIKELY(type == 0)
- type = g_enum_register_static ("MNAction", _mn_action_values);
- return type;
-}
-
-static const GEnumValue _mn_expiration_enabled_values[] = {
- { MN_EXPIRATION_ENABLED_DEFAULT, (char *)"MN_EXPIRATION_ENABLED_DEFAULT", (char *)"default" },
- { MN_EXPIRATION_ENABLED_FALSE, (char *)"MN_EXPIRATION_ENABLED_FALSE", (char *)"false" },
- { MN_EXPIRATION_ENABLED_TRUE, (char *)"MN_EXPIRATION_ENABLED_TRUE", (char *)"true" },
- { 0, NULL, NULL }
-};
-
-GType
-mn_expiration_enabled_get_type (void)
-{
- static GType type = 0;
- if ___GOB_UNLIKELY(type == 0)
- type = g_enum_register_static ("MNExpirationEnabled", _mn_expiration_enabled_values);
- return type;
-}
-
-static const GEnumValue _mn_popup_position_values[] = {
- { MN_POPUP_POSITION_ATTACHED, (char *)"MN_POPUP_POSITION_ATTACHED", (char *)"attached" },
- { MN_POPUP_POSITION_FREE, (char *)"MN_POPUP_POSITION_FREE", (char *)"free" },
- { 0, NULL, NULL }
-};
-
-GType
-mn_popup_position_get_type (void)
-{
- static GType type = 0;
- if ___GOB_UNLIKELY(type == 0)
- type = g_enum_register_static ("MNPopupPosition", _mn_popup_position_values);
- return type;
-}
-
diff --git a/build/src/mn-shell.gob.stamp b/build/src/mn-shell.gob.stamp
diff --git a/build/src/mn-shell.h b/build/src/mn-shell.h
@@ -1,161 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <gtk/gtk.h>
-#include <dbus/dbus-glib.h>
-#include "mn-mailboxes.h"
-#include "mn-mailbox-properties-dialog.h"
-#include "mn-mail-icon.h"
-#include "mn-popups.h"
-
-#ifndef __MN_SHELL_H__
-#define __MN_SHELL_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-typedef enum {
- MN_SHELL_TOOLTIP_MAIL_SUMMARY_STANDARD,
- MN_SHELL_TOOLTIP_MAIL_SUMMARY_COMPACT,
- MN_SHELL_TOOLTIP_MAIL_SUMMARY_NONE
-} MNShellTooltipMailSummary;
-#define MN_TYPE_SHELL_TOOLTIP_MAIL_SUMMARY mn_shell_tooltip_mail_summary_get_type()
-GType mn_shell_tooltip_mail_summary_get_type (void) G_GNUC_CONST;
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_SHELL (mn_shell_get_type())
-#define MN_SHELL(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_shell_get_type(), MNShell)
-#define MN_SHELL_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_shell_get_type(), MNShell const)
-#define MN_SHELL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_shell_get_type(), MNShellClass)
-#define MN_IS_SHELL(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_shell_get_type ())
-
-#define MN_SHELL_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_shell_get_type(), MNShellClass)
-
-/* Private structure type */
-typedef struct _MNShellPrivate MNShellPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_SHELL__
-#define __TYPEDEF_MN_SHELL__
-typedef struct _MNShell MNShell;
-#endif
-struct _MNShell {
- GObject __parent__;
- /*< public >*/
- MNMailboxes * mailboxes;
- MNMailIcon * icon;
- MNPopups * popups;
- DBusGConnection * session_bus;
- DBusGProxy * session_bus_proxy;
- /*< private >*/
- MNShellPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNShellClass MNShellClass;
-struct _MNShellClass {
- GObjectClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_shell_get_type (void) G_GNUC_CONST;
-#line 799 "src/mn-shell.gob"
-MNShell * mn_shell_new (DBusGConnection * session_bus,
- DBusGProxy * session_bus_proxy);
-#line 81 "mn-shell.h"
-#line 808 "src/mn-shell.gob"
-void mn_shell_consider_new_mail_as_read (MNShell * self);
-#line 84 "mn-shell.h"
-#line 824 "src/mn-shell.gob"
-void mn_shell_update (MNShell * self);
-#line 87 "mn-shell.h"
-#line 830 "src/mn-shell.gob"
-void mn_shell_quit (MNShell * self);
-#line 90 "mn-shell.h"
-#line 836 "src/mn-shell.gob"
-void mn_shell_show_properties_dialog (MNShell * self,
- guint32 timestamp);
-#line 94 "mn-shell.h"
-#line 842 "src/mn-shell.gob"
-void mn_shell_show_about_dialog (MNShell * self,
- guint32 timestamp);
-#line 98 "mn-shell.h"
-#line 869 "src/mn-shell.gob"
-void mn_shell_add_mailbox_properties_dialog (MNShell * self,
- MNMailboxPropertiesDialog * dialog);
-#line 102 "mn-shell.h"
-#line 885 "src/mn-shell.gob"
-MNMailboxPropertiesDialog * mn_shell_get_mailbox_properties_dialog (MNShell * self,
- MNMailbox * mailbox);
-#line 106 "mn-shell.h"
-#line 907 "src/mn-shell.gob"
-char * mn_shell_get_summary (MNShell * self);
-#line 109 "mn-shell.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_SHELL_PROP_SESSION_BUS(arg) "session_bus", __extension__ ({DBusGConnection * z = (arg); z;})
-#define MN_SHELL_GET_PROP_SESSION_BUS(arg) "session_bus", __extension__ ({DBusGConnection * *z = (arg); z;})
-#define MN_SHELL_PROP_SESSION_BUS_PROXY(arg) "session_bus_proxy", __extension__ ({DBusGProxy * z = (arg); z;})
-#define MN_SHELL_GET_PROP_SESSION_BUS_PROXY(arg) "session_bus_proxy", __extension__ ({DBusGProxy * *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_SHELL_PROP_SESSION_BUS(arg) "session_bus",(DBusGConnection * )(arg)
-#define MN_SHELL_GET_PROP_SESSION_BUS(arg) "session_bus",(DBusGConnection * *)(arg)
-#define MN_SHELL_PROP_SESSION_BUS_PROXY(arg) "session_bus_proxy",(DBusGProxy * )(arg)
-#define MN_SHELL_GET_PROP_SESSION_BUS_PROXY(arg) "session_bus_proxy",(DBusGProxy * *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-
-extern MNShell *mn_shell;
-
-
-typedef enum {
- MN_ACTION_LAUNCH_MAIL_READER,
- MN_ACTION_OPEN_LATEST_MESSAGE,
- MN_ACTION_CONSIDER_NEW_MAIL_AS_READ,
- MN_ACTION_UPDATE_MAIL_STATUS
-} MNAction;
-#define MN_TYPE_ACTION mn_action_get_type()
-GType mn_action_get_type (void) G_GNUC_CONST;
-
-
-typedef enum {
- MN_EXPIRATION_ENABLED_DEFAULT,
- MN_EXPIRATION_ENABLED_FALSE,
- MN_EXPIRATION_ENABLED_TRUE
-} MNExpirationEnabled;
-#define MN_TYPE_EXPIRATION_ENABLED mn_expiration_enabled_get_type()
-GType mn_expiration_enabled_get_type (void) G_GNUC_CONST;
-
-
-typedef enum {
- MN_POPUP_POSITION_ATTACHED,
- MN_POPUP_POSITION_FREE
-} MNPopupPosition;
-#define MN_TYPE_POPUP_POSITION mn_popup_position_get_type()
-GType mn_popup_position_get_type (void) G_GNUC_CONST;
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-sound-file-chooser-dialog-private.h b/build/src/mn-sound-file-chooser-dialog-private.h
@@ -1,28 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_SOUND_FILE_CHOOSER_DIALOG_PRIVATE_H__
-#define __MN_SOUND_FILE_CHOOSER_DIALOG_PRIVATE_H__
-
-#include "mn-sound-file-chooser-dialog.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 24 "src/mn-sound-file-chooser-dialog.gob"
-
-#include "mn-sound-player.h"
-
-#line 18 "mn-sound-file-chooser-dialog-private.h"
-struct _MNSoundFileChooserDialogPrivate {
-#line 40 "src/mn-sound-file-chooser-dialog.gob"
- MNSoundPlayer * sound_player;
-#line 22 "mn-sound-file-chooser-dialog-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-sound-file-chooser-dialog.c b/build/src/mn-sound-file-chooser-dialog.c
@@ -1,328 +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-sound-file-chooser-dialog.h"
-
-#include "mn-sound-file-chooser-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 28 "src/mn-sound-file-chooser-dialog.gob"
-
-#include <glib/gi18n.h>
-
-enum
-{
- RESPONSE_PLAY = 1,
- RESPONSE_STOP
-};
-
-#line 36 "mn-sound-file-chooser-dialog.c"
-/* self casting macros */
-#define SELF(x) MN_SOUND_FILE_CHOOSER_DIALOG(x)
-#define SELF_CONST(x) MN_SOUND_FILE_CHOOSER_DIALOG_CONST(x)
-#define IS_SELF(x) MN_IS_SOUND_FILE_CHOOSER_DIALOG(x)
-#define TYPE_SELF MN_TYPE_SOUND_FILE_CHOOSER_DIALOG
-#define SELF_CLASS(x) MN_SOUND_FILE_CHOOSER_DIALOG_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_SOUND_FILE_CHOOSER_DIALOG_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNSoundFileChooserDialog Self;
-typedef MNSoundFileChooserDialogClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-sound-file-chooser-dialog.gob"
-static void mn_sound_file_chooser_dialog_init (MNSoundFileChooserDialog * o) G_GNUC_UNUSED;
-#line 53 "mn-sound-file-chooser-dialog.c"
-#line 0 "src/mn-sound-file-chooser-dialog.gob"
-static void mn_sound_file_chooser_dialog_class_init (MNSoundFileChooserDialogClass * c) G_GNUC_UNUSED;
-#line 56 "mn-sound-file-chooser-dialog.c"
-#line 42 "src/mn-sound-file-chooser-dialog.gob"
-static void mn_sound_file_chooser_dialog_constructor (MNSoundFileChooserDialog * self) G_GNUC_UNUSED;
-#line 59 "mn-sound-file-chooser-dialog.c"
-#line 81 "src/mn-sound-file-chooser-dialog.gob"
-static void mn_sound_file_chooser_dialog_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED;
-#line 62 "mn-sound-file-chooser-dialog.c"
-#line 109 "src/mn-sound-file-chooser-dialog.gob"
-static void mn_sound_file_chooser_dialog_update_sensitivity (MNSoundFileChooserDialog * self) G_GNUC_UNUSED;
-#line 65 "mn-sound-file-chooser-dialog.c"
-#line 116 "src/mn-sound-file-chooser-dialog.gob"
-static gboolean mn_sound_file_chooser_dialog_has_selected_file (MNSoundFileChooserDialog * self) G_GNUC_UNUSED;
-#line 68 "mn-sound-file-chooser-dialog.c"
-
-/* pointer to the class of our parent */
-static GtkFileChooserDialogClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_response_h mn_sound_file_chooser_dialog_response_h
-#define self_update_sensitivity mn_sound_file_chooser_dialog_update_sensitivity
-#define self_has_selected_file mn_sound_file_chooser_dialog_has_selected_file
-#define self_new mn_sound_file_chooser_dialog_new
-GType
-mn_sound_file_chooser_dialog_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNSoundFileChooserDialogClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_sound_file_chooser_dialog_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNSoundFileChooserDialog),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_sound_file_chooser_dialog_init,
- NULL
- };
-
- type = g_type_register_static (GTK_TYPE_FILE_CHOOSER_DIALOG, "MNSoundFileChooserDialog", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNSoundFileChooserDialog *)g_object_new(mn_sound_file_chooser_dialog_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNSoundFileChooserDialog * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNSoundFileChooserDialog *
-GET_NEW_VARG (const char *first, ...)
-{
- MNSoundFileChooserDialog *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNSoundFileChooserDialog *)g_object_new_valist (mn_sound_file_chooser_dialog_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:Sound:File:Chooser:Dialog::constructor"
- GObject *obj_self;
- MNSoundFileChooserDialog *self;
- obj_self = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
- self = MN_SOUND_FILE_CHOOSER_DIALOG (obj_self);
-#line 42 "src/mn-sound-file-chooser-dialog.gob"
- mn_sound_file_chooser_dialog_constructor (self);
-#line 131 "mn-sound-file-chooser-dialog.c"
- return obj_self;
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::dispose"
- MNSoundFileChooserDialog *self G_GNUC_UNUSED = MN_SOUND_FILE_CHOOSER_DIALOG (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 40 "src/mn-sound-file-chooser-dialog.gob"
- if(self->_priv->sound_player) { g_object_unref ((gpointer) self->_priv->sound_player); self->_priv->sound_player = NULL; }
-#line 146 "mn-sound-file-chooser-dialog.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::finalize"
- MNSoundFileChooserDialog *self G_GNUC_UNUSED = MN_SOUND_FILE_CHOOSER_DIALOG (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_sound_file_chooser_dialog_init (MNSoundFileChooserDialog * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_SOUND_FILE_CHOOSER_DIALOG,MNSoundFileChooserDialogPrivate);
-}
-#undef __GOB_FUNCTION__
-static void
-mn_sound_file_chooser_dialog_class_init (MNSoundFileChooserDialogClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNSoundFileChooserDialogPrivate));
-
- parent_class = g_type_class_ref (GTK_TYPE_FILE_CHOOSER_DIALOG);
-
- g_object_class->constructor = ___constructor;
- g_object_class->dispose = ___dispose;
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 42 "src/mn-sound-file-chooser-dialog.gob"
-static void
-mn_sound_file_chooser_dialog_constructor (MNSoundFileChooserDialog * self G_GNUC_UNUSED)
-{
-#line 191 "mn-sound-file-chooser-dialog.c"
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::constructor"
-{
-#line 43 "src/mn-sound-file-chooser-dialog.gob"
-
- GtkFileFilter *filter;
-
- selfp->sound_player = mn_sound_player_new();
-
- gtk_window_set_title(GTK_WINDOW(self), _("Select a File"));
-
- gtk_dialog_add_buttons(GTK_DIALOG(self),
- GTK_STOCK_MEDIA_PLAY, RESPONSE_PLAY,
- GTK_STOCK_MEDIA_STOP, RESPONSE_STOP,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
- NULL);
-
- filter = gtk_file_filter_new();
- gtk_file_filter_set_name(filter, _("All files"));
- gtk_file_filter_add_pattern(filter, "*");
- gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(self), filter);
-
- filter = gtk_file_filter_new();
- gtk_file_filter_set_name(filter, _("Audio files"));
- gtk_file_filter_add_mime_type(filter, "audio/*");
- gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(self), filter);
- gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(self), filter);
-
- g_object_connect(self,
- "signal::response", self_response_h, NULL,
- "signal::selection-changed", self_update_sensitivity, NULL,
- NULL);
-
- g_object_connect(selfp->sound_player,
- "swapped-signal::notify::can-play", self_update_sensitivity, self,
- "swapped-signal::notify::can-stop", self_update_sensitivity, self,
- NULL);
-
- self_update_sensitivity(self);
- }}
-#line 232 "mn-sound-file-chooser-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 81 "src/mn-sound-file-chooser-dialog.gob"
-static void
-mn_sound_file_chooser_dialog_response_h (GtkDialog * dialog, int response, gpointer user_data)
-{
-#line 239 "mn-sound-file-chooser-dialog.c"
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::response_h"
-{
-#line 83 "src/mn-sound-file-chooser-dialog.gob"
-
- Self *self = SELF(dialog);
-
- if (response == RESPONSE_PLAY)
- {
- char *filename;
-
- filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
- if (filename)
- {
- mn_sound_player_play(selfp->sound_player, filename, GTK_WINDOW(dialog));
- g_free(filename);
- }
- }
- else if (response == RESPONSE_STOP)
- mn_sound_player_stop(selfp->sound_player);
- else
- return;
-
- /*
- * Do not pass our internal responses to client code and do not
- * let the dialog be destroyed.
- */
- g_signal_stop_emission_by_name(dialog, "response");
- }}
-#line 268 "mn-sound-file-chooser-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 109 "src/mn-sound-file-chooser-dialog.gob"
-static void
-mn_sound_file_chooser_dialog_update_sensitivity (MNSoundFileChooserDialog * self)
-{
-#line 275 "mn-sound-file-chooser-dialog.c"
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::update_sensitivity"
-#line 109 "src/mn-sound-file-chooser-dialog.gob"
- g_return_if_fail (self != NULL);
-#line 109 "src/mn-sound-file-chooser-dialog.gob"
- g_return_if_fail (MN_IS_SOUND_FILE_CHOOSER_DIALOG (self));
-#line 281 "mn-sound-file-chooser-dialog.c"
-{
-#line 111 "src/mn-sound-file-chooser-dialog.gob"
-
- gtk_dialog_set_response_sensitive(GTK_DIALOG(self), RESPONSE_PLAY, self_has_selected_file(self) && mn_sound_player_get_can_play(selfp->sound_player));
- gtk_dialog_set_response_sensitive(GTK_DIALOG(self), RESPONSE_STOP, mn_sound_player_get_can_stop(selfp->sound_player));
- }}
-#line 288 "mn-sound-file-chooser-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 116 "src/mn-sound-file-chooser-dialog.gob"
-static gboolean
-mn_sound_file_chooser_dialog_has_selected_file (MNSoundFileChooserDialog * self)
-{
-#line 295 "mn-sound-file-chooser-dialog.c"
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::has_selected_file"
-#line 116 "src/mn-sound-file-chooser-dialog.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 116 "src/mn-sound-file-chooser-dialog.gob"
- g_return_val_if_fail (MN_IS_SOUND_FILE_CHOOSER_DIALOG (self), (gboolean )0);
-#line 301 "mn-sound-file-chooser-dialog.c"
-{
-#line 118 "src/mn-sound-file-chooser-dialog.gob"
-
- char *filename;
- gboolean has;
-
- filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(self));
- has = filename && ! g_file_test(filename, G_FILE_TEST_IS_DIR);
- g_free(filename);
-
- return has;
- }}
-#line 314 "mn-sound-file-chooser-dialog.c"
-#undef __GOB_FUNCTION__
-
-#line 129 "src/mn-sound-file-chooser-dialog.gob"
-GtkWidget *
-mn_sound_file_chooser_dialog_new (void)
-{
-#line 321 "mn-sound-file-chooser-dialog.c"
-#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::new"
-{
-#line 131 "src/mn-sound-file-chooser-dialog.gob"
-
- return GTK_WIDGET(GET_NEW);
- }}
-#line 328 "mn-sound-file-chooser-dialog.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-sound-file-chooser-dialog.gob.stamp b/build/src/mn-sound-file-chooser-dialog.gob.stamp
diff --git a/build/src/mn-sound-file-chooser-dialog.h b/build/src/mn-sound-file-chooser-dialog.h
@@ -1,65 +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_SOUND_FILE_CHOOSER_DIALOG_H__
-#define __MN_SOUND_FILE_CHOOSER_DIALOG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_SOUND_FILE_CHOOSER_DIALOG (mn_sound_file_chooser_dialog_get_type())
-#define MN_SOUND_FILE_CHOOSER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sound_file_chooser_dialog_get_type(), MNSoundFileChooserDialog)
-#define MN_SOUND_FILE_CHOOSER_DIALOG_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sound_file_chooser_dialog_get_type(), MNSoundFileChooserDialog const)
-#define MN_SOUND_FILE_CHOOSER_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_sound_file_chooser_dialog_get_type(), MNSoundFileChooserDialogClass)
-#define MN_IS_SOUND_FILE_CHOOSER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_sound_file_chooser_dialog_get_type ())
-
-#define MN_SOUND_FILE_CHOOSER_DIALOG_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_sound_file_chooser_dialog_get_type(), MNSoundFileChooserDialogClass)
-
-/* Private structure type */
-typedef struct _MNSoundFileChooserDialogPrivate MNSoundFileChooserDialogPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_SOUND_FILE_CHOOSER_DIALOG__
-#define __TYPEDEF_MN_SOUND_FILE_CHOOSER_DIALOG__
-typedef struct _MNSoundFileChooserDialog MNSoundFileChooserDialog;
-#endif
-struct _MNSoundFileChooserDialog {
- GtkFileChooserDialog __parent__;
- /*< private >*/
- MNSoundFileChooserDialogPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNSoundFileChooserDialogClass MNSoundFileChooserDialogClass;
-struct _MNSoundFileChooserDialogClass {
- GtkFileChooserDialogClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_sound_file_chooser_dialog_get_type (void) G_GNUC_CONST;
-#line 129 "src/mn-sound-file-chooser-dialog.gob"
-GtkWidget * mn_sound_file_chooser_dialog_new (void);
-#line 60 "mn-sound-file-chooser-dialog.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-sound-player-private.h b/build/src/mn-sound-player-private.h
@@ -1,26 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_SOUND_PLAYER_PRIVATE_H__
-#define __MN_SOUND_PLAYER_PRIVATE_H__
-
-#include "mn-sound-player.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNSoundPlayerPrivate {
-#line 36 "src/mn-sound-player.gob"
- gboolean can_play;
-#line 49 "src/mn-sound-player.gob"
- GPid pid;
-#line 50 "src/mn-sound-player.gob"
- GSource * watch_source;
-#line 20 "mn-sound-player-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-sound-player.c b/build/src/mn-sound-player.c
@@ -1,589 +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-sound-player.h"
-
-#include "mn-sound-player-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-sound-player.gob"
-
-#include <sys/types.h>
-#include <signal.h>
-#include <glib/gi18n.h>
-#include <gnome.h>
-#include "mn-conf.h"
-#include "mn-locked-callback.h"
-#include "mn-util.h"
-
-#line 36 "mn-sound-player.c"
-/* self casting macros */
-#define SELF(x) MN_SOUND_PLAYER(x)
-#define SELF_CONST(x) MN_SOUND_PLAYER_CONST(x)
-#define IS_SELF(x) MN_IS_SOUND_PLAYER(x)
-#define TYPE_SELF MN_TYPE_SOUND_PLAYER
-#define SELF_CLASS(x) MN_SOUND_PLAYER_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_SOUND_PLAYER_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNSoundPlayer Self;
-typedef MNSoundPlayerClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-#line 0 "src/mn-sound-player.gob"
-static void mn_sound_player_class_init (MNSoundPlayerClass * c) G_GNUC_UNUSED;
-#line 54 "mn-sound-player.c"
-#line 52 "src/mn-sound-player.gob"
-static void mn_sound_player_init (MNSoundPlayer * self) G_GNUC_UNUSED;
-#line 57 "mn-sound-player.c"
-#line 62 "src/mn-sound-player.gob"
-static void mn_sound_player_dispose (MNSoundPlayer * self) G_GNUC_UNUSED;
-#line 60 "mn-sound-player.c"
-#line 68 "src/mn-sound-player.gob"
-static void mn_sound_player_notify_play_command_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-#line 63 "mn-sound-player.c"
-#line 85 "src/mn-sound-player.gob"
-static gboolean mn_sound_player_can_play (MNSoundPlayer * self) G_GNUC_UNUSED;
-#line 66 "mn-sound-player.c"
-#line 182 "src/mn-sound-player.gob"
-static gboolean mn_sound_player_subst_cb (const char * name, char ** value, gpointer data) G_GNUC_UNUSED;
-#line 69 "mn-sound-player.c"
-#line 202 "src/mn-sound-player.gob"
-static void mn_sound_player_stop_real (MNSoundPlayer * self, gboolean notify_can_stop) G_GNUC_UNUSED;
-#line 72 "mn-sound-player.c"
-#line 225 "src/mn-sound-player.gob"
-static void mn_sound_player_watch_abandoned_cb (GPid pid, int status, gpointer data) G_GNUC_UNUSED;
-#line 75 "mn-sound-player.c"
-#line 231 "src/mn-sound-player.gob"
-static void mn_sound_player_watch_cb (GPid pid, int status, gpointer data) G_GNUC_UNUSED;
-#line 78 "mn-sound-player.c"
-
-enum {
- PROP_0,
- PROP_CAN_PLAY,
- PROP_CAN_STOP
-};
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_get_can_play mn_sound_player_get_can_play
-#define self_get_can_stop mn_sound_player_get_can_stop
-#define self_notify_play_command_cb mn_sound_player_notify_play_command_cb
-#define self_can_play mn_sound_player_can_play
-#define self_play mn_sound_player_play
-#define self_subst_cb mn_sound_player_subst_cb
-#define self_stop mn_sound_player_stop
-#define self_stop_real mn_sound_player_stop_real
-#define self_watch_abandoned_cb mn_sound_player_watch_abandoned_cb
-#define self_watch_cb mn_sound_player_watch_cb
-#define self_new mn_sound_player_new
-GType
-mn_sound_player_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNSoundPlayerClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_sound_player_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNSoundPlayer),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_sound_player_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNSoundPlayer", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNSoundPlayer *)g_object_new(mn_sound_player_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNSoundPlayer * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNSoundPlayer *
-GET_NEW_VARG (const char *first, ...)
-{
- MNSoundPlayer *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNSoundPlayer *)g_object_new_valist (mn_sound_player_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Sound:Player::dispose"
- MNSoundPlayer *self G_GNUC_UNUSED = MN_SOUND_PLAYER (obj_self);
-#line 62 "src/mn-sound-player.gob"
- mn_sound_player_dispose (self);
-#line 151 "mn-sound-player.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:Sound:Player::finalize"
- MNSoundPlayer *self G_GNUC_UNUSED = MN_SOUND_PLAYER (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_sound_player_class_init (MNSoundPlayerClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Sound:Player::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNSoundPlayerPrivate));
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- g_object_class->dispose = ___dispose;
- g_object_class->finalize = ___finalize;
- g_object_class->get_property = ___object_get_property;
- {
- GParamSpec *param_spec;
-
- param_spec = g_param_spec_boolean
- ("can_play" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE));
- g_object_class_install_property (g_object_class,
- PROP_CAN_PLAY,
- param_spec);
- param_spec = g_param_spec_boolean
- ("can_stop" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE));
- g_object_class_install_property (g_object_class,
- PROP_CAN_STOP,
- param_spec);
- }
-}
-#undef __GOB_FUNCTION__
-#line 52 "src/mn-sound-player.gob"
-static void
-mn_sound_player_init (MNSoundPlayer * self G_GNUC_UNUSED)
-{
-#line 210 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_SOUND_PLAYER,MNSoundPlayerPrivate);
- {
-#line 53 "src/mn-sound-player.gob"
-
- selfp->can_play = self_can_play(self);
-
- mn_g_object_gconf_notification_add_gdk_locked(self,
- MN_CONF_SOUNDS_PLAY_COMMAND,
- self_notify_play_command_cb,
- self);
-
-#line 223 "mn-sound-player.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:Sound:Player::get_property"
-{
- MNSoundPlayer *self G_GNUC_UNUSED;
-
- self = MN_SOUND_PLAYER (object);
-
- switch (property_id) {
- case PROP_CAN_PLAY:
- {
-#line 39 "src/mn-sound-player.gob"
-
- g_value_set_boolean(VAL, selfp->can_play);
-
-#line 246 "mn-sound-player.c"
- }
- break;
- case PROP_CAN_STOP:
- {
-#line 45 "src/mn-sound-player.gob"
-
- g_value_set_boolean(VAL, selfp->pid != 0);
-
-#line 255 "mn-sound-player.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-sound-player.gob"
-gboolean
-mn_sound_player_get_can_play (MNSoundPlayer * self)
-{
-#line 275 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::get_can_play"
-{
-#line 37 "src/mn-sound-player.gob"
- gboolean val; g_object_get (G_OBJECT (self), "can_play", &val, NULL); return val;
-}}
-#line 281 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 45 "src/mn-sound-player.gob"
-gboolean
-mn_sound_player_get_can_stop (MNSoundPlayer * self)
-{
-#line 288 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::get_can_stop"
-{
-#line 43 "src/mn-sound-player.gob"
- gboolean val; g_object_get (G_OBJECT (self), "can_stop", &val, NULL); return val;
-}}
-#line 294 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-
-#line 62 "src/mn-sound-player.gob"
-static void
-mn_sound_player_dispose (MNSoundPlayer * self G_GNUC_UNUSED)
-{
-#line 302 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::dispose"
-{
-#line 63 "src/mn-sound-player.gob"
-
- /* do not emit notify::can-stop at finalization time (pass FALSE) */
- self_stop_real(self, FALSE);
- }}
-#line 310 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 68 "src/mn-sound-player.gob"
-static void
-mn_sound_player_notify_play_command_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-{
-#line 317 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::notify_play_command_cb"
-{
-#line 73 "src/mn-sound-player.gob"
-
- Self *self = user_data;
- gboolean can_play;
-
- can_play = self_can_play(self);
- if (can_play != selfp->can_play)
- {
- selfp->can_play = can_play;
- g_object_notify(G_OBJECT(self), "can-play");
- }
- }}
-#line 332 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 85 "src/mn-sound-player.gob"
-static gboolean
-mn_sound_player_can_play (MNSoundPlayer * self)
-{
-#line 339 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::can_play"
-#line 85 "src/mn-sound-player.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 85 "src/mn-sound-player.gob"
- g_return_val_if_fail (MN_IS_SOUND_PLAYER (self), (gboolean )0);
-#line 345 "mn-sound-player.c"
-{
-#line 87 "src/mn-sound-player.gob"
-
- char *command;
- gboolean can;
-
- command = mn_conf_get_string(MN_CONF_SOUNDS_PLAY_COMMAND);
- can = command && *command;
- g_free(command);
-
- return can;
- }}
-#line 358 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 98 "src/mn-sound-player.gob"
-void
-mn_sound_player_play (MNSoundPlayer * self, const char * filename, GtkWindow * parent)
-{
-#line 365 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::play"
-#line 98 "src/mn-sound-player.gob"
- g_return_if_fail (self != NULL);
-#line 98 "src/mn-sound-player.gob"
- g_return_if_fail (MN_IS_SOUND_PLAYER (self));
-#line 98 "src/mn-sound-player.gob"
- g_return_if_fail (filename != NULL);
-#line 373 "mn-sound-player.c"
-{
-#line 100 "src/mn-sound-player.gob"
-
- const char *error_message;
- char *command = NULL;
- char *subst_command;
- char *shell;
- char *argv[4];
- GError *err = NULL;
-
- g_return_if_fail(parent == NULL || GTK_IS_WINDOW(parent));
- g_return_if_fail(selfp->can_play);
-
- self_stop(self);
-
- /*
- * If a parent window is provided, we are normally called because
- * the user interacted with the UI. Otherwise, we are called because
- * a background event has occurred, and for clarity we should
- * mention the originating application in the error message.
- */
- if (parent)
- error_message = N_("Unable to play sound");
- else
- error_message = N_("A command error has occurred in Mail Notification");
-
- command = mn_conf_get_string(MN_CONF_SOUNDS_PLAY_COMMAND);
- if (! command || ! *command)
- goto end;
-
- subst_command = mn_subst_command(command, self_subst_cb, (gpointer) filename, &err);
- if (! subst_command)
- {
- mn_show_error_dialog(parent,
- _(error_message),
- _("Unable to execute \"%s\": %s."),
- command,
- err->message);
- g_error_free(err);
- goto end;
- }
-
- /*
- * We cannot use gnome_execute_child() because it does not reap the
- * child, which is needed for GChildWatch.
- */
-
- shell = gnome_util_user_shell();
-
- argv[0] = shell;
- argv[1] = "-c";
- argv[2] = subst_command;
- argv[3] = NULL;
-
- if (g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &selfp->pid, &err))
- {
- GSource *source;
-
- g_object_notify(G_OBJECT(self), "can-stop");
-
- g_assert(selfp->watch_source == NULL);
-
- source = g_child_watch_source_new(selfp->pid);
- g_source_set_callback(source, (GSourceFunc) self_watch_cb, self, NULL);
- g_source_attach(source, NULL);
- selfp->watch_source = source;
- }
- else
- {
- mn_show_error_dialog(parent,
- _(error_message),
- _("Unable to execute \"%s\": %s."),
- command,
- err->message);
- g_error_free(err);
- }
-
- g_free(subst_command);
- g_free(shell);
-
- end:
- g_free(command);
- }}
-#line 457 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 182 "src/mn-sound-player.gob"
-static gboolean
-mn_sound_player_subst_cb (const char * name, char ** value, gpointer data)
-{
-#line 464 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::subst_cb"
-{
-#line 184 "src/mn-sound-player.gob"
-
- const char *filename = data;
-
- if (! strcmp(name, "file"))
- {
- *value = g_strdup(filename);
- return TRUE;
- }
-
- return FALSE;
- }}
-#line 479 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 196 "src/mn-sound-player.gob"
-void
-mn_sound_player_stop (MNSoundPlayer * self)
-{
-#line 486 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::stop"
-#line 196 "src/mn-sound-player.gob"
- g_return_if_fail (self != NULL);
-#line 196 "src/mn-sound-player.gob"
- g_return_if_fail (MN_IS_SOUND_PLAYER (self));
-#line 492 "mn-sound-player.c"
-{
-#line 198 "src/mn-sound-player.gob"
-
- self_stop_real(self, TRUE);
- }}
-#line 498 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 202 "src/mn-sound-player.gob"
-static void
-mn_sound_player_stop_real (MNSoundPlayer * self, gboolean notify_can_stop)
-{
-#line 505 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::stop_real"
-#line 202 "src/mn-sound-player.gob"
- g_return_if_fail (self != NULL);
-#line 202 "src/mn-sound-player.gob"
- g_return_if_fail (MN_IS_SOUND_PLAYER (self));
-#line 511 "mn-sound-player.c"
-{
-#line 204 "src/mn-sound-player.gob"
-
- /*
- * If we remove the watch, a zombie will be left since GLib will
- * not have waited for the process, so we just abandon the watch.
- */
- if (selfp->watch_source)
- {
- g_source_set_callback(selfp->watch_source, (GSourceFunc) self_watch_abandoned_cb, NULL, NULL);
- g_source_unref(selfp->watch_source);
- selfp->watch_source = NULL;
- }
-
- if (selfp->pid)
- {
- kill(selfp->pid, SIGTERM);
- selfp->pid = 0;
- if (notify_can_stop)
- g_object_notify(G_OBJECT(self), "can-stop");
- }
- }}
-#line 534 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 225 "src/mn-sound-player.gob"
-static void
-mn_sound_player_watch_abandoned_cb (GPid pid, int status, gpointer data)
-{
-#line 541 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::watch_abandoned_cb"
-{
-#line 227 "src/mn-sound-player.gob"
-
- /* no op */
- }}
-#line 548 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 231 "src/mn-sound-player.gob"
-static void
-mn_sound_player_watch_cb (GPid pid, int status, gpointer data)
-{
-#line 555 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::watch_cb"
-{
-#line 233 "src/mn-sound-player.gob"
-
- Self *self = data;
-
- GDK_THREADS_ENTER();
-
- g_assert(selfp->watch_source != NULL);
-
- g_source_unref(selfp->watch_source);
- selfp->watch_source = NULL;
- selfp->pid = 0;
-
- g_object_notify(G_OBJECT(self), "can-stop");
-
- /* do not call gdk_flush(), we're normally in the main thread */
- GDK_THREADS_LEAVE();
- }}
-#line 575 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
-
-#line 250 "src/mn-sound-player.gob"
-MNSoundPlayer *
-mn_sound_player_new (void)
-{
-#line 582 "mn-sound-player.c"
-#define __GOB_FUNCTION__ "MN:Sound:Player::new"
-{
-#line 252 "src/mn-sound-player.gob"
-
- return GET_NEW;
- }}
-#line 589 "mn-sound-player.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-sound-player.gob.stamp b/build/src/mn-sound-player.gob.stamp
diff --git a/build/src/mn-sound-player.h b/build/src/mn-sound-player.h
@@ -1,91 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-#ifndef __MN_SOUND_PLAYER_H__
-#define __MN_SOUND_PLAYER_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-#include <gtk/gtk.h>
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_SOUND_PLAYER (mn_sound_player_get_type())
-#define MN_SOUND_PLAYER(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sound_player_get_type(), MNSoundPlayer)
-#define MN_SOUND_PLAYER_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sound_player_get_type(), MNSoundPlayer const)
-#define MN_SOUND_PLAYER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_sound_player_get_type(), MNSoundPlayerClass)
-#define MN_IS_SOUND_PLAYER(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_sound_player_get_type ())
-
-#define MN_SOUND_PLAYER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_sound_player_get_type(), MNSoundPlayerClass)
-
-/* Private structure type */
-typedef struct _MNSoundPlayerPrivate MNSoundPlayerPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_SOUND_PLAYER__
-#define __TYPEDEF_MN_SOUND_PLAYER__
-typedef struct _MNSoundPlayer MNSoundPlayer;
-#endif
-struct _MNSoundPlayer {
- GObject __parent__;
- /*< private >*/
- MNSoundPlayerPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNSoundPlayerClass MNSoundPlayerClass;
-struct _MNSoundPlayerClass {
- GObjectClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_sound_player_get_type (void) G_GNUC_CONST;
-#line 39 "src/mn-sound-player.gob"
-gboolean mn_sound_player_get_can_play (MNSoundPlayer * self);
-#line 60 "mn-sound-player.h"
-#line 45 "src/mn-sound-player.gob"
-gboolean mn_sound_player_get_can_stop (MNSoundPlayer * self);
-#line 63 "mn-sound-player.h"
-#line 98 "src/mn-sound-player.gob"
-void mn_sound_player_play (MNSoundPlayer * self,
- const char * filename,
- GtkWindow * parent);
-#line 68 "mn-sound-player.h"
-#line 196 "src/mn-sound-player.gob"
-void mn_sound_player_stop (MNSoundPlayer * self);
-#line 71 "mn-sound-player.h"
-#line 250 "src/mn-sound-player.gob"
-MNSoundPlayer * mn_sound_player_new (void);
-#line 74 "mn-sound-player.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_SOUND_PLAYER_GET_PROP_CAN_PLAY(arg) "can_play", __extension__ ({gboolean *z = (arg); z;})
-#define MN_SOUND_PLAYER_GET_PROP_CAN_STOP(arg) "can_stop", __extension__ ({gboolean *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_SOUND_PLAYER_GET_PROP_CAN_PLAY(arg) "can_play",(gboolean *)(arg)
-#define MN_SOUND_PLAYER_GET_PROP_CAN_STOP(arg) "can_stop",(gboolean *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-standard-message-view-private.h b/build/src/mn-standard-message-view-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_STANDARD_MESSAGE_VIEW_PRIVATE_H__
-#define __MN_STANDARD_MESSAGE_VIEW_PRIVATE_H__
-
-#include "mn-standard-message-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-standard-message-view.c b/build/src/mn-standard-message-view.c
@@ -1,250 +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-standard-message-view.h"
-
-#include "mn-standard-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-standard-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-standard-message-view.c"
-/* self casting macros */
-#define SELF(x) MN_STANDARD_MESSAGE_VIEW(x)
-#define SELF_CONST(x) MN_STANDARD_MESSAGE_VIEW_CONST(x)
-#define IS_SELF(x) MN_IS_STANDARD_MESSAGE_VIEW(x)
-#define TYPE_SELF MN_TYPE_STANDARD_MESSAGE_VIEW
-#define SELF_CLASS(x) MN_STANDARD_MESSAGE_VIEW_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_STANDARD_MESSAGE_VIEW_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNStandardMessageView Self;
-typedef MNStandardMessageViewClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-standard-message-view.gob"
-static void mn_standard_message_view_init (MNStandardMessageView * o) G_GNUC_UNUSED;
-#line 51 "mn-standard-message-view.c"
-#line 0 "src/mn-standard-message-view.gob"
-static void mn_standard_message_view_class_init (MNStandardMessageViewClass * c) G_GNUC_UNUSED;
-#line 54 "mn-standard-message-view.c"
-#line 34 "src/mn-standard-message-view.gob"
-static void ___1_mn_standard_message_view_append_message (MNMessageView * view, MNMessage * message, time_t now) G_GNUC_UNUSED;
-#line 57 "mn-standard-message-view.c"
-#line 51 "src/mn-standard-message-view.gob"
-static void ___2_mn_standard_message_view_append_message_separator (MNMessageView * view) G_GNUC_UNUSED;
-#line 60 "mn-standard-message-view.c"
-#line 58 "src/mn-standard-message-view.gob"
-static void mn_standard_message_view_append_row (MNStandardMessageView * self, const char * name, const char * value) G_GNUC_UNUSED;
-#line 63 "mn-standard-message-view.c"
-#line 68 "src/mn-standard-message-view.gob"
-static void mn_standard_message_view_append_header (MNStandardMessageView * self, const char * name) G_GNUC_UNUSED;
-#line 66 "mn-standard-message-view.c"
-
-/* pointer to the class of our parent */
-static MNMessageViewClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_append_row mn_standard_message_view_append_row
-#define self_append_header mn_standard_message_view_append_header
-#define self_new mn_standard_message_view_new
-GType
-mn_standard_message_view_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNStandardMessageViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_standard_message_view_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNStandardMessageView),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_standard_message_view_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_MESSAGE_VIEW, "MNStandardMessageView", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNStandardMessageView *)g_object_new(mn_standard_message_view_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNStandardMessageView * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNStandardMessageView *
-GET_NEW_VARG (const char *first, ...)
-{
- MNStandardMessageView *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNStandardMessageView *)g_object_new_valist (mn_standard_message_view_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_standard_message_view_init (MNStandardMessageView * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Standard:Message:View::init"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_standard_message_view_class_init (MNStandardMessageViewClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Standard: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-standard-message-view.gob"
- mn_message_view_class->append_message = ___1_mn_standard_message_view_append_message;
-#line 51 "src/mn-standard-message-view.gob"
- mn_message_view_class->append_message_separator = ___2_mn_standard_message_view_append_message_separator;
-#line 135 "mn-standard-message-view.c"
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 34 "src/mn-standard-message-view.gob"
-static void
-___1_mn_standard_message_view_append_message (MNMessageView * view G_GNUC_UNUSED, MNMessage * message, time_t now)
-#line 144 "mn-standard-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:Standard:Message:View::append_message"
-{
-#line 36 "src/mn-standard-message-view.gob"
-
- Self *self = SELF(view);
-
- self_append_row(self, _("Mailbox:"), message->mailbox->runtime_name);
- self_append_row(self, _("From:"), message->from);
- self_append_row(self, _("Subject:"), message->subject);
-
- if (message->sent_time > 0)
- {
- self_append_header(self, _("Sent:"));
- 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 166 "mn-standard-message-view.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 51 "src/mn-standard-message-view.gob"
-static void
-___2_mn_standard_message_view_append_message_separator (MNMessageView * view G_GNUC_UNUSED)
-#line 173 "mn-standard-message-view.c"
-#define PARENT_HANDLER(___view) \
- { if(MN_MESSAGE_VIEW_CLASS(parent_class)->append_message_separator) \
- (* MN_MESSAGE_VIEW_CLASS(parent_class)->append_message_separator)(___view); }
-{
-#define __GOB_FUNCTION__ "MN:Standard:Message:View::append_message_separator"
-{
-#line 53 "src/mn-standard-message-view.gob"
-
- mn_text_table_append_blank_cell(MN_TEXT_TABLE(view), 0, 12);
- mn_text_table_line_break(MN_TEXT_TABLE(view));
- }}
-#line 185 "mn-standard-message-view.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 58 "src/mn-standard-message-view.gob"
-static void
-mn_standard_message_view_append_row (MNStandardMessageView * self, const char * name, const char * value)
-{
-#line 193 "mn-standard-message-view.c"
-#define __GOB_FUNCTION__ "MN:Standard:Message:View::append_row"
-#line 58 "src/mn-standard-message-view.gob"
- g_return_if_fail (self != NULL);
-#line 58 "src/mn-standard-message-view.gob"
- g_return_if_fail (MN_IS_STANDARD_MESSAGE_VIEW (self));
-#line 58 "src/mn-standard-message-view.gob"
- g_return_if_fail (name != NULL);
-#line 58 "src/mn-standard-message-view.gob"
- g_return_if_fail (value != NULL);
-#line 203 "mn-standard-message-view.c"
-{
-#line 62 "src/mn-standard-message-view.gob"
-
- self_append_header(self, name);
- mn_text_table_append_text_cell(MN_TEXT_TABLE(self), value);
- mn_text_table_line_break(MN_TEXT_TABLE(self));
- }}
-#line 211 "mn-standard-message-view.c"
-#undef __GOB_FUNCTION__
-
-#line 68 "src/mn-standard-message-view.gob"
-static void
-mn_standard_message_view_append_header (MNStandardMessageView * self, const char * name)
-{
-#line 218 "mn-standard-message-view.c"
-#define __GOB_FUNCTION__ "MN:Standard:Message:View::append_header"
-#line 68 "src/mn-standard-message-view.gob"
- g_return_if_fail (self != NULL);
-#line 68 "src/mn-standard-message-view.gob"
- g_return_if_fail (MN_IS_STANDARD_MESSAGE_VIEW (self));
-#line 68 "src/mn-standard-message-view.gob"
- g_return_if_fail (name != NULL);
-#line 226 "mn-standard-message-view.c"
-{
-#line 70 "src/mn-standard-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 236 "mn-standard-message-view.c"
-#undef __GOB_FUNCTION__
-
-#line 78 "src/mn-standard-message-view.gob"
-GtkWidget *
-mn_standard_message_view_new (void)
-{
-#line 243 "mn-standard-message-view.c"
-#define __GOB_FUNCTION__ "MN:Standard:Message:View::new"
-{
-#line 80 "src/mn-standard-message-view.gob"
-
- return GTK_WIDGET(GET_NEW);
- }}
-#line 250 "mn-standard-message-view.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-standard-message-view.gob.stamp b/build/src/mn-standard-message-view.gob.stamp
diff --git a/build/src/mn-standard-message-view.h b/build/src/mn-standard-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_STANDARD_MESSAGE_VIEW_H__
-#define __MN_STANDARD_MESSAGE_VIEW_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_STANDARD_MESSAGE_VIEW (mn_standard_message_view_get_type())
-#define MN_STANDARD_MESSAGE_VIEW(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_standard_message_view_get_type(), MNStandardMessageView)
-#define MN_STANDARD_MESSAGE_VIEW_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_standard_message_view_get_type(), MNStandardMessageView const)
-#define MN_STANDARD_MESSAGE_VIEW_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_standard_message_view_get_type(), MNStandardMessageViewClass)
-#define MN_IS_STANDARD_MESSAGE_VIEW(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_standard_message_view_get_type ())
-
-#define MN_STANDARD_MESSAGE_VIEW_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_standard_message_view_get_type(), MNStandardMessageViewClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_STANDARD_MESSAGE_VIEW__
-#define __TYPEDEF_MN_STANDARD_MESSAGE_VIEW__
-typedef struct _MNStandardMessageView MNStandardMessageView;
-#endif
-struct _MNStandardMessageView {
- MNMessageView __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNStandardMessageViewClass MNStandardMessageViewClass;
-struct _MNStandardMessageViewClass {
- MNMessageViewClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_standard_message_view_get_type (void) G_GNUC_CONST;
-#line 78 "src/mn-standard-message-view.gob"
-GtkWidget * mn_standard_message_view_new (void);
-#line 55 "mn-standard-message-view.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-sylpheed-mailbox-backend-private.h b/build/src/mn-sylpheed-mailbox-backend-private.h
@@ -1,42 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_SYLPHEED_MAILBOX_BACKEND_PRIVATE_H__
-#define __MN_SYLPHEED_MAILBOX_BACKEND_PRIVATE_H__
-
-#include "mn-sylpheed-mailbox-backend.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 24 "src/mn-sylpheed-mailbox-backend.gob"
-
-#include "mn-locked-callback.h"
-
-/* taken from procmsg.h in the Sylpheed sources */
-#define SYLPHEED_MSG_NEW (1U << 0)
-#define SYLPHEED_MSG_UNREAD (1U << 1)
-
-/* taken from defs.h in the Sylpheed sources */
-#define SYLPHEED_MARK_FILE ".sylpheed_mark"
-
-typedef struct
-{
- char *position;
- gsize bytes_left;
-} ByteStream;
-
-#line 31 "mn-sylpheed-mailbox-backend-private.h"
-#line 448 "src/mn-sylpheed-mailbox-backend.gob"
-GHashTable * mn_sylpheed_mailbox_backend_read_marks (GnomeVFSURI * mailbox_uri, GError ** err);
-#line 34 "mn-sylpheed-mailbox-backend-private.h"
-#line 507 "src/mn-sylpheed-mailbox-backend.gob"
-gboolean mn_sylpheed_mailbox_backend_write_marks (GnomeVFSURI * mailbox_uri, GHashTable * marks, GError ** err);
-#line 37 "mn-sylpheed-mailbox-backend-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-sylpheed-mailbox-backend.c b/build/src/mn-sylpheed-mailbox-backend.c
@@ -1,804 +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-sylpheed-mailbox-backend.h"
-
-#include "mn-sylpheed-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 41 "src/mn-sylpheed-mailbox-backend.gob"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <glib/gi18n.h>
-#include "mn-mailbox-private.h"
-#include "mn-reentrant-mailbox-private.h"
-#include "mn-vfs-mailbox-private.h"
-#include "mn-vfs-mailbox-backend-private.h"
-#include "mn-vfs.h"
-#include "mn-util.h"
-#include "mn-message-mime.h"
-#include "mn-sylpheed-message.h"
-
-/* taken from defs.h in the Sylpheed sources */
-#define SYLPHEED_MARK_VERSION 2
-
-/* taken from defs.h in the Claws Mail sources */
-#define CLAWS_MAIL_CACHE_FILE ".sylpheed_claws_cache"
-
-#line 47 "mn-sylpheed-mailbox-backend.c"
-/* self casting macros */
-#define SELF(x) MN_SYLPHEED_MAILBOX_BACKEND(x)
-#define SELF_CONST(x) MN_SYLPHEED_MAILBOX_BACKEND_CONST(x)
-#define IS_SELF(x) MN_IS_SYLPHEED_MAILBOX_BACKEND(x)
-#define TYPE_SELF MN_TYPE_SYLPHEED_MAILBOX_BACKEND
-#define SELF_CLASS(x) MN_SYLPHEED_MAILBOX_BACKEND_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_SYLPHEED_MAILBOX_BACKEND_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNSylpheedMailboxBackend Self;
-typedef MNSylpheedMailboxBackendClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-sylpheed-mailbox-backend.gob"
-static void mn_sylpheed_mailbox_backend_init (MNSylpheedMailboxBackend * o) G_GNUC_UNUSED;
-#line 64 "mn-sylpheed-mailbox-backend.c"
-#line 66 "src/mn-sylpheed-mailbox-backend.gob"
-static void mn_sylpheed_mailbox_backend_class_init (MNSylpheedMailboxBackendClass * class) G_GNUC_UNUSED;
-#line 67 "mn-sylpheed-mailbox-backend.c"
-#line 71 "src/mn-sylpheed-mailbox-backend.gob"
-static void ___2_mn_sylpheed_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
-#line 70 "mn-sylpheed-mailbox-backend.c"
-#line 98 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean ___3_mn_sylpheed_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
-#line 73 "mn-sylpheed-mailbox-backend.c"
-#line 113 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean mn_sylpheed_mailbox_backend_is_claws_mail_mailbox (MNSylpheedMailboxBackend * self) G_GNUC_UNUSED;
-#line 76 "mn-sylpheed-mailbox-backend.c"
-#line 127 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean mn_sylpheed_mailbox_backend_has_sylpheed_locking (void) G_GNUC_UNUSED;
-#line 79 "mn-sylpheed-mailbox-backend.c"
-#line 150 "src/mn-sylpheed-mailbox-backend.gob"
-static void mn_sylpheed_mailbox_backend_update_check_latency (MNSylpheedMailboxBackend * self) G_GNUC_UNUSED;
-#line 82 "mn-sylpheed-mailbox-backend.c"
-#line 186 "src/mn-sylpheed-mailbox-backend.gob"
-static void ___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend, int check_id) G_GNUC_UNUSED;
-#line 85 "mn-sylpheed-mailbox-backend.c"
-#line 332 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean mn_sylpheed_mailbox_backend_read_local_mark_file (const char * filename, gsize * size, char ** contents, GError ** err) G_GNUC_UNUSED;
-#line 88 "mn-sylpheed-mailbox-backend.c"
-#line 378 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean mn_sylpheed_mailbox_backend_read_remote_mark_file (GnomeVFSURI * uri, gsize * size, char ** contents, GError ** err) G_GNUC_UNUSED;
-#line 91 "mn-sylpheed-mailbox-backend.c"
-#line 400 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean mn_sylpheed_mailbox_backend_read_mark_file (GnomeVFSURI * mailbox_uri, gsize * size, char ** contents, GError ** err) G_GNUC_UNUSED;
-#line 94 "mn-sylpheed-mailbox-backend.c"
-#line 426 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean mn_sylpheed_mailbox_backend_byte_stream_read (ByteStream * stream, gpointer buf, int size, GError ** err) G_GNUC_UNUSED;
-#line 97 "mn-sylpheed-mailbox-backend.c"
-#line 492 "src/mn-sylpheed-mailbox-backend.gob"
-static void mn_sylpheed_mailbox_backend_write_marks_foreach_cb (gpointer key, gpointer value, gpointer data) G_GNUC_UNUSED;
-#line 100 "mn-sylpheed-mailbox-backend.c"
-
-/* pointer to the class of our parent */
-static MNVFSMailboxBackendClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_is_claws_mail_mailbox mn_sylpheed_mailbox_backend_is_claws_mail_mailbox
-#define self_has_sylpheed_locking mn_sylpheed_mailbox_backend_has_sylpheed_locking
-#define self_update_check_latency mn_sylpheed_mailbox_backend_update_check_latency
-#define self_read_local_mark_file mn_sylpheed_mailbox_backend_read_local_mark_file
-#define self_read_remote_mark_file mn_sylpheed_mailbox_backend_read_remote_mark_file
-#define self_read_mark_file mn_sylpheed_mailbox_backend_read_mark_file
-#define self_byte_stream_read mn_sylpheed_mailbox_backend_byte_stream_read
-#define self_read_marks mn_sylpheed_mailbox_backend_read_marks
-#define self_write_marks_foreach_cb mn_sylpheed_mailbox_backend_write_marks_foreach_cb
-#define self_write_marks mn_sylpheed_mailbox_backend_write_marks
-GType
-mn_sylpheed_mailbox_backend_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNSylpheedMailboxBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_sylpheed_mailbox_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNSylpheedMailboxBackend),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_sylpheed_mailbox_backend_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_VFS_MAILBOX_BACKEND, "MNSylpheedMailboxBackend", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNSylpheedMailboxBackend *)g_object_new(mn_sylpheed_mailbox_backend_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNSylpheedMailboxBackend * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNSylpheedMailboxBackend *
-GET_NEW_VARG (const char *first, ...)
-{
- MNSylpheedMailboxBackend *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNSylpheedMailboxBackend *)g_object_new_valist (mn_sylpheed_mailbox_backend_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_sylpheed_mailbox_backend_init (MNSylpheedMailboxBackend * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::init"
-}
-#undef __GOB_FUNCTION__
-#line 66 "src/mn-sylpheed-mailbox-backend.gob"
-static void
-mn_sylpheed_mailbox_backend_class_init (MNSylpheedMailboxBackendClass * class G_GNUC_UNUSED)
-{
-#line 168 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::class_init"
- MNVFSMailboxBackendClass *mn_vfs_mailbox_backend_class = (MNVFSMailboxBackendClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX_BACKEND);
-
-#line 71 "src/mn-sylpheed-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->monitor_cb = ___2_mn_sylpheed_mailbox_backend_monitor_cb;
-#line 98 "src/mn-sylpheed-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->is = ___3_mn_sylpheed_mailbox_backend_is;
-#line 186 "src/mn-sylpheed-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->check = ___7_mn_sylpheed_mailbox_backend_check;
-#line 180 "mn-sylpheed-mailbox-backend.c"
- {
-#line 67 "src/mn-sylpheed-mailbox-backend.gob"
-
- MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "Sylpheed";
-
-#line 186 "mn-sylpheed-mailbox-backend.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 71 "src/mn-sylpheed-mailbox-backend.gob"
-static void
-___2_mn_sylpheed_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
-#line 196 "mn-sylpheed-mailbox-backend.c"
-#define PARENT_HANDLER(___backend,___info_uri,___event_type) \
- { if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb) \
- (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb)(___backend,___info_uri,___event_type); }
-{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::monitor_cb"
-{
-#line 75 "src/mn-sylpheed-mailbox-backend.gob"
-
- if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
- || event_type == GNOME_VFS_MONITOR_EVENT_DELETED
- || event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
- {
- char *filename;
-
- filename = mn_vfs_uri_extract_short_name(info_uri);
- if (filename)
- {
- /*
- * The status of the mailbox can only have changed if the
- * subject of the event is the mark file or a message file
- * (having a numbered filename).
- */
- if (! strcmp(filename, SYLPHEED_MARK_FILE) || mn_str_isnumeric(filename))
- mn_vfs_mailbox_backend_queue_check(backend);
-
- g_free(filename);
- }
- }
- }}
-#line 226 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 98 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean
-___3_mn_sylpheed_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
-#line 233 "mn-sylpheed-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:Sylpheed:Mailbox:Backend::is"
-{
-#line 102 "src/mn-sylpheed-mailbox-backend.gob"
-
- gboolean is;
- GnomeVFSURI *uri;
-
- uri = gnome_vfs_uri_append_file_name(mailbox->vfs_uri, SYLPHEED_MARK_FILE);
- is = mn_vfs_test(uri, G_FILE_TEST_IS_REGULAR);
- gnome_vfs_uri_unref(uri);
-
- return is;
- }}
-#line 252 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 113 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean
-mn_sylpheed_mailbox_backend_is_claws_mail_mailbox (MNSylpheedMailboxBackend * self)
-{
-#line 260 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::is_claws_mail_mailbox"
-#line 113 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 113 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (MN_IS_SYLPHEED_MAILBOX_BACKEND (self), (gboolean )0);
-#line 266 "mn-sylpheed-mailbox-backend.c"
-{
-#line 115 "src/mn-sylpheed-mailbox-backend.gob"
-
- gboolean is;
- GnomeVFSURI *uri;
-
- uri = gnome_vfs_uri_append_file_name(MN_VFS_MAILBOX_BACKEND(self)->mailbox->vfs_uri, CLAWS_MAIL_CACHE_FILE);
- is = mn_vfs_test(uri, G_FILE_TEST_IS_REGULAR);
- gnome_vfs_uri_unref(uri);
-
- return is;
- }}
-#line 279 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 127 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean
-mn_sylpheed_mailbox_backend_has_sylpheed_locking (void)
-{
-#line 286 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::has_sylpheed_locking"
-{
-#line 129 "src/mn-sylpheed-mailbox-backend.gob"
-
- static gboolean checked = FALSE;
- static gboolean has = FALSE;
-
- if (! checked)
- {
- char *output;
-
- if (g_spawn_command_line_sync("sylpheed --version", &output, NULL, NULL, NULL))
- {
- if (strstr(output, "+locking"))
- has = TRUE;
- g_free(output);
- }
-
- checked = TRUE;
- }
-
- return has;
- }}
-#line 310 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 150 "src/mn-sylpheed-mailbox-backend.gob"
-static void
-mn_sylpheed_mailbox_backend_update_check_latency (MNSylpheedMailboxBackend * self)
-{
-#line 317 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::update_check_latency"
-#line 150 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_if_fail (self != NULL);
-#line 150 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_if_fail (MN_IS_SYLPHEED_MAILBOX_BACKEND (self));
-#line 323 "mn-sylpheed-mailbox-backend.c"
-{
-#line 152 "src/mn-sylpheed-mailbox-backend.gob"
-
- MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
-
- mn_vfs_mailbox_lock(backend->mailbox);
-
- /*
- * If it is a Claws Mail mailbox, the check_latency can be set to
- * 0, since Claws Mail does not write the mark file in place but
- * uses an atomic rename() to move the new mark file over the
- * previous one.
- */
- if (self_is_claws_mail_mailbox(self))
- backend->check_latency = 0;
- else
- {
- /*
- * If Sylpheed was compiled with the locking patch and the
- * mailbox is local, check_latency can be set to 0, since we
- * lock the mark file while reading it.
- */
- if (self_has_sylpheed_locking() && gnome_vfs_uri_is_local(backend->mailbox->vfs_uri))
- backend->check_latency = 0;
- else
- /*
- * Otherwise, set check_latency to 3 seconds to avoid race
- * conditions that can occur when Sylpheed writes the mark
- * file while we read it.
- */
- backend->check_latency = 3000;
- }
-
- mn_vfs_mailbox_unlock(backend->mailbox);
- }}
-#line 359 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 186 "src/mn-sylpheed-mailbox-backend.gob"
-static void
-___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, int check_id)
-#line 365 "mn-sylpheed-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:Sylpheed:Mailbox:Backend::check"
-{
-#line 188 "src/mn-sylpheed-mailbox-backend.gob"
-
- GError *err = NULL;
- GnomeVFSResult result;
- GnomeVFSResult close_result;
- GnomeVFSDirectoryHandle *handle;
- GnomeVFSFileInfo *file_info;
- GHashTable *marks;
- GSList *messages = NULL;
- int num_errors = 0;
-
- self_update_check_latency(SELF(backend));
-
- mn_vfs_mailbox_backend_monitor(backend, check_id, backend->mailbox->uri, GNOME_VFS_MONITOR_DIRECTORY);
-
- marks = self_read_marks(backend->mailbox->vfs_uri, &err);
- if (! marks)
- {
- 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 read %s: %s"), SYLPHEED_MARK_FILE, err->message);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
-
- g_error_free(err);
- return;
- }
-
- if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- goto finish;
-
- result = gnome_vfs_directory_open_from_uri(&handle, backend->mailbox->vfs_uri, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result != GNOME_VFS_OK)
- {
- 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 folder: %s"), gnome_vfs_result_to_string(result));
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
-
- goto end;
- }
-
- file_info = gnome_vfs_file_info_new();
- while ((result = gnome_vfs_directory_read_next(handle, file_info)) == GNOME_VFS_OK)
- if (mn_str_isnumeric(file_info->name))
- {
- guint32 num = atoi(file_info->name);
- guint32 sflags;
- gboolean has_mark;
- gpointer value;
-
- has_mark = g_hash_table_lookup_extended(marks, GUINT_TO_POINTER(num), NULL, &value);
- if (has_mark)
- sflags = GPOINTER_TO_UINT(value);
-
- if (! has_mark || (sflags & (SYLPHEED_MSG_NEW | SYLPHEED_MSG_UNREAD)) != 0)
- {
- MNMessageFlags flags = 0;
- MNVFSMessage *message;
-
- if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- break;
-
- if (! has_mark || (sflags & SYLPHEED_MSG_NEW) != 0)
- flags |= MN_MESSAGE_NEW;
-
- /*
- * We set handle_status to FALSE, since Sylpheed has its
- * own way (mark file) of differencing seen/unseen
- * messages.
- */
- message = mn_vfs_message_new(MN_TYPE_SYLPHEED_MESSAGE,
- backend,
- NULL,
- backend->mailbox->vfs_uri,
- file_info->name,
- flags,
- FALSE,
- &err);
- if (message)
- messages = g_slist_prepend(messages, message);
- else if (err)
- {
- GnomeVFSURI *message_uri;
- char *message_text_uri;
-
- message_uri = gnome_vfs_uri_append_file_name(backend->mailbox->vfs_uri, file_info->name);
- message_text_uri = gnome_vfs_uri_to_string(message_uri, GNOME_VFS_URI_HIDE_PASSWORD);
- gnome_vfs_uri_unref(message_uri);
-
- mn_mailbox_warning(MN_MAILBOX(backend->mailbox), "cannot read message \"%s\": %s",
- message_text_uri, err->message);
- g_free(message_text_uri);
- g_clear_error(&err);
-
- num_errors++;
- }
- }
- }
- gnome_vfs_file_info_unref(file_info);
- close_result = gnome_vfs_directory_close(handle);
-
- finish:
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- {
- if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
- {
- if (close_result == GNOME_VFS_OK)
- {
- mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
-
- if (num_errors != 0)
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox),
- ngettext("cannot read %i message",
- "cannot read %i messages",
- num_errors),
- num_errors);
- }
- else
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to close folder: %s"), gnome_vfs_result_to_string(close_result));
- }
- else
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("error while reading folder: %s"), gnome_vfs_result_to_string(result));
- }
-
- mn_g_object_slist_free(messages);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- end:
- g_hash_table_destroy(marks);
- }}
-#line 516 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 332 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean
-mn_sylpheed_mailbox_backend_read_local_mark_file (const char * filename, gsize * size, char ** contents, GError ** err)
-{
-#line 524 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::read_local_mark_file"
-#line 332 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (filename != NULL, (gboolean )0);
-#line 332 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (size != NULL, (gboolean )0);
-#line 332 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (contents != NULL, (gboolean )0);
-#line 532 "mn-sylpheed-mailbox-backend.c"
-{
-#line 337 "src/mn-sylpheed-mailbox-backend.gob"
-
- int fd;
- struct flock lock;
- GIOChannel *channel;
- GError *tmp_err = NULL;
- gboolean status = FALSE;
-
- fd = open(filename, O_RDONLY);
- if (fd < 0)
- {
- g_set_error(err, 0, 0, "%s", g_strerror(errno));
- return FALSE;
- }
-
- memset(&lock, 0, sizeof(lock));
- lock.l_start = 0; /* from l_whence */
- lock.l_len = 0; /* to end of file */
- lock.l_type = F_RDLCK; /* read lock */
- lock.l_whence = SEEK_SET; /* from start of file */
-
- /* ignore lock failures */
- fcntl(fd, F_SETLKW, &lock);
-
- channel = g_io_channel_unix_new(fd);
- if (g_io_channel_set_encoding(channel, NULL, &tmp_err) == G_IO_STATUS_NORMAL)
- {
- if (g_io_channel_read_to_end(channel, contents, size, err) == G_IO_STATUS_NORMAL)
- status = TRUE;
- }
- else
- {
- g_set_error(err, 0, 0, _("unable to set encoding: %s"), tmp_err->message);
- g_error_free(tmp_err);
- }
-
- g_io_channel_shutdown(channel, FALSE, NULL);
- g_io_channel_unref(channel);
-
- return status;
- }}
-#line 575 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 378 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean
-mn_sylpheed_mailbox_backend_read_remote_mark_file (GnomeVFSURI * uri, gsize * size, char ** contents, GError ** err)
-{
-#line 582 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::read_remote_mark_file"
-#line 378 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 378 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (size != NULL, (gboolean )0);
-#line 378 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (contents != NULL, (gboolean )0);
-#line 590 "mn-sylpheed-mailbox-backend.c"
-{
-#line 383 "src/mn-sylpheed-mailbox-backend.gob"
-
- GnomeVFSResult result;
- int _size;
-
- result = mn_vfs_read_entire_file_uri(uri, &_size, contents);
- if (result == GNOME_VFS_OK)
- {
- *size = _size;
- return TRUE;
- }
- else
- {
- g_set_error(err, 0, 0, "%s", gnome_vfs_result_to_string(result));
- return FALSE;
- }
- }}
-#line 609 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 400 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean
-mn_sylpheed_mailbox_backend_read_mark_file (GnomeVFSURI * mailbox_uri, gsize * size, char ** contents, GError ** err)
-{
-#line 616 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::read_mark_file"
-#line 400 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (mailbox_uri != NULL, (gboolean )0);
-#line 400 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (size != NULL, (gboolean )0);
-#line 400 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (contents != NULL, (gboolean )0);
-#line 624 "mn-sylpheed-mailbox-backend.c"
-{
-#line 405 "src/mn-sylpheed-mailbox-backend.gob"
-
- GnomeVFSURI *markfile_uri;
- char *filename;
- gboolean status;
-
- markfile_uri = gnome_vfs_uri_append_file_name(mailbox_uri, SYLPHEED_MARK_FILE);
-
- filename = mn_vfs_get_local_path(markfile_uri);
- if (filename)
- {
- status = self_read_local_mark_file(filename, size, contents, err);
- g_free(filename);
- }
- else
- status = self_read_remote_mark_file(markfile_uri, size, contents, err);
-
- gnome_vfs_uri_unref(markfile_uri);
-
- return status;
- }}
-#line 647 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 426 "src/mn-sylpheed-mailbox-backend.gob"
-static gboolean
-mn_sylpheed_mailbox_backend_byte_stream_read (ByteStream * stream, gpointer buf, int size, GError ** err)
-{
-#line 654 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::byte_stream_read"
-#line 426 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (stream != NULL, (gboolean )0);
-#line 426 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (buf != NULL, (gboolean )0);
-#line 660 "mn-sylpheed-mailbox-backend.c"
-{
-#line 431 "src/mn-sylpheed-mailbox-backend.gob"
-
- if (stream->bytes_left >= size)
- {
- memcpy(buf, stream->position, size);
-
- stream->position += size;
- stream->bytes_left -= size;
-
- return TRUE;
- }
- else
- {
- g_set_error(err, 0, 0, _("unexpected end of file"));
- return FALSE;
- }
- }}
-#line 679 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 448 "src/mn-sylpheed-mailbox-backend.gob"
-GHashTable *
-mn_sylpheed_mailbox_backend_read_marks (GnomeVFSURI * mailbox_uri, GError ** err)
-{
-#line 686 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::read_marks"
-#line 448 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (mailbox_uri != NULL, (GHashTable * )0);
-#line 690 "mn-sylpheed-mailbox-backend.c"
-{
-#line 450 "src/mn-sylpheed-mailbox-backend.gob"
-
- GHashTable *marks = NULL;
- gsize bytes_left;
- char *buf;
-
- if (self_read_mark_file(mailbox_uri, &bytes_left, &buf, err))
- {
- ByteStream stream = { buf, bytes_left };
- guint32 version;
-
- if (self_byte_stream_read(&stream, &version, sizeof(version), err))
- {
- if (version == SYLPHEED_MARK_VERSION)
- {
- guint32 num;
-
- marks = g_hash_table_new(g_direct_hash, g_direct_equal);
-
- while (self_byte_stream_read(&stream, &num, sizeof(num), NULL))
- {
- guint32 flags;
-
- if (! self_byte_stream_read(&stream, &flags, sizeof(flags), err))
- {
- g_hash_table_destroy(marks);
- marks = NULL;
- break;
- }
-
- g_hash_table_insert(marks, GUINT_TO_POINTER(num), GUINT_TO_POINTER(flags));
- }
- }
- else
- g_set_error(err, 0, 0, _("incompatible file version \"%i\""), version);
- }
-
- g_free(buf);
- }
-
- return marks;
- }}
-#line 734 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 492 "src/mn-sylpheed-mailbox-backend.gob"
-static void
-mn_sylpheed_mailbox_backend_write_marks_foreach_cb (gpointer key, gpointer value, gpointer data)
-{
-#line 741 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::write_marks_foreach_cb"
-{
-#line 494 "src/mn-sylpheed-mailbox-backend.gob"
-
- GByteArray *array = data;
- guint32 num;
- guint32 flags;
-
- num = GPOINTER_TO_UINT(key);
- flags = GPOINTER_TO_UINT(value);
-
- g_byte_array_append(array, (const guint8 *) &num, sizeof(num));
- g_byte_array_append(array, (const guint8 *) &flags, sizeof(flags));
- }}
-#line 756 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 507 "src/mn-sylpheed-mailbox-backend.gob"
-gboolean
-mn_sylpheed_mailbox_backend_write_marks (GnomeVFSURI * mailbox_uri, GHashTable * marks, GError ** err)
-{
-#line 763 "mn-sylpheed-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::write_marks"
-#line 507 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (mailbox_uri != NULL, (gboolean )0);
-#line 507 "src/mn-sylpheed-mailbox-backend.gob"
- g_return_val_if_fail (marks != NULL, (gboolean )0);
-#line 769 "mn-sylpheed-mailbox-backend.c"
-{
-#line 511 "src/mn-sylpheed-mailbox-backend.gob"
-
- GByteArray *data;
- guint32 version;
- GnomeVFSURI *markfile_uri;
- gboolean status;
-
- /*
- * We do not need to lock the mark file: races with Sylpheed are
- * avoided since mn_vfs_write_entire_file_uri_safe() writes the
- * file atomically (with a move).
- *
- * However, only one thread at once can write a given mark file,
- * since mn_vfs_write_entire_file_uri_safe() is not thread-safe
- * (it uses fixed temporary file names, foo.tmp and foo.old).
- */
-
- data = g_byte_array_new();
-
- version = SYLPHEED_MARK_VERSION;
- g_byte_array_append(data, (const guint8 *) &version, sizeof(version));
-
- g_hash_table_foreach(marks, self_write_marks_foreach_cb, data);
-
- markfile_uri = gnome_vfs_uri_append_file_name(mailbox_uri, SYLPHEED_MARK_FILE);
- /* Sylpheed uses S_IRUSR | S_IWUSR for data files */
- status = mn_vfs_write_entire_file_uri_safe(markfile_uri, data->len, data->data, S_IRUSR | S_IWUSR, err);
- gnome_vfs_uri_unref(markfile_uri);
-
- g_byte_array_free(data, TRUE);
-
- return status;
- }}
-#line 804 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-sylpheed-mailbox-backend.gob.stamp b/build/src/mn-sylpheed-mailbox-backend.gob.stamp
diff --git a/build/src/mn-sylpheed-mailbox-backend.h b/build/src/mn-sylpheed-mailbox-backend.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-vfs-mailbox-backend.h"
-
-#ifndef __MN_SYLPHEED_MAILBOX_BACKEND_H__
-#define __MN_SYLPHEED_MAILBOX_BACKEND_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_SYLPHEED_MAILBOX_BACKEND (mn_sylpheed_mailbox_backend_get_type())
-#define MN_SYLPHEED_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sylpheed_mailbox_backend_get_type(), MNSylpheedMailboxBackend)
-#define MN_SYLPHEED_MAILBOX_BACKEND_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sylpheed_mailbox_backend_get_type(), MNSylpheedMailboxBackend const)
-#define MN_SYLPHEED_MAILBOX_BACKEND_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_sylpheed_mailbox_backend_get_type(), MNSylpheedMailboxBackendClass)
-#define MN_IS_SYLPHEED_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_sylpheed_mailbox_backend_get_type ())
-
-#define MN_SYLPHEED_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_sylpheed_mailbox_backend_get_type(), MNSylpheedMailboxBackendClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_SYLPHEED_MAILBOX_BACKEND__
-#define __TYPEDEF_MN_SYLPHEED_MAILBOX_BACKEND__
-typedef struct _MNSylpheedMailboxBackend MNSylpheedMailboxBackend;
-#endif
-struct _MNSylpheedMailboxBackend {
- MNVFSMailboxBackend __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNSylpheedMailboxBackendClass MNSylpheedMailboxBackendClass;
-struct _MNSylpheedMailboxBackendClass {
- MNVFSMailboxBackendClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_sylpheed_mailbox_backend_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-sylpheed-message-private.h b/build/src/mn-sylpheed-message-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_SYLPHEED_MESSAGE_PRIVATE_H__
-#define __MN_SYLPHEED_MESSAGE_PRIVATE_H__
-
-#include "mn-sylpheed-message.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-sylpheed-message.c b/build/src/mn-sylpheed-message.c
@@ -1,201 +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-sylpheed-message.h"
-
-#include "mn-sylpheed-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-sylpheed-message.gob"
-
-#include <stdlib.h>
-#include <glib/gi18n.h>
-#include "mn-util.h"
-#include "mn-sylpheed-mailbox-backend-private.h"
-#include "mn-message-private.h"
-
-#line 34 "mn-sylpheed-message.c"
-/* self casting macros */
-#define SELF(x) MN_SYLPHEED_MESSAGE(x)
-#define SELF_CONST(x) MN_SYLPHEED_MESSAGE_CONST(x)
-#define IS_SELF(x) MN_IS_SYLPHEED_MESSAGE(x)
-#define TYPE_SELF MN_TYPE_SYLPHEED_MESSAGE
-#define SELF_CLASS(x) MN_SYLPHEED_MESSAGE_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_SYLPHEED_MESSAGE_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNSylpheedMessage Self;
-typedef MNSylpheedMessageClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-sylpheed-message.gob"
-static void mn_sylpheed_message_init (MNSylpheedMessage * o) G_GNUC_UNUSED;
-#line 51 "mn-sylpheed-message.c"
-#line 0 "src/mn-sylpheed-message.gob"
-static void mn_sylpheed_message_class_init (MNSylpheedMessageClass * c) G_GNUC_UNUSED;
-#line 54 "mn-sylpheed-message.c"
-#line 34 "src/mn-sylpheed-message.gob"
-static void ___1_mn_sylpheed_message_builtin_mark_as_read (MNMessage * message, MNMessageActionRequest * request) G_GNUC_UNUSED;
-#line 57 "mn-sylpheed-message.c"
-#line 40 "src/mn-sylpheed-message.gob"
-static GError * mn_sylpheed_message_builtin_mark_as_read_cb (MNMessage * message, gpointer data) G_GNUC_UNUSED;
-#line 60 "mn-sylpheed-message.c"
-
-/* pointer to the class of our parent */
-static MNVFSMessageClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_builtin_mark_as_read_cb mn_sylpheed_message_builtin_mark_as_read_cb
-GType
-mn_sylpheed_message_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNSylpheedMessageClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_sylpheed_message_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNSylpheedMessage),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_sylpheed_message_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_VFS_MESSAGE, "MNSylpheedMessage", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNSylpheedMessage *)g_object_new(mn_sylpheed_message_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNSylpheedMessage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNSylpheedMessage *
-GET_NEW_VARG (const char *first, ...)
-{
- MNSylpheedMessage *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNSylpheedMessage *)g_object_new_valist (mn_sylpheed_message_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_sylpheed_message_init (MNSylpheedMessage * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Message::init"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_sylpheed_message_class_init (MNSylpheedMessageClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Message::class_init"
- MNMessageClass *mn_message_class = (MNMessageClass *)c;
-
- parent_class = g_type_class_ref (MN_TYPE_VFS_MESSAGE);
-
-#line 34 "src/mn-sylpheed-message.gob"
- mn_message_class->builtin_mark_as_read = ___1_mn_sylpheed_message_builtin_mark_as_read;
-#line 125 "mn-sylpheed-message.c"
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 34 "src/mn-sylpheed-message.gob"
-static void
-___1_mn_sylpheed_message_builtin_mark_as_read (MNMessage * message G_GNUC_UNUSED, MNMessageActionRequest * request)
-#line 134 "mn-sylpheed-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:Sylpheed:Message::builtin_mark_as_read"
-{
-#line 36 "src/mn-sylpheed-message.gob"
-
- mn_message_perform_action_in_thread(request, self_builtin_mark_as_read_cb, NULL);
- }}
-#line 145 "mn-sylpheed-message.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 40 "src/mn-sylpheed-message.gob"
-static GError *
-mn_sylpheed_message_builtin_mark_as_read_cb (MNMessage * message, gpointer data)
-{
-#line 153 "mn-sylpheed-message.c"
-#define __GOB_FUNCTION__ "MN:Sylpheed:Message::builtin_mark_as_read_cb"
-{
-#line 42 "src/mn-sylpheed-message.gob"
-
- MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
- char *filename;
- guint32 num;
- guint32 flags;
- GError *tmp_err = NULL;
- GHashTable *marks;
- GError *err = NULL;
-
- filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
- g_assert(mn_str_isnumeric(filename));
- num = atoi(filename);
- g_free(filename);
-
- /*
- * We hold the mailbox lock to prevent this:
- *
- * thread A: read mark file
- * thread B: read mark file
- * thread A: write new mark file
- * thread B: write new mark file, A's modifications are overwritten
- */
- mn_vfs_mailbox_lock(MN_VFS_MAILBOX(message->mailbox));
-
- marks = mn_sylpheed_mailbox_backend_read_marks(MN_VFS_MAILBOX(message->mailbox)->vfs_uri, &tmp_err);
- if (! marks)
- {
- g_set_error(&err, 0, 0, _("Unable to read %s: %s."), SYLPHEED_MARK_FILE, tmp_err->message);
- g_error_free(tmp_err);
- goto end;
- }
-
- flags = GPOINTER_TO_UINT(g_hash_table_lookup(marks, GUINT_TO_POINTER(num)));
- flags &= ~(SYLPHEED_MSG_NEW | SYLPHEED_MSG_UNREAD);
- g_hash_table_insert(marks, GUINT_TO_POINTER(num), GUINT_TO_POINTER(flags));
-
- mn_sylpheed_mailbox_backend_write_marks(MN_VFS_MAILBOX(message->mailbox)->vfs_uri, marks, &err);
- g_hash_table_destroy(marks);
-
- end:
- mn_vfs_mailbox_unlock(MN_VFS_MAILBOX(message->mailbox));
-
- return err;
- }}
-#line 201 "mn-sylpheed-message.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-sylpheed-message.gob.stamp b/build/src/mn-sylpheed-message.gob.stamp
diff --git a/build/src/mn-sylpheed-message.h b/build/src/mn-sylpheed-message.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-vfs-message.h"
-
-#ifndef __MN_SYLPHEED_MESSAGE_H__
-#define __MN_SYLPHEED_MESSAGE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_SYLPHEED_MESSAGE (mn_sylpheed_message_get_type())
-#define MN_SYLPHEED_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sylpheed_message_get_type(), MNSylpheedMessage)
-#define MN_SYLPHEED_MESSAGE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sylpheed_message_get_type(), MNSylpheedMessage const)
-#define MN_SYLPHEED_MESSAGE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_sylpheed_message_get_type(), MNSylpheedMessageClass)
-#define MN_IS_SYLPHEED_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_sylpheed_message_get_type ())
-
-#define MN_SYLPHEED_MESSAGE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_sylpheed_message_get_type(), MNSylpheedMessageClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_SYLPHEED_MESSAGE__
-#define __TYPEDEF_MN_SYLPHEED_MESSAGE__
-typedef struct _MNSylpheedMessage MNSylpheedMessage;
-#endif
-struct _MNSylpheedMessage {
- MNVFSMessage __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNSylpheedMessageClass MNSylpheedMessageClass;
-struct _MNSylpheedMessageClass {
- MNVFSMessageClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_sylpheed_message_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-system-vfs-mailbox-private.h b/build/src/mn-system-vfs-mailbox-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_SYSTEM_VFS_MAILBOX_PRIVATE_H__
-#define __MN_SYSTEM_VFS_MAILBOX_PRIVATE_H__
-
-#include "mn-system-vfs-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-system-vfs-mailbox-properties-private.h b/build/src/mn-system-vfs-mailbox-properties-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_SYSTEM_VFS_MAILBOX_PROPERTIES_PRIVATE_H__
-#define __MN_SYSTEM_VFS_MAILBOX_PROPERTIES_PRIVATE_H__
-
-#include "mn-system-vfs-mailbox-properties.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-system-vfs-mailbox-properties.c b/build/src/mn-system-vfs-mailbox-properties.c
@@ -1,225 +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-system-vfs-mailbox-properties.h"
-
-#include "mn-system-vfs-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 24 "src/mn-system-vfs-mailbox-properties.gob"
-
-#include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include "mn-mailbox-properties-private.h"
-#include "mn-system-vfs-mailbox.h"
-#include "mn-stock.h"
-
-#line 34 "mn-system-vfs-mailbox-properties.c"
-/* self casting macros */
-#define SELF(x) MN_SYSTEM_VFS_MAILBOX_PROPERTIES(x)
-#define SELF_CONST(x) MN_SYSTEM_VFS_MAILBOX_PROPERTIES_CONST(x)
-#define IS_SELF(x) MN_IS_SYSTEM_VFS_MAILBOX_PROPERTIES(x)
-#define TYPE_SELF MN_TYPE_SYSTEM_VFS_MAILBOX_PROPERTIES
-#define SELF_CLASS(x) MN_SYSTEM_VFS_MAILBOX_PROPERTIES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_SYSTEM_VFS_MAILBOX_PROPERTIES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNSystemVFSMailboxProperties Self;
-typedef MNSystemVFSMailboxPropertiesClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-#line 40 "src/mn-system-vfs-mailbox-properties.gob"
-static void mn_system_vfs_mailbox_properties_class_init (MNSystemVFSMailboxPropertiesClass * class) G_GNUC_UNUSED;
-#line 52 "mn-system-vfs-mailbox-properties.c"
-#line 49 "src/mn-system-vfs-mailbox-properties.gob"
-static void mn_system_vfs_mailbox_properties_init (MNSystemVFSMailboxProperties * self) G_GNUC_UNUSED;
-#line 55 "mn-system-vfs-mailbox-properties.c"
-
-enum {
- PROP_0,
- PROP_COMPLETE,
- PROP_DEFAULT_NAME
-};
-
-/* pointer to the class of our parent */
-static MNMailboxPropertiesClass *parent_class = NULL;
-
-GType
-mn_system_vfs_mailbox_properties_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNSystemVFSMailboxPropertiesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_system_vfs_mailbox_properties_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNSystemVFSMailboxProperties),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_system_vfs_mailbox_properties_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_MAILBOX_PROPERTIES, "MNSystemVFSMailboxProperties", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNSystemVFSMailboxProperties *)g_object_new(mn_system_vfs_mailbox_properties_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNSystemVFSMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNSystemVFSMailboxProperties *
-GET_NEW_VARG (const char *first, ...)
-{
- MNSystemVFSMailboxProperties *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNSystemVFSMailboxProperties *)g_object_new_valist (mn_system_vfs_mailbox_properties_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-#line 40 "src/mn-system-vfs-mailbox-properties.gob"
-static void
-mn_system_vfs_mailbox_properties_class_init (MNSystemVFSMailboxPropertiesClass * class G_GNUC_UNUSED)
-{
-#line 112 "mn-system-vfs-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox:Properties::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
-
- parent_class = g_type_class_ref (MN_TYPE_MAILBOX_PROPERTIES);
-
- 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 41 "src/mn-system-vfs-mailbox-properties.gob"
-
- MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
-
- p_class->type = "system-vfs";
- p_class->stock_id = MN_STOCK_SYSTEM_MAILBOX;
- p_class->combo_label = _("System mailbox");
-
-#line 136 "mn-system-vfs-mailbox-properties.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 49 "src/mn-system-vfs-mailbox-properties.gob"
-static void
-mn_system_vfs_mailbox_properties_init (MNSystemVFSMailboxProperties * self G_GNUC_UNUSED)
-{
-#line 144 "mn-system-vfs-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox:Properties::init"
- {
-#line 50 "src/mn-system-vfs-mailbox-properties.gob"
-
- MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
- GtkWidget *location_vbox;
- GtkWidget *label;
- const char *system_uri;
-
- /* translators: header capitalization */
- location_vbox = mn_mailbox_properties_add_general_section(properties, _("Location"));
-
- label = gtk_label_new(NULL);
-
- 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);
-
- system_uri = mn_system_vfs_mailbox_get_uri();
- if (system_uri)
- {
- char *path;
- char *markup;
-
- path = gnome_vfs_get_local_path_from_uri(system_uri);
-
- markup = g_markup_printf_escaped(_("Your system mailbox is <span weight=\"bold\">%s</span>."), path ? path : system_uri);
- gtk_label_set_markup(GTK_LABEL(label), markup);
- g_free(markup);
-
- g_free(path);
- }
- else
- gtk_label_set_text(GTK_LABEL(label), _("The location of your system mailbox could not be detected. Check the MAIL environment variable."));
-
- gtk_widget_show(label);
- gtk_box_pack_start(GTK_BOX(location_vbox), label, FALSE, FALSE, 0);
-
-#line 183 "mn-system-vfs-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:System:VFS:Mailbox:Properties::get_property"
-{
- MNSystemVFSMailboxProperties *self G_GNUC_UNUSED;
-
- self = MN_SYSTEM_VFS_MAILBOX_PROPERTIES (object);
-
- switch (property_id) {
- case PROP_COMPLETE:
- {
-#line 35 "src/mn-system-vfs-mailbox-properties.gob"
- g_value_set_boolean(VAL, mn_system_vfs_mailbox_get_uri() != NULL);
-#line 204 "mn-system-vfs-mailbox-properties.c"
- }
- break;
- case PROP_DEFAULT_NAME:
- {
-#line 38 "src/mn-system-vfs-mailbox-properties.gob"
- g_value_set_string(VAL, _("System mailbox"));
-#line 211 "mn-system-vfs-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__
-
-
diff --git a/build/src/mn-system-vfs-mailbox-properties.gob.stamp b/build/src/mn-system-vfs-mailbox-properties.gob.stamp
diff --git a/build/src/mn-system-vfs-mailbox-properties.h b/build/src/mn-system-vfs-mailbox-properties.h
@@ -1,69 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-mailbox-properties.h"
-
-#ifndef __MN_SYSTEM_VFS_MAILBOX_PROPERTIES_H__
-#define __MN_SYSTEM_VFS_MAILBOX_PROPERTIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_SYSTEM_VFS_MAILBOX_PROPERTIES (mn_system_vfs_mailbox_properties_get_type())
-#define MN_SYSTEM_VFS_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_system_vfs_mailbox_properties_get_type(), MNSystemVFSMailboxProperties)
-#define MN_SYSTEM_VFS_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_system_vfs_mailbox_properties_get_type(), MNSystemVFSMailboxProperties const)
-#define MN_SYSTEM_VFS_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_system_vfs_mailbox_properties_get_type(), MNSystemVFSMailboxPropertiesClass)
-#define MN_IS_SYSTEM_VFS_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_system_vfs_mailbox_properties_get_type ())
-
-#define MN_SYSTEM_VFS_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_system_vfs_mailbox_properties_get_type(), MNSystemVFSMailboxPropertiesClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_SYSTEM_VFS_MAILBOX_PROPERTIES__
-#define __TYPEDEF_MN_SYSTEM_VFS_MAILBOX_PROPERTIES__
-typedef struct _MNSystemVFSMailboxProperties MNSystemVFSMailboxProperties;
-#endif
-struct _MNSystemVFSMailboxProperties {
- MNMailboxProperties __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNSystemVFSMailboxPropertiesClass MNSystemVFSMailboxPropertiesClass;
-struct _MNSystemVFSMailboxPropertiesClass {
- MNMailboxPropertiesClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_system_vfs_mailbox_properties_get_type (void) G_GNUC_CONST;
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_SYSTEM_VFS_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
-#define MN_SYSTEM_VFS_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_SYSTEM_VFS_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
-#define MN_SYSTEM_VFS_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-system-vfs-mailbox.c b/build/src/mn-system-vfs-mailbox.c
@@ -1,267 +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-system-vfs-mailbox.h"
-
-#include "mn-system-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-system-vfs-mailbox.gob"
-
-#include <glib/gi18n.h>
-#include "mn-stock.h"
-#include "mn-mailbox-private.h"
-
-#line 32 "mn-system-vfs-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_SYSTEM_VFS_MAILBOX(x)
-#define SELF_CONST(x) MN_SYSTEM_VFS_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_SYSTEM_VFS_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_SYSTEM_VFS_MAILBOX
-#define SELF_CLASS(x) MN_SYSTEM_VFS_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_SYSTEM_VFS_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNSystemVFSMailbox Self;
-typedef MNSystemVFSMailboxClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-system-vfs-mailbox.gob"
-static void mn_system_vfs_mailbox_init (MNSystemVFSMailbox * o) G_GNUC_UNUSED;
-#line 49 "mn-system-vfs-mailbox.c"
-#line 32 "src/mn-system-vfs-mailbox.gob"
-static void mn_system_vfs_mailbox_class_init (MNSystemVFSMailboxClass * class) G_GNUC_UNUSED;
-#line 52 "mn-system-vfs-mailbox.c"
-#line 37 "src/mn-system-vfs-mailbox.gob"
-static void ___2_mn_system_vfs_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 55 "mn-system-vfs-mailbox.c"
-#line 49 "src/mn-system-vfs-mailbox.gob"
-static MNMailbox * ___3_mn_system_vfs_mailbox_parse_uri (MNMailbox * dummy, const char * uri) G_GNUC_UNUSED;
-#line 58 "mn-system-vfs-mailbox.c"
-#line 62 "src/mn-system-vfs-mailbox.gob"
-static void ___4_mn_system_vfs_mailbox_check (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 61 "mn-system-vfs-mailbox.c"
-
-/* pointer to the class of our parent */
-static MNVFSMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_get_uri mn_system_vfs_mailbox_get_uri
-GType
-mn_system_vfs_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNSystemVFSMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_system_vfs_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNSystemVFSMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_system_vfs_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_VFS_MAILBOX, "MNSystemVFSMailbox", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNSystemVFSMailbox *)g_object_new(mn_system_vfs_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNSystemVFSMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNSystemVFSMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNSystemVFSMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNSystemVFSMailbox *)g_object_new_valist (mn_system_vfs_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_system_vfs_mailbox_init (MNSystemVFSMailbox * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox::init"
-}
-#undef __GOB_FUNCTION__
-#line 32 "src/mn-system-vfs-mailbox.gob"
-static void
-mn_system_vfs_mailbox_class_init (MNSystemVFSMailboxClass * class G_GNUC_UNUSED)
-{
-#line 120 "mn-system-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox::class_init"
- MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX);
-
-#line 37 "src/mn-system-vfs-mailbox.gob"
- mn_mailbox_class->seal = ___2_mn_system_vfs_mailbox_seal;
-#line 49 "src/mn-system-vfs-mailbox.gob"
- mn_mailbox_class->parse_uri = ___3_mn_system_vfs_mailbox_parse_uri;
-#line 62 "src/mn-system-vfs-mailbox.gob"
- mn_mailbox_class->check = ___4_mn_system_vfs_mailbox_check;
-#line 132 "mn-system-vfs-mailbox.c"
- {
-#line 33 "src/mn-system-vfs-mailbox.gob"
-
- MN_MAILBOX_CLASS(class)->type = "system-vfs";
-
-#line 138 "mn-system-vfs-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 37 "src/mn-system-vfs-mailbox.gob"
-static void
-___2_mn_system_vfs_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 148 "mn-system-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:System:VFS:Mailbox::seal"
-{
-#line 39 "src/mn-system-vfs-mailbox.gob"
-
- mn_mailbox_set_stock_id(mailbox, MN_STOCK_SYSTEM_MAILBOX);
-
- MN_VFS_MAILBOX(mailbox)->uri = g_strdup(self_get_uri());
-
- mailbox->runtime_name = g_strdup(_("System mailbox"));
-
- PARENT_HANDLER(mailbox);
- }}
-#line 165 "mn-system-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 49 "src/mn-system-vfs-mailbox.gob"
-static MNMailbox *
-___3_mn_system_vfs_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * uri)
-#line 172 "mn-system-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:System:VFS:Mailbox::parse_uri"
-{
-#line 51 "src/mn-system-vfs-mailbox.gob"
-
- const char *system_uri;
- MNMailbox *mailbox = NULL;
-
- system_uri = self_get_uri();
- if (system_uri && gnome_vfs_uris_match(uri, system_uri))
- mailbox = mn_mailbox_new("system-vfs", NULL);
-
- return mailbox;
- }}
-#line 191 "mn-system-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 62 "src/mn-system-vfs-mailbox.gob"
-static void
-___4_mn_system_vfs_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 198 "mn-system-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:System:VFS:Mailbox::check"
-{
-#line 64 "src/mn-system-vfs-mailbox.gob"
-
- if (MN_VFS_MAILBOX(mailbox)->uri)
- {
- PARENT_HANDLER(mailbox);
- }
- else
- {
- mn_mailbox_set_error(mailbox, _("system mailbox not found"));
- mn_mailbox_set_poll(mailbox, FALSE); /* disable the mailbox */
- }
- }}
-#line 217 "mn-system-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 76 "src/mn-system-vfs-mailbox.gob"
-const char *
-mn_system_vfs_mailbox_get_uri (void)
-{
-#line 225 "mn-system-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox::get_uri"
-{
-#line 78 "src/mn-system-vfs-mailbox.gob"
-
- static char *global_uri = NULL;
- G_LOCK_DEFINE_STATIC(global_uri);
- const char *uri;
-
- G_LOCK(global_uri);
- if (! global_uri)
- {
- const char *mail = g_getenv("MAIL");
-
- if (mail && g_path_is_absolute(mail) && g_file_test(mail, G_FILE_TEST_EXISTS))
- global_uri = gnome_vfs_get_uri_from_local_path(mail);
-
- if (! global_uri) /* no MAIL or invalid contents */
- {
- const char *username = g_get_user_name();
- static const char *spool_paths[] = { "/var/spool/mail", "/var/mail" };
- int i;
-
- for (i = 0; i < G_N_ELEMENTS(spool_paths); i++)
- {
- char *path;
-
- path = g_build_filename(spool_paths[i], username, NULL);
- if (g_file_test(path, G_FILE_TEST_EXISTS))
- global_uri = gnome_vfs_get_uri_from_local_path(path);
- g_free(path);
-
- if (global_uri)
- break;
- }
- }
- }
- uri = global_uri;
- G_UNLOCK(global_uri);
-
- return uri;
- }}
-#line 267 "mn-system-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-system-vfs-mailbox.gob.stamp b/build/src/mn-system-vfs-mailbox.gob.stamp
diff --git a/build/src/mn-system-vfs-mailbox.h b/build/src/mn-system-vfs-mailbox.h
@@ -1,60 +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_SYSTEM_VFS_MAILBOX_H__
-#define __MN_SYSTEM_VFS_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_SYSTEM_VFS_MAILBOX (mn_system_vfs_mailbox_get_type())
-#define MN_SYSTEM_VFS_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_system_vfs_mailbox_get_type(), MNSystemVFSMailbox)
-#define MN_SYSTEM_VFS_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_system_vfs_mailbox_get_type(), MNSystemVFSMailbox const)
-#define MN_SYSTEM_VFS_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_system_vfs_mailbox_get_type(), MNSystemVFSMailboxClass)
-#define MN_IS_SYSTEM_VFS_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_system_vfs_mailbox_get_type ())
-
-#define MN_SYSTEM_VFS_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_system_vfs_mailbox_get_type(), MNSystemVFSMailboxClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_SYSTEM_VFS_MAILBOX__
-#define __TYPEDEF_MN_SYSTEM_VFS_MAILBOX__
-typedef struct _MNSystemVFSMailbox MNSystemVFSMailbox;
-#endif
-struct _MNSystemVFSMailbox {
- MNVFSMailbox __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNSystemVFSMailboxClass MNSystemVFSMailboxClass;
-struct _MNSystemVFSMailboxClass {
- MNVFSMailboxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_system_vfs_mailbox_get_type (void) G_GNUC_CONST;
-#line 76 "src/mn-system-vfs-mailbox.gob"
-const char * mn_system_vfs_mailbox_get_uri (void);
-#line 55 "mn-system-vfs-mailbox.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-test-mailbox-private.h b/build/src/mn-test-mailbox-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_TEST_MAILBOX_PRIVATE_H__
-#define __MN_TEST_MAILBOX_PRIVATE_H__
-
-#include "mn-test-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-test-mailbox.c b/build/src/mn-test-mailbox.c
@@ -1,197 +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-test-mailbox.h"
-
-#include "mn-test-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-test-mailbox.gob"
-
-#include <glib/gi18n.h>
-#include "mn-mailbox-private.h"
-#include "mn-message.h"
-#include "mn-util.h"
-
-#line 33 "mn-test-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_TEST_MAILBOX(x)
-#define SELF_CONST(x) MN_TEST_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_TEST_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_TEST_MAILBOX
-#define SELF_CLASS(x) MN_TEST_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_TEST_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNTestMailbox Self;
-typedef MNTestMailboxClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-test-mailbox.gob"
-static void mn_test_mailbox_class_init (MNTestMailboxClass * c) G_GNUC_UNUSED;
-#line 50 "mn-test-mailbox.c"
-#line 33 "src/mn-test-mailbox.gob"
-static void mn_test_mailbox_init (MNTestMailbox * self) G_GNUC_UNUSED;
-#line 53 "mn-test-mailbox.c"
-#line 41 "src/mn-test-mailbox.gob"
-static void ___2_mn_test_mailbox_check (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 56 "mn-test-mailbox.c"
-
-/* pointer to the class of our parent */
-static MNMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_new mn_test_mailbox_new
-GType
-mn_test_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNTestMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_test_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNTestMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_test_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_MAILBOX, "MNTestMailbox", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNTestMailbox *)g_object_new(mn_test_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNTestMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNTestMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNTestMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNTestMailbox *)g_object_new_valist (mn_test_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_test_mailbox_class_init (MNTestMailboxClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Test:Mailbox::class_init"
- MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)c;
-
- parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-
-#line 41 "src/mn-test-mailbox.gob"
- mn_mailbox_class->check = ___2_mn_test_mailbox_check;
-#line 115 "mn-test-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-#line 33 "src/mn-test-mailbox.gob"
-static void
-mn_test_mailbox_init (MNTestMailbox * self G_GNUC_UNUSED)
-{
-#line 122 "mn-test-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Test:Mailbox::init"
- {
-#line 34 "src/mn-test-mailbox.gob"
-
- MNMailbox *mailbox = MN_MAILBOX(self);
-
- mn_mailbox_set_poll(mailbox, FALSE);
- mailbox->runtime_name = g_strdup(_("Test mailbox"));
-
-#line 132 "mn-test-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 41 "src/mn-test-mailbox.gob"
-static void
-___2_mn_test_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 142 "mn-test-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->check) \
- (* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:Test:Mailbox::check"
-{
-#line 43 "src/mn-test-mailbox.gob"
-
- GSList *messages = NULL;
- time_t now;
- int i;
-
- PARENT_HANDLER(mailbox);
-
- now = mn_time();
-
- for (i = 1; i < 4; i++)
- {
- MNMessage *message;
- char *subject;
-
- subject = g_strdup_printf(_("Test message #%i"), i);
- message = mn_message_new(mailbox,
- now,
- NULL,
- NULL,
- /* translators: header capitalization */
- _("Mail Notification Properties Dialog"),
- subject,
- NULL,
- MN_MESSAGE_NEW);
- g_free(subject);
-
- messages = g_slist_append(messages, message);
- }
-
- mn_mailbox_set_messages(mailbox, messages);
- mn_g_object_slist_free(messages);
- }}
-#line 182 "mn-test-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 76 "src/mn-test-mailbox.gob"
-MNMailbox *
-mn_test_mailbox_new (void)
-{
-#line 190 "mn-test-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Test:Mailbox::new"
-{
-#line 78 "src/mn-test-mailbox.gob"
-
- return MN_MAILBOX(GET_NEW);
- }}
-#line 197 "mn-test-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-test-mailbox.gob.stamp b/build/src/mn-test-mailbox.gob.stamp
diff --git a/build/src/mn-test-mailbox.h b/build/src/mn-test-mailbox.h
@@ -1,60 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-mailbox.h"
-
-#ifndef __MN_TEST_MAILBOX_H__
-#define __MN_TEST_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_TEST_MAILBOX (mn_test_mailbox_get_type())
-#define MN_TEST_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_test_mailbox_get_type(), MNTestMailbox)
-#define MN_TEST_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_test_mailbox_get_type(), MNTestMailbox const)
-#define MN_TEST_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_test_mailbox_get_type(), MNTestMailboxClass)
-#define MN_IS_TEST_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_test_mailbox_get_type ())
-
-#define MN_TEST_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_test_mailbox_get_type(), MNTestMailboxClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_TEST_MAILBOX__
-#define __TYPEDEF_MN_TEST_MAILBOX__
-typedef struct _MNTestMailbox MNTestMailbox;
-#endif
-struct _MNTestMailbox {
- MNMailbox __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNTestMailboxClass MNTestMailboxClass;
-struct _MNTestMailboxClass {
- MNMailboxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_test_mailbox_get_type (void) G_GNUC_CONST;
-#line 76 "src/mn-test-mailbox.gob"
-MNMailbox * mn_test_mailbox_new (void);
-#line 55 "mn-test-mailbox.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-text-table-private.h b/build/src/mn-text-table-private.h
@@ -1,42 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_TEXT_TABLE_PRIVATE_H__
-#define __MN_TEXT_TABLE_PRIVATE_H__
-
-#include "mn-text-table.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 28 "src/mn-text-table.gob"
-
-typedef struct
-{
- GPtrArray *cells;
- int height;
-} Row;
-
-#line 22 "mn-text-table-private.h"
-struct _MNTextTablePrivate {
-#line 67 "src/mn-text-table.gob"
- GPtrArray * rows;
-#line 70 "src/mn-text-table.gob"
- GArray * column_sizes;
-#line 73 "src/mn-text-table.gob"
- Row * row;
-#line 75 "src/mn-text-table.gob"
- gboolean dirty;
-#line 76 "src/mn-text-table.gob"
- int width;
-#line 77 "src/mn-text-table.gob"
- int height;
-#line 36 "mn-text-table-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-text-table.c b/build/src/mn-text-table.c
@@ -1,706 +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-text-table.h"
-
-#include "mn-text-table-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 36 "src/mn-text-table.gob"
-
-#include "mn-util.h"
-
-#define HORIZONTAL_SPACING 12
-#define VERTICAL_SPACING 0
-
-#define COLUMN_SIZE(self, column) \
- g_array_index((self)->_priv->column_sizes, int, (column))
-
-struct _MNTextTableCell
-{
- PangoLayout *layout; /* NULL for a blank cell */
- gboolean dirty;
- int width;
- int height;
-};
-
-#line 44 "mn-text-table.c"
-/* self casting macros */
-#define SELF(x) MN_TEXT_TABLE(x)
-#define SELF_CONST(x) MN_TEXT_TABLE_CONST(x)
-#define IS_SELF(x) MN_IS_TEXT_TABLE(x)
-#define TYPE_SELF MN_TYPE_TEXT_TABLE
-#define SELF_CLASS(x) MN_TEXT_TABLE_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_TEXT_TABLE_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNTextTable Self;
-typedef MNTextTableClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-text-table.gob"
-static void mn_text_table_class_init (MNTextTableClass * c) G_GNUC_UNUSED;
-#line 61 "mn-text-table.c"
-#line 79 "src/mn-text-table.gob"
-static void mn_text_table_init (MNTextTable * self) G_GNUC_UNUSED;
-#line 64 "mn-text-table.c"
-#line 89 "src/mn-text-table.gob"
-static void mn_text_table_row_free (Row * row) G_GNUC_UNUSED;
-#line 67 "mn-text-table.c"
-#line 96 "src/mn-text-table.gob"
-static void mn_text_table_cell_free (MNTextTableCell * cell) G_GNUC_UNUSED;
-#line 70 "mn-text-table.c"
-#line 104 "src/mn-text-table.gob"
-static void ___4_mn_text_table_size_request (GtkWidget * widget, GtkRequisition * requisition) G_GNUC_UNUSED;
-#line 73 "mn-text-table.c"
-#line 115 "src/mn-text-table.gob"
-static gboolean ___5_mn_text_table_expose_event (GtkWidget * widget, GdkEventExpose * event) G_GNUC_UNUSED;
-#line 76 "mn-text-table.c"
-#line 165 "src/mn-text-table.gob"
-static void mn_text_table_set_dirty (MNTextTable * self) G_GNUC_UNUSED;
-#line 79 "mn-text-table.c"
-#line 175 "src/mn-text-table.gob"
-static void mn_text_table_context_changed (MNTextTable * self) G_GNUC_UNUSED;
-#line 82 "mn-text-table.c"
-#line 200 "src/mn-text-table.gob"
-static void mn_text_table_relayout (MNTextTable * self) G_GNUC_UNUSED;
-#line 85 "mn-text-table.c"
-static void ___real_mn_text_table_clear (MNTextTable * self);
-#line 317 "src/mn-text-table.gob"
-static void mn_text_table_append_cell_real (MNTextTable * self, MNTextTableCell * cell) G_GNUC_UNUSED;
-#line 89 "mn-text-table.c"
-
-/* pointer to the class of our parent */
-static GtkWidgetClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_row_free mn_text_table_row_free
-#define self_cell_free mn_text_table_cell_free
-#define self_set_dirty mn_text_table_set_dirty
-#define self_context_changed mn_text_table_context_changed
-#define self_relayout mn_text_table_relayout
-#define self_clear mn_text_table_clear
-#define self_append_text_cell mn_text_table_append_text_cell
-#define self_append_text_cell_from_markup mn_text_table_append_text_cell_from_markup
-#define self_append_text_cell_from_layout mn_text_table_append_text_cell_from_layout
-#define self_append_blank_cell mn_text_table_append_blank_cell
-#define self_append_cell_real mn_text_table_append_cell_real
-#define self_cell_set_text mn_text_table_cell_set_text
-#define self_line_break mn_text_table_line_break
-GType
-mn_text_table_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNTextTableClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_text_table_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNTextTable),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_text_table_init,
- NULL
- };
-
- type = g_type_register_static (GTK_TYPE_WIDGET, "MNTextTable", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNTextTable *)g_object_new(mn_text_table_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNTextTable * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNTextTable *
-GET_NEW_VARG (const char *first, ...)
-{
- MNTextTable *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNTextTable *)g_object_new_valist (mn_text_table_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Text:Table::finalize"
- MNTextTable *self G_GNUC_UNUSED = MN_TEXT_TABLE (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#define rows (self->_priv->rows)
-#define VAR rows
- {
-#line 68 "src/mn-text-table.gob"
- mn_g_ptr_array_free_deep_custom(VAR, (GFunc) self_row_free, NULL); }
-#line 164 "mn-text-table.c"
- memset(&rows, 0, sizeof(rows));
-#undef VAR
-#undef rows
-#define column_sizes (self->_priv->column_sizes)
-#define VAR column_sizes
- {
-#line 71 "src/mn-text-table.gob"
- g_array_free(VAR, TRUE); }
-#line 173 "mn-text-table.c"
- memset(&column_sizes, 0, sizeof(column_sizes));
-#undef VAR
-#undef column_sizes
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_text_table_class_init (MNTextTableClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Text:Table::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- GtkWidgetClass *gtk_widget_class = (GtkWidgetClass *)c;
-
- g_type_class_add_private(c,sizeof(MNTextTablePrivate));
-
- parent_class = g_type_class_ref (GTK_TYPE_WIDGET);
-
-#line 104 "src/mn-text-table.gob"
- gtk_widget_class->size_request = ___4_mn_text_table_size_request;
-#line 115 "src/mn-text-table.gob"
- gtk_widget_class->expose_event = ___5_mn_text_table_expose_event;
-#line 257 "src/mn-text-table.gob"
- c->clear = ___real_mn_text_table_clear;
-#line 197 "mn-text-table.c"
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-#line 79 "src/mn-text-table.gob"
-static void
-mn_text_table_init (MNTextTable * self G_GNUC_UNUSED)
-{
-#line 205 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_TEXT_TABLE,MNTextTablePrivate);
-#line 67 "src/mn-text-table.gob"
- self->_priv->rows = g_ptr_array_new();
-#line 210 "mn-text-table.c"
-#line 70 "src/mn-text-table.gob"
- self->_priv->column_sizes = g_array_new(FALSE, TRUE, sizeof(int));
-#line 213 "mn-text-table.c"
-#line 71 "src/mn-text-table.gob"
- self->_priv->dirty = TRUE;
-#line 216 "mn-text-table.c"
- {
-#line 80 "src/mn-text-table.gob"
-
- GTK_WIDGET_SET_FLAGS(self, GTK_NO_WINDOW);
-
- g_object_connect(self,
- "swapped-signal::style-set", self_context_changed, self,
- "swapped-signal::direction-changed", self_context_changed, self,
- NULL);
-
-#line 227 "mn-text-table.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 89 "src/mn-text-table.gob"
-static void
-mn_text_table_row_free (Row * row)
-{
-#line 238 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::row_free"
-#line 89 "src/mn-text-table.gob"
- g_return_if_fail (row != NULL);
-#line 242 "mn-text-table.c"
-{
-#line 91 "src/mn-text-table.gob"
-
- mn_g_ptr_array_free_deep_custom(row->cells, (GFunc) self_cell_free, NULL);
- g_free(row);
- }}
-#line 249 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 96 "src/mn-text-table.gob"
-static void
-mn_text_table_cell_free (MNTextTableCell * cell)
-{
-#line 256 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::cell_free"
-#line 96 "src/mn-text-table.gob"
- g_return_if_fail (cell != NULL);
-#line 260 "mn-text-table.c"
-{
-#line 98 "src/mn-text-table.gob"
-
- if (cell->layout)
- g_object_unref(cell->layout);
- g_free(cell);
- }}
-#line 268 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 104 "src/mn-text-table.gob"
-static void
-___4_mn_text_table_size_request (GtkWidget * widget G_GNUC_UNUSED, GtkRequisition * requisition)
-#line 274 "mn-text-table.c"
-#define PARENT_HANDLER(___widget,___requisition) \
- { if(GTK_WIDGET_CLASS(parent_class)->size_request) \
- (* GTK_WIDGET_CLASS(parent_class)->size_request)(___widget,___requisition); }
-{
-#define __GOB_FUNCTION__ "MN:Text:Table::size_request"
-{
-#line 106 "src/mn-text-table.gob"
-
- Self *self = SELF(widget);
-
- self_relayout(self);
-
- requisition->width = selfp->width;
- requisition->height = selfp->height;
- }}
-#line 290 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 115 "src/mn-text-table.gob"
-static gboolean
-___5_mn_text_table_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
-#line 297 "mn-text-table.c"
-#define PARENT_HANDLER(___widget,___event) \
- ((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
- (* GTK_WIDGET_CLASS(parent_class)->expose_event)(___widget,___event): \
- ((gboolean )0))
-{
-#define __GOB_FUNCTION__ "MN:Text:Table::expose_event"
-{
-#line 117 "src/mn-text-table.gob"
-
- Self *self = SELF(widget);
- int i;
- int y = widget->allocation.y;
-
- if (! GTK_WIDGET_DRAWABLE(widget))
- return FALSE;
-
- self_relayout(self);
-
- MN_ARRAY_FOREACH(i, selfp->rows)
- {
- Row *row = g_ptr_array_index(selfp->rows, i);
- int j;
- int x = widget->allocation.x;
- int column = 0;
-
- MN_ARRAY_FOREACH(j, row->cells)
- {
- MNTextTableCell *cell = g_ptr_array_index(row->cells, j);
-
- if (cell->layout)
- gtk_paint_layout(widget->style,
- widget->window,
- GTK_WIDGET_STATE(widget),
- FALSE,
- &event->area,
- widget,
- NULL,
- x,
- y + row->height - cell->height,
- cell->layout);
-
- x += COLUMN_SIZE(self, column);
- if (j < row->cells->len - 1)
- x += HORIZONTAL_SPACING;
-
- column++;
- }
-
- y += row->height;
- if (i < selfp->rows->len - 1)
- y += VERTICAL_SPACING;
- }
-
- return FALSE;
- }}
-#line 353 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 165 "src/mn-text-table.gob"
-static void
-mn_text_table_set_dirty (MNTextTable * self)
-{
-#line 361 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::set_dirty"
-#line 165 "src/mn-text-table.gob"
- g_return_if_fail (self != NULL);
-#line 165 "src/mn-text-table.gob"
- g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 367 "mn-text-table.c"
-{
-#line 167 "src/mn-text-table.gob"
-
- if (! selfp->dirty)
- {
- selfp->dirty = TRUE;
- gtk_widget_queue_resize(GTK_WIDGET(self));
- }
- }}
-#line 377 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 175 "src/mn-text-table.gob"
-static void
-mn_text_table_context_changed (MNTextTable * self)
-{
-#line 384 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::context_changed"
-#line 175 "src/mn-text-table.gob"
- g_return_if_fail (self != NULL);
-#line 175 "src/mn-text-table.gob"
- g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 390 "mn-text-table.c"
-{
-#line 177 "src/mn-text-table.gob"
-
- int i;
-
- MN_ARRAY_FOREACH(i, selfp->rows)
- {
- Row *row = g_ptr_array_index(selfp->rows, i);
- int j;
-
- MN_ARRAY_FOREACH(j, row->cells)
- {
- MNTextTableCell *cell = g_ptr_array_index(row->cells, j);
-
- if (cell->layout)
- {
- pango_layout_context_changed(cell->layout);
- cell->dirty = TRUE;
- }
- }
- }
-
- self_set_dirty(self);
- }}
-#line 415 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 200 "src/mn-text-table.gob"
-static void
-mn_text_table_relayout (MNTextTable * self)
-{
-#line 422 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::relayout"
-#line 200 "src/mn-text-table.gob"
- g_return_if_fail (self != NULL);
-#line 200 "src/mn-text-table.gob"
- g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 428 "mn-text-table.c"
-{
-#line 202 "src/mn-text-table.gob"
-
- int i;
-
- if (! selfp->dirty)
- return;
-
- selfp->width = 0;
- selfp->height = 0;
-
- MN_ARRAY_FOREACH(i, selfp->column_sizes)
- COLUMN_SIZE(self, i) = 0;
-
- MN_ARRAY_FOREACH(i, selfp->rows)
- {
- Row *row = g_ptr_array_index(selfp->rows, i);
- int j;
-
- row->height = 0;
-
- MN_ARRAY_FOREACH(j, row->cells)
- {
- MNTextTableCell *cell = g_ptr_array_index(row->cells, j);
- int n_columns = j + 1;
-
- if (cell->dirty)
- {
- g_assert(cell->layout != NULL);
-
- pango_layout_get_pixel_size(cell->layout, &cell->width, &cell->height);
- cell->dirty = FALSE;
- }
-
- if (n_columns > selfp->column_sizes->len)
- g_array_set_size(selfp->column_sizes, n_columns);
-
- if (cell->width > COLUMN_SIZE(self, j))
- COLUMN_SIZE(self, j) = cell->width;
- if (cell->height > row->height)
- row->height = cell->height;
- }
-
- selfp->height += row->height;
- }
-
- MN_ARRAY_FOREACH(i, selfp->column_sizes)
- selfp->width += COLUMN_SIZE(self, i);
-
- if (selfp->column_sizes->len > 1)
- selfp->width += HORIZONTAL_SPACING * (selfp->column_sizes->len - 1);
- if (selfp->rows->len > 1)
- selfp->height += VERTICAL_SPACING * (selfp->rows->len - 1);
-
- selfp->dirty = FALSE;
- }}
-#line 485 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 257 "src/mn-text-table.gob"
-void
-mn_text_table_clear (MNTextTable * self)
-{
-#line 492 "mn-text-table.c"
- MNTextTableClass *klass;
-#line 257 "src/mn-text-table.gob"
- g_return_if_fail (self != NULL);
-#line 257 "src/mn-text-table.gob"
- g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 498 "mn-text-table.c"
- klass = MN_TEXT_TABLE_GET_CLASS(self);
-
- if(klass->clear)
- (*klass->clear)(self);
-}
-#line 257 "src/mn-text-table.gob"
-static void
-___real_mn_text_table_clear (MNTextTable * self G_GNUC_UNUSED)
-{
-#line 508 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::clear"
-{
-#line 259 "src/mn-text-table.gob"
-
- mn_g_ptr_array_free_deep_custom(selfp->rows, (GFunc) self_row_free, NULL);
- selfp->rows = g_ptr_array_new();
-
- g_array_set_size(selfp->column_sizes, 0);
-
- selfp->row = NULL;
-
- self_set_dirty(self);
- }}
-#line 522 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 270 "src/mn-text-table.gob"
-MNTextTableCell *
-mn_text_table_append_text_cell (MNTextTable * self, const char * text)
-{
-#line 529 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::append_text_cell"
-#line 270 "src/mn-text-table.gob"
- g_return_val_if_fail (self != NULL, (MNTextTableCell * )0);
-#line 270 "src/mn-text-table.gob"
- g_return_val_if_fail (MN_IS_TEXT_TABLE (self), (MNTextTableCell * )0);
-#line 535 "mn-text-table.c"
-{
-#line 272 "src/mn-text-table.gob"
-
- return self_append_text_cell_from_layout(self, gtk_widget_create_pango_layout(GTK_WIDGET(self), text));
- }}
-#line 541 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 276 "src/mn-text-table.gob"
-MNTextTableCell *
-mn_text_table_append_text_cell_from_markup (MNTextTable * self, const char * markup)
-{
-#line 548 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::append_text_cell_from_markup"
-#line 276 "src/mn-text-table.gob"
- g_return_val_if_fail (self != NULL, (MNTextTableCell * )0);
-#line 276 "src/mn-text-table.gob"
- g_return_val_if_fail (MN_IS_TEXT_TABLE (self), (MNTextTableCell * )0);
-#line 276 "src/mn-text-table.gob"
- g_return_val_if_fail (markup != NULL, (MNTextTableCell * )0);
-#line 556 "mn-text-table.c"
-{
-#line 278 "src/mn-text-table.gob"
-
- PangoLayout *layout;
-
- layout = gtk_widget_create_pango_layout(GTK_WIDGET(self), NULL);
- pango_layout_set_markup(layout, markup, -1);
-
- return self_append_text_cell_from_layout(self, layout);
- }}
-#line 567 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 287 "src/mn-text-table.gob"
-MNTextTableCell *
-mn_text_table_append_text_cell_from_layout (MNTextTable * self, PangoLayout * layout)
-{
-#line 574 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::append_text_cell_from_layout"
-#line 287 "src/mn-text-table.gob"
- g_return_val_if_fail (self != NULL, (MNTextTableCell * )0);
-#line 287 "src/mn-text-table.gob"
- g_return_val_if_fail (MN_IS_TEXT_TABLE (self), (MNTextTableCell * )0);
-#line 287 "src/mn-text-table.gob"
- g_return_val_if_fail (layout != NULL, (MNTextTableCell * )0);
-#line 582 "mn-text-table.c"
-{
-#line 289 "src/mn-text-table.gob"
-
- MNTextTableCell *cell;
-
- cell = g_new(MNTextTableCell, 1);
- cell->layout = layout;
- cell->dirty = TRUE;
-
- self_append_cell_real(self, cell);
-
- return cell;
- }}
-#line 596 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 301 "src/mn-text-table.gob"
-MNTextTableCell *
-mn_text_table_append_blank_cell (MNTextTable * self, int width, int height)
-{
-#line 603 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::append_blank_cell"
-#line 301 "src/mn-text-table.gob"
- g_return_val_if_fail (self != NULL, (MNTextTableCell * )0);
-#line 301 "src/mn-text-table.gob"
- g_return_val_if_fail (MN_IS_TEXT_TABLE (self), (MNTextTableCell * )0);
-#line 609 "mn-text-table.c"
-{
-#line 303 "src/mn-text-table.gob"
-
- MNTextTableCell *cell;
-
- cell = g_new(MNTextTableCell, 1);
- cell->layout = NULL;
- cell->dirty = FALSE;
- cell->width = width;
- cell->height = height;
-
- self_append_cell_real(self, cell);
-
- return cell;
- }}
-#line 625 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 317 "src/mn-text-table.gob"
-static void
-mn_text_table_append_cell_real (MNTextTable * self, MNTextTableCell * cell)
-{
-#line 632 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::append_cell_real"
-#line 317 "src/mn-text-table.gob"
- g_return_if_fail (self != NULL);
-#line 317 "src/mn-text-table.gob"
- g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 638 "mn-text-table.c"
-{
-#line 319 "src/mn-text-table.gob"
-
- if (! selfp->row)
- {
- selfp->row = g_new(Row, 1);
- selfp->row->cells = g_ptr_array_new();
-
- g_ptr_array_add(selfp->rows, selfp->row);
- }
-
- g_ptr_array_add(selfp->row->cells, cell);
-
- self_set_dirty(self);
- }}
-#line 654 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 333 "src/mn-text-table.gob"
-void
-mn_text_table_cell_set_text (MNTextTable * self, MNTextTableCell * cell, const char * text)
-{
-#line 661 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::cell_set_text"
-#line 333 "src/mn-text-table.gob"
- g_return_if_fail (self != NULL);
-#line 333 "src/mn-text-table.gob"
- g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 333 "src/mn-text-table.gob"
- g_return_if_fail (cell != NULL);
-#line 333 "src/mn-text-table.gob"
- g_return_if_fail (text != NULL);
-#line 671 "mn-text-table.c"
-{
-#line 337 "src/mn-text-table.gob"
-
- const char *current_text;
-
- g_return_if_fail(cell->layout != NULL);
-
- current_text = pango_layout_get_text(cell->layout);
- if (! current_text || strcmp(current_text, text))
- {
- pango_layout_set_text(cell->layout, text, -1);
- cell->dirty = TRUE;
- self_set_dirty(self);
- }
- }}
-#line 687 "mn-text-table.c"
-#undef __GOB_FUNCTION__
-
-#line 351 "src/mn-text-table.gob"
-void
-mn_text_table_line_break (MNTextTable * self)
-{
-#line 694 "mn-text-table.c"
-#define __GOB_FUNCTION__ "MN:Text:Table::line_break"
-#line 351 "src/mn-text-table.gob"
- g_return_if_fail (self != NULL);
-#line 351 "src/mn-text-table.gob"
- g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 700 "mn-text-table.c"
-{
-#line 353 "src/mn-text-table.gob"
-
- selfp->row = NULL;
- }}
-#line 706 "mn-text-table.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-text-table.gob.stamp b/build/src/mn-text-table.gob.stamp
diff --git a/build/src/mn-text-table.h b/build/src/mn-text-table.h
@@ -1,95 +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_TEXT_TABLE_H__
-#define __MN_TEXT_TABLE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-typedef struct _MNTextTableCell MNTextTableCell;
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_TEXT_TABLE (mn_text_table_get_type())
-#define MN_TEXT_TABLE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_text_table_get_type(), MNTextTable)
-#define MN_TEXT_TABLE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_text_table_get_type(), MNTextTable const)
-#define MN_TEXT_TABLE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_text_table_get_type(), MNTextTableClass)
-#define MN_IS_TEXT_TABLE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_text_table_get_type ())
-
-#define MN_TEXT_TABLE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_text_table_get_type(), MNTextTableClass)
-
-/* Private structure type */
-typedef struct _MNTextTablePrivate MNTextTablePrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_TEXT_TABLE__
-#define __TYPEDEF_MN_TEXT_TABLE__
-typedef struct _MNTextTable MNTextTable;
-#endif
-struct _MNTextTable {
- GtkWidget __parent__;
- /*< private >*/
- MNTextTablePrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNTextTableClass MNTextTableClass;
-struct _MNTextTableClass {
- GtkWidgetClass __parent__;
- void (* clear) (MNTextTable * self);
-};
-
-
-/*
- * Public methods
- */
-GType mn_text_table_get_type (void) G_GNUC_CONST;
-#line 257 "src/mn-text-table.gob"
-void mn_text_table_clear (MNTextTable * self);
-#line 65 "mn-text-table.h"
-#line 270 "src/mn-text-table.gob"
-MNTextTableCell * mn_text_table_append_text_cell (MNTextTable * self,
- const char * text);
-#line 69 "mn-text-table.h"
-#line 276 "src/mn-text-table.gob"
-MNTextTableCell * mn_text_table_append_text_cell_from_markup (MNTextTable * self,
- const char * markup);
-#line 73 "mn-text-table.h"
-#line 287 "src/mn-text-table.gob"
-MNTextTableCell * mn_text_table_append_text_cell_from_layout (MNTextTable * self,
- PangoLayout * layout);
-#line 77 "mn-text-table.h"
-#line 301 "src/mn-text-table.gob"
-MNTextTableCell * mn_text_table_append_blank_cell (MNTextTable * self,
- int width,
- int height);
-#line 82 "mn-text-table.h"
-#line 333 "src/mn-text-table.gob"
-void mn_text_table_cell_set_text (MNTextTable * self,
- MNTextTableCell * cell,
- const char * text);
-#line 87 "mn-text-table.h"
-#line 351 "src/mn-text-table.gob"
-void mn_text_table_line_break (MNTextTable * self);
-#line 90 "mn-text-table.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-tooltips-private.h b/build/src/mn-tooltips-private.h
@@ -1,45 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_TOOLTIPS_PRIVATE_H__
-#define __MN_TOOLTIPS_PRIVATE_H__
-
-#include "mn-tooltips.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 32 "src/mn-tooltips.gob"
-
-typedef struct
-{
- MNTooltips *self;
- GtkWidget *widget;
- GtkWidget *tip_widget;
-} TooltipsData;
-
-#line 23 "mn-tooltips-private.h"
-struct _MNTooltipsPrivate {
-#line 76 "src/mn-tooltips.gob"
- GtkWidget * window;
-#line 77 "src/mn-tooltips.gob"
- TooltipsData * active_data;
-#line 78 "src/mn-tooltips.gob"
- GSList * data_list;
-#line 80 "src/mn-tooltips.gob"
- gboolean use_sticky_delay;
-#line 81 "src/mn-tooltips.gob"
- GTimeVal last_popdown;
-#line 82 "src/mn-tooltips.gob"
- unsigned int timeout_id;
-#line 84 "src/mn-tooltips.gob"
- int border_width;
-#line 39 "mn-tooltips-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-tooltips.c b/build/src/mn-tooltips.c
@@ -1,1183 +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-tooltips.h"
-
-#include "mn-tooltips-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 41 "src/mn-tooltips.gob"
-
-#include "mn-util.h"
-
-#define TOOLTIPS_DATA "mn-tooltips-data"
-#define TOOLTIPS_INFO "mn-tooltips-info"
-#define TOOLTIPS_KEYBOARD_MODE "gtk-tooltips-keyboard-mode" /* compatible with GtkTooltips */
-
-#define DELAY 500 /* Default delay in ms */
-#define STICKY_DELAY 0 /* Delay before popping up next tip
- * if we're sticky
- */
-#define STICKY_REVERT_DELAY 1000 /* Delay before sticky tooltips revert
- * to normal
- */
-
-/* The private flags that are used in the private_flags member of GtkWidget.
- */
-typedef enum
-{
- PRIVATE_GTK_LEAVE_PENDING = 1 << 4
-} GtkPrivateFlags;
-
-/* Macros for extracting a widgets private_flags from GtkWidget.
- */
-#define GTK_PRIVATE_FLAGS(wid) (GTK_WIDGET (wid)->private_flags)
-
-/* Macros for setting and clearing private widget flags.
- * we use a preprocessor string concatenation here for a clear
- * flags/private_flags distinction at the cost of single flag operations.
- */
-#define GTK_PRIVATE_SET_FLAG(wid,flag) G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) |= (PRIVATE_ ## flag)); }G_STMT_END
-
-#line 59 "mn-tooltips.c"
-/* self casting macros */
-#define SELF(x) MN_TOOLTIPS(x)
-#define SELF_CONST(x) MN_TOOLTIPS_CONST(x)
-#define IS_SELF(x) MN_IS_TOOLTIPS(x)
-#define TYPE_SELF MN_TYPE_TOOLTIPS
-#define SELF_CLASS(x) MN_TOOLTIPS_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_TOOLTIPS_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNTooltips Self;
-typedef MNTooltipsClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-tooltips.gob"
-static void mn_tooltips_init (MNTooltips * o) G_GNUC_UNUSED;
-#line 76 "mn-tooltips.c"
-#line 0 "src/mn-tooltips.gob"
-static void mn_tooltips_class_init (MNTooltipsClass * c) G_GNUC_UNUSED;
-#line 79 "mn-tooltips.c"
-#line 86 "src/mn-tooltips.gob"
-static void mn_tooltips_finalize (MNTooltips * self) G_GNUC_UNUSED;
-#line 82 "mn-tooltips.c"
-#line 102 "src/mn-tooltips.gob"
-static void mn_tooltips_destroy_data (TooltipsData * data) G_GNUC_UNUSED;
-#line 85 "mn-tooltips.c"
-#line 117 "src/mn-tooltips.gob"
-static void mn_tooltips_display_closed_h (GdkDisplay * display, gboolean is_error, gpointer user_data) G_GNUC_UNUSED;
-#line 88 "mn-tooltips.c"
-#line 126 "src/mn-tooltips.gob"
-static void mn_tooltips_disconnect_display_closed (MNTooltips * self) G_GNUC_UNUSED;
-#line 91 "mn-tooltips.c"
-#line 134 "src/mn-tooltips.gob"
-static void mn_tooltips_unset_window (MNTooltips * self) G_GNUC_UNUSED;
-#line 94 "mn-tooltips.c"
-#line 144 "src/mn-tooltips.gob"
-static void mn_tooltips_update_screen (MNTooltips * self, gboolean new_window) G_GNUC_UNUSED;
-#line 97 "mn-tooltips.c"
-#line 171 "src/mn-tooltips.gob"
-static void mn_tooltips_force_window (MNTooltips * self) G_GNUC_UNUSED;
-#line 100 "mn-tooltips.c"
-#line 192 "src/mn-tooltips.gob"
-static TooltipsData * mn_tooltips_get_data (GtkWidget * widget) G_GNUC_UNUSED;
-#line 103 "mn-tooltips.c"
-#line 198 "src/mn-tooltips.gob"
-static void mn_tooltips_set_tip_widget_real (MNTooltips * self, GtkWidget * widget, GtkWidget * tip_widget, int border_width) G_GNUC_UNUSED;
-#line 106 "mn-tooltips.c"
-#line 287 "src/mn-tooltips.gob"
-static gboolean mn_tooltips_paint_window (MNTooltips * self) G_GNUC_UNUSED;
-#line 109 "mn-tooltips.c"
-#line 308 "src/mn-tooltips.gob"
-static void mn_tooltips_draw_tips (MNTooltips * self) G_GNUC_UNUSED;
-#line 112 "mn-tooltips.c"
-#line 418 "src/mn-tooltips.gob"
-static gboolean mn_tooltips_timeout_cb (gpointer data) G_GNUC_UNUSED;
-#line 115 "mn-tooltips.c"
-#line 430 "src/mn-tooltips.gob"
-static void mn_tooltips_set_active_widget (MNTooltips * self, GtkWidget * widget) G_GNUC_UNUSED;
-#line 118 "mn-tooltips.c"
-#line 463 "src/mn-tooltips.gob"
-static void mn_tooltips_show_tip (GtkWidget * widget) G_GNUC_UNUSED;
-#line 121 "mn-tooltips.c"
-#line 479 "src/mn-tooltips.gob"
-static void mn_tooltips_hide_tip (GtkWidget * widget) G_GNUC_UNUSED;
-#line 124 "mn-tooltips.c"
-#line 492 "src/mn-tooltips.gob"
-static gboolean mn_tooltips_recently_shown (MNTooltips * self) G_GNUC_UNUSED;
-#line 127 "mn-tooltips.c"
-#line 504 "src/mn-tooltips.gob"
-static gboolean mn_tooltips_get_keyboard_mode (GtkWidget * widget) G_GNUC_UNUSED;
-#line 130 "mn-tooltips.c"
-#line 515 "src/mn-tooltips.gob"
-static void mn_tooltips_start_keyboard_mode (GtkWidget * widget) G_GNUC_UNUSED;
-#line 133 "mn-tooltips.c"
-#line 531 "src/mn-tooltips.gob"
-static void mn_tooltips_stop_keyboard_mode (GtkWidget * widget) G_GNUC_UNUSED;
-#line 136 "mn-tooltips.c"
-#line 547 "src/mn-tooltips.gob"
-static void mn_tooltips_start_delay (MNTooltips * self, GtkWidget * widget) G_GNUC_UNUSED;
-#line 139 "mn-tooltips.c"
-#line 562 "src/mn-tooltips.gob"
-static void mn_tooltips_event_after_h (GtkWidget * widget, GdkEvent * event, gpointer user_data) G_GNUC_UNUSED;
-#line 142 "mn-tooltips.c"
-#line 647 "src/mn-tooltips.gob"
-static void mn_tooltips_widget_unmap (GtkWidget * widget, gpointer user_data) G_GNUC_UNUSED;
-#line 145 "mn-tooltips.c"
-#line 658 "src/mn-tooltips.gob"
-static void mn_tooltips_widget_remove (GtkWidget * widget, gpointer user_data) G_GNUC_UNUSED;
-#line 148 "mn-tooltips.c"
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_destroy_data mn_tooltips_destroy_data
-#define self_display_closed_h mn_tooltips_display_closed_h
-#define self_disconnect_display_closed mn_tooltips_disconnect_display_closed
-#define self_unset_window mn_tooltips_unset_window
-#define self_update_screen mn_tooltips_update_screen
-#define self_force_window mn_tooltips_force_window
-#define self_get_data mn_tooltips_get_data
-#define self_set_tip_widget_real mn_tooltips_set_tip_widget_real
-#define self_set_tip mn_tooltips_set_tip
-#define self_set_tip_widget mn_tooltips_set_tip_widget
-#define self_paint_window mn_tooltips_paint_window
-#define self_draw_tips mn_tooltips_draw_tips
-#define self_timeout_cb mn_tooltips_timeout_cb
-#define self_set_active_widget mn_tooltips_set_active_widget
-#define self_show_tip mn_tooltips_show_tip
-#define self_hide_tip mn_tooltips_hide_tip
-#define self_recently_shown mn_tooltips_recently_shown
-#define self_get_keyboard_mode mn_tooltips_get_keyboard_mode
-#define self_start_keyboard_mode mn_tooltips_start_keyboard_mode
-#define self_stop_keyboard_mode mn_tooltips_stop_keyboard_mode
-#define self_start_delay mn_tooltips_start_delay
-#define self_event_after_h mn_tooltips_event_after_h
-#define self_widget_unmap mn_tooltips_widget_unmap
-#define self_widget_remove mn_tooltips_widget_remove
-#define self_toggle_keyboard_mode mn_tooltips_toggle_keyboard_mode
-#define self_new mn_tooltips_new
-GType
-mn_tooltips_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNTooltipsClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_tooltips_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNTooltips),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_tooltips_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNTooltips", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNTooltips *)g_object_new(mn_tooltips_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNTooltips * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNTooltips *
-GET_NEW_VARG (const char *first, ...)
-{
- MNTooltips *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNTooltips *)g_object_new_valist (mn_tooltips_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Tooltips::finalize"
- MNTooltips *self G_GNUC_UNUSED = MN_TOOLTIPS (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 86 "src/mn-tooltips.gob"
- mn_tooltips_finalize (self);
-#line 231 "mn-tooltips.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_tooltips_init (MNTooltips * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Tooltips::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_TOOLTIPS,MNTooltipsPrivate);
-#line 41 "src/mn-tooltips.gob"
- o->_priv->border_width = 4;
-#line 244 "mn-tooltips.c"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_tooltips_class_init (MNTooltipsClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Tooltips::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNTooltipsPrivate));
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
- g_object_class->finalize = ___finalize;
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 86 "src/mn-tooltips.gob"
-static void
-mn_tooltips_finalize (MNTooltips * self G_GNUC_UNUSED)
-{
-#line 267 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::finalize"
-{
-#line 87 "src/mn-tooltips.gob"
-
- GSList *l;
-
- if (selfp->timeout_id)
- g_source_remove(selfp->timeout_id);
-
- MN_LIST_FOREACH(l, selfp->data_list)
- {
- TooltipsData *data = l->data;
- self_widget_remove(data->widget, data);
- }
-
- self_unset_window(self);
- }}
-#line 285 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 102 "src/mn-tooltips.gob"
-static void
-mn_tooltips_destroy_data (TooltipsData * data)
-{
-#line 292 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::destroy_data"
-{
-#line 104 "src/mn-tooltips.gob"
-
- g_object_disconnect(data->widget,
- "any-signal", self_event_after_h, data,
- "any-signal", self_widget_unmap, data,
- "any-signal", self_widget_remove, data,
- NULL);
-
- g_object_set_data(G_OBJECT(data->widget), TOOLTIPS_DATA, NULL);
- g_object_unref(data->widget);
- g_object_unref(data->tip_widget);
- g_free(data);
- }}
-#line 308 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 117 "src/mn-tooltips.gob"
-static void
-mn_tooltips_display_closed_h (GdkDisplay * display, gboolean is_error, gpointer user_data)
-{
-#line 315 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::display_closed_h"
-{
-#line 121 "src/mn-tooltips.gob"
-
- Self *self = SELF(user_data);
- self_unset_window(self);
- }}
-#line 323 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 126 "src/mn-tooltips.gob"
-static void
-mn_tooltips_disconnect_display_closed (MNTooltips * self)
-{
-#line 330 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::disconnect_display_closed"
-#line 126 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 126 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 336 "mn-tooltips.c"
-{
-#line 128 "src/mn-tooltips.gob"
-
- g_signal_handlers_disconnect_by_func(gtk_widget_get_display(selfp->window),
- self_display_closed_h,
- self);
- }}
-#line 344 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 134 "src/mn-tooltips.gob"
-static void
-mn_tooltips_unset_window (MNTooltips * self)
-{
-#line 351 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::unset_window"
-#line 134 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 134 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 357 "mn-tooltips.c"
-{
-#line 136 "src/mn-tooltips.gob"
-
- if (selfp->window)
- {
- self_disconnect_display_closed(self);
- gtk_widget_destroy(selfp->window);
- }
- }}
-#line 367 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 144 "src/mn-tooltips.gob"
-static void
-mn_tooltips_update_screen (MNTooltips * self, gboolean new_window)
-{
-#line 374 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::update_screen"
-#line 144 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 144 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 380 "mn-tooltips.c"
-{
-#line 146 "src/mn-tooltips.gob"
-
- gboolean screen_changed = FALSE;
-
- if (selfp->active_data && selfp->active_data->widget)
- {
- GdkScreen *screen = gtk_widget_get_screen(selfp->active_data->widget);
-
- screen_changed = (screen != gtk_widget_get_screen(selfp->window));
-
- if (screen_changed)
- {
- if (! new_window)
- self_disconnect_display_closed(self);
-
- gtk_window_set_screen(GTK_WINDOW(selfp->window), screen);
- }
- }
-
- if (screen_changed || new_window)
- g_signal_connect(gtk_widget_get_display(selfp->window),
- "closed",
- G_CALLBACK(self_display_closed_h),
- self);
- }}
-#line 407 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 171 "src/mn-tooltips.gob"
-static void
-mn_tooltips_force_window (MNTooltips * self)
-{
-#line 414 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::force_window"
-#line 171 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 171 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 420 "mn-tooltips.c"
-{
-#line 173 "src/mn-tooltips.gob"
-
- if (! selfp->window)
- {
- selfp->window = gtk_window_new(GTK_WINDOW_POPUP);
- self_update_screen(self, TRUE);
- gtk_widget_set_app_paintable(selfp->window, TRUE);
- gtk_window_set_resizable(GTK_WINDOW(selfp->window), FALSE);
- gtk_widget_set_name(selfp->window, "gtk-tooltips");
- gtk_container_set_border_width(GTK_CONTAINER(selfp->window), selfp->border_width);
-
- g_signal_connect_swapped(selfp->window,
- "expose-event",
- G_CALLBACK(self_paint_window),
- self);
-
- mn_add_weak_pointer(&selfp->window);
- }
- }}
-#line 441 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 192 "src/mn-tooltips.gob"
-static TooltipsData *
-mn_tooltips_get_data (GtkWidget * widget)
-{
-#line 448 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::get_data"
-#line 192 "src/mn-tooltips.gob"
- g_return_val_if_fail (widget != NULL, (TooltipsData * )0);
-#line 192 "src/mn-tooltips.gob"
- g_return_val_if_fail (GTK_IS_WIDGET (widget), (TooltipsData * )0);
-#line 454 "mn-tooltips.c"
-{
-#line 194 "src/mn-tooltips.gob"
-
- return g_object_get_data(G_OBJECT(widget), TOOLTIPS_DATA);
- }}
-#line 460 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 198 "src/mn-tooltips.gob"
-static void
-mn_tooltips_set_tip_widget_real (MNTooltips * self, GtkWidget * widget, GtkWidget * tip_widget, int border_width)
-{
-#line 467 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::set_tip_widget_real"
-#line 198 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 198 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 198 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 198 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 477 "mn-tooltips.c"
-{
-#line 203 "src/mn-tooltips.gob"
-
- TooltipsData *data;
-
- data = self_get_data(widget);
-
- if (! tip_widget)
- {
- if (data)
- self_widget_remove(data->widget, data);
- return;
- }
-
- if (selfp->active_data
- && selfp->active_data->widget == widget
- && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
- {
- if (data->tip_widget)
- g_object_unref(data->tip_widget);
-
- data->tip_widget = tip_widget;
-
- if (data->tip_widget)
- g_object_ref_sink(data->tip_widget);
-
- self_draw_tips(self);
- }
- else
- {
- g_object_ref(widget);
-
- if (data)
- self_widget_remove(data->widget, data);
-
- data = g_new0(TooltipsData, 1);
- data->self = self;
- data->widget = widget;
- data->tip_widget = tip_widget;
-
- if (data->tip_widget)
- g_object_ref_sink(data->tip_widget);
-
- selfp->data_list = g_slist_append(selfp->data_list, data);
- g_signal_connect_after(widget, "event-after", G_CALLBACK(self_event_after_h), data);
-
- g_object_set_data(G_OBJECT(widget), TOOLTIPS_DATA, data);
-
- g_object_connect(widget,
- "signal::unmap", self_widget_unmap, data,
- "signal::unrealize", self_widget_unmap, data,
- "signal::destroy", self_widget_remove, data,
- NULL);
- }
-
- selfp->border_width = border_width;
- if (selfp->window)
- gtk_container_set_border_width(GTK_CONTAINER(selfp->window), border_width);
- }}
-#line 537 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 261 "src/mn-tooltips.gob"
-void
-mn_tooltips_set_tip (MNTooltips * self, GtkWidget * widget, const char * tip_text)
-{
-#line 544 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::set_tip"
-#line 261 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 261 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 261 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 261 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 554 "mn-tooltips.c"
-{
-#line 265 "src/mn-tooltips.gob"
-
- GtkWidget *label = NULL;
-
- if (tip_text)
- {
- label = gtk_label_new(tip_text);
- gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
- gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5);
- gtk_widget_show(label);
- }
-
- self_set_tip_widget_real(self, widget, label, 4);
- }}
-#line 570 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 279 "src/mn-tooltips.gob"
-void
-mn_tooltips_set_tip_widget (MNTooltips * self, GtkWidget * widget, GtkWidget * tip_widget)
-{
-#line 577 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::set_tip_widget"
-#line 279 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 279 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 279 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 279 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 587 "mn-tooltips.c"
-{
-#line 283 "src/mn-tooltips.gob"
-
- self_set_tip_widget_real(self, widget, tip_widget, 12);
- }}
-#line 593 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 287 "src/mn-tooltips.gob"
-static gboolean
-mn_tooltips_paint_window (MNTooltips * self)
-{
-#line 600 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::paint_window"
-#line 287 "src/mn-tooltips.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 287 "src/mn-tooltips.gob"
- g_return_val_if_fail (MN_IS_TOOLTIPS (self), (gboolean )0);
-#line 606 "mn-tooltips.c"
-{
-#line 289 "src/mn-tooltips.gob"
-
- GtkRequisition req;
-
- gtk_widget_size_request(selfp->window, &req);
- gtk_paint_flat_box(selfp->window->style,
- selfp->window->window,
- GTK_STATE_NORMAL,
- GTK_SHADOW_OUT,
- NULL,
- selfp->window,
- "tooltip",
- 0,
- 0,
- req.width,
- req.height);
-
- return FALSE;
- }}
-#line 627 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 308 "src/mn-tooltips.gob"
-static void
-mn_tooltips_draw_tips (MNTooltips * self)
-{
-#line 634 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::draw_tips"
-#line 308 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 308 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 640 "mn-tooltips.c"
-{
-#line 310 "src/mn-tooltips.gob"
-
- GtkRequisition requisition;
- GtkWidget *widget;
- gint x, y, w, h;
- TooltipsData *data;
- GtkWidget *child;
- gboolean keyboard_mode;
- GdkScreen *screen;
- GdkScreen *pointer_screen;
- gint monitor_num, px, py;
- GdkRectangle monitor;
- int screen_width;
-
- if (! selfp->window)
- self_force_window(self);
- else if (GTK_WIDGET_VISIBLE(selfp->window))
- g_get_current_time(&selfp->last_popdown);
-
- gtk_widget_ensure_style(selfp->window);
-
- widget = selfp->active_data->widget;
- g_object_set_data(G_OBJECT(selfp->window), TOOLTIPS_INFO, self);
-
- keyboard_mode = self_get_keyboard_mode(widget);
-
- self_update_screen(self, FALSE);
-
- screen = gtk_widget_get_screen(widget);
-
- data = selfp->active_data;
-
- child = GTK_BIN(selfp->window)->child;
- if (child)
- gtk_container_remove(GTK_CONTAINER(selfp->window), child);
-
- if (data->tip_widget)
- {
- gtk_container_add(GTK_CONTAINER(selfp->window), data->tip_widget);
- gtk_widget_show(data->tip_widget);
- }
-
- gtk_widget_size_request(selfp->window, &requisition);
- w = requisition.width;
- h = requisition.height;
-
- gdk_window_get_origin(widget->window, &x, &y);
- if (GTK_WIDGET_NO_WINDOW(widget))
- {
- x += widget->allocation.x;
- y += widget->allocation.y;
- }
-
- x += widget->allocation.width / 2;
-
- if (! keyboard_mode)
- gdk_window_get_pointer(gdk_screen_get_root_window(screen), &x, NULL, NULL);
-
- x -= (w / 2 + 4);
-
- gdk_display_get_pointer(gdk_screen_get_display(screen), &pointer_screen, &px, &py, NULL);
- if (pointer_screen != screen)
- {
- px = x;
- py = y;
- }
- monitor_num = gdk_screen_get_monitor_at_point(screen, px, py);
- gdk_screen_get_monitor_geometry(screen, monitor_num, &monitor);
-
- if ((x + w) > monitor.x + monitor.width)
- x -= (x + w) - (monitor.x + monitor.width);
- else if (x < monitor.x)
- x = monitor.x;
-
- if ((y + h + widget->allocation.height + 4) > monitor.y + monitor.height
- && (y - 4) > monitor.y)
- y = y - h - 4;
- else
- y = y + widget->allocation.height + 4;
-
- /*
- * The following block is not part of GTK+ and has been added to
- * make sure that the tooltip will not go beyond the screen edges
- * (horizontally).
- */
- screen_width = gdk_screen_get_width(screen);
- if (x < 0 || x + w > screen_width)
- {
- x = 0;
- gtk_widget_set_size_request(selfp->window, MIN(w, screen_width), -1);
- }
-
- /*
- * The following block ensures that the top of the tooltip is
- * visible, but it corrupts the tip widget (the mail summary is
- * not properly positioned). A fix is welcome.
- */
-/*
- if (y < 0)
- {
- gtk_widget_set_size_request(selfp->window, -1, y + h);
- y = 0;
- }
-*/
-
- gtk_window_move(GTK_WINDOW(selfp->window), x, y);
- gtk_widget_show(selfp->window);
- }}
-#line 750 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 418 "src/mn-tooltips.gob"
-static gboolean
-mn_tooltips_timeout_cb (gpointer data)
-{
-#line 757 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::timeout_cb"
-{
-#line 420 "src/mn-tooltips.gob"
-
- Self *self = SELF(data);
-
- if (selfp->active_data && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
- self_draw_tips(self);
-
- selfp->timeout_id = 0;
- return FALSE; /* remove timeout */
- }}
-#line 770 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 430 "src/mn-tooltips.gob"
-static void
-mn_tooltips_set_active_widget (MNTooltips * self, GtkWidget * widget)
-{
-#line 777 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::set_active_widget"
-#line 430 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 430 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 783 "mn-tooltips.c"
-{
-#line 432 "src/mn-tooltips.gob"
-
- if (selfp->window)
- {
- if (GTK_WIDGET_VISIBLE(selfp->window))
- g_get_current_time(&selfp->last_popdown);
- gtk_widget_hide(selfp->window);
- }
-
- mn_source_clear(&selfp->timeout_id);
-
- selfp->active_data = NULL;
-
- if (widget)
- {
- GSList *l;
-
- MN_LIST_FOREACH(l, selfp->data_list)
- {
- TooltipsData *data = l->data;
-
- if (data->widget == widget && GTK_WIDGET_DRAWABLE(widget))
- {
- selfp->active_data = data;
- break;
- }
- }
- }
- else
- selfp->use_sticky_delay = FALSE;
- }}
-#line 816 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 463 "src/mn-tooltips.gob"
-static void
-mn_tooltips_show_tip (GtkWidget * widget)
-{
-#line 823 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::show_tip"
-#line 463 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 463 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 829 "mn-tooltips.c"
-{
-#line 465 "src/mn-tooltips.gob"
-
- TooltipsData *data;
-
- data = self_get_data(widget);
-
- if (data &&
- (! data->self->_priv->active_data ||
- data->self->_priv->active_data->widget != widget))
- {
- self_set_active_widget(data->self, widget);
- self_draw_tips(data->self);
- }
- }}
-#line 845 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 479 "src/mn-tooltips.gob"
-static void
-mn_tooltips_hide_tip (GtkWidget * widget)
-{
-#line 852 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::hide_tip"
-#line 479 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 479 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 858 "mn-tooltips.c"
-{
-#line 481 "src/mn-tooltips.gob"
-
- TooltipsData *data;
-
- data = self_get_data(widget);
-
- if (data &&
- (data->self->_priv->active_data &&
- data->self->_priv->active_data->widget == widget))
- self_set_active_widget(data->self, NULL);
- }}
-#line 871 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 492 "src/mn-tooltips.gob"
-static gboolean
-mn_tooltips_recently_shown (MNTooltips * self)
-{
-#line 878 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::recently_shown"
-#line 492 "src/mn-tooltips.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 492 "src/mn-tooltips.gob"
- g_return_val_if_fail (MN_IS_TOOLTIPS (self), (gboolean )0);
-#line 884 "mn-tooltips.c"
-{
-#line 494 "src/mn-tooltips.gob"
-
- GTimeVal now;
- glong msec;
-
- g_get_current_time (&now);
- msec = (now.tv_sec - selfp->last_popdown.tv_sec) * 1000 +
- (now.tv_usec - selfp->last_popdown.tv_usec) / 1000;
- return (msec < STICKY_REVERT_DELAY);
- }}
-#line 896 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 504 "src/mn-tooltips.gob"
-static gboolean
-mn_tooltips_get_keyboard_mode (GtkWidget * widget)
-{
-#line 903 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::get_keyboard_mode"
-#line 504 "src/mn-tooltips.gob"
- g_return_val_if_fail (widget != NULL, (gboolean )0);
-#line 504 "src/mn-tooltips.gob"
- g_return_val_if_fail (GTK_IS_WIDGET (widget), (gboolean )0);
-#line 909 "mn-tooltips.c"
-{
-#line 506 "src/mn-tooltips.gob"
-
- GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
-
- if (GTK_IS_WINDOW(toplevel))
- return GPOINTER_TO_INT(g_object_get_data(G_OBJECT(toplevel), TOOLTIPS_KEYBOARD_MODE));
- else
- return FALSE;
- }}
-#line 920 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 515 "src/mn-tooltips.gob"
-static void
-mn_tooltips_start_keyboard_mode (GtkWidget * widget)
-{
-#line 927 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::start_keyboard_mode"
-#line 515 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 515 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 933 "mn-tooltips.c"
-{
-#line 517 "src/mn-tooltips.gob"
-
- GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
-
- if (GTK_IS_WINDOW(toplevel))
- {
- GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
-
- g_object_set_data(G_OBJECT(toplevel), TOOLTIPS_KEYBOARD_MODE, GINT_TO_POINTER(TRUE));
-
- if (focus)
- self_show_tip(focus);
- }
- }}
-#line 949 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 531 "src/mn-tooltips.gob"
-static void
-mn_tooltips_stop_keyboard_mode (GtkWidget * widget)
-{
-#line 956 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::stop_keyboard_mode"
-#line 531 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 531 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 962 "mn-tooltips.c"
-{
-#line 533 "src/mn-tooltips.gob"
-
- GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
-
- if (GTK_IS_WINDOW(toplevel))
- {
- GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
-
- if (focus)
- self_hide_tip(focus);
-
- g_object_set_data(G_OBJECT(toplevel), TOOLTIPS_KEYBOARD_MODE, GINT_TO_POINTER(FALSE));
- }
- }}
-#line 978 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 547 "src/mn-tooltips.gob"
-static void
-mn_tooltips_start_delay (MNTooltips * self, GtkWidget * widget)
-{
-#line 985 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::start_delay"
-#line 547 "src/mn-tooltips.gob"
- g_return_if_fail (self != NULL);
-#line 547 "src/mn-tooltips.gob"
- g_return_if_fail (MN_IS_TOOLTIPS (self));
-#line 991 "mn-tooltips.c"
-{
-#line 549 "src/mn-tooltips.gob"
-
- TooltipsData *old_data;
-
- old_data = selfp->active_data;
- if (! old_data || old_data->widget != widget)
- {
- self_set_active_widget(self, widget);
- selfp->timeout_id = gdk_threads_add_timeout((selfp->use_sticky_delay && self_recently_shown(self)) ? STICKY_DELAY : DELAY,
- self_timeout_cb,
- self);
- }
- }}
-#line 1006 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 562 "src/mn-tooltips.gob"
-static void
-mn_tooltips_event_after_h (GtkWidget * widget, GdkEvent * event, gpointer user_data)
-{
-#line 1013 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::event_after_h"
-{
-#line 564 "src/mn-tooltips.gob"
-
- Self *self;
- TooltipsData *old_data;
- GtkWidget *event_widget;
- gboolean keyboard_mode = self_get_keyboard_mode(widget);
-
- if ((event->type == GDK_LEAVE_NOTIFY || event->type == GDK_ENTER_NOTIFY) &&
- event->crossing.detail == GDK_NOTIFY_INFERIOR)
- return;
-
- old_data = self_get_data(widget);
- self = old_data->self;
-
- if (keyboard_mode)
- {
- switch (event->type)
- {
- case GDK_FOCUS_CHANGE:
- if (event->focus_change.in)
- self_show_tip(widget);
- else
- self_hide_tip(widget);
- break;
-
- default:
- break;
- }
- }
- else
- {
- if (event->type != GDK_KEY_PRESS && event->type != GDK_KEY_RELEASE)
- {
- event_widget = gtk_get_event_widget(event);
- if (event_widget != widget)
- return;
- }
-
- switch (event->type)
- {
- case GDK_EXPOSE:
- /* do nothing */
- break;
-
- case GDK_ENTER_NOTIFY:
- if (! (GTK_IS_MENU_ITEM(widget) && GTK_MENU_ITEM(widget)->submenu))
- self_start_delay(self, widget);
- break;
-
- case GDK_LEAVE_NOTIFY:
- self_set_active_widget(self, NULL);
- selfp->use_sticky_delay = selfp->window && GTK_WIDGET_VISIBLE(selfp->window);
- break;
-
- case GDK_MOTION_NOTIFY:
- /* Handle menu items specially ... pend popup for each motion
- * on other widgets, we ignore motion.
- */
- if (GTK_IS_MENU_ITEM(widget) && ! GTK_MENU_ITEM(widget)->submenu)
- {
- /* Completely evil hack to make sure we get the LEAVE_NOTIFY
- */
- GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
- self_set_active_widget(self, NULL);
- self_start_delay(self, widget);
- break;
- }
- break; /* ignore */
-
- case GDK_BUTTON_PRESS:
- case GDK_BUTTON_RELEASE:
- case GDK_KEY_PRESS:
- case GDK_KEY_RELEASE:
- case GDK_PROXIMITY_IN:
- case GDK_SCROLL:
- self_set_active_widget(self, NULL);
- break;
-
- default:
- break;
- }
- }
- }}
-#line 1099 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 647 "src/mn-tooltips.gob"
-static void
-mn_tooltips_widget_unmap (GtkWidget * widget, gpointer user_data)
-{
-#line 1106 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::widget_unmap"
-#line 647 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 647 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 1112 "mn-tooltips.c"
-{
-#line 649 "src/mn-tooltips.gob"
-
- TooltipsData *data = user_data;
- Self *self = data->self;
-
- if (selfp->active_data &&
- (selfp->active_data->widget == widget))
- self_set_active_widget(self, NULL);
- }}
-#line 1123 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 658 "src/mn-tooltips.gob"
-static void
-mn_tooltips_widget_remove (GtkWidget * widget, gpointer user_data)
-{
-#line 1130 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::widget_remove"
-#line 658 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 658 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 1136 "mn-tooltips.c"
-{
-#line 660 "src/mn-tooltips.gob"
-
- TooltipsData *data = user_data;
- Self *self = data->self;
-
- self_widget_unmap(widget, user_data);
- selfp->data_list = g_slist_remove(selfp->data_list, data);
- self_destroy_data(data);
- }}
-#line 1147 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 669 "src/mn-tooltips.gob"
-void
-mn_tooltips_toggle_keyboard_mode (GtkWidget * widget)
-{
-#line 1154 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::toggle_keyboard_mode"
-#line 669 "src/mn-tooltips.gob"
- g_return_if_fail (widget != NULL);
-#line 669 "src/mn-tooltips.gob"
- g_return_if_fail (GTK_IS_WIDGET (widget));
-#line 1160 "mn-tooltips.c"
-{
-#line 671 "src/mn-tooltips.gob"
-
- if (self_get_keyboard_mode(widget))
- self_stop_keyboard_mode(widget);
- else
- self_start_keyboard_mode(widget);
- }}
-#line 1169 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
-
-#line 678 "src/mn-tooltips.gob"
-MNTooltips *
-mn_tooltips_new (void)
-{
-#line 1176 "mn-tooltips.c"
-#define __GOB_FUNCTION__ "MN:Tooltips::new"
-{
-#line 680 "src/mn-tooltips.gob"
-
- return GET_NEW;
- }}
-#line 1183 "mn-tooltips.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-tooltips.gob.stamp b/build/src/mn-tooltips.gob.stamp
diff --git a/build/src/mn-tooltips.h b/build/src/mn-tooltips.h
@@ -1,78 +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_TOOLTIPS_H__
-#define __MN_TOOLTIPS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_TOOLTIPS (mn_tooltips_get_type())
-#define MN_TOOLTIPS(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_tooltips_get_type(), MNTooltips)
-#define MN_TOOLTIPS_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_tooltips_get_type(), MNTooltips const)
-#define MN_TOOLTIPS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_tooltips_get_type(), MNTooltipsClass)
-#define MN_IS_TOOLTIPS(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_tooltips_get_type ())
-
-#define MN_TOOLTIPS_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_tooltips_get_type(), MNTooltipsClass)
-
-/* Private structure type */
-typedef struct _MNTooltipsPrivate MNTooltipsPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_TOOLTIPS__
-#define __TYPEDEF_MN_TOOLTIPS__
-typedef struct _MNTooltips MNTooltips;
-#endif
-struct _MNTooltips {
- GObject __parent__;
- /*< private >*/
- MNTooltipsPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNTooltipsClass MNTooltipsClass;
-struct _MNTooltipsClass {
- GObjectClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_tooltips_get_type (void) G_GNUC_CONST;
-#line 261 "src/mn-tooltips.gob"
-void mn_tooltips_set_tip (MNTooltips * self,
- GtkWidget * widget,
- const char * tip_text);
-#line 62 "mn-tooltips.h"
-#line 279 "src/mn-tooltips.gob"
-void mn_tooltips_set_tip_widget (MNTooltips * self,
- GtkWidget * widget,
- GtkWidget * tip_widget);
-#line 67 "mn-tooltips.h"
-#line 669 "src/mn-tooltips.gob"
-void mn_tooltips_toggle_keyboard_mode (GtkWidget * widget);
-#line 70 "mn-tooltips.h"
-#line 678 "src/mn-tooltips.gob"
-MNTooltips * mn_tooltips_new (void);
-#line 73 "mn-tooltips.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-vfs-mailbox-backend-private.h b/build/src/mn-vfs-mailbox-backend-private.h
@@ -1,28 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_VFS_MAILBOX_BACKEND_PRIVATE_H__
-#define __MN_VFS_MAILBOX_BACKEND_PRIVATE_H__
-
-#include "mn-vfs-mailbox-backend.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNVFSMailboxBackendPrivate {
-#line 47 "src/mn-vfs-mailbox-backend.gob"
- unsigned int queue_check_id;
-#line 16 "mn-vfs-mailbox-backend-private.h"
-};
-#line 70 "src/mn-vfs-mailbox-backend.gob"
-void mn_vfs_mailbox_backend_monitor (MNVFSMailboxBackend * self, int check_id, const char * uri, GnomeVFSMonitorType type);
-#line 20 "mn-vfs-mailbox-backend-private.h"
-#line 112 "src/mn-vfs-mailbox-backend.gob"
-void mn_vfs_mailbox_backend_queue_check (MNVFSMailboxBackend * self);
-#line 23 "mn-vfs-mailbox-backend-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-vfs-mailbox-backend.c b/build/src/mn-vfs-mailbox-backend.c
@@ -1,421 +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-vfs-mailbox-backend.h"
-
-#include "mn-vfs-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 24 "src/mn-vfs-mailbox-backend.gob"
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include "mn-mailbox-private.h"
-#include "mn-reentrant-mailbox-private.h"
-#include "mn-vfs-mailbox-private.h"
-#include "mn-conf.h"
-#include "mn-util.h"
-
-#line 36 "mn-vfs-mailbox-backend.c"
-/* self casting macros */
-#define SELF(x) MN_VFS_MAILBOX_BACKEND(x)
-#define SELF_CONST(x) MN_VFS_MAILBOX_BACKEND_CONST(x)
-#define IS_SELF(x) MN_IS_VFS_MAILBOX_BACKEND(x)
-#define TYPE_SELF MN_TYPE_VFS_MAILBOX_BACKEND
-#define SELF_CLASS(x) MN_VFS_MAILBOX_BACKEND_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_VFS_MAILBOX_BACKEND_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNVFSMailboxBackend Self;
-typedef MNVFSMailboxBackendClass 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-vfs-mailbox-backend.gob"
-static void mn_vfs_mailbox_backend_init (MNVFSMailboxBackend * o) G_GNUC_UNUSED;
-#line 55 "mn-vfs-mailbox-backend.c"
-#line 0 "src/mn-vfs-mailbox-backend.gob"
-static void mn_vfs_mailbox_backend_class_init (MNVFSMailboxBackendClass * c) G_GNUC_UNUSED;
-#line 58 "mn-vfs-mailbox-backend.c"
-#line 57 "src/mn-vfs-mailbox-backend.gob"
-static void mn_vfs_mailbox_backend_finalize (MNVFSMailboxBackend * self) G_GNUC_UNUSED;
-#line 61 "mn-vfs-mailbox-backend.c"
-#line 81 "src/mn-vfs-mailbox-backend.gob"
-static void mn_vfs_mailbox_backend_real_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data) G_GNUC_UNUSED;
-#line 64 "mn-vfs-mailbox-backend.c"
-static void ___real_mn_vfs_mailbox_backend_monitor_cb (MNVFSMailboxBackend * self, const char * info_uri, GnomeVFSMonitorEventType event_type);
-#line 91 "src/mn-vfs-mailbox-backend.gob"
-static void mn_vfs_mailbox_backend_monitor_cb (MNVFSMailboxBackend * self, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
-#line 68 "mn-vfs-mailbox-backend.c"
-#line 124 "src/mn-vfs-mailbox-backend.gob"
-static gboolean mn_vfs_mailbox_backend_queue_check_cb (gpointer data) G_GNUC_UNUSED;
-#line 71 "mn-vfs-mailbox-backend.c"
-
-enum {
- PROP_0,
- PROP_MAILBOX
-};
-
-/* pointer to the class of our parent */
-static GObjectClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_monitor mn_vfs_mailbox_backend_monitor
-#define self_real_monitor_cb mn_vfs_mailbox_backend_real_monitor_cb
-#define self_monitor_cb mn_vfs_mailbox_backend_monitor_cb
-#define self_queue_check mn_vfs_mailbox_backend_queue_check
-#define self_queue_check_cb mn_vfs_mailbox_backend_queue_check_cb
-#define self_is mn_vfs_mailbox_backend_is
-#define self_check mn_vfs_mailbox_backend_check
-GType
-mn_vfs_mailbox_backend_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNVFSMailboxBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_vfs_mailbox_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNVFSMailboxBackend),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_vfs_mailbox_backend_init,
- NULL
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "MNVFSMailboxBackend", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNVFSMailboxBackend *)g_object_new(mn_vfs_mailbox_backend_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNVFSMailboxBackend * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNVFSMailboxBackend *
-GET_NEW_VARG (const char *first, ...)
-{
- MNVFSMailboxBackend *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNVFSMailboxBackend *)g_object_new_valist (mn_vfs_mailbox_backend_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::finalize"
- MNVFSMailboxBackend *self G_GNUC_UNUSED = MN_VFS_MAILBOX_BACKEND (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 57 "src/mn-vfs-mailbox-backend.gob"
- mn_vfs_mailbox_backend_finalize (self);
-#line 140 "mn-vfs-mailbox-backend.c"
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_vfs_mailbox_backend_init (MNVFSMailboxBackend * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_VFS_MAILBOX_BACKEND,MNVFSMailboxBackendPrivate);
-}
-#undef __GOB_FUNCTION__
-static void
-mn_vfs_mailbox_backend_class_init (MNVFSMailboxBackendClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNVFSMailboxBackendPrivate));
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
-#line 91 "src/mn-vfs-mailbox-backend.gob"
- c->monitor_cb = ___real_mn_vfs_mailbox_backend_monitor_cb;
-#line 165 "mn-vfs-mailbox-backend.c"
- c->is = NULL;
- c->check = NULL;
- 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
- ("mailbox" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_MAILBOX,
- 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:VFS:Mailbox:Backend::set_property"
-{
- MNVFSMailboxBackend *self G_GNUC_UNUSED;
-
- self = MN_VFS_MAILBOX_BACKEND (object);
-
- switch (property_id) {
- case PROP_MAILBOX:
- {
-#line 45 "src/mn-vfs-mailbox-backend.gob"
-self->mailbox = g_value_get_pointer (VAL);
-#line 202 "mn-vfs-mailbox-backend.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:VFS:Mailbox:Backend::get_property"
-{
- MNVFSMailboxBackend *self G_GNUC_UNUSED;
-
- self = MN_VFS_MAILBOX_BACKEND (object);
-
- switch (property_id) {
- case PROP_MAILBOX:
- {
-#line 45 "src/mn-vfs-mailbox-backend.gob"
-g_value_set_pointer (VAL, self->mailbox);
-#line 233 "mn-vfs-mailbox-backend.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 57 "src/mn-vfs-mailbox-backend.gob"
-static void
-mn_vfs_mailbox_backend_finalize (MNVFSMailboxBackend * self G_GNUC_UNUSED)
-{
-#line 254 "mn-vfs-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::finalize"
-{
-#line 58 "src/mn-vfs-mailbox-backend.gob"
-
- if (selfp->queue_check_id)
- g_source_remove(selfp->queue_check_id);
-
- /*
- * If the calling mailbox is being finalized, there is no need to
- * hold its lock. Otherwise, it holds its lock while finalizing us
- * (see reentrant_check() in mn-vfs-mailbox.gob).
- */
- mn_vfs_mailbox_remove_monitors_by_owner(self->mailbox, self);
- }}
-#line 269 "mn-vfs-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 70 "src/mn-vfs-mailbox-backend.gob"
-void
-mn_vfs_mailbox_backend_monitor (MNVFSMailboxBackend * self, int check_id, const char * uri, GnomeVFSMonitorType type)
-{
-#line 276 "mn-vfs-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::monitor"
-#line 70 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (self != NULL);
-#line 70 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self));
-#line 70 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (uri != NULL);
-#line 284 "mn-vfs-mailbox-backend.c"
-{
-#line 75 "src/mn-vfs-mailbox-backend.gob"
-
- mn_vfs_mailbox_lock(self->mailbox);
- mn_vfs_mailbox_monitor(self->mailbox, uri, self, type, self_real_monitor_cb, self);
- mn_vfs_mailbox_unlock(self->mailbox);
- }}
-#line 292 "mn-vfs-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 81 "src/mn-vfs-mailbox-backend.gob"
-static void
-mn_vfs_mailbox_backend_real_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data)
-{
-#line 299 "mn-vfs-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::real_monitor_cb"
-{
-#line 87 "src/mn-vfs-mailbox-backend.gob"
-
- self_monitor_cb(user_data, info_uri, event_type);
- }}
-#line 306 "mn-vfs-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 91 "src/mn-vfs-mailbox-backend.gob"
-static void
-mn_vfs_mailbox_backend_monitor_cb (MNVFSMailboxBackend * self, const char * info_uri, GnomeVFSMonitorEventType event_type)
-{
-#line 313 "mn-vfs-mailbox-backend.c"
- MNVFSMailboxBackendClass *klass;
-#line 91 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (self != NULL);
-#line 91 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self));
-#line 319 "mn-vfs-mailbox-backend.c"
- klass = MN_VFS_MAILBOX_BACKEND_GET_CLASS(self);
-
- if(klass->monitor_cb)
- (*klass->monitor_cb)(self,info_uri,event_type);
-}
-#line 91 "src/mn-vfs-mailbox-backend.gob"
-static void
-___real_mn_vfs_mailbox_backend_monitor_cb (MNVFSMailboxBackend * self G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
-{
-#line 329 "mn-vfs-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::monitor_cb"
-{
-#line 95 "src/mn-vfs-mailbox-backend.gob"
-
- if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
- || event_type == GNOME_VFS_MONITOR_EVENT_DELETED
- || event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
- self_queue_check(self);
- }}
-#line 339 "mn-vfs-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 112 "src/mn-vfs-mailbox-backend.gob"
-void
-mn_vfs_mailbox_backend_queue_check (MNVFSMailboxBackend * self)
-{
-#line 346 "mn-vfs-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::queue_check"
-#line 112 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (self != NULL);
-#line 112 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self));
-#line 352 "mn-vfs-mailbox-backend.c"
-{
-#line 114 "src/mn-vfs-mailbox-backend.gob"
-
- if (selfp->queue_check_id)
- mn_source_clear(&selfp->queue_check_id);
-
- if (self->check_latency)
- selfp->queue_check_id = gdk_threads_add_timeout(self->check_latency, self_queue_check_cb, self);
- else
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self->mailbox));
- }}
-#line 364 "mn-vfs-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 124 "src/mn-vfs-mailbox-backend.gob"
-static gboolean
-mn_vfs_mailbox_backend_queue_check_cb (gpointer data)
-{
-#line 371 "mn-vfs-mailbox-backend.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::queue_check_cb"
-{
-#line 126 "src/mn-vfs-mailbox-backend.gob"
-
- Self *self = data;
-
- mn_mailbox_check(MN_MAILBOX(self->mailbox));
-
- selfp->queue_check_id = 0;
- return FALSE; /* remove source */
- }}
-#line 383 "mn-vfs-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 135 "src/mn-vfs-mailbox-backend.gob"
-gboolean
-mn_vfs_mailbox_backend_is (MNVFSMailboxBackend * self, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
-{
-#line 390 "mn-vfs-mailbox-backend.c"
- MNVFSMailboxBackendClass *klass;
-#line 135 "src/mn-vfs-mailbox-backend.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 135 "src/mn-vfs-mailbox-backend.gob"
- g_return_val_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self), (gboolean )0);
-#line 396 "mn-vfs-mailbox-backend.c"
- klass = MN_VFS_MAILBOX_BACKEND_GET_CLASS(self);
-
- if(klass->is)
- return (*klass->is)(self,class,mailbox);
- else
- return (gboolean )(0);
-}
-
-#line 138 "src/mn-vfs-mailbox-backend.gob"
-void
-mn_vfs_mailbox_backend_check (MNVFSMailboxBackend * self, int check_id)
-{
-#line 409 "mn-vfs-mailbox-backend.c"
- MNVFSMailboxBackendClass *klass;
-#line 138 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (self != NULL);
-#line 138 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self));
-#line 138 "src/mn-vfs-mailbox-backend.gob"
- g_return_if_fail (check_id != 0);
-#line 417 "mn-vfs-mailbox-backend.c"
- klass = MN_VFS_MAILBOX_BACKEND_GET_CLASS(self);
-
- if(klass->check)
- (*klass->check)(self,check_id);
-}
diff --git a/build/src/mn-vfs-mailbox-backend.gob.stamp b/build/src/mn-vfs-mailbox-backend.gob.stamp
diff --git a/build/src/mn-vfs-mailbox-backend.h b/build/src/mn-vfs-mailbox-backend.h
@@ -1,89 +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_VFS_MAILBOX_BACKEND_H__
-#define __MN_VFS_MAILBOX_BACKEND_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_VFS_MAILBOX_BACKEND (mn_vfs_mailbox_backend_get_type())
-#define MN_VFS_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_vfs_mailbox_backend_get_type(), MNVFSMailboxBackend)
-#define MN_VFS_MAILBOX_BACKEND_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_vfs_mailbox_backend_get_type(), MNVFSMailboxBackend const)
-#define MN_VFS_MAILBOX_BACKEND_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_vfs_mailbox_backend_get_type(), MNVFSMailboxBackendClass)
-#define MN_IS_VFS_MAILBOX_BACKEND(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_vfs_mailbox_backend_get_type ())
-
-#define MN_VFS_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_vfs_mailbox_backend_get_type(), MNVFSMailboxBackendClass)
-
-/* Private structure type */
-typedef struct _MNVFSMailboxBackendPrivate MNVFSMailboxBackendPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_VFS_MAILBOX_BACKEND__
-#define __TYPEDEF_MN_VFS_MAILBOX_BACKEND__
-typedef struct _MNVFSMailboxBackend MNVFSMailboxBackend;
-#endif
-struct _MNVFSMailboxBackend {
- GObject __parent__;
- /*< private >*/
- MNVFSMailbox * mailbox; /* protected */
- int check_latency; /* protected */
- MNVFSMailboxBackendPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNVFSMailboxBackendClass MNVFSMailboxBackendClass;
-struct _MNVFSMailboxBackendClass {
- GObjectClass __parent__;
- void (* monitor_cb) (MNVFSMailboxBackend * self, const char * info_uri, GnomeVFSMonitorEventType event_type);
- gboolean (* is) (MNVFSMailboxBackend * self, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox);
- void (* check) (MNVFSMailboxBackend * self, int check_id);
- const char * format;
-};
-
-
-/*
- * Public methods
- */
-GType mn_vfs_mailbox_backend_get_type (void) G_GNUC_CONST;
-#line 135 "src/mn-vfs-mailbox-backend.gob"
-gboolean mn_vfs_mailbox_backend_is (MNVFSMailboxBackend * self,
- MNVFSMailboxBackendClass * class,
- MNVFSMailbox * mailbox);
-#line 68 "mn-vfs-mailbox-backend.h"
-#line 138 "src/mn-vfs-mailbox-backend.gob"
-void mn_vfs_mailbox_backend_check (MNVFSMailboxBackend * self,
- int check_id);
-#line 72 "mn-vfs-mailbox-backend.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_VFS_MAILBOX_BACKEND_PROP_MAILBOX(arg) "mailbox", __extension__ ({MNVFSMailbox * z = (arg); z;})
-#define MN_VFS_MAILBOX_BACKEND_GET_PROP_MAILBOX(arg) "mailbox", __extension__ ({MNVFSMailbox * *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_VFS_MAILBOX_BACKEND_PROP_MAILBOX(arg) "mailbox",(MNVFSMailbox * )(arg)
-#define MN_VFS_MAILBOX_BACKEND_GET_PROP_MAILBOX(arg) "mailbox",(MNVFSMailbox * *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-vfs-mailbox-private.h b/build/src/mn-vfs-mailbox-private.h
@@ -1,40 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_VFS_MAILBOX_PRIVATE_H__
-#define __MN_VFS_MAILBOX_PRIVATE_H__
-
-#include "mn-vfs-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 30 "src/mn-vfs-mailbox.gob"
-
-#include "mn-vfs-mailbox-backend.h"
-
-#line 18 "mn-vfs-mailbox-private.h"
-struct _MNVFSMailboxPrivate {
-#line 80 "src/mn-vfs-mailbox.gob"
- GSList * monitors;
-#line 81 "src/mn-vfs-mailbox.gob"
- MNVFSMailboxBackend * backend;
-#line 82 "src/mn-vfs-mailbox.gob"
- unsigned int update_poll_id;
-#line 84 "src/mn-vfs-mailbox.gob"
- GMutex * mutex;
-#line 28 "mn-vfs-mailbox-private.h"
-};
-#line 201 "src/mn-vfs-mailbox.gob"
-void mn_vfs_mailbox_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailboxBackend * owner, GnomeVFSMonitorType type, GnomeVFSMonitorCallback callback, gpointer user_data);
-#line 32 "mn-vfs-mailbox-private.h"
-#line 294 "src/mn-vfs-mailbox.gob"
-void mn_vfs_mailbox_remove_monitors_by_owner (MNVFSMailbox * self, MNVFSMailboxBackend * owner);
-#line 35 "mn-vfs-mailbox-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-vfs-mailbox.c b/build/src/mn-vfs-mailbox.c
@@ -1,809 +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-vfs-mailbox.h"
-
-#include "mn-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 34 "src/mn-vfs-mailbox.gob"
-
-#include <glib/gi18n.h>
-#include "mn-mailbox-private.h"
-#include "mn-reentrant-mailbox-private.h"
-#if WITH_MBOX
-#include "mn-mbox-mailbox-backend.h"
-#endif
-#if WITH_MOZILLA
-#include "mn-mozilla-mailbox-backend.h"
-#endif
-#if WITH_MH
-#include "mn-mh-mailbox-backend.h"
-#endif
-#if WITH_MAILDIR
-#include "mn-maildir-mailbox-backend.h"
-#endif
-#if WITH_SYLPHEED
-#include "mn-sylpheed-mailbox-backend.h"
-#endif
-#include "mn-vfs-mailbox-backend-private.h"
-#include "mn-vfs.h"
-#include "mn-stock.h"
-#include "mn-conf.h"
-#include "mn-util.h"
-#include "mn-locked-callback.h"
-
-GType mn_vfs_mailbox_backend_types[MN_VFS_MAILBOX_MAX_BACKEND_TYPES + 1];
-
-typedef struct
-{
- char *uri;
- MNVFSMailboxBackend *owner;
- GnomeVFSMonitorType type;
- GnomeVFSMonitorCallback callback;
- gpointer user_data;
-
- GnomeVFSResult result;
- GnomeVFSMonitorHandle *handle;
-} Monitor;
-
-#line 67 "mn-vfs-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_VFS_MAILBOX(x)
-#define SELF_CONST(x) MN_VFS_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_VFS_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_VFS_MAILBOX
-#define SELF_CLASS(x) MN_VFS_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_VFS_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNVFSMailbox Self;
-typedef MNVFSMailboxClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-vfs-mailbox.gob"
-static void mn_vfs_mailbox_init (MNVFSMailbox * o) G_GNUC_UNUSED;
-#line 84 "mn-vfs-mailbox.c"
-#line 115 "src/mn-vfs-mailbox.gob"
-static void mn_vfs_mailbox_class_init (MNVFSMailboxClass * class) G_GNUC_UNUSED;
-#line 87 "mn-vfs-mailbox.c"
-#line 125 "src/mn-vfs-mailbox.gob"
-static void mn_vfs_mailbox_constructor (MNVFSMailbox * self) G_GNUC_UNUSED;
-#line 90 "mn-vfs-mailbox.c"
-#line 131 "src/mn-vfs-mailbox.gob"
-static void mn_vfs_mailbox_dispose (MNVFSMailbox * self) G_GNUC_UNUSED;
-#line 93 "mn-vfs-mailbox.c"
-#line 141 "src/mn-vfs-mailbox.gob"
-static void ___5_mn_vfs_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 96 "mn-vfs-mailbox.c"
-#line 176 "src/mn-vfs-mailbox.gob"
-static Monitor * mn_vfs_mailbox_find_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailboxBackend * owner, GnomeVFSMonitorType type, GnomeVFSMonitorCallback callback, gpointer user_data) G_GNUC_UNUSED;
-#line 99 "mn-vfs-mailbox.c"
-#line 243 "src/mn-vfs-mailbox.gob"
-static void mn_vfs_mailbox_monitor_free (Monitor * monitor) G_GNUC_UNUSED;
-#line 102 "mn-vfs-mailbox.c"
-#line 254 "src/mn-vfs-mailbox.gob"
-static void mn_vfs_mailbox_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data) G_GNUC_UNUSED;
-#line 105 "mn-vfs-mailbox.c"
-#line 315 "src/mn-vfs-mailbox.gob"
-static void mn_vfs_mailbox_queue_update_poll (MNVFSMailbox * self) G_GNUC_UNUSED;
-#line 108 "mn-vfs-mailbox.c"
-#line 322 "src/mn-vfs-mailbox.gob"
-static gboolean mn_vfs_mailbox_update_poll_cb (gpointer data) G_GNUC_UNUSED;
-#line 111 "mn-vfs-mailbox.c"
-#line 352 "src/mn-vfs-mailbox.gob"
-static void ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox, int check_id) G_GNUC_UNUSED;
-#line 114 "mn-vfs-mailbox.c"
-
-/* pointer to the class of our parent */
-static MNReentrantMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_init_types mn_vfs_mailbox_init_types
-#define self_find_monitor mn_vfs_mailbox_find_monitor
-#define self_monitor mn_vfs_mailbox_monitor
-#define self_monitor_free mn_vfs_mailbox_monitor_free
-#define self_monitor_cb mn_vfs_mailbox_monitor_cb
-#define self_remove_monitors_by_owner mn_vfs_mailbox_remove_monitors_by_owner
-#define self_queue_update_poll mn_vfs_mailbox_queue_update_poll
-#define self_update_poll_cb mn_vfs_mailbox_update_poll_cb
-#define self_lock mn_vfs_mailbox_lock
-#define self_unlock mn_vfs_mailbox_unlock
-GType
-mn_vfs_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNVFSMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_vfs_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNVFSMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_vfs_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_REENTRANT_MAILBOX, "MNVFSMailbox", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNVFSMailbox *)g_object_new(mn_vfs_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNVFSMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNVFSMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNVFSMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNVFSMailbox *)g_object_new_valist (mn_vfs_mailbox_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:VFS:Mailbox::constructor"
- GObject *obj_self;
- MNVFSMailbox *self;
- obj_self = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
- self = MN_VFS_MAILBOX (obj_self);
-#line 125 "src/mn-vfs-mailbox.gob"
- mn_vfs_mailbox_constructor (self);
-#line 183 "mn-vfs-mailbox.c"
- return obj_self;
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::dispose"
- MNVFSMailbox *self G_GNUC_UNUSED = MN_VFS_MAILBOX (obj_self);
-#line 131 "src/mn-vfs-mailbox.gob"
- mn_vfs_mailbox_dispose (self);
-#line 196 "mn-vfs-mailbox.c"
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 78 "src/mn-vfs-mailbox.gob"
- if(self->vfs_uri) { gnome_vfs_uri_unref ((gpointer) self->vfs_uri); self->vfs_uri = NULL; }
-#line 201 "mn-vfs-mailbox.c"
-#line 81 "src/mn-vfs-mailbox.gob"
- if(self->_priv->backend) { g_object_unref ((gpointer) self->_priv->backend); self->_priv->backend = NULL; }
-#line 204 "mn-vfs-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::finalize"
- MNVFSMailbox *self G_GNUC_UNUSED = MN_VFS_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 77 "src/mn-vfs-mailbox.gob"
- if(self->uri) { g_free ((gpointer) self->uri); self->uri = NULL; }
-#line 219 "mn-vfs-mailbox.c"
-#line 84 "src/mn-vfs-mailbox.gob"
- if(self->_priv->mutex) { g_mutex_free ((gpointer) self->_priv->mutex); self->_priv->mutex = NULL; }
-#line 222 "mn-vfs-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_vfs_mailbox_init (MNVFSMailbox * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_VFS_MAILBOX,MNVFSMailboxPrivate);
-#line 84 "src/mn-vfs-mailbox.gob"
- o->_priv->mutex = g_mutex_new();
-#line 233 "mn-vfs-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-#line 115 "src/mn-vfs-mailbox.gob"
-static void
-mn_vfs_mailbox_class_init (MNVFSMailboxClass * class G_GNUC_UNUSED)
-{
-#line 240 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
- MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)class;
- MNReentrantMailboxClass *mn_reentrant_mailbox_class = (MNReentrantMailboxClass *)class;
-
- g_type_class_add_private(class,sizeof(MNVFSMailboxPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_REENTRANT_MAILBOX);
-
-#line 141 "src/mn-vfs-mailbox.gob"
- mn_mailbox_class->seal = ___5_mn_vfs_mailbox_seal;
-#line 352 "src/mn-vfs-mailbox.gob"
- mn_reentrant_mailbox_class->reentrant_check = ___d_mn_vfs_mailbox_reentrant_check;
-#line 254 "mn-vfs-mailbox.c"
- g_object_class->constructor = ___constructor;
- g_object_class->dispose = ___dispose;
- g_object_class->finalize = ___finalize;
- {
-#line 116 "src/mn-vfs-mailbox.gob"
-
- /*
- * Most VFS mailboxes will probably be local files, or remote
- * files located in the same LAN. We therefore choose a small
- * default check delay (1 minute).
- */
- MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 1;
-
-#line 268 "mn-vfs-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-#line 86 "src/mn-vfs-mailbox.gob"
-void
-mn_vfs_mailbox_init_types (void)
-{
-#line 278 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::init_types"
-{
-#line 88 "src/mn-vfs-mailbox.gob"
-
- int i = 0;
-
-#if WITH_MBOX
- mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MBOX_MAILBOX_BACKEND;
-#endif
-#if WITH_MOZILLA
- mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MOZILLA_MAILBOX_BACKEND;
-#endif
- /*
- * Claws Mail mailboxes contain both a .sylpheed_mark and a
- * .mh_sequences file. List the Sylpheed backend first, in order
- * to treat them as Sylpheed mailboxes. This way, the need to use
- * rcvstore from procmail is removed.
- */
-#if WITH_SYLPHEED
- mn_vfs_mailbox_backend_types[i++] = MN_TYPE_SYLPHEED_MAILBOX_BACKEND;
-#endif
-#if WITH_MH
- mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MH_MAILBOX_BACKEND;
-#endif
-#if WITH_MAILDIR
- mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MAILDIR_MAILBOX_BACKEND;
-#endif
- mn_vfs_mailbox_backend_types[i] = 0;
- }}
-#line 308 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-
-#line 125 "src/mn-vfs-mailbox.gob"
-static void
-mn_vfs_mailbox_constructor (MNVFSMailbox * self G_GNUC_UNUSED)
-{
-#line 316 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::constructor"
-{
-#line 126 "src/mn-vfs-mailbox.gob"
-
- /* set default poll to the most likely value */
- mn_mailbox_set_poll(MN_MAILBOX(self), FALSE);
- }}
-#line 324 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 131 "src/mn-vfs-mailbox.gob"
-static void
-mn_vfs_mailbox_dispose (MNVFSMailbox * self G_GNUC_UNUSED)
-{
-#line 331 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::dispose"
-{
-#line 132 "src/mn-vfs-mailbox.gob"
-
- /*
- * We are no longer operational after dispose (see unrefwith
- * above), so we must remove our monitors.
- */
- mn_source_clear(&selfp->update_poll_id);
- mn_g_slist_clear_deep_custom(&selfp->monitors, (GFunc) self_monitor_free, NULL);
- }}
-#line 343 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 141 "src/mn-vfs-mailbox.gob"
-static void
-___5_mn_vfs_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 349 "mn-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:VFS:Mailbox::seal"
-{
-#line 143 "src/mn-vfs-mailbox.gob"
-
- Self *self = SELF(mailbox);
-
- PARENT_HANDLER(mailbox);
-
- if (self->uri)
- {
- self->vfs_uri = gnome_vfs_uri_new(self->uri);
-
- if (! mailbox->stock_id && self->vfs_uri && ! gnome_vfs_uri_is_local(self->vfs_uri))
- mn_mailbox_set_stock_id(mailbox, MN_STOCK_REMOTE);
-
- if (! mailbox->runtime_name)
- {
- char *path;
-
- path = gnome_vfs_get_local_path_from_uri(self->uri);
- if (path)
- {
- mailbox->runtime_name = g_filename_display_name(path);
- g_free(path);
- }
- else
- mailbox->runtime_name = self->vfs_uri
- ? gnome_vfs_uri_to_string(self->vfs_uri, GNOME_VFS_URI_HIDE_PASSWORD)
- : g_strdup(self->uri);
- }
- }
-
- if (! mailbox->stock_id)
- mn_mailbox_set_stock_id(mailbox, MN_STOCK_LOCAL);
- }}
-#line 389 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 176 "src/mn-vfs-mailbox.gob"
-static Monitor *
-mn_vfs_mailbox_find_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailboxBackend * owner, GnomeVFSMonitorType type, GnomeVFSMonitorCallback callback, gpointer user_data)
-{
-#line 397 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::find_monitor"
-#line 176 "src/mn-vfs-mailbox.gob"
- g_return_val_if_fail (self != NULL, (Monitor * )0);
-#line 176 "src/mn-vfs-mailbox.gob"
- g_return_val_if_fail (MN_IS_VFS_MAILBOX (self), (Monitor * )0);
-#line 176 "src/mn-vfs-mailbox.gob"
- g_return_val_if_fail (uri != NULL, (Monitor * )0);
-#line 405 "mn-vfs-mailbox.c"
-{
-#line 183 "src/mn-vfs-mailbox.gob"
-
- GSList *l;
-
- MN_LIST_FOREACH(l, selfp->monitors)
- {
- Monitor *monitor = l->data;
-
- if (monitor->owner == owner
- && monitor->type == type
- && monitor->callback == callback
- && monitor->user_data == user_data
- && ! strcmp(monitor->uri, uri))
- return monitor;
- }
-
- return NULL;
- }}
-#line 425 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 201 "src/mn-vfs-mailbox.gob"
-void
-mn_vfs_mailbox_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailboxBackend * owner, GnomeVFSMonitorType type, GnomeVFSMonitorCallback callback, gpointer user_data)
-{
-#line 432 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::monitor"
-#line 201 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 201 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX (self));
-#line 201 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (uri != NULL);
-#line 440 "mn-vfs-mailbox.c"
-{
-#line 208 "src/mn-vfs-mailbox.gob"
-
- Monitor *monitor;
-
- g_return_if_fail(owner == NULL || MN_IS_VFS_MAILBOX_BACKEND(owner));
-
- monitor = self_find_monitor(self, uri, owner, type, callback, user_data);
- if (! monitor)
- {
- monitor = g_new0(Monitor, 1);
- monitor->uri = g_strdup(uri);
- monitor->owner = owner;
- monitor->type = type;
- monitor->callback = callback;
- monitor->user_data = user_data;
- monitor->result = -1;
-
- selfp->monitors = g_slist_append(selfp->monitors, monitor);
- }
-
- if (monitor->result != GNOME_VFS_OK)
- {
- GnomeVFSResult result;
-
- result = mn_gnome_vfs_monitor_add_locked(&monitor->handle, uri, type, callback, user_data);
- if (result != monitor->result)
- {
- monitor->result = result;
- if (result != GNOME_VFS_OK)
- mn_mailbox_warning(MN_MAILBOX(self), _("unable to monitor %s (%s), poll mode activated"), uri, gnome_vfs_result_to_string(result));
-
- self_queue_update_poll(self);
- }
- }
- }}
-#line 477 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 243 "src/mn-vfs-mailbox.gob"
-static void
-mn_vfs_mailbox_monitor_free (Monitor * monitor)
-{
-#line 484 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::monitor_free"
-#line 243 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (monitor != NULL);
-#line 488 "mn-vfs-mailbox.c"
-{
-#line 245 "src/mn-vfs-mailbox.gob"
-
- g_free(monitor->uri);
-
- if (monitor->result == GNOME_VFS_OK)
- mn_gnome_vfs_monitor_cancel_locked(monitor->handle);
-
- g_free(monitor);
- }}
-#line 499 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 254 "src/mn-vfs-mailbox.gob"
-static void
-mn_vfs_mailbox_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data)
-{
-#line 506 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::monitor_cb"
-{
-#line 260 "src/mn-vfs-mailbox.gob"
-
- if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
- || event_type == GNOME_VFS_MONITOR_EVENT_DELETED
- || event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
- {
- Self *self = user_data;
- MNVFSMailboxBackend *backend;
-
- /*
- * Queue a check to detect if the mailbox type has changed. If
- * the mailbox has a backend, we must use
- * mn_vfs_mailbox_backend_queue_check() (which respects the
- * check_latency member of MNVFSMailboxBackend) in order to
- * avoid race conditions.
- */
-
- self_lock(self);
-
- backend = selfp->backend;
- if (backend)
- mn_vfs_mailbox_backend_queue_check(backend);
-
- self_unlock(self);
-
- /*
- * Note that at this point, we have released the lock and the
- * backend might have been finalized by another thread: we can
- * only test the nullity of the pointer.
- */
- if (! backend)
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self));
- }
- }}
-#line 543 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 294 "src/mn-vfs-mailbox.gob"
-void
-mn_vfs_mailbox_remove_monitors_by_owner (MNVFSMailbox * self, MNVFSMailboxBackend * owner)
-{
-#line 550 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::remove_monitors_by_owner"
-#line 294 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 294 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX (self));
-#line 556 "mn-vfs-mailbox.c"
-{
-#line 296 "src/mn-vfs-mailbox.gob"
-
- GSList *l;
-
- g_return_if_fail(owner == NULL || MN_IS_VFS_MAILBOX_BACKEND(owner));
-
- start:
- MN_LIST_FOREACH(l, selfp->monitors)
- {
- Monitor *monitor = l->data;
-
- if (monitor->owner == owner)
- {
- selfp->monitors = mn_g_slist_delete_link_deep_custom(selfp->monitors, l, (GFunc) self_monitor_free, NULL);
- self_queue_update_poll(self);
- goto start;
- }
- }
- }}
-#line 577 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 315 "src/mn-vfs-mailbox.gob"
-static void
-mn_vfs_mailbox_queue_update_poll (MNVFSMailbox * self)
-{
-#line 584 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::queue_update_poll"
-#line 315 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 315 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX (self));
-#line 590 "mn-vfs-mailbox.c"
-{
-#line 317 "src/mn-vfs-mailbox.gob"
-
- if (! selfp->update_poll_id)
- selfp->update_poll_id = gdk_threads_add_idle(self_update_poll_cb, self);
- }}
-#line 597 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 322 "src/mn-vfs-mailbox.gob"
-static gboolean
-mn_vfs_mailbox_update_poll_cb (gpointer data)
-{
-#line 604 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::update_poll_cb"
-{
-#line 324 "src/mn-vfs-mailbox.gob"
-
- Self *self = data;
- gboolean polled = FALSE;
- GSList *l;
-
- self_lock(self);
-
- MN_LIST_FOREACH(l, selfp->monitors)
- {
- Monitor *monitor = l->data;
-
- if (monitor->result != GNOME_VFS_OK)
- {
- polled = TRUE;
- break;
- }
- }
-
- selfp->update_poll_id = 0;
-
- self_unlock(self);
-
- if (mn_mailbox_get_poll(MN_MAILBOX(self)) != polled)
- mn_mailbox_set_poll(MN_MAILBOX(self), polled);
-
- return FALSE; /* remove source */
- }}
-#line 635 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 352 "src/mn-vfs-mailbox.gob"
-static void
-___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED, int check_id)
-#line 641 "mn-vfs-mailbox.c"
-#define PARENT_HANDLER(___mailbox,___check_id) \
- { if(MN_REENTRANT_MAILBOX_CLASS(parent_class)->reentrant_check) \
- (* MN_REENTRANT_MAILBOX_CLASS(parent_class)->reentrant_check)(___mailbox,___check_id); }
-{
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::reentrant_check"
-{
-#line 354 "src/mn-vfs-mailbox.gob"
-
- Self *self = SELF(mailbox);
- MNVFSMailboxBackend *backend;
- MNVFSMailboxBackendClass *class;
- GType backend_type = 0;
- gboolean exists;
-
- self_lock(self);
-
- /*
- * Install the monitors that detect a mailbox type change. These
- * monitors are not meant to detect if the mail status of a
- * mailbox changes (it is the responsability of the backend),
- * although they will do so with some mailbox formats.
- *
- * For properly detecting the new mailbox type when the file or
- * directory changes we need install both a file and a directory
- * monitor, since depending on the underlying implementation we
- * might not get file events if the URI is a directory, etc.
- */
- self_monitor(self, self->uri, NULL, GNOME_VFS_MONITOR_FILE, self_monitor_cb, self);
- self_monitor(self, self->uri, NULL, GNOME_VFS_MONITOR_DIRECTORY, self_monitor_cb, self);
-
- backend = selfp->backend;
- if (backend)
- g_object_ref(backend);
-
- self_unlock(self);
-
- class = backend ? MN_VFS_MAILBOX_BACKEND_GET_CLASS(backend) : NULL;
- if (class && class->is(NULL, class, self))
- backend_type = G_OBJECT_TYPE(backend);
- else
- {
- exists = mn_vfs_test(self->vfs_uri, G_FILE_TEST_EXISTS);
- if (exists)
- {
- int i;
-
- for (i = 0; mn_vfs_mailbox_backend_types[i]; i++)
- {
- class = g_type_class_peek(mn_vfs_mailbox_backend_types[i]);
- g_assert(class != NULL);
-
- if (class->is(NULL, class, self))
- {
- backend_type = mn_vfs_mailbox_backend_types[i];
- break;
- }
-
- if (mn_reentrant_mailbox_check_aborted(mailbox, check_id))
- goto end;
- }
- }
- }
-
- if (! backend || backend_type != G_OBJECT_TYPE(backend))
- {
- MNVFSMailboxBackend *new_backend = NULL;
-
- if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
- {
- GDK_THREADS_ENTER();
-
- if (backend_type)
- {
- new_backend = g_object_new(backend_type, MN_VFS_MAILBOX_BACKEND_PROP_MAILBOX(self), NULL);
- mn_mailbox_set_format(MN_MAILBOX(self), (char *) MN_VFS_MAILBOX_BACKEND_GET_CLASS(new_backend)->format);
- }
- else
- {
- mn_mailbox_set_format(MN_MAILBOX(self), NULL);
- mn_mailbox_set_error(MN_MAILBOX(self), exists ? _("unknown mailbox format") : _("does not exist"));
- }
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
-
- self_lock(self);
-
- if (backend)
- {
- g_object_unref(backend);
- backend = NULL;
- }
-
- if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
- {
- if (selfp->backend)
- {
- g_object_unref(selfp->backend);
- selfp->backend = NULL;
- }
-
- if (new_backend)
- {
- selfp->backend = backend = new_backend;
- new_backend = NULL;
-
- g_object_ref(backend);
- }
- }
-
- self_unlock(self);
-
- if (new_backend)
- g_object_unref(new_backend);
- }
-
- if (backend)
- mn_vfs_mailbox_backend_check(backend, check_id);
-
- end:
- if (backend)
- {
- self_lock(self);
- g_object_unref(backend);
- self_unlock(self);
- }
- }}
-#line 770 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 476 "src/mn-vfs-mailbox.gob"
-void
-mn_vfs_mailbox_lock (MNVFSMailbox * self)
-{
-#line 778 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::lock"
-#line 476 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 476 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX (self));
-#line 784 "mn-vfs-mailbox.c"
-{
-#line 478 "src/mn-vfs-mailbox.gob"
-
- g_mutex_lock(selfp->mutex);
- }}
-#line 790 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 482 "src/mn-vfs-mailbox.gob"
-void
-mn_vfs_mailbox_unlock (MNVFSMailbox * self)
-{
-#line 797 "mn-vfs-mailbox.c"
-#define __GOB_FUNCTION__ "MN:VFS:Mailbox::unlock"
-#line 482 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 482 "src/mn-vfs-mailbox.gob"
- g_return_if_fail (MN_IS_VFS_MAILBOX (self));
-#line 803 "mn-vfs-mailbox.c"
-{
-#line 484 "src/mn-vfs-mailbox.gob"
-
- g_mutex_unlock(selfp->mutex);
- }}
-#line 809 "mn-vfs-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-vfs-mailbox.gob.stamp b/build/src/mn-vfs-mailbox.gob.stamp
diff --git a/build/src/mn-vfs-mailbox.h b/build/src/mn-vfs-mailbox.h
@@ -1,80 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <libgnomevfs/gnome-vfs.h>
-#include "mn-reentrant-mailbox.h"
-
-#ifndef __MN_VFS_MAILBOX_H__
-#define __MN_VFS_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-
-#define MN_VFS_MAILBOX_MAX_BACKEND_TYPES 5
-extern GType mn_vfs_mailbox_backend_types[MN_VFS_MAILBOX_MAX_BACKEND_TYPES + 1];
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_VFS_MAILBOX (mn_vfs_mailbox_get_type())
-#define MN_VFS_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_vfs_mailbox_get_type(), MNVFSMailbox)
-#define MN_VFS_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_vfs_mailbox_get_type(), MNVFSMailbox const)
-#define MN_VFS_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_vfs_mailbox_get_type(), MNVFSMailboxClass)
-#define MN_IS_VFS_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_vfs_mailbox_get_type ())
-
-#define MN_VFS_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_vfs_mailbox_get_type(), MNVFSMailboxClass)
-
-/* Private structure type */
-typedef struct _MNVFSMailboxPrivate MNVFSMailboxPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_VFS_MAILBOX__
-#define __TYPEDEF_MN_VFS_MAILBOX__
-typedef struct _MNVFSMailbox MNVFSMailbox;
-#endif
-struct _MNVFSMailbox {
- MNReentrantMailbox __parent__;
- /*< public >*/
- char * uri;
- GnomeVFSURI * vfs_uri;
- /*< private >*/
- MNVFSMailboxPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNVFSMailboxClass MNVFSMailboxClass;
-struct _MNVFSMailboxClass {
- MNReentrantMailboxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_vfs_mailbox_get_type (void) G_GNUC_CONST;
-#line 86 "src/mn-vfs-mailbox.gob"
-void mn_vfs_mailbox_init_types (void);
-#line 69 "mn-vfs-mailbox.h"
-#line 476 "src/mn-vfs-mailbox.gob"
-void mn_vfs_mailbox_lock (MNVFSMailbox * self);
-#line 72 "mn-vfs-mailbox.h"
-#line 482 "src/mn-vfs-mailbox.gob"
-void mn_vfs_mailbox_unlock (MNVFSMailbox * self);
-#line 75 "mn-vfs-mailbox.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-vfs-message-private.h b/build/src/mn-vfs-message-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_VFS_MESSAGE_PRIVATE_H__
-#define __MN_VFS_MESSAGE_PRIVATE_H__
-
-#include "mn-vfs-message.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-vfs-message.c b/build/src/mn-vfs-message.c
@@ -1,306 +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-vfs-message.h"
-
-#include "mn-vfs-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 26 "src/mn-vfs-message.gob"
-
-#include "mn-vfs-mailbox-backend.h"
-#include "mn-message-mime.h"
-#include "mn-util.h"
-
-#line 32 "mn-vfs-message.c"
-/* self casting macros */
-#define SELF(x) MN_VFS_MESSAGE(x)
-#define SELF_CONST(x) MN_VFS_MESSAGE_CONST(x)
-#define IS_SELF(x) MN_IS_VFS_MESSAGE(x)
-#define TYPE_SELF MN_TYPE_VFS_MESSAGE
-#define SELF_CLASS(x) MN_VFS_MESSAGE_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_VFS_MESSAGE_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNVFSMessage Self;
-typedef MNVFSMessageClass 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-vfs-message.gob"
-static void mn_vfs_message_init (MNVFSMessage * o) G_GNUC_UNUSED;
-#line 51 "mn-vfs-message.c"
-#line 0 "src/mn-vfs-message.gob"
-static void mn_vfs_message_class_init (MNVFSMessageClass * c) G_GNUC_UNUSED;
-#line 54 "mn-vfs-message.c"
-
-enum {
- PROP_0,
- PROP_VFS_URI
-};
-
-/* pointer to the class of our parent */
-static MNMessageClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_new mn_vfs_message_new
-#define self_new_from_message mn_vfs_message_new_from_message
-GType
-mn_vfs_message_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNVFSMessageClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_vfs_message_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNVFSMessage),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_vfs_message_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_MESSAGE, "MNVFSMessage", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNVFSMessage *)g_object_new(mn_vfs_message_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNVFSMessage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNVFSMessage *
-GET_NEW_VARG (const char *first, ...)
-{
- MNVFSMessage *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNVFSMessage *)g_object_new_valist (mn_vfs_message_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Message::dispose"
- MNVFSMessage *self G_GNUC_UNUSED = MN_VFS_MESSAGE (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 35 "src/mn-vfs-message.gob"
- if(self->vfs_uri) { gnome_vfs_uri_unref ((gpointer) self->vfs_uri); self->vfs_uri = NULL; }
-#line 119 "mn-vfs-message.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_vfs_message_init (MNVFSMessage * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Message::init"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_vfs_message_class_init (MNVFSMessageClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:VFS:Message::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- parent_class = g_type_class_ref (MN_TYPE_MESSAGE);
-
- g_object_class->dispose = ___dispose;
- 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
- ("vfs_uri" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_VFS_URI,
- 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:VFS:Message::set_property"
-{
- MNVFSMessage *self G_GNUC_UNUSED;
-
- self = MN_VFS_MESSAGE (object);
-
- switch (property_id) {
- case PROP_VFS_URI:
- {
-#line 38 "src/mn-vfs-message.gob"
-
- GnomeVFSURI *uri;
-
- g_assert(self->vfs_uri == NULL);
-
- uri = g_value_get_pointer(VAL);
- if (uri)
- self->vfs_uri = gnome_vfs_uri_ref(uri);
-
-#line 179 "mn-vfs-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:VFS:Message::get_property"
-{
- MNVFSMessage *self G_GNUC_UNUSED;
-
- self = MN_VFS_MESSAGE (object);
-
- switch (property_id) {
- case PROP_VFS_URI:
- {
-#line 48 "src/mn-vfs-message.gob"
-
- g_value_set_pointer(VAL, self->vfs_uri != NULL ? gnome_vfs_uri_ref(self->vfs_uri) : NULL);
-
-#line 212 "mn-vfs-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 52 "src/mn-vfs-message.gob"
-MNVFSMessage *
-mn_vfs_message_new (GType type, MNVFSMailboxBackend * backend, const char * mid, GnomeVFSURI * dir_uri, const char * filename, MNMessageFlags flags, gboolean handle_status, GError ** err)
-{
-#line 233 "mn-vfs-message.c"
-#define __GOB_FUNCTION__ "MN:VFS:Message::new"
-#line 52 "src/mn-vfs-message.gob"
- g_return_val_if_fail (backend != NULL, (MNVFSMessage * )0);
-#line 52 "src/mn-vfs-message.gob"
- g_return_val_if_fail (MN_IS_VFS_MAILBOX_BACKEND (backend), (MNVFSMessage * )0);
-#line 52 "src/mn-vfs-message.gob"
- g_return_val_if_fail (dir_uri != NULL, (MNVFSMessage * )0);
-#line 52 "src/mn-vfs-message.gob"
- g_return_val_if_fail (filename != NULL, (MNVFSMessage * )0);
-#line 243 "mn-vfs-message.c"
-{
-#line 61 "src/mn-vfs-message.gob"
-
- GnomeVFSURI *message_uri;
- MNVFSMessage *message;
-
- message_uri = gnome_vfs_uri_append_file_name(dir_uri, filename);
-
- message = MN_VFS_MESSAGE(mn_message_new_from_uri_full(type,
- MN_MAILBOX(MN_VFS_MAILBOX_BACKEND(backend)->mailbox),
- mid,
- message_uri,
- flags,
- handle_status,
- err));
-
- if (message)
- message->vfs_uri = gnome_vfs_uri_ref(message_uri);
-
- gnome_vfs_uri_unref(message_uri);
-
- return message;
- }}
-#line 267 "mn-vfs-message.c"
-#undef __GOB_FUNCTION__
-
-#line 83 "src/mn-vfs-message.gob"
-MNVFSMessage *
-mn_vfs_message_new_from_message (MNVFSMessage * message, GnomeVFSURI * dir_uri, const char * filename, MNMessageFlags flags)
-{
-#line 274 "mn-vfs-message.c"
-#define __GOB_FUNCTION__ "MN:VFS:Message::new_from_message"
-#line 83 "src/mn-vfs-message.gob"
- g_return_val_if_fail (message != NULL, (MNVFSMessage * )0);
-#line 83 "src/mn-vfs-message.gob"
- g_return_val_if_fail (MN_IS_VFS_MESSAGE (message), (MNVFSMessage * )0);
-#line 83 "src/mn-vfs-message.gob"
- g_return_val_if_fail (dir_uri != NULL, (MNVFSMessage * )0);
-#line 83 "src/mn-vfs-message.gob"
- g_return_val_if_fail (filename != NULL, (MNVFSMessage * )0);
-#line 284 "mn-vfs-message.c"
-{
-#line 88 "src/mn-vfs-message.gob"
-
- GnomeVFSURI *message_uri;
- char *message_text_uri;
- MNVFSMessage *new_message;
-
- message_uri = gnome_vfs_uri_append_file_name(dir_uri, filename);
- message_text_uri = gnome_vfs_uri_to_string(message_uri, GNOME_VFS_URI_HIDE_NONE);
-
- new_message = mn_g_object_clone(message,
- MN_MESSAGE_PROP_URI((char *) message_text_uri),
- MN_MESSAGE_PROP_FLAGS(flags),
- MN_VFS_MESSAGE_PROP_VFS_URI(message_uri),
- NULL);
-
- gnome_vfs_uri_unref(message_uri);
- g_free(message_text_uri);
-
- return new_message;
- }}
-#line 306 "mn-vfs-message.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-vfs-message.gob.stamp b/build/src/mn-vfs-message.gob.stamp
diff --git a/build/src/mn-vfs-message.h b/build/src/mn-vfs-message.h
@@ -1,89 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <libgnomevfs/gnome-vfs.h>
-#include "mn-message.h"
-#include "mn-decls.h"
-
-#ifndef __MN_VFS_MESSAGE_H__
-#define __MN_VFS_MESSAGE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_VFS_MESSAGE (mn_vfs_message_get_type())
-#define MN_VFS_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_vfs_message_get_type(), MNVFSMessage)
-#define MN_VFS_MESSAGE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_vfs_message_get_type(), MNVFSMessage const)
-#define MN_VFS_MESSAGE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_vfs_message_get_type(), MNVFSMessageClass)
-#define MN_IS_VFS_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_vfs_message_get_type ())
-
-#define MN_VFS_MESSAGE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_vfs_message_get_type(), MNVFSMessageClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_VFS_MESSAGE__
-#define __TYPEDEF_MN_VFS_MESSAGE__
-typedef struct _MNVFSMessage MNVFSMessage;
-#endif
-struct _MNVFSMessage {
- MNMessage __parent__;
- /*< private >*/
- GnomeVFSURI * vfs_uri; /* protected */
-};
-
-/*
- * Class definition
- */
-typedef struct _MNVFSMessageClass MNVFSMessageClass;
-struct _MNVFSMessageClass {
- MNMessageClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_vfs_message_get_type (void) G_GNUC_CONST;
-#line 52 "src/mn-vfs-message.gob"
-MNVFSMessage * mn_vfs_message_new (GType type,
- MNVFSMailboxBackend * backend,
- const char * mid,
- GnomeVFSURI * dir_uri,
- const char * filename,
- MNMessageFlags flags,
- gboolean handle_status,
- GError ** err);
-#line 66 "mn-vfs-message.h"
-#line 83 "src/mn-vfs-message.gob"
-MNVFSMessage * mn_vfs_message_new_from_message (MNVFSMessage * message,
- GnomeVFSURI * dir_uri,
- const char * filename,
- MNMessageFlags flags);
-#line 72 "mn-vfs-message.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_VFS_MESSAGE_PROP_VFS_URI(arg) "vfs_uri", __extension__ ({GnomeVFSURI * z = (arg); z;})
-#define MN_VFS_MESSAGE_GET_PROP_VFS_URI(arg) "vfs_uri", __extension__ ({GnomeVFSURI * *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_VFS_MESSAGE_PROP_VFS_URI(arg) "vfs_uri",(GnomeVFSURI * )(arg)
-#define MN_VFS_MESSAGE_GET_PROP_VFS_URI(arg) "vfs_uri",(GnomeVFSURI * *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-webmail-mailbox-private.h b/build/src/mn-webmail-mailbox-private.h
@@ -1,35 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_WEBMAIL_MAILBOX_PRIVATE_H__
-#define __MN_WEBMAIL_MAILBOX_PRIVATE_H__
-
-#include "mn-webmail-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#line 65 "src/mn-webmail-mailbox.gob"
-void mn_webmail_mailbox_parse_username (MNWebmailMailbox * self, char ** username, char ** domain);
-#line 15 "mn-webmail-mailbox-private.h"
-#line 101 "src/mn-webmail-mailbox.gob"
-char * mn_webmail_mailbox_create_spool_file (GError ** err);
-#line 18 "mn-webmail-mailbox-private.h"
-#line 116 "src/mn-webmail-mailbox.gob"
-char * mn_webmail_mailbox_write_temporary_file (const char * contents, const char * encoding, GError ** err);
-#line 21 "mn-webmail-mailbox-private.h"
-#line 189 "src/mn-webmail-mailbox.gob"
-void mn_webmail_mailbox_print_config (MNWebmailMailbox * self, const char * config);
-#line 24 "mn-webmail-mailbox-private.h"
-#line 208 "src/mn-webmail-mailbox.gob"
-gboolean mn_webmail_mailbox_run_helper (MNWebmailMailbox * self, const char * name, const char * command, GError ** err);
-#line 27 "mn-webmail-mailbox-private.h"
-#line 265 "src/mn-webmail-mailbox.gob"
-gboolean mn_webmail_mailbox_read_spool_file (MNWebmailMailbox * self, const char * spool_file, GError ** err);
-#line 30 "mn-webmail-mailbox-private.h"
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-webmail-mailbox-properties-private.h b/build/src/mn-webmail-mailbox-properties-private.h
@@ -1,26 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_WEBMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
-#define __MN_WEBMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
-
-#include "mn-webmail-mailbox-properties.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct _MNWebmailMailboxPropertiesPrivate {
-#line 35 "src/mn-webmail-mailbox-properties.gob"
- GtkWidget * inbox_radio;
-#line 36 "src/mn-webmail-mailbox-properties.gob"
- GtkWidget * other_radio;
-#line 37 "src/mn-webmail-mailbox-properties.gob"
- GtkWidget * folder_entry;
-#line 20 "mn-webmail-mailbox-properties-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-webmail-mailbox-properties.c b/build/src/mn-webmail-mailbox-properties.c
@@ -1,367 +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-webmail-mailbox-properties.h"
-
-#include "mn-webmail-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-webmail-mailbox-properties.gob"
-
-#include <glib/gi18n.h>
-#include "mn-webmail-mailbox.h"
-#include "mn-mailbox-properties-private.h"
-#include "mn-authenticated-mailbox-properties-private.h"
-#include "mn-util.h"
-
-#line 34 "mn-webmail-mailbox-properties.c"
-/* self casting macros */
-#define SELF(x) MN_WEBMAIL_MAILBOX_PROPERTIES(x)
-#define SELF_CONST(x) MN_WEBMAIL_MAILBOX_PROPERTIES_CONST(x)
-#define IS_SELF(x) MN_IS_WEBMAIL_MAILBOX_PROPERTIES(x)
-#define TYPE_SELF MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES
-#define SELF_CLASS(x) MN_WEBMAIL_MAILBOX_PROPERTIES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_WEBMAIL_MAILBOX_PROPERTIES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNWebmailMailboxProperties Self;
-typedef MNWebmailMailboxPropertiesClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-#line 0 "src/mn-webmail-mailbox-properties.gob"
-static void mn_webmail_mailbox_properties_class_init (MNWebmailMailboxPropertiesClass * c) G_GNUC_UNUSED;
-#line 52 "mn-webmail-mailbox-properties.c"
-#line 81 "src/mn-webmail-mailbox-properties.gob"
-static void mn_webmail_mailbox_properties_init (MNWebmailMailboxProperties * self) G_GNUC_UNUSED;
-#line 55 "mn-webmail-mailbox-properties.c"
-#line 131 "src/mn-webmail-mailbox-properties.gob"
-static void mn_webmail_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) G_GNUC_UNUSED;
-#line 58 "mn-webmail-mailbox-properties.c"
-#line 142 "src/mn-webmail-mailbox-properties.gob"
-static void ___3_mn_webmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 61 "mn-webmail-mailbox-properties.c"
-#line 159 "src/mn-webmail-mailbox-properties.gob"
-static MNMailbox * ___4_mn_webmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
-#line 64 "mn-webmail-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_radio_toggled_h mn_webmail_mailbox_properties_radio_toggled_h
-GType
-mn_webmail_mailbox_properties_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNWebmailMailboxPropertiesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_webmail_mailbox_properties_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNWebmailMailboxProperties),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_webmail_mailbox_properties_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES, "MNWebmailMailboxProperties", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNWebmailMailboxProperties *)g_object_new(mn_webmail_mailbox_properties_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNWebmailMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNWebmailMailboxProperties *
-GET_NEW_VARG (const char *first, ...)
-{
- MNWebmailMailboxProperties *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNWebmailMailboxProperties *)g_object_new_valist (mn_webmail_mailbox_properties_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::finalize"
- MNWebmailMailboxProperties *self G_GNUC_UNUSED = MN_WEBMAIL_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_webmail_mailbox_properties_class_init (MNWebmailMailboxPropertiesClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Webmail: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(MNWebmailMailboxPropertiesPrivate));
-
- parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES);
-
-#line 142 "src/mn-webmail-mailbox-properties.gob"
- mn_mailbox_properties_class->set_mailbox = ___3_mn_webmail_mailbox_properties_set_mailbox;
-#line 159 "src/mn-webmail-mailbox-properties.gob"
- mn_mailbox_properties_class->get_mailbox = ___4_mn_webmail_mailbox_properties_get_mailbox;
-#line 146 "mn-webmail-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");
- }
-}
-#undef __GOB_FUNCTION__
-#line 81 "src/mn-webmail-mailbox-properties.gob"
-static void
-mn_webmail_mailbox_properties_init (MNWebmailMailboxProperties * self G_GNUC_UNUSED)
-{
-#line 163 "mn-webmail-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::init"
- self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES,MNWebmailMailboxPropertiesPrivate);
- {
-#line 82 "src/mn-webmail-mailbox-properties.gob"
-
- MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
- MNAuthenticatedMailboxProperties *auth = MN_AUTHENTICATED_MAILBOX_PROPERTIES(self);
- GtkWidget *folder_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 */
- folder_vbox = mn_mailbox_properties_add_general_section(properties, _("Folder"));
-
- selfp->inbox_radio = gtk_radio_button_new_with_mnemonic(NULL, _("In_box"));
- gtk_size_group_add_widget(properties->label_size_group, selfp->inbox_radio);
-
- gtk_box_pack_start(GTK_BOX(folder_vbox), selfp->inbox_radio, FALSE, FALSE, 0);
-
- selfp->other_radio = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(selfp->inbox_radio), _("_Other:"));
- gtk_size_group_add_widget(properties->label_size_group, selfp->other_radio);
-
- selfp->folder_entry = gtk_entry_new();
- gtk_widget_set_sensitive(selfp->folder_entry, FALSE);
-
- hbox = gtk_hbox_new(FALSE, 12);
- gtk_box_pack_start(GTK_BOX(hbox), selfp->other_radio, FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(hbox), selfp->folder_entry, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(folder_vbox), hbox, FALSE, FALSE, 0);
- gtk_widget_show_all(folder_vbox);
-
- properties->entries = mn_g_slist_append_elements(properties->entries,
- auth->username_entry,
- auth->password_entry,
- selfp->folder_entry,
- NULL);
-
- g_signal_connect(selfp->inbox_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
- g_signal_connect(selfp->other_radio, "toggled", G_CALLBACK(self_radio_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->folder_entry,
- "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
- "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
- NULL);
-
-#line 216 "mn-webmail-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:Webmail:Mailbox:Properties::get_property"
-{
- MNWebmailMailboxProperties *self G_GNUC_UNUSED;
-
- self = MN_WEBMAIL_MAILBOX_PROPERTIES (object);
-
- switch (property_id) {
- case PROP_COMPLETE:
- {
-#line 41 "src/mn-webmail-mailbox-properties.gob"
-
- gboolean complete;
-
- complete = mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self));
- if (complete)
- {
- gboolean other_active;
- const char *folder;
-
- other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
- folder = gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry));
-
- if (other_active && ! *folder)
- complete = FALSE;
- }
-
- g_value_set_boolean(VAL, complete);
-
-#line 254 "mn-webmail-mailbox-properties.c"
- }
- break;
- case PROP_DEFAULT_NAME:
- {
-#line 62 "src/mn-webmail-mailbox-properties.gob"
-
- const char *username;
- gboolean other_active;
- const char *folder;
- MNMailboxClass *class;
-
- username = gtk_entry_get_text(GTK_ENTRY(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)->username_entry));
- g_assert(*username != 0);
-
- other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
- folder = gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry));
-
- class = mn_mailbox_get_class_from_name(MN_MAILBOX_PROPERTIES_CLASS(SELF_GET_CLASS(self))->type);
- g_value_take_string(VAL, mn_webmail_mailbox_build_name(MN_WEBMAIL_MAILBOX_CLASS(class),
- username,
- other_active ? folder : NULL));
- g_type_class_unref(class);
-
-#line 278 "mn-webmail-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 131 "src/mn-webmail-mailbox-properties.gob"
-static void
-mn_webmail_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data)
-{
-#line 299 "mn-webmail-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::radio_toggled_h"
-{
-#line 133 "src/mn-webmail-mailbox-properties.gob"
-
- Self *self = user_data;
-
- gtk_widget_set_sensitive(selfp->folder_entry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio)));
-
- g_object_notify(G_OBJECT(self), "complete");
- g_object_notify(G_OBJECT(self), "default-name");
- }}
-#line 311 "mn-webmail-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-
-#line 142 "src/mn-webmail-mailbox-properties.gob"
-static void
-___3_mn_webmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 317 "mn-webmail-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:Webmail:Mailbox:Properties::set_mailbox"
-{
-#line 144 "src/mn-webmail-mailbox-properties.gob"
-
- Self *self = SELF(properties);
- MNWebmailMailbox *webmail_mailbox = MN_WEBMAIL_MAILBOX(mailbox);
-
- PARENT_HANDLER(properties, mailbox);
-
- if (! strcmp(webmail_mailbox->folder, "Inbox"))
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->inbox_radio), TRUE);
- else
- {
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->other_radio), TRUE);
- gtk_entry_set_text(GTK_ENTRY(selfp->folder_entry), webmail_mailbox->folder);
- }
- }}
-#line 339 "mn-webmail-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 159 "src/mn-webmail-mailbox-properties.gob"
-static MNMailbox *
-___4_mn_webmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 346 "mn-webmail-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:Webmail:Mailbox:Properties::get_mailbox"
-{
-#line 161 "src/mn-webmail-mailbox-properties.gob"
-
- Self *self = SELF(properties);
- MNMailbox *mailbox;
-
- mailbox = PARENT_HANDLER(properties);
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio)))
- g_object_set(mailbox, MN_WEBMAIL_MAILBOX_PROP_FOLDER((char *) gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry))), NULL);
-
- return mailbox;
- }}
-#line 366 "mn-webmail-mailbox-properties.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
diff --git a/build/src/mn-webmail-mailbox-properties.gob.stamp b/build/src/mn-webmail-mailbox-properties.gob.stamp
diff --git a/build/src/mn-webmail-mailbox-properties.h b/build/src/mn-webmail-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_WEBMAIL_MAILBOX_PROPERTIES_H__
-#define __MN_WEBMAIL_MAILBOX_PROPERTIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES (mn_webmail_mailbox_properties_get_type())
-#define MN_WEBMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_webmail_mailbox_properties_get_type(), MNWebmailMailboxProperties)
-#define MN_WEBMAIL_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_webmail_mailbox_properties_get_type(), MNWebmailMailboxProperties const)
-#define MN_WEBMAIL_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_webmail_mailbox_properties_get_type(), MNWebmailMailboxPropertiesClass)
-#define MN_IS_WEBMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_webmail_mailbox_properties_get_type ())
-
-#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_webmail_mailbox_properties_get_type(), MNWebmailMailboxPropertiesClass)
-
-/* Private structure type */
-typedef struct _MNWebmailMailboxPropertiesPrivate MNWebmailMailboxPropertiesPrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_WEBMAIL_MAILBOX_PROPERTIES__
-#define __TYPEDEF_MN_WEBMAIL_MAILBOX_PROPERTIES__
-typedef struct _MNWebmailMailboxProperties MNWebmailMailboxProperties;
-#endif
-struct _MNWebmailMailboxProperties {
- MNAuthenticatedMailboxProperties __parent__;
- /*< private >*/
- MNWebmailMailboxPropertiesPrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNWebmailMailboxPropertiesClass MNWebmailMailboxPropertiesClass;
-struct _MNWebmailMailboxPropertiesClass {
- MNAuthenticatedMailboxPropertiesClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_webmail_mailbox_properties_get_type (void) G_GNUC_CONST;
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
-#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
-#define MN_WEBMAIL_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-webmail-mailbox.c b/build/src/mn-webmail-mailbox.c
@@ -1,773 +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-webmail-mailbox.h"
-
-#include "mn-webmail-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-webmail-mailbox.gob"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <glib/gi18n.h>
-#include <gmime/gmime.h>
-#include "mn-mailbox-private.h"
-#include "mn-authenticated-mailbox-private.h"
-#include "mn-message-mime.h"
-#include "mn-util.h"
-
-#line 41 "mn-webmail-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_WEBMAIL_MAILBOX(x)
-#define SELF_CONST(x) MN_WEBMAIL_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_WEBMAIL_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_WEBMAIL_MAILBOX
-#define SELF_CLASS(x) MN_WEBMAIL_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_WEBMAIL_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNWebmailMailbox Self;
-typedef MNWebmailMailboxClass 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-webmail-mailbox.gob"
-static void mn_webmail_mailbox_init (MNWebmailMailbox * o) G_GNUC_UNUSED;
-#line 60 "mn-webmail-mailbox.c"
-#line 0 "src/mn-webmail-mailbox.gob"
-static void mn_webmail_mailbox_class_init (MNWebmailMailboxClass * c) G_GNUC_UNUSED;
-#line 63 "mn-webmail-mailbox.c"
-#line 50 "src/mn-webmail-mailbox.gob"
-static void ___1_mn_webmail_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
-#line 66 "mn-webmail-mailbox.c"
-#line 73 "src/mn-webmail-mailbox.gob"
-static int mn_webmail_mailbox_create_temporary_file (char ** filename, GError ** err) G_GNUC_UNUSED;
-#line 69 "mn-webmail-mailbox.c"
-#line 163 "src/mn-webmail-mailbox.gob"
-static char * mn_webmail_mailbox_get_error_message (MNWebmailMailbox * self, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure) G_GNUC_UNUSED;
-#line 72 "mn-webmail-mailbox.c"
-#line 169 "src/mn-webmail-mailbox.gob"
-static void mn_webmail_mailbox_print_multiline_text (MNWebmailMailbox * self, const char * text, const char * line_prefix) G_GNUC_UNUSED;
-#line 75 "mn-webmail-mailbox.c"
-#line 196 "src/mn-webmail-mailbox.gob"
-static void mn_webmail_mailbox_print_output (MNWebmailMailbox * self, const char * header, const char * contents) G_GNUC_UNUSED;
-#line 78 "mn-webmail-mailbox.c"
-#line 318 "src/mn-webmail-mailbox.gob"
-static gboolean mn_webmail_mailbox_webmail_check (MNWebmailMailbox * self, GError ** err) G_GNUC_UNUSED;
-#line 81 "mn-webmail-mailbox.c"
-#line 321 "src/mn-webmail-mailbox.gob"
-static void ___d_mn_webmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
-#line 84 "mn-webmail-mailbox.c"
-
-enum {
- PROP_0,
- PROP_FOLDER
-};
-
-/* pointer to the class of our parent */
-static MNAuthenticatedMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_parse_username mn_webmail_mailbox_parse_username
-#define self_create_temporary_file mn_webmail_mailbox_create_temporary_file
-#define self_create_spool_file mn_webmail_mailbox_create_spool_file
-#define self_write_temporary_file mn_webmail_mailbox_write_temporary_file
-#define self_get_error_message mn_webmail_mailbox_get_error_message
-#define self_print_multiline_text mn_webmail_mailbox_print_multiline_text
-#define self_print_config mn_webmail_mailbox_print_config
-#define self_print_output mn_webmail_mailbox_print_output
-#define self_run_helper mn_webmail_mailbox_run_helper
-#define self_read_spool_file mn_webmail_mailbox_read_spool_file
-#define self_webmail_check mn_webmail_mailbox_webmail_check
-#define self_build_name mn_webmail_mailbox_build_name
-GType
-mn_webmail_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNWebmailMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_webmail_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNWebmailMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_webmail_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_AUTHENTICATED_MAILBOX, "MNWebmailMailbox", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNWebmailMailbox *)g_object_new(mn_webmail_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNWebmailMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNWebmailMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNWebmailMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNWebmailMailbox *)g_object_new_valist (mn_webmail_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::finalize"
- MNWebmailMailbox *self G_GNUC_UNUSED = MN_WEBMAIL_MAILBOX (obj_self);
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 43 "src/mn-webmail-mailbox.gob"
- if(self->folder) { g_free ((gpointer) self->folder); self->folder = NULL; }
-#line 159 "mn-webmail-mailbox.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_webmail_mailbox_init (MNWebmailMailbox * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::init"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_webmail_mailbox_class_init (MNWebmailMailboxClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)c;
- MNAuthenticatedMailboxClass *mn_authenticated_mailbox_class = (MNAuthenticatedMailboxClass *)c;
-
- parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX);
-
-#line 50 "src/mn-webmail-mailbox.gob"
- mn_mailbox_class->seal = ___1_mn_webmail_mailbox_seal;
-#line 181 "mn-webmail-mailbox.c"
- c->get_error_message = NULL;
- c->webmail_check = NULL;
-#line 321 "src/mn-webmail-mailbox.gob"
- mn_authenticated_mailbox_class->authenticated_check = ___d_mn_webmail_mailbox_authenticated_check;
-#line 186 "mn-webmail-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
- ("folder" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- "Inbox" /* 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_FOLDER,
- 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:Webmail:Mailbox::set_property"
-{
- MNWebmailMailbox *self G_GNUC_UNUSED;
-
- self = MN_WEBMAIL_MAILBOX (object);
-
- switch (property_id) {
- case PROP_FOLDER:
- {
-#line 44 "src/mn-webmail-mailbox.gob"
-{ char *old = self->folder; self->folder = g_value_dup_string (VAL); g_free (old); }
-#line 222 "mn-webmail-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:Webmail:Mailbox::get_property"
-{
- MNWebmailMailbox *self G_GNUC_UNUSED;
-
- self = MN_WEBMAIL_MAILBOX (object);
-
- switch (property_id) {
- case PROP_FOLDER:
- {
-#line 44 "src/mn-webmail-mailbox.gob"
-g_value_set_string (VAL, self->folder);
-#line 253 "mn-webmail-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 50 "src/mn-webmail-mailbox.gob"
-static void
-___1_mn_webmail_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 273 "mn-webmail-mailbox.c"
-#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->seal) \
- (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
-{
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::seal"
-{
-#line 52 "src/mn-webmail-mailbox.gob"
-
- MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
- Self *self = SELF(mailbox);
-
- PARENT_HANDLER(mailbox);
-
- if (! mailbox->runtime_name)
- mailbox->runtime_name = self_build_name(SELF_GET_CLASS(self), MN_AUTHENTICATED_MAILBOX(mailbox)->username, self->folder);
-
- if (! auth_mailbox->keyring_domain)
- auth_mailbox->keyring_domain = g_strdup(MN_WEBMAIL_MAILBOX_CLASS(SELF_GET_CLASS(self))->default_domain);
- }}
-#line 293 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 65 "src/mn-webmail-mailbox.gob"
-void
-mn_webmail_mailbox_parse_username (MNWebmailMailbox * self, char ** username, char ** domain)
-{
-#line 301 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::parse_username"
-#line 65 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 65 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (MN_IS_WEBMAIL_MAILBOX (self));
-#line 65 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (username != NULL);
-#line 65 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (domain != NULL);
-#line 311 "mn-webmail-mailbox.c"
-{
-#line 67 "src/mn-webmail-mailbox.gob"
-
- mn_authenticated_mailbox_parse_username(MN_AUTHENTICATED_MAILBOX(self), username, domain);
- if (! *domain)
- *domain = g_strdup(MN_WEBMAIL_MAILBOX_CLASS(SELF_GET_CLASS(self))->default_domain);
- }}
-#line 319 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 73 "src/mn-webmail-mailbox.gob"
-static int
-mn_webmail_mailbox_create_temporary_file (char ** filename, GError ** err)
-{
-#line 326 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::create_temporary_file"
-#line 73 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (filename != NULL, (int )0);
-#line 330 "mn-webmail-mailbox.c"
-{
-#line 75 "src/mn-webmail-mailbox.gob"
-
- int fd;
- char *_filename;
- GError *tmp_err = NULL;
-
- /* GetLive chokes on the hyphen in "mail-notification", so use "mn" */
- fd = g_file_open_tmp("mn.XXXXXX", &_filename, &tmp_err);
- if (fd == -1)
- {
- g_set_error(err, 0, 0, _("unable to create a temporary file: %s"), tmp_err->message);
- g_error_free(tmp_err);
- return -1;
- }
-
- if (fchmod(fd, S_IRUSR | S_IWUSR) < 0)
- {
- g_set_error(err, 0, 0, _("unable to change the permissions of the temporary file: %s"), g_strerror(errno));
- g_free(_filename);
- close(fd);
- return -1;
- }
-
- *filename = _filename;
- return fd;
- }}
-#line 358 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 101 "src/mn-webmail-mailbox.gob"
-char *
-mn_webmail_mailbox_create_spool_file (GError ** err)
-{
-#line 365 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::create_spool_file"
-{
-#line 103 "src/mn-webmail-mailbox.gob"
-
- int fd;
- char *filename;
-
- fd = self_create_temporary_file(&filename, err);
- if (fd == -1)
- return NULL;
-
- close(fd);
-
- return filename;
- }}
-#line 381 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 116 "src/mn-webmail-mailbox.gob"
-char *
-mn_webmail_mailbox_write_temporary_file (const char * contents, const char * encoding, GError ** err)
-{
-#line 388 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::write_temporary_file"
-#line 116 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (contents != NULL, (char * )0);
-#line 116 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (encoding != NULL, (char * )0);
-#line 394 "mn-webmail-mailbox.c"
-{
-#line 120 "src/mn-webmail-mailbox.gob"
-
- int fd;
- GError *tmp_err = NULL;
- char *filename;
- GIOChannel *channel;
- gsize bytes_written;
-
- fd = self_create_temporary_file(&filename, err);
- if (fd == -1)
- return NULL;
-
- channel = g_io_channel_unix_new(fd);
-
- if (g_io_channel_set_encoding(channel, encoding, &tmp_err) != G_IO_STATUS_NORMAL)
- {
- g_set_error(err, 0, 0, _("unable to set encoding of %s: %s"), filename, tmp_err->message);
- goto error;
- }
-
- if (g_io_channel_write_chars(channel, contents, -1, &bytes_written, &tmp_err) != G_IO_STATUS_NORMAL)
- {
- g_set_error(err, 0, 0, _("unable to write to %s: %s"), filename, tmp_err->message);
- goto error;
- }
-
- if (g_io_channel_shutdown(channel, TRUE, &tmp_err) != G_IO_STATUS_NORMAL)
- {
- g_set_error(err, 0, 0, _("unable to close %s: %s"), filename, tmp_err->message);
- goto error_noshutdown;
- }
-
- g_io_channel_unref(channel);
-
- return filename;
-
- error:
- g_io_channel_shutdown(channel, FALSE, NULL);
- error_noshutdown:
- g_io_channel_unref(channel);
- g_free(filename);
- return NULL;
- }}
-#line 439 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 163 "src/mn-webmail-mailbox.gob"
-static char *
-mn_webmail_mailbox_get_error_message (MNWebmailMailbox * self, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure)
-{
-#line 446 "mn-webmail-mailbox.c"
- MNWebmailMailboxClass *klass;
-#line 163 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 163 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (MN_IS_WEBMAIL_MAILBOX (self), (char * )0);
-#line 163 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (is_auth_failure != NULL, (char * )0);
-#line 454 "mn-webmail-mailbox.c"
- klass = MN_WEBMAIL_MAILBOX_GET_CLASS(self);
-
- if(klass->get_error_message)
- return (*klass->get_error_message)(self,helper_stdout,helper_stderr,is_auth_failure);
- else
- return (char * )(0);
-}
-
-#line 169 "src/mn-webmail-mailbox.gob"
-static void
-mn_webmail_mailbox_print_multiline_text (MNWebmailMailbox * self, const char * text, const char * line_prefix)
-{
-#line 467 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::print_multiline_text"
-#line 169 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 169 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (MN_IS_WEBMAIL_MAILBOX (self));
-#line 169 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (text != NULL);
-#line 169 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (line_prefix != NULL);
-#line 477 "mn-webmail-mailbox.c"
-{
-#line 173 "src/mn-webmail-mailbox.gob"
-
- char **lines;
- int i;
-
- lines = g_strsplit(text, "\n", 0);
- for (i = 0; lines[i]; i++)
- {
- // do not print the empty last line
- if (! lines[i + 1] && ! lines[i][0])
- break;
-
- mn_mailbox_notice(MN_MAILBOX(self), "%s%s", line_prefix, lines[i]);
- }
- g_strfreev(lines);
- }}
-#line 495 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 189 "src/mn-webmail-mailbox.gob"
-void
-mn_webmail_mailbox_print_config (MNWebmailMailbox * self, const char * config)
-{
-#line 502 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::print_config"
-#line 189 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 189 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (MN_IS_WEBMAIL_MAILBOX (self));
-#line 189 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (config != NULL);
-#line 510 "mn-webmail-mailbox.c"
-{
-#line 191 "src/mn-webmail-mailbox.gob"
-
- mn_mailbox_notice(MN_MAILBOX(self), _("configuration:"));
- self_print_multiline_text(self, config, "> ");
- }}
-#line 517 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 196 "src/mn-webmail-mailbox.gob"
-static void
-mn_webmail_mailbox_print_output (MNWebmailMailbox * self, const char * header, const char * contents)
-{
-#line 524 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::print_output"
-#line 196 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 196 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (MN_IS_WEBMAIL_MAILBOX (self));
-#line 196 "src/mn-webmail-mailbox.gob"
- g_return_if_fail (header != NULL);
-#line 532 "mn-webmail-mailbox.c"
-{
-#line 200 "src/mn-webmail-mailbox.gob"
-
- if (! contents || ! *contents)
- return;
-
- mn_mailbox_notice(MN_MAILBOX(self), "%s", header);
- self_print_multiline_text(self, contents, "< ");
- }}
-#line 542 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 208 "src/mn-webmail-mailbox.gob"
-gboolean
-mn_webmail_mailbox_run_helper (MNWebmailMailbox * self, const char * name, const char * command, GError ** err)
-{
-#line 549 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::run_helper"
-#line 208 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 208 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (MN_IS_WEBMAIL_MAILBOX (self), (gboolean )0);
-#line 208 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (name != NULL, (gboolean )0);
-#line 208 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (command != NULL, (gboolean )0);
-#line 559 "mn-webmail-mailbox.c"
-{
-#line 213 "src/mn-webmail-mailbox.gob"
-
- GError *tmp_err = NULL;
- char *helper_stdout;
- char *helper_stderr;
- int exit_status;
- gboolean status = FALSE;
-
- mn_mailbox_notice(MN_MAILBOX(self), _("running %s"), command);
-
- if (! g_spawn_command_line_sync(command, &helper_stdout, &helper_stderr, &exit_status, &tmp_err))
- {
- g_set_error(err, 0, 0, _("cannot execute \"%s\": %s"), name, tmp_err->message);
- g_error_free(tmp_err);
- return FALSE;
- }
-
- self_print_output(self, _("standard output:"), helper_stdout);
- self_print_output(self, _("standard error output:"), helper_stderr);
-
- if (WEXITSTATUS(exit_status) != 0)
- {
- char *message;
- gboolean is_auth_failure = FALSE;
-
- message = self_get_error_message(self,
- helper_stdout,
- helper_stderr,
- &is_auth_failure);
- if (message)
- {
- g_set_error(err, 0, 0, "%s", message);
- g_free(message);
- }
- else
- /* translators: %s is a program name, as in "unknown fetchyahoo failure" */
- g_set_error(err, 0, 0, _("unknown %s failure"), name);
-
- if (is_auth_failure && MN_AUTHENTICATED_MAILBOX(self)->auth_prompted)
- mn_authenticated_mailbox_auth_failed(MN_AUTHENTICATED_MAILBOX(self));
-
- goto end;
- }
-
- status = TRUE;
-
- end:
- g_free(helper_stdout);
- g_free(helper_stderr);
-
- return status;
- }}
-#line 613 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 265 "src/mn-webmail-mailbox.gob"
-gboolean
-mn_webmail_mailbox_read_spool_file (MNWebmailMailbox * self, const char * spool_file, GError ** err)
-{
-#line 620 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::read_spool_file"
-#line 265 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 265 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (MN_IS_WEBMAIL_MAILBOX (self), (gboolean )0);
-#line 265 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (spool_file != NULL, (gboolean )0);
-#line 628 "mn-webmail-mailbox.c"
-{
-#line 267 "src/mn-webmail-mailbox.gob"
-
- int fd;
- GMimeStream *stream;
- GMimeParser *parser;
- GSList *messages = NULL;
-
- fd = open(spool_file, O_RDONLY);
- if (fd < 0)
- {
- g_set_error(err, 0, 0, _("unable to open %s: %s"), spool_file, strerror(errno));
- return FALSE;
- }
-
- stream = g_mime_stream_fs_new(fd);
-
- parser = g_mime_parser_new_with_stream(stream);
- g_object_unref(stream);
- g_mime_parser_set_scan_from(parser, TRUE);
-
- while (! g_mime_parser_eos(parser))
- {
- GMimeMessage *mime_message;
-
- mime_message = g_mime_parser_construct_message(parser);
- if (mime_message)
- {
- MNMessage *message;
-
- message = mn_message_new_from_mime_message(MN_MAILBOX(self), mime_message, NULL, 0, TRUE);
- g_object_unref(mime_message);
-
- if (message)
- messages = g_slist_prepend(messages, message);
- }
- }
-
- g_object_unref(parser);
-
- /* the fd is owned by the stream and closed by it */
-
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_messages(MN_MAILBOX(self), messages);
- mn_g_object_slist_free(messages);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- return TRUE;
- }}
-#line 681 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 318 "src/mn-webmail-mailbox.gob"
-static gboolean
-mn_webmail_mailbox_webmail_check (MNWebmailMailbox * self, GError ** err)
-{
-#line 688 "mn-webmail-mailbox.c"
- MNWebmailMailboxClass *klass;
-#line 318 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 318 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (MN_IS_WEBMAIL_MAILBOX (self), (gboolean )0);
-#line 694 "mn-webmail-mailbox.c"
- klass = MN_WEBMAIL_MAILBOX_GET_CLASS(self);
-
- if(klass->webmail_check)
- return (*klass->webmail_check)(self,err);
- else
- return (gboolean )(0);
-}
-
-#line 321 "src/mn-webmail-mailbox.gob"
-static void
-___d_mn_webmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
-#line 706 "mn-webmail-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:Webmail:Mailbox::authenticated_check"
-{
-#line 323 "src/mn-webmail-mailbox.gob"
-
- Self *self = SELF(mailbox);
- GError *err = NULL;
-
- PARENT_HANDLER(mailbox);
-
- again:
- if (! mn_authenticated_mailbox_fill_password(mailbox, TRUE))
- return;
-
- if (! self_webmail_check(self, &err))
- {
- if (mailbox->auth_prompted && mailbox->auth_failed)
- {
- g_clear_error(&err);
- goto again;
- }
-
- GDK_THREADS_ENTER();
-
- mn_mailbox_set_error(MN_MAILBOX(self), "%s", err->message);
- g_error_free(err);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
- }
- }}
-#line 741 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 351 "src/mn-webmail-mailbox.gob"
-char *
-mn_webmail_mailbox_build_name (MNWebmailMailboxClass * class, const char * username, const char * folder)
-{
-#line 749 "mn-webmail-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::build_name"
-#line 351 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (class != NULL, (char * )0);
-#line 351 "src/mn-webmail-mailbox.gob"
- g_return_val_if_fail (username != NULL, (char * )0);
-#line 755 "mn-webmail-mailbox.c"
-{
-#line 355 "src/mn-webmail-mailbox.gob"
-
- GString *name;
-
- name = g_string_new(NULL);
-
- if (strchr(username, '@'))
- g_string_append(name, username);
- else
- g_string_append_printf(name, "%s@%s", username, class->default_domain);
-
- if (folder && strcmp(folder, "Inbox"))
- g_string_append_printf(name, "/%s", folder);
-
- return g_string_free(name, FALSE);
- }}
-#line 773 "mn-webmail-mailbox.c"
-#undef __GOB_FUNCTION__
diff --git a/build/src/mn-webmail-mailbox.gob.stamp b/build/src/mn-webmail-mailbox.gob.stamp
diff --git a/build/src/mn-webmail-mailbox.h b/build/src/mn-webmail-mailbox.h
@@ -1,79 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-authenticated-mailbox.h"
-
-#ifndef __MN_WEBMAIL_MAILBOX_H__
-#define __MN_WEBMAIL_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_WEBMAIL_MAILBOX (mn_webmail_mailbox_get_type())
-#define MN_WEBMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_webmail_mailbox_get_type(), MNWebmailMailbox)
-#define MN_WEBMAIL_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_webmail_mailbox_get_type(), MNWebmailMailbox const)
-#define MN_WEBMAIL_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_webmail_mailbox_get_type(), MNWebmailMailboxClass)
-#define MN_IS_WEBMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_webmail_mailbox_get_type ())
-
-#define MN_WEBMAIL_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_webmail_mailbox_get_type(), MNWebmailMailboxClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_WEBMAIL_MAILBOX__
-#define __TYPEDEF_MN_WEBMAIL_MAILBOX__
-typedef struct _MNWebmailMailbox MNWebmailMailbox;
-#endif
-struct _MNWebmailMailbox {
- MNAuthenticatedMailbox __parent__;
- /*< public >*/
- char * folder;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNWebmailMailboxClass MNWebmailMailboxClass;
-struct _MNWebmailMailboxClass {
- MNAuthenticatedMailboxClass __parent__;
- char * (* get_error_message) (MNWebmailMailbox * self, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure);
- gboolean (* webmail_check) (MNWebmailMailbox * self, GError ** err);
- const char * default_domain;
-};
-
-
-/*
- * Public methods
- */
-GType mn_webmail_mailbox_get_type (void) G_GNUC_CONST;
-#line 351 "src/mn-webmail-mailbox.gob"
-char * mn_webmail_mailbox_build_name (MNWebmailMailboxClass * class,
- const char * username,
- const char * folder);
-#line 62 "mn-webmail-mailbox.h"
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_WEBMAIL_MAILBOX_PROP_FOLDER(arg) "folder", __extension__ ({gchar *z = (arg); z;})
-#define MN_WEBMAIL_MAILBOX_GET_PROP_FOLDER(arg) "folder", __extension__ ({gchar **z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_WEBMAIL_MAILBOX_PROP_FOLDER(arg) "folder",(gchar *)(arg)
-#define MN_WEBMAIL_MAILBOX_GET_PROP_FOLDER(arg) "folder",(gchar **)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-yahoo-mailbox-private.h b/build/src/mn-yahoo-mailbox-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_YAHOO_MAILBOX_PRIVATE_H__
-#define __MN_YAHOO_MAILBOX_PRIVATE_H__
-
-#include "mn-yahoo-mailbox.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-yahoo-mailbox-properties-private.h b/build/src/mn-yahoo-mailbox-properties-private.h
@@ -1,17 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#ifndef __MN_YAHOO_MAILBOX_PROPERTIES_PRIVATE_H__
-#define __MN_YAHOO_MAILBOX_PROPERTIES_PRIVATE_H__
-
-#include "mn-yahoo-mailbox-properties.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-yahoo-mailbox-properties.c b/build/src/mn-yahoo-mailbox-properties.c
@@ -1,125 +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-yahoo-mailbox-properties.h"
-
-#include "mn-yahoo-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 24 "src/mn-yahoo-mailbox-properties.gob"
-
-#include "mn-stock.h"
-
-#line 30 "mn-yahoo-mailbox-properties.c"
-/* self casting macros */
-#define SELF(x) MN_YAHOO_MAILBOX_PROPERTIES(x)
-#define SELF_CONST(x) MN_YAHOO_MAILBOX_PROPERTIES_CONST(x)
-#define IS_SELF(x) MN_IS_YAHOO_MAILBOX_PROPERTIES(x)
-#define TYPE_SELF MN_TYPE_YAHOO_MAILBOX_PROPERTIES
-#define SELF_CLASS(x) MN_YAHOO_MAILBOX_PROPERTIES_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_YAHOO_MAILBOX_PROPERTIES_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNYahooMailboxProperties Self;
-typedef MNYahooMailboxPropertiesClass SelfClass;
-
-/* here are local prototypes */
-#line 0 "src/mn-yahoo-mailbox-properties.gob"
-static void mn_yahoo_mailbox_properties_init (MNYahooMailboxProperties * o) G_GNUC_UNUSED;
-#line 47 "mn-yahoo-mailbox-properties.c"
-#line 30 "src/mn-yahoo-mailbox-properties.gob"
-static void mn_yahoo_mailbox_properties_class_init (MNYahooMailboxPropertiesClass * class) G_GNUC_UNUSED;
-#line 50 "mn-yahoo-mailbox-properties.c"
-
-/* pointer to the class of our parent */
-static MNWebmailMailboxPropertiesClass *parent_class = NULL;
-
-GType
-mn_yahoo_mailbox_properties_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNYahooMailboxPropertiesClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_yahoo_mailbox_properties_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNYahooMailboxProperties),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_yahoo_mailbox_properties_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES, "MNYahooMailboxProperties", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNYahooMailboxProperties *)g_object_new(mn_yahoo_mailbox_properties_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNYahooMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNYahooMailboxProperties *
-GET_NEW_VARG (const char *first, ...)
-{
- MNYahooMailboxProperties *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNYahooMailboxProperties *)g_object_new_valist (mn_yahoo_mailbox_properties_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-static void
-mn_yahoo_mailbox_properties_init (MNYahooMailboxProperties * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox:Properties::init"
-}
-#undef __GOB_FUNCTION__
-#line 30 "src/mn-yahoo-mailbox-properties.gob"
-static void
-mn_yahoo_mailbox_properties_class_init (MNYahooMailboxPropertiesClass * class G_GNUC_UNUSED)
-{
-#line 107 "mn-yahoo-mailbox-properties.c"
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox:Properties::class_init"
-
- parent_class = g_type_class_ref (MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES);
-
- {
-#line 31 "src/mn-yahoo-mailbox-properties.gob"
-
- MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
-
- p_class->type = "yahoo";
- p_class->stock_id = MN_STOCK_YAHOO;
- p_class->combo_label = "Yahoo! Mail";
-
-#line 121 "mn-yahoo-mailbox-properties.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
diff --git a/build/src/mn-yahoo-mailbox-properties.gob.stamp b/build/src/mn-yahoo-mailbox-properties.gob.stamp
diff --git a/build/src/mn-yahoo-mailbox-properties.h b/build/src/mn-yahoo-mailbox-properties.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-webmail-mailbox-properties.h"
-
-#ifndef __MN_YAHOO_MAILBOX_PROPERTIES_H__
-#define __MN_YAHOO_MAILBOX_PROPERTIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_YAHOO_MAILBOX_PROPERTIES (mn_yahoo_mailbox_properties_get_type())
-#define MN_YAHOO_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_yahoo_mailbox_properties_get_type(), MNYahooMailboxProperties)
-#define MN_YAHOO_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_yahoo_mailbox_properties_get_type(), MNYahooMailboxProperties const)
-#define MN_YAHOO_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_yahoo_mailbox_properties_get_type(), MNYahooMailboxPropertiesClass)
-#define MN_IS_YAHOO_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_yahoo_mailbox_properties_get_type ())
-
-#define MN_YAHOO_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_yahoo_mailbox_properties_get_type(), MNYahooMailboxPropertiesClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_YAHOO_MAILBOX_PROPERTIES__
-#define __TYPEDEF_MN_YAHOO_MAILBOX_PROPERTIES__
-typedef struct _MNYahooMailboxProperties MNYahooMailboxProperties;
-#endif
-struct _MNYahooMailboxProperties {
- MNWebmailMailboxProperties __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNYahooMailboxPropertiesClass MNYahooMailboxPropertiesClass;
-struct _MNYahooMailboxPropertiesClass {
- MNWebmailMailboxPropertiesClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_yahoo_mailbox_properties_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/build/src/mn-yahoo-mailbox.c b/build/src/mn-yahoo-mailbox.c
@@ -1,509 +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-yahoo-mailbox.h"
-
-#include "mn-yahoo-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-yahoo-mailbox.gob"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <string.h>
-#include <glib/gi18n.h>
-#include "mn-webmail-mailbox-private.h"
-#include "mn-stock.h"
-#include "mn-conf.h"
-#include "mn-util.h"
-
-#line 38 "mn-yahoo-mailbox.c"
-/* self casting macros */
-#define SELF(x) MN_YAHOO_MAILBOX(x)
-#define SELF_CONST(x) MN_YAHOO_MAILBOX_CONST(x)
-#define IS_SELF(x) MN_IS_YAHOO_MAILBOX(x)
-#define TYPE_SELF MN_TYPE_YAHOO_MAILBOX
-#define SELF_CLASS(x) MN_YAHOO_MAILBOX_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_YAHOO_MAILBOX_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNYahooMailbox Self;
-typedef MNYahooMailboxClass SelfClass;
-
-/* here are local prototypes */
-#line 40 "src/mn-yahoo-mailbox.gob"
-static void mn_yahoo_mailbox_class_init (MNYahooMailboxClass * class) G_GNUC_UNUSED;
-#line 55 "mn-yahoo-mailbox.c"
-#line 50 "src/mn-yahoo-mailbox.gob"
-static void mn_yahoo_mailbox_init (MNYahooMailbox * self) G_GNUC_UNUSED;
-#line 58 "mn-yahoo-mailbox.c"
-#line 56 "src/mn-yahoo-mailbox.gob"
-static char * mn_yahoo_mailbox_create_cookies_file (GError ** err) G_GNUC_UNUSED;
-#line 61 "mn-yahoo-mailbox.c"
-#line 95 "src/mn-yahoo-mailbox.gob"
-static gboolean mn_yahoo_mailbox_can_convert (const char * str, const char * encoding) G_GNUC_UNUSED;
-#line 64 "mn-yahoo-mailbox.c"
-#line 109 "src/mn-yahoo-mailbox.gob"
-static const char * mn_yahoo_mailbox_get_config_file_encoding (const char * folder) G_GNUC_UNUSED;
-#line 67 "mn-yahoo-mailbox.c"
-#line 123 "src/mn-yahoo-mailbox.gob"
-static char * mn_yahoo_mailbox_create_config_file (MNYahooMailbox * self, const char * spool_file, const char * cookies_file, GError ** err) G_GNUC_UNUSED;
-#line 70 "mn-yahoo-mailbox.c"
-#line 193 "src/mn-yahoo-mailbox.gob"
-static char * ___7_mn_yahoo_mailbox_get_error_message (MNWebmailMailbox * mailbox, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure) G_GNUC_UNUSED;
-#line 73 "mn-yahoo-mailbox.c"
-#line 235 "src/mn-yahoo-mailbox.gob"
-static gboolean mn_yahoo_mailbox_run_fetchyahoo (MNYahooMailbox * self, const char * config_file, GError ** err) G_GNUC_UNUSED;
-#line 76 "mn-yahoo-mailbox.c"
-#line 248 "src/mn-yahoo-mailbox.gob"
-static gboolean ___9_mn_yahoo_mailbox_webmail_check (MNWebmailMailbox * mailbox, GError ** err) G_GNUC_UNUSED;
-#line 79 "mn-yahoo-mailbox.c"
-
-/* pointer to the class of our parent */
-static MNWebmailMailboxClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_create_cookies_file mn_yahoo_mailbox_create_cookies_file
-#define self_can_convert mn_yahoo_mailbox_can_convert
-#define self_get_config_file_encoding mn_yahoo_mailbox_get_config_file_encoding
-#define self_create_config_file mn_yahoo_mailbox_create_config_file
-#define self_run_fetchyahoo mn_yahoo_mailbox_run_fetchyahoo
-GType
-mn_yahoo_mailbox_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNYahooMailboxClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_yahoo_mailbox_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNYahooMailbox),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_yahoo_mailbox_init,
- NULL
- };
-
- type = g_type_register_static (MN_TYPE_WEBMAIL_MAILBOX, "MNYahooMailbox", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNYahooMailbox *)g_object_new(mn_yahoo_mailbox_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNYahooMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNYahooMailbox *
-GET_NEW_VARG (const char *first, ...)
-{
- MNYahooMailbox *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNYahooMailbox *)g_object_new_valist (mn_yahoo_mailbox_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-#line 40 "src/mn-yahoo-mailbox.gob"
-static void
-mn_yahoo_mailbox_class_init (MNYahooMailboxClass * class G_GNUC_UNUSED)
-{
-#line 136 "mn-yahoo-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::class_init"
- MNWebmailMailboxClass *mn_webmail_mailbox_class = (MNWebmailMailboxClass *)class;
-
- parent_class = g_type_class_ref (MN_TYPE_WEBMAIL_MAILBOX);
-
-#line 193 "src/mn-yahoo-mailbox.gob"
- mn_webmail_mailbox_class->get_error_message = ___7_mn_yahoo_mailbox_get_error_message;
-#line 248 "src/mn-yahoo-mailbox.gob"
- mn_webmail_mailbox_class->webmail_check = ___9_mn_yahoo_mailbox_webmail_check;
-#line 146 "mn-yahoo-mailbox.c"
- {
-#line 41 "src/mn-yahoo-mailbox.gob"
-
- MN_MAILBOX_CLASS(class)->type = "yahoo";
-
- /* 5 minutes is a good default */
- MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
-
- MN_WEBMAIL_MAILBOX_CLASS(class)->default_domain = "yahoo.com";
-
-#line 157 "mn-yahoo-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-#line 50 "src/mn-yahoo-mailbox.gob"
-static void
-mn_yahoo_mailbox_init (MNYahooMailbox * self G_GNUC_UNUSED)
-{
-#line 165 "mn-yahoo-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::init"
- {
-#line 51 "src/mn-yahoo-mailbox.gob"
-
- mn_mailbox_set_format(MN_MAILBOX(self), "Yahoo! Mail");
- mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_YAHOO);
-
-#line 173 "mn-yahoo-mailbox.c"
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 56 "src/mn-yahoo-mailbox.gob"
-static char *
-mn_yahoo_mailbox_create_cookies_file (GError ** err)
-{
-#line 184 "mn-yahoo-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::create_cookies_file"
-{
-#line 58 "src/mn-yahoo-mailbox.gob"
-
- char *filename;
-
- /*
- * If the file already exists, ensure it has the proper
- * permissions. Otherwise, create it with the proper permissions.
- */
-
- filename = g_build_filename(mn_conf_dot_dir, "yahoo-cookies", NULL);
- if (g_file_test(filename, G_FILE_TEST_EXISTS))
- {
- if (chmod(filename, S_IRUSR | S_IWUSR) < 0)
- {
- g_set_error(err, 0, 0, _("unable to change the permissions of %s: %s"), filename, g_strerror(errno));
- goto error;
- }
- }
- else
- {
- int fd;
-
- fd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
- if (fd < 0)
- {
- g_set_error(err, 0, 0, _("unable to create %s: %s"), filename, g_strerror(errno));
- goto error;
- }
- close(fd);
- }
-
- return filename;
-
- error:
- g_free(filename);
- return NULL;
- }}
-#line 224 "mn-yahoo-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 95 "src/mn-yahoo-mailbox.gob"
-static gboolean
-mn_yahoo_mailbox_can_convert (const char * str, const char * encoding)
-{
-#line 231 "mn-yahoo-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::can_convert"
-#line 95 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (str != NULL, (gboolean )0);
-#line 95 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (encoding != NULL, (gboolean )0);
-#line 237 "mn-yahoo-mailbox.c"
-{
-#line 98 "src/mn-yahoo-mailbox.gob"
-
- char *converted;
- gboolean can;
-
- converted = g_convert(str, -1, encoding, "UTF-8", NULL, NULL, NULL);
- can = converted != NULL;
- g_free(converted);
-
- return can;
- }}
-#line 250 "mn-yahoo-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 109 "src/mn-yahoo-mailbox.gob"
-static const char *
-mn_yahoo_mailbox_get_config_file_encoding (const char * folder)
-{
-#line 257 "mn-yahoo-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::get_config_file_encoding"
-#line 109 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (folder != NULL, (const char * )0);
-#line 261 "mn-yahoo-mailbox.c"
-{
-#line 111 "src/mn-yahoo-mailbox.gob"
-
- /*
- * fetchyahoo does not seem to deal with the folder name encoding
- * at all, and Yahoo apparently uses ISO8859-1 when possible, and
- * UTF-8 otherwise.
- */
- if (self_can_convert(folder, "ISO8859-1"))
- return "ISO8859-1";
- else
- return "UTF-8";
- }}
-#line 275 "mn-yahoo-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 123 "src/mn-yahoo-mailbox.gob"
-static char *
-mn_yahoo_mailbox_create_config_file (MNYahooMailbox * self, const char * spool_file, const char * cookies_file, GError ** err)
-{
-#line 282 "mn-yahoo-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::create_config_file"
-#line 123 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 123 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (MN_IS_YAHOO_MAILBOX (self), (char * )0);
-#line 123 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (spool_file != NULL, (char * )0);
-#line 123 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (cookies_file != NULL, (char * )0);
-#line 292 "mn-yahoo-mailbox.c"
-{
-#line 128 "src/mn-yahoo-mailbox.gob"
-
- GString *contents;
- char *filename;
-
- contents = g_string_new(NULL);
-
- g_string_append_printf(contents,
- "username = %s\n"
- "password = %s\n"
- "folder = %s\n"
- "spool = %s\n"
- "cookie-file = %s\n"
- "new-messages-only = 1\n"
- "no-delete = 1\n"
- "leave-unread = 1\n",
- MN_AUTHENTICATED_MAILBOX(self)->username,
- MN_AUTHENTICATED_MAILBOX(self)->runtime_password,
- MN_WEBMAIL_MAILBOX(self)->folder,
- spool_file,
- cookies_file);
-
- if (mn_conf_get_bool(MN_CONF_SYSTEM_HTTP_PROXY_USE_HTTP_PROXY))
- {
- char *host;
-
- host = mn_conf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_HOST);
- if (host && *host)
- {
- g_string_append_printf(contents,
- "use-proxy = 1\n"
- "proxy-host = %s\n"
- "proxy-port = %i\n",
- host,
- mn_conf_get_int(MN_CONF_SYSTEM_HTTP_PROXY_PORT));
-
- if (mn_conf_get_bool(MN_CONF_SYSTEM_HTTP_PROXY_USE_AUTHENTICATION))
- {
- char *user;
- char *password;
-
- user = mn_conf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_USER);
- password = mn_conf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_PASSWORD);
-
- if (user && *user && password && *password)
- g_string_append_printf(contents,
- "proxy-username = %s\n"
- "proxy-password = %s\n",
- user,
- password);
-
- g_free(user);
- g_free(password);
- }
- }
- g_free(host);
- }
-
- mn_webmail_mailbox_print_config(MN_WEBMAIL_MAILBOX(self), contents->str);
- filename = mn_webmail_mailbox_write_temporary_file(contents->str, self_get_config_file_encoding(MN_WEBMAIL_MAILBOX(self)->folder), err);
-
- g_string_free(contents, TRUE);
-
- return filename;
- }}
-#line 359 "mn-yahoo-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 193 "src/mn-yahoo-mailbox.gob"
-static char *
-___7_mn_yahoo_mailbox_get_error_message (MNWebmailMailbox * mailbox G_GNUC_UNUSED, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure)
-#line 365 "mn-yahoo-mailbox.c"
-#define PARENT_HANDLER(___mailbox,___helper_stdout,___helper_stderr,___is_auth_failure) \
- ((MN_WEBMAIL_MAILBOX_CLASS(parent_class)->get_error_message)? \
- (* MN_WEBMAIL_MAILBOX_CLASS(parent_class)->get_error_message)(___mailbox,___helper_stdout,___helper_stderr,___is_auth_failure): \
- ((char * )0))
-{
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::get_error_message"
-{
-#line 198 "src/mn-yahoo-mailbox.gob"
-
- if (helper_stderr)
- {
- char **lines;
- int i;
- char *message = NULL;
-
- lines = g_strsplit(helper_stderr, "\n", 0);
- for (i = 0; lines[i]; i++)
- if (g_str_has_prefix(lines[i], "Failed: "))
- {
- char *escaped;
-
- if (mn_ascii_strcasestr(lines[i], "wrong password")
- || mn_ascii_strcasestr(lines[i], "invalid ID")
- || (mn_ascii_strcasestr(lines[i], "Yahoo user")
- && mn_ascii_strcasestr(lines[i], "does not exist")))
- *is_auth_failure = TRUE;
-
- escaped = mn_utf8_escape(lines[i] + 8);
- message = g_strdup_printf(_("\"%s\""), escaped);
- g_free(escaped);
-
- break;
- }
- g_strfreev(lines);
-
- if (message)
- return message;
-
- if (mn_ascii_strcasestr(helper_stderr, "an image of text"))
- return g_strdup(_("delay between mail checks too small"));
- }
-
- return NULL;
- }}
-#line 410 "mn-yahoo-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 235 "src/mn-yahoo-mailbox.gob"
-static gboolean
-mn_yahoo_mailbox_run_fetchyahoo (MNYahooMailbox * self, const char * config_file, GError ** err)
-{
-#line 418 "mn-yahoo-mailbox.c"
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::run_fetchyahoo"
-#line 235 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 235 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (MN_IS_YAHOO_MAILBOX (self), (gboolean )0);
-#line 235 "src/mn-yahoo-mailbox.gob"
- g_return_val_if_fail (config_file != NULL, (gboolean )0);
-#line 426 "mn-yahoo-mailbox.c"
-{
-#line 237 "src/mn-yahoo-mailbox.gob"
-
- char *command;
- gboolean status;
-
- command = g_strdup_printf("fetchyahoo --configfile=%s", config_file);
- status = mn_webmail_mailbox_run_helper(MN_WEBMAIL_MAILBOX(self), "fetchyahoo", command, err);
- g_free(command);
-
- return status;
- }}
-#line 439 "mn-yahoo-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 248 "src/mn-yahoo-mailbox.gob"
-static gboolean
-___9_mn_yahoo_mailbox_webmail_check (MNWebmailMailbox * mailbox G_GNUC_UNUSED, GError ** err)
-#line 445 "mn-yahoo-mailbox.c"
-#define PARENT_HANDLER(___mailbox,___err) \
- ((MN_WEBMAIL_MAILBOX_CLASS(parent_class)->webmail_check)? \
- (* MN_WEBMAIL_MAILBOX_CLASS(parent_class)->webmail_check)(___mailbox,___err): \
- ((gboolean )0))
-{
-#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::webmail_check"
-{
-#line 250 "src/mn-yahoo-mailbox.gob"
-
- Self *self = SELF(mailbox);
- char *spool_file;
- char *cookies_file;
- char *config_file = NULL;
- gboolean status = FALSE;
-
- /*
- * We create an empty spool file beforehand to make sure it is not
- * world-readable.
- */
- spool_file = mn_webmail_mailbox_create_spool_file(err);
- if (! spool_file)
- return FALSE;
-
- /*
- * Likewise, we create an empty cookies file beforehand to make
- * sure it is not world-readable.
- */
- cookies_file = self_create_cookies_file(err);
- if (! cookies_file)
- goto end;
-
- /*
- * We create a config file rather than use command line arguments
- * because for obvious reasons, we must not pass the password on
- * the command line.
- */
- config_file = self_create_config_file(self, spool_file, cookies_file, err);
- if (! config_file)
- goto end;
-
- if (! self_run_fetchyahoo(self, config_file, err))
- goto end;
-
- if (! mn_webmail_mailbox_read_spool_file(mailbox, spool_file, err))
- goto end;
-
- status = TRUE;
-
- end:
- unlink(spool_file);
- g_free(spool_file);
-
- g_free(cookies_file);
-
- if (config_file)
- {
- unlink(config_file);
- g_free(config_file);
- }
-
- return status;
- }}
-#line 508 "mn-yahoo-mailbox.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
diff --git a/build/src/mn-yahoo-mailbox.gob.stamp b/build/src/mn-yahoo-mailbox.gob.stamp
diff --git a/build/src/mn-yahoo-mailbox.h b/build/src/mn-yahoo-mailbox.h
@@ -1,57 +0,0 @@
-/* Generated by GOB (v2.0.17) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include "mn-webmail-mailbox.h"
-
-#ifndef __MN_YAHOO_MAILBOX_H__
-#define __MN_YAHOO_MAILBOX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_YAHOO_MAILBOX (mn_yahoo_mailbox_get_type())
-#define MN_YAHOO_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_yahoo_mailbox_get_type(), MNYahooMailbox)
-#define MN_YAHOO_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_yahoo_mailbox_get_type(), MNYahooMailbox const)
-#define MN_YAHOO_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_yahoo_mailbox_get_type(), MNYahooMailboxClass)
-#define MN_IS_YAHOO_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_yahoo_mailbox_get_type ())
-
-#define MN_YAHOO_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_yahoo_mailbox_get_type(), MNYahooMailboxClass)
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_YAHOO_MAILBOX__
-#define __TYPEDEF_MN_YAHOO_MAILBOX__
-typedef struct _MNYahooMailbox MNYahooMailbox;
-#endif
-struct _MNYahooMailbox {
- MNWebmailMailbox __parent__;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNYahooMailboxClass MNYahooMailboxClass;
-struct _MNYahooMailboxClass {
- MNWebmailMailboxClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_yahoo_mailbox_get_type (void) G_GNUC_CONST;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif