soylent r127 - in trunk: glade src



Author: treitter
Date: Sun Apr  6 23:48:32 2008
New Revision: 127
URL: http://svn.gnome.org/viewvc/soylent?rev=127&view=rev

Log:
Add a general menu bar and hook up File > [New Person, Quit], Edit > [Edit, Delete] (including code to set the menu items (in)sensitive as necessary

Added:
   trunk/src/soylent-browser-menu-bar.c   (contents, props changed)
   trunk/src/soylent-browser-menu-bar.h   (contents, props changed)
Modified:
   trunk/glade/soylent.glade
   trunk/src/Makefile.am
   trunk/src/soylent-browser-person-view.c
   trunk/src/soylent-browser.c

Modified: trunk/glade/soylent.glade
==============================================================================
--- trunk/glade/soylent.glade	(original)
+++ trunk/glade/soylent.glade	Sun Apr  6 23:48:32 2008
@@ -13,6 +13,154 @@
       <widget class="GtkVBox" id="vbox1">
         <property name="visible">True</property>
         <child>
+          <widget class="GtkMenuBar" id="menubar">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem_file">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_File</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu_file">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem_new_person">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_New Person</property>
+                        <property name="use_underline">True</property>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="menu-item-image1">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-new</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem_new_group">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="label" translatable="yes">New _Group</property>
+                        <property name="use_underline">True</property>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="menu-item-image2">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-new</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem_quit">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-quit</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem_edit">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Edit</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu_edit">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem_edit">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="label" translatable="yes">gtk-edit</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem_cut">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="label" translatable="yes">gtk-cut</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem_copy">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="label" translatable="yes">gtk-copy</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem_paste">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="label" translatable="yes">gtk-paste</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem_delete">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="label" translatable="yes">gtk-delete</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem_view">
+                <property name="label" translatable="yes">_View</property>
+                <property name="use_underline">True</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem_help">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Help</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu3">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem10">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-about</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+        <child>
           <widget class="GtkHBox" id="hbox_action_bar">
             <property name="visible">True</property>
             <child>
@@ -124,20 +272,21 @@
           <packing>
             <property name="expand">False</property>
             <property name="padding">5</property>
+            <property name="position">1</property>
           </packing>
         </child>
         <child>
-          <widget class="GtkHSeparator" id="hseparator1">
+          <widget class="GtkHSeparator" id="hseparator_action_bar">
             <property name="visible">True</property>
           </widget>
           <packing>
             <property name="expand">False</property>
             <property name="padding">3</property>
-            <property name="position">1</property>
+            <property name="position">2</property>
           </packing>
         </child>
         <child>
-          <widget class="GtkHBox" id="hbox15">
+          <widget class="GtkHBox" id="hbox_new_delete_bar">
             <property name="visible">True</property>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
             <child>
@@ -256,22 +405,22 @@
             <property name="expand">False</property>
             <property name="fill">False</property>
             <property name="padding">3</property>
-            <property name="position">2</property>
+            <property name="position">3</property>
           </packing>
         </child>
         <child>
-          <widget class="GtkHSeparator" id="hseparator3">
+          <widget class="GtkHSeparator" id="hseparator_new_delete_bar">
             <property name="visible">True</property>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
           </widget>
           <packing>
             <property name="expand">False</property>
             <property name="padding">3</property>
-            <property name="position">3</property>
+            <property name="position">4</property>
           </packing>
         </child>
         <child>
-          <widget class="GtkHBox" id="hbox2">
+          <widget class="GtkHBox" id="hbox_people_view">
             <property name="visible">True</property>
             <child>
               <widget class="GtkScrolledWindow" id="sw_groups">
@@ -317,7 +466,7 @@
           </widget>
           <packing>
             <property name="padding">3</property>
-            <property name="position">4</property>
+            <property name="position">5</property>
           </packing>
         </child>
       </widget>
@@ -1676,43 +1825,32 @@
                                                         <property name="n_rows">3</property>
                                                         <property name="n_columns">2</property>
                                                         <child>
-                                                          <widget class="GtkLabel" id="label13">
+                                                          <widget class="GtkEntry" id="entry_person_mail_home_locality">
                                                             <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                            <property name="label" translatable="yes">Street</property>
                                                           </widget>
                                                           <packing>
-                                                            <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                            <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">GTK_FILL</property>
                                                             <property name="x_padding">2</property>
-                                                            <property name="y_padding">2</property>
+                                                            <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkLabel" id="label12">
+                                                          <widget class="GtkEntry" id="entry_person_mail_home_po">
                                                             <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                            <property name="label" translatable="yes">PO Box</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">GTK_FILL</property>
-                                                            <property name="y_options">GTK_FILL</property>
-                                                            <property name="x_padding">2</property>
-                                                            <property name="y_padding">1</property>
-                                                          </packing>
-                                                        </child>
-                                                        <child>
-                                                          <widget class="GtkLabel" id="label11">
-                                                            <property name="visible">True</property>
-                                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                            <property name="label" translatable="yes">City</property>
-                                                          </widget>
-                                                          <packing>
-                                                            <property name="top_attach">2</property>
-                                                            <property name="bottom_attach">3</property>
-                                                            <property name="x_options">GTK_FILL</property>
                                                             <property name="y_options">GTK_FILL</property>
                                                             <property name="x_padding">2</property>
                                                             <property name="y_padding">1</property>
@@ -1744,35 +1882,46 @@
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkEntry" id="entry_person_mail_home_po">
+                                                          <widget class="GtkLabel" id="label11">
                                                             <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                            <property name="label" translatable="yes">City</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="top_attach">2</property>
+                                                            <property name="bottom_attach">3</property>
+                                                            <property name="x_options">GTK_FILL</property>
+                                                            <property name="y_options">GTK_FILL</property>
+                                                            <property name="x_padding">2</property>
+                                                            <property name="y_padding">1</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkLabel" id="label12">
+                                                            <property name="visible">True</property>
+                                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                            <property name="label" translatable="yes">PO Box</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">GTK_FILL</property>
                                                             <property name="y_options">GTK_FILL</property>
                                                             <property name="x_padding">2</property>
                                                             <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkEntry" id="entry_person_mail_home_locality">
+                                                          <widget class="GtkLabel" id="label13">
                                                             <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                            <property name="label" translatable="yes">Street</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                             <property name="y_options">GTK_FILL</property>
                                                             <property name="x_padding">2</property>
-                                                            <property name="y_padding">1</property>
+                                                            <property name="y_padding">2</property>
                                                           </packing>
                                                         </child>
                                                       </widget>
@@ -1787,50 +1936,46 @@
                                                         <property name="n_rows">4</property>
                                                         <property name="n_columns">2</property>
                                                         <child>
-                                                          <widget class="GtkLabel" id="label16">
+                                                          <widget class="GtkFixed" id="fixed12">
                                                             <property name="visible">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                            <property name="label" translatable="yes">Zip/Postal Code</property>
                                                           </widget>
                                                           <packing>
-                                                            <property name="x_options">GTK_SHRINK | GTK_FILL</property>
-                                                            <property name="y_options">GTK_FILL</property>
-                                                            <property name="x_padding">2</property>
-                                                            <property name="y_padding">1</property>
+                                                            <property name="left_attach">1</property>
+                                                            <property name="right_attach">2</property>
+                                                            <property name="top_attach">3</property>
+                                                            <property name="bottom_attach">4</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkLabel" id="label15">
+                                                          <widget class="GtkFixed" id="fixed13">
                                                             <property name="visible">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                            <property name="label" translatable="yes">State/Province</property>
                                                           </widget>
                                                           <packing>
-                                                            <property name="top_attach">1</property>
-                                                            <property name="bottom_attach">2</property>
+                                                            <property name="top_attach">3</property>
+                                                            <property name="bottom_attach">4</property>
                                                             <property name="x_options">GTK_SHRINK | GTK_FILL</property>
-                                                            <property name="y_options">GTK_FILL</property>
-                                                            <property name="x_padding">2</property>
-                                                            <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkLabel" id="label14">
+                                                          <widget class="GtkEntry" id="entry_person_mail_home_country">
                                                             <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                            <property name="label" translatable="yes">Country</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                             <property name="y_options">GTK_FILL</property>
                                                             <property name="x_padding">2</property>
                                                             <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkEntry" id="entry_person_mail_home_code">
+                                                          <widget class="GtkEntry" id="entry_person_mail_home_region">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -1838,13 +1983,15 @@
                                                           <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">GTK_FILL</property>
                                                             <property name="x_padding">2</property>
                                                             <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkEntry" id="entry_person_mail_home_region">
+                                                          <widget class="GtkEntry" id="entry_person_mail_home_code">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -1852,50 +1999,52 @@
                                                           <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">GTK_FILL</property>
                                                             <property name="x_padding">2</property>
                                                             <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkEntry" id="entry_person_mail_home_country">
+                                                          <widget class="GtkLabel" id="label14">
                                                             <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                            <property name="label" translatable="yes">Country</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                             <property name="y_options">GTK_FILL</property>
                                                             <property name="x_padding">2</property>
                                                             <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkFixed" id="fixed13">
+                                                          <widget class="GtkLabel" id="label15">
                                                             <property name="visible">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                            <property name="label" translatable="yes">State/Province</property>
                                                           </widget>
                                                           <packing>
-                                                            <property name="top_attach">3</property>
-                                                            <property name="bottom_attach">4</property>
+                                                            <property name="top_attach">1</property>
+                                                            <property name="bottom_attach">2</property>
                                                             <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                            <property name="y_options">GTK_FILL</property>
+                                                            <property name="x_padding">2</property>
+                                                            <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                         <child>
-                                                          <widget class="GtkFixed" id="fixed12">
+                                                          <widget class="GtkLabel" id="label16">
                                                             <property name="visible">True</property>
                                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                            <property name="label" translatable="yes">Zip/Postal Code</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="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                            <property name="y_options">GTK_FILL</property>
+                                                            <property name="x_padding">2</property>
+                                                            <property name="y_padding">1</property>
                                                           </packing>
                                                         </child>
                                                       </widget>
@@ -1947,51 +2096,40 @@
                                                     <property name="n_rows">3</property>
                                                     <property name="n_columns">2</property>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label20">
+                                                      <widget class="GtkEntry" id="entry_person_mail_work_locality">
                                                         <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">Street</property>
                                                       </widget>
                                                       <packing>
-                                                        <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                        <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">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
-                                                        <property name="y_padding">2</property>
+                                                        <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label19">
+                                                      <widget class="GtkEntry" id="entry_person_mail_work_po">
                                                         <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">PO Box</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">GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label18">
-                                                        <property name="visible">True</property>
-                                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">City</property>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="top_attach">2</property>
-                                                        <property name="bottom_attach">3</property>
-                                                        <property name="x_options">GTK_FILL</property>
-                                                        <property name="y_options">GTK_FILL</property>
-                                                        <property name="x_padding">2</property>
-                                                        <property name="y_padding">1</property>
-                                                      </packing>
-                                                    </child>
-                                                    <child>
-                                                      <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                                                        <property name="height_request">40</property>
+                                                      <widget class="GtkScrolledWindow" id="scrolledwindow2">
+                                                        <property name="height_request">40</property>
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">False</property>
                                                         <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
@@ -2015,35 +2153,46 @@
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_work_po">
+                                                      <widget class="GtkLabel" id="label18">
                                                         <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">City</property>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="top_attach">2</property>
+                                                        <property name="bottom_attach">3</property>
+                                                        <property name="x_options">GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                        <property name="x_padding">2</property>
+                                                        <property name="y_padding">1</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="label19">
+                                                        <property name="visible">True</property>
+                                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">PO Box</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">GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_work_locality">
+                                                      <widget class="GtkLabel" id="label20">
                                                         <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">Street</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
-                                                        <property name="y_padding">1</property>
+                                                        <property name="y_padding">2</property>
                                                       </packing>
                                                     </child>
                                                   </widget>
@@ -2058,50 +2207,46 @@
                                                     <property name="n_rows">4</property>
                                                     <property name="n_columns">2</property>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label23">
+                                                      <widget class="GtkFixed" id="fixed14">
                                                         <property name="visible">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">Zip/Postal Code</property>
                                                       </widget>
                                                       <packing>
-                                                        <property name="x_options">GTK_SHRINK | GTK_FILL</property>
-                                                        <property name="y_options">GTK_FILL</property>
-                                                        <property name="x_padding">2</property>
-                                                        <property name="y_padding">1</property>
+                                                        <property name="left_attach">1</property>
+                                                        <property name="right_attach">2</property>
+                                                        <property name="top_attach">3</property>
+                                                        <property name="bottom_attach">4</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label22">
+                                                      <widget class="GtkFixed" id="fixed15">
                                                         <property name="visible">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">State/Province</property>
                                                       </widget>
                                                       <packing>
-                                                        <property name="top_attach">1</property>
-                                                        <property name="bottom_attach">2</property>
+                                                        <property name="top_attach">3</property>
+                                                        <property name="bottom_attach">4</property>
                                                         <property name="x_options">GTK_SHRINK | GTK_FILL</property>
-                                                        <property name="y_options">GTK_FILL</property>
-                                                        <property name="x_padding">2</property>
-                                                        <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label21">
+                                                      <widget class="GtkEntry" id="entry_person_mail_work_country">
                                                         <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">Country</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_work_code">
+                                                      <widget class="GtkEntry" id="entry_person_mail_work_region">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -2109,13 +2254,15 @@
                                                       <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">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_work_region">
+                                                      <widget class="GtkEntry" id="entry_person_mail_work_code">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -2123,50 +2270,52 @@
                                                       <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">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_work_country">
+                                                      <widget class="GtkLabel" id="label21">
                                                         <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">Country</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkFixed" id="fixed15">
+                                                      <widget class="GtkLabel" id="label22">
                                                         <property name="visible">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">State/Province</property>
                                                       </widget>
                                                       <packing>
-                                                        <property name="top_attach">3</property>
-                                                        <property name="bottom_attach">4</property>
+                                                        <property name="top_attach">1</property>
+                                                        <property name="bottom_attach">2</property>
                                                         <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                        <property name="x_padding">2</property>
+                                                        <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkFixed" id="fixed14">
+                                                      <widget class="GtkLabel" id="label23">
                                                         <property name="visible">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">Zip/Postal Code</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="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                        <property name="x_padding">2</property>
+                                                        <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                   </widget>
@@ -2214,43 +2363,32 @@
                                                     <property name="n_rows">3</property>
                                                     <property name="n_columns">2</property>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label27">
+                                                      <widget class="GtkEntry" id="entry_person_mail_other_locality">
                                                         <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">Street</property>
                                                       </widget>
                                                       <packing>
-                                                        <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                        <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">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
-                                                        <property name="y_padding">2</property>
+                                                        <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label26">
+                                                      <widget class="GtkEntry" id="entry_person_mail_other_po">
                                                         <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">PO Box</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">GTK_FILL</property>
-                                                        <property name="y_options">GTK_FILL</property>
-                                                        <property name="x_padding">2</property>
-                                                        <property name="y_padding">1</property>
-                                                      </packing>
-                                                    </child>
-                                                    <child>
-                                                      <widget class="GtkLabel" id="label25">
-                                                        <property name="visible">True</property>
-                                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">City</property>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="top_attach">2</property>
-                                                        <property name="bottom_attach">3</property>
-                                                        <property name="x_options">GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
@@ -2282,35 +2420,46 @@
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_other_po">
+                                                      <widget class="GtkLabel" id="label25">
                                                         <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">City</property>
+                                                      </widget>
+                                                      <packing>
+                                                        <property name="top_attach">2</property>
+                                                        <property name="bottom_attach">3</property>
+                                                        <property name="x_options">GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                        <property name="x_padding">2</property>
+                                                        <property name="y_padding">1</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <widget class="GtkLabel" id="label26">
+                                                        <property name="visible">True</property>
+                                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">PO Box</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">GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_other_locality">
+                                                      <widget class="GtkLabel" id="label27">
                                                         <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">Street</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
-                                                        <property name="y_padding">1</property>
+                                                        <property name="y_padding">2</property>
                                                       </packing>
                                                     </child>
                                                   </widget>
@@ -2325,50 +2474,46 @@
                                                     <property name="n_rows">4</property>
                                                     <property name="n_columns">2</property>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label30">
+                                                      <widget class="GtkFixed" id="fixed16">
                                                         <property name="visible">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">Zip/Postal Code</property>
                                                       </widget>
                                                       <packing>
-                                                        <property name="x_options">GTK_SHRINK | GTK_FILL</property>
-                                                        <property name="y_options">GTK_FILL</property>
-                                                        <property name="x_padding">2</property>
-                                                        <property name="y_padding">1</property>
+                                                        <property name="left_attach">1</property>
+                                                        <property name="right_attach">2</property>
+                                                        <property name="top_attach">3</property>
+                                                        <property name="bottom_attach">4</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label29">
+                                                      <widget class="GtkFixed" id="fixed17">
                                                         <property name="visible">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">State/Province</property>
                                                       </widget>
                                                       <packing>
-                                                        <property name="top_attach">1</property>
-                                                        <property name="bottom_attach">2</property>
+                                                        <property name="top_attach">3</property>
+                                                        <property name="bottom_attach">4</property>
                                                         <property name="x_options">GTK_SHRINK | GTK_FILL</property>
-                                                        <property name="y_options">GTK_FILL</property>
-                                                        <property name="x_padding">2</property>
-                                                        <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkLabel" id="label28">
+                                                      <widget class="GtkEntry" id="entry_person_mail_other_country">
                                                         <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                        <property name="label" translatable="yes">Country</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_other_code">
+                                                      <widget class="GtkEntry" id="entry_person_mail_other_region">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -2376,13 +2521,15 @@
                                                       <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">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_other_region">
+                                                      <widget class="GtkEntry" id="entry_person_mail_other_code">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -2390,50 +2537,52 @@
                                                       <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">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkEntry" id="entry_person_mail_other_country">
+                                                      <widget class="GtkLabel" id="label28">
                                                         <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">Country</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                                         <property name="y_options">GTK_FILL</property>
                                                         <property name="x_padding">2</property>
                                                         <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkFixed" id="fixed17">
+                                                      <widget class="GtkLabel" id="label29">
                                                         <property name="visible">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">State/Province</property>
                                                       </widget>
                                                       <packing>
-                                                        <property name="top_attach">3</property>
-                                                        <property name="bottom_attach">4</property>
+                                                        <property name="top_attach">1</property>
+                                                        <property name="bottom_attach">2</property>
                                                         <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                        <property name="x_padding">2</property>
+                                                        <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkFixed" id="fixed16">
+                                                      <widget class="GtkLabel" id="label30">
                                                         <property name="visible">True</property>
                                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                        <property name="label" translatable="yes">Zip/Postal Code</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="x_options">GTK_SHRINK | GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                        <property name="x_padding">2</property>
+                                                        <property name="y_padding">1</property>
                                                       </packing>
                                                     </child>
                                                   </widget>
@@ -2687,43 +2836,32 @@
                                         <property name="n_rows">3</property>
                                         <property name="n_columns">2</property>
                                         <child>
-                                          <widget class="GtkLabel" id="label33">
+                                          <widget class="GtkEntry" id="entry_person_mail_add_locality">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Street</property>
                                           </widget>
                                           <packing>
-                                            <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                            <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">GTK_FILL</property>
                                             <property name="x_padding">2</property>
-                                            <property name="y_padding">2</property>
+                                            <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label34">
+                                          <widget class="GtkEntry" id="entry_person_mail_add_po">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">PO Box</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">GTK_FILL</property>
-                                            <property name="y_options">GTK_FILL</property>
-                                            <property name="x_padding">2</property>
-                                            <property name="y_padding">1</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label35">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">City</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="top_attach">2</property>
-                                            <property name="bottom_attach">3</property>
-                                            <property name="x_options">GTK_FILL</property>
                                             <property name="y_options">GTK_FILL</property>
                                             <property name="x_padding">2</property>
                                             <property name="y_padding">1</property>
@@ -2755,35 +2893,46 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkEntry" id="entry_person_mail_add_po">
+                                          <widget class="GtkLabel" id="label35">
                                             <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">City</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="top_attach">2</property>
+                                            <property name="bottom_attach">3</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options">GTK_FILL</property>
+                                            <property name="x_padding">2</property>
+                                            <property name="y_padding">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label34">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">PO Box</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">GTK_FILL</property>
                                             <property name="y_options">GTK_FILL</property>
                                             <property name="x_padding">2</property>
                                             <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkEntry" id="entry_person_mail_add_locality">
+                                          <widget class="GtkLabel" id="label33">
                                             <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Street</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                             <property name="y_options">GTK_FILL</property>
                                             <property name="x_padding">2</property>
-                                            <property name="y_padding">1</property>
+                                            <property name="y_padding">2</property>
                                           </packing>
                                         </child>
                                       </widget>
@@ -2798,50 +2947,46 @@
                                         <property name="n_rows">4</property>
                                         <property name="n_columns">2</property>
                                         <child>
-                                          <widget class="GtkLabel" id="label36">
+                                          <widget class="GtkFixed" id="fixed24">
                                             <property name="visible">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Zip/Postal Code</property>
                                           </widget>
                                           <packing>
-                                            <property name="x_options">GTK_SHRINK | GTK_FILL</property>
-                                            <property name="y_options">GTK_FILL</property>
-                                            <property name="x_padding">2</property>
-                                            <property name="y_padding">1</property>
+                                            <property name="left_attach">1</property>
+                                            <property name="right_attach">2</property>
+                                            <property name="top_attach">3</property>
+                                            <property name="bottom_attach">4</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label37">
+                                          <widget class="GtkFixed" id="fixed23">
                                             <property name="visible">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">State/Province</property>
                                           </widget>
                                           <packing>
-                                            <property name="top_attach">1</property>
-                                            <property name="bottom_attach">2</property>
+                                            <property name="top_attach">3</property>
+                                            <property name="bottom_attach">4</property>
                                             <property name="x_options">GTK_SHRINK | GTK_FILL</property>
-                                            <property name="y_options">GTK_FILL</property>
-                                            <property name="x_padding">2</property>
-                                            <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label38">
+                                          <widget class="GtkEntry" id="entry_person_mail_add_country">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Country</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                             <property name="y_options">GTK_FILL</property>
                                             <property name="x_padding">2</property>
                                             <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkEntry" id="entry_person_mail_add_code">
+                                          <widget class="GtkEntry" id="entry_person_mail_add_region">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -2849,13 +2994,15 @@
                                           <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">GTK_FILL</property>
                                             <property name="x_padding">2</property>
                                             <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkEntry" id="entry_person_mail_add_region">
+                                          <widget class="GtkEntry" id="entry_person_mail_add_code">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -2863,50 +3010,52 @@
                                           <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">GTK_FILL</property>
                                             <property name="x_padding">2</property>
                                             <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkEntry" id="entry_person_mail_add_country">
+                                          <widget class="GtkLabel" id="label38">
                                             <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Country</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="x_options">GTK_SHRINK | GTK_FILL</property>
                                             <property name="y_options">GTK_FILL</property>
                                             <property name="x_padding">2</property>
                                             <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkFixed" id="fixed23">
+                                          <widget class="GtkLabel" id="label37">
                                             <property name="visible">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">State/Province</property>
                                           </widget>
                                           <packing>
-                                            <property name="top_attach">3</property>
-                                            <property name="bottom_attach">4</property>
+                                            <property name="top_attach">1</property>
+                                            <property name="bottom_attach">2</property>
                                             <property name="x_options">GTK_SHRINK | GTK_FILL</property>
+                                            <property name="y_options">GTK_FILL</property>
+                                            <property name="x_padding">2</property>
+                                            <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkFixed" id="fixed24">
+                                          <widget class="GtkLabel" id="label36">
                                             <property name="visible">True</property>
                                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Zip/Postal Code</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="x_options">GTK_SHRINK | GTK_FILL</property>
+                                            <property name="y_options">GTK_FILL</property>
+                                            <property name="x_padding">2</property>
+                                            <property name="y_padding">1</property>
                                           </packing>
                                         </child>
                                       </widget>

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Sun Apr  6 23:48:32 2008
@@ -7,6 +7,8 @@
 	soylent-browser.h \
 	soylent-browser-eds.c \
 	soylent-browser-eds.h \
+	soylent-browser-menu-bar.c \
+	soylent-browser-menu-bar.h \
 	soylent-browser-person-view.c \
 	soylent-browser-person-view.h \
 	soylent-defs.c \

Added: trunk/src/soylent-browser-menu-bar.c
==============================================================================
--- (empty file)
+++ trunk/src/soylent-browser-menu-bar.c	Sun Apr  6 23:48:32 2008
@@ -0,0 +1,214 @@
+/* 
+ *  Soylent people browser
+ *
+ *  Author: Travis Reitter <treitter-dev netdrain com>
+ *  Author: Rob Taylor <rob taylor codethink co uk>
+ *
+ *  Copyright (c) 2007 Codethink Ltd - http://codethink.co.uk
+ *  Copyright (c) 2007 Travis Reitter
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ */
+
+#include <string.h>
+#include "eds-utils.h"
+#include "soylent.h"
+#include "soylent-browser.h"
+#include "soylent-browser-menu-bar.h"
+#include "soylent-utils.h"
+
+static gboolean soylent_browser_menu_bar_edit_update (SoylentBrowser *browser);
+
+/* Initializes everything necessary for the functions in this file
+ *
+ * Return TRUE for success, FALSE for any failure. */
+gboolean
+soylent_browser_menu_bar_setup (SoylentBrowser *browser)
+{
+  widget_signal_args_t signal_handlers[] =
+    {
+      /* File menu */
+      {"imagemenuitem_new_person", "activate",
+       soylent_browser_person_action_new_person_cb, CB_DATA_SIMPLE, browser},
+      /* TODO: new group */
+      {"imagemenuitem_quit", "activate",
+       gtk_main_quit, CB_DATA_SIMPLE, browser},
+
+      /* Edit menu */
+      {"imagemenuitem_edit", "activate",
+       soylent_browser_person_action_edit_selected_cb, CB_DATA_SIMPLE, browser},
+      /* TODO: cut */
+      /* TODO: copy */
+      /* TODO: paste */
+      {"imagemenuitem_delete", "activate",
+       soylent_browser_person_action_delete_selected_cb, CB_DATA_SIMPLE,
+       browser},
+
+      /* Help menu */
+      /* nothing to do here */
+    };
+  gboolean retval = FALSE;
+  GladeXML *wtree = NULL;
+  GtkWidget *menu_edit_edit = NULL;
+  GtkWidget *menu_edit_delete = NULL;
+  gint signals_num = -1;
+  gint i = -1;
+
+  g_return_val_if_fail (browser, retval);
+  /* FIXME: uncomment once SoylentBrowser is a GObject:
+  g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
+   */
+
+  wtree = soylent_browser_get_widget_tree (browser);
+  menu_edit_edit = glade_xml_get_widget (wtree, "imagemenuitem_edit");
+  menu_edit_delete = glade_xml_get_widget (wtree, "imagemenuitem_delete");
+
+  signals_num = ARRAY_LEN (signal_handlers);
+
+  /* invert usual logic to simplify the loop below */
+  retval = TRUE;
+
+  for (i = 0; i < signals_num; i++)
+    {
+      gboolean connect_retval = FALSE;
+      widget_signal_args_t cur_args = signal_handlers[i];
+      cb_entry_changed_e_contact *cb_data = NULL;
+
+      switch (cur_args.cb_data_type)
+        {
+          case CB_DATA_SIMPLE:
+            connect_retval = widget_signal_connect (wtree, cur_args.widget_name,
+                                                    cur_args.signal_name,
+                                                    cur_args.callback,
+                                                    cur_args.user_data);
+            break;
+          case CB_DATA_COMPLEX_FROM_E_CONTACT_FIELD:
+            cb_data = g_new0 (cb_entry_changed_e_contact, 1);
+            if (cb_data)
+              {
+                cb_data->browser = browser;
+                cb_data->widget_name = cur_args.widget_name;
+                cb_data->field = g_new0 (EContactField, 1);
+                if (cb_data->field)
+                  {
+                    *(cb_data->field) = (EContactField) cur_args.user_data;
+
+                    /* FIXME - use a version which uses g_signal_connect_data so
+                     * we can eventually free each instance of cb_data */
+                    connect_retval = widget_signal_connect
+                                                          (wtree,
+                                                           cur_args.widget_name,
+                                                           cur_args.signal_name,
+                                                           cur_args.callback,
+                                                           cb_data);
+                  }
+              }
+
+            if (!connect_retval)
+              {
+                if (cb_data)
+                  {
+                    g_free (cb_data->field);
+                    g_free (cb_data);
+                  }
+                /*
+                g_free (widget_name);
+                */
+              }
+          break;
+          default:
+            g_critical ("unhandled signal setup cb_data_t: %d\n",
+                        cur_args.cb_data_type);
+            break;
+
+          if (!connect_retval)
+            {
+              g_critical ("failed to set up signal handler for widget %s::%s\n",
+                          cur_args.widget_name, cur_args.signal_name);
+              retval = FALSE;
+            }
+        }
+    }
+
+  return retval;
+}
+
+
+/* Update the menu bar's menus' items for current selection
+ *
+ * Return TRUE for success, FALSE for any failure. */
+gboolean
+soylent_browser_menu_bar_update (SoylentBrowser *browser)
+{
+  gboolean retval = FALSE;
+
+  g_return_val_if_fail (browser, retval);
+  /* FIXME: uncomment once SoylentBrowser is a GObject:
+  g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
+   */
+
+  retval = TRUE;
+  /* No need to update File menu */
+  retval &= soylent_browser_menu_bar_edit_update (browser);
+  /* No need to update Help menu */
+
+  return retval;
+}
+
+/* Update the Edit menu's items for current selection
+ *
+ * Return TRUE for success, FALSE for any failure. */
+static gboolean
+soylent_browser_menu_bar_edit_update (SoylentBrowser *browser)
+{
+  gboolean retval = FALSE;
+  GladeXML *wtree = NULL;
+  GtkWidget *menu_edit_edit = NULL;
+  GtkWidget *menu_edit_delete = NULL;
+  GList *people = NULL;
+  gint people_num = -1;
+
+  g_return_val_if_fail (browser, retval);
+  /* FIXME: uncomment once SoylentBrowser is a GObject:
+  g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
+   */
+
+  wtree = soylent_browser_get_widget_tree (browser);
+  menu_edit_edit = glade_xml_get_widget (wtree, "imagemenuitem_edit");
+  menu_edit_delete = glade_xml_get_widget (wtree, "imagemenuitem_delete");
+
+  people = soylent_browser_get_selected_people (browser);
+  people_num = g_list_length (people);
+
+  /* initialize the sensitivity of the Edit menu items for null selection */
+  gtk_widget_set_sensitive (menu_edit_delete, FALSE);
+  gtk_widget_set_sensitive (menu_edit_edit, FALSE);
+
+  if (people_num >= 1)
+    {
+      /* the Soylent person editor only handles 1 person at a time */
+      if (people_num == 1)
+        {
+          gtk_widget_set_sensitive (menu_edit_edit, TRUE);
+        }
+
+      gtk_widget_set_sensitive (menu_edit_delete, TRUE);
+
+      retval = TRUE;
+    }
+  else if (people_num == 0)
+    {
+      retval = TRUE;
+    }
+
+  return retval;
+}

Added: trunk/src/soylent-browser-menu-bar.h
==============================================================================
--- (empty file)
+++ trunk/src/soylent-browser-menu-bar.h	Sun Apr  6 23:48:32 2008
@@ -0,0 +1,28 @@
+/* 
+ *  Soylent people browser
+ *
+ *  Author: Travis Reitter <treitter-dev netdrain com>
+ *
+ *  Copyright (c) 2007-2008 Travis Reitter
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ */
+
+#ifndef _SOYLENT_BROWSER_MENU_BAR_H_
+#define _SOYLENT_BROWSER_MENU_BAR_H_
+
+#include "soylent-browser.h"
+
+gboolean soylent_browser_menu_bar_setup (SoylentBrowser *browser);
+gboolean soylent_browser_menu_bar_update (SoylentBrowser *browser);
+
+#endif /* _SOYLENT_BROWSER_MENU_BAR_H_ */

Modified: trunk/src/soylent-browser-person-view.c
==============================================================================
--- trunk/src/soylent-browser-person-view.c	(original)
+++ trunk/src/soylent-browser-person-view.c	Sun Apr  6 23:48:32 2008
@@ -23,6 +23,7 @@
 #include "eds-utils.h"
 #include "soylent.h"
 #include "soylent-browser.h"
+#include "soylent-browser-menu-bar.h"
 #include "soylent-browser-person-view.h"
 #include "soylent-utils.h"
 
@@ -122,6 +123,8 @@
                                                        SoylentPerson *person);
 static gboolean soylent_browser_person_view_web_update (SoylentBrowser *browser,
                                                         SoylentPerson *person);
+static gboolean soylent_browser_person_view_update_widgets_actions
+                                                      (SoylentBrowser *browser);
 
 /* Save unsaved changes to the person's details and return to Browse Mode
  *
@@ -480,55 +483,18 @@
                                              gpointer user_data)
 {
   gboolean retval = FALSE;
-  gboolean email_retval = FALSE;
-  SoylentBrowser *browser = NULL;
-  GladeXML *wtree = NULL;
-  GtkWidget *btn_delete_people = NULL;
-  GtkWidget *btn_edit_person = NULL;
-  GtkMenuToolButton *btntb_email = NULL;
-  GtkMenuToolButton *btntb_chat = NULL;
-  GList *selected_people = NULL;
+  SoylentBrowser *browser;
 
-  browser = (SoylentBrowser*) user_data;
-  g_return_val_if_fail (browser, retval);
+  g_return_val_if_fail (user_data, retval);
   /* FIXME: uncomment once SoylentBrowser is a GObject:
   g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
    */
 
-  wtree = soylent_browser_get_widget_tree (browser);
-  btn_delete_people = glade_xml_get_widget (wtree, "btn_delete_people");
-  btn_edit_person = glade_xml_get_widget (wtree, "btn_edit_person");
-  btntb_email = GTK_MENU_TOOL_BUTTON (glade_xml_get_widget (wtree,
-                                                            "btntb_email"));
-  btntb_chat = GTK_MENU_TOOL_BUTTON (glade_xml_get_widget (wtree,
-                                                           "btntb_chat"));
-
-  selected_people = gtk_icon_view_get_selected_items (iv);
-  if (selected_people && selected_people->data)
-    {
-      gtk_widget_set_sensitive (btn_delete_people, TRUE);
-      gtk_widget_set_sensitive (btn_edit_person, TRUE);
-    }
-  else
-    {
-      gtk_widget_set_sensitive (btn_delete_people, FALSE);
-      gtk_widget_set_sensitive (btn_edit_person, FALSE);
-    }
-
-  email_retval = soylent_browser_person_selected_email_menu_update_cb
-                                                                  (btntb_email,
-                                                                   browser);
-  if (email_retval)
-    {
-      retval = soylent_browser_person_selected_chat_menu_update_cb (btntb_chat,
-                                                                    browser);
-    }
+  browser = (SoylentBrowser*) user_data;
 
-  if (selected_people)
-    {
-      g_list_foreach (selected_people, (GFunc) gtk_tree_path_free, NULL);
-      g_list_free (selected_people);
-    }
+  retval = TRUE;
+  retval &= soylent_browser_person_view_update_widgets_actions (browser);
+  retval &= soylent_browser_menu_bar_update (browser);
 
   return retval;
 }
@@ -3098,3 +3064,63 @@
 
   return retval;
 }
+
+/* Update the action widgets based on new Person View selection
+ *
+ * Return TRUE for success, FALSE for any failure. */
+static gboolean
+soylent_browser_person_view_update_widgets_actions (SoylentBrowser *browser)
+{
+  gboolean retval = FALSE;
+  gboolean email_retval = FALSE;
+  GladeXML *wtree = NULL;
+  GtkIconView *iv = NULL;
+  GtkWidget *btn_delete_people = NULL;
+  GtkWidget *btn_edit_person = NULL;
+  GtkMenuToolButton *btntb_email = NULL;
+  GtkMenuToolButton *btntb_chat = NULL;
+  GList *selected_people = NULL;
+
+  g_return_val_if_fail (browser, retval);
+  /* FIXME: uncomment once SoylentBrowser is a GObject:
+  g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
+   */
+
+  wtree = soylent_browser_get_widget_tree (browser);
+  iv = GTK_ICON_VIEW (glade_xml_get_widget (wtree, "iv_people"));
+  btn_delete_people = glade_xml_get_widget (wtree, "btn_delete_people");
+  btn_edit_person = glade_xml_get_widget (wtree, "btn_edit_person");
+  btntb_email = GTK_MENU_TOOL_BUTTON (glade_xml_get_widget (wtree,
+                                                            "btntb_email"));
+  btntb_chat = GTK_MENU_TOOL_BUTTON (glade_xml_get_widget (wtree,
+                                                           "btntb_chat"));
+
+  selected_people = gtk_icon_view_get_selected_items (iv);
+  if (selected_people && selected_people->data)
+    {
+      gtk_widget_set_sensitive (btn_delete_people, TRUE);
+      gtk_widget_set_sensitive (btn_edit_person, TRUE);
+    }
+  else
+    {
+      gtk_widget_set_sensitive (btn_delete_people, FALSE);
+      gtk_widget_set_sensitive (btn_edit_person, FALSE);
+    }
+
+  email_retval = soylent_browser_person_selected_email_menu_update_cb
+                                                                  (btntb_email,
+                                                                   browser);
+  if (email_retval)
+    {
+      retval = soylent_browser_person_selected_chat_menu_update_cb (btntb_chat,
+                                                                    browser);
+    }
+
+  if (selected_people)
+    {
+      g_list_foreach (selected_people, (GFunc) gtk_tree_path_free, NULL);
+      g_list_free (selected_people);
+    }
+
+  return retval;
+}

Modified: trunk/src/soylent-browser.c
==============================================================================
--- trunk/src/soylent-browser.c	(original)
+++ trunk/src/soylent-browser.c	Sun Apr  6 23:48:32 2008
@@ -28,6 +28,7 @@
 #include "eds-utils.h"
 #include "soylent-browser.h"
 #include "soylent-browser-eds.h"
+#include "soylent-browser-menu-bar.h"
 #include "soylent-person.h"
 #include "soylent-utils.h"
 
@@ -1554,10 +1555,21 @@
                                                            "cbox_presence"));
       if (cbox_presence && GTK_IS_COMBO_BOX (cbox_presence))
         {
+          gboolean detail_add_retval = FALSE;
+
           gtk_combo_box_set_active (cbox_presence, 0);
 
-          retval = soylent_browser_person_detail_add_cbox_setup (browser,
-                                                                 FALSE);
+          detail_add_retval = soylent_browser_person_detail_add_cbox_setup
+                                                                      (browser,
+                                                                       FALSE);
+          if (detail_add_retval)
+            {
+              retval = soylent_browser_menu_bar_setup (browser);
+            }
+          else
+            {
+              g_critical ("failed to set up Detail Add combo boxes");
+            }
         }
       else
         {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]