[chronojump] Improved splash win. Not use errorWin on start. send log on app1.



commit d15b0fd04f5d7072e7c519a7643bfe3f94d834d6
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jul 20 16:03:47 2017 +0200

    Improved splash win. Not use errorWin on start. send log on app1.

 glade/app1.glade          |  304 +++++++++++++++++++++++++++++++++++++++++++++
 glade/error_window.glade  |  299 +-------------------------------------------
 glade/splash_window.glade |   50 +++++++-
 po/POTFILES.in            |    2 +-
 src/Makefile.am           |    1 +
 src/chronojump.cs         |   32 +++---
 src/gui/chronojump.cs     |   11 ++-
 src/gui/error.cs          |  144 +---------------------
 src/gui/sendLog.cs        |  104 +++++++++++++++
 src/gui/splash.cs         |   59 +++++++++-
 src/json.cs               |    5 +-
 11 files changed, 542 insertions(+), 469 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index f77bfcb..74d5ada 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1348,6 +1348,12 @@
                                                             <placeholder/>
                                                             </child>
                                                             <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkLabel" 
id="label_start_selector_jumps">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -20975,6 +20981,12 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -22061,6 +22073,298 @@ Evaluator can use real name or nickname.</property>
                 <property name="type">tab</property>
               </packing>
             </child>
+            <child>
+              <widget class="GtkVBox" id="vbox86">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">30</property>
+                <property name="spacing">20</property>
+                <child>
+                  <widget class="GtkLabel" id="label_send_log">
+                    <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="hbox_send_log">
+                    <property name="can_focus">False</property>
+                    <property name="border_width">4</property>
+                    <child>
+                      <widget class="GtkFrame" id="frame3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">out</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox106">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">8</property>
+                            <property name="spacing">10</property>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox215">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">10</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label93">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Your email</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkEntry" id="entry_send_log">
+                                    <property name="width_request">200</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="invisible_char">●</property>
+                                    <property name="invisible_char_set">True</property>
+                                    <property name="primary_icon_activatable">False</property>
+                                    <property name="secondary_icon_activatable">False</property>
+                                    <property name="primary_icon_sensitive">True</property>
+                                    <property name="secondary_icon_sensitive">True</property>
+                                  </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">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox107">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">4</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label98">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Add comments</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkScrolledWindow" id="scrolledwindow6">
+                                    <property name="height_request">55</property>
+                                    <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>
+                                      <widget class="GtkTextView" id="textview_comments">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                      </widget>
+                                    </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">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox217">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <widget class="GtkButton" id="button_send_log">
+                                    <property name="label" translatable="yes">Send error log</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="can_default">True</property>
+                                    <property name="receives_default">False</property>
+                                    <signal name="clicked" handler="on_button_send_log_clicked" 
swapped="no"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkButton" id="button_check_last_version">
+                                    <property name="label" translatable="yes">Check last version</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="can_default">True</property>
+                                    <property name="receives_default">False</property>
+                                    <signal name="clicked" handler="on_button_check_last_version_clicked" 
swapped="no"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox218">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">8</property>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox228">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">8</property>
+                                    <child>
+                                      <widget class="GtkImage" id="image_send_log_no">
+                                        <property name="can_focus">False</property>
+                                        <property name="stock">gtk-no</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_send_log_yes">
+                                        <property name="can_focus">False</property>
+                                        <property name="stock">gtk-yes</property>
+                                      </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">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label_send_log_message">
+                                    <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">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">4</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <placeholder/>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</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="GtkHButtonBox" id="hbuttonbox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <widget class="GtkButton" id="button_open_chronojump">
+                        <property name="label">Open Chronojump</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="has_tooltip">True</property>
+                        <signal name="clicked" handler="on_button_open_chronojump_clicked" swapped="no"/>
+                        <accelerator key="Escape" signal="clicked"/>
+                      </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>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="padding">20</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="sendLog">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label">send log</property>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
diff --git a/glade/error_window.glade b/glade/error_window.glade
index 509882f..84ec00a 100644
--- a/glade/error_window.glade
+++ b/glade/error_window.glade
@@ -28,306 +28,11 @@
           </packing>
         </child>
         <child>
-          <widget class="GtkHBox" id="hbox_send_log">
-            <property name="can_focus">False</property>
-            <property name="border_width">4</property>
-            <child>
-              <widget class="GtkFrame" id="frame1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">out</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="border_width">8</property>
-                    <property name="spacing">10</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">10</property>
-                        <child>
-                          <widget class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Your email</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="entry_send_log">
-                            <property name="width_request">200</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">●</property>
-                            <property name="primary_icon_activatable">False</property>
-                            <property name="secondary_icon_activatable">False</property>
-                            <property name="primary_icon_sensitive">True</property>
-                            <property name="secondary_icon_sensitive">True</property>
-                          </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="vbox2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">4</property>
-                        <child>
-                          <widget class="GtkLabel" id="label2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Add comments</property>
-                          </widget>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow3">
-                            <property name="height_request">55</property>
-                            <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="GtkTextView" id="textview_comments">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                              </widget>
-                            </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">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">12</property>
-                        <child>
-                          <widget class="GtkButton" id="button_send_log">
-                            <property name="label" translatable="yes">Send error log</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="receives_default">False</property>
-                            <signal name="clicked" handler="on_button_send_log_clicked" swapped="no"/>
-                          </widget>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="button_check_last_version">
-                            <property name="label" translatable="yes">Check last version</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="can_default">True</property>
-                            <property name="receives_default">False</property>
-                            <signal name="clicked" handler="on_button_check_last_version_clicked" 
swapped="no"/>
-                          </widget>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</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="GtkHBox" id="hbox4">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">8</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">8</property>
-                            <child>
-                              <widget class="GtkImage" id="image_send_log_no">
-                                <property name="can_focus">False</property>
-                                <property name="stock">gtk-no</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_send_log_yes">
-                                <property name="can_focus">False</property>
-                                <property name="stock">gtk-yes</property>
-                              </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">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label_send_log_message">
-                            <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">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <placeholder/>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
           <widget class="GtkHButtonBox" id="hbuttonbox13">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">spread</property>
             <child>
-              <widget class="GtkButton" id="button_abort">
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <signal name="clicked" handler="on_button_abort_clicked" swapped="no"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox5">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <widget class="GtkImage" id="image1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="stock">gtk-quit</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="label4">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Abort</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>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button_open_database_folder">
-                <property name="label">Open database folder</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <signal name="clicked" handler="on_button_open_database_folder_clicked" swapped="no"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button_open_docs_folder">
-                <property name="label">Open docs folder</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <signal name="clicked" handler="on_button_open_docs_folder_clicked" swapped="no"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
               <widget class="GtkButton" id="button_accept">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -341,14 +46,14 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">3</property>
+                <property name="position">0</property>
               </packing>
             </child>
           </widget>
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
-            <property name="position">2</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </widget>
diff --git a/glade/splash_window.glade b/glade/splash_window.glade
index b8b9482..bb29240 100644
--- a/glade/splash_window.glade
+++ b/glade/splash_window.glade
@@ -43,7 +43,6 @@
                 <child>
                   <widget class="GtkLabel" id="myLabel">
                     <property name="visible">True</property>
-                    <property name="sensitive">False</property>
                     <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Loading Chronojump...</property>
@@ -58,6 +57,46 @@
                   <widget class="GtkHBox" id="hbox1">
                     <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="pack_type">end</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHButtonBox" id="hbuttonbox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <widget class="GtkButton" id="button_open_database_folder">
+                        <property name="label">Open database folder</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="receives_default">False</property>
+                        <signal name="clicked" handler="on_button_open_database_folder_clicked" 
swapped="no"/>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="button_open_docs_folder">
+                        <property name="label">Open docs folder</property>
+                        <property name="can_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="receives_default">False</property>
+                        <signal name="clicked" handler="on_button_open_docs_folder_clicked" swapped="no"/>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
                     <child>
                       <widget class="GtkButton" id="button_close">
                         <property name="label">gtk-close</property>
@@ -72,15 +111,14 @@
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="pack_type">end</property>
-                        <property name="position">0</property>
+                        <property name="position">2</property>
                       </packing>
                     </child>
                   </widget>
                   <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="pack_type">end</property>
-                    <property name="position">1</property>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </widget>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c282ee1..5c9752c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -72,7 +72,6 @@ src/gui/encoder.cs
 src/gui/encoderOverview.cs
 src/gui/encoderSelectRepetitions.cs
 src/gui/encoderTreeviews.cs
-src/gui/error.cs
 src/gui/evaluator.cs
 src/gui/event.cs
 src/gui/eventExecute.cs
@@ -94,6 +93,7 @@ src/gui/run.cs
 src/gui/runType.cs
 src/gui/server.cs
 src/gui/session.cs
+src/gui/splash.cs
 src/gui/sprint.cs
 src/gui/stats.cs
 src/executeProcess.cs
diff --git a/src/Makefile.am b/src/Makefile.am
index 639fd9c..7521d10 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,6 +34,7 @@ SOURCES = \
        gui/person.cs\
        gui/personSelect.cs\
        gui/preferences.cs\
+       gui/sendLog.cs\
        gui/session.cs\
        gui/stats.cs\
        gui/presentation.cs\
diff --git a/src/chronojump.cs b/src/chronojump.cs
index f458cae..f8bf0e9 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -499,34 +499,29 @@ public class ChronoJump
                //don't show error message at start if Compujump
                if(messageToShowOnBoot.Length > 0 && ! configChronojump.Compujump)
                {
-                       ErrorWindow errorWin;
                        if(chronojumpHasToExit)
                        {
                                if(quitNowCjTwoTimes) {
                                        splashWin.UpdateLabel(messageToShowOnBoot);
                                        splashWin.FakeButtonClose.Clicked += new 
EventHandler(on_message_boot_accepted_quit_not_deleting_runningfilename);
-                                       splashWin.ShowButtonClose();
                                } else {
                                        messageToShowOnBoot += "\n<b>" + 
string.Format(Catalog.GetString("Chronojump will exit now.")) + "</b>\n";
-
-                                       errorWin = ErrorWindow.Show(messageToShowOnBoot);
-                                       errorWin.Show_button_open_database_folder();
-                                       errorWin.Button_accept.Clicked += new 
EventHandler(on_message_boot_accepted_quit_nice);
+                                       splashWin.UpdateLabel(messageToShowOnBoot);
+                                       splashWin.Show_button_open_database_folder();
+                                       splashWin.Button_close.Clicked += new 
EventHandler(on_message_boot_accepted_quit_nice);
                                }
-                       } else { 
-                               errorWin = ErrorWindow.Show(messageToShowOnBoot);
-                               errorWin.Show_send_log();
-                               errorWin.ProgVersion = progVersion;
-                               errorWin.Button_accept_label(Catalog.GetString("Open Chronojump"));
-                               errorWin.Button_accept.Clicked += new 
EventHandler(on_message_boot_accepted_continue);
+                               splashWin.ShowButtonClose();
+                       } else {
+                               startChronojump(true); //sendLog
                        }
                } else {
-                       startChronojump();
+                       startChronojump(false);
                }
        }
 
-       private void on_message_boot_accepted_continue (object o, EventArgs args) {
-               startChronojump();
+       private void on_message_boot_accepted_continue (object o, EventArgs args)
+       {
+               startChronojump(false);
        }
 
        private void on_message_boot_accepted_quit_nice (object o, EventArgs args)
@@ -561,7 +556,7 @@ public class ChronoJump
        }
 
 
-       private void startChronojump() {
+       private void startChronojump(bool sendLog) {
 
                //wait until all sql calls are done in other thread
                //then there will be no more a try to open an already opened dbcon
@@ -570,7 +565,10 @@ public class ChronoJump
                }
                LogB.SQL("all SQL done! starting Chronojump");
 
-               new ChronoJumpWindow(progVersion, progName, runningFileName, splashWin);
+               if(sendLog)
+                       new ChronoJumpWindow(progVersion, progName, runningFileName, splashWin, true, 
messageToShowOnBoot);
+               else
+                       new ChronoJumpWindow(progVersion, progName, runningFileName, splashWin, false, "");
        }
 
        private static void createBlankDB() {
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 9b4391e..019bd3b 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -509,7 +509,8 @@ public partial class ChronoJumpWindow
        }
        
        
-       public ChronoJumpWindow(string progVersion, string progName, string runningFileName, SplashWindow 
splashWin)
+       public ChronoJumpWindow(string progVersion, string progName, string runningFileName, SplashWindow 
splashWin,
+                       bool showSendLog, string sendLogMessage)
        {
                this.progVersion = progVersion;
                this.progName = progName;
@@ -528,8 +529,12 @@ public partial class ChronoJumpWindow
                //white bg
                eventbox_image_test.ModifyBg(StateType.Normal, UtilGtk.WHITE);
        
-               //start with the Mode selector  
-               notebook_start.CurrentPage = 0;
+               if(! showSendLog)
+                       notebook_start.CurrentPage = 0; //start with the Mode selector
+               else {
+                       show_send_log(sendLogMessage);
+                       notebook_start.CurrentPage = 2; //send log
+               }
 
                //new DialogMessage(Constants.MessageTypes.INFO, UtilGtk.ScreenHeightFitted(false).ToString() 
);
                //UtilGtk.ResizeIfNeeded(stats_window);
diff --git a/src/gui/error.cs b/src/gui/error.cs
index 3d5b5d6..53df3bf 100644
--- a/src/gui/error.cs
+++ b/src/gui/error.cs
@@ -19,34 +19,21 @@
  */
 
 using System;
-using System.IO;
 using Gtk;
 using Glade;
 //using Gnome;
 using GLib; //for Value
 using System.Text; //StringBuilder
 using System.Collections; //ArrayList
-using Mono.Unix;
 
 public class ErrorWindow
 {
        [Widget] Gtk.Window error_window;
        [Widget] Gtk.Label label1;
-       [Widget] Gtk.Button button_abort; //used only when there are problems because USB has been removed on 
the middle of the test
        [Widget] Gtk.Button button_accept;
-       [Widget] Gtk.Box hbox_send_log;
-       [Widget] Gtk.Button button_open_database_folder;
-       [Widget] Gtk.Button button_open_docs_folder;
-       [Widget] Gtk.Image image_send_log_no;
-       [Widget] Gtk.Image image_send_log_yes;
-       [Widget] Gtk.Entry entry_send_log;
-       [Widget] Gtk.TextView textview_comments;
-       [Widget] Gtk.Button button_send_log;
-       [Widget] Gtk.Label label_send_log_message;
        
 
        static ErrorWindow ErrorWindowBox;
-       string progVersion = "";
        
        public ErrorWindow (string text1)
        {
@@ -69,10 +56,6 @@ public class ErrorWindow
                        ErrorWindowBox = new ErrorWindow(text1);
                }
                
-               //hidden always excepted when called to be shown (see below)
-               ErrorWindowBox.hbox_send_log.Hide();
-               ErrorWindowBox.button_open_database_folder.Hide();
-
                ErrorWindowBox.error_window.Show();
                
                return ErrorWindowBox;
@@ -89,119 +72,8 @@ public class ErrorWindow
                button_accept.Click();
        }
 
-       string emailStored;
-       public void Show_send_log() 
-       {
-               emailStored = SqlitePreferences.Select("email");
-               if(emailStored != null && emailStored != "" && emailStored != "0")
-                       entry_send_log.Text = emailStored;
-               
-               hbox_send_log.Show();
-               
-               //button_send_log.Label = "Disabled";
-               //button_send_log.Sensitive = false;
-       }
-       private void on_button_send_log_clicked (object o, EventArgs args)
-       {
-               string email = entry_send_log.Text.ToString();
-               //email can be validated with Util.IsValidEmail(string)
-               //or other methods, but maybe there's no need of complexity now 
-
-               //1st save email on sqlite
-               if(email != null && email != "" && email != "0" && email != emailStored)
-                       SqlitePreferences.Update("email", email, false);
-
-               //2nd if there are comments, add them at the beginning of the file
-               string comments = textview_comments.Buffer.Text;
-               
-               //2nd send Json
-               Json js = new Json();
-               bool success = js.PostCrashLog(email, comments);
-               
-               if(success) {
-                       button_send_log.Label = Catalog.GetString("Thanks");
-                       button_send_log.Sensitive = false;
-
-                       image_send_log_yes.Show();
-                       image_send_log_no.Hide();
-                       LogB.Information(js.ResultMessage);
-               } else {
-                       button_send_log.Label = Catalog.GetString("Try again");
-                       
-                       image_send_log_yes.Hide();
-                       image_send_log_no.Show();
-                       LogB.Error(js.ResultMessage);
-               }
-
-               label_send_log_message.Text = js.ResultMessage;
-       }
-       
-       private void on_button_check_last_version_clicked (object o, EventArgs args)
-       {
-               Json js = new Json();
-               bool success = js.GetLastVersion(progVersion);
-
-               if(success) {
-                       LogB.Information(js.ResultMessage);
-                       new DialogMessage(
-                                       "Chronojump",
-                                       Constants.MessageTypes.INFO, 
-                                       js.ResultMessage
-                                       );
-               }
-               else {
-                       LogB.Error(js.ResultMessage);
-                       new DialogMessage(
-                                       "Chronojump",
-                                       Constants.MessageTypes.WARNING, 
-                                       js.ResultMessage);
-               }
-       }
-
-       public void Show_button_open_database_folder () {
-               button_open_database_folder.Show();
-       }
-       private void on_button_open_database_folder_clicked (object o, EventArgs args)
-       {
-               string database_url = Util.GetDatabaseDir() + System.IO.Path.DirectorySeparatorChar  + 
"chronojump.db";
-               string database_temp_url = Util.GetDatabaseTempDir() + System.IO.Path.DirectorySeparatorChar  
+ "chronojump.db";
-               
-               System.IO.FileInfo file1 = new System.IO.FileInfo(database_url); //potser cal una arrobar 
abans (a windows)
-               System.IO.FileInfo file2 = new System.IO.FileInfo(database_temp_url); //potser cal una 
arrobar abans (a windows)
-
-               if(file1.Exists)
-                       System.Diagnostics.Process.Start(Util.GetDatabaseDir()); 
-               else if(file2.Exists)
-                       System.Diagnostics.Process.Start(Util.GetDatabaseTempDir()); 
-               else
-                       new DialogMessage(Constants.MessageTypes.WARNING, Constants.DatabaseNotFound);
-       }
-
-       public void Show_button_open_docs_folder () {
-               button_open_docs_folder.Show();
-       }
-       private void on_button_open_docs_folder_clicked (object o, EventArgs args)
-       {
-               LogB.Information("Opening docs at: " + Path.GetFullPath(Util.GetManualDir())); 
-               try {
-                       System.Diagnostics.Process.Start(Path.GetFullPath(Util.GetManualDir())); 
-               } catch {
-                       new DialogMessage(Constants.MessageTypes.WARNING, 
-                                       "Sorry, folder does not exist." + "\n\n" +
-                                       Path.GetFullPath(Util.GetManualDir())
-                                       );
-               }
-       }
-       
-       public void Show_button_abort () {
-               button_abort.Show();
-       }
-       private void on_button_abort_clicked (object o, EventArgs args) {
-
-       }
-
-       public void Button_accept_label (string str) {
-               button_accept.Label = str;
+       public Button Button_accept {
+               get { return button_accept; }
        }
 
        protected void on_button_accept_clicked (object o, EventArgs args)
@@ -210,18 +82,6 @@ public class ErrorWindow
                ErrorWindowBox = null;
        }
 
-       public Button Button_accept {
-               get { return button_accept; }
-       }       
-
-       public Button Button_abort {
-               get { return button_abort; }
-       } 
-
-       public string ProgVersion {
-               set { progVersion = value; }
-       }
-       
        public void HideAndNull() {
                if(ErrorWindowBox != null) {
                        ErrorWindowBox.error_window.Hide();
diff --git a/src/gui/sendLog.cs b/src/gui/sendLog.cs
new file mode 100644
index 0000000..3bb46e9
--- /dev/null
+++ b/src/gui/sendLog.cs
@@ -0,0 +1,104 @@
+/*
+ * This file is part of ChronoJump
+ *
+ * ChronoJump is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or   
+ *    (at your option) any later version.
+ *    
+ * ChronoJump is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+ *    GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Copyright (C) 2017   Xavier de Blas <xaviblas gmail com> 
+ */
+
+using System;
+using System.IO;
+using Gtk;
+using Gdk;
+using Glade;
+using Mono.Unix;
+
+public partial class ChronoJumpWindow
+{
+       [Widget] Gtk.Box hbox_send_log;
+       [Widget] Gtk.Label label_send_log;
+       [Widget] Gtk.Image image_send_log_no;
+       [Widget] Gtk.Image image_send_log_yes;
+       [Widget] Gtk.Entry entry_send_log;
+       [Widget] Gtk.TextView textview_comments;
+       [Widget] Gtk.Button button_send_log;
+       [Widget] Gtk.Label label_send_log_message;
+
+       string emailStored;
+       private void show_send_log(string sendLogMessage) 
+       {
+               label_send_log.Text = sendLogMessage;
+               emailStored = SqlitePreferences.Select("email");
+               if(emailStored != null && emailStored != "" && emailStored != "0")
+                       entry_send_log.Text = emailStored;
+               
+               hbox_send_log.Show();
+       }
+
+       private void on_button_send_log_clicked (object o, EventArgs args)
+       {
+               string email = entry_send_log.Text.ToString();
+               //email can be validated with Util.IsValidEmail(string)
+               //or other methods, but maybe there's no need of complexity now 
+
+               //1st save email on sqlite
+               if(email != null && email != "" && email != "0" && email != emailStored)
+                       SqlitePreferences.Update("email", email, false);
+
+               //2nd if there are comments, add them at the beginning of the file
+               string comments = textview_comments.Buffer.Text;
+               
+               //2nd send Json
+               Json js = new Json();
+               bool success = js.PostCrashLog(email, comments);
+               
+               if(success) {
+                       button_send_log.Label = Catalog.GetString("Thanks");
+                       button_send_log.Sensitive = false;
+
+                       image_send_log_yes.Show();
+                       image_send_log_no.Hide();
+                       LogB.Information(js.ResultMessage);
+               } else {
+                       button_send_log.Label = Catalog.GetString("Try again");
+                       
+                       image_send_log_yes.Hide();
+                       image_send_log_no.Show();
+                       LogB.Error(js.ResultMessage);
+               }
+
+               label_send_log_message.Text = js.ResultMessage;
+       }
+
+       private void on_button_check_last_version_clicked (object o, EventArgs args)
+       {
+               Json js = new Json();
+               bool success = js.GetLastVersion(progVersion);
+
+               if(success) {
+                       LogB.Information(js.ResultMessage);
+                       label_send_log_message.Text = js.ResultMessage;
+               }
+               else {
+                       LogB.Error(js.ResultMessage);
+                       label_send_log_message.Text = js.ResultMessage;
+               }
+       }
+
+       private void on_button_open_chronojump_clicked(object o, EventArgs args)
+       {
+               notebook_start.CurrentPage = 0;
+       }
+}
diff --git a/src/gui/splash.cs b/src/gui/splash.cs
index ccb993a..f3eab8e 100644
--- a/src/gui/splash.cs
+++ b/src/gui/splash.cs
@@ -19,9 +19,11 @@
  */
 
 using System;
+using System.IO;
 using Gtk;
 using Gdk;
 using Glade;
+using Mono.Unix;
 
 public class SplashWindow
 {
@@ -33,8 +35,12 @@ public class SplashWindow
        [Widget] Gtk.Label myLabel;
        [Widget] Gtk.Button button_close;
 
+       [Widget] Gtk.Button button_open_database_folder;
+       [Widget] Gtk.Button button_open_docs_folder;
+
        [Widget] Gtk.Button fakeButtonClose;
        public bool FakeButtonCreated = false;
+       string progVersion = "";
        
        static SplashWindow SplashWindowBox;
 
@@ -52,12 +58,16 @@ public class SplashWindow
 
                hideAllProgressbars();
 
+               //hidden always excepted when called to be shown (see below)
+               button_open_database_folder.Hide();
+               button_open_docs_folder.Hide();
+
                //put logo image
                Pixbuf pixbuf;
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameLogo320);
                image_logo.Pixbuf = pixbuf;
        }
-       
+
        static public SplashWindow Show ()
        {
                if (SplashWindowBox == null) {
@@ -104,11 +114,50 @@ public class SplashWindow
                myLabel.Text = text;
        }
 
+       public void Show_button_open_database_folder () {
+               button_open_database_folder.Show();
+       }
+       private void on_button_open_database_folder_clicked (object o, EventArgs args)
+       {
+               string database_url = Util.GetDatabaseDir() + System.IO.Path.DirectorySeparatorChar  + 
"chronojump.db";
+               string database_temp_url = Util.GetDatabaseTempDir() + System.IO.Path.DirectorySeparatorChar  
+ "chronojump.db";
+
+               System.IO.FileInfo file1 = new System.IO.FileInfo(database_url); //potser cal una arrobar 
abans (a windows)
+               System.IO.FileInfo file2 = new System.IO.FileInfo(database_temp_url); //potser cal una 
arrobar abans (a windows)
+
+               if(file1.Exists)
+                       System.Diagnostics.Process.Start(Util.GetDatabaseDir());
+               else if(file2.Exists)
+                       System.Diagnostics.Process.Start(Util.GetDatabaseTempDir());
+               else
+                       new DialogMessage(Constants.MessageTypes.WARNING, Constants.DatabaseNotFound);
+       }
+
+       public void Show_button_open_docs_folder () {
+               button_open_docs_folder.Show();
+       }
+       private void on_button_open_docs_folder_clicked (object o, EventArgs args)
+       {
+               LogB.Information("Opening docs at: " + Path.GetFullPath(Util.GetManualDir()));
+               try {
+                       System.Diagnostics.Process.Start(Path.GetFullPath(Util.GetManualDir()));
+               } catch {
+                       new DialogMessage(Constants.MessageTypes.WARNING,
+                                       "Sorry, folder does not exist." + "\n\n" +
+                                       Path.GetFullPath(Util.GetManualDir())
+                                       );
+               }
+       }
+
        public void ShowButtonClose()
        {
                button_close.Show();
        }
 
+       public void Button_close_label (string str) {
+               button_close.Label = str;
+       }
+
        protected void on_button_close_clicked (object o, EventArgs args)
        {
                fakeButtonClose.Click();
@@ -144,10 +193,18 @@ public class SplashWindow
                LogB.Debug("splash_window hide end");
        }
 
+       public string ProgVersion {
+               set { progVersion = value; }
+       }
+
        private void on_delete_event (object o, DeleteEventArgs args) {
                splash_window.Destroy ();
        }
 
+       public Button Button_close {
+               get { return button_close; }
+       }
+
        public Button FakeButtonClose
        {
                set { fakeButtonClose = value; }
diff --git a/src/json.cs b/src/json.cs
index fd3c4cd..fccf110 100644
--- a/src/json.cs
+++ b/src/json.cs
@@ -183,8 +183,9 @@ public class Json
                        
                this.ResultMessage =            
                        Catalog.GetString("Installed version is: ") + currentVersion + "\n" + 
-                       Catalog.GetString("Last version published: ") + lastVersionPublished +
-                       updateStr;
+                       Catalog.GetString("Last version published: ") + lastVersionPublished;
+                       // + updateStr;
+                       //TODO: add updateStr again when resolved that a experimental 1.7.0-xxx is more 
advanced than a stable 1.7.0
                
                //ChronojumpUpdated = (currentVersion == ResultMessage);
 


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