aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-04-16 19:36:03 +0800
committerChris Lahey <clahey@src.gnome.org>2000-04-16 19:36:03 +0800
commit23c29cbcf654883e1243f51adb4bfe3556477cff (patch)
tree6f2435672bfe00d39a675e1bd02f72bd9c30be7c /addressbook/gui
parent9aa111c5c129c90ede69ae644280004529f63839 (diff)
downloadgsoc2013-evolution-23c29cbcf654883e1243f51adb4bfe3556477cff.tar
gsoc2013-evolution-23c29cbcf654883e1243f51adb4bfe3556477cff.tar.gz
gsoc2013-evolution-23c29cbcf654883e1243f51adb4bfe3556477cff.tar.bz2
gsoc2013-evolution-23c29cbcf654883e1243f51adb4bfe3556477cff.tar.lz
gsoc2013-evolution-23c29cbcf654883e1243f51adb4bfe3556477cff.tar.xz
gsoc2013-evolution-23c29cbcf654883e1243f51adb4bfe3556477cff.tar.zst
gsoc2013-evolution-23c29cbcf654883e1243f51adb4bfe3556477cff.zip
Added orginization and role fields.
2000-04-16 Christopher James Lahey <clahey@helixcode.com> * addressbook/backend/ebook/e-card.c, addressbook/backend/ebook/e-card.h, addressbook/backend/ebook/test-card.c, addressbook/backend/pas/pas-backend-file.c, addressbook/gui/minicard/e-minicard.c: Added orginization and role fields. * addressbook/contact-editor/contact-editor.glade, addressbook/contact-editor/e-contact-editor-strings.h: Renamed some incorrectly named fields. * addressbook/contact-editor/e-contact-editor.c: Added orginization and role fields as well as hooking up the birth date field. * addressbook/gui/minicard/e-minicard-view.c: Added a missing include. svn path=/trunk/; revision=2458
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/contact-editor/contact-editor.glade174
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-strings.h2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c72
-rw-r--r--addressbook/gui/minicard/e-minicard-view.c1
-rw-r--r--addressbook/gui/minicard/e-minicard.c10
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c1
-rw-r--r--addressbook/gui/widgets/e-minicard.c10
7 files changed, 182 insertions, 88 deletions
diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade
index 24f98decac..1a7cf84a6e 100644
--- a/addressbook/gui/contact-editor/contact-editor.glade
+++ b/addressbook/gui/contact-editor/contact-editor.glade
@@ -4,6 +4,12 @@
<project>
<name>Contact-editor</name>
<program_name>contact-editor</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>True</use_widget_names>
<output_main_file>False</output_main_file>
<output_support_files>False</output_support_files>
@@ -725,7 +731,7 @@
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
- <name>entry14</name>
+ <name>entry-fileas</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -809,7 +815,6 @@
<widget>
<class>GtkButton</class>
<name>button-email1</name>
- <can_focus>True</can_focus>
<widget>
<class>Placeholder</class>
@@ -842,7 +847,6 @@
<widget>
<class>GtkButton</class>
<name>button-address1</name>
- <can_focus>True</can_focus>
<widget>
<class>Placeholder</class>
@@ -875,7 +879,6 @@
<widget>
<class>GtkButton</class>
<name>button-phone4</name>
- <can_focus>True</can_focus>
<widget>
<class>Placeholder</class>
@@ -908,7 +911,6 @@
<widget>
<class>GtkButton</class>
<name>button-phone2</name>
- <can_focus>True</can_focus>
<widget>
<class>Placeholder</class>
@@ -941,7 +943,6 @@
<widget>
<class>GtkButton</class>
<name>button-phone1</name>
- <can_focus>True</can_focus>
<widget>
<class>Placeholder</class>
@@ -1057,7 +1058,6 @@
<widget>
<class>GtkButton</class>
<name>button-phone3</name>
- <can_focus>True</can_focus>
<widget>
<class>Placeholder</class>
@@ -1427,7 +1427,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry5</name>
+ <name>entry-department</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -1451,7 +1451,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry6</name>
+ <name>entry-office</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -1475,7 +1475,7 @@
<widget>
<class>GtkEntry</class>
- <name>entry7</name>
+ <name>entry-profession</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@@ -1595,7 +1595,7 @@
<widget>
<class>GnomeDateEdit</class>
- <name>dateedit2</name>
+ <name>dateedit-anniversary</name>
<show_time>False</show_time>
<use_24_format>False</use_24_format>
<week_start_monday>False</week_start_monday>
@@ -1619,7 +1619,7 @@
<widget>
<class>GnomeDateEdit</class>
- <name>dateedit1</name>
+ <name>dateedit-birthday</name>
<show_time>False</show_time>
<use_24_format>False</use_24_format>
<week_start_monday>False</week_start_monday>
@@ -1930,6 +1930,48 @@
</child>
<widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>dialog-action_area2</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>button28</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button29</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>button30</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+ </widget>
+ </widget>
+
+ <widget>
<class>GtkTable</class>
<name>table2</name>
<rows>2</rows>
@@ -2060,11 +2102,39 @@
</widget>
</widget>
</widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GnomeDialog</class>
+ <name>dialog-add-phone</name>
+ <visible>False</visible>
+ <title>New phone type</title>
+ <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>vbox2</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
<widget>
<class>GtkHButtonBox</class>
<child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area2</name>
+ <name>hbuttonbox1</name>
<layout_style>GTK_BUTTONBOX_END</layout_style>
<spacing>8</spacing>
<child_min_width>85</child_min_width>
@@ -2080,56 +2150,21 @@
<widget>
<class>GtkButton</class>
- <name>button28</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button29</name>
+ <name>button43</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
+ <label>Add</label>
+ <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
</widget>
<widget>
<class>GtkButton</class>
- <name>button30</name>
+ <name>button44</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
</widget>
</widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-add-phone</name>
- <visible>False</visible>
- <title>New phone type</title>
- <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>vbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
<widget>
<class>GtkFrame</class>
@@ -2164,41 +2199,6 @@
</widget>
</widget>
</widget>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</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>button43</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button44</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
</widget>
</widget>
diff --git a/addressbook/gui/contact-editor/e-contact-editor-strings.h b/addressbook/gui/contact-editor/e-contact-editor-strings.h
index 131dd6fdf4..b0795c166b 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-strings.h
+++ b/addressbook/gui/contact-editor/e-contact-editor-strings.h
@@ -44,5 +44,5 @@ gchar *s = N_("Add");
gchar *s = N_("Delete");
gchar *s = N_("Phone Types");
gchar *s = N_("New phone type");
-gchar *s = N_("New phone type");
gchar *s = N_("Add");
+gchar *s = N_("New phone type");
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 5461fe3993..74f7e06345 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -583,10 +583,13 @@ fill_in_info(EContactEditor *editor)
ECardList *phone_list;
ECardList *email_list;
char *title;
+ char *org;
char *url;
+ char *role;
char *note;
const ECardDeliveryAddress *address;
const ECardPhone *phone;
+ const ECardDate *bday;
GtkEditable *editable;
int position = 0;
const char *email;
@@ -599,8 +602,11 @@ fill_in_info(EContactEditor *editor)
"phone", &phone_list,
"email", &email_list,
"url", &url,
+ "org", &org,
"title", &title,
+ "role", &role,
"note", &note,
+ "birth_date", &bday,
NULL);
position = 0;
@@ -643,16 +649,40 @@ fill_in_info(EContactEditor *editor)
gtk_editable_insert_text(editable, url, strlen(url), &position);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-company"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (org)
+ gtk_editable_insert_text(editable, org, strlen(org), &position);
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-jobtitle"));
gtk_editable_delete_text(editable, 0, -1);
if (title)
gtk_editable_insert_text(editable, title, strlen(title), &position);
position = 0;
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-profession"));
+ gtk_editable_delete_text(editable, 0, -1);
+ if (role)
+ gtk_editable_insert_text(editable, role, strlen(role), &position);
+
+ position = 0;
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "text-comments"));
gtk_editable_delete_text(editable, 0, -1);
if (note)
gtk_editable_insert_text(editable, note, strlen(note), &position);
+
+ if (bday) {
+ struct tm time_struct = {0,0,0,0,0,0,0,0,0};
+ time_t time_val;
+ GnomeDateEdit *dateedit;
+ time_struct.tm_mday = bday->day;
+ time_struct.tm_mon = bday->month;
+ time_struct.tm_year = bday->year;
+ time_val = mktime(&time_struct);
+ dateedit = GNOME_DATE_EDIT(glade_xml_get_widget(editor->gui, "dateedit-birthday"));
+ gnome_date_edit_set_time(dateedit, time_val);
+ }
}
}
@@ -667,15 +697,21 @@ extract_info(EContactEditor *editor)
ECardList *phone_list;
ECardList *email_list;
char *url;
+ char *org;
char *title;
+ char *role;
char *note;
const ECardDeliveryAddress *address;
const ECardPhone *phone;
ECardDeliveryAddress *address_copy;
ECardPhone *phone_copy;
char *email;
+ ECardDate *bday;
GtkEditable *editable;
+ GnomeDateEdit *dateedit;
int position = 0;
+ struct tm time_struct;
+ time_t time_val;
ECardIterator *iterator;
@@ -761,6 +797,14 @@ extract_info(EContactEditor *editor)
NULL);
g_free(url);
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-company"));
+ org = gtk_editable_get_chars(editable, 0, -1);
+ if (org && *org)
+ gtk_object_set(GTK_OBJECT(card),
+ "org", org,
+ NULL);
+ g_free(org);
+
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-jobtitle"));
title = gtk_editable_get_chars(editable, 0, -1);
if (title && *title)
@@ -769,6 +813,14 @@ extract_info(EContactEditor *editor)
NULL);
g_free(title);
+ editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "entry-profession"));
+ role = gtk_editable_get_chars(editable, 0, -1);
+ if (role && *role)
+ gtk_object_set(GTK_OBJECT(card),
+ "role", role,
+ NULL);
+ g_free(role);
+
editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, "text-comments"));
note = gtk_editable_get_chars(editable, 0, -1);
if (note && *note)
@@ -777,5 +829,25 @@ extract_info(EContactEditor *editor)
NULL);
g_free(note);
+ dateedit = GNOME_DATE_EDIT(glade_xml_get_widget(editor->gui, "dateedit-birthday"));
+ time_val = gnome_date_edit_get_date(dateedit);
+ gmtime_r(&time_val,
+ &time_struct);
+ bday = g_new(ECardDate, 1);
+ bday->day = time_struct.tm_mday;
+ bday->month = time_struct.tm_mon;
+ bday->year = time_struct.tm_year;
+ gtk_object_set(GTK_OBJECT(card),
+ "birth_date", bday,
+ NULL);
}
}
+
+
+
+
+
+
+
+
+
diff --git a/addressbook/gui/minicard/e-minicard-view.c b/addressbook/gui/minicard/e-minicard-view.c
index 06c308ada8..080693b354 100644
--- a/addressbook/gui/minicard/e-minicard-view.c
+++ b/addressbook/gui/minicard/e-minicard-view.c
@@ -22,6 +22,7 @@
#include <config.h>
#include <gnome.h>
+#include "e-canvas.h"
#include "e-minicard-view.h"
#include "e-minicard.h"
static void e_minicard_view_init (EMinicardView *reflow);
diff --git a/addressbook/gui/minicard/e-minicard.c b/addressbook/gui/minicard/e-minicard.c
index 455b34c8b5..0b6cbd428a 100644
--- a/addressbook/gui/minicard/e-minicard.c
+++ b/addressbook/gui/minicard/e-minicard.c
@@ -448,7 +448,9 @@ remodel( EMinicard *e_minicard )
if (e_minicard->card) {
char *fname;
char *url;
+ char *org;
char *title;
+ char *role;
ECardList *address_list;
ECardList *phone_list;
ECardList *email_list;
@@ -469,7 +471,9 @@ remodel( EMinicard *e_minicard )
"phone", &phone_list,
"email", &email_list,
"url", &url,
+ "org", &org,
"title", &title,
+ "role", &role,
NULL);
if (fname) {
@@ -484,9 +488,15 @@ remodel( EMinicard *e_minicard )
"text", "",
NULL);
+ if (org)
+ add_field(e_minicard, "Company:", org);
+
if (title)
add_field(e_minicard, "Title:", title);
+ if (role)
+ add_field(e_minicard, "Profession:", role);
+
if (address_list) {
for (iterator = e_card_list_get_iterator(address_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) {
const ECardDeliveryAddress *address = e_card_iterator_get(iterator);
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 06c308ada8..080693b354 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -22,6 +22,7 @@
#include <config.h>
#include <gnome.h>
+#include "e-canvas.h"
#include "e-minicard-view.h"
#include "e-minicard.h"
static void e_minicard_view_init (EMinicardView *reflow);
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 455b34c8b5..0b6cbd428a 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -448,7 +448,9 @@ remodel( EMinicard *e_minicard )
if (e_minicard->card) {
char *fname;
char *url;
+ char *org;
char *title;
+ char *role;
ECardList *address_list;
ECardList *phone_list;
ECardList *email_list;
@@ -469,7 +471,9 @@ remodel( EMinicard *e_minicard )
"phone", &phone_list,
"email", &email_list,
"url", &url,
+ "org", &org,
"title", &title,
+ "role", &role,
NULL);
if (fname) {
@@ -484,9 +488,15 @@ remodel( EMinicard *e_minicard )
"text", "",
NULL);
+ if (org)
+ add_field(e_minicard, "Company:", org);
+
if (title)
add_field(e_minicard, "Title:", title);
+ if (role)
+ add_field(e_minicard, "Profession:", role);
+
if (address_list) {
for (iterator = e_card_list_get_iterator(address_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) {
const ECardDeliveryAddress *address = e_card_iterator_get(iterator);