blam r565 - in trunk: . src



Author: cmartin
Date: Fri Apr 25 17:07:51 2008
New Revision: 565
URL: http://svn.gnome.org/viewvc/blam?rev=565&view=rev

Log:
Add option to refresh feeds on startup (#344853).

Add the GtkCheckButton to the preferences dialog and act
on it at startup.


Modified:
   trunk/ChangeLog
   trunk/src/Application.cs
   trunk/src/PreferencesDialog.cs
   trunk/src/blam.glade

Modified: trunk/src/Application.cs
==============================================================================
--- trunk/src/Application.cs	(original)
+++ trunk/src/Application.cs	Fri Apr 25 17:07:51 2008
@@ -158,6 +158,10 @@
             GLib.Idle.Add (new GLib.IdleHandler (IdleRefreshAll));
 
             SetupDBus ();
+
+            if(Conf.Get(Preference.REFRESH_AT_START, false) == true){
+                mCollection.RefreshAll();
+            }
         }
 
         private void PrepareGUI()

Modified: trunk/src/PreferencesDialog.cs
==============================================================================
--- trunk/src/PreferencesDialog.cs	(original)
+++ trunk/src/PreferencesDialog.cs	Fri Apr 25 17:07:51 2008
@@ -14,6 +14,7 @@
 namespace Imendio.Blam {
     public class Preference {
         public static string REVERSE_ENTRIES   = "behaviour/reverse_entries";
+        public static string REFRESH_AT_START  = "behaviour/refresh_at_start";
         public static string AUTO_REFRESH      = "behaviour/auto_refresh";
         public static string AUTO_REFRESH_RATE = "behaviour/auto_refresh_rate";
         public static string IGNORE_SSL_ERR    = "behaviour/ignore_ssl_err";
@@ -32,6 +33,7 @@
         [Widget] Gtk.CheckButton reverseEntriesCheckButton = null;
         [Widget] Gtk.CheckButton autoRefreshCheckButton    = null;
         [Widget] Gtk.CheckButton ignoreSSLErr              = null;
+        [Widget] Gtk.CheckButton RefreshOnStartup          = null;
         [Widget] Gtk.SpinButton  refreshRateSpinButton     = null;
         [Widget] Gtk.Label       boldThemeLabel            = null;
         [Widget] Gtk.ComboBox    themeComboBox             = null;
@@ -116,6 +118,11 @@
 		               (bool) ignoreSSLErr.Active);
 		}
 
+        public void RefreshOnStartupToggled(object o, EventArgs args)
+        {
+            Conf.Set(Preference.REFRESH_AT_START, (bool)RefreshOnStartup.Active);
+        }
+
 		public void ThemeSelectionChanged (object obj, EventArgs args)
 		{
 			Gtk.ComboBox box = obj as Gtk.ComboBox;

Modified: trunk/src/blam.glade
==============================================================================
--- trunk/src/blam.glade	(original)
+++ trunk/src/blam.glade	Fri Apr 25 17:07:51 2008
@@ -1069,6 +1069,37 @@
                   </packing>
                 </child>
                 <child>
+                  <widget class="GtkHBox" id="hbox4">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">    </property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="RefreshOnStartup">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Refresh feeds on startup</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                        <signal name="toggled" handler="RefreshOnStartupToggled"/>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">4</property>
+                  </packing>
+                </child>
+                <child>
                   <widget class="GtkLabel" id="boldThemeLabel">
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
@@ -1079,7 +1110,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="position">4</property>
+                    <property name="position">5</property>
                   </packing>
                 </child>
                 <child>
@@ -1109,7 +1140,7 @@
                     </child>
                   </widget>
                   <packing>
-                    <property name="position">5</property>
+                    <property name="position">6</property>
                   </packing>
                 </child>
                 <child>
@@ -1152,7 +1183,7 @@
                     </child>
                   </widget>
                   <packing>
-                    <property name="position">6</property>
+                    <property name="position">7</property>
                   </packing>
                 </child>
               </widget>



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