[chronojump] small improvements on session load (import window)



commit f2ed89b8ec949abaab50d4b30d57ded39a795ed7
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Oct 6 19:08:15 2019 +0200

    small improvements on session load (import window)

 glade/session_load.glade | 106 +++++++++++++++++++++++++++++++----------------
 src/gui/session.cs       |   4 ++
 2 files changed, 74 insertions(+), 36 deletions(-)
---
diff --git a/glade/session_load.glade b/glade/session_load.glade
index 2c4dd467..91eecde7 100644
--- a/glade/session_load.glade
+++ b/glade/session_load.glade
@@ -50,12 +50,41 @@
                 </child>
                 <child>
                   <widget class="GtkButton" id="select_file_import">
-                    <property name="label">gtk-open</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="use_stock">True</property>
                     <signal name="clicked" handler="on_select_file_import_clicked" swapped="no"/>
+                    <child>
+                      <widget class="GtkHBox" id="hbox2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">4</property>
+                        <child>
+                          <widget class="GtkImage" id="image_open_database">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-missing-image</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Open database file</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
@@ -71,39 +100,47 @@
               </packing>
             </child>
             <child>
-              <widget class="GtkHBox" id="import_options_box">
+              <widget class="GtkAlignment" id="alignment1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="left_padding">20</property>
                 <child>
-                  <widget class="GtkRadioButton" id="radio_import_new_session">
-                    <property name="label" translatable="yes">Import into a new session</property>
+                  <widget class="GtkHBox" id="import_options_box">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="active">True</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkRadioButton" id="radio_import_current_session">
-                    <property name="label" translatable="yes">Import into the current session</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="active">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">radio_import_new_session</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">12</property>
+                    <child>
+                      <widget class="GtkRadioButton" id="radio_import_new_session">
+                        <property name="label" translatable="yes">Import into a new session</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="radio_import_current_session">
+                        <property name="label" translatable="yes">Import into the current session</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">radio_import_new_session</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
                   </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
               </widget>
               <packing>
@@ -119,9 +156,6 @@
             <property name="position">0</property>
           </packing>
         </child>
-        <child>
-          <placeholder/>
-        </child>
         <child>
           <widget class="GtkHBox" id="hbox1">
             <property name="visible">True</property>
@@ -218,7 +252,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
-            <property name="position">2</property>
+            <property name="position">1</property>
           </packing>
         </child>
         <child>
@@ -238,7 +272,7 @@
           <packing>
             <property name="expand">True</property>
             <property name="fill">True</property>
-            <property name="position">3</property>
+            <property name="position">2</property>
           </packing>
         </child>
         <child>
@@ -284,7 +318,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">4</property>
+            <property name="position">3</property>
           </packing>
         </child>
       </widget>
diff --git a/src/gui/session.cs b/src/gui/session.cs
index cc8c68fc..211afcce 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -19,6 +19,7 @@
  */
 
 using System;
+using Gdk; //Pixbuf
 using Gtk;
 using Glade;
 using GLib; //for Value
@@ -684,6 +685,7 @@ public class SessionLoadWindow {
        [Widget] Gtk.TreeView treeview_session_load;
        [Widget] Gtk.Button button_accept;
        [Widget] Gtk.Entry entry_search_filter;
+       [Widget] Gtk.Image image_open_database;
        [Widget] Gtk.CheckButton checkbutton_show_data_jump_run;
        [Widget] Gtk.CheckButton checkbutton_show_data_encoder_and_fs;
        [Widget] Gtk.Label file_path_import;
@@ -718,6 +720,8 @@ public class SessionLoadWindow {
                //put an icon to window
                UtilGtk.IconWindow(session_load);
 
+               image_open_database.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "folder_open.png");
+
                createTreeView(treeview_session_load, false, false);
                store = getStore(false, false);
                treeview_session_load.Model = store;


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