[gyrus] Drop libglade dependency, use GtkBuilder



commit 5483f2c8de7ec621367a3243c1db0c29e3a9a8a7
Author: Alejandro Valdes Jimenez <avaldes gnome org>
Date:   Mon Nov 22 22:10:10 2010 -0300

    Drop libglade dependency, use GtkBuilder

 configure.ac                    |    4 +-
 src/Makefile.am                 |    1 -
 src/glade/Makefile.am           |   19 +-
 src/glade/create_mailbox.glade  |  199 --------
 src/glade/create_mailbox.xml    |   83 ++++
 src/glade/find.glade            |  167 -------
 src/glade/find.xml              |   72 +++
 src/glade/page.glade            | 1026 ---------------------------------------
 src/glade/page.xml              |  485 ++++++++++++++++++
 src/glade/password.xml          |  117 +++++
 src/glade/report.glade          |  187 -------
 src/glade/report.xml            |  144 ++++++
 src/glade/sessions.glade        |  775 -----------------------------
 src/glade/sessions.xml          |  163 +++++++
 src/glade/sessions_edit.xml     |  371 ++++++++++++++
 src/gyrus-admin-mailbox.c       |    1 -
 src/gyrus-admin.c               |   81 ++--
 src/gyrus-common.c              |   18 +-
 src/gyrus-dialog-find-mailbox.c |   22 +-
 src/gyrus-dialog-mailbox-new.c  |   28 +-
 src/gyrus-main-app.c            |    1 -
 src/gyrus-report.c              |   43 +-
 src/gyrus-session.c             |   98 +++--
 23 files changed, 1601 insertions(+), 2504 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6b0a0db..9e37aab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,8 +21,7 @@ dnl GNOME 2 force flags
 
 GNOME_COMPILE_WARNINGS(maximum)
 
-GTK_REQUIRED=2.10.0
-LIBGLADE_REQUIRED=2.0.0
+GTK_REQUIRED=2.12.0
 GNET_REQUIRED=2.0.0
 GCONF_REQUIRED=2.0.0
 GTK_PRINT_REQUIRED=2.10.0
@@ -30,7 +29,6 @@ GNUTLS_REQUIRED=1.0.0
 
 PKG_CHECK_MODULES(GYRUS,
                   gtk+-2.0 >= $GTK_REQUIRED
-		  libglade-2.0 >= $LIBGLADE_REQUIRED
 		  gnet-2.0 >= $GNET_REQUIRED
 		  gconf-2.0 >= $GCONF_REQUIRED
 		  gtk+-unix-print-2.0 >= $GTK_PRINT_REQUIRED)
diff --git a/src/Makefile.am b/src/Makefile.am
index 3caac74..2567861 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,7 +37,6 @@ gyrus_SOURCES = \
 	gyrus-dialog-mailbox-new.c gyrus-dialog-mailbox-new.h \
 	gyrus-main-app.c gyrus-main-app.h \
 	gyrus-marshal.c gyrus-marshal.h \
-	gyrus-preferences.c gyrus-preferences.h \
 	gyrus-report.c gyrus-report.h \
 	gyrus-session.c gyrus-session.h
 
diff --git a/src/glade/Makefile.am b/src/glade/Makefile.am
index d81a746..a5b7b6f 100644
--- a/src/glade/Makefile.am
+++ b/src/glade/Makefile.am
@@ -1,16 +1,17 @@
 
-gladedir = $(datadir)/gyrus/glade
+uidir = $(datadir)/gyrus/glade
 
 #
 # Glade Files
 #
 
-glade_DATA = \
-	sessions.glade \
-	page.glade \
-	preferences.glade \
-	create_mailbox.glade \
-	find.glade \
-	report.glade
+ui_DATA = \
+	sessions.xml \
+	sessions_edit.xml \
+	page.xml \
+	find.xml \
+	password.xml \
+	report.xml \
+	create_mailbox.xml
 
-EXTRA_DIST = $(glade_DATA)
+EXTRA_DIST = $(ui_DATA)
diff --git a/src/glade/create_mailbox.xml b/src/glade/create_mailbox.xml
new file mode 100644
index 0000000..7cce7b1
--- /dev/null
+++ b/src/glade/create_mailbox.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkTable" id="table_dialog">
+    <property name="visible">True</property>
+    <property name="border_width">10</property>
+    <property name="n_rows">3</property>
+    <property name="n_columns">2</property>
+    <property name="column_spacing">5</property>
+    <property name="row_spacing">10</property>
+    <child>
+      <object class="GtkLabel" id="label_mailbox_name">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">&lt;b&gt;Name:&lt;/b&gt;</property>
+        <property name="use_markup">True</property>
+      </object>
+      <packing>
+        <property name="x_options">GTK_FILL</property>
+        <property name="y_options"></property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkEntry" id="entry_mailbox">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="invisible_char">&#x25CF;</property>
+      </object>
+      <packing>
+        <property name="left_attach">1</property>
+        <property name="right_attach">2</property>
+        <property name="y_options"></property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkEntry" id="entry_quota">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="invisible_char">&#x25CF;</property>
+      </object>
+      <packing>
+        <property name="left_attach">1</property>
+        <property name="right_attach">2</property>
+        <property name="top_attach">2</property>
+        <property name="bottom_attach">3</property>
+        <property name="y_options"></property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label_quota">
+        <property name="visible">True</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">&lt;b&gt;Quota (MB):&lt;/b&gt;</property>
+        <property name="use_markup">True</property>
+      </object>
+      <packing>
+        <property name="top_attach">2</property>
+        <property name="bottom_attach">3</property>
+        <property name="x_options">GTK_FILL</property>
+        <property name="y_options"></property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="checkbutton_quota">
+        <property name="label" translatable="yes">Assign quota</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_underline">True</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <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"></property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/src/glade/find.xml b/src/glade/find.xml
new file mode 100644
index 0000000..fe1df66
--- /dev/null
+++ b/src/glade/find.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkVBox" id="vbox_find">
+    <property name="visible">True</property>
+    <property name="border_width">10</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkHBox" id="hbox23">
+        <property name="visible">True</property>
+        <property name="spacing">10</property>
+        <child>
+          <object class="GtkLabel" id="label36">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Search for:</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkComboBoxEntry" id="comboboxentry_mailbox">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="checkbutton_entire_word">
+        <property name="label" translatable="yes">Match _entire word only</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_underline">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="checkbutton_wrap_around">
+        <property name="label" translatable="yes">_Wrap around</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="use_underline">True</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">False</property>
+        <property name="padding">5</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/src/glade/page.xml b/src/glade/page.xml
new file mode 100644
index 0000000..4609e08
--- /dev/null
+++ b/src/glade/page.xml
@@ -0,0 +1,485 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkTable" id="table_page">
+    <property name="visible">True</property>
+    <property name="n_rows">2</property>
+    <child>
+      <object class="GtkHPaned" id="hpaned3">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="position">210</property>
+        <property name="position_set">True</property>
+        <child>
+          <object class="GtkVPaned" id="vpaned8">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="orientation">vertical</property>
+            <property name="position">120</property>
+            <property name="position_set">True</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow4">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">5</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview_users">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="border_width">5</property>
+                    <property name="reorderable">True</property>
+                    <property name="enable_search">False</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow5">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">5</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview_corrupt_mailbox">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="border_width">5</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="resize">False</property>
+            <property name="shrink">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox_mailbox_details">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">10</property>
+            <child>
+              <object class="GtkLabel" id="label_mailbox_name">
+                <property name="visible">True</property>
+                <property name="use_markup">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">2</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="table10">
+                <property name="visible">True</property>
+                <property name="n_rows">3</property>
+                <property name="n_columns">2</property>
+                <property name="column_spacing">5</property>
+                <property name="row_spacing">7</property>
+                <child>
+                  <object class="GtkLabel" id="label46">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Free space:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="justify">right</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label47">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Assigned space:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="justify">right</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_mailbox_owner">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="xalign">0</property>
+                    <property name="selectable">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_assigned">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="xalign">0</property>
+                    <property name="selectable">True</property>
+                  </object>
+                  <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"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_free">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="xalign">0</property>
+                    <property name="selectable">True</property>
+                  </object>
+                  <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_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label44">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Owner:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                    <property name="justify">right</property>
+                  </object>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkExpander" id="expander_modify_quota">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <child>
+                  <object class="GtkHBox" id="hbox1">
+                    <property name="visible">True</property>
+                    <property name="spacing">10</property>
+                    <child>
+                      <object class="GtkLabel" id="label50">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">New quota (MB)</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="entry_quota_new">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">&#x25CF;</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="button_quota_apply">
+                        <property name="label">gtk-apply</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">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label48">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Modify quota</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkExpander" id="expander_modify_acl">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <child>
+                  <object class="GtkVBox" id="vbox3">
+                    <property name="visible">True</property>
+                    <property name="border_width">5</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">5</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolled_acl">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkTreeView" id="treeview_acl">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="reorderable">True</property>
+                            <property name="rules_hint">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label_acl"/>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label49">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Access control list</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="resize">True</property>
+            <property name="shrink">True</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="top_attach">1</property>
+        <property name="bottom_attach">2</property>
+        <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+        <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkFrame" id="frame12">
+        <property name="visible">True</property>
+        <property name="border_width">5</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkHBox" id="hbox2">
+            <property name="visible">True</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkHBox" id="hbox3">
+                <property name="visible">True</property>
+                <property name="spacing">10</property>
+                <child>
+                  <object class="GtkLabel" id="label54">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Host:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_host">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="selectable">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="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox4">
+                <property name="visible">True</property>
+                <property name="spacing">10</property>
+                <child>
+                  <object class="GtkLabel" id="label56">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;User:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_user">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="selectable">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="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkHBox" id="hbox5">
+                <property name="visible">True</property>
+                <property name="spacing">10</property>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Port:&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_port">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="selectable">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="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button_connect">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkHBox" id="hbox7">
+                        <property name="visible">True</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <object class="GtkImage" id="image2">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-connect</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label63">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">_Connect</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label39">
+            <property name="visible">True</property>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="x_options">GTK_FILL</property>
+        <property name="y_options">GTK_FILL</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/src/glade/password.xml b/src/glade/password.xml
new file mode 100644
index 0000000..fc957ef
--- /dev/null
+++ b/src/glade/password.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="dialog_password">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Password</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <child>
+          <object class="GtkVBox" id="vbox9">
+            <property name="visible">True</property>
+            <property name="border_width">10</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <object class="GtkHBox" id="hbox6">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkImage" id="image1">
+                    <property name="visible">True</property>
+                    <property name="stock">gtk-dialog-question</property>
+                    <property name="icon-size">6</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label62">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Enter your password&lt;/b&gt;</property>
+                    <property name="use_markup">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="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="entry_password">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="visibility">False</property>
+                <property name="activates_default">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="position">2</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="cancelbutton1">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</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="okbutton1">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">False</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="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">cancelbutton1</action-widget>
+      <action-widget response="-5">okbutton1</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/src/glade/report.xml b/src/glade/report.xml
new file mode 100644
index 0000000..02e9ca8
--- /dev/null
+++ b/src/glade/report.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkWindow" id="window-report">
+    <property name="width_request">450</property>
+    <property name="height_request">400</property>
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Report</property>
+    <property name="window_position">center</property>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <child>
+          <object class="GtkHBox" id="hbox2">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="spacing">10</property>
+            <child>
+              <object class="GtkLabel" id="label-percentage">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Over (%)</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="spinbutton-percentage">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="adjustment">adjustment1</property>
+                <property name="climb_rate">1</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-update">
+                <property name="label">gtk-refresh</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="border_width">5</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkTreeView" id="treeview-report">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="reorderable">True</property>
+                <property name="rules_hint">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHSeparator" id="hseparator1">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="padding">2</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="spacing">29</property>
+            <child>
+              <object class="GtkButton" id="button-print">
+                <property name="label">gtk-print</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+                <property name="focus_on_click">False</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="button-cancel">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</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="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+</interface>
diff --git a/src/glade/sessions.xml b/src/glade/sessions.xml
new file mode 100644
index 0000000..a0af70b
--- /dev/null
+++ b/src/glade/sessions.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="dialog_sessions">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Open session</property>
+    <property name="default_width">350</property>
+    <property name="default_height">350</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox2">
+        <property name="visible">True</property>
+        <child>
+          <object class="GtkHBox" id="hbox6">
+            <property name="visible">True</property>
+            <property name="border_width">3</property>
+            <property name="spacing">3</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">automatic</property>
+                <property name="vscrollbar_policy">automatic</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="treeview_sessions">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="reorderable">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVButtonBox" id="vbuttonbox1">
+                <property name="visible">True</property>
+                <property name="spacing">5</property>
+                <property name="layout_style">start</property>
+                <child>
+                  <object class="GtkButton" id="button_new">
+                    <property name="label">gtk-new</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</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="button_properties">
+                    <property name="label">gtk-properties</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</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>
+                <child>
+                  <object class="GtkButton" id="button_delete">
+                    <property name="label">gtk-delete</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton2">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</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="button_cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</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>
+            <child>
+              <object class="GtkButton" id="button_open">
+                <property name="label">gtk-open</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-11">helpbutton2</action-widget>
+      <action-widget response="-6">button_cancel</action-widget>
+      <action-widget response="-5">button_open</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/src/glade/sessions_edit.xml b/src/glade/sessions_edit.xml
new file mode 100644
index 0000000..65c958e
--- /dev/null
+++ b/src/glade/sessions_edit.xml
@@ -0,0 +1,371 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="dialog_session_edit">
+    <property name="visible">True</property>
+    <property name="default_width">300</property>
+    <property name="default_height">250</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox3">
+        <property name="visible">True</property>
+        <property name="spacing">3</property>
+        <child>
+          <object class="GtkVBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="spacing">10</property>
+            <child>
+              <object class="GtkFrame" id="frame3">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment4">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkHBox" id="hbox9">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <property name="spacing">30</property>
+                        <child>
+                          <object class="GtkLabel" id="label22">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Session name:</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="entry_name">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="top_padding">3</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkTable" id="table5">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <property name="n_rows">4</property>
+                        <property name="n_columns">2</property>
+                        <property name="column_spacing">10</property>
+                        <property name="row_spacing">5</property>
+                        <child>
+                          <object class="GtkLabel" id="label13">
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Password:</property>
+                            <property name="mnemonic_widget">entry_passwd</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label12">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Username:</property>
+                            <property name="mnemonic_widget">entry_user</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Port:</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label8">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Host:</property>
+                            <property name="use_markup">True</property>
+                            <property name="mnemonic_widget">entry_host</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="entry_passwd">
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="visibility">False</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="entry_user">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkVBox" id="vbox6">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkEntry" id="entry_host">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment3">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <child>
+                              <object class="GtkSpinButton" id="spinbutton_port">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="adjustment">adjustment1</property>
+                              </object>
+                            </child>
+                          </object>
+                          <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"></property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label24">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Session details&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="top_padding">3</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox5">
+                        <property name="visible">True</property>
+                        <property name="border_width">5</property>
+                        <child>
+                          <object class="GtkCheckButton" id="checkbutton_secure">
+                            <property name="label" translatable="yes">Use a secure connection</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox8">
+                            <property name="visible">True</property>
+                            <property name="spacing">5</property>
+                            <child>
+                              <object class="GtkLabel" id="label27">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Mailbox hierarchy separator:</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="combobox_sep_char">
+                                <property name="visible">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label23">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Options&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area3">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="helpbutton3">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</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="button_session_edit_cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</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>
+            <child>
+              <object class="GtkButton" id="button_session_edit_ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-11">helpbutton3</action-widget>
+      <action-widget response="-6">button_session_edit_cancel</action-widget>
+      <action-widget response="-5">button_session_edit_ok</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="value">143</property>
+    <property name="lower">1</property>
+    <property name="upper">65536</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+</interface>
diff --git a/src/gyrus-admin-mailbox.c b/src/gyrus-admin-mailbox.c
index ba76ddf..5a92056 100644
--- a/src/gyrus-admin-mailbox.c
+++ b/src/gyrus-admin-mailbox.c
@@ -28,7 +28,6 @@
 #include <gtk/gtk.h>
 #include <glib/gprintf.h>
 #include <gnet.h>
-#include <glade/glade.h>
 #include <string.h>
 
 #include "glib/gi18n.h"
diff --git a/src/gyrus-admin.c b/src/gyrus-admin.c
index ff65138..61edc14 100644
--- a/src/gyrus-admin.c
+++ b/src/gyrus-admin.c
@@ -24,7 +24,6 @@
 #include <config.h>
 
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <string.h>
 #include <glib/gi18n.h>
 
@@ -166,58 +165,44 @@ static void
 gyrus_admin_init_get_widgets (GyrusAdmin *admin)
 {
 	GyrusAdminPrivate *priv = admin->priv;
-	GladeXML *xml_page;
-	gchar *file_glade;
+	gchar *file_xml;
 	GtkWidget *table;
+	GtkBuilder *builder;
 
-	file_glade = g_build_filename (GYRUS_GLADE_DIR, "page.glade", NULL);
-	xml_page = glade_xml_new (file_glade, "table_page", "gyrus");
-	
-	g_free (file_glade);
+	file_xml = g_build_filename (GYRUS_GLADE_DIR, "page.xml", NULL);
+
+        builder = gtk_builder_new ();
+        gtk_builder_add_from_file (builder, file_xml, NULL);
 	
-	priv->treeview_users =
-		GTK_TREE_VIEW (glade_xml_get_widget (xml_page,
-						     "treeview_users"));
-	priv->treeview_corrupt_mailbox = 
-		GTK_TREE_VIEW (glade_xml_get_widget (xml_page, 
-						     "treeview_corrupt_mailbox"));
-	priv->treeview_acl =
-		GTK_TREE_VIEW (glade_xml_get_widget (xml_page,
-						     "treeview_acl"));
-	priv->label_acl    = glade_xml_get_widget (xml_page, "label_acl");
-	priv->scrolled_acl = glade_xml_get_widget (xml_page, "scrolled_acl");
+	g_free (file_xml);
 	
-	priv->label_host     = glade_xml_get_widget (xml_page, "label_host");
-	priv->label_user     = glade_xml_get_widget (xml_page, "label_user");
-	priv->label_port     = glade_xml_get_widget (xml_page, "label_port");
-/*	priv->entry_pass     = glade_xml_get_widget (xml_page, "entry_pass"); */
-	priv->button_connect = glade_xml_get_widget (xml_page, "button_connect");
-
-	priv->label_mailbox_owner =
-		glade_xml_get_widget (xml_page, "label_mailbox_owner");
-	priv->label_quota_limit   =
-		glade_xml_get_widget (xml_page, "label_assigned");
-	priv->label_quota_free    =
-		glade_xml_get_widget (xml_page, "label_free");
-
-	priv->entry_quota_new    =
-		glade_xml_get_widget (xml_page, "entry_quota_new");
-	priv->button_quota_apply =
-		glade_xml_get_widget (xml_page, "button_quota_apply");
-
-	priv->button_user_create =
-		glade_xml_get_widget (xml_page, "button_create_user");
-	priv->button_user_remove =
-		glade_xml_get_widget (xml_page, "button_remove_user");
-	priv->label_mailbox_name  =
-		glade_xml_get_widget (xml_page, "label_mailbox_name");
-
-	priv->expander_modify_quota =
-		glade_xml_get_widget (xml_page, "expander_modify_quota");
-	priv->expander_modify_acl   =
-		glade_xml_get_widget (xml_page, "expander_modify_acl");
+	priv->treeview_users = GTK_TREE_VIEW (gtk_builder_get_object (builder,"treeview_users"));
+	priv->treeview_corrupt_mailbox = GTK_TREE_VIEW (gtk_builder_get_object (builder,"treeview_corrupt_mailbox"));
+	priv->treeview_acl = GTK_TREE_VIEW (gtk_builder_get_object (builder,"treeview_acl"));
+	priv->label_acl = GTK_WIDGET (gtk_builder_get_object (builder, "label_acl"));
+	priv->scrolled_acl = GTK_WIDGET (gtk_builder_get_object (builder, "scrolled_acl"));
+
+	priv->label_host = GTK_WIDGET (gtk_builder_get_object (builder, "label_host"));
+	priv->label_user = GTK_WIDGET (gtk_builder_get_object (builder, "label_user"));
+	priv->label_port = GTK_WIDGET (gtk_builder_get_object (builder, "label_port"));
+	priv->button_connect = GTK_WIDGET (gtk_builder_get_object (builder, "button_connect"));
+
+	priv->label_mailbox_owner = GTK_WIDGET (gtk_builder_get_object (builder, "label_mailbox_owner"));
+	priv->label_quota_limit = GTK_WIDGET (gtk_builder_get_object (builder, "label_assigned"));
+	priv->label_quota_free = GTK_WIDGET (gtk_builder_get_object (builder, "label_free"));
+
+	priv->entry_quota_new = GTK_WIDGET (gtk_builder_get_object (builder, "entry_quota_new"));
+	priv->button_quota_apply = GTK_WIDGET (gtk_builder_get_object (builder, "button_quota_apply"));
+
+	priv->button_user_create = GTK_WIDGET (gtk_builder_get_object (builder, "button_create_user"));
+	priv->button_user_remove = GTK_WIDGET (gtk_builder_get_object (builder, "button_remove_user"));
+	priv->label_mailbox_name = GTK_WIDGET (gtk_builder_get_object (builder, "label_mailbox_name"));
+
+	priv->expander_modify_quota = GTK_WIDGET (gtk_builder_get_object (builder, "expander_modify_quota"));
+	priv->expander_modify_acl = GTK_WIDGET (gtk_builder_get_object (builder, "expander_modify_acl"));
 	
-	table = glade_xml_get_widget (xml_page , "table_page");
+	table = GTK_WIDGET (gtk_builder_get_object (builder , "table_page"));
+
 	gtk_box_pack_start_defaults (GTK_BOX (admin), table);
 
 	admin->priv = priv;
diff --git a/src/gyrus-common.c b/src/gyrus-common.c
index 0674af9..05d165d 100644
--- a/src/gyrus-common.c
+++ b/src/gyrus-common.c
@@ -25,7 +25,6 @@
 
 #include <gtk/gtk.h>
 #include <string.h>
-#include <glade/glade.h>
 #include "glib/gi18n.h"
 #include "gyrus-common.h"
 
@@ -65,19 +64,22 @@ gyrus_gtk_entry_has_text (GtkEntry *entry)
 gchar *
 gyrus_dialog_password_new (void)
 {
-	GladeXML *xml;
-	gchar *file_glade;
+	gchar *file_xml;
 	GtkWidget *dialog;
 	GtkWidget *entry_password;
 	gchar *password = NULL;
 	gint result;
+	GtkBuilder *builder;
 
-	file_glade = g_build_filename (GYRUS_GLADE_DIR, "page.glade", NULL);
-	xml = glade_xml_new (file_glade, "dialog_password", "gyrus");
-	g_free (file_glade);
+	file_xml = g_build_filename (GYRUS_GLADE_DIR, "password.xml", NULL);
+
+        builder = gtk_builder_new ();
+        gtk_builder_add_from_file (builder, file_xml, NULL);
+
+	g_free (file_xml);
 	
-	dialog         = glade_xml_get_widget (xml, "dialog_password");
-	entry_password = glade_xml_get_widget (xml, "entry_password");
+	dialog = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_password"));
+	entry_password = GTK_WIDGET (gtk_builder_get_object (builder, "entry_password"));
 	
 	result = gtk_dialog_run (GTK_DIALOG (dialog));
 
diff --git a/src/gyrus-dialog-find-mailbox.c b/src/gyrus-dialog-find-mailbox.c
index 6316d08..924f89e 100644
--- a/src/gyrus-dialog-find-mailbox.c
+++ b/src/gyrus-dialog-find-mailbox.c
@@ -24,7 +24,6 @@
 #include <config.h>
 
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <glib-object.h>
 #include <gdk/gdkkeysyms.h>
 #include <string.h>
@@ -207,15 +206,17 @@ gyrus_dialog_find_mailbox_class_init (GyrusDialogFindMailboxClass *class)
 static void
 gyrus_dialog_find_mailbox_init_get_widgets (GyrusDialogFindMailbox *dialog)
 {
-	GladeXML *xml_dialog;
-	gchar *file_glade;
+	gchar *file_xml;
 	GtkWidget *vbox_find;
+	GtkBuilder *builder;
 
-	file_glade = g_build_filename (GYRUS_GLADE_DIR, "find.glade", NULL);
-	xml_dialog = glade_xml_new (file_glade, "vbox_find", "gyrus");
-	g_free (file_glade);
+	file_xml = g_build_filename (GYRUS_GLADE_DIR, "find.xml", NULL);
 
-	vbox_find = glade_xml_get_widget (xml_dialog, "vbox_find");
+	builder = gtk_builder_new ();
+        gtk_builder_add_from_file (builder, file_xml, NULL);
+	g_free (file_xml);
+
+	vbox_find = GTK_WIDGET (gtk_builder_get_object (builder, "vbox_find"));
 	
 	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox_find);
 	
@@ -227,10 +228,9 @@ gyrus_dialog_find_mailbox_init_get_widgets (GyrusDialogFindMailbox *dialog)
 	gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->action_area),
 				     dialog->priv->button_find);
 
-	dialog->priv->checkbutton_entire_word = glade_xml_get_widget (xml_dialog, "checkbutton_entire_word");
-	dialog->priv->checkbutton_wrap_around = glade_xml_get_widget (xml_dialog, "checkbutton_wrap_around");
-	
-	dialog->priv->comboboxentry_mailbox = glade_xml_get_widget (xml_dialog, "comboboxentry_mailbox");
+	dialog->priv->checkbutton_entire_word = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_entire_word"));
+	dialog->priv->checkbutton_wrap_around = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_wrap_around"));
+	dialog->priv->comboboxentry_mailbox = GTK_WIDGET (gtk_builder_get_object (builder, "comboboxentry_mailbox"));
 }
 
 static void
diff --git a/src/gyrus-dialog-mailbox-new.c b/src/gyrus-dialog-mailbox-new.c
index 64e2dea..0b206b9 100644
--- a/src/gyrus-dialog-mailbox-new.c
+++ b/src/gyrus-dialog-mailbox-new.c
@@ -24,7 +24,6 @@
 #include <config.h>
 
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <glib-object.h>
 
 #include "glib/gi18n.h"
@@ -159,18 +158,21 @@ gyrus_dialog_mailbox_new_class_init (GyrusDialogMailboxNewClass *class)
 static void
 gyrus_dialog_mailbox_new_init_get_widgets (GyrusDialogMailboxNew *dialog)
 {
-	GladeXML *xml_dialog;
-	gchar *file_glade;
+	gchar *file_xml;
 	GtkWidget *table;
+	GtkBuilder *builder;
 
-	file_glade = g_build_filename (GYRUS_GLADE_DIR, "create_mailbox.glade", NULL);
-	xml_dialog = glade_xml_new (file_glade, "table_dialog", "gyrus");
-	g_free (file_glade);
+	file_xml = g_build_filename (GYRUS_GLADE_DIR, "create_mailbox.xml", NULL);
 
-	table = glade_xml_get_widget (xml_dialog, "table_dialog");
+        builder = gtk_builder_new ();
+        gtk_builder_add_from_file (builder, file_xml, NULL);
+
+	g_free (file_xml);
+
+	table = GTK_WIDGET (gtk_builder_get_object (builder, "table_dialog"));
 	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table);
 	
-	dialog->priv->button_ok     = gtk_button_new_from_stock (GTK_STOCK_OK);
+	dialog->priv->button_ok = gtk_button_new_from_stock (GTK_STOCK_OK);
 	dialog->priv->button_cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
 
 	gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->action_area),
@@ -178,11 +180,11 @@ gyrus_dialog_mailbox_new_init_get_widgets (GyrusDialogMailboxNew *dialog)
 	gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->action_area),
 				     dialog->priv->button_ok);
 
-	dialog->priv->checkbutton_quota = glade_xml_get_widget (xml_dialog, "checkbutton_quota");
-	dialog->priv->entry_mailbox     = glade_xml_get_widget (xml_dialog, "entry_mailbox");
-	dialog->priv->entry_quota       = glade_xml_get_widget (xml_dialog, "entry_quota");
-	dialog->priv->label_mailbox     = glade_xml_get_widget (xml_dialog, "label_mailbox");
-	dialog->priv->label_quota       = glade_xml_get_widget (xml_dialog, "label_quota");
+	dialog->priv->checkbutton_quota = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_quota"));
+	dialog->priv->entry_mailbox = GTK_WIDGET (gtk_builder_get_object (builder, "entry_mailbox"));
+	dialog->priv->entry_quota = GTK_WIDGET (gtk_builder_get_object (builder, "entry_quota"));
+	dialog->priv->label_mailbox = GTK_WIDGET (gtk_builder_get_object (builder, "label_mailbox"));
+	dialog->priv->label_quota = GTK_WIDGET (gtk_builder_get_object (builder, "label_quota"));
 }
 
 static void
diff --git a/src/gyrus-main-app.c b/src/gyrus-main-app.c
index adf6eb7..6f31cf2 100644
--- a/src/gyrus-main-app.c
+++ b/src/gyrus-main-app.c
@@ -26,7 +26,6 @@
 #include <config.h>
 
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <stdlib.h>
 
 #include "glib/gi18n.h"
diff --git a/src/gyrus-report.c b/src/gyrus-report.c
index 7aec1e1..dabf00e 100644
--- a/src/gyrus-report.c
+++ b/src/gyrus-report.c
@@ -23,7 +23,6 @@
 
 #include <config.h>
 
-#include <glade/glade.h>
 #include "gyrus-report.h"
 #include "glib/gi18n.h"
 #include <glib/gprintf.h>
@@ -76,29 +75,31 @@ static void gyrus_report_on_button_print_clicked(GtkWidget *widget, GyrusReportD
 void
 gyrus_report_show_report (GyrusAdmin *admin)
 {
-	GladeXML *xml;
-       	gchar *file_glade;
-	
+	gchar *file_xml;
+	GtkBuilder *builder;
+
 	GtkWidget *button_cancel;
 	GtkWidget *button_preview;
 	GtkWidget *button_update;
-	
+
 	GyrusReportData *report;
 	report = g_new0 (GyrusReportData,1);
 
 	report->mailbox_temp = NULL;
 	report->admin = admin;
-	
-	file_glade = g_build_filename (GYRUS_GLADE_DIR, "report.glade", NULL);
-	xml = glade_xml_new (file_glade, NULL, NULL);
 
-	report->window_report = glade_xml_get_widget (xml, "window-report");
-	button_cancel = glade_xml_get_widget (xml, "button-cancel");
-	button_preview = glade_xml_get_widget (xml, "button-preview");
-	button_update = glade_xml_get_widget (xml, "button-update");
-	report->spin_report = glade_xml_get_widget (xml, "spinbutton-percentage");
-	report->treeview_report = GTK_TREE_VIEW (glade_xml_get_widget (xml,"treeview-report"));
-	report->button_print = glade_xml_get_widget (xml, "button-print");
+	file_xml = g_build_filename (GYRUS_GLADE_DIR, "report.xml", NULL);
+
+	builder = gtk_builder_new ();
+	gtk_builder_add_from_file (builder, file_xml, NULL);
+
+	report->window_report = GTK_WIDGET (gtk_builder_get_object (builder, "window-report"));
+	button_cancel = GTK_WIDGET (gtk_builder_get_object (builder, "button-cancel"));
+	button_preview = GTK_WIDGET (gtk_builder_get_object (builder, "button-preview"));
+	button_update = GTK_WIDGET (gtk_builder_get_object (builder, "button-update"));
+	report->spin_report = GTK_WIDGET (gtk_builder_get_object (builder, "spinbutton-percentage"));
+	report->treeview_report = GTK_TREE_VIEW (gtk_builder_get_object (builder,"treeview-report"));
+	report->button_print = GTK_WIDGET (gtk_builder_get_object (builder, "button-print"));
 
 	gtk_widget_set_sensitive (report->button_print, FALSE);
 
@@ -122,14 +123,13 @@ gyrus_report_show_report (GyrusAdmin *admin)
 	g_signal_connect (G_OBJECT (button_update), "clicked",
                           G_CALLBACK (gyrus_report_on_button_update_clicked),
                           report);
-	
+
 	g_signal_connect (G_OBJECT (report->button_print), "clicked",
                           G_CALLBACK (gyrus_report_on_button_print_clicked),
                           report);
 	gtk_widget_show_all (report->window_report);
-	g_object_unref (xml);
-	
-	g_free (file_glade);
+
+	g_free (file_xml);
 }
 
 
@@ -148,7 +148,7 @@ gyrus_report_cell_data_func (GtkTreeViewColumn *tree_column,
 			   -1);
 	
 	g_snprintf(buf, sizeof(buf), 
-		   "%.1f", perc);
+				"%.1f", perc);
 	
 	g_object_set(renderer, "text", 
 		     buf, NULL);
@@ -318,7 +318,8 @@ gyrus_report_evaluate_quota (GtkTreeModel *model,
 	GtkListStore *store;
 	GtkTreeIter iter_new;	
 
-	gint per = report->n_percen;	gboolean passed = TRUE;
+	gint per = report->n_percen;
+	gboolean passed = TRUE;
 
 	store = GTK_LIST_STORE (gtk_tree_view_get_model (report->treeview_report));
 
diff --git a/src/gyrus-session.c b/src/gyrus-session.c
index 70f6923..e8fe7aa 100644
--- a/src/gyrus-session.c
+++ b/src/gyrus-session.c
@@ -27,7 +27,6 @@
 
 #include <gconf/gconf-client.h>
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <gdk/gdkkeysyms.h>
 #include <string.h>
 
@@ -81,6 +80,7 @@ static GtkWidget *spinbutton_port;
 static GtkWidget *entry_name;
 static GtkWidget *treeview_sessions;
 static GtkTreeModel *model_sessions;
+static GtkListStore *model_separator;
 
 static GtkWidget *button_session_edit_ok;
 static GtkWidget *button_session_edit_cancel;
@@ -412,11 +412,10 @@ gyrus_session_set_defaults_from_session (GyrusSession *session)
 	g_return_if_fail (session);
 
 	gtk_entry_set_text (GTK_ENTRY (entry_host), session->host);
-	gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton_port),
-				   (gdouble) session->port);
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton_port), (gdouble) session->port);
 	gtk_entry_set_text (GTK_ENTRY (entry_user), session->user);
 	gtk_entry_set_text (GTK_ENTRY (entry_name), session->name);
-	
+
 	if (strcmp (session->sep_char, ".") == 0)
 		value = 0;
 	else if (strcmp (session->sep_char, "/") == 0)
@@ -582,6 +581,23 @@ gyrus_session_create_model_sessions (void)
 	model_sessions = GTK_TREE_MODEL (model);
 }
 
+static void
+gyrus_session_create_model_separator (void)
+{
+	GtkTreeIter iter;
+
+	model_separator = gtk_list_store_new (1,G_TYPE_STRING);
+
+	gtk_list_store_append(GTK_LIST_STORE(model_separator), &iter);
+	gtk_list_store_set (GTK_LIST_STORE(model_separator), &iter,0,".", -1);
+
+	gtk_list_store_append(GTK_LIST_STORE(model_separator), &iter);
+	gtk_list_store_set (GTK_LIST_STORE(model_separator), &iter,0,"/", -1);
+
+	gtk_list_store_append(GTK_LIST_STORE(model_separator), &iter);
+	gtk_list_store_set (GTK_LIST_STORE(model_separator), &iter,0,"Autodetect", -1);
+}
+
 /* If remove is TRUE, the selected item is removed from the array */
 static GyrusSession *
 gyrus_session_get_selected_session (gboolean remove)
@@ -709,21 +725,24 @@ gyrus_session_open (GyrusSession *session, gpointer user_data)
 static void
 gyrus_session_load_interface (gpointer user_data)
 {
-	GladeXML *xml;
-	gchar *file_glade;
+	gchar *file_xml;
+	GtkBuilder *builder;
         
-	file_glade = g_build_filename (GYRUS_GLADE_DIR, "sessions.glade", NULL);
-	xml = glade_xml_new (file_glade, "dialog_sessions", "gyrus");
-	g_free (file_glade);
+	file_xml = g_build_filename (GYRUS_GLADE_DIR, "sessions.xml", NULL);
+
+	builder = gtk_builder_new ();
+        gtk_builder_add_from_file (builder, file_xml, NULL);
+
+	g_free (file_xml);
 	
-	window            = glade_xml_get_widget (xml, "dialog_sessions");
+	window = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_sessions"));
 	
-	treeview_sessions = glade_xml_get_widget (xml, "treeview_sessions");
-	button_new        = glade_xml_get_widget (xml, "button_new");
-	button_open       = glade_xml_get_widget (xml, "button_open");
-	button_delete     = glade_xml_get_widget (xml, "button_delete");
-	button_cancel     = glade_xml_get_widget (xml, "button_cancel");
-	button_properties = glade_xml_get_widget (xml, "button_properties");
+	treeview_sessions = GTK_WIDGET (gtk_builder_get_object (builder, "treeview_sessions"));
+	button_new = GTK_WIDGET (gtk_builder_get_object (builder, "button_new"));
+	button_open = GTK_WIDGET (gtk_builder_get_object (builder, "button_open"));
+	button_delete = GTK_WIDGET (gtk_builder_get_object (builder, "button_delete"));
+	button_cancel = GTK_WIDGET (gtk_builder_get_object (builder, "button_cancel"));
+	button_properties = GTK_WIDGET (gtk_builder_get_object (builder, "button_properties"));
 	
 	/* connect signals */
 	g_signal_connect (G_OBJECT (window), "delete_event",
@@ -761,29 +780,41 @@ gyrus_session_load_interface (gpointer user_data)
 	gyrus_session_set_treeview ();
 	gyrus_session_list_set_sensitive (FALSE);
 	gyrus_session_create_model_sessions ();
-	g_object_unref (xml);
+	gyrus_session_create_model_separator ();
 }
 
 static void
 gyrus_session_edit_load_interface (gpointer user_data)
 {
-	GladeXML *xml;
-	gchar *file_glade;
+	gchar *file_xml;
+	GtkBuilder *builder;
+	GtkCellRenderer *cell;
         
-	file_glade = g_build_filename (GYRUS_GLADE_DIR, "sessions.glade", NULL);
-	xml = glade_xml_new (file_glade, "dialog_session_edit", "gyrus");
-	g_free (file_glade);
-	
-	window_edit       = glade_xml_get_widget (xml, "dialog_session_edit");
-	checkbutton_secure= glade_xml_get_widget (xml, "checkbutton_secure");
-	entry_host        = glade_xml_get_widget (xml, "entry_host");
-	entry_user        = glade_xml_get_widget (xml, "entry_user");
-	entry_passwd      = glade_xml_get_widget (xml, "entry_passwd");
-	combobox_sep_char      = glade_xml_get_widget (xml, "combobox_sep_char");
-	spinbutton_port   = glade_xml_get_widget (xml, "spinbutton_port");
-	button_session_edit_ok  = glade_xml_get_widget (xml, "button_session_edit_ok");
-	button_session_edit_cancel = glade_xml_get_widget (xml, "button_session_edit_cancel");
-	entry_name        = glade_xml_get_widget (xml, "entry_name");
+	file_xml = g_build_filename (GYRUS_GLADE_DIR, "sessions_edit.xml", NULL);
+
+	builder = gtk_builder_new ();
+        gtk_builder_add_from_file (builder, file_xml, NULL);
+
+	g_free (file_xml);
+
+	window_edit = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_session_edit"));
+	checkbutton_secure = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_secure"));
+	entry_host = GTK_WIDGET (gtk_builder_get_object (builder, "entry_host"));
+	entry_user = GTK_WIDGET (gtk_builder_get_object (builder, "entry_user"));
+	entry_passwd = GTK_WIDGET (gtk_builder_get_object (builder, "entry_passwd"));
+	combobox_sep_char = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_sep_char"));
+	spinbutton_port = GTK_WIDGET (gtk_builder_get_object (builder, "spinbutton_port"));
+	button_session_edit_ok = GTK_WIDGET (gtk_builder_get_object (builder, "button_session_edit_ok"));
+	button_session_edit_cancel = GTK_WIDGET (gtk_builder_get_object (builder, "button_session_edit_cancel"));
+	entry_name = GTK_WIDGET (gtk_builder_get_object (builder, "entry_name"));
+
+	/* set model to combobox of mailbox hierarchy separator */
+	gtk_combo_box_set_model (GTK_COMBO_BOX (combobox_sep_char), GTK_TREE_MODEL (model_separator));
+	cell = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (combobox_sep_char), cell, TRUE);
+	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT (combobox_sep_char), cell, "text", 0, NULL);
+
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (spinbutton_port), 143);
 
 	g_signal_connect (G_OBJECT (button_session_edit_cancel), "clicked",
 			  G_CALLBACK (gyrus_session_edit_on_button_cancel_clicked),
@@ -816,7 +847,6 @@ gyrus_session_edit_load_interface (gpointer user_data)
 	gtk_window_set_modal (GTK_WINDOW (window_edit), TRUE);
 	gtk_window_set_transient_for (GTK_WINDOW (window_edit), GTK_WINDOW (window));
 	gtk_widget_grab_default (button_session_edit_ok);
-	g_object_unref (xml);
 }
 
 /* show window sessions */



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