diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/exchange-operations/exchange-mail-send-options.c | 143 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-send-options.c | 348 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-send-options.glade | 326 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-send-options.h | 76 |
4 files changed, 893 insertions, 0 deletions
diff --git a/plugins/exchange-operations/exchange-mail-send-options.c b/plugins/exchange-operations/exchange-mail-send-options.c new file mode 100644 index 0000000000..65533d8ed2 --- /dev/null +++ b/plugins/exchange-operations/exchange-mail-send-options.c @@ -0,0 +1,143 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Authors: R.Raghavendran <raghavguru7@gmail.com> + * + * Copyright 2004 Novell, Inc. (www.novell.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. + * + */ + +#include <string.h> +#include <stdio.h> + +#include <glib.h> +#include <glib/gi18n.h> + +#include <camel/camel-mime-message.h> +#include "mail/em-event.h" + +#include "composer/e-msg-composer.h" +#include "libedataserver/e-account.h" + +#include "exchange-send-options.h" + +void org_gnome_exchange_send_options (EPlugin *ep, EMEventTargetComposer *t); + +static ExchangeSendOptionsDialog *dialog=NULL; + +static void +append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data) +{ + EMsgComposer *composer; + composer = (EMsgComposer *)data; + if (state == GTK_RESPONSE_OK) { + if (dialog->options->importance) { + switch (dialog->options->importance) { + case E_IMP_HIGH : + e_msg_composer_modify_header (composer, "Importance", "high"); + break; + case E_IMP_LOW : + e_msg_composer_modify_header (composer, "Importance", "low"); + break; + default : + g_print ("\nNo importance set"); + break; + } + } + else + e_msg_composer_remove_header (composer, "Importance"); + + if (dialog->options->sensitivity) { + switch (dialog->options->sensitivity) { + case E_SENSITIVITY_CONFIDENTIAL : + e_msg_composer_modify_header (composer, "Sensitivity", "Company-Confidential"); + break; + case E_SENSITIVITY_PERSONAL : + e_msg_composer_modify_header (composer, "Sensitivity", "Personal"); + break; + case E_SENSITIVITY_PRIVATE : + e_msg_composer_modify_header (composer, "Sensitivity", "Private"); + break; + default : + g_print ("\nNo importance set"); + break; + } + } + else + e_msg_composer_remove_header (composer, "Sensitivity"); + + if (dialog->options->delivery_enabled) { + EMsgComposerHdrs *hdrs = e_msg_composer_get_hdrs(composer); + + char *mdn_address = hdrs->account->id->reply_to; + if (!mdn_address || !*mdn_address) + mdn_address = hdrs->account->id->address; + e_msg_composer_modify_header (composer, "Return-Receipt-To", mdn_address); + } + else + e_msg_composer_remove_header (composer, "Return-Receipt-To"); + + if (dialog->options->read_enabled) { + EMsgComposerHdrs *hdrs = e_msg_composer_get_hdrs(composer); + + char *mdn_address = hdrs->account->id->reply_to; + if (!mdn_address || !*mdn_address) + mdn_address = hdrs->account->id->address; + + e_msg_composer_modify_header (composer, "Disposition-Notification-To", mdn_address); + } + else + e_msg_composer_remove_header (composer, "Disposition-Notification-To"); + } +} + +static void +send_options_commit (EMsgComposer *comp, gpointer user_data) +{ + if (!user_data && !EXCHANGE_IS_SENDOPTIONS_DIALOG (user_data)) + return; + + if (dialog) { + g_print ("\nDialog getting unreferenced "); + g_object_unref (dialog); + dialog = NULL; + } +} + +void +org_gnome_exchange_send_options (EPlugin *ep, EMEventTargetComposer *target) +{ + EMsgComposer *composer = target->composer; + EAccount *account = NULL; + char *temp = NULL; + + account = e_msg_composer_get_preferred_account (composer) ; + temp = strstr (account->transport->url, "exchange") ; + if (!temp) { + return; + } + e_msg_composer_set_send_options (composer, TRUE); + /*disply the send options dialog*/ + if (!dialog) { + g_print ("New dialog\n\n") ; + dialog = exchange_sendoptions_dialog_new () ; + } + exchange_sendoptions_dialog_run (dialog, composer) ; + g_signal_connect (dialog, "sod_response", G_CALLBACK (append_to_header), composer); + + g_signal_connect (GTK_WIDGET (composer), "destroy", + G_CALLBACK (send_options_commit), dialog); + +} diff --git a/plugins/exchange-operations/exchange-send-options.c b/plugins/exchange-operations/exchange-send-options.c new file mode 100644 index 0000000000..9215c42e8c --- /dev/null +++ b/plugins/exchange-operations/exchange-send-options.c @@ -0,0 +1,348 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Authors: R.Raghavendran <raghavguru7@gmail.com> + * + * Copyright (C) 2004 Novell, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Bangalore, MA 02111-1307, India. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <string.h> +#include <glib.h> +#include <gtk/gtksignal.h> +#include <gtk/gtktogglebutton.h> +#include <gtk/gtk.h> +#include <libgnome/libgnome.h> +#include <libgnome/gnome-i18n.h> +#include <glade/glade.h> + +#include "e-util/e-util-private.h" + +#include "exchange-send-options.h" + +struct _ExchangeSendOptionsDialogPrivate { + /* Glade XML data */ + GladeXML *xml; + + /*Widgets*/ + + GtkWidget *main; + + /*Importance*/ + GtkWidget *importance; + + /*Sensitivity*/ + GtkWidget *sensitivity; + + /*Read Receipt*/ + GtkWidget *read_receipt; + + /*Delivery Receipt*/ + GtkWidget *delivery_receipt; + + /*Label Widgets*/ + GtkWidget *importance_label; + GtkWidget *sensitivity_label; + char *help_section; +}; + +static void exchange_sendoptions_dialog_class_init (GObjectClass *object_class); +static void exchange_sendoptions_dialog_finalize (GObject *object); +static void exchange_sendoptions_dialog_init (GObject *object); +static void exchange_sendoptions_dialog_dispose (GObject *object); + +static GObjectClass *parent_class = NULL; +enum { + SOD_RESPONSE, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = {0}; + + +static void +exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod) +{ + ExchangeSendOptionsDialogPrivate *priv; + ExchangeSendOptions *options; + + priv = sod->priv; + options = sod->options; + + options->importance = gtk_combo_box_get_active ((GtkComboBox *)priv->importance); + options->sensitivity = gtk_combo_box_get_active ((GtkComboBox *)priv->sensitivity); + + options->delivery_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->delivery_receipt)); + options->read_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->read_receipt)); + +} + +static gboolean +get_widgets (ExchangeSendOptionsDialog *sod) +{ + ExchangeSendOptionsDialogPrivate *priv; + + priv = sod->priv; + +#define EXCHANGE(name) glade_xml_get_widget (priv->xml, name) + + priv->main = EXCHANGE ("send_options"); + if (!priv->main) + return FALSE; + + priv->importance = EXCHANGE ("imp_combo_box"); + priv->sensitivity = EXCHANGE ("sensitivity_combo_box"); + priv->read_receipt = EXCHANGE ("read_check_button"); + priv->delivery_receipt = EXCHANGE ("delivery_check_button"); + priv->importance_label = EXCHANGE ("Importance_label"); + priv->sensitivity_label = EXCHANGE ("Sensitivity_label"); + +#undef EXCHANGE + + return (priv->importance + &&priv->sensitivity + &&priv->read_receipt + &&priv->delivery_receipt + &&priv->importance_label + &&priv->sensitivity_label); +} + +static void +exchange_send_options_fill_widgets_with_data (ExchangeSendOptionsDialog *sod) +{ + ExchangeSendOptionsDialogPrivate *priv; + ExchangeSendOptions *options; + priv = sod->priv; + options = sod->options; + + priv->help_section = g_strdup ("usage-mail"); + + gtk_label_set_mnemonic_widget (GTK_LABEL (priv->importance_label), priv->importance); + gtk_label_set_mnemonic_widget (GTK_LABEL (priv->sensitivity_label), priv->sensitivity); + + gtk_combo_box_set_active ((GtkComboBox *) priv->importance, options->importance); + gtk_combo_box_set_active ((GtkComboBox *) priv->sensitivity, options->sensitivity); + + if (options->read_enabled) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->read_receipt), TRUE); + else + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->read_receipt), FALSE); + if (options->delivery_enabled) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->delivery_receipt), TRUE); + else + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->delivery_receipt), FALSE); +} + +ExchangeSendOptionsDialog * +exchange_sendoptions_dialog_new (void) { + ExchangeSendOptionsDialog *sod; + + sod = g_object_new (EXCHANGE_TYPE_SENDOPTIONS_DIALOG, NULL); + + return sod; +} + +GType exchange_sendoptions_dialog_get_type (void) +{ + static GType type = 0; + if (type == 0) { + static const GTypeInfo info = { + sizeof (ExchangeSendOptionsDialogClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) exchange_sendoptions_dialog_class_init, /* class_init */ + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (ExchangeSendOptionsDialog), + 0, /* n_preallocs */ + (GInstanceInitFunc) exchange_sendoptions_dialog_init, + NULL /* instance_init */ + }; + type = g_type_register_static (G_TYPE_OBJECT, + "ExchangeSendOptionsDialogType", + &info, 0); + } + return type; +} + +static void exchange_send_options_cb (GtkDialog *dialog, gint state, gpointer func_data) +{ + ExchangeSendOptionsDialogPrivate *priv; + ExchangeSendOptionsDialog *sod; + GError *error = NULL; + + sod = func_data; + priv = sod->priv; + + switch (state) { + case GTK_RESPONSE_OK: + exchange_send_options_get_widgets_data (sod); + case GTK_RESPONSE_CANCEL: + gtk_widget_hide (priv->main); + gtk_widget_destroy (priv->main); + g_object_unref (priv->xml); + break; + case GTK_RESPONSE_HELP: + gnome_help_display_desktop (NULL, + "evolution-" BASE_VERSION, + "evolution-" BASE_VERSION ".xml", + priv->help_section, + &error); + if (error != NULL) + g_warning ("%s", error->message); + break; + } + g_signal_emit (G_OBJECT (func_data), signals[SOD_RESPONSE], 0, state); + +} + +gboolean +exchange_sendoptions_dialog_run (ExchangeSendOptionsDialog *sod, GtkWidget *parent) +{ + ExchangeSendOptionsDialogPrivate *priv; + GtkWidget *toplevel; + gchar *filename; + + g_return_val_if_fail (sod != NULL || EXCHANGE_IS_SENDOPTIONS_DIALOG (sod), FALSE); + + priv = sod->priv; + + filename = g_build_filename (EVOLUTION_GLADEDIR, + "exchange-send-options.glade", + NULL); + priv->xml = glade_xml_new (filename, NULL, NULL); + g_free (filename); + + if (!priv->xml) { + g_message ( G_STRLOC ": Could not load the Glade XML file "); + return FALSE; + } + + if (!get_widgets(sod)) { + g_object_unref (priv->xml); + g_message (G_STRLOC ": Could not get the Widgets \n"); + return FALSE; + } + + toplevel = gtk_widget_get_toplevel (priv->main); + if (parent) + gtk_window_set_transient_for (GTK_WINDOW (toplevel), + GTK_WINDOW (parent)); + + exchange_send_options_fill_widgets_with_data (sod); + + g_signal_connect (GTK_DIALOG (priv->main), "response", G_CALLBACK(exchange_send_options_cb), sod); + + gtk_window_set_modal ((GtkWindow *)priv->main, TRUE); + gtk_widget_show (priv->main); + + return TRUE; +} + +static void +exchange_sendoptions_dialog_class_init (GObjectClass *object) +{ + ExchangeSendOptionsDialogClass *klass; + GObjectClass *object_class; + + klass = EXCHANGE_SENDOPTIONS_DIALOG_CLASS (object); + parent_class = g_type_class_peek_parent (klass); + object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = exchange_sendoptions_dialog_finalize; + object_class->dispose = exchange_sendoptions_dialog_dispose; + signals[SOD_RESPONSE] = g_signal_new ("sod_response", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (ExchangeSendOptionsDialogClass, esod_response), + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); + +} + +static void +exchange_sendoptions_dialog_init (GObject *object) +{ + + ExchangeSendOptionsDialog *sod; + ExchangeSendOptionsDialogPrivate *priv; + ExchangeSendOptions *new; + + sod = EXCHANGE_SENDOPTIONS_DIALOG (object); + new = g_new0 (ExchangeSendOptions, 1); + + priv = g_new0 (ExchangeSendOptionsDialogPrivate, 1); + + sod->priv = priv; + sod->options = new; + sod->options->delivery_enabled = FALSE; + sod->options->read_enabled = FALSE; + sod->options->importance = E_IMP_NORMAL; + sod->options->sensitivity = E_SENSITIVITY_NORMAL; + + priv->xml = NULL; + priv->main = NULL; + priv->importance = NULL; + priv->sensitivity = NULL; + priv->sensitivity_label = NULL; + priv->importance_label = NULL; + priv->read_receipt = NULL; + priv->delivery_receipt = NULL; + +} + +static void +exchange_sendoptions_dialog_finalize (GObject *object) +{ + ExchangeSendOptionsDialog *sod = (ExchangeSendOptionsDialog *)object; + ExchangeSendOptionsDialogPrivate *priv; + + g_return_if_fail (EXCHANGE_IS_SENDOPTIONS_DIALOG (sod)); + priv = sod->priv; + + g_free (priv->help_section); + + if (sod->options) { + g_free (sod->options); + sod->options = NULL; + } + + if (sod->priv) { + g_free (sod->priv); + sod->priv = NULL; + } + + if (parent_class->finalize) + (* parent_class->finalize) (object); + +} + +static void +exchange_sendoptions_dialog_dispose (GObject *object) +{ + ExchangeSendOptionsDialog *sod = (ExchangeSendOptionsDialog *) object; + + g_return_if_fail (EXCHANGE_IS_SENDOPTIONS_DIALOG (sod)); + + if (parent_class->dispose) + (* parent_class->dispose) (object); + +} + diff --git a/plugins/exchange-operations/exchange-send-options.glade b/plugins/exchange-operations/exchange-send-options.glade new file mode 100644 index 0000000000..4ca75c1675 --- /dev/null +++ b/plugins/exchange-operations/exchange-send-options.glade @@ -0,0 +1,326 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> +<requires lib="gnome"/> + +<widget class="GtkDialog" id="send_options"> + <property name="visible">True</property> + <property name="title" translatable="yes">Exchange - Send Options</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <property name="has_separator">True</property> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="send_options_vbox"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + + <child> + <widget class="GtkButton" id="helpbutton1"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-help</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-11</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="cancelbutton1"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-cancel</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-6</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="okbutton1"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-ok</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-5</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="Options_vbox"> + <property name="border_width">6</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkVBox" id="Message_settings_vbox"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="msg_settings_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Message Settings</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.490000009537</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkTable" id="msg_settings_label"> + <property name="border_width">6</property> + <property name="visible">True</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">0</property> + + <child> + <widget class="GtkLabel" id="Importance_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">I_mportance: </property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.490000009537</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="Sensitivity_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Sensitivity: </property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="sensitivity_combo_box"> + <property name="visible">True</property> + <property name="items" translatable="yes">Normal +Personal +Private +Confidential</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="imp_combo_box"> + <property name="visible">True</property> + <property name="items" translatable="yes">Normal +High +Low</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options">fill</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="track_option_vbox"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkLabel" id="Track_options_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Tracking Options</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">6</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="delivery_check_button"> + <property name="border_width">6</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Request a _delivery receipt for this message</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="read_check_button"> + <property name="border_width">6</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Request a _read receipt for this message</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> diff --git a/plugins/exchange-operations/exchange-send-options.h b/plugins/exchange-operations/exchange-send-options.h new file mode 100644 index 0000000000..8d4e2de55f --- /dev/null +++ b/plugins/exchange-operations/exchange-send-options.h @@ -0,0 +1,76 @@ + /* Evolution exchange send options + * Copyright (C) 2004 Novell, Inc. + * + * Authors: Raghavendran R<raghavguru7@gmail.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Bangalore, MA 02111-1307, India. + */ + +#ifndef __EXCHANGE_SENDOPTIONS_DIALOG_H__ +#define __EXCHANGE_SENDOPTIONS_DIALOG_H__ + +#include <gtk/gtkwidget.h> +#include <gtk/gtk.h> + + + +#define EXCHANGE_TYPE_SENDOPTIONS_DIALOG (exchange_sendoptions_dialog_get_type ()) +#define EXCHANGE_SENDOPTIONS_DIALOG(obj) (GTK_CHECK_CAST ((obj), EXCHANGE_TYPE_SENDOPTIONS_DIALOG, ExchangeSendOptionsDialog)) +#define EXCHANGE_SENDOPTIONS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXCHANGE_TYPE_SENDOPTIONS_DIALOG, ExchangeSendOptionsDialogClass)) +#define EXCHANGE_IS_SENDOPTIONS_DIALOG(obj) (GTK_CHECK_TYPE ((obj), EXCHANGE_TYPE_SENDOPTIONS_DIALOG)) +#define EXCHANGE_IS_SENDOPTIONS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), EXCHANGE_TYPE_SENDOPTIONS_DIALOG)) + +typedef struct _ExchangeSendOptionsDialog ExchangeSendOptionsDialog; +typedef struct _ExchangeSendOptionsDialogClass ExchangeSendOptionsDialogClass; +typedef struct _ExchangeSendOptionsDialogPrivate ExchangeSendOptionsDialogPrivate; + +typedef enum { + E_IMP_NORMAL, + E_IMP_HIGH, + E_IMP_LOW +} ExchangeSendOptionsImp; + +typedef enum { + E_SENSITIVITY_NORMAL, + E_SENSITIVITY_PERSONAL, + E_SENSITIVITY_PRIVATE, + E_SENSITIVITY_CONFIDENTIAL +} ExchangeSendOptionsSensitivity; + +typedef struct { + ExchangeSendOptionsImp importance; + ExchangeSendOptionsSensitivity sensitivity; + gboolean delivery_enabled; + gboolean read_enabled; +} ExchangeSendOptions ; + +struct _ExchangeSendOptionsDialog { + GObject object; + + ExchangeSendOptions *options; + /* Private data */ + ExchangeSendOptionsDialogPrivate *priv; +}; + + +struct _ExchangeSendOptionsDialogClass { + GObjectClass parent_class; + void (* esod_response) (ExchangeSendOptionsDialog *esd, gint status); +}; + +GType exchange_sendoptions_dialog_get_type (void); +ExchangeSendOptionsDialog *exchange_sendoptions_dialog_new (void); +gboolean exchange_sendoptions_dialog_run (ExchangeSendOptionsDialog *sod, GtkWidget *parent); +#endif + |