From cd26e8a609574335e684df2f1eef55f2a11c2bdf Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 24 Apr 2009 13:35:59 +0200 Subject: Remove unused files I forgot to remove unused files from sources in the commit for GN-bug #572348 --- .../gui/contact-editor/e-contact-editor-address.c | 624 ------ .../gui/contact-editor/e-contact-editor-address.h | 74 - .../gui/contact-editor/e-contact-editor-im.c | 513 ----- .../gui/contact-editor/e-contact-editor-im.h | 79 - addressbook/gui/contact-editor/fulladdr.glade | 446 ----- addressbook/gui/contact-editor/im.glade | 206 -- .../printing/e-contact-print-style-editor.c | 123 -- .../printing/e-contact-print-style-editor.h | 75 - addressbook/printing/e-contact-print.glade | 2018 -------------------- .../printing/test-contact-print-style-editor.c | 58 - calendar/gui/dialogs/meeting-page.glade | 0 11 files changed, 4216 deletions(-) delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-address.c delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-address.h delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-im.c delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-im.h delete mode 100644 addressbook/gui/contact-editor/fulladdr.glade delete mode 100644 addressbook/gui/contact-editor/im.glade delete mode 100644 addressbook/printing/e-contact-print-style-editor.c delete mode 100644 addressbook/printing/e-contact-print-style-editor.h delete mode 100644 addressbook/printing/e-contact-print.glade delete mode 100644 addressbook/printing/test-contact-print-style-editor.c delete mode 100644 calendar/gui/dialogs/meeting-page.glade diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c deleted file mode 100644 index 111dfe3bca..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-address.c +++ /dev/null @@ -1,624 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Chris Lahey - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -static void e_contact_editor_address_init (EContactEditorAddress *card); -static void e_contact_editor_address_class_init (EContactEditorAddressClass *klass); -static void e_contact_editor_address_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void e_contact_editor_address_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void e_contact_editor_address_dispose (GObject *object); - -static void fill_in_info(EContactEditorAddress *editor); -static void extract_info(EContactEditorAddress *editor); - -static GtkDialogClass *parent_class = NULL; - -/* The arguments we take */ -enum { - PROP_0, - PROP_ADDRESS, - PROP_EDITABLE -}; - -GType -e_contact_editor_address_get_type (void) -{ - static GType contact_editor_address_type = 0; - - if (!contact_editor_address_type) { - static const GTypeInfo contact_editor_address_info = { - sizeof (EContactEditorAddressClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) e_contact_editor_address_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (EContactEditorAddress), - 0, /* n_preallocs */ - (GInstanceInitFunc) e_contact_editor_address_init, - }; - - contact_editor_address_type = g_type_register_static (GTK_TYPE_DIALOG, "EContactEditorAddress", &contact_editor_address_info, 0); - } - - return contact_editor_address_type; -} - -static void -e_contact_editor_address_class_init (EContactEditorAddressClass *klass) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (klass); - - parent_class = g_type_class_ref (GTK_TYPE_DIALOG); - - object_class->set_property = e_contact_editor_address_set_property; - object_class->get_property = e_contact_editor_address_get_property; - object_class->dispose = e_contact_editor_address_dispose; - - g_object_class_install_property (object_class, PROP_ADDRESS, - g_param_spec_boxed ("address", - _("Address"), - /*_( */"XXX blurb" /*)*/, - e_contact_address_get_type (), - G_PARAM_READWRITE)); - - g_object_class_install_property (object_class, PROP_EDITABLE, - g_param_spec_boolean ("editable", - _("Editable"), - /*_( */"XXX blurb" /*)*/, - FALSE, - G_PARAM_READWRITE)); -} - -static GList * -add_to_tab_order(GList *list, GladeXML *gui, char *name) -{ - GtkWidget *widget = glade_xml_get_widget(gui, name); - return g_list_prepend(list, widget); -} - -static void -setup_tab_order(GladeXML *gui) -{ - GtkWidget *container; - GList *list = NULL; - - container = glade_xml_get_widget(gui, "table-checkaddress"); - - if (container) { - list = add_to_tab_order(list, gui, "entry-city"); - list = add_to_tab_order(list, gui, "entry-region"); - list = add_to_tab_order(list, gui, "entry-code"); - list = add_to_tab_order(list, gui, "combo-country"); - list = g_list_reverse(list); - e_container_change_tab_order(GTK_CONTAINER(container), list); - g_list_free(list); - } -} - -static char * countries [] = { - N_("United States"), - N_("Afghanistan"), - N_("Albania"), - N_("Algeria"), - N_("American Samoa"), - N_("Andorra"), - N_("Angola"), - N_("Anguilla"), - N_("Antarctica"), - N_("Antigua And Barbuda"), - N_("Argentina"), - N_("Armenia"), - N_("Aruba"), - N_("Australia"), - N_("Austria"), - N_("Azerbaijan"), - N_("Bahamas"), - N_("Bahrain"), - N_("Bangladesh"), - N_("Barbados"), - N_("Belarus"), - N_("Belgium"), - N_("Belize"), - N_("Benin"), - N_("Bermuda"), - N_("Bhutan"), - N_("Bolivia"), - N_("Bosnia And Herzegowina"), - N_("Botswana"), - N_("Bouvet Island"), - N_("Brazil"), - N_("British Indian Ocean Territory"), - N_("Brunei Darussalam"), - N_("Bulgaria"), - N_("Burkina Faso"), - N_("Burundi"), - N_("Cambodia"), - N_("Cameroon"), - N_("Canada"), - N_("Cape Verde"), - N_("Cayman Islands"), - N_("Central African Republic"), - N_("Chad"), - N_("Chile"), - N_("China"), - N_("Christmas Island"), - N_("Cocos (Keeling) Islands"), - N_("Colombia"), - N_("Comoros"), - N_("Congo"), - N_("Congo, The Democratic Republic Of The"), - N_("Cook Islands"), - N_("Costa Rica"), - N_("Cote d'Ivoire"), - N_("Croatia"), - N_("Cuba"), - N_("Cyprus"), - N_("Czech Republic"), - N_("Denmark"), - N_("Djibouti"), - N_("Dominica"), - N_("Dominican Republic"), - N_("Ecuador"), - N_("Egypt"), - N_("El Salvador"), - N_("Equatorial Guinea"), - N_("Eritrea"), - N_("Estonia"), - N_("Ethiopia"), - N_("Falkland Islands"), - N_("Faroe Islands"), - N_("Fiji"), - N_("Finland"), - N_("France"), - N_("French Guiana"), - N_("French Polynesia"), - N_("French Southern Territories"), - N_("Gabon"), - N_("Gambia"), - N_("Georgia"), - N_("Germany"), - N_("Ghana"), - N_("Gibraltar"), - N_("Greece"), - N_("Greenland"), - N_("Grenada"), - N_("Guadeloupe"), - N_("Guam"), - N_("Guatemala"), - N_("Guernsey"), - N_("Guinea"), - N_("Guinea-Bissau"), - N_("Guyana"), - N_("Haiti"), - N_("Heard And McDonald Islands"), - N_("Holy See"), - N_("Honduras"), - N_("Hong Kong"), - N_("Hungary"), - N_("Iceland"), - N_("India"), - N_("Indonesia"), - N_("Iran"), - N_("Iraq"), - N_("Ireland"), - N_("Isle of Man"), - N_("Israel"), - N_("Italy"), - N_("Jamaica"), - N_("Japan"), - N_("Jersey"), - N_("Jordan"), - N_("Kazakhstan"), - N_("Kenya"), - N_("Kiribati"), - N_("Korea, Democratic People's Republic Of"), - N_("Korea, Republic Of"), - N_("Kuwait"), - N_("Kyrgyzstan"), - N_("Laos"), - N_("Latvia"), - N_("Lebanon"), - N_("Lesotho"), - N_("Liberia"), - N_("Libya"), - N_("Liechtenstein"), - N_("Lithuania"), - N_("Luxembourg"), - N_("Macao"), - N_("Macedonia"), - N_("Madagascar"), - N_("Malawi"), - N_("Malaysia"), - N_("Maldives"), - N_("Mali"), - N_("Malta"), - N_("Marshall Islands"), - N_("Martinique"), - N_("Mauritania"), - N_("Mauritius"), - N_("Mayotte"), - N_("Mexico"), - N_("Micronesia"), - N_("Moldova, Republic Of"), - N_("Monaco"), - N_("Mongolia"), - N_("Montserrat"), - N_("Morocco"), - N_("Mozambique"), - N_("Myanmar"), - N_("Namibia"), - N_("Nauru"), - N_("Nepal"), - N_("Netherlands"), - N_("Netherlands Antilles"), - N_("New Caledonia"), - N_("New Zealand"), - N_("Nicaragua"), - N_("Niger"), - N_("Nigeria"), - N_("Niue"), - N_("Norfolk Island"), - N_("Northern Mariana Islands"), - N_("Norway"), - N_("Oman"), - N_("Pakistan"), - N_("Palau"), - N_("Palestinian Territory"), - N_("Panama"), - N_("Papua New Guinea"), - N_("Paraguay"), - N_("Peru"), - N_("Philippines"), - N_("Pitcairn"), - N_("Poland"), - N_("Portugal"), - N_("Puerto Rico"), - N_("Qatar"), - N_("Reunion"), - N_("Romania"), - N_("Russian Federation"), - N_("Rwanda"), - N_("Saint Kitts And Nevis"), - N_("Saint Lucia"), - N_("Saint Vincent And The Grenadines"), - N_("Samoa"), - N_("San Marino"), - N_("Sao Tome And Principe"), - N_("Saudi Arabia"), - N_("Senegal"), - N_("Serbia And Montenegro"), - N_("Seychelles"), - N_("Sierra Leone"), - N_("Singapore"), - N_("Slovakia"), - N_("Slovenia"), - N_("Solomon Islands"), - N_("Somalia"), - N_("South Africa"), - N_("South Georgia And The South Sandwich Islands"), - N_("Spain"), - N_("Sri Lanka"), - N_("St. Helena"), - N_("St. Pierre And Miquelon"), - N_("Sudan"), - N_("Suriname"), - N_("Svalbard And Jan Mayen Islands"), - N_("Swaziland"), - N_("Sweden"), - N_("Switzerland"), - N_("Syria"), - N_("Taiwan"), - N_("Tajikistan"), - N_("Tanzania, United Republic Of"), - N_("Thailand"), - N_("Timor-Leste"), - N_("Togo"), - N_("Tokelau"), - N_("Tonga"), - N_("Trinidad And Tobago"), - N_("Tunisia"), - N_("Turkey"), - N_("Turkmenistan"), - N_("Turks And Caicos Islands"), - N_("Tuvalu"), - N_("Uganda"), - N_("Ukraine"), - N_("United Arab Emirates"), - N_("United Kingdom"), - N_("United States Minor Outlying Islands"), - N_("Uruguay"), - N_("Uzbekistan"), - N_("Vanuatu"), - N_("Venezuela"), - N_("Viet Nam"), - N_("Virgin Islands, British"), - N_("Virgin Islands, U.S."), - N_("Wallis And Futuna Islands"), - N_("Western Sahara"), - N_("Yemen"), - N_("Zambia"), - N_("Zimbabwe"), - NULL -}; - -static int -compare_func (const void *voida, const void *voidb) -{ - char * const *stringa = voida, * const *stringb = voidb; - - return strcoll (*stringa, *stringb); -} - -static void -fill_in_countries (GladeXML *gui) -{ - GtkCombo *combo; - combo = (GtkCombo *) glade_xml_get_widget(gui, "combo-country"); - if (combo && GTK_IS_COMBO (combo)) { - static gboolean sorted = FALSE; - static GList *country_list; - if (!sorted) { - int i; - - for (i = 0; countries[i]; i++) { - countries[i] = _(countries[i]); - } - - if (setlocale (LC_COLLATE, NULL) != NULL) { - qsort (countries + 1, i - 1, sizeof (countries[0]), compare_func); - country_list = NULL; - for (i = 0; countries[i]; i++) { - country_list = g_list_prepend (country_list, countries[i]); - } - country_list = g_list_reverse (country_list); - sorted = TRUE; - } else - return; - } - gtk_combo_set_popdown_strings (combo, country_list); - } -} - -static void -e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address) -{ - GladeXML *gui; - GtkWidget *widget; - char *gladefile; - - gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_address), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); - - gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_address), TRUE); - - e_contact_editor_address->address = NULL; - - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "fulladdr.glade", - NULL); - gui = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - e_contact_editor_address->gui = gui; - - setup_tab_order (gui); - fill_in_countries (gui); - - widget = glade_xml_get_widget(gui, "dialog-checkaddress"); - gtk_window_set_title (GTK_WINDOW (e_contact_editor_address), - GTK_WINDOW (widget)->title); - - widget = glade_xml_get_widget(gui, "table-checkaddress"); - g_object_ref(widget); - gtk_container_remove(GTK_CONTAINER(widget->parent), widget); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0); - g_object_unref(widget); - - gtk_window_set_icon_name ( - GTK_WINDOW (e_contact_editor_address), "contact-new"); -} - -static void -e_contact_editor_address_dispose (GObject *object) -{ - EContactEditorAddress *e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS(object); - - if (e_contact_editor_address->gui) { - g_object_unref(e_contact_editor_address->gui); - e_contact_editor_address->gui = NULL; - } - - if (e_contact_editor_address->address) { - e_contact_address_free (e_contact_editor_address->address); - e_contact_editor_address->address = NULL; - } - - if (G_OBJECT_CLASS (parent_class)->dispose) - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} - -GtkWidget* -e_contact_editor_address_new (const EContactAddress *address) -{ - GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_ADDRESS, NULL); - - g_object_set (widget, - "address", address, - NULL); - - return widget; -} - -static void -e_contact_editor_address_set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec) -{ - EContactEditorAddress *e_contact_editor_address; - - e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object); - - switch (prop_id){ - case PROP_ADDRESS: - if (e_contact_editor_address->address) - g_boxed_free (e_contact_address_get_type (), e_contact_editor_address->address); - - e_contact_editor_address->address = g_value_dup_boxed (value); - fill_in_info (e_contact_editor_address); - break; - case PROP_EDITABLE: { - int i; - char *widget_names[] = { - "entry-street", - "entry-city", - "entry-ext", - "entry-po", - "entry-region", - "combo-country", - "entry-code", - "label-street", - "label-city", - "label-ext", - "label-po", - "label-region", - "label-country", - "label-code", - NULL - }; - e_contact_editor_address->editable = g_value_get_boolean (value) ? TRUE : FALSE; - for (i = 0; widget_names[i] != NULL; i ++) { - GtkWidget *w = glade_xml_get_widget(e_contact_editor_address->gui, widget_names[i]); - if (GTK_IS_ENTRY (w)) { - gtk_editable_set_editable (GTK_EDITABLE (w), - e_contact_editor_address->editable); - } - else if (GTK_IS_COMBO (w)) { - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (w)->entry), - e_contact_editor_address->editable); - gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_address->editable); - } - else if (GTK_IS_LABEL (w)) { - gtk_widget_set_sensitive (w, e_contact_editor_address->editable); - } - } - break; - } - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -e_contact_editor_address_get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) -{ - EContactEditorAddress *e_contact_editor_address; - - e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object); - - switch (prop_id) { - case PROP_ADDRESS: - extract_info (e_contact_editor_address); - g_value_set_static_boxed (value, e_contact_editor_address->address); - break; - case PROP_EDITABLE: - g_value_set_boolean (value, e_contact_editor_address->editable ? TRUE : FALSE); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -fill_in_field(EContactEditorAddress *editor, char *field, char *string) -{ - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); - if (entry) { - if (string) - gtk_entry_set_text(entry, string); - else - gtk_entry_set_text(entry, ""); - } -} - -static void -fill_in_info(EContactEditorAddress *editor) -{ - EContactAddress *address = editor->address; - - if (address) { - fill_in_field (editor, "entry-street" , address->street ); - fill_in_field (editor, "entry-po" , address->po ); - fill_in_field (editor, "entry-ext" , address->ext ); - fill_in_field (editor, "entry-city" , address->locality); - fill_in_field (editor, "entry-region" , address->region ); - fill_in_field (editor, "entry-code" , address->code ); - fill_in_field (editor, "entry-country", address->country ); - } -} - -static char * -extract_field(EContactEditorAddress *editor, char *field) -{ - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); - if (entry) - return g_strdup (gtk_entry_get_text(entry)); - else - return NULL; -} - -static void -extract_info(EContactEditorAddress *editor) -{ - EContactAddress *address = editor->address; - - if (address) { - g_boxed_free (e_contact_address_get_type (), address); - } - - address = g_new0 (EContactAddress, 1); - editor->address = address; - - address->street = extract_field(editor, "entry-street" ); - address->po = extract_field(editor, "entry-po" ); - address->ext = extract_field(editor, "entry-ext" ); - address->locality = extract_field(editor, "entry-city" ); - address->region = extract_field(editor, "entry-region" ); - address->code = extract_field(editor, "entry-code" ); - address->country = extract_field(editor, "entry-country"); -} diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.h b/addressbook/gui/contact-editor/e-contact-editor-address.h deleted file mode 100644 index 101e672c5a..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-address.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Chris Lahey - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef __E_CONTACT_EDITOR_ADDRESS_H__ -#define __E_CONTACT_EDITOR_ADDRESS_H__ - -#include -#include -#include - -G_BEGIN_DECLS - -/* EContactEditorAddress - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * name ECardName * RW The card currently being edited. Returns a copy. - */ - -#define E_TYPE_CONTACT_EDITOR_ADDRESS (e_contact_editor_address_get_type ()) -#define E_CONTACT_EDITOR_ADDRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CONTACT_EDITOR_ADDRESS, EContactEditorAddress)) -#define E_CONTACT_EDITOR_ADDRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CONTACT_EDITOR_ADDRESS, EContactEditorAddressClass)) -#define E_IS_CONTACT_EDITOR_ADDRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CONTACT_EDITOR_ADDRESS)) -#define E_IS_CONTACT_EDITOR_ADDRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_CONTACT_EDITOR_ADDRESS)) - - -typedef struct _EContactEditorAddress EContactEditorAddress; -typedef struct _EContactEditorAddressClass EContactEditorAddressClass; - -struct _EContactEditorAddress -{ - GtkDialog parent; - - /* item specific fields */ - EContactAddress *address; - - guint editable : 1; - - GladeXML *gui; -}; - -struct _EContactEditorAddressClass -{ - GtkDialogClass parent_class; -}; - - -GtkWidget *e_contact_editor_address_new (const EContactAddress *address); -GType e_contact_editor_address_get_type (void); - -G_END_DECLS - -#endif /* __E_CONTACT_EDITOR_ADDRESS_H__ */ diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.c b/addressbook/gui/contact-editor/e-contact-editor-im.c deleted file mode 100644 index 65a70f432b..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-im.c +++ /dev/null @@ -1,513 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Christian Hammond - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include -#include "e-contact-editor-im.h" -#include -#include -#include - -static void e_contact_editor_im_init (EContactEditorIm *card); -static void e_contact_editor_im_class_init (EContactEditorImClass *klass); -static void e_contact_editor_im_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void e_contact_editor_im_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void e_contact_editor_im_dispose (GObject *object); - -static void fill_in_info(EContactEditorIm *editor); -static void extract_info(EContactEditorIm *editor); - -static GtkDialogClass *parent_class = NULL; - -/* The arguments we take */ -enum { - PROP_0, - PROP_SERVICE, - PROP_LOCATION, - PROP_USERNAME, - PROP_EDITABLE -}; - -/*#define FIRST_IM_TYPE E_CONTACT_IM_AIM -#define LAST_IM_TYPE E_CONTACT_IM_ICQ*/ - -static const char *im_labels[] = { - N_("AOL Instant Messenger"), - N_("Novell GroupWise"), - N_("Jabber"), - N_("Yahoo Messenger"), - N_("Gadu-Gadu Messenger"), - N_("MSN Messenger"), - N_("ICQ"), - N_("Skype") -}; - -static const char *im_images[] = { - "im-aim", - "im-nov", - "im-jabber", - "im-yahoo", - "im-gadugadu", - "im-msn", - "im-icq", - "stock_people" -}; - -/** - * Decodes from service (E_CONTACT_IM_ value to the index in the above - * fields and back, depending on the second parameter. - * @param val Value to decode - * @param val_is_service TRUE, if val is E_CONTACT_IM_ value, otherwise it's an index number. - **/ -static int -decode_service (int val, gboolean val_is_service) -{ - static const int fields[] = { - E_CONTACT_IM_AIM, - E_CONTACT_IM_GROUPWISE, - E_CONTACT_IM_JABBER, - E_CONTACT_IM_YAHOO, - E_CONTACT_IM_GADUGADU, - E_CONTACT_IM_MSN, - E_CONTACT_IM_ICQ, - E_CONTACT_IM_SKYPE - }; - - int i, sz = G_N_ELEMENTS (fields); - if (val_is_service) { - for (i = 0; i < sz; i++) { - if (val == fields[i]) - break; - } - if (i >= sz) - i = 0; - } else if (val >= 0 && val < sz) { - i = fields [val]; - } else { - i = fields [0]; - } - - return i; -} - -GType -e_contact_editor_im_get_type (void) -{ - static GType contact_editor_im_type = 0; - - if (!contact_editor_im_type) { - static const GTypeInfo contact_editor_im_info = { - sizeof (EContactEditorImClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) e_contact_editor_im_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (EContactEditorIm), - 0, /* n_preallocs */ - (GInstanceInitFunc) e_contact_editor_im_init, - }; - - contact_editor_im_type = g_type_register_static (GTK_TYPE_DIALOG, "EContactEditorIm", &contact_editor_im_info, 0); - } - - return contact_editor_im_type; -} - -static void -e_contact_editor_im_class_init (EContactEditorImClass *klass) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (klass); - - parent_class = g_type_class_ref (GTK_TYPE_DIALOG); - - object_class->set_property = e_contact_editor_im_set_property; - object_class->get_property = e_contact_editor_im_get_property; - object_class->dispose = e_contact_editor_im_dispose; - - g_object_class_install_property (object_class, PROP_SERVICE, - g_param_spec_int ("service", - _("Service"), - /*_( */"XXX blurb" /*)*/, - E_CONTACT_IM_AIM, - E_CONTACT_IM_SKYPE, - E_CONTACT_IM_AIM, - G_PARAM_READWRITE)); - - g_object_class_install_property (object_class, PROP_LOCATION, - g_param_spec_string ("location", - _("Location"), - /*_( */"XXX blurb" /*)*/, - "HOME", - G_PARAM_READWRITE)); - - g_object_class_install_property (object_class, PROP_USERNAME, - g_param_spec_string ("username", - _("Username"), - /*_( */"XXX blurb" /*)*/, - NULL, - G_PARAM_READWRITE)); - - g_object_class_install_property (object_class, PROP_EDITABLE, - g_param_spec_boolean ("editable", - _("Editable"), - /*_( */"XXX blurb" /*)*/, - FALSE, - G_PARAM_READWRITE)); -} - -static void -service_changed_cb(GtkWidget *optmenu, EContactEditorIm *editor) -{ - editor->service = decode_service (gtk_option_menu_get_history(GTK_OPTION_MENU(optmenu)), FALSE); -} - -static void -location_changed_cb(GtkWidget *optmenu, EContactEditorIm *editor) -{ - int i = gtk_option_menu_get_history(GTK_OPTION_MENU(optmenu)); - - if (editor->location != NULL) - g_free(editor->location); - - if (i == 0) - editor->location = g_strdup("HOME"); - else if (i == 1) - editor->location = g_strdup("WORK"); - else - editor->location = NULL; -} - -static void -setup_service_optmenu(EContactEditorIm *editor) -{ - GtkWidget *optmenu; - GtkWidget *menu; - GtkWidget *hbox; - GtkWidget *item; - GtkWidget *label; - GtkWidget *image; - GtkSizeGroup *sg; - int i; - - optmenu = glade_xml_get_widget(editor->gui, "optmenu-service"); - g_signal_connect(G_OBJECT(optmenu), "changed", - G_CALLBACK(service_changed_cb), editor); - - menu = gtk_menu_new(); - gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); - gtk_widget_show(menu); - - sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - - for (i = 0; i < G_N_ELEMENTS(im_labels); i++) { - item = gtk_menu_item_new(); - - hbox = gtk_hbox_new(FALSE, 4); - gtk_container_add(GTK_CONTAINER(item), hbox); - gtk_widget_show(hbox); - - image = gtk_image_new_from_icon_name ( - im_images[i], GTK_ICON_SIZE_MENU); - - gtk_size_group_add_widget(sg, image); - - gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0); - gtk_widget_show(image); - - label = gtk_label_new(im_labels[i]); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0); - gtk_widget_show(label); - - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show(item); - } -} - -static void -setup_location_optmenu(EContactEditorIm *editor) -{ - GtkWidget *item; - GtkWidget *optmenu; - GtkWidget *menu; - - optmenu = glade_xml_get_widget(editor->gui, "optmenu-location"); - - g_signal_connect(G_OBJECT(optmenu), "changed", - G_CALLBACK(location_changed_cb), editor); - - menu = gtk_menu_new(); - gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); - gtk_widget_show(menu); - - item = gtk_menu_item_new_with_label(_("Home")); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show(item); - - item = gtk_menu_item_new_with_label(_("Work")); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show(item); - - item = gtk_menu_item_new_with_label(_("Other")); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); - gtk_widget_show(item); -} - -static void -e_contact_editor_im_init (EContactEditorIm *e_contact_editor_im) -{ - GladeXML *gui; - GtkWidget *widget; - char *gladefile; - - gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_im), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); - gtk_dialog_set_has_separator (GTK_DIALOG (e_contact_editor_im), FALSE); - - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (e_contact_editor_im)->action_area), 12); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (e_contact_editor_im)->vbox), 0); - - gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_im), TRUE); - - e_contact_editor_im->service = decode_service (0, FALSE); - e_contact_editor_im->location = g_strdup("HOME"); - e_contact_editor_im->username = NULL; - - gladefile = g_build_filename (EVOLUTION_GLADEDIR, "im.glade", NULL); - gui = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - e_contact_editor_im->gui = gui; - - widget = glade_xml_get_widget(gui, "dialog-im"); - gtk_window_set_title (GTK_WINDOW (e_contact_editor_im), - GTK_WINDOW (widget)->title); - - widget = glade_xml_get_widget(gui, "table-im"); - g_object_ref(widget); - gtk_container_remove(GTK_CONTAINER(widget->parent), widget); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_im)->vbox), widget, TRUE, TRUE, 0); - g_object_unref(widget); - - setup_service_optmenu(e_contact_editor_im); - setup_location_optmenu(e_contact_editor_im); - - gtk_widget_grab_focus(glade_xml_get_widget(gui, "entry-username")); - - gtk_window_set_icon_name ( - GTK_WINDOW (e_contact_editor_im), "contact-new"); -} - -static void -e_contact_editor_im_dispose (GObject *object) -{ - EContactEditorIm *e_contact_editor_im = E_CONTACT_EDITOR_IM(object); - - if (e_contact_editor_im->gui) { - g_object_unref(e_contact_editor_im->gui); - e_contact_editor_im->gui = NULL; - } - - if (e_contact_editor_im->location) { - g_free(e_contact_editor_im->location); - e_contact_editor_im->location = NULL; - } - - if (e_contact_editor_im->username) { - g_free(e_contact_editor_im->username); - e_contact_editor_im->username = NULL; - } - - if (G_OBJECT_CLASS (parent_class)->dispose) - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} - -GtkWidget* -e_contact_editor_im_new (EContactField service, const char *location, const char *username) -{ - GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_IM, NULL); - g_object_set (widget, - "service", GINT_TO_POINTER(service), - "location", location, - "username", username, - NULL); - return widget; -} - -static void -e_contact_editor_im_set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec) -{ - EContactEditorIm *e_contact_editor_im; - const char *str; - - e_contact_editor_im = E_CONTACT_EDITOR_IM (object); - - switch (prop_id){ - case PROP_SERVICE: - e_contact_editor_im->service = g_value_get_int(value); - fill_in_info(e_contact_editor_im); - break; - - case PROP_LOCATION: - if (e_contact_editor_im->location != NULL) - g_free(e_contact_editor_im->location); - - str = g_value_get_string(value); - - if (str == NULL) - e_contact_editor_im->location = NULL; - else if (!g_ascii_strcasecmp(str, "HOME")) - e_contact_editor_im->location = g_strdup("HOME"); - else if (!g_ascii_strcasecmp(str, "WORK")) - e_contact_editor_im->location = g_strdup("WORK"); - else - e_contact_editor_im->location = NULL; - - fill_in_info(e_contact_editor_im); - break; - - case PROP_USERNAME: - if (e_contact_editor_im->username != NULL) - g_free(e_contact_editor_im->username); - - e_contact_editor_im->username = g_strdup(g_value_get_string(value)); - fill_in_info(e_contact_editor_im); - break; - - case PROP_EDITABLE: { - int i; - char *widget_names[] = { - "optmenu-service", - "optmenu-location", - "entry-username", - "label-service", - "label-location", - "label-username", - NULL - }; - e_contact_editor_im->editable = g_value_get_boolean (value) ? TRUE : FALSE; - for (i = 0; widget_names[i] != NULL; i ++) { - GtkWidget *w = glade_xml_get_widget(e_contact_editor_im->gui, widget_names[i]); - if (GTK_IS_ENTRY (w)) { - gtk_editable_set_editable (GTK_EDITABLE (w), - e_contact_editor_im->editable); - } - else { - gtk_widget_set_sensitive (w, e_contact_editor_im->editable); - } - } - break; - } - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -e_contact_editor_im_get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) -{ - EContactEditorIm *e_contact_editor_im; - - e_contact_editor_im = E_CONTACT_EDITOR_IM (object); - - switch (prop_id) { - case PROP_SERVICE: - g_value_set_int (value, e_contact_editor_im->service); - break; - case PROP_LOCATION: - g_value_set_string (value, e_contact_editor_im->location); - break; - case PROP_USERNAME: - extract_info(e_contact_editor_im); - g_value_set_string (value, e_contact_editor_im->username); - break; - case PROP_EDITABLE: - g_value_set_boolean (value, e_contact_editor_im->editable ? TRUE : FALSE); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -fill_in_field(EContactEditorIm *editor, char *field, char *string) -{ - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); - if (entry) { - if (string) - gtk_entry_set_text(entry, string); - else - gtk_entry_set_text(entry, ""); - } -} - -static void -fill_in_info(EContactEditorIm *editor) -{ - GtkWidget *optmenu; - - fill_in_field(editor, "entry-username", editor->username); - - optmenu = glade_xml_get_widget(editor->gui, "optmenu-service"); - - if (optmenu != NULL) - gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), decode_service (editor->service, TRUE)); - - optmenu = glade_xml_get_widget(editor->gui, "optmenu-location"); - - if (optmenu != NULL) - gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), - (editor->location == NULL ? 2 : - !strcmp(editor->location, "WORK") ? 1 : 0)); -} - -static char * -extract_field(EContactEditorIm *editor, char *field) -{ - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); - if (entry) - return g_strdup (gtk_entry_get_text(entry)); - else - return NULL; -} - -static void -extract_info(EContactEditorIm *editor) -{ - if (editor->username != NULL) - g_free(editor->username); - - editor->username = extract_field(editor, "entry-username"); - - /* - * NOTE: We don't need to handle the option menus. - * These are set by the callbacks. - */ -} diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.h b/addressbook/gui/contact-editor/e-contact-editor-im.h deleted file mode 100644 index cf16cdce93..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-im.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Christian Hammond - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef __E_CONTACT_EDITOR_IM_H__ -#define __E_CONTACT_EDITOR_IM_H__ - -#include -#include -#include - -G_BEGIN_DECLS - -/* EContactEditorIm - A dialog allowing the user to add an IM account to a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * service EContactField RW The field of the IM service. - * location char * RW The location type. - * username char * RW The username of the account. - */ - -#define E_TYPE_CONTACT_EDITOR_IM (e_contact_editor_im_get_type ()) -#define E_CONTACT_EDITOR_IM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CONTACT_EDITOR_IM, EContactEditorIm)) -#define E_CONTACT_EDITOR_IM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CONTACT_EDITOR_IM, EContactEditorImClass)) -#define E_IS_CONTACT_EDITOR_IM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CONTACT_EDITOR_IM)) -#define E_IS_CONTACT_EDITOR_IM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_CONTACT_EDITOR_IM)) - - -typedef struct _EContactEditorIm EContactEditorIm; -typedef struct _EContactEditorImClass EContactEditorImClass; - -struct _EContactEditorIm -{ - GtkDialog parent; - - /* item specific fields */ - EContactField service; - char *location; - char *username; - GladeXML *gui; - - /* Whether the dialog will accept modifications */ - guint editable : 1; -}; - -struct _EContactEditorImClass -{ - GtkDialogClass parent_class; -}; - - -GtkWidget *e_contact_editor_im_new(EContactField service, const char *location, const char *username); -GType e_contact_editor_im_get_type (void); - -G_END_DECLS - -#endif /* __E_CONTACT_EDITOR_IM_H__ */ - diff --git a/addressbook/gui/contact-editor/fulladdr.glade b/addressbook/gui/contact-editor/fulladdr.glade deleted file mode 100644 index 509e0c22b8..0000000000 --- a/addressbook/gui/contact-editor/fulladdr.glade +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - Full Address - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - True - True - False - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - 0 - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - 0 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - 4 - 4 - False - 6 - 6 - - - - True - _Address: - True - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - entry-street - - - 0 - 1 - 0 - 1 - fill - fill - - - - - - True - Ci_ty: - True - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 0 - 0 - entry-city - - - 0 - 1 - 2 - 3 - fill - fill - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 2 - 3 - fill - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 1 - 2 - fill - - - - - - True - _PO Box: - True - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 0 - 0 - entry-po - - - 2 - 3 - 1 - 2 - fill - fill - - - - - - True - Address _2: - True - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 0 - 0 - entry-ext - - - 0 - 1 - 1 - 2 - fill - fill - - - - - - True - True - True - True - 0 - - True - * - False - - - 3 - 4 - 1 - 2 - fill - fill - - - - - - True - True - True - True - True - 0 - - True - * - False - - - 1 - 4 - 0 - 1 - fill - - - - - - True - _State/Province: - True - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 0 - 0 - entry-region - - - 0 - 1 - 3 - 4 - fill - fill - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 3 - 4 - fill - - - - - - True - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - * - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - - 3 - 4 - 3 - 4 - fill - fill - - - - - - True - True - True - True - 0 - - True - * - False - - - 3 - 4 - 2 - 3 - fill - fill - - - - - - True - _ZIP Code: - True - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 0 - 0 - entry-code - - - 2 - 3 - 2 - 3 - fill - fill - - - - - - True - Countr_y: - True - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 0 - 0 - entry-country - - - 2 - 3 - 3 - 4 - fill - fill - - - - - 0 - True - True - - - - - - - diff --git a/addressbook/gui/contact-editor/im.glade b/addressbook/gui/contact-editor/im.glade deleted file mode 100644 index 4dcc145868..0000000000 --- a/addressbook/gui/contact-editor/im.glade +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - Add IM Account - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - True - True - False - False - - - - True - False - 2 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - -6 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - 3 - 2 - False - 6 - 12 - - - - True - _IM Service: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - optmenu-service - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - True - -1 - - - 1 - 2 - 0 - 1 - fill - - - - - - - True - _Account name: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - entry-username - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 2 - 3 - - - - - - - True - _Location: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - optmenu-location - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - -1 - - - 1 - 2 - 1 - 2 - fill - - - - - - 0 - True - True - - - - - - - diff --git a/addressbook/printing/e-contact-print-style-editor.c b/addressbook/printing/e-contact-print-style-editor.c deleted file mode 100644 index 22a01f05e4..0000000000 --- a/addressbook/printing/e-contact-print-style-editor.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Chris Lahey - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include "e-contact-print-style-editor.h" -#include "e-util/e-util-private.h" - -static void e_contact_print_style_editor_init (EContactPrintStyleEditor *card); -static void e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *class); -static void e_contact_print_style_editor_finalize (GObject *object); - -static gpointer parent_class; - -GType -e_contact_print_style_editor_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) { - static const GTypeInfo type_info = { - sizeof (EContactPrintStyleEditorClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) e_contact_print_style_editor_class_init, - (GClassFinalizeFunc) NULL, - NULL, /* class_data */ - sizeof (EContactPrintStyleEditor), - 0, /* n_preallocs */ - (GInstanceInitFunc) e_contact_print_style_editor_init, - NULL /* value_table */ - }; - - type = g_type_register_static ( - GTK_TYPE_VBOX, "EContactPrintStyleEditor", - &type_info, 0); - } - - return type; -} - -static void -e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *class) -{ - GObjectClass *object_class; - - parent_class = g_type_class_peek_parent (class); - - object_class = G_OBJECT_CLASS (class); - object_class->finalize = e_contact_print_style_editor_finalize; -} - -#if 0 -static void -_add_image(GtkTable *table, gchar *image, int left, int right, int top, int bottom) -{ - gtk_table_attach(table, - gtk_widget_new(gtk_alignment_get_type(), - "child", gnome_pixmap_new_from_file(image), - "xalign", (double) 0, - "yalign", (double) 0, - "xscale", (double) 0, - "yscale", (double) 0, - NULL), - left, right, top, bottom, - GTK_FILL, GTK_FILL, - 0, 0); -} -#endif - -static void -e_contact_print_style_editor_init (EContactPrintStyleEditor *e_contact_print_style_editor) -{ - GladeXML *gui; - char *gladefile; - - /* e_contact_print_style_editor->card = NULL;*/ - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "e-contact-print.glade", - NULL); - gui = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - e_contact_print_style_editor->gui = gui; - gtk_widget_reparent(glade_xml_get_widget(gui, "vbox-contact-print-style-editor"), - GTK_WIDGET(e_contact_print_style_editor)); -} - -static void -e_contact_print_style_editor_finalize (GObject *object) -{ - EContactPrintStyleEditor *e_contact_print_style_editor = E_CONTACT_PRINT_STYLE_EDITOR(object); - - if (e_contact_print_style_editor->gui != NULL) { - g_object_unref(e_contact_print_style_editor->gui); - e_contact_print_style_editor->gui = NULL; - } - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -GtkWidget* -e_contact_print_style_editor_new (char *filename) -{ - return g_object_new (e_contact_print_style_editor_get_type (), NULL); -} diff --git a/addressbook/printing/e-contact-print-style-editor.h b/addressbook/printing/e-contact-print-style-editor.h deleted file mode 100644 index 15460f6e12..0000000000 --- a/addressbook/printing/e-contact-print-style-editor.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Chris Lahey - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef __E_CONTACT_PRINT_STYLE_EDITOR_H__ -#define __E_CONTACT_PRINT_STYLE_EDITOR_H__ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EContactPrintStyleEditor - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * card ECard * R The card currently being edited - */ - -#define E_CONTACT_PRINT_STYLE_EDITOR_TYPE (e_contact_print_style_editor_get_type ()) -#define E_CONTACT_PRINT_STYLE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditor)) -#define E_CONTACT_PRINT_STYLE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditorClass)) -#define E_IS_MINICARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE)) -#define E_IS_MINICARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE)) - - -typedef struct _EContactPrintStyleEditor EContactPrintStyleEditor; -typedef struct _EContactPrintStyleEditorClass EContactPrintStyleEditorClass; - -struct _EContactPrintStyleEditor -{ - GtkVBox parent; - - /* item specific fields */ - GladeXML *gui; -}; - -struct _EContactPrintStyleEditorClass -{ - GtkVBoxClass parent_class; -}; - - -GtkWidget *e_contact_print_style_editor_new(char *filename); -GType e_contact_print_style_editor_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_PRINT_STYLE_EDITOR_H__ */ diff --git a/addressbook/printing/e-contact-print.glade b/addressbook/printing/e-contact-print.glade deleted file mode 100644 index 22e54c849d..0000000000 --- a/addressbook/printing/e-contact-print.glade +++ /dev/null @@ -1,2018 +0,0 @@ - - - - - - no - Page Setup: - GTK_WINDOW_TOPLEVEL - no - no - no - GTK_WIN_POS_CENTER_ON_PARENT - - - - no - 8 - yes - - - - GTK_BUTTONBOX_END - 8 - yes - - - - yes - yes - yes - gtk-ok - yes - yes - - - - - - yes - yes - yes - gtk-apply - yes - yes - - - - - - yes - yes - yes - gtk-cancel - yes - yes - - - - - 0 - no - yes - GTK_PACK_END - - - - - - no - 5 - yes - - - - 5 - no - 16 - yes - - - - Style name: - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - no - - 0 - yes - yes - - - 0 - no - no - - - - - 0 - yes - yes - - - - - - yes - yes - yes - GTK_POS_TOP - no - 2 - 2 - no - yes - - - - 5 - no - 5 - yes - - - - 0.5 - 0.5 - 0 - 0 - yes - - - - Preview: - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - - - - - - 0 - yes - yes - - - - - - yes - 7 - yes - - - - Options - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - 0 - 0 - 0 - 0 - yes - - - - 8 - no - 0 - 0 - 6 - 5 - yes - - - - Include: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - 1 - 4 - 5 - 0 - 0 - fill - fill - - - - - - Sections: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - 1 - 0 - 1 - 0 - 0 - fill - fill - - - - - - 0 - 0.5 - 0 - 0 - yes - - - - yes - Immediately follow each other - yes - yes - yes - - - - - 1 - 5 - 0 - 1 - 0 - 0 - fill - fill - - - - - - yes - Letter tabs on side - no - yes - yes - - - 1 - 5 - 4 - 5 - 0 - 0 - fill - fill - - - - - - yes - Headings for each letter - no - yes - yes - - - 1 - 5 - 5 - 6 - 0 - 0 - fill - fill - - - - - - 0 - 0.5 - 0 - 0 - yes - - - - yes - Start on a new page - no - yes - yes - - - - - 1 - 5 - 1 - 2 - 0 - 0 - fill - fill - - - - - - Number of columns: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - 3 - 2 - 3 - 0 - 2 - fill - fill - - - - - - Blank forms at end: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - 3 - 3 - 4 - 0 - 2 - fill - fill - - - - - - 0 - 0.5 - 0 - 0 - yes - - - - yes - 1 - 0 - no - GTK_UPDATE_ALWAYS - no - no - yes - 2 0 100 1 10 0 - - - - - 3 - 4 - 3 - 4 - 0 - 2 - fill - fill - - - - - - 0 - 0.5 - 0 - 0 - yes - - - - yes - 1 - 0 - no - GTK_UPDATE_ALWAYS - no - 45 - no - yes - 1 0 100 1 10 0 - - - - - 3 - 4 - 2 - 3 - 0 - 2 - fill - fill - - - - - - - - - 0 - yes - yes - - - - - - no - 8 - yes - - - - Fonts - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - 8 - no - 13 - 8 - 2 - 2 - yes - - - - 0.5 - 1 - 1 - 0 - yes - - - - yes - F_ont... - GTK_RELIEF_NORMAL - yes - yes - - - - - 1 - 2 - 1 - 2 - 0 - 0 - fill - fill - - - - - - 0.5 - 1 - 1 - 0 - yes - - - - yes - _Font... - GTK_RELIEF_NORMAL - 90 - yes - yes - - - - - 1 - 2 - 0 - 1 - 0 - 0 - fill - fill - - - - - - no - 0 - yes - - - - Headings - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - 10 pt. Tahoma - 100 - 0 - yes - yes - - - 0 - no - no - - - - - 0 - 1 - 0 - 1 - 0 - 0 - expand|fill - fill - - - - - - no - 0 - yes - - - - Body - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - 8 pt. Tahoma - 100 - 0 - yes - yes - - - 0 - no - no - - - - - 0 - 1 - 1 - 2 - 0 - 0 - expand|fill - fill - - - - - - - 0 - yes - yes - - - - - - Shading - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - yes - Print using gray shading - no - yes - yes - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - - - - Format - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - tab - - - - - - yes - 0 - yes - - - - no - 0 - yes - - - - Paper - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - 10 - no - 0 - yes - - - - no - 0 - yes - - - - Type: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - yes - - - - yes - no - yes - - - - CList:title - label26 - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - - no - 0 - yes - - - - Dimensions: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - 0 - yes - - - - Width: - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - - 1 - 0 - yes - yes - - - 0 - yes - yes - - - - - - Height: - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - - 1 - 0 - yes - yes - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - - no - 0 - yes - - - - Paper source: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - no - no - yes - no - yes - yes - - - - yes - yes - - 0 - yes - yes - - - - - - yes - - - - yes - - - - - 0.0 - yes - - - - - - - - - 0 - no - no - - - - - 0 - yes - yes - - - - - - - 0 - yes - yes - - - - - - Margins - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - 15 - yes - 6 - 9 - 2 - 4 - yes - - - - Top: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - 1 - 0 - 1 - 0 - 0 - fill - expand|fill - - - - - - Bottom: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - 1 - 1 - 2 - 0 - 0 - fill - expand|fill - - - - - - Left: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 2 - 3 - 0 - 1 - 0 - 0 - fill - expand|fill - - - - - - yes - yes - - 1 - 0 - yes - yes - - - 1 - 2 - 0 - 1 - 0 - 0 - expand|fill - - - - - - - yes - yes - - 1 - 0 - yes - yes - - - 3 - 4 - 0 - 1 - 0 - 0 - expand|fill - - - - - - - yes - yes - - 1 - 0 - yes - yes - - - 3 - 4 - 1 - 2 - 0 - 0 - expand|fill - - - - - - - yes - yes - - 1 - 0 - yes - yes - - - 1 - 2 - 1 - 2 - 0 - 0 - expand|fill - - - - - - - Right: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 2 - 3 - 1 - 2 - 0 - 0 - fill - expand|fill - - - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - - no - 0 - yes - - - - Page - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - 10 - no - 0 - yes - - - - no - 0 - yes - - - - Size: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - yes - - - - yes - no - yes - - - - CList:title - label26 - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - - no - 0 - yes - - - - Dimensions: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - 0 - yes - - - - Width: - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - - 1 - 0 - yes - yes - - - 0 - yes - yes - - - - - - Height: - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - - 1 - 0 - yes - yes - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - - - 0 - yes - yes - - - - - - Orientation - 0 - GTK_SHADOW_ETCHED_IN - yes - - - - no - 10 - yes - - - - - - - - no - 5 - yes - - - - 0 - 1 - 0 - 0 - yes - - - - yes - Portrait - no - yes - yes - - - - - 0 - yes - yes - - - - - - 0 - 0 - 0 - 0 - yes - - - - yes - Landscape - no - yes - yes - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - - - - Paper - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - tab - - - - - - 8 - no - 0 - yes - - - - yes - 4 - 4 - 4 - 3 - yes - - - - 0 - 1 - 0 - 0 - yes - - - - yes - F_ont... - GTK_RELIEF_NORMAL - yes - yes - - - - - 1 - 2 - 2 - 3 - 0 - 0 - fill - fill - - - - - - yes - no - - GTK_WRAP_WORD - 50 - yes - - - 0 - 1 - 1 - 2 - 0 - 0 - fill - expand|fill - - - - - - yes - no - - GTK_WRAP_WORD - 50 - yes - - - 2 - 3 - 1 - 2 - 0 - 0 - expand|fill - fill - - - - - - yes - no - - GTK_WRAP_WORD - 50 - yes - - - 1 - 2 - 1 - 2 - 0 - 0 - fill - fill - - - - - - yes - no - - GTK_WRAP_WORD - 50 - yes - - - 0 - 1 - 3 - 4 - 0 - 0 - fill - expand|fill - - - - - - yes - no - - GTK_WRAP_WORD - 5 - yes - - - 1 - 2 - 3 - 4 - 0 - 0 - fill - fill - - - - - - yes - no - - GTK_WRAP_WORD - 50 - yes - - - 2 - 3 - 3 - 4 - 0 - 0 - fill - fill - - - - - - 0.5 - 1 - 1 - 0 - yes - - - - no - 0 - yes - - - - Header - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - - 0 - yes - yes - - - 0 - no - no - - - - - - - 0 - 1 - 0 - 1 - 0 - 0 - expand|fill - fill - - - - - - 0.5 - 1 - 1 - 0 - yes - - - - no - 0 - yes - - - - Footer: - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - - 0 - yes - yes - - - 0 - no - no - - - - - - - 0 - 1 - 2 - 3 - 0 - 0 - expand|fill - fill - - - - - - 0 - 1 - 0 - 0 - yes - - - - yes - _Font... - GTK_RELIEF_NORMAL - yes - yes - - - - - 1 - 2 - 0 - 1 - 0 - 0 - fill - fill - - - - - 0 - yes - yes - - - - - - no - 0 - yes - - - - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_ICONS - yes - - - - - - - - - - - - - - - - - - - - - - - 0 - yes - no - - - - - 0 - no - yes - - - - - - yes - Reverse on even pages - no - yes - yes - - - 0 - no - no - - - - - - - - Header/Footer - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - tab - - - - - 0 - yes - yes - - - - - 0 - yes - yes - - - - - 4 - yes - yes - - - - diff --git a/addressbook/printing/test-contact-print-style-editor.c b/addressbook/printing/test-contact-print-style-editor.c deleted file mode 100644 index de9fd6b6d6..0000000000 --- a/addressbook/printing/test-contact-print-style-editor.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see - * - * - * Authors: - * Chris Lahey - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include "config.h" - -#include -#include -#include "e-contact-print-style-editor.h" - -int -main (int argc, char *argv[]) -{ - GtkWidget *editor; - GtkWidget *window; - const gchar *title; - - title = "Contact Print Style Editor Test"; - - gtk_init (&argc, &argv); - - glade_init (); - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (window), title); - - editor = e_contact_print_style_editor_new (""); - gtk_container_add (GTK_CONTAINER (window), editor); - - g_signal_connect ( - window, "delete-event", - G_CALLBACK (gtk_main_quit), NULL); - - gtk_widget_show_all (window); - - gtk_main (); - - /* Not reached. */ - return 0; -} diff --git a/calendar/gui/dialogs/meeting-page.glade b/calendar/gui/dialogs/meeting-page.glade deleted file mode 100644 index e69de29bb2..0000000000 -- cgit v1.2.3