[chronojump] PreferencesWin with AnimatedLogo checkbox



commit 08a02a3a5d5ba1d4cdf115475f05b4979744afcf
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Apr 3 12:18:49 2020 +0200

    PreferencesWin with AnimatedLogo checkbox

 glade/preferences_win.glade | 16 +++++++++++++++-
 src/gui/preferences.cs      | 10 ++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index a58c9daa..18fab32d 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -670,6 +670,20 @@
                     <property name="position">1</property>
                   </packing>
                 </child>
+                <child>
+                  <widget class="GtkCheckButton" id="check_logo_animated">
+                    <property name="label" translatable="yes">Show animated logo</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
                 <child>
                   <widget class="GtkHButtonBox" id="hbuttonbox1">
                     <property name="can_focus">False</property>
@@ -692,7 +706,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">2</property>
+                    <property name="position">3</property>
                   </packing>
                 </child>
               </widget>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index b6e94a04..55d600d4 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -72,6 +72,7 @@ public class PreferencesWindow
        [Widget] Gtk.Alignment alignment_undecorated;
        [Widget] Gtk.Label label_recommended_undecorated;
        [Widget] Gtk.DrawingArea drawingarea_background_color;
+       [Widget] Gtk.CheckButton check_logo_animated;
 
        //database tab
        [Widget] Gtk.Button button_data_folder_open;
@@ -384,6 +385,11 @@ public class PreferencesWindow
                PreferencesWindowBox.colorBackground = UtilGtk.ColorParse(preferences.colorBackgroundString);
                PreferencesWindowBox.paintColorDrawingArea(PreferencesWindowBox.colorBackground);
 
+               if(preferences.logoAnimatedShow)
+                       PreferencesWindowBox.check_logo_animated.Active = true;
+               else
+                       PreferencesWindowBox.check_logo_animated.Active = false;
+
                //multimedia tab
                if(preferences.volumeOn)  
                        PreferencesWindowBox.checkbutton_volume.Active = true; 
@@ -1883,6 +1889,10 @@ public class PreferencesWindow
                                SqlitePreferences.ColorBackground, preferences.colorBackgroundString,
                                UtilGtk.ColorToColorString(colorBackground)); //this does the reverse of 
Gdk.Color.Parse on UtilGtk.ColorParse()
 
+               preferences.logoAnimatedShow = Preferences.PreferencesChange(
+                               SqlitePreferences.LogoAnimatedShow, preferences.logoAnimatedShow,
+                               PreferencesWindowBox.check_logo_animated.Active);
+
                if( preferences.digitsNumber != Convert.ToInt32(UtilGtk.ComboGetActive(combo_decimals)) ) {
                        SqlitePreferences.Update("digitsNumber", UtilGtk.ComboGetActive(combo_decimals), 
true);
                        preferences.digitsNumber = Convert.ToInt32(UtilGtk.ComboGetActive(combo_decimals));


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