]> saetta.ns0.it Git - solipa/libsolipa/commitdiff
SolipaMailUI: modifiche per autenticazione.
authorAndrea Zagli <azagli@libero.it>
Tue, 4 Nov 2014 09:59:26 +0000 (10:59 +0100)
committerAndrea Zagli <azagli@libero.it>
Tue, 4 Nov 2014 09:59:26 +0000 (10:59 +0100)
data/libsolipa/gui/libsolipa.ui
src/mailui.c
tests/mail.c
tests/mailui.c
tests/tests.ui

index 17d95b7364ec28cf9760764850ca5ad9926f5e7b..acfbd003c112cc429f7027b8c8f44bc31cdaba8b 100644 (file)
       <column type="GdkPixbuf"/>
     </columns>
   </object>
+  <object class="GtkListStore" id="lstore_metodo_sicurezza">
+    <columns>
+      <!-- column-name id -->
+      <column type="gchararray"/>
+      <!-- column-name descrizione -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">0</col>
+        <col id="1" translatable="yes">Nessuno</col>
+      </row>
+      <row>
+        <col id="0">1</col>
+        <col id="1" translatable="yes">SSL/TLS</col>
+      </row>
+      <row>
+        <col id="0">2</col>
+        <col id="1" translatable="yes">STARTTLS</col>
+      </row>
+    </data>
+  </object>
   <object class="GtkDialog" id="diag_mail">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
           </packing>
         </child>
         <child>
-          <object class="GtkGrid" id="table2">
+          <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="row_spacing">5</property>
-            <property name="column_spacing">5</property>
-            <child>
-              <object class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Da:</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label9">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">A:</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="entry3">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">●</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="entry4">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">●</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label10">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Oggetto:</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">4</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="entry5">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">●</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">4</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label11">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Cc:</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
-            </child>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
             <child>
-              <object class="GtkLabel" id="label12">
+              <object class="GtkGrid" id="table2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Ccn:</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="entry6">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">●</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="entry7">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">●</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow2">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="shadow_type">etched-in</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="border_width">5</property>
+                <property name="row_spacing">5</property>
+                <property name="column_spacing">5</property>
                 <child>
-                  <object class="GtkTextView" id="textview1">
+                  <object class="GtkLabel" id="label11">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Da:</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label12">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">A:</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="entry3">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="wrap_mode">word</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">●</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property name="secondary_icon_activatable">False</property>
                   </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="entry4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">●</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property name="secondary_icon_activatable">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">8</property>
-                <property name="width">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkExpander" id="expander1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <child>
-                  <object class="GtkBox" id="hbox2">
+                  <object class="GtkLabel" id="label14">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="spacing">5</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Oggetto:</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="entry5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">●</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property name="secondary_icon_activatable">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label15">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Cc:</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label16">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Ccn:</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="entry6">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">●</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property name="secondary_icon_activatable">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="entry7">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">●</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property name="secondary_icon_activatable">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="shadow_type">etched-in</property>
                     <child>
-                      <object class="GtkScrolledWindow" id="scrolledwindow3">
+                      <object class="GtkTextView" id="textview1">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="shadow_type">etched-in</property>
-                        <child>
-                          <object class="GtkIconView" id="iconview1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="margin">5</property>
-                            <property name="selection_mode">multiple</property>
-                            <property name="model">lstore_mail_attachments</property>
-                            <property name="row_spacing">5</property>
-                            <property name="column_spacing">5</property>
-                            <property name="reorderable">True</property>
-                          </object>
-                        </child>
+                        <property name="wrap_mode">word</property>
                       </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">8</property>
+                    <property name="width">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkExpander" id="expander1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
                     <child>
-                      <object class="GtkButtonBox" id="vbuttonbox1">
+                      <object class="GtkBox" id="hbox2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="orientation">vertical</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
                         <property name="spacing">5</property>
-                        <property name="layout_style">start</property>
                         <child>
-                          <object class="GtkButton" id="button9">
-                            <property name="label">gtk-add</property>
+                          <object class="GtkScrolledWindow" id="scrolledwindow3">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_stock">True</property>
+                            <property name="shadow_type">etched-in</property>
+                            <child>
+                              <object class="GtkIconView" id="iconview1">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="margin">5</property>
+                                <property name="selection_mode">multiple</property>
+                                <property name="model">lstore_mail_attachments</property>
+                                <property name="row_spacing">5</property>
+                                <property name="column_spacing">5</property>
+                                <property name="reorderable">True</property>
+                              </object>
+                            </child>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkButton" id="button10">
-                            <property name="label">gtk-remove</property>
+                          <object class="GtkButtonBox" id="vbuttonbox1">
                             <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="use_stock">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">5</property>
+                            <property name="layout_style">start</property>
+                            <child>
+                              <object class="GtkButton" id="button9">
+                                <property name="label">gtk-add</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_stock">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButton" id="button10">
+                                <property name="label">gtk-remove</property>
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_stock">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
-                            <property name="fill">False</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
                       </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label17">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Allegati</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">9</property>
+                    <property name="width">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="hbox3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <object class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Richiedere ricevuta di ritorno</property>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="checkbutton4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="xalign">0</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">6</property>
+                    <property name="width">2</property>
+                  </packing>
                 </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label14">
+                <child>
+                  <object class="GtkSeparator" id="separator1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Allegati</property>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">5</property>
+                    <property name="width">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSeparator" id="separator2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">7</property>
+                    <property name="width">2</property>
+                  </packing>
                 </child>
               </object>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Mail</property>
+              </object>
               <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">9</property>
-                <property name="width">2</property>
+                <property name="tab_fill">False</property>
               </packing>
             </child>
             <child>
-              <object class="GtkBox" id="hbox3">
+              <object class="GtkGrid" id="grid1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="spacing">5</property>
+                <property name="border_width">5</property>
+                <property name="row_spacing">5</property>
+                <property name="column_spacing">5</property>
                 <child>
-                  <object class="GtkLabel" id="label15">
+                  <object class="GtkLabel" id="label10">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Richiedere ricevuta di ritorno</property>
+                    <property name="label" translatable="yes">Server</property>
                   </object>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="checkbutton4">
+                  <object class="GtkEntry" id="entry9">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="xalign">0.5</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="hexpand">True</property>
                   </object>
                   <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label19">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Metodo di sicurezza</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="combobox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="model">lstore_metodo_sicurezza</property>
+                    <property name="active">0</property>
+                    <property name="id_column">0</property>
+                    <child>
+                      <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                      <attributes>
+                        <attribute name="text">1</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label20">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Utente</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="entry10">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label21">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Password</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="entry11">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="visibility">False</property>
+                    <property name="invisible_char">●</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">3</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">6</property>
-                <property name="width">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkSeparator" id="separator1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">5</property>
-                <property name="width">2</property>
+                <property name="position">1</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkSeparator" id="separator2">
+            <child type="tab">
+              <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Server</property>
               </object>
               <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">7</property>
-                <property name="width">2</property>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="expand">True</property>
+            <property name="expand">False</property>
             <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
index 77d9dc7c99f65783f0c6c0abe61c8e10741152ab..9e940282ab667e9d6daf6683a1006933339710e3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2013 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2011-2014 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -27,7 +27,9 @@
 enum
 {
        PROP_0,
+       PROP_SHOW_SERVER_OPTIONS,
        PROP_SMTP_URI,
+       PROP_SMTP_URI_EDITABLE,
        PROP_FROM,
        PROP_FROM_EDITABLE,
        PROP_TO,
@@ -44,7 +46,13 @@ enum
        PROP_WITH_NOTIFICATION_VISIBLE,
        PROP_BODY,
        PROP_BODY_EDITABLE,
-       PROP_WITH_ATTACHMENTS
+       PROP_WITH_ATTACHMENTS,
+       PROP_SECURITY_METHOD,
+       PROP_SECURITY_METHOD_EDITABLE,
+       PROP_USERNAME,
+       PROP_USERNAME_EDITABLE,
+       PROP_PASSWORD,
+       PROP_PASSWORD_EDITABLE
 };
 
 enum
@@ -90,12 +98,12 @@ struct _SolipaMailUIPrivate
        {
                Solipa *solipa;
 
-               gchar *smtp_uri;
-
                GtkWidget *dialog;
                GtkWidget *vbox;
                GtkWidget *widget;
 
+               GtkWidget *notebook;
+
                GtkWidget *from;
                GtkWidget *to;
                GtkWidget *cc;
@@ -107,10 +115,16 @@ struct _SolipaMailUIPrivate
                GtkWidget *with_notification_lbl;
                GtkWidget *hseparator2;
                GtkWidget *body;
+               GtkWidget *expander_attachments;
                GtkWidget *iv_attachments;
                GtkWidget *btn_attachment_remove;
 
                GtkListStore *lstore_attachments;
+
+               GtkWidget *server;
+               GtkWidget *security_method;
+               GtkWidget *username;
+               GtkWidget *password;
        };
 
 G_DEFINE_TYPE (SolipaMailUI, solipa_mail_ui, G_TYPE_OBJECT)
@@ -123,6 +137,13 @@ solipa_mail_ui_class_init (SolipaMailUIClass *klass)
        object_class->set_property = solipa_mail_ui_set_property;
        object_class->get_property = solipa_mail_ui_get_property;
 
+       g_object_class_install_property (object_class, PROP_SHOW_SERVER_OPTIONS,
+                                        g_param_spec_boolean ("show-server-options",
+                                                              "Show server options",
+                                                              "Show server options",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
        g_object_class_install_property (object_class, PROP_SMTP_URI,
                                         g_param_spec_string ("smtp-uri",
                                                              "Smtp URI",
@@ -130,6 +151,13 @@ solipa_mail_ui_class_init (SolipaMailUIClass *klass)
                                                              "",
                                                              G_PARAM_READWRITE));
 
+       g_object_class_install_property (object_class, PROP_SMTP_URI_EDITABLE,
+                                        g_param_spec_boolean ("smtp-uri-editable",
+                                                              "Server field editable",
+                                                              "Server field editable",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
        g_object_class_install_property (object_class, PROP_FROM,
                                         g_param_spec_string ("from",
                                                              "From",
@@ -249,6 +277,50 @@ solipa_mail_ui_class_init (SolipaMailUIClass *klass)
                                                               TRUE,
                                                               G_PARAM_READWRITE));
 
+       g_object_class_install_property (object_class, PROP_SECURITY_METHOD,
+                                        g_param_spec_uint ("security-method",
+                                                           "Security method",
+                                                           "Security method",
+                                                           CAMEL_NETWORK_SECURITY_METHOD_NONE,
+                                                           CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT,
+                                                           CAMEL_NETWORK_SECURITY_METHOD_NONE, 
+                                                           G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_SECURITY_METHOD_EDITABLE,
+                                        g_param_spec_boolean ("security-method-editable",
+                                                              "Security method field editable",
+                                                              "Security method field editable",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_USERNAME,
+                                        g_param_spec_string ("username",
+                                                             "Username",
+                                                             "Username",
+                                                             "",
+                                                             G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_USERNAME_EDITABLE,
+                                        g_param_spec_boolean ("username-editable",
+                                                              "Username field editable",
+                                                              "Username field editable",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_PASSWORD,
+                                        g_param_spec_string ("password",
+                                                             "Password",
+                                                             "Password",
+                                                             "",
+                                                             G_PARAM_READWRITE));
+
+       g_object_class_install_property (object_class, PROP_PASSWORD_EDITABLE,
+                                        g_param_spec_boolean ("password-editable",
+                                                              "Password field editable",
+                                                              "Password field editable",
+                                                              TRUE,
+                                                              G_PARAM_READWRITE));
+
        /**
         * SolipaMailUI::btn_cancel_clicked:
         * @solipa_mail_ui:
@@ -323,6 +395,7 @@ SolipaMailUI
        gtk_builder_add_objects_from_file (builder,
                                           solipa_get_guifile (solipa),
                                           g_strsplit ("lstore_mail_attachments"
+                                                      "|lstore_metodo_sicurezza"
                                                       "|diag_mail",
                                                       "|", -1),
                                           &error);
@@ -335,24 +408,32 @@ SolipaMailUI
 
        priv->dialog = GTK_WIDGET (gtk_builder_get_object (builder, "diag_mail"));
        priv->vbox = GTK_WIDGET (gtk_builder_get_object (builder, "dialog-vbox2"));
-       priv->widget = GTK_WIDGET (gtk_builder_get_object (builder, "table2"));
+       priv->widget = GTK_WIDGET (gtk_builder_get_object (builder, "notebook1"));
+
+       priv->notebook = GTK_WIDGET (gtk_builder_get_object (builder, "notebook1"));
 
        priv->from = GTK_WIDGET (gtk_builder_get_object (builder, "entry3"));
        priv->to = GTK_WIDGET (gtk_builder_get_object (builder, "entry4"));
        priv->cc = GTK_WIDGET (gtk_builder_get_object (builder, "entry6"));
-       priv->cc_lbl = GTK_WIDGET (gtk_builder_get_object (builder, "label11"));
+       priv->cc_lbl = GTK_WIDGET (gtk_builder_get_object (builder, "label15"));
        priv->bcc = GTK_WIDGET (gtk_builder_get_object (builder, "entry7"));
-       priv->bcc_lbl = GTK_WIDGET (gtk_builder_get_object (builder, "label12"));
+       priv->bcc_lbl = GTK_WIDGET (gtk_builder_get_object (builder, "label16"));
        priv->subject = GTK_WIDGET (gtk_builder_get_object (builder, "entry5"));
        priv->with_notification = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton4"));
-       priv->with_notification_lbl = GTK_WIDGET (gtk_builder_get_object (builder, "label15"));
-       priv->hseparator2 = GTK_WIDGET (gtk_builder_get_object (builder, "hseparator2"));
+       priv->with_notification_lbl = GTK_WIDGET (gtk_builder_get_object (builder, "label18"));
+       priv->hseparator2 = GTK_WIDGET (gtk_builder_get_object (builder, "separator2"));
        priv->body = GTK_WIDGET (gtk_builder_get_object (builder, "textview1"));
 
        priv->lstore_attachments = GTK_LIST_STORE (gtk_builder_get_object (builder, "lstore_mail_attachments"));
+       priv->expander_attachments = GTK_WIDGET (gtk_builder_get_object (builder, "expander1"));
        priv->iv_attachments = GTK_WIDGET (gtk_builder_get_object (builder, "iconview1"));
        priv->btn_attachment_remove = GTK_WIDGET (gtk_builder_get_object (builder, "button10"));
 
+       priv->server = GTK_WIDGET (gtk_builder_get_object (builder, "entry9"));
+       priv->security_method = GTK_WIDGET (gtk_builder_get_object (builder, "combobox1"));
+       priv->username = GTK_WIDGET (gtk_builder_get_object (builder, "entry10"));
+       priv->password = GTK_WIDGET (gtk_builder_get_object (builder, "entry11"));
+
        g_signal_connect (gtk_builder_get_object (builder, "expander1"), "notify::expanded",
                          G_CALLBACK (solipa_mail_ui_on_exp_attachments_expanded), (gpointer)solipa_mail_ui);
 
@@ -417,6 +498,15 @@ GtkWidget
        return priv->widget;
 }
 
+void
+solipa_mail_ui_show_server_options (SolipaMailUI *mailui, gboolean show)
+{
+       g_return_val_if_fail (IS_SOLIPA_MAIL_UI (mailui), NULL);
+
+       SolipaMailUIPrivate *priv = SOLIPA_MAIL_UI_GET_PRIVATE (mailui);
+
+}
+
 gboolean
 solipa_mail_ui_send (SolipaMailUI *mailui)
 {
@@ -430,6 +520,9 @@ solipa_mail_ui_send (SolipaMailUI *mailui)
        gchar *subject;
        gboolean with_notification;
        gchar *body;
+       CamelNetworkSecurityMethod security_method;
+       gchar *username;
+       gchar *password;
 
        gchar *email;
 
@@ -474,6 +567,9 @@ solipa_mail_ui_send (SolipaMailUI *mailui)
                      "subject", &subject,
                      "with-notification", &with_notification,
                      "body", &body,
+                     "security-method", &security_method,
+                     "username", &username,
+                     "password", &password,
                      NULL);
 
        solipa_mail_set_subject (smail, subject);
@@ -665,6 +761,17 @@ solipa_mail_ui_send (SolipaMailUI *mailui)
                        } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->lstore_attachments), &iter));
                }
 
+       solipa_mail_set_security_method (smail, security_method);
+
+       if (username != NULL)
+               {
+                       if (password == NULL)
+                               {
+                                       password = g_strdup ("");
+                               }
+                       solipa_mail_set_username_password (smail, username, password);
+               }
+
        if (g_strcmp0 (g_strstrip (smtpuri), "") != 0)
                {
                        solipa_mail_send (smail, smtpuri);
@@ -696,8 +803,17 @@ solipa_mail_ui_set_property (GObject *object,
 
        switch (property_id)
                {
+                       case PROP_SHOW_SERVER_OPTIONS:
+                               gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), 0);
+                               gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->notebook), g_value_get_boolean (value));
+                               break;
+
                        case PROP_SMTP_URI:
-                               priv->smtp_uri = g_strstrip (g_value_dup_string (value));
+                               gtk_entry_set_text (GTK_ENTRY (priv->server), g_strstrip (g_value_dup_string (value)));
+                               break;
+
+                       case PROP_SMTP_URI_EDITABLE:
+                               gtk_editable_set_editable (GTK_EDITABLE (priv->server), g_value_get_boolean (value));
                                break;
 
                        case PROP_FROM:
@@ -727,14 +843,6 @@ solipa_mail_ui_set_property (GObject *object,
                        case PROP_CC_VISIBLE:
                                gtk_widget_set_visible (priv->cc, g_value_get_boolean (value));
                                gtk_widget_set_visible (priv->cc_lbl, g_value_get_boolean (value));
-                               if (g_value_get_boolean (value))
-                                       {
-                                               gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 2, 5);
-                                       }
-                               else
-                                       {
-                                               gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 2, 0);
-                                       }
                                break;
 
                        case PROP_BCC:
@@ -748,14 +856,6 @@ solipa_mail_ui_set_property (GObject *object,
                        case PROP_BCC_VISIBLE:
                                gtk_widget_set_visible (priv->bcc, g_value_get_boolean (value));
                                gtk_widget_set_visible (priv->bcc_lbl, g_value_get_boolean (value));
-                               if (g_value_get_boolean (value))
-                                       {
-                                               gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 3, 5);
-                                       }
-                               else
-                                       {
-                                               gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 3, 0);
-                                       }
                                break;
 
                        case PROP_SUBJECT:
@@ -791,7 +891,31 @@ solipa_mail_ui_set_property (GObject *object,
                                break;
 
                        case PROP_WITH_ATTACHMENTS:
-                               gtk_widget_set_visible (priv->iv_attachments, g_value_get_boolean (value));
+                               gtk_widget_set_visible (priv->expander_attachments, g_value_get_boolean (value));
+                               break;
+
+                       case PROP_SECURITY_METHOD:
+                               gtk_combo_box_set_active_id (GTK_COMBO_BOX (priv->security_method), g_strdup_printf ("%d", g_value_get_uint (value)));
+                               break;
+
+                       case PROP_SECURITY_METHOD_EDITABLE:
+                               gtk_widget_set_sensitive (priv->security_method, g_value_get_boolean (value));
+                               break;
+
+                       case PROP_USERNAME:
+                               gtk_entry_set_text (GTK_ENTRY (priv->username), g_strstrip (g_value_dup_string (value)));
+                               break;
+
+                       case PROP_USERNAME_EDITABLE:
+                               gtk_editable_set_editable (GTK_EDITABLE (priv->username), g_value_get_boolean (value));
+                               break;
+
+                       case PROP_PASSWORD:
+                               gtk_entry_set_text (GTK_ENTRY (priv->password), g_strstrip (g_value_dup_string (value)));
+                               break;
+
+                       case PROP_PASSWORD_EDITABLE:
+                               gtk_editable_set_editable (GTK_EDITABLE (priv->password), g_value_get_boolean (value));
                                break;
 
                        default:
@@ -811,8 +935,16 @@ solipa_mail_ui_get_property (GObject *object,
 
        switch (property_id)
                {
+                       case PROP_SHOW_SERVER_OPTIONS:
+                               g_value_set_boolean (value, gtk_notebook_get_show_tabs (GTK_NOTEBOOK (priv->notebook)));
+                               break;
+
                        case PROP_SMTP_URI:
-                               g_value_set_string (value, priv->smtp_uri);
+                               g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (priv->server)));
+                               break;
+
+                       case PROP_SMTP_URI_EDITABLE:
+                               g_value_set_boolean (value, gtk_editable_get_editable (GTK_EDITABLE (priv->server)));
                                break;
 
                        case PROP_FROM:
@@ -889,7 +1021,42 @@ solipa_mail_ui_get_property (GObject *object,
                                break;
 
                        case PROP_WITH_ATTACHMENTS:
-                               g_value_set_boolean (value, gtk_widget_get_visible (priv->iv_attachments));
+                               g_value_set_boolean (value, gtk_widget_get_visible (priv->expander_attachments));
+                               break;
+
+                       case PROP_SECURITY_METHOD:
+                               {
+                                       const gchar *id;
+                                       id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (priv->security_method));
+                                       if (id != NULL)
+                                               {
+                                                       g_value_set_uint (value, strtol (id, NULL, 10));
+                                               }
+                                       else
+                                               {
+                                                       g_value_set_uint (value, 0);
+                                               }
+                                       break;
+                               }
+
+                       case PROP_SECURITY_METHOD_EDITABLE:
+                               g_value_set_boolean (value, gtk_widget_get_sensitive (priv->security_method));
+                               break;
+
+                       case PROP_USERNAME:
+                               g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (priv->username)));
+                               break;
+
+                       case PROP_USERNAME_EDITABLE:
+                               g_value_set_boolean (value, gtk_editable_get_editable (GTK_EDITABLE (priv->username)));
+                               break;
+
+                       case PROP_PASSWORD:
+                               g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (priv->password)));
+                               break;
+
+                       case PROP_PASSWORD_EDITABLE:
+                               g_value_set_boolean (value, gtk_editable_get_editable (GTK_EDITABLE (priv->password)));
                                break;
 
                        default:
@@ -980,8 +1147,8 @@ solipa_mail_ui_on_btn_attachment_add_clicked (GtkButton *button,
        dialog = gtk_file_chooser_dialog_new ("Choose a file to attach.",
                                              GTK_WINDOW (transient),
                                              GTK_FILE_CHOOSER_ACTION_OPEN,
-                                             GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                             GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+                                             "_Cancel", GTK_RESPONSE_CANCEL,
+                                             "document-open", GTK_RESPONSE_ACCEPT,
                                              NULL);
        if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
                {
index 8439a6967468a137316aab8777f02999199497b4..f529ac61b5bba53bf036aa9f950e79efd6928b75 100644 (file)
@@ -148,8 +148,12 @@ main (int argc, char **argv)
        strmail = solipa_mail_get_as_string (smail);
        g_message ("The email text:\n%s", strmail);
 
-       if (username != NULL && password != NULL)
+       if (username != NULL)
                {
+                       if (password == NULL)
+                               {
+                                       password = g_strdup ("");
+                               }
                        solipa_mail_set_username_password (smail, username, password);
                }
 
index 54b2254e2f96bcad8ac0b2b29cb3f0e485c97ef5..ab339cdd412c109bf157423a8665b499b45568b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2011-2014 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -26,6 +26,126 @@ GtkBuilder *builder;
 GtkWidget *w;
 GtkWidget *mailui_w;
 
+static void
+on_btn_fromeditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "from-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton1"))),
+                      NULL);
+}
+
+static void
+on_btn_toeditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "to-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton2"))),
+                      NULL);
+}
+
+static void
+on_btn_cceditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "cc-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton3"))),
+                      NULL);
+}
+
+static void
+on_btn_ccvisible_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "cc-visible", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton7"))),
+                      NULL);
+}
+
+static void
+on_btn_bcceditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "bcc-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton4"))),
+                      NULL);
+}
+
+static void
+on_btn_bccvisible_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "bcc-visible", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton5"))),
+                      NULL);
+}
+
+static void
+on_btn_subjecteditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "subject-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton6"))),
+                      NULL);
+}
+
+static void
+on_btn_withnotification_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "with-notification-visible", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton8"))),
+                      NULL);
+}
+
+static void
+on_btn_bodyeditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "body-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton9"))),
+                      NULL);
+}
+
+static void
+on_btn_withattachments_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "with-attachments", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton10"))),
+                      NULL);
+}
+
+static void
+on_btn_serveroptions_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "show-server-options", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton14"))),
+                      NULL);
+}
+
+static void
+on_btn_servereditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "smtp-uri-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton11"))),
+                      NULL);
+}
+
+static void
+on_btn_securitymethodeditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "security-method-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton15"))),
+                      NULL);
+}
+
+static void
+on_btn_usernameeditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "username-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton12"))),
+                      NULL);
+}
+
+static void
+on_btn_passwordeditable_toggled (GtkToggleButton *togglebutton, gpointer user_data)
+{
+       g_object_set (G_OBJECT (mailui),
+                      "password-editable", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "togglebutton13"))),
+                      NULL);
+}
+
 static void
 on_btn_cancel_clicked (gpointer instance, gpointer user_data)
 {
@@ -36,27 +156,8 @@ on_btn_cancel_clicked (gpointer instance, gpointer user_data)
 static void
 on_btn_ok_clicked (gpointer instance, gpointer user_data)
 {
-       gchar *smtp;
-
        g_debug ("OK clicked");
 
-       smtp = (gchar *)gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, "entry1")));
-       if (smtp == NULL)
-               {
-                       smtp = g_strdup ("smtp://localhost/");
-               }
-       else
-               {
-                       if (g_strcmp0 (g_strstrip (smtp), "") == 0)
-                               {
-                                       smtp = g_strdup ("smtp://localhost/");
-                               }
-               }
-
-       g_object_set (G_OBJECT (mailui),
-                     "smtp-uri", smtp,
-                     NULL);
-
        if (solipa_mail_ui_send (mailui))
                {
                        solipa_message_dialog (w,
@@ -120,13 +221,42 @@ main (int argc, char *argv[])
        w = GTK_WIDGET (gtk_builder_get_object (builder, "w_mail"));
        g_signal_connect (w, "delete-event", G_CALLBACK (on_w_delete_event), (gpointer)solipa);
 
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton1"), "toggled",
+                         G_CALLBACK (on_btn_fromeditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton2"), "toggled",
+                         G_CALLBACK (on_btn_toeditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton3"), "toggled",
+                         G_CALLBACK (on_btn_cceditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton7"), "toggled",
+                         G_CALLBACK (on_btn_ccvisible_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton4"), "toggled",
+                         G_CALLBACK (on_btn_bcceditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton5"), "toggled",
+                         G_CALLBACK (on_btn_bccvisible_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton6"), "toggled",
+                         G_CALLBACK (on_btn_subjecteditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton8"), "toggled",
+                         G_CALLBACK (on_btn_withnotification_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton9"), "toggled",
+                         G_CALLBACK (on_btn_bodyeditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton10"), "toggled",
+                         G_CALLBACK (on_btn_withattachments_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton14"), "toggled",
+                         G_CALLBACK (on_btn_serveroptions_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton11"), "toggled",
+                         G_CALLBACK (on_btn_servereditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton15"), "toggled",
+                         G_CALLBACK (on_btn_securitymethodeditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton12"), "toggled",
+                         G_CALLBACK (on_btn_usernameeditable_toggled), NULL);
+       g_signal_connect (gtk_builder_get_object (builder, "togglebutton13"), "toggled",
+                         G_CALLBACK (on_btn_passwordeditable_toggled), NULL);
+
        mailui_w = solipa_mail_ui_get_widget (mailui);
        gtk_box_pack_start (GTK_BOX (gtk_builder_get_object (builder, "vbox3")),
                            mailui_w,
                            TRUE, TRUE, 5);
 
-       gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (builder, "entry1")), "smtp://localhost/");
-
        g_signal_connect (gtk_builder_get_object (builder, "button1"), "clicked",
                          G_CALLBACK (on_btn_cancel_clicked), NULL);
        g_signal_connect (gtk_builder_get_object (builder, "button2"), "clicked",
@@ -142,6 +272,7 @@ main (int argc, char *argv[])
                      "subject", "Da SolipaMailUI",
                      "body", "Il body della mail\n"
                              " con a capo\t\te tab\n\nprova prova",
+                     "security-method", CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT,
                      NULL);
 
        gtk_widget_show (w);
index 52305eb8c791833fa16a8e315b58c435f162cc52..02d3aefc3576d73b585b4783039215c98166a42a 100644 (file)
@@ -1,14 +1,15 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
 <interface>
-  <requires lib="gtk+" version="2.16"/>
-  <!-- interface-naming-policy project-wide -->
+  <requires lib="gtk+" version="3.12"/>
   <object class="GtkWindow" id="w_allegato">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Test SolipaAllegato</property>
-    <signal name="destroy" handler="gtk_main_quit"/>
+    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child>
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
-        <property name="orientation">vertical</property>
+        <property name="can_focus">False</property>
         <child>
           <placeholder/>
         </child>
     </child>
   </object>
   <object class="GtkWindow" id="w_mail">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Test SolipaMailUI</property>
-    <signal name="destroy" handler="gtk_main_quit"/>
+    <signal name="destroy" handler="gtk_main_quit" swapped="no"/>
     <child>
-      <object class="GtkVBox" id="vbox2">
+      <object class="GtkBox" id="vbox2">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="border_width">5</property>
         <property name="orientation">vertical</property>
         <property name="spacing">5</property>
         <child>
-          <object class="GtkTable" id="table1">
+          <object class="GtkBox" id="vbox3">
             <property name="visible">True</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">5</property>
-            <property name="row_spacing">5</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
             <child>
-              <object class="GtkLabel" id="label1">
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButtonBox" id="buttonbox3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton1">
+                <property name="label" translatable="yes">From editable</property>
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">SMTP server:</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
               </object>
               <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkEntry" id="entry1">
+              <object class="GtkToggleButton" id="togglebutton2">
+                <property name="label" translatable="yes">To editable</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="invisible_char">&#x2022;</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
               </object>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options">GTK_FILL</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton3">
+                <property name="label" translatable="yes">CC editable</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton7">
+                <property name="label" translatable="yes">CC visible</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
               </packing>
             </child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="position">0</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
           </packing>
         </child>
         <child>
-          <object class="GtkVBox" id="vbox3">
+          <object class="GtkButtonBox" id="buttonbox4">
             <property name="visible">True</property>
-            <property name="orientation">vertical</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="layout_style">start</property>
             <child>
-              <placeholder/>
+              <object class="GtkToggleButton" id="togglebutton4">
+                <property name="label" translatable="yes">BCC editable</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton5">
+                <property name="label" translatable="yes">BCC visible</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton6">
+                <property name="label" translatable="yes">Subject editable</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
             </child>
           </object>
           <packing>
-            <property name="position">1</property>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButtonBox" id="buttonbox5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton8">
+                <property name="label" translatable="yes">With notification visible</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton9">
+                <property name="label" translatable="yes">Body editable</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton10">
+                <property name="label" translatable="yes">With attachments</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
           </packing>
         </child>
         <child>
-          <object class="GtkHButtonBox" id="hbuttonbox1">
+          <object class="GtkButtonBox" id="buttonbox6">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton14">
+                <property name="label" translatable="yes">Server options visible</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton11">
+                <property name="label" translatable="yes">Server editable</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton15">
+                <property name="label" translatable="yes">Security method editable</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButtonBox" id="buttonbox7">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">5</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton12">
+                <property name="label" translatable="yes">Username editable</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToggleButton" id="togglebutton13">
+                <property name="label" translatable="yes">Password editable</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="active">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">5</property>
             <property name="layout_style">end</property>
             <child>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="position">2</property>
+            <property name="fill">True</property>
+            <property name="position">6</property>
           </packing>
         </child>
       </object>