[chronojump] Added preferences button on top right of encoder when menu is hidden



commit f737a0042df881510c97b1e4fa28f9d495e65a99
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jul 9 17:10:18 2015 +0200

    Added preferences button on top right of encoder when menu is hidden

 chronojump_config.txt  |    4 +-
 glade/chronojump.glade |  168 +++++++++++++++++++++++++++++++++++++-----------
 src/gui/networks.cs    |    4 +
 3 files changed, 136 insertions(+), 40 deletions(-)
---
diff --git a/chronojump_config.txt b/chronojump_config.txt
index 91a7c32..749eef8 100644
--- a/chronojump_config.txt
+++ b/chronojump_config.txt
@@ -58,9 +58,9 @@ EncoderConfiguration=ROTARYAXISINERTIAL:4:-1:-1:-1:42:1:71:2:300:7
 
 #Session modes:
 #STANDARD: default mode where sessions are created by user
-#UNIQUE: there's only one session called "session". Menubar is hidden (use it only with OnlyEncoder = TRUE)
+#UNIQUE: there's only one session called "session". Menubar is hidden (use it only with OnlyEncoder = TRUE). 
To access preferences, a preferences button is shown in topleft
 #default: SessionMode=STANDARD
-SessionMode=UNIQUE
+#SessionMode=UNIQUE
 
 #To sync data
 RunScriptOnExit=
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index dc05d09..a8a999e 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -7542,6 +7542,9 @@ after time</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             <child>
@@ -8896,6 +8899,9 @@ after time</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">2</property>
@@ -9891,6 +9897,9 @@ after time</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">4</property>
@@ -13952,6 +13961,70 @@ on current Chronojump version.</property>
                                               </packing>
                                             </child>
                                             <child>
+                                              <widget class="GtkButton" id="button_preferences_not_menu">
+                                                <property name="width_request">50</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="can_default">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="has_tooltip">True</property>
+                                                <property name="tooltip" 
translatable="yes">Preferences</property>
+                                                <property name="relief">half</property>
+                                                <signal name="clicked" handler="on_preferences_activate" 
swapped="no"/>
+                                                <child>
+                                                  <widget class="GtkImage" id="image64">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="stock">gtk-preferences</property>
+                                                    <property name="icon-size">2</property>
+                                                  </widget>
+                                                </child>
+                                              </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="GtkHBox" id="hbox_encoder_person">
+                                                <property name="can_focus">False</property>
+                                                <property name="spacing">20</property>
+                                                <child>
+                                                  <widget class="GtkLabel" id="label_encoder_person_name">
+                                                    <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="GtkButton" 
id="button_encoder_person_change">
+                                                    <property name="label" 
translatable="yes">Change</property>
+                                                    <property name="width_request">80</property>
+                                                    <property name="height_request">40</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="receives_default">True</property>
+                                                    <signal name="clicked" 
handler="on_button_encoder_person_change_clicked" swapped="no"/>
+                                                  </widget>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">False</property>
+                                                    <property name="position">1</property>
+                                                  </packing>
+                                                </child>
+                                              </widget>
+                                              <packing>
+                                                <property name="expand">True</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">2</property>
+                                              </packing>
+                                            </child>
+                                            <child>
                                               <widget class="GtkHBox" id="hbox">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
@@ -14120,44 +14193,6 @@ on current Chronojump version.</property>
                                                 <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="GtkHBox" id="hbox_encoder_person">
-                                                <property name="can_focus">False</property>
-                                                <property name="spacing">20</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label_encoder_person_name">
-                                                    <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="GtkButton" 
id="button_encoder_person_change">
-                                                    <property name="label" 
translatable="yes">Change</property>
-                                                    <property name="width_request">80</property>
-                                                    <property name="height_request">40</property>
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="receives_default">True</property>
-                                                    <signal name="clicked" 
handler="on_button_encoder_person_change_clicked" swapped="no"/>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">1</property>
-                                                  </packing>
-                                                </child>
-                                              </widget>
-                                              <packing>
-                                                <property name="expand">True</property>
-                                                <property name="fill">False</property>
                                                 <property name="position">2</property>
                                               </packing>
                                             </child>
@@ -21294,6 +21329,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -22188,6 +22226,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -23574,6 +23615,9 @@ by you</property>
               <placeholder/>
             </child>
             <child>
+              <placeholder/>
+            </child>
+            <child>
               <widget class="GtkButton" id="button_video_url">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -24017,6 +24061,9 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -35259,6 +35306,24 @@ options</property>
                             <child>
                               <placeholder/>
                             </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -36798,6 +36863,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -38156,6 +38233,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                 <child>
                                   <placeholder/>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                             </child>
                           </widget>
@@ -39088,6 +39168,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -42478,6 +42561,9 @@ It starts before and arrives there with some speed.</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -43036,6 +43122,9 @@ It starts before and arrives there with some speed.</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -43609,6 +43698,9 @@ It starts before and arrives there with some speed.</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index c596240..d60496e 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -43,6 +43,9 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Box hbox_encoder_person;
        [Widget] Gtk.Label label_encoder_person_name;
        [Widget] Gtk.Button button_encoder_person_change;
+       
+       //shown when menu is hidden
+       [Widget] Gtk.Button button_preferences_not_menu;
 
 
        private bool useVideo = true;
@@ -95,6 +98,7 @@ public partial class ChronoJumpWindow
                if(config.SessionMode == Config.SessionModeEnum.UNIQUE) 
                {
                        main_menu.Visible = false;
+                       button_preferences_not_menu.Visible = true;
 
                        if(! Sqlite.Exists(false, Constants.SessionTable, "session")) {
                                //this creates the session and inserts at DB


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