aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2004-05-05 14:24:11 +0800
committerHans Petter <hansp@src.gnome.org>2004-05-05 14:24:11 +0800
commitffdf0418892ce8051b35113b05f62047823ba363 (patch)
tree3be5d0b00e25302807b29de0be54072656f91022 /addressbook
parent2c2632152416a6b3db0ad8f1a2ad74ee2c97a9f8 (diff)
downloadgsoc2013-evolution-ffdf0418892ce8051b35113b05f62047823ba363.tar
gsoc2013-evolution-ffdf0418892ce8051b35113b05f62047823ba363.tar.gz
gsoc2013-evolution-ffdf0418892ce8051b35113b05f62047823ba363.tar.bz2
gsoc2013-evolution-ffdf0418892ce8051b35113b05f62047823ba363.tar.lz
gsoc2013-evolution-ffdf0418892ce8051b35113b05f62047823ba363.tar.xz
gsoc2013-evolution-ffdf0418892ce8051b35113b05f62047823ba363.tar.zst
gsoc2013-evolution-ffdf0418892ce8051b35113b05f62047823ba363.zip
Implement. (init_address_record): Init textview.
2004-05-05 Hans Petter Jansson <hpj@ximian.com> * gui/contact-editor/e-contact-editor.c (init_address_textview): Implement. (init_address_record): Init textview. (fill_in_address_textview): Implement. (fill_in_address_record): Fill in textview. (extract_address_textview): Implement. (extract_address_record): Extract from textview. * gui/contact-editor/contact-editor.glade: Combine address-[12] fields into one multiline text view, as per Anna's new design. svn path=/trunk/; revision=25800
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog13
-rw-r--r--addressbook/gui/contact-editor/contact-editor.glade452
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c82
3 files changed, 270 insertions, 277 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index e44af7f69f..49675d5460 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,16 @@
+2004-05-05 Hans Petter Jansson <hpj@ximian.com>
+
+ * gui/contact-editor/e-contact-editor.c (init_address_textview):
+ Implement.
+ (init_address_record): Init textview.
+ (fill_in_address_textview): Implement.
+ (fill_in_address_record): Fill in textview.
+ (extract_address_textview): Implement.
+ (extract_address_record): Extract from textview.
+
+ * gui/contact-editor/contact-editor.glade: Combine address-[12] fields
+ into one multiline text view, as per Anna's new design.
+
2004-05-04 Larry Ewing <lewing@ximian.com>
* gui/component/addressbook-config.c (query_for_supported_bases):
diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade
index 4e0fa61c6c..a25ae8fb9b 100644
--- a/addressbook/gui/contact-editor/contact-editor.glade
+++ b/addressbook/gui/contact-editor/contact-editor.glade
@@ -2324,9 +2324,9 @@
<property name="column_spacing">6</property>
<child>
- <widget class="GtkLabel" id="label423">
+ <widget class="GtkLabel" id="label425">
<property name="visible">True</property>
- <property name="label" translatable="yes">Address:</property>
+ <property name="label" translatable="yes">City:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2338,8 +2338,8 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
@@ -2348,7 +2348,7 @@
</child>
<child>
- <widget class="GtkEntry" id="entry-home-address-1">
+ <widget class="GtkEntry" id="entry-home-city">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2360,7 +2360,7 @@
<property name="activates_default">False</property>
</widget>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
@@ -2369,22 +2369,22 @@
</child>
<child>
- <widget class="GtkLabel" id="label424">
+ <widget class="GtkLabel" id="label427">
<property name="visible">True</property>
- <property name="label" translatable="yes">Address 2:</property>
+ <property name="label" translatable="yes">Zip/Postal Code:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">1</property>
+ <property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
@@ -2393,7 +2393,7 @@
</child>
<child>
- <widget class="GtkEntry" id="entry-home-address-2">
+ <widget class="GtkEntry" id="entry-home-zip">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2405,7 +2405,7 @@
<property name="activates_default">False</property>
</widget>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
@@ -2414,9 +2414,9 @@
</child>
<child>
- <widget class="GtkLabel" id="label425">
+ <widget class="GtkLabel" id="label426">
<property name="visible">True</property>
- <property name="label" translatable="yes">City:</property>
+ <property name="label" translatable="yes">State/Province:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2428,8 +2428,8 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
@@ -2438,31 +2438,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label426">
- <property name="visible">True</property>
- <property name="label" translatable="yes">State/Province:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-home-city">
+ <widget class="GtkEntry" id="entry-home-state">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2474,8 +2450,8 @@
<property name="activates_default">False</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
@@ -2483,15 +2459,15 @@
</child>
<child>
- <widget class="GtkLabel" id="label427">
+ <widget class="GtkLabel" id="label428">
<property name="visible">True</property>
- <property name="label" translatable="yes">Zip/Postal Code:</property>
+ <property name="label" translatable="yes">Country:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0</property>
+ <property name="xalign">1</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
@@ -2499,15 +2475,15 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry-home-zip">
+ <widget class="GtkEntry" id="entry-home-country">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2521,27 +2497,6 @@
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-home-state">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
@@ -2549,9 +2504,9 @@
</child>
<child>
- <widget class="GtkLabel" id="label428">
+ <widget class="GtkLabel" id="label445">
<property name="visible">True</property>
- <property name="label" translatable="yes">Country:</property>
+ <property name="label" translatable="yes">Address:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2563,33 +2518,48 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
<property name="x_options">fill</property>
- <property name="y_options"></property>
+ <property name="y_options">fill</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry-home-country">
+ <widget class="GtkScrolledWindow" id="scrolledwindow42">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="textview-home-address">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
<property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="y_options">fill</property>
</packing>
</child>
</widget>
@@ -2639,9 +2609,9 @@
<property name="column_spacing">6</property>
<child>
- <widget class="GtkLabel" id="label430">
+ <widget class="GtkLabel" id="label432">
<property name="visible">True</property>
- <property name="label" translatable="yes">Address:</property>
+ <property name="label" translatable="yes">City:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2653,8 +2623,8 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
@@ -2663,7 +2633,7 @@
</child>
<child>
- <widget class="GtkEntry" id="entry-work-address-1">
+ <widget class="GtkEntry" id="entry-work-city">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2675,7 +2645,7 @@
<property name="activates_default">False</property>
</widget>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
@@ -2684,9 +2654,9 @@
</child>
<child>
- <widget class="GtkLabel" id="label431">
+ <widget class="GtkLabel" id="label433">
<property name="visible">True</property>
- <property name="label" translatable="yes">Address 2:</property>
+ <property name="label" translatable="yes">State/Province:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2698,17 +2668,17 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry-work-address-2">
+ <widget class="GtkEntry" id="entry-work-state">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2720,42 +2690,18 @@
<property name="activates_default">False</property>
</widget>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">3</property>
<property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label432">
- <property name="visible">True</property>
- <property name="label" translatable="yes">City:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label433">
+ <widget class="GtkLabel" id="label434">
<property name="visible">True</property>
- <property name="label" translatable="yes">State/Province:</property>
+ <property name="label" translatable="yes">Zip/Postal Code:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2767,17 +2713,17 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry-work-city">
+ <widget class="GtkEntry" id="entry-work-zip">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2789,24 +2735,24 @@
<property name="activates_default">False</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label434">
+ <widget class="GtkLabel" id="label435">
<property name="visible">True</property>
- <property name="label" translatable="yes">Zip/Postal Code:</property>
+ <property name="label" translatable="yes">Country:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0</property>
+ <property name="xalign">1</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
@@ -2814,15 +2760,15 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry-work-zip">
+ <widget class="GtkEntry" id="entry-work-country">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2836,37 +2782,52 @@
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry-work-state">
+ <widget class="GtkScrolledWindow" id="scrolledwindow43">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="textview-work-address">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">0</property>
<property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="y_options">fill</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label435">
+ <widget class="GtkLabel" id="label430">
<property name="visible">True</property>
- <property name="label" translatable="yes">Country:</property>
+ <property name="label" translatable="yes">Address:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2878,33 +2839,12 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
<property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-work-country">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="y_options">fill</property>
</packing>
</child>
</widget>
@@ -2954,9 +2894,9 @@
<property name="column_spacing">6</property>
<child>
- <widget class="GtkLabel" id="label438">
+ <widget class="GtkLabel" id="label440">
<property name="visible">True</property>
- <property name="label" translatable="yes">Address:</property>
+ <property name="label" translatable="yes">City:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2968,8 +2908,8 @@
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
@@ -2978,7 +2918,7 @@
</child>
<child>
- <widget class="GtkEntry" id="entry-other-address-1">
+ <widget class="GtkEntry" id="entry-other-city">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -2990,7 +2930,7 @@
<property name="activates_default">False</property>
</widget>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
@@ -2999,9 +2939,9 @@
</child>
<child>
- <widget class="GtkLabel" id="label439">
+ <widget class="GtkLabel" id="label446">
<property name="visible">True</property>
- <property name="label" translatable="yes">Address 2:</property>
+ <property name="label" translatable="yes">Address:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3015,15 +2955,15 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry-other-address-2">
+ <widget class="GtkEntry" id="entry-other-state">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@@ -3035,34 +2975,10 @@
<property name="activates_default">False</property>
</widget>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">3</property>
<property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label440">
- <property name="visible">True</property>
- <property name="label" translatable="yes">City:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
@@ -3076,38 +2992,17 @@
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0</property>
+ <property name="xalign">1</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-other-city">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
@@ -3129,8 +3024,8 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@@ -3151,29 +3046,8 @@
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-other-state">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
@@ -3222,6 +3096,42 @@
<property name="y_options"></property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow44">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="textview-other-address">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
</child>
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index b5f85fe1fc..b9278529fc 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -1079,6 +1079,21 @@ extract_im (EContactEditor *editor)
}
static void
+init_address_textview (EContactEditor *editor, gint record)
+{
+ gchar *textview_name;
+ GtkWidget *textview;
+ GtkTextBuffer *text_buffer;
+
+ textview_name = g_strdup_printf ("textview-%s-address", address_name [record]);
+ textview = glade_xml_get_widget (editor->gui, textview_name);
+ g_free (textview_name);
+
+ text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
+ g_signal_connect (text_buffer, "changed", G_CALLBACK (widget_changed), editor);
+}
+
+static void
init_address_field (EContactEditor *editor, gint record, const gchar *widget_field_name)
{
gchar *entry_name;
@@ -1095,8 +1110,7 @@ init_address_field (EContactEditor *editor, gint record, const gchar *widget_fie
static void
init_address_record (EContactEditor *editor, gint record)
{
- init_address_field (editor, record, "address-1");
- init_address_field (editor, record, "address-2");
+ init_address_textview (editor, record);
init_address_field (editor, record, "city");
init_address_field (editor, record, "state");
init_address_field (editor, record, "zip");
@@ -1113,6 +1127,25 @@ init_address (EContactEditor *editor)
}
static void
+fill_in_address_textview (EContactEditor *editor, gint record, EContactAddress *address)
+{
+ gchar *textview_name;
+ GtkWidget *textview;
+ GtkTextBuffer *text_buffer;
+ GtkTextIter iter;
+
+ textview_name = g_strdup_printf ("textview-%s-address", address_name [record]);
+ textview = glade_xml_get_widget (editor->gui, textview_name);
+ g_free (textview_name);
+
+ text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
+ gtk_text_buffer_set_text (text_buffer, address->street ? address->street : "", -1);
+
+ gtk_text_buffer_get_end_iter (text_buffer, &iter);
+ gtk_text_buffer_insert (text_buffer, &iter, address->ext ? address->ext : "", -1);
+}
+
+static void
fill_in_address_field (EContactEditor *editor, gint record, const gchar *widget_field_name,
const gchar *string)
{
@@ -1135,8 +1168,7 @@ fill_in_address_record (EContactEditor *editor, gint record)
if (!address)
return;
- fill_in_address_field (editor, record, "address-1", address->street);
- fill_in_address_field (editor, record, "address-2", address->ext);
+ fill_in_address_textview (editor, record, address);
fill_in_address_field (editor, record, "city", address->locality);
fill_in_address_field (editor, record, "state", address->region);
fill_in_address_field (editor, record, "zip", address->code);
@@ -1154,6 +1186,45 @@ fill_in_address (EContactEditor *editor)
fill_in_address_record (editor, i);
}
+static void
+extract_address_textview (EContactEditor *editor, gint record, EContactAddress *address)
+{
+ gchar *textview_name;
+ GtkWidget *textview;
+ GtkTextBuffer *text_buffer;
+ GtkTextIter iter_1, iter_2;
+
+ textview_name = g_strdup_printf ("textview-%s-address", address_name [record]);
+ textview = glade_xml_get_widget (editor->gui, textview_name);
+ g_free (textview_name);
+
+ text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
+ gtk_text_buffer_get_start_iter (text_buffer, &iter_1);
+
+ /* Skip blank lines */
+ while (gtk_text_iter_get_chars_in_line (&iter_1) < 1 &&
+ !gtk_text_iter_is_end (&iter_1))
+ gtk_text_iter_forward_line (&iter_1);
+
+ if (gtk_text_iter_is_end (&iter_1))
+ return;
+
+ iter_2 = iter_1;
+ gtk_text_iter_forward_line (&iter_2);
+
+ /* Extract street (first line of text) */
+ address->street = gtk_text_iter_get_text (&iter_1, &iter_2);
+
+ iter_1 = iter_2;
+ if (gtk_text_iter_is_end (&iter_1))
+ return;
+
+ gtk_text_iter_forward_to_end (&iter_2);
+
+ /* Extract extended address (remaining lines of text) */
+ address->ext = gtk_text_iter_get_text (&iter_1, &iter_2);
+}
+
static gchar *
extract_address_field (EContactEditor *editor, gint record, const gchar *widget_field_name)
{
@@ -1174,8 +1245,7 @@ extract_address_record (EContactEditor *editor, gint record)
address = g_new0 (EContactAddress, 1);
- address->street = extract_address_field (editor, record, "address-1");
- address->ext = extract_address_field (editor, record, "address-2");
+ extract_address_textview (editor, record, address);
address->locality = extract_address_field (editor, record, "city");
address->region = extract_address_field (editor, record, "state");
address->code = extract_address_field (editor, record, "zip");