[chronojump] Load now is more similar to session/more



commit 30c13036b4241eab94824c0c6285e29e6005eba7
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed May 6 14:33:40 2020 +0200

    Load now is more similar to session/more

 glade/app1.glade                      | 313 +++++++++++++++++++++++-----------
 src/constants.cs                      |   1 +
 src/gui/app1/chronojump.cs            |  13 ++
 src/gui/app1/icons.cs                 |   6 +
 src/gui/app1/session/loadAndImport.cs |  20 ++-
 5 files changed, 253 insertions(+), 100 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 0dcd93fa..9571f43e 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -24964,6 +24964,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -27724,6 +27727,18 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -27760,18 +27775,6 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -35598,6 +35601,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -36899,52 +36905,59 @@ then click this button.</property>
                                                 <property name="border_width">4</property>
                                                 <property name="spacing">12</property>
                                                 <child>
-                                                  <widget class="GtkLabel" id="app1s_label_select">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkLabel" id="app1s_file_path_import">
+                                                  <widget class="GtkFrame" id="frame20">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">1</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkHBox" id="app1s_hbox_load_controls">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="spacing">12</property>
+                                                    <property name="label_xalign">0</property>
+                                                    <property name="label_yalign">1</property>
+                                                    <property name="shadow_type">in</property>
                                                     <child>
-                                                      <widget class="GtkVBox" id="vbox183">
+                                                      <widget class="GtkViewport" id="viewport17">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">False</property>
-                                                        <property name="spacing">6</property>
+                                                        <property name="border_width">4</property>
                                                         <child>
-                                                          <widget class="GtkLabel" id="label443">
+                                                          <widget class="GtkVBox" id="vbox183">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="border_width">12</property>
+                                                            <property name="spacing">12</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" 
id="app1s_file_path_import">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkHBox" 
id="app1s_hbox_load_controls">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">12</property>
+                                                            <child>
+                                                            <widget class="GtkVBox" id="vbox208">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label443">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
                                                             <property name="label" translatable="yes">Search 
filter</property>
-                                                          </widget>
-                                                          <packing>
+                                                            </widget>
+                                                            <packing>
                                                             <property name="expand">True</property>
                                                             <property name="fill">True</property>
                                                             <property name="position">0</property>
-                                                          </packing>
-                                                        </child>
-                                                        <child>
-                                                          <widget class="GtkEntry" 
id="app1s_entry_search_filter">
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkEntry" 
id="app1s_entry_search_filter">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="invisible_char">●</property>
@@ -36954,40 +36967,40 @@ then click this button.</property>
                                                             <property 
name="primary_icon_sensitive">True</property>
                                                             <property 
name="secondary_icon_sensitive">True</property>
                                                             <signal name="changed" 
handler="app1s_on_entry_search_filter_changed" swapped="no"/>
-                                                          </widget>
-                                                          <packing>
+                                                            </widget>
+                                                            <packing>
                                                             <property name="expand">True</property>
                                                             <property name="fill">True</property>
                                                             <property name="position">1</property>
-                                                          </packing>
-                                                        </child>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="expand">True</property>
-                                                        <property name="fill">True</property>
-                                                        <property name="position">0</property>
-                                                      </packing>
-                                                    </child>
-                                                    <child>
-                                                      <widget class="GtkVBox" id="vbox208">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">False</property>
-                                                        <property name="spacing">6</property>
-                                                        <child>
-                                                          <widget class="GtkLabel" id="label494">
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkVBox" id="vbox216">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label494">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
                                                             <property name="label" translatable="yes">Show 
more data</property>
-                                                          </widget>
-                                                          <packing>
+                                                            </widget>
+                                                            <packing>
                                                             <property name="expand">True</property>
                                                             <property name="fill">True</property>
                                                             <property name="position">0</property>
-                                                          </packing>
-                                                        </child>
-                                                        <child>
-                                                          <widget class="GtkHBox" id="hbox405">
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox405">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
@@ -37037,6 +37050,137 @@ then click this button.</property>
                                                             <property name="position">2</property>
                                                             </packing>
                                                             </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</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>
+                                                            <child>
+                                                            <widget class="GtkScrolledWindow" 
id="scrolledwindow12">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property 
name="hscrollbar_policy">automatic</property>
+                                                            <property 
name="vscrollbar_policy">automatic</property>
+                                                            <child>
+                                                            <widget class="GtkTreeView" 
id="app1s_treeview_session_load">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="enable_search">False</property>
+                                                            <signal name="row_activated" 
handler="app1s_on_row_double_clicked" swapped="no"/>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                          </widget>
+                                                        </child>
+                                                      </widget>
+                                                    </child>
+                                                    <child>
+                                                      <widget class="GtkHBox" id="hbox418">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <child>
+                                                          <widget class="GtkHBox" id="app1s_hbox_frame_load">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_session_load3_blue">
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_session_load3_yellow">
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="app1s_label_load">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkHBox" 
id="app1s_hbox_frame_import">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">6</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_session_import1_blue">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="stock">gtk-open</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_session_import1_yellow">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="stock">gtk-open</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="app1s_label_import">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
                                                           </widget>
                                                           <packing>
                                                             <property name="expand">True</property>
@@ -37046,37 +37190,14 @@ then click this button.</property>
                                                         </child>
                                                       </widget>
                                                       <packing>
-                                                        <property name="expand">False</property>
-                                                        <property name="fill">False</property>
-                                                        <property name="position">1</property>
+                                                        <property name="type">label_item</property>
                                                       </packing>
                                                     </child>
                                                   </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkScrolledWindow" id="scrolledwindow12">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="hscrollbar_policy">automatic</property>
-                                                    <property name="vscrollbar_policy">automatic</property>
-                                                    <child>
-                                                      <widget class="GtkTreeView" 
id="app1s_treeview_session_load">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
-                                                        <property name="enable_search">False</property>
-                                                        <signal name="row_activated" 
handler="app1s_on_row_double_clicked" swapped="no"/>
-                                                      </widget>
-                                                    </child>
-                                                  </widget>
                                                   <packing>
                                                     <property name="expand">True</property>
                                                     <property name="fill">True</property>
-                                                    <property name="position">3</property>
+                                                    <property name="position">0</property>
                                                   </packing>
                                                 </child>
                                                 <child>
@@ -37185,7 +37306,7 @@ then click this button.</property>
                                                   <packing>
                                                     <property name="expand">False</property>
                                                     <property name="fill">False</property>
-                                                    <property name="position">4</property>
+                                                    <property name="position">1</property>
                                                   </packing>
                                                 </child>
                                                 <child>
@@ -37277,7 +37398,7 @@ then click this button.</property>
                                                   <packing>
                                                     <property name="expand">False</property>
                                                     <property name="fill">False</property>
-                                                    <property name="position">5</property>
+                                                    <property name="position">2</property>
                                                   </packing>
                                                 </child>
                                               </widget>
diff --git a/src/constants.cs b/src/constants.cs
index 31af67b4..764adc94 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -615,6 +615,7 @@ public class Constants
        public static string FileNameOpenPlus = "gtk-open-plus.png";
 
        public static string FileNameImport = "import.png";
+       public static string FileNameImportYellow = "import_yellow.png";
        public static string FileNameExport = "export.png";
 
        public static string FileNameCSVHeadersIcon = "import-csv-headers.png";
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 80322e21..95341814 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -774,6 +774,19 @@ public partial class ChronoJumpWindow
                }
 
                UtilGtk.ContrastLabelsNotebook (preferences.colorBackgroundIsDark, app1s_notebook);
+
+               if(preferences.colorBackgroundIsDark)
+               {
+                       image_session_load3_blue.Visible = false;
+                       image_session_import1_blue.Visible = false;
+                       image_session_load3_yellow.Visible = true;
+                       image_session_import1_yellow.Visible = true;
+               } else {
+                       image_session_load3_blue.Visible = true;
+                       image_session_import1_blue.Visible = true;
+                       image_session_load3_yellow.Visible = false;
+                       image_session_import1_yellow.Visible = false;
+               }
        }
 
        private void testNewStuff()
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index c18cd9fd..fade9897 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -432,6 +432,9 @@ public partial class ChronoJumpWindow
                image_session_open.Pixbuf = pixbuf;
                image_session_load1.Pixbuf = pixbuf;
                image_session_load2.Pixbuf = pixbuf;
+               image_session_load3_blue.Pixbuf = pixbuf;
+               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "folder_open_yellow.png");
+               image_session_load3_yellow.Pixbuf = pixbuf;
 
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "folder_open_set.png");
                image_encoder_capture_open.Pixbuf = pixbuf;
@@ -622,6 +625,9 @@ public partial class ChronoJumpWindow
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameImport);
                image_import_database.Pixbuf = pixbuf;
                image_session_import.Pixbuf = pixbuf;
+               image_session_import1_blue.Pixbuf = pixbuf;
+               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameImportYellow);
+               image_session_import1_yellow.Pixbuf = pixbuf;
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameExport);
                image_export_csv.Pixbuf = pixbuf;
                image_export_encoder_signal.Pixbuf = pixbuf;
diff --git a/src/gui/app1/session/loadAndImport.cs b/src/gui/app1/session/loadAndImport.cs
index 50fc0760..d8e77caa 100644
--- a/src/gui/app1/session/loadAndImport.cs
+++ b/src/gui/app1/session/loadAndImport.cs
@@ -42,7 +42,14 @@ public partial class ChronoJumpWindow
        private string app1s_selected;
        private string app1s_import_file_path;
 
-       [Widget] Gtk.Label app1s_label_select;
+       [Widget] Gtk.HBox app1s_hbox_frame_load;
+       [Widget] Gtk.HBox app1s_hbox_frame_import;
+       [Widget] Gtk.Image image_session_load3_blue;
+       [Widget] Gtk.Image image_session_import1_blue;
+       [Widget] Gtk.Image image_session_load3_yellow;
+       [Widget] Gtk.Image image_session_import1_yellow;
+       [Widget] Gtk.Label app1s_label_load;
+       [Widget] Gtk.Label app1s_label_import;
 
        /*
         * when fillTreeView() is called, it executes:
@@ -66,18 +73,23 @@ public partial class ChronoJumpWindow
                        app1s_file_path_import.Visible = false;
                        app1s_notebook_load_button_animation.Visible = true;
                        app1s_hbuttonbox_page2_import.Visible = false;
-                       app1s_label_select.Text = "<b>" + Catalog.GetString ("Load session") + "</b>";
+                       app1s_label_load.Text = "<b>" + Catalog.GetString ("Load session") + "</b>";
+                       app1s_label_load.UseMarkup = true;
+                       app1s_hbox_frame_load.Visible = true;
+                       app1s_hbox_frame_import.Visible = false;
                        app1s_notebook.CurrentPage = app1s_PAGE_SELECT_SESSION;
                        app1s_notebook_load_button_animation.CurrentPage = 0;
                } else {
                        app1s_file_path_import.Visible = true;
                        app1s_notebook_load_button_animation.Visible = false;
                        app1s_hbuttonbox_page2_import.Visible = true;
-                       app1s_label_select.Text = "<b>" + Catalog.GetString ("Import session") + "</b>";
+                       app1s_label_import.Text = "<b>" + Catalog.GetString ("Import session") + "</b>";
+                       app1s_label_import.UseMarkup = true;
+                       app1s_hbox_frame_load.Visible = false;
+                       app1s_hbox_frame_import.Visible = true;
                        app1s_button_select_file_import_same_database.Visible = false; //is shown when user 
want to import a second session
                        app1s_notebook.CurrentPage = app1s_PAGE_IMPORT_START;
                }
-               app1s_label_select.UseMarkup = true;
                app1s_entry_search_filter.Text = "";
 
                app1s_image_open_database.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
"folder_open.png");



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