diff options
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r-- | addressbook/gui/contact-editor/Makefile.am | 8 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/contact-editor.glade | 979 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-address.c | 624 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-address.h | 74 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-fullname.c | 36 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-im.c | 513 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-im.h | 79 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 370 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/fulladdr.glade | 446 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/fullname.glade | 485 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/im.glade | 206 |
11 files changed, 549 insertions, 3271 deletions
diff --git a/addressbook/gui/contact-editor/Makefile.am b/addressbook/gui/contact-editor/Makefile.am index f813db72e8..8dd4cd9180 100644 --- a/addressbook/gui/contact-editor/Makefile.am +++ b/addressbook/gui/contact-editor/Makefile.am @@ -20,10 +20,6 @@ privsolib_LTLIBRARIES = \ libecontacteditor_la_SOURCES = \ eab-editor.c \ eab-editor.h \ - e-contact-editor-im.c \ - e-contact-editor-im.h \ - e-contact-editor-address.c \ - e-contact-editor-address.h \ e-contact-editor-fullname.c \ e-contact-editor-fullname.h \ e-contact-editor.c \ @@ -44,11 +40,7 @@ libecontacteditor_la_LIBADD = \ $(EVOLUTION_ADDRESSBOOK_LIBS) glade_DATA = \ - im.glade \ contact-editor.glade \ - fulladdr.glade \ fullname.glade -CLEANFILES = $(BUILT_SOURCES) - EXTRA_DIST= $(glade_DATA) diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade index bc6cbf1e54..c840cf679b 100644 --- a/addressbook/gui/contact-editor/contact-editor.glade +++ b/addressbook/gui/contact-editor/contact-editor.glade @@ -205,7 +205,7 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">entry-file-as</property> + <property name="mnemonic_widget">combo-file-as</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -314,48 +314,6 @@ </child> <child> - <widget class="GtkCombo" id="combo-file-as"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - <accessibility> - <atkrelation target="accellabel-fileas" type="labelled-by"/> - </accessibility> - - <child internal-child="entry"> - <widget class="GtkEntry" id="entry-file-as"> - <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">*</property> - <property name="activates_default">False</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="list14"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="Custom" id="source-combo-box-source"> <property name="visible">True</property> <property name="creation_function">e_contact_editor_create_source_combo_box</property> @@ -391,6 +349,26 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="combo-file-as"> + <property name="visible">True</property> + <property name="items">a +b +c</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -441,84 +419,6 @@ <property name="column_spacing">6</property> <child> - <widget class="GtkOptionMenu" id="optionmenu-email-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu169"> - - <child> - <widget class="GtkMenuItem" id="menuitem380"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem381"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="optionmenu-email-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu170"> - - <child> - <widget class="GtkMenuItem" id="menuitem382"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem383"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="entry-email-2"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -529,9 +429,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-email-2" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -543,84 +440,6 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-email-3"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu171"> - - <child> - <widget class="GtkMenuItem" id="menuitem384"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem385"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <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> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="optionmenu-email-4"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu172"> - - <child> - <widget class="GtkMenuItem" id="menuitem386"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem387"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <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-email-1"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -631,9 +450,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-email-1" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -655,9 +471,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-email-3" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> @@ -679,9 +492,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-email-4" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> @@ -713,6 +523,78 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkComboBox" id="combobox-email-1"> + <property name="visible">True</property> + <property name="items">Work +Personal</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="combobox-email-2"> + <property name="visible">True</property> + <property name="items">Work +Personal</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="combobox-email-3"> + <property name="visible">True</property> + <property name="items">Work +Personal</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <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> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="combobox-email-4"> + <property name="visible">True</property> + <property name="items">Work +Personal</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <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">fill</property> + </packing> + </child> </widget> </child> @@ -786,9 +668,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-1" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -810,9 +689,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-2" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -834,9 +710,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-4" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> @@ -858,9 +731,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-3" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> @@ -872,33 +742,11 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-1"> + <widget class="GtkComboBox" id="combobox-phone-1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu179"> - - <child> - <widget class="GtkMenuItem" id="menuitem412"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem413"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">0</property> @@ -906,38 +754,16 @@ <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="GtkOptionMenu" id="optionmenu-phone-2"> + <widget class="GtkComboBox" id="combobox-phone-2"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu180"> - - <child> - <widget class="GtkMenuItem" id="menuitem414"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem415"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">0</property> @@ -945,38 +771,16 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-3"> + <widget class="GtkComboBox" id="combobox-phone-3"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu181"> - - <child> - <widget class="GtkMenuItem" id="menuitem416"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem417"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">2</property> @@ -984,38 +788,16 @@ <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="GtkOptionMenu" id="optionmenu-phone-4"> + <widget class="GtkComboBox" id="combobox-phone-4"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu182"> - - <child> - <widget class="GtkMenuItem" id="menuitem418"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem419"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">2</property> @@ -1023,7 +805,7 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> </widget> @@ -1043,85 +825,49 @@ <property name="column_spacing">6</property> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-5"> + <widget class="GtkEntry" id="entry-phone-5"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu187"> - - <child> - <widget class="GtkMenuItem" id="menuitem430"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem431"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <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">*</property> + <property name="activates_default">False</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">0</property> <property name="bottom_attach">1</property> - <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-6"> + <widget class="GtkEntry" id="entry-phone-6"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu188"> - - <child> - <widget class="GtkMenuItem" id="menuitem432"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem433"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <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">*</property> + <property name="activates_default">False</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-phone-5"> + <widget class="GtkEntry" id="entry-phone-7"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -1131,13 +877,10 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-5" type="labelled-by"/> - </accessibility> </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">0</property> <property name="bottom_attach">1</property> <property name="y_options"></property> @@ -1145,7 +888,7 @@ </child> <child> - <widget class="GtkEntry" id="entry-phone-6"> + <widget class="GtkEntry" id="entry-phone-8"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -1155,13 +898,10 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-6" type="labelled-by"/> - </accessibility> </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">1</property> <property name="bottom_attach">2</property> <property name="y_options"></property> @@ -1169,128 +909,70 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-phone-7"> + <widget class="GtkComboBox" id="combobox-phone-5"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu189"> - - <child> - <widget class="GtkMenuItem" id="menuitem434"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem435"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</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="GtkOptionMenu" id="optionmenu-phone-8"> + <widget class="GtkComboBox" id="combobox-phone-6"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu190"> - - <child> - <widget class="GtkMenuItem" id="menuitem436"> - <property name="visible">True</property> - <property name="label" translatable="yes">Work</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_work2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem437"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_personal2_activate" last_modification_time="Fri, 12 Mar 2004 19:27:14 GMT"/> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-phone-7"> + <widget class="GtkComboBox" id="combobox-phone-7"> <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">*</property> - <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-7" type="labelled-by"/> - </accessibility> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</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="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-phone-8"> + <widget class="GtkComboBox" id="combobox-phone-8"> <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">*</property> - <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-phone-8" type="labelled-by"/> - </accessibility> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_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="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> </widget> @@ -1402,54 +1084,6 @@ <property name="column_spacing">6</property> <child> - <widget class="GtkOptionMenu" id="optionmenu-im-service-1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu173"> - - <child> - <widget class="GtkMenuItem" id="menuitem388"> - <property name="visible">True</property> - <property name="label" translatable="yes">AIM</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_aim1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem389"> - <property name="visible">True</property> - <property name="label" translatable="yes">Novell GroupWise</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_novell_groupwise1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem390"> - <property name="visible">True</property> - <property name="label" translatable="yes">MSN Messenger</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_msn_messenger1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="entry-im-name-1"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -1460,9 +1094,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-im-service-1" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -1474,54 +1105,6 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-im-service-2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu174"> - - <child> - <widget class="GtkMenuItem" id="menuitem391"> - <property name="visible">True</property> - <property name="label" translatable="yes">AIM</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_aim1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem392"> - <property name="visible">True</property> - <property name="label" translatable="yes">Novell Groupwise</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_novell_groupwise1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem393"> - <property name="visible">True</property> - <property name="label" translatable="yes">MSN Messenger</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_msn_messenger1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="entry-im-name-2"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -1532,9 +1115,6 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-im-service-2" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">1</property> @@ -1546,55 +1126,28 @@ </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-im-service-3"> + <widget class="GtkEntry" id="entry-im-name-3"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu175"> - - <child> - <widget class="GtkMenuItem" id="menuitem394"> - <property name="visible">True</property> - <property name="label" translatable="yes">AIM</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_aim1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem395"> - <property name="visible">True</property> - <property name="label" translatable="yes">Novell Groupwise</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_novell_groupwise1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem396"> - <property name="visible">True</property> - <property name="label" translatable="yes">MSN Messenger</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_msn_messenger1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - </widget> - </child> + <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">*</property> + <property name="activates_default">False</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</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> - <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkEntry" id="entry-im-name-3"> + <widget class="GtkEntry" id="entry-im-name-4"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">True</property> @@ -1604,88 +1157,81 @@ <property name="has_frame">True</property> <property name="invisible_char">*</property> <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-im-service-3" type="labelled-by"/> - </accessibility> </widget> <packing> <property name="left_attach">3</property> <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="optionmenu-im-service-4"> + <widget class="GtkComboBox" id="combobox-im-service-1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu183"> - - <child> - <widget class="GtkMenuItem" id="menuitem420"> - <property name="visible">True</property> - <property name="label" translatable="yes">AIM</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_aim1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> - <child> - <widget class="GtkMenuItem" id="menuitem421"> - <property name="visible">True</property> - <property name="label" translatable="yes">Novell Groupwise</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_novell_groupwise1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> + <child> + <widget class="GtkComboBox" id="combobox-im-service-2"> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> - <child> - <widget class="GtkMenuItem" id="menuitem422"> - <property name="visible">True</property> - <property name="label" translatable="yes">MSN Messenger</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_msn_messenger1_activate" last_modification_time="Fri, 12 Mar 2004 18:38:59 GMT"/> - </widget> - </child> - </widget> - </child> + <child> + <widget class="GtkComboBox" id="combobox-im-service-3"> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <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="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-im-name-4"> + <widget class="GtkComboBox" id="combobox-im-service-4"> <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">*</property> - <property name="activates_default">False</property> - <accessibility> - <atkrelation target="optionmenu-im-service-4" type="labelled-by"/> - </accessibility> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> - <property name="left_attach">3</property> - <property name="right_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="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> </widget> @@ -2785,9 +2331,9 @@ <property name="border_width">6</property> <property name="visible">True</property> <property name="xalign">0.5</property> - <property name="yalign">0.15</property> + <property name="yalign">0.15000000596</property> <property name="xscale">1</property> - <property name="yscale">0.70</property> + <property name="yscale">0.699999988079</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">19</property> @@ -3033,7 +2579,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">4</property> @@ -3084,7 +2630,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3113,7 +2659,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3132,15 +2678,12 @@ <property name="y_options"></property> </packing> </child> - - <child> - <placeholder /> - </child> - - <child> - <placeholder /> - </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> </child> @@ -3156,7 +2699,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0.42</property> + <property name="xalign">0.419999986887</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3190,9 +2733,9 @@ <property name="border_width">6</property> <property name="visible">True</property> <property name="xalign">0.5</property> - <property name="yalign">0.15</property> + <property name="yalign">0.15000000596</property> <property name="xscale">1</property> - <property name="yscale">0.70</property> + <property name="yscale">0.699999988079</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">19</property> @@ -3224,6 +2767,7 @@ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + <child> <widget class="GtkTextView" id="textview-work-address"> <property name="height_request">25</property> @@ -3314,7 +2858,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3466,7 +3010,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">4</property> @@ -3517,7 +3061,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3536,17 +3080,16 @@ <property name="y_options"></property> </packing> </child> - </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> </child> </widget> - <packing> - <property name="padding">8</property> - <property name="expand">True</property> - <property name="fill">False</property> - </packing> </child> <child> @@ -3558,7 +3101,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0.42</property> + <property name="xalign">0.419999986887</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3592,9 +3135,9 @@ <property name="border_width">6</property> <property name="visible">True</property> <property name="xalign">0.5</property> - <property name="yalign">0.15</property> + <property name="yalign">0.15000000596</property> <property name="xscale">1</property> - <property name="yscale">0.70</property> + <property name="yscale">0.699999988079</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> <property name="left_padding">19</property> @@ -3675,7 +3218,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3827,7 +3370,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">4</property> @@ -3878,7 +3421,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">1.0</property> + <property name="xalign">1</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -3908,6 +3451,7 @@ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_IN</property> <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + <child> <widget class="GtkTextView" id="textview-other-address"> <property name="height_request">25</property> @@ -3948,11 +3492,6 @@ </widget> </child> </widget> - <packing> - <property name="padding">8</property> - <property name="expand">True</property> - <property name="fill">False</property> - </packing> </child> <child> @@ -3964,7 +3503,7 @@ <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0.42</property> + <property name="xalign">0.419999986887</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> 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 <http://www.gnu.org/licenses/> - * - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include <config.h> - -#include <e-contact-editor-address.h> -#include <e-util/e-util-private.h> - -#include <glib/gi18n.h> -#include <misc/e-gui-utils.h> -#include <string.h> -#include <stdlib.h> -#include <locale.h> - -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 <http://www.gnu.org/licenses/> - * - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef __E_CONTACT_EDITOR_ADDRESS_H__ -#define __E_CONTACT_EDITOR_ADDRESS_H__ - -#include <gtk/gtk.h> -#include <glade/glade.h> -#include <libebook/e-contact.h> - -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-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 3eeaa9d6ed..bbe9ece7ba 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -191,8 +191,8 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id, case PROP_EDITABLE: { int i; char *widget_names[] = { - "combo-title", - "combo-suffix", + "comboentry-title", + "comboentry-suffix", "entry-first", "entry-middle", "entry-last", @@ -210,10 +210,10 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id, gtk_editable_set_editable (GTK_EDITABLE (w), e_contact_editor_fullname->editable); } - else if (GTK_IS_COMBO (w)) { - gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (w)->entry), + else if (GTK_IS_COMBO_BOX_ENTRY (w)) { + gtk_editable_set_editable (GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (w))), e_contact_editor_fullname->editable); - gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_fullname->editable); + gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable); } else if (GTK_IS_LABEL (w)) { gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable); @@ -252,7 +252,14 @@ e_contact_editor_fullname_get_property (GObject *object, guint prop_id, static void fill_in_field(EContactEditorFullname *editor, char *field, char *string) { - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); + GtkWidget *widget = glade_xml_get_widget (editor->gui, field); + GtkEntry *entry = NULL; + + if (GTK_IS_ENTRY (widget)) + entry = GTK_ENTRY (widget); + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) + entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))); + if (entry) { if (string) gtk_entry_set_text(entry, string); @@ -266,18 +273,25 @@ fill_in_info(EContactEditorFullname *editor) { EContactName *name = editor->name; if (name) { - fill_in_field(editor, "entry-title", name->prefixes); + fill_in_field(editor, "comboentry-title", name->prefixes); fill_in_field(editor, "entry-first", name->given); fill_in_field(editor, "entry-middle", name->additional); fill_in_field(editor, "entry-last", name->family); - fill_in_field(editor, "entry-suffix", name->suffixes); + fill_in_field(editor, "comboentry-suffix", name->suffixes); } } static char * extract_field(EContactEditorFullname *editor, char *field) { - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); + GtkWidget *widget = glade_xml_get_widget(editor->gui, field); + GtkEntry *entry = NULL; + + if (GTK_IS_ENTRY (widget)) + entry = GTK_ENTRY (widget); + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) + entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))); + if (entry) return g_strdup (gtk_entry_get_text(entry)); else @@ -293,9 +307,9 @@ extract_info(EContactEditorFullname *editor) editor->name = name; } - name->prefixes = extract_field(editor, "entry-title" ); + name->prefixes = extract_field(editor, "comboentry-title" ); name->given = extract_field(editor, "entry-first" ); name->additional = extract_field(editor, "entry-middle"); name->family = extract_field(editor, "entry-last" ); - name->suffixes = extract_field(editor, "entry-suffix"); + name->suffixes = extract_field(editor, "comboentry-suffix"); } 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 <http://www.gnu.org/licenses/> - * - * - * Authors: - * Christian Hammond <chipx86@gnupdate.org> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include <config.h> -#include "e-contact-editor-im.h" -#include <glib/gi18n.h> -#include <string.h> -#include <e-util/e-util-private.h> - -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 <http://www.gnu.org/licenses/> - * - * - * Authors: - * Christian Hammond <chipx86@gnupdate.org> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef __E_CONTACT_EDITOR_IM_H__ -#define __E_CONTACT_EDITOR_IM_H__ - -#include <gtk/gtk.h> -#include <glade/glade.h> -#include <libebook/e-contact.h> - -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/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 24b807cf3a..e4447b9075 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -54,8 +54,6 @@ #include "eab-contact-merging.h" -#include "e-contact-editor-address.h" -#include "e-contact-editor-im.h" #include "e-contact-editor-fullname.h" #define EMAIL_SLOTS 4 @@ -500,7 +498,7 @@ name_to_style (const EContactName *name, const gchar *company, int style) static int file_as_get_style (EContactEditor *editor) { - GtkEntry *file_as = GTK_ENTRY(glade_xml_get_widget(editor->gui, "entry-file-as")); + GtkEntry *file_as = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (glade_xml_get_widget(editor->gui, "combo-file-as")))); GtkEntry *company_w = GTK_ENTRY (glade_xml_get_widget (editor->gui, "entry-company")); char *filestring; char *trystring; @@ -533,23 +531,20 @@ file_as_set_style (EContactEditor *editor, int style) char *string; int i; GList *strings = NULL; - GtkEntry *file_as = GTK_ENTRY (glade_xml_get_widget (editor->gui, "entry-file-as")); + GtkComboBox *combo_file_as = GTK_COMBO_BOX (glade_xml_get_widget (editor->gui, "combo-file-as")); GtkEntry *company_w = GTK_ENTRY (glade_xml_get_widget (editor->gui, "entry-company")); - GtkWidget *widget; const gchar *company; - if (!(file_as && GTK_IS_ENTRY (file_as))) + if (!(combo_file_as && GTK_IS_COMBO_BOX_ENTRY (combo_file_as))) return; company = gtk_entry_get_text (GTK_ENTRY (company_w)); if (style == -1) { - string = g_strdup (gtk_entry_get_text(file_as)); + string = gtk_combo_box_get_active_text (combo_file_as); strings = g_list_append (strings, string); } - widget = glade_xml_get_widget (editor->gui, "combo-file-as"); - for (i = 0; i < 6; i++) { if (style_makes_sense (editor->name, company, i)) { char *u; @@ -561,16 +556,22 @@ file_as_set_style (EContactEditor *editor, int style) } } - if (widget && GTK_IS_COMBO (widget)) { - GtkCombo *combo = GTK_COMBO (widget); - gtk_combo_set_popdown_strings (combo, strings); - g_list_foreach (strings, (GFunc) g_free, NULL); - g_list_free (strings); + if (combo_file_as) { + GList *l; + + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (combo_file_as))); + + for (l = strings; l; l = l->next) { + gtk_combo_box_append_text (combo_file_as, l->data); + } } + g_list_foreach (strings, (GFunc) g_free, NULL); + g_list_free (strings); + if (style != -1) { string = name_to_style (editor->name, company, style); - set_entry_text (editor, file_as, string); + set_entry_text (editor, GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo_file_as))), string); g_free (string); } } @@ -593,9 +594,9 @@ name_entry_changed (GtkWidget *widget, EContactEditor *editor) } static void -file_as_entry_changed (GtkWidget *widget, EContactEditor *editor) +file_as_combo_changed (GtkWidget *widget, EContactEditor *editor) { - char *string = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); + char *string = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); if (string && *string) { gchar *title; @@ -648,7 +649,7 @@ sensitize_ok (EContactEditor *ce) GtkWidget *widget; gboolean allow_save; GtkWidget *entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); - GtkWidget *entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); + GtkWidget *entry_file_as = gtk_bin_get_child (GTK_BIN (glade_xml_get_widget (ce->gui, "combo-file-as"))); GtkWidget *company_name = glade_xml_get_widget (ce->gui, "entry-company"); const char *name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); const char *file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); @@ -706,26 +707,19 @@ set_entry_text (EContactEditor *editor, GtkEntry *entry, const gchar *string) } static void -set_option_menu_history (EContactEditor *editor, GtkOptionMenu *option_menu, gint history) +set_combo_box_active (EContactEditor *editor, GtkComboBox *combo_box, gint active) { - g_signal_handlers_block_matched (option_menu, G_SIGNAL_MATCH_DATA, + g_signal_handlers_block_matched (combo_box, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor); - gtk_option_menu_set_history (option_menu, history); - g_signal_handlers_unblock_matched (option_menu, G_SIGNAL_MATCH_DATA, + gtk_combo_box_set_active (combo_box, active); + g_signal_handlers_unblock_matched (combo_box, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor); } static void -email_menu_changed(GtkWidget *widget, GtkWidget *next) -{ - gtk_widget_grab_focus(next); -} - -static void init_email_record_location (EContactEditor *editor, gint record) { - GtkWidget *location_option_menu; - GtkWidget *location_menu; + GtkComboBox *location_combo_box; GtkWidget *email_entry; gchar *widget_name; gint i; @@ -734,24 +728,18 @@ init_email_record_location (EContactEditor *editor, gint record) email_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - widget_name = g_strdup_printf ("optionmenu-email-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-email-%d", record); + location_combo_box = GTK_COMBO_BOX (glade_xml_get_widget (editor->gui, widget_name)); g_free (widget_name); - location_menu = gtk_menu_new (); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (location_combo_box))); for (i = 0; i < G_N_ELEMENTS (common_location); i++) { - GtkWidget *item; - - item = gtk_menu_item_new_with_label (_(common_location [i].pretty_name)); - gtk_menu_shell_append (GTK_MENU_SHELL (location_menu), item); -+ g_signal_connect (item, "activate", G_CALLBACK (email_menu_changed), email_entry); + gtk_combo_box_append_text (location_combo_box, _(common_location [i].pretty_name)); } - gtk_widget_show_all (location_menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (location_option_menu), location_menu); - - g_signal_connect (location_option_menu, "changed", G_CALLBACK (object_changed), editor); + g_signal_connect_swapped (location_combo_box, "changed", G_CALLBACK (gtk_widget_grab_focus), email_entry); + g_signal_connect (location_combo_box, "changed", G_CALLBACK (object_changed), editor); g_signal_connect (email_entry, "changed", G_CALLBACK (object_changed), editor); g_signal_connect_swapped (email_entry, "activate", G_CALLBACK (entry_activated), editor); } @@ -768,19 +756,19 @@ init_email (EContactEditor *editor) static void fill_in_email_record (EContactEditor *editor, gint record, const gchar *address, gint location) { - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; GtkWidget *email_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-email-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-email-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-email-%d", record); email_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - set_option_menu_history (editor, GTK_OPTION_MENU (location_option_menu), + set_combo_box_active (editor, GTK_COMBO_BOX (location_combo_box), location >= 0 ? location : email_default [2]); set_entry_text (editor, GTK_ENTRY (email_entry), address ? address : ""); } @@ -788,12 +776,12 @@ fill_in_email_record (EContactEditor *editor, gint record, const gchar *address, static void extract_email_record (EContactEditor *editor, gint record, gchar **address, gint *location) { - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; GtkWidget *email_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-email-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-email-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-email-%d", record); @@ -801,7 +789,7 @@ extract_email_record (EContactEditor *editor, gint record, gchar **address, gint g_free (widget_name); *address = g_strdup (gtk_entry_get_text (GTK_ENTRY (email_entry))); - *location = gtk_option_menu_get_history (GTK_OPTION_MENU (location_option_menu)); + *location = gtk_combo_box_get_active (GTK_COMBO_BOX (location_combo_box)); } static const gchar * @@ -1059,19 +1047,19 @@ extract_email (EContactEditor *editor) static void sensitize_email_record (EContactEditor *editor, gint record, gboolean enabled) { - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; GtkWidget *email_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-email-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-email-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-email-%d", record); email_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - gtk_widget_set_sensitive (location_option_menu, enabled); + gtk_widget_set_sensitive (location_combo_box, enabled); gtk_editable_set_editable (GTK_EDITABLE (email_entry), enabled); } @@ -1094,6 +1082,29 @@ sensitize_email (EContactEditor *editor) } } +static void +init_item_sensitiveable_combo_box (GtkComboBox *combo) +{ + GtkCellRenderer *cell; + GtkListStore *store; + + g_return_if_fail (combo != NULL); + g_return_if_fail (GTK_IS_COMBO_BOX (combo)); + + store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); + gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo)); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, + "text", 0, + "sensitive", 1, + NULL); +} + /* EContact can get attributes by field ID only, and there is none for TEL, so we need this */ static GList * get_attributes_named (EVCard *vcard, const gchar *attr_name) @@ -1154,19 +1165,19 @@ expand_phone (EContactEditor *editor, gboolean expanded) static void fill_in_phone_record (EContactEditor *editor, gint record, const gchar *phone, gint phone_type) { - GtkWidget *phone_type_option_menu; + GtkWidget *phone_type_combo_box; GtkWidget *phone_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-phone-%d", record); - phone_type_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-phone-%d", record); + phone_type_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-phone-%d", record); phone_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - set_option_menu_history (editor, GTK_OPTION_MENU (phone_type_option_menu), + set_combo_box_active (editor, GTK_COMBO_BOX (phone_type_combo_box), phone_type >= 0 ? phone_type : phones_default [record - 1]); set_entry_text (editor, GTK_ENTRY (phone_entry), phone ? phone : ""); @@ -1178,12 +1189,12 @@ fill_in_phone_record (EContactEditor *editor, gint record, const gchar *phone, g static void extract_phone_record (EContactEditor *editor, gint record, gchar **phone, gint *phone_type) { - GtkWidget *phone_type_option_menu; + GtkWidget *phone_type_combo_box; GtkWidget *phone_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-phone-%d", record); - phone_type_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-phone-%d", record); + phone_type_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-phone-%d", record); @@ -1191,7 +1202,7 @@ extract_phone_record (EContactEditor *editor, gint record, gchar **phone, gint * g_free (widget_name); *phone = g_strdup (gtk_entry_get_text (GTK_ENTRY (phone_entry))); - *phone_type = gtk_option_menu_get_history (GTK_OPTION_MENU (phone_type_option_menu)); + *phone_type = gtk_combo_box_get_active (GTK_COMBO_BOX (phone_type_combo_box)); } static void @@ -1290,42 +1301,38 @@ extract_phone (EContactEditor *editor) } static void -phone_menu_changed(GtkWidget *widget, GtkWidget *next) -{ - gtk_widget_grab_focus(next); -} - -static void init_phone_record_type (EContactEditor *editor, gint record) { - GtkWidget *phone_type_option_menu; - GtkWidget *phone_type_menu; + GtkWidget *phone_type_combo_box; GtkWidget *phone_entry; gchar *widget_name; gint i; + GtkListStore *store; widget_name = g_strdup_printf ("entry-phone-%d", record); phone_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - widget_name = g_strdup_printf ("optionmenu-phone-%d", record); - phone_type_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-phone-%d", record); + phone_type_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - phone_type_menu = gtk_menu_new (); + init_item_sensitiveable_combo_box (GTK_COMBO_BOX (phone_type_combo_box)); + store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (phone_type_combo_box))); for (i = 0; i < G_N_ELEMENTS (phones); i++) { - GtkWidget *item; + GtkTreeIter iter; - item = gtk_menu_item_new_with_label (e_contact_pretty_name (phones [i].field_id)); - gtk_menu_shell_append (GTK_MENU_SHELL (phone_type_menu), item); - g_signal_connect (item, "activate", G_CALLBACK (phone_menu_changed), phone_entry); + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, e_contact_pretty_name (phones [i].field_id), + 1, TRUE, + -1); } - gtk_widget_show_all (phone_type_menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (phone_type_option_menu), phone_type_menu); - - g_signal_connect (phone_type_option_menu, "changed", G_CALLBACK (object_changed), editor); + g_signal_connect_swapped (phone_type_combo_box, "changed", G_CALLBACK (gtk_widget_grab_focus), phone_entry); + g_signal_connect (phone_type_combo_box, "changed", G_CALLBACK (object_changed), editor); g_signal_connect (phone_entry, "changed", G_CALLBACK (object_changed), editor); g_signal_connect_swapped (phone_entry, "activate", G_CALLBACK (entry_activated), editor); } @@ -1342,49 +1349,50 @@ init_phone (EContactEditor *editor) } static void -sensitize_phone_types (EContactEditor *editor, GtkWidget *option_menu) +sensitize_phone_types (EContactEditor *editor, GtkWidget *combo_box) { - GtkWidget *menu; - GList *l; - gint i; + GtkTreeModel *model; + GtkTreeIter iter; + gint i; + gboolean valid; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)); - l = gtk_container_get_children (GTK_CONTAINER (menu)); + model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)); + valid = gtk_tree_model_get_iter_first (model, &iter); for (i = 0; i < G_N_ELEMENTS (phones); i++) { - GtkWidget *widget; - - if (!l) { - g_warning (G_STRLOC ": Unexpected end of phone items in option menu"); + if (!valid) { + g_warning (G_STRLOC ": Unexpected end of phone items in combo box"); return; } - widget = l->data; - gtk_widget_set_sensitive (widget, is_field_supported (editor, phones [i].field_id)); + gtk_list_store_set ( + GTK_LIST_STORE (model), &iter, + 1, is_field_supported (editor, phones [i].field_id), + -1); - l = g_list_next (l); + valid = gtk_tree_model_iter_next (model, &iter); } } static void sensitize_phone_record (EContactEditor *editor, gint record, gboolean enabled) { - GtkWidget *phone_type_option_menu; + GtkWidget *phone_type_combo_box; GtkWidget *phone_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-phone-%d", record); - phone_type_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-phone-%d", record); + phone_type_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); widget_name = g_strdup_printf ("entry-phone-%d", record); phone_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - gtk_widget_set_sensitive (phone_type_option_menu, enabled); + gtk_widget_set_sensitive (phone_type_combo_box, enabled); gtk_editable_set_editable (GTK_EDITABLE (phone_entry), enabled); - sensitize_phone_types (editor, phone_type_option_menu); + sensitize_phone_types (editor, phone_type_combo_box); } static void @@ -1407,42 +1415,38 @@ init_im_record_location (EContactEditor *editor, gint record) { #ifdef ENABLE_IM_LOCATION - GtkWidget *location_option_menu; - GtkWidget *location_menu; - gint i; + GtkWidget *location_combo_box; + GtkListStore *store; + gint i; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-location-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - location_menu = gtk_menu_new (); + init_item_sensitiveable_combo_box (GTK_COMBO_BOX (location_combo_box)); + store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (location_combo_box))); for (i = 0; i < G_N_ELEMENTS (common_location); i++) { - GtkWidget *item; + GtkTreeIter iter; - item = gtk_menu_item_new_with_label (_(common_location [i].pretty_name)); - gtk_menu_shell_append (GTK_MENU_SHELL (location_menu), item); + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, _(common_location [i].pretty_name), + 1, TRUE, + -1); } - gtk_widget_show_all (location_menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (location_option_menu), location_menu); - - g_signal_connect (location_option_menu, "changed", G_CALLBACK (object_changed), editor); + g_signal_connect (location_combo_box, "changed", G_CALLBACK (object_changed), editor); #endif } static void -im_menu_changed(GtkWidget *widget, GtkWidget *next) -{ - gtk_widget_grab_focus(next); -} - -static void init_im_record_service (EContactEditor *editor, gint record) { - GtkWidget *service_option_menu; - GtkWidget *service_menu; + GtkWidget *service_combo_box; + GtkListStore *store; GtkWidget *name_entry; gchar *widget_name; gint i; @@ -1451,24 +1455,26 @@ init_im_record_service (EContactEditor *editor, gint record) name_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - widget_name = g_strdup_printf ("optionmenu-im-service-%d", record); - service_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-service-%d", record); + service_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - service_menu = gtk_menu_new (); + init_item_sensitiveable_combo_box (GTK_COMBO_BOX (service_combo_box)); + store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (service_combo_box))); for (i = 0; i < G_N_ELEMENTS (im_service); i++) { - GtkWidget *item; + GtkTreeIter iter; - item = gtk_menu_item_new_with_label (im_service [i].pretty_name); - gtk_menu_shell_append (GTK_MENU_SHELL (service_menu), item); - g_signal_connect (item, "activate", G_CALLBACK (im_menu_changed), name_entry); + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + 0, im_service [i].pretty_name, + 1, TRUE, + -1); } - gtk_widget_show_all (service_menu); - gtk_option_menu_set_menu (GTK_OPTION_MENU (service_option_menu), service_menu); - - g_signal_connect (service_option_menu, "changed", G_CALLBACK (object_changed), editor); + g_signal_connect_swapped (service_combo_box, "changed", G_CALLBACK (gtk_widget_grab_focus), name_entry); + g_signal_connect (service_combo_box, "changed", G_CALLBACK (object_changed), editor); g_signal_connect (name_entry, "changed", G_CALLBACK (object_changed), editor); g_signal_connect_swapped (name_entry, "activate", G_CALLBACK (entry_activated), editor); } @@ -1487,20 +1493,20 @@ init_im (EContactEditor *editor) static void fill_in_im_record (EContactEditor *editor, gint record, gint service, const gchar *name, gint location) { - GtkWidget *service_option_menu; + GtkWidget *service_combo_box; #ifdef ENABLE_IM_LOCATION - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; #endif GtkWidget *name_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-im-service-%d", record); - service_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-service-%d", record); + service_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #ifdef ENABLE_IM_LOCATION - widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-location-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #endif @@ -1509,10 +1515,10 @@ fill_in_im_record (EContactEditor *editor, gint record, gint service, const gcha g_free (widget_name); #ifdef ENABLE_IM_LOCATION - set_option_menu_history (editor, GTK_OPTION_MENU (location_option_menu), + set_combo_box_active (editor, GTK_COMBO_BOX (location_combo_box), location >= 0 ? location : 0); #endif - set_option_menu_history (editor, GTK_OPTION_MENU (service_option_menu), + set_combo_box_active (editor, GTK_COMBO_BOX (service_combo_box), service >= 0 ? service : im_service_default [record - 1]); set_entry_text (editor, GTK_ENTRY (name_entry), name ? name : ""); } @@ -1557,20 +1563,20 @@ fill_in_im (EContactEditor *editor) static void extract_im_record (EContactEditor *editor, gint record, gint *service, gchar **name, gint *location) { - GtkWidget *service_option_menu; + GtkWidget *service_combo_box; #ifdef ENABLE_IM_LOCATION - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; #endif GtkWidget *name_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-im-service-%d", record); - service_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-service-%d", record); + service_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #ifdef ENABLE_IM_LOCATION - widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-location-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #endif @@ -1579,9 +1585,9 @@ extract_im_record (EContactEditor *editor, gint record, gint *service, gchar **n g_free (widget_name); *name = g_strdup (gtk_entry_get_text (GTK_ENTRY (name_entry))); - *service = gtk_option_menu_get_history (GTK_OPTION_MENU (service_option_menu)); + *service = gtk_combo_box_get_active (GTK_COMBO_BOX (service_combo_box)); #ifdef ENABLE_IM_LOCATION - *location = gtk_option_menu_get_history (GTK_OPTION_MENU (location_option_menu)); + *location = gtk_combo_box_get_active (GTK_COMBO_BOX (location_combo_box)); #else *location = 1; /* set everything to HOME */ #endif @@ -1652,47 +1658,48 @@ extract_im (EContactEditor *editor) g_free (service_attr_list); } static void -sensitize_im_types (EContactEditor *editor, GtkWidget *option_menu) +sensitize_im_types (EContactEditor *editor, GtkWidget *combo_box) { - GtkWidget *menu; - GList *l; - gint i; + GtkTreeModel *model; + GtkTreeIter iter; + gint i; + gboolean valid; - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)); - l = gtk_container_get_children (GTK_CONTAINER (menu)); + model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)); + valid = gtk_tree_model_get_iter_first (model, &iter); for (i = 0; i < G_N_ELEMENTS (im_service); i++) { - GtkWidget *widget; - - if (!l) { - g_warning (G_STRLOC ": Unexpected end of im items in option menu"); + if (!valid) { + g_warning (G_STRLOC ": Unexpected end of im items in combo box"); return; } - widget = l->data; - gtk_widget_set_sensitive (widget, is_field_supported (editor, im_service [i].field)); + gtk_list_store_set ( + GTK_LIST_STORE (model), &iter, + 1, is_field_supported (editor, im_service [i].field), + -1); - l = g_list_next (l); + valid = gtk_tree_model_iter_next (model, &iter); } } static void sensitize_im_record (EContactEditor *editor, gint record, gboolean enabled) { - GtkWidget *service_option_menu; + GtkWidget *service_combo_box; #ifdef ENABLE_IM_LOCATION - GtkWidget *location_option_menu; + GtkWidget *location_combo_box; #endif GtkWidget *name_entry; gchar *widget_name; - widget_name = g_strdup_printf ("optionmenu-im-service-%d", record); - service_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-service-%d", record); + service_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #ifdef ENABLE_IM_LOCATION - widget_name = g_strdup_printf ("optionmenu-im-location-%d", record); - location_option_menu = glade_xml_get_widget (editor->gui, widget_name); + widget_name = g_strdup_printf ("combobox-im-location-%d", record); + location_combo_box = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); #endif @@ -1700,12 +1707,12 @@ sensitize_im_record (EContactEditor *editor, gint record, gboolean enabled) name_entry = glade_xml_get_widget (editor->gui, widget_name); g_free (widget_name); - gtk_widget_set_sensitive (service_option_menu, enabled); + gtk_widget_set_sensitive (service_combo_box, enabled); #ifdef ENABLE_IM_LOCATION - gtk_widget_set_sensitive (location_option_menu, enabled); + gtk_widget_set_sensitive (location_combo_box, enabled); #endif gtk_editable_set_editable (GTK_EDITABLE (name_entry), enabled); - sensitize_im_types (editor, service_option_menu); + sensitize_im_types (editor, service_combo_box); } static void @@ -2153,8 +2160,7 @@ static FieldMapping simple_field_map [] = { { "image-chooser", E_CONTACT_PHOTO, TRUE, TRUE }, { "button-image", E_CONTACT_PHOTO, FALSE, TRUE }, - { "combo-file-as", E_CONTACT_FILE_AS, FALSE, TRUE }, - { "entry-file-as", E_CONTACT_FILE_AS, TRUE, TRUE }, + { "combo-file-as", E_CONTACT_FILE_AS, TRUE, TRUE }, { "accellabel-fileas", E_CONTACT_FILE_AS, FALSE, TRUE }, }; @@ -2167,6 +2173,10 @@ init_simple_field (EContactEditor *editor, GtkWidget *widget) changed_object = G_OBJECT (widget); g_signal_connect_swapped (widget, "activate", G_CALLBACK (entry_activated), editor); } + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + changed_object = G_OBJECT (/*gtk_bin_get_child (GTK_BIN*/ (widget)/*)*/); + g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (widget)), "activate", G_CALLBACK (entry_activated), editor); + } else if (GTK_IS_TEXT_VIEW (widget)) { changed_object = G_OBJECT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget))); } @@ -2205,6 +2215,11 @@ fill_in_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) gtk_entry_set_text (GTK_ENTRY (widget), STRING_MAKE_NON_NULL (text)); g_free (text); } + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + gchar *text = e_contact_get (contact, field_id); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))), STRING_MAKE_NON_NULL (text)); + g_free (text); + } else if (GTK_IS_TEXT_VIEW (widget)) { GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); gchar *text = e_contact_get (contact, field_id); @@ -2270,6 +2285,13 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) const gchar *text = gtk_entry_get_text (GTK_ENTRY (widget)); e_contact_set (contact, field_id, (gchar *) text); } + else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { + char *text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); + + e_contact_set (contact, field_id, text); + + g_free (text); + } else if (GTK_IS_TEXT_VIEW (widget)) { GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); GtkTextIter start, end; @@ -2418,8 +2440,8 @@ init_simple (EContactEditor *editor) widget = glade_xml_get_widget (editor->gui, "entry-fullname"); g_signal_connect (widget, "changed", G_CALLBACK (name_entry_changed), editor); - widget = glade_xml_get_widget (editor->gui, "entry-file-as"); - g_signal_connect (widget, "changed", G_CALLBACK (file_as_entry_changed), editor); + widget = glade_xml_get_widget (editor->gui, "combo-file-as"); + g_signal_connect (widget, "changed", G_CALLBACK (file_as_combo_changed), editor); widget = glade_xml_get_widget (editor->gui, "entry-company"); g_signal_connect (widget, "changed", G_CALLBACK (company_entry_changed), editor); } @@ -3041,7 +3063,7 @@ save_contact (EContactEditor *ce, gboolean should_close) } entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); - entry_file_as = glade_xml_get_widget (ce->gui, "entry-file-as"); + entry_file_as = gtk_bin_get_child (GTK_BIN (glade_xml_get_widget (ce->gui, "combo-file-as"))); company_name = glade_xml_get_widget (ce->gui, "entry-company"); name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); 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 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkDialog" id="dialog-checkaddress"> - <property name="title" translatable="yes">Full Address</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> - <property name="modal">True</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">True</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="vbox-container"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">8</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="hbuttonbox1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="button1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">0</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="button2"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">0</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table-checkaddress"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="n_rows">4</property> - <property name="n_columns">4</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label-street"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Address:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">1</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">entry-street</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label-city"> - <property name="visible">True</property> - <property name="label" translatable="yes">Ci_ty:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</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> - <property name="mnemonic_widget">entry-city</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">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry-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">*</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">2</property> - <property name="bottom_attach">3</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry-ext"> - <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">*</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">1</property> - <property name="bottom_attach">2</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label-po"> - <property name="visible">True</property> - <property name="label" translatable="yes">_PO Box:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</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> - <property name="mnemonic_widget">entry-po</property> - </widget> - <packing> - <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">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label-ext"> - <property name="visible">True</property> - <property name="label" translatable="yes">Address _2:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</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> - <property name="mnemonic_widget">entry-ext</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry-po"> - <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">*</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">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry-street"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="has_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">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label-region"> - <property name="visible">True</property> - <property name="label" translatable="yes">_State/Province:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</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> - <property name="mnemonic_widget">entry-region</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">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry-region"> - <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">*</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">fill</property> - </packing> - </child> - - <child> - <widget class="GtkCombo" id="combo-country"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="entry-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">*</property> - <property name="activates_default">False</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget2"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes"></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> - </child> - </widget> - </child> - </widget> - </child> - </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="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry-code"> - <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">*</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">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label-code"> - <property name="visible">True</property> - <property name="label" translatable="yes">_ZIP Code:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</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> - <property name="mnemonic_widget">entry-code</property> - </widget> - <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="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label-country"> - <property name="visible">True</property> - <property name="label" translatable="yes">Countr_y:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</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> - <property name="mnemonic_widget">entry-country</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="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/addressbook/gui/contact-editor/fullname.glade b/addressbook/gui/contact-editor/fullname.glade index 2271304017..6520dfa472 100644 --- a/addressbook/gui/contact-editor/fullname.glade +++ b/addressbook/gui/contact-editor/fullname.glade @@ -15,6 +15,8 @@ <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -73,420 +75,6 @@ <property name="column_spacing">6</property> <child> - <widget class="GtkCombo" id="combo-title"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - <accessibility> - <atkrelation target="label-title" type="labelled-by"/> - </accessibility> - - <child internal-child="entry"> - <widget class="GtkEntry" id="entry-title"> - <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">*</property> - <property name="activates_default">False</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget2"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes"></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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget4"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Mr.</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget6"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Mrs.</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget8"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Ms.</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget10"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget11"> - <property name="visible">True</property> - <property name="label" translatable="yes">Miss</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget12"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget13"> - <property name="visible">True</property> - <property name="label" translatable="yes">Dr.</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget14"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget15"> - <property name="visible">True</property> - <property name="label" translatable="yes"></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> - </child> - </widget> - </child> - </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">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCombo" id="combo-suffix"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - <accessibility> - <atkrelation target="label-suffix" type="labelled-by"/> - </accessibility> - - <child internal-child="entry"> - <widget class="GtkEntry" id="entry-suffix"> - <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">*</property> - <property name="activates_default">False</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget16"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget17"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget18"> - <property name="visible">True</property> - <property name="label" translatable="yes"></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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget19"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget20"> - <property name="visible">True</property> - <property name="label" translatable="yes">Sr.</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget21"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget22"> - <property name="visible">True</property> - <property name="label" translatable="yes">Jr.</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget23"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget24"> - <property name="visible">True</property> - <property name="label" translatable="yes">I</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget25"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget26"> - <property name="visible">True</property> - <property name="label" translatable="yes">II</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget27"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget28"> - <property name="visible">True</property> - <property name="label" translatable="yes">III</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget29"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget30"> - <property name="visible">True</property> - <property name="label" translatable="yes">Esq.</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> - </child> - </widget> - </child> - - <child> - <widget class="GtkListItem" id="convertwidget31"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget32"> - <property name="visible">True</property> - <property name="label" translatable="yes"></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> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - - <child> <widget class="GtkEntry" id="entry-first"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -563,6 +151,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">entry-first</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -587,7 +179,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">entry-title</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -613,6 +208,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">entry-middle</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -638,6 +237,10 @@ <property name="xpad">0</property> <property name="ypad">0</property> <property name="mnemonic_widget">entry-last</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -662,7 +265,10 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">entry-suffix</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="left_attach">0</property> @@ -673,6 +279,53 @@ <property name="y_options">fill</property> </packing> </child> + + <child> + <widget class="GtkComboBoxEntry" id="comboentry-title"> + <property name="visible">True</property> + <property name="items" translatable="yes"> +Mr. +Mrs. +Ms. +Miss +Dr.</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="comboentry-suffix"> + <property name="visible">True</property> + <property name="items" translatable="yes"> +Sr. +Jr. +I +II +III +Esq.</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> 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 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkDialog" id="dialog-im"> - <property name="title" translatable="yes">Add IM Account</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> - <property name="modal">True</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">False</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancelbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="okbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-5</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table-im"> - <property name="border_width">6</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - - <child> - <widget class="GtkLabel" id="label-service"> - <property name="visible">True</property> - <property name="label" translatable="yes">_IM Service:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">optmenu-service</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="optmenu-service"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label-username"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Account name:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">entry-username</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="GtkEntry" id="entry-username"> - <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">*</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">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label-location"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Location:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">optmenu-location</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="optmenu-location"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> |