diff options
author | Dan Winship <danw@src.gnome.org> | 2000-10-24 04:39:28 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-10-24 04:39:28 +0800 |
commit | 220526cd7ca1ca4c1fd0f9a94985f6ac40b33b6e (patch) | |
tree | b5ca5af23b1c2dd7750788a08a8ffdae8ebb4a12 | |
parent | f842b74c9a64a6ee4d77a0808a9a1d0110cc1c23 (diff) | |
download | gsoc2013-evolution-220526cd7ca1ca4c1fd0f9a94985f6ac40b33b6e.tar.gz gsoc2013-evolution-220526cd7ca1ca4c1fd0f9a94985f6ac40b33b6e.tar.zst gsoc2013-evolution-220526cd7ca1ca4c1fd0f9a94985f6ac40b33b6e.zip |
Old cruft. Remove.
* e-msg-composer-address-dialog.*, e-msg-composer-address-entry.*:
Old cruft. Remove.
* Makefile.am: Update for removed files.
* e-msg-composer-hdrs.c: Remove e-msg-composer-address-entry.h
include.
* e-msg-composer.c: Remove e-msg-composer-address-dialog.h include
svn path=/trunk/; revision=6130
-rw-r--r-- | composer/ChangeLog | 12 | ||||
-rw-r--r-- | composer/Makefile.am | 6 | ||||
-rw-r--r-- | composer/e-msg-composer-address-dialog.c | 660 | ||||
-rw-r--r-- | composer/e-msg-composer-address-dialog.glade | 576 | ||||
-rw-r--r-- | composer/e-msg-composer-address-dialog.glade.h | 19 | ||||
-rw-r--r-- | composer/e-msg-composer-address-dialog.h | 75 | ||||
-rw-r--r-- | composer/e-msg-composer-address-entry.c | 183 | ||||
-rw-r--r-- | composer/e-msg-composer-address-entry.h | 63 | ||||
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 1 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 1 |
10 files changed, 12 insertions, 1584 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 8b6890807d..b12591d5c9 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,15 @@ +2000-10-23 Dan Winship <danw@helixcode.com> + + * e-msg-composer-address-dialog.*, e-msg-composer-address-entry.*: + Old cruft. Remove. + + * Makefile.am: Update for removed files. + + * e-msg-composer-hdrs.c: Remove e-msg-composer-address-entry.h + include. + + * e-msg-composer.c: Remove e-msg-composer-address-dialog.h include + 2000-10-23 Ariel Rios <ariel@arcavia.com> * e-msg-composer-hdrs.c: Include Composer.h diff --git a/composer/Makefile.am b/composer/Makefile.am index 4c0775b924..e0208e8a94 100644 --- a/composer/Makefile.am +++ b/composer/Makefile.am @@ -21,11 +21,9 @@ $(IDL_GENERATED): $(IDLS) $(selectnamesdir)/Evolution-Addressbook-SelectNames.id gladedir = $(datadir)/evolution/glade glade_DATA = \ - e-msg-composer-address-dialog.glade \ e-msg-composer-attachment.glade glade_messages = \ - e-msg-composer-address-dialog.glade.h \ e-msg-composer-attachment.glade.h libcomposerincludedir = $(includedir)/composer @@ -53,10 +51,6 @@ INCLUDES = \ libcomposer_la_SOURCES = \ $(IDL_GENERATED) \ - e-msg-composer-address-dialog.c \ - e-msg-composer-address-dialog.h \ - e-msg-composer-address-entry.c \ - e-msg-composer-address-entry.h \ e-msg-composer-attachment-bar.c \ e-msg-composer-attachment-bar.h \ e-msg-composer-attachment.c \ diff --git a/composer/e-msg-composer-address-dialog.c b/composer/e-msg-composer-address-dialog.c deleted file mode 100644 index 1bf0dd4832..0000000000 --- a/composer/e-msg-composer-address-dialog.c +++ /dev/null @@ -1,660 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-msg-composer-address-dialog.c - * - * Copyright (C) 1999 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * 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, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#include <gnome.h> -#include "e-msg-composer-address-dialog.h" -#include <gal/widgets/e-unicode.h> - - -enum { - APPLY, - LAST_SIGNAL -}; -static guint signals[LAST_SIGNAL] = { 0 }; - -static GnomeDialogClass *parent_class = NULL; - - -/* This function should load the addresses we know of into the dialog. We - don't have a precise setup for the addressbook yet, so we will just put some - fake entries in. */ -static void -load_addresses (EMsgComposerAddressDialog *dialog) -{ - gchar *text[][3] = { - { "Bertrand Guiheneuf", "Bertrand.Guiheneuf@aful.org", NULL }, - { "Ettore Perazzoli", "ettore@gnu.org", NULL }, - { "Miguel de Icaza", "miguel@gnu.org", NULL }, - { "Nat Friedman", "nat@nat.org", NULL }, - { NULL, NULL, NULL } - }; - GtkCList *clist; - guint i; - - clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, "address_clist")); - - for (i = 0; text[i][0] != NULL; i++) - e_utf8_gtk_clist_append (clist, text[i]); -} - -/* Combine name and email into an address, e.g. "Ettore Perazzoli - <ettore@gnu.org>". FIXME FIXME FIXME this does not handle quoting (commas - will cause troubles), but it should. */ -static gchar * -make_full_address (const gchar *name, - const gchar *email) -{ - return g_strconcat (name, " <", email, ">", NULL); -} - -/* This loads the selected address in the address GtkCList into the requested - GtkList. */ -static void -add_address (EMsgComposerAddressDialog *dialog, - const gchar *list_name) -{ - GtkCList *src_clist; - GtkCList *dest_clist; - gchar *name, *email; - gchar *text[2]; - guint row; - - src_clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, - "address_clist")); - if (src_clist->selection == NULL) - return; - - dest_clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, list_name)); - row = GPOINTER_TO_INT (src_clist->selection->data); - - gtk_clist_get_text (src_clist, row, 0, &name); - gtk_clist_get_text (src_clist, row, 1, &email); - - name = e_utf8_from_gtk_string ((GtkWidget *) src_clist, name); - - text[0] = make_full_address (name, email); - text[1] = NULL; - - e_utf8_gtk_clist_append (dest_clist, text); - - g_free (text[0]); - g_free (name); -} - -static void -apply (EMsgComposerAddressDialog *dialog) -{ - gtk_signal_emit (GTK_OBJECT (dialog), signals[APPLY]); -} - - -/* Recipient list popup menu. */ - -struct _RecipientListInfo { - EMsgComposerAddressDialog *dialog; - GtkCList *clist; - gint row; /* -1 if menu was popped up in an empty - area. */ -}; -typedef struct _RecipientListInfo RecipientListInfo; - -static void -copy_recipient (RecipientListInfo *info, - gboolean remove) -{ - gchar *text; - gint row; - - if (info->clist->selection == NULL) - return; - - row = GPOINTER_TO_INT (info->clist->selection->data); - gtk_clist_get_text (info->clist, row, 0, &text); - - g_free (info->dialog->cut_buffer); - info->dialog->cut_buffer = g_strdup (text); - - if (remove) - gtk_clist_remove (info->clist, row); - - gtk_selection_owner_set (GTK_WIDGET (info->clist), - GDK_SELECTION_PRIMARY, - GDK_CURRENT_TIME); -} - -static void -copy_recipient_cb (GtkWidget *widget, - gpointer data) -{ - RecipientListInfo *info; - - info = (RecipientListInfo *) data; - copy_recipient (info, FALSE); - g_free (info); -} - -static void -cut_recipient_cb (GtkWidget *widget, - gpointer data) -{ - RecipientListInfo *info; - - info = (RecipientListInfo *) data; - copy_recipient (info, TRUE); - g_free (info); -} - -static void -paste_recipient_cb (GtkWidget *widget, - gpointer data) -{ - RecipientListInfo *info; - GdkAtom atom; - - info = (RecipientListInfo *) data; - - atom = gdk_atom_intern ("STRING", FALSE); - gtk_selection_convert (GTK_WIDGET (info->clist), - GDK_SELECTION_PRIMARY, - atom, - GDK_CURRENT_TIME); - - g_free (info); -} - -static GnomeUIInfo recipient_list_item_popup_info[] = { - GNOMEUIINFO_ITEM_STOCK (N_("Cut"), - N_("Cut selected item into clipboard"), - cut_recipient_cb, - GNOME_STOCK_MENU_CUT), - GNOMEUIINFO_ITEM_STOCK (N_("Copy"), - N_("Copy selected item into clipboard"), - copy_recipient_cb, - GNOME_STOCK_MENU_COPY), - GNOMEUIINFO_ITEM_STOCK (N_("Paste"), - N_("Paste item from clipboard"), - paste_recipient_cb, - GNOME_STOCK_MENU_PASTE), - GNOMEUIINFO_END -}; - -static GnomeUIInfo recipient_list_popup_info[] = { - GNOMEUIINFO_ITEM_STOCK (N_("Paste"), - N_("Paste item from clipboard"), - paste_recipient_cb, - GNOME_STOCK_MENU_PASTE), - GNOMEUIINFO_END -}; - - -/* Signals. */ - -static void -add_to_cb (GtkWidget *widget, - gpointer data) -{ - add_address (E_MSG_COMPOSER_ADDRESS_DIALOG (data), "to_clist"); -} - -static void -add_cc_cb (GtkWidget *widget, - gpointer data) -{ - add_address (E_MSG_COMPOSER_ADDRESS_DIALOG (data), "cc_clist"); -} - -static void -add_bcc_cb (GtkWidget *widget, - gpointer data) -{ - add_address (E_MSG_COMPOSER_ADDRESS_DIALOG (data), "bcc_clist"); -} - -static void -glade_connect (GladeXML *gui, - const gchar *widget_name, - const gchar *signal_name, - GtkSignalFunc callback, - gpointer callback_data) -{ - GtkWidget *widget; - - widget = glade_xml_get_widget (gui, widget_name); - if (widget == NULL) - g_warning ("Widget `%s' was not found.", widget_name); - else - gtk_signal_connect (GTK_OBJECT (widget), signal_name, - GTK_SIGNAL_FUNC (callback), callback_data); -} - -static gint -recipient_clist_button_press_cb (GtkWidget *widget, - GdkEventButton *event, - gpointer data) -{ - EMsgComposerAddressDialog *dialog; - RecipientListInfo *info; - GtkWidget *popup; - GtkCList *clist; - gboolean on_row; - gint row, column; - - dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (data); - - clist = GTK_CLIST (widget); - - if (event->window != clist->clist_window || event->button != 3) - return FALSE; - - on_row = gtk_clist_get_selection_info (clist, event->x, event->y, - &row, &column); - - info = g_new (RecipientListInfo, 1); - info->dialog = dialog; - info->clist = clist; - - if (on_row) { - gtk_clist_unselect_all (clist); - gtk_clist_select_row (clist, row, 0); - info->row = row; - popup = gnome_popup_menu_new (recipient_list_item_popup_info); - } else { - info->row = -1; - popup = gnome_popup_menu_new (recipient_list_popup_info); - } - - gnome_popup_menu_do_popup_modal (popup, NULL, NULL, event, info); - - gtk_widget_destroy (popup); - - return TRUE; -} - -/* FIXME needs more work. */ -static void -recipient_clist_selection_received_cb (GtkWidget *widget, - GtkSelectionData *selection_data, - guint time, - gpointer data) -{ - GtkCList *clist; - gchar *text[2]; - gchar *p; - - puts (__FUNCTION__); - - if (selection_data->length < 0) - return; - - clist = GTK_CLIST (widget); - - /* FIXME quoting. */ - text[0] = g_strdup (selection_data->data); - text[1] = NULL; - - /* It is a common mistake to paste `\n's, let's work around that. */ - for (p = text[0]; *p != '\0'; p++) { - if (*p == '\n') { - *p = '\0'; - break; - } - } - - if (clist->selection != NULL) { - gint row; - - row = GPOINTER_TO_INT (clist->selection->data); - gtk_clist_insert (clist, row, text); - } else { - gtk_clist_append (clist, text); - } - - g_free (text[0]); -} - -static void -recipient_clist_selection_get_cb (GtkWidget *widget, - GtkSelectionData *selection_data, - guint info, - guint time, - gpointer data) -{ - EMsgComposerAddressDialog *dialog; - GdkAtom atom; - - puts (__FUNCTION__); - - dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (data); - if (dialog->cut_buffer == NULL) - return; /* FIXME should I do something special? */ - - atom = gdk_atom_intern ("STRING", FALSE); - gtk_selection_data_set (selection_data, atom, 8, - dialog->cut_buffer, - strlen (dialog->cut_buffer)); -} - -static void -recipient_clist_selection_clear_event_cb (GtkWidget *widget, - GdkEventSelection *selection, - gpointer data) -{ - EMsgComposerAddressDialog *dialog; - - dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (data); - g_free (dialog->cut_buffer); - dialog->cut_buffer = NULL; -} - -static void -setup_recipient_list_signals (EMsgComposerAddressDialog *dialog, - const gchar *name) -{ - glade_connect (dialog->gui, name, "button_press_event", - GTK_SIGNAL_FUNC (recipient_clist_button_press_cb), - dialog); - glade_connect (dialog->gui, name, "selection_received", - GTK_SIGNAL_FUNC (recipient_clist_selection_received_cb), - dialog); - glade_connect (dialog->gui, name, "selection_get", - GTK_SIGNAL_FUNC (recipient_clist_selection_get_cb), - dialog); - glade_connect (dialog->gui, name, "selection_clear_event", - GTK_SIGNAL_FUNC (recipient_clist_selection_clear_event_cb), - dialog); -} - -static void -setup_signals (EMsgComposerAddressDialog *dialog) -{ - glade_connect (dialog->gui, "to_add_button", "clicked", - GTK_SIGNAL_FUNC (add_to_cb), dialog); - glade_connect (dialog->gui, "cc_add_button", "clicked", - GTK_SIGNAL_FUNC (add_cc_cb), dialog); - glade_connect (dialog->gui, "bcc_add_button", "clicked", - GTK_SIGNAL_FUNC (add_bcc_cb), dialog); - - setup_recipient_list_signals (dialog, "to_clist"); - setup_recipient_list_signals (dialog, "cc_clist"); - setup_recipient_list_signals (dialog, "bcc_clist"); -} - - -static void -setup_selection_targets (EMsgComposerAddressDialog *dialog) -{ - gtk_selection_add_target (glade_xml_get_widget (dialog->gui, "to_clist"), - GDK_SELECTION_PRIMARY, - GDK_SELECTION_TYPE_STRING, 0); - gtk_selection_add_target (glade_xml_get_widget (dialog->gui, "cc_clist"), - GDK_SELECTION_PRIMARY, - GDK_SELECTION_TYPE_STRING, 0); - gtk_selection_add_target (glade_xml_get_widget (dialog->gui, "bcc_clist"), - GDK_SELECTION_PRIMARY, - GDK_SELECTION_TYPE_STRING, 0); -} - - -/* GnomeDialog methods. */ - -static void -clicked (GnomeDialog *dialog, - gint button_number) -{ - switch (button_number) { - case 0: /* OK */ - apply (E_MSG_COMPOSER_ADDRESS_DIALOG (dialog)); - gnome_dialog_close (dialog); - break; - case 1: /* Apply */ - apply (E_MSG_COMPOSER_ADDRESS_DIALOG (dialog)); - break; - case 2: /* Cancel */ - gnome_dialog_close (dialog); - break; - } -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EMsgComposerAddressDialog *dialog; - - dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (object); - - gtk_object_unref (GTK_OBJECT (dialog->gui)); - g_free (dialog->cut_buffer); - - if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* Initialization. */ - -static void -class_init (EMsgComposerAddressDialogClass *class) -{ - GtkObjectClass *object_class; - GnomeDialogClass *gnome_dialog_class; - - object_class = GTK_OBJECT_CLASS (class); - object_class->destroy = destroy; - - gnome_dialog_class = GNOME_DIALOG_CLASS (class); - gnome_dialog_class->clicked = clicked; - - parent_class = gtk_type_class (gnome_dialog_get_type ()); - - signals[APPLY] - = gtk_signal_new ("apply", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EMsgComposerAddressDialogClass, - apply), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -init (EMsgComposerAddressDialog *dialog) -{ - dialog->gui = NULL; - dialog->cut_buffer = NULL; -} - - -GtkType -e_msg_composer_address_dialog_get_type (void) -{ - static GtkType type = 0; - - if (type == 0) { - static const GtkTypeInfo info = { - "EMsgComposerAddressDialog", - sizeof (EMsgComposerAddressDialog), - sizeof (EMsgComposerAddressDialogClass), - (GtkClassInitFunc) class_init, - (GtkObjectInitFunc) init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - type = gtk_type_unique (gnome_dialog_get_type (), &info); - } - - return type; -} - -void -e_msg_composer_address_dialog_construct (EMsgComposerAddressDialog *dialog) -{ - static const gchar *buttons[] = { - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_APPLY, - GNOME_STOCK_BUTTON_CANCEL, - NULL - }; - - g_return_if_fail (dialog != NULL); - g_return_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog)); - - gnome_dialog_constructv (GNOME_DIALOG (dialog), - _("Select recipients' addresses"), - buttons); - - dialog->gui = glade_xml_new - (E_GLADEDIR "/e-msg-composer-address-dialog.glade", - "main_table"); - if (dialog->gui == NULL) { - g_warning ("Cannot load `e-msg-composer-address-dialog.glade"); - return; - } - - gtk_container_add (GTK_CONTAINER (GNOME_DIALOG (dialog)->vbox), - glade_xml_get_widget (dialog->gui, "main_table")); - - setup_selection_targets (dialog); - load_addresses (dialog); - setup_signals (dialog); -} - -GtkWidget * -e_msg_composer_address_dialog_new (void) -{ - EMsgComposerAddressDialog *new; - - new = gtk_type_new (e_msg_composer_address_dialog_get_type ()); - e_msg_composer_address_dialog_construct (new); - - return GTK_WIDGET (new); -} - - -static void -set_list (EMsgComposerAddressDialog *dialog, - const gchar *list_name, - GList *list) -{ - GtkCList *clist; - GList *p; - gchar *text[2]; - - clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, list_name)); - - gtk_clist_freeze (clist); - gtk_clist_clear (clist); - - text[1] = NULL; - for (p = list; p != NULL; p = p->next) { - text[0] = (gchar *) p->data; - e_utf8_gtk_clist_append (clist, text); - } - - gtk_clist_thaw (clist); -} - -void -e_msg_composer_address_dialog_set_to_list (EMsgComposerAddressDialog *dialog, - GList *to_list) -{ - g_return_if_fail (dialog != NULL); - g_return_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog)); - - set_list (dialog, "to_clist", to_list); -} - -void -e_msg_composer_address_dialog_set_cc_list (EMsgComposerAddressDialog *dialog, - GList *cc_list) -{ - g_return_if_fail (dialog != NULL); - g_return_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog)); - - set_list (dialog, "cc_clist", cc_list); -} - -void -e_msg_composer_address_dialog_set_bcc_list (EMsgComposerAddressDialog *dialog, - GList *bcc_list) -{ - g_return_if_fail (dialog != NULL); - g_return_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog)); - - set_list (dialog, "bcc_clist", bcc_list); -} - - -static GList * -get_list (EMsgComposerAddressDialog *dialog, - const gchar *clist_name) -{ - GtkCList *clist; - GList *list; - guint i; - - clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, clist_name)); - - list = NULL; - for (i = 0; i < clist->rows; i++) { - gchar *addr; - - gtk_clist_get_text (clist, i, 0, &addr); - list = g_list_prepend (list, g_strdup (addr)); - } - - return g_list_reverse (list); -} - -GList * -e_msg_composer_address_dialog_get_to_list (EMsgComposerAddressDialog *dialog) -{ - g_return_val_if_fail (dialog != NULL, NULL); - g_return_val_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog), NULL); - - return get_list (dialog, "to_clist"); -} - -GList * -e_msg_composer_address_dialog_get_cc_list (EMsgComposerAddressDialog *dialog) -{ - g_return_val_if_fail (dialog != NULL, NULL); - g_return_val_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog), NULL); - - return get_list (dialog, "cc_clist"); -} - -GList * -e_msg_composer_address_dialog_get_bcc_list (EMsgComposerAddressDialog *dialog) -{ - g_return_val_if_fail (dialog != NULL, NULL); - g_return_val_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog), NULL); - - return get_list (dialog, "bcc_clist"); -} diff --git a/composer/e-msg-composer-address-dialog.glade b/composer/e-msg-composer-address-dialog.glade deleted file mode 100644 index c90ef3f245..0000000000 --- a/composer/e-msg-composer-address-dialog.glade +++ /dev/null @@ -1,576 +0,0 @@ -<?xml version="1.0"?> -<GTK-Interface> - -<project> - <name>address-composer</name> - <program_name>address-composer</program_name> - <directory></directory> - <source_directory>src</source_directory> - <pixmaps_directory>pixmaps</pixmaps_directory> - <language>C</language> - <gnome_support>True</gnome_support> - <gettext_support>True</gettext_support> - <use_widget_names>False</use_widget_names> - <output_main_file>True</output_main_file> - <output_support_files>True</output_support_files> - <output_build_files>True</output_build_files> - <backup_source_files>True</backup_source_files> - <main_source_file>interface.c</main_source_file> - <main_header_file>interface.h</main_header_file> - <handler_source_file>callbacks.c</handler_source_file> - <handler_header_file>callbacks.h</handler_header_file> - <support_source_file>support.c</support_source_file> - <support_header_file>support.h</support_header_file> - <output_translatable_strings>True</output_translatable_strings> - <translatable_strings_file>e-msg-composer-address-dialog.glade.h</translatable_strings_file> -</project> - -<widget> - <class>GnomeDialog</class> - <name>dialog1</name> - <type>GTK_WINDOW_TOPLEVEL</type> - <position>GTK_WIN_POS_NONE</position> - <modal>False</modal> - <allow_shrink>False</allow_shrink> - <allow_grow>False</allow_grow> - <auto_shrink>False</auto_shrink> - <auto_close>False</auto_close> - <hide_on_close>False</hide_on_close> - - <widget> - <class>GtkVBox</class> - <child_name>GnomeDialog:vbox</child_name> - <name>dialog-vbox1</name> - <homogeneous>False</homogeneous> - <spacing>8</spacing> - <child> - <padding>4</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkTable</class> - <name>main_table</name> - <rows>3</rows> - <columns>2</columns> - <homogeneous>False</homogeneous> - <row_spacing>0</row_spacing> - <column_spacing>2</column_spacing> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkLabel</class> - <name>label3</name> - <label></label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>2</top_attach> - <bottom_attach>3</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>False</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> - <class>GtkLabel</class> - <name>label1</name> - <label>Recipient list:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>0</top_attach> - <bottom_attach>1</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>True</xexpand> - <yexpand>True</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>True</yfill> - </child> - </widget> - - <widget> - <class>GtkHBox</class> - <name>hbox1</name> - <homogeneous>False</homogeneous> - <spacing>5</spacing> - <child> - <left_attach>0</left_attach> - <right_attach>1</right_attach> - <top_attach>0</top_attach> - <bottom_attach>1</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>False</xfill> - <yfill>False</yfill> - </child> - - <widget> - <class>GtkLabel</class> - <name>label2</name> - <label>Name:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - - <widget> - <class>GtkEntry</class> - <name>name_entry</name> - <can_focus>True</can_focus> - <editable>True</editable> - <text_visible>True</text_visible> - <text_max_length>0</text_max_length> - <text></text> - <child> - <padding>5</padding> - <expand>True</expand> - <fill>True</fill> - </child> - </widget> - - <widget> - <class>GtkButton</class> - <name>search_button</name> - <width>65</width> - <can_focus>True</can_focus> - <label>Search...</label> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - </widget> - - <widget> - <class>GtkScrolledWindow</class> - <name>scrolledwindow1</name> - <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy> - <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy> - <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> - <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> - <child> - <left_attach>0</left_attach> - <right_attach>1</right_attach> - <top_attach>1</top_attach> - <bottom_attach>2</bottom_attach> - <xpad>0</xpad> - <ypad>5</ypad> - <xexpand>True</xexpand> - <yexpand>True</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>True</yfill> - </child> - - <widget> - <class>GtkCList</class> - <name>address_clist</name> - <width>180</width> - <height>200</height> - <can_focus>True</can_focus> - <columns>2</columns> - <column_widths>128,107</column_widths> - <selection_mode>GTK_SELECTION_BROWSE</selection_mode> - <show_titles>True</show_titles> - <shadow_type>GTK_SHADOW_IN</shadow_type> - - <widget> - <class>GtkLabel</class> - <child_name>CList:title</child_name> - <name>label5</name> - <width>50</width> - <label>Name</label> - <justify>GTK_JUSTIFY_LEFT</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - - <widget> - <class>GtkLabel</class> - <child_name>CList:title</child_name> - <name>label6</name> - <width>100</width> - <label>Address</label> - <justify>GTK_JUSTIFY_LEFT</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - </widget> - </widget> - - <widget> - <class>GtkHBox</class> - <name>hbox2</name> - <homogeneous>True</homogeneous> - <spacing>10</spacing> - <child> - <left_attach>0</left_attach> - <right_attach>1</right_attach> - <top_attach>2</top_attach> - <bottom_attach>3</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>True</yfill> - </child> - - <widget> - <class>GtkButton</class> - <name>button5</name> - <can_focus>True</can_focus> - <label>Properties...</label> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - </widget> - - <widget> - <class>GtkButton</class> - <name>button6</name> - <can_focus>True</can_focus> - <label>Add...</label> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - </widget> - </widget> - - <widget> - <class>GtkTable</class> - <name>table2</name> - <rows>3</rows> - <columns>2</columns> - <homogeneous>False</homogeneous> - <row_spacing>0</row_spacing> - <column_spacing>0</column_spacing> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>1</top_attach> - <bottom_attach>2</bottom_attach> - <xpad>0</xpad> - <ypad>5</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>True</yfill> - </child> - - <widget> - <class>GtkButton</class> - <name>to_add_button</name> - <width>60</width> - <can_focus>True</can_focus> - <label>To: >></label> - <child> - <left_attach>0</left_attach> - <right_attach>1</right_attach> - <top_attach>0</top_attach> - <bottom_attach>1</bottom_attach> - <xpad>5</xpad> - <ypad>0</ypad> - <xexpand>True</xexpand> - <yexpand>True</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> - <class>GtkButton</class> - <name>cc_add_button</name> - <width>60</width> - <can_focus>True</can_focus> - <label>Cc: >></label> - <child> - <left_attach>0</left_attach> - <right_attach>1</right_attach> - <top_attach>1</top_attach> - <bottom_attach>2</bottom_attach> - <xpad>5</xpad> - <ypad>0</ypad> - <xexpand>True</xexpand> - <yexpand>True</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> - <class>GtkButton</class> - <name>bcc_add_button</name> - <width>60</width> - <can_focus>True</can_focus> - <label>Bcc: >></label> - <child> - <left_attach>0</left_attach> - <right_attach>1</right_attach> - <top_attach>2</top_attach> - <bottom_attach>3</bottom_attach> - <xpad>5</xpad> - <ypad>0</ypad> - <xexpand>True</xexpand> - <yexpand>True</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> - <class>GtkScrolledWindow</class> - <name>scrolledwindow4</name> - <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy> - <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy> - <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> - <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>2</top_attach> - <bottom_attach>3</bottom_attach> - <xpad>2</xpad> - <ypad>0</ypad> - <xexpand>True</xexpand> - <yexpand>True</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>True</yfill> - </child> - - <widget> - <class>GtkCList</class> - <name>bcc_clist</name> - <width>180</width> - <height>100</height> - <can_focus>True</can_focus> - <columns>1</columns> - <column_widths>80</column_widths> - <selection_mode>GTK_SELECTION_BROWSE</selection_mode> - <show_titles>False</show_titles> - <shadow_type>GTK_SHADOW_IN</shadow_type> - - <widget> - <class>GtkLabel</class> - <child_name>CList:title</child_name> - <name>label9</name> - <label>label9</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - </widget> - </widget> - - <widget> - <class>GtkScrolledWindow</class> - <name>scrolledwindow2</name> - <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy> - <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy> - <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> - <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>0</top_attach> - <bottom_attach>1</bottom_attach> - <xpad>2</xpad> - <ypad>0</ypad> - <xexpand>True</xexpand> - <yexpand>True</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>True</yfill> - </child> - - <widget> - <class>GtkCList</class> - <name>to_clist</name> - <width>180</width> - <height>100</height> - <can_focus>True</can_focus> - <columns>1</columns> - <column_widths>80</column_widths> - <selection_mode>GTK_SELECTION_BROWSE</selection_mode> - <show_titles>False</show_titles> - <shadow_type>GTK_SHADOW_IN</shadow_type> - - <widget> - <class>GtkLabel</class> - <child_name>CList:title</child_name> - <name>label7</name> - <label>label7</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - </widget> - </widget> - - <widget> - <class>GtkScrolledWindow</class> - <name>scrolledwindow3</name> - <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy> - <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy> - <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> - <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>1</top_attach> - <bottom_attach>2</bottom_attach> - <xpad>2</xpad> - <ypad>4</ypad> - <xexpand>True</xexpand> - <yexpand>True</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>True</yfill> - </child> - - <widget> - <class>GtkCList</class> - <name>cc_clist</name> - <width>180</width> - <height>100</height> - <can_focus>True</can_focus> - <columns>1</columns> - <column_widths>80</column_widths> - <selection_mode>GTK_SELECTION_BROWSE</selection_mode> - <show_titles>False</show_titles> - <shadow_type>GTK_SHADOW_IN</shadow_type> - - <widget> - <class>GtkLabel</class> - <child_name>CList:title</child_name> - <name>label8</name> - <label>label8</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - </widget> - </widget> - </widget> - </widget> - - <widget> - <class>GtkHButtonBox</class> - <child_name>GnomeDialog:action_area</child_name> - <name>dialog-action_area1</name> - <layout_style>GTK_BUTTONBOX_END</layout_style> - <spacing>8</spacing> - <child_min_width>85</child_min_width> - <child_min_height>27</child_min_height> - <child_ipad_x>7</child_ipad_x> - <child_ipad_y>0</child_ipad_y> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>True</fill> - <pack>GTK_PACK_END</pack> - </child> - - <widget> - <class>GtkButton</class> - <name>button1</name> - <can_default>True</can_default> - <has_default>True</has_default> - <can_focus>True</can_focus> - <stock_button>GNOME_STOCK_BUTTON_OK</stock_button> - </widget> - - <widget> - <class>GtkButton</class> - <name>button2</name> - <can_default>True</can_default> - <can_focus>True</can_focus> - <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button> - </widget> - - <widget> - <class>GtkButton</class> - <name>button3</name> - <can_default>True</can_default> - <can_focus>True</can_focus> - <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button> - </widget> - </widget> - </widget> -</widget> - -</GTK-Interface> diff --git a/composer/e-msg-composer-address-dialog.glade.h b/composer/e-msg-composer-address-dialog.glade.h deleted file mode 100644 index a5d48ec275..0000000000 --- a/composer/e-msg-composer-address-dialog.glade.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("Recipient list:"); -gchar *s = N_("Name:"); -gchar *s = N_("Search..."); -gchar *s = N_("Name"); -gchar *s = N_("Address"); -gchar *s = N_("Properties..."); -gchar *s = N_("Add..."); -gchar *s = N_("To: >>"); -gchar *s = N_("Cc: >>"); -gchar *s = N_("Bcc: >>"); -gchar *s = N_("label9"); -gchar *s = N_("label7"); -gchar *s = N_("label8"); diff --git a/composer/e-msg-composer-address-dialog.h b/composer/e-msg-composer-address-dialog.h deleted file mode 100644 index 19ffeda703..0000000000 --- a/composer/e-msg-composer-address-dialog.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-msg-composer-address-dialog.h - * - * Copyright (C) 1999 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * 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, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ -#ifndef __E_MSG_COMPOSER_ADDRESS_DIALOG_H__ -#define __E_MSG_COMPOSER_ADDRESS_DIALOG_H__ - -#include <gnome.h> -#include <glade/glade-xml.h> - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - - -#define E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG (e_msg_composer_address_dialog_get_type ()) -#define E_MSG_COMPOSER_ADDRESS_DIALOG(obj) (GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG, EMsgComposerAddressDialog)) -#define E_MSG_COMPOSER_ADDRESS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG, EMsgComposerAddressDialogClass)) -#define E_IS_MSG_COMPOSER_ADDRESS_DIALOG(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG)) -#define E_IS_MSG_COMPOSER_ADDRESS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG)) - - -typedef struct _EMsgComposerAddressDialog EMsgComposerAddressDialog; -typedef struct _EMsgComposerAddressDialogClass EMsgComposerAddressDialogClass; - -struct _EMsgComposerAddressDialog { - GnomeDialog parent; - - GladeXML *gui; - - gchar *cut_buffer; -}; - -struct _EMsgComposerAddressDialogClass { - GnomeDialogClass parent_class; - - void (* apply) (EMsgComposerAddressDialog *dialog); -}; - - -GtkType e_msg_composer_address_dialog_get_type (void); -GtkWidget *e_msg_composer_address_dialog_new (void); -void e_msg_composer_address_dialog_construct (EMsgComposerAddressDialog *dialog); -void e_msg_composer_address_dialog_set_to_list (EMsgComposerAddressDialog *dialog, GList *to_list); -void e_msg_composer_address_dialog_set_cc_list (EMsgComposerAddressDialog *dialog, GList *cc_list); -void e_msg_composer_address_dialog_set_bcc_list (EMsgComposerAddressDialog *dialog, GList *bcc_list); -GList *e_msg_composer_address_dialog_get_to_list (EMsgComposerAddressDialog *dialog); -GList *e_msg_composer_address_dialog_get_cc_list (EMsgComposerAddressDialog *dialog); -GList *e_msg_composer_address_dialog_get_bcc_list (EMsgComposerAddressDialog *dialog); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_MSG_COMPOSER_ADDRESS_DIALOG_H__ */ diff --git a/composer/e-msg-composer-address-entry.c b/composer/e-msg-composer-address-entry.c deleted file mode 100644 index 2313894144..0000000000 --- a/composer/e-msg-composer-address-entry.c +++ /dev/null @@ -1,183 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-msg-composer-address-entry.c - * - * Copyright (C) 1999 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * 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, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -/* This is a custom GtkEntry for entering address lists. For now, it does not - have any fancy features, but in the future we might want to make it - cooler. */ - -#include <gnome.h> -#include <gal/widgets/e-unicode.h> -#include "e-msg-composer-address-entry.h" - - -static GtkEntryClass *parent_class = NULL; - - -/* Initialization. */ - -static void -class_init (EMsgComposerAddressEntryClass *klass) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass*) klass; - - parent_class = gtk_type_class (gtk_entry_get_type ()); -} - -static void -init (EMsgComposerAddressEntry *msg_composer_address_entry) -{ -} - -GtkType -e_msg_composer_address_entry_get_type (void) -{ - static GtkType type = 0; - - if (type == 0) { - static const GtkTypeInfo info = { - "EMsgComposerAddressEntry", - sizeof (EMsgComposerAddressEntry), - sizeof (EMsgComposerAddressEntryClass), - (GtkClassInitFunc) class_init, - (GtkObjectInitFunc) init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - type = gtk_type_unique (gtk_entry_get_type (), &info); - } - - return type; -} - - -GtkWidget * -e_msg_composer_address_entry_new (void) -{ - GtkWidget *new; - - new = gtk_type_new (e_msg_composer_address_entry_get_type ()); - - return new; -} - - -/** - * e_msg_composer_address_entry_get_addresses: - * @entry: An address entry widget - * - * Retrieve the list of addresses stored in @entry. - * - * Return value: A GList of pointers to strings representing the addresses. - * Notice that the strings must be freed by the caller when not needed anymore. - **/ -GList * -e_msg_composer_address_entry_get_addresses (EMsgComposerAddressEntry *entry) -{ - GList *list; - const gchar *p, *oldp; - gchar *s; - gboolean in_quotes; - - s = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry)); - - in_quotes = FALSE; - list = NULL; - - p = s; - oldp = s; - - /* This should work with UTF-8, although it uses simple pointer increment */ - - while (1) { - if (*p == '"') { - in_quotes = ! in_quotes; - p++; - } else if ((! in_quotes && *p == ',') || *p == 0) { - if (p != oldp) { - gchar *new_addr; - - new_addr = g_strndup (oldp, p - oldp); - new_addr = g_strstrip (new_addr); - if (*new_addr != '\0') - list = g_list_prepend (list, new_addr); - else - g_free (new_addr); - } - - while (*p == ',' || *p == ' ' || *p == '\t') - p++; - - if (*p == 0) - break; - - oldp = p; - } else { - p++; - } - } - - g_free (s); - - return g_list_reverse (list); -} - -/** - * e_msg_composer_address_entry_set_list: - * @entry: An address entry - * @list: List of pointers to strings representing the addresses that must - * appear in the entry - * - * Set the address list from @list. - **/ -void -e_msg_composer_address_entry_set_list (EMsgComposerAddressEntry *entry, - const GList *list) -{ - GString *string; - const GList *p; - - g_return_if_fail (entry != NULL); - - if (list == NULL) { - gtk_editable_delete_text (GTK_EDITABLE (entry), -1, -1); - return; - } - - string = g_string_new (NULL); - for (p = list; p != NULL; p = p->next) { - if (string->str[0] != '\0') - g_string_append (string, ", "); - g_string_append (string, p->data); - } - - e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), string->str); - g_string_free (string, TRUE); -} - - - - diff --git a/composer/e-msg-composer-address-entry.h b/composer/e-msg-composer-address-entry.h deleted file mode 100644 index f2b671bde4..0000000000 --- a/composer/e-msg-composer-address-entry.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-msg-composer-address-entry.h - * - * Copyright (C) 1999 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * 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, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef __E_MSG_COMPOSER_ADDRESS_ENTRY_H__ -#define __E_MSG_COMPOSER_ADDRESS_ENTRY_H__ - -#include <gnome.h> - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY (e_msg_composer_address_entry_get_type ()) -#define E_MSG_COMPOSER_ADDRESS_ENTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY, EMsgComposerAddressEntry)) -#define E_MSG_COMPOSER_ADDRESS_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY, EMsgComposerAddressEntryClass)) -#define E_IS_MSG_COMPOSER_ADDRESS_ENTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY)) -#define E_IS_MSG_COMPOSER_ADDRESS_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY)) - - -typedef struct _EMsgComposerAddressEntry EMsgComposerAddressEntry; -typedef struct _EMsgComposerAddressEntryClass EMsgComposerAddressEntryClass; - -struct _EMsgComposerAddressEntry { - GtkEntry parent; -}; - -struct _EMsgComposerAddressEntryClass { - GtkEntryClass parent_class; -}; - - -GtkType e_msg_composer_address_entry_get_type (void); -GtkWidget *e_msg_composer_address_entry_new (void); -GList *e_msg_composer_address_entry_get_addresses (EMsgComposerAddressEntry *entry); -void e_msg_composer_address_entry_set_list (EMsgComposerAddressEntry *entry, - const GList *list); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __E_MSG_COMPOSER_ADDRESS_ENTRY_H__ */ diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index e65c835faf..0120082737 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -34,7 +34,6 @@ #include "Composer.h" -#include "e-msg-composer-address-entry.h" #include "e-msg-composer-hdrs.h" #include <gal/e-text/e-entry.h> #include <gal/widgets/e-unicode.h> diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index f614c6512d..52b371a4aa 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -53,7 +53,6 @@ #include <gal/widgets/e-scroll-frame.h> #include "e-msg-composer.h" -#include "e-msg-composer-address-dialog.h" #include "e-msg-composer-attachment-bar.h" #include "e-msg-composer-hdrs.h" #include "e-msg-composer-select-file.h" |