dasher r3690 - in trunk: . Data/glade Src/DasherCore Src/Gtk2



Author: pwelche
Date: Sat Apr 11 22:58:39 2009
New Revision: 3690
URL: http://svn.gnome.org/viewvc/dasher?rev=3690&view=rev

Log:
The speed spin button on the main screen now changes and is in synch
with the value in preferences. (First part of #575730)
Note that libglade does a s/-/_/ on names, so it doesn't actually matter
whether we call the signal value-changed or value_changed.



Modified:
   trunk/ChangeLog
   trunk/Data/glade/dasher.compose.glade
   trunk/Data/glade/dasher.direct.glade
   trunk/Data/glade/dasher.gameWIP.glade
   trunk/Data/glade/dasher.preferences.glade
   trunk/Data/glade/dasher.traditional.glade
   trunk/Data/glade/dashermaemo.preferences.glade
   trunk/NEWS
   trunk/Src/DasherCore/GnomeSettingsStore.h
   trunk/Src/DasherCore/Parameters.h
   trunk/Src/Gtk2/dasher_main.cpp

Modified: trunk/Data/glade/dasher.compose.glade
==============================================================================
--- trunk/Data/glade/dasher.compose.glade	(original)
+++ trunk/Data/glade/dasher.compose.glade	Sat Apr 11 22:58:39 2009
@@ -683,12 +683,12 @@
 		      <property name="can_focus">True</property>
 		      <property name="climb_rate">0.10000000149</property>
 		      <property name="digits">1</property>
-		      <property name="numeric">False</property>
-		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_IF_VALID</property>
 		      <property name="snap_to_ticks">False</property>
 		      <property name="wrap">False</property>
-		      <property name="adjustment">1 0.10000000149 8 0.10000000149 10 10</property>
-		      <signal name="value_changed" handler="speed_changed" last_modification_time="Thu, 25 May 2006 16:50:04 GMT"/>
+		      <property name="adjustment">1 0.1 8 0.1 1 0</property>
+		      <signal name="value-changed" handler="speed_changed" />
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>

Modified: trunk/Data/glade/dasher.direct.glade
==============================================================================
--- trunk/Data/glade/dasher.direct.glade	(original)
+++ trunk/Data/glade/dasher.direct.glade	Sat Apr 11 22:58:39 2009
@@ -128,12 +128,12 @@
 	      <property name="can_focus">True</property>
 	      <property name="climb_rate">0.10000000149</property>
 	      <property name="digits">1</property>
-	      <property name="numeric">False</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_IF_VALID</property>
 	      <property name="snap_to_ticks">False</property>
 	      <property name="wrap">False</property>
-	      <property name="adjustment">1 0.10000000149 8 0.10000000149 10 10</property>
-	      <signal name="value_changed" handler="speed_changed" last_modification_time="Thu, 25 May 2006 16:50:04 GMT"/>
+	      <property name="adjustment">1 0.1 8 0.1 1 0</property>
+	      <signal name="value-changed" handler="speed_changed" />
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>

Modified: trunk/Data/glade/dasher.gameWIP.glade
==============================================================================
--- trunk/Data/glade/dasher.gameWIP.glade	(original)
+++ trunk/Data/glade/dasher.gameWIP.glade	Sat Apr 11 22:58:39 2009
@@ -817,13 +817,13 @@
 	      <property name="can_focus">True</property>
 	      <property name="climb_rate">0.10000000149</property>
 	      <property name="digits">1</property>
-	      <property name="numeric">False</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_IF_VALID</property>
 	      <property name="snap_to_ticks">False</property>
 	      <property name="wrap">False</property>
-	      <property name="adjustment">1 0.10000000149 8 0.10000000149 10 10</property>
-	      <signal name="value_changed" handler="speed_changed" last_modification_time="Thu, 25 May 2006 16:50:04 GMT"/>
-	      <signal name="focus-in-event" handler="test_focus_handler" last_modification_time="Fri, 02 Feb 2007 14:30:40 GMT"/>
+	      <property name="adjustment">1 0.1 8 0.1 1 0</property>
+	      <signal name="value-changed" handler="speed_changed" />
+	      <signal name="focus-in-event" handler="test_focus_handler" />
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>

Modified: trunk/Data/glade/dasher.preferences.glade
==============================================================================
--- trunk/Data/glade/dasher.preferences.glade	(original)
+++ trunk/Data/glade/dasher.preferences.glade	Sat Apr 11 22:58:39 2009
@@ -261,8 +261,8 @@
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
-                                        <property name="adjustment">5.0999999999999996 0 100 0.10000000149 0.10000000149 0</property>
-                                        <signal name="value_changed" handler="uniform_changed"/>
+                                        <property name="adjustment">5 0 100 0.1 0.1 0</property>
+                                        <signal name="value-changed" handler="uniform_changed"/>
                                       </widget>
                                       <packing>
                                         <property name="expand">False</property>
@@ -632,8 +632,8 @@
                                       <widget class="GtkHScale" id="hscale1">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
-                                        <property name="adjustment">1 0.10000000149 8 0.10000000149 1 0</property>
-                                        <signal name="value_changed" handler="PrefsSpeedSliderChanged"/>
+                                        <property name="adjustment">1 0.1 8 0.1 1 0</property>
+                                        <signal name="value-changed" handler="PrefsSpeedSliderChanged"/>
                                       </widget>
                                     </child>
                                     <child>

Modified: trunk/Data/glade/dasher.traditional.glade
==============================================================================
--- trunk/Data/glade/dasher.traditional.glade	(original)
+++ trunk/Data/glade/dasher.traditional.glade	Sat Apr 11 22:58:39 2009
@@ -578,13 +578,13 @@
 	      <property name="can_focus">True</property>
 	      <property name="climb_rate">0.10000000149</property>
 	      <property name="digits">1</property>
-	      <property name="numeric">False</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_IF_VALID</property>
 	      <property name="snap_to_ticks">False</property>
 	      <property name="wrap">False</property>
-	      <property name="adjustment">1 0.10000000149 8 0.10000000149 10 10</property>
-	      <signal name="value_changed" handler="speed_changed" last_modification_time="Thu, 25 May 2006 16:50:04 GMT"/>
-	      <signal name="focus-in-event" handler="test_focus_handler" last_modification_time="Fri, 02 Feb 2007 14:30:40 GMT"/>
+	      <property name="adjustment">1 0.1 8 0.1 1 0</property>
+	      <signal name="value-changed" handler="speed_changed" />
+	      <signal name="focus-in-event" handler="test_focus_handler" />
 	    </widget>
 	    <packing>
 	      <property name="padding">0</property>

Modified: trunk/Data/glade/dashermaemo.preferences.glade
==============================================================================
--- trunk/Data/glade/dashermaemo.preferences.glade	(original)
+++ trunk/Data/glade/dashermaemo.preferences.glade	Sat Apr 11 22:58:39 2009
@@ -214,8 +214,8 @@
                                   <widget class="GtkHScale" id="hscale1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="adjustment">0.10000000149 0.10000000149 8 0.10000000149 1 0</property>
-                                    <signal name="value_changed" handler="PrefsSpeedSliderChanged"/>
+                                    <property name="adjustment">1 0.1 8 0.1 1 0</property>
+                                    <signal name="value-changed" handler="PrefsSpeedSliderChanged"/>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>
@@ -680,8 +680,8 @@
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
-                                    <property name="adjustment">5 0 100 0.10000000149 0.10000000149 0</property>
-                                    <signal name="value_changed" handler="uniform_changed"/>
+                                    <property name="adjustment">5 0 100 0.1 0.1 0</property>
+                                    <signal name="value-changed" handler="uniform_changed"/>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Sat Apr 11 22:58:39 2009
@@ -2,6 +2,8 @@
 Dasher 4.10.1
 ============
   * Fix crash when scrolling precisely vertically.
+  * Gtk: the speed spin button on the main screen now changes and is in
+    synch with the value in preferences.
 
 ============
 Dasher 4.10.0

Modified: trunk/Src/DasherCore/GnomeSettingsStore.h
==============================================================================
--- trunk/Src/DasherCore/GnomeSettingsStore.h	(original)
+++ trunk/Src/DasherCore/GnomeSettingsStore.h	Sat Apr 11 22:58:39 2009
@@ -27,8 +27,8 @@
 #endif
 
 private:
-    bool LoadSetting(const std::string & Key, bool * Value);
-  bool LoadSetting(const std::string & Key, long *Value);
+  bool LoadSetting(const std::string & Key, bool * Value);
+  bool LoadSetting(const std::string & Key, long * Value);
   bool LoadSetting(const std::string & Key, std::string * Value);
 
   void SaveSetting(const std::string & Key, bool Value);

Modified: trunk/Src/DasherCore/Parameters.h
==============================================================================
--- trunk/Src/DasherCore/Parameters.h	(original)
+++ trunk/Src/DasherCore/Parameters.h	Sat Apr 11 22:58:39 2009
@@ -32,7 +32,7 @@
 enum { 
   BP_DRAW_MOUSE_LINE, BP_DRAW_MOUSE,
   BP_SHOW_SLIDER, BP_START_MOUSE,
-  BP_START_SPACE, BP_START_STYLUS, BP_STOP_IDLE, BP_KEY_CONTROL,  BP_CONTROL_MODE, 
+  BP_START_SPACE, BP_START_STYLUS, BP_STOP_IDLE, BP_KEY_CONTROL, BP_CONTROL_MODE, 
   BP_COLOUR_MODE, BP_MOUSEPOS_MODE,
   BP_OUTLINE_MODE, BP_PALETTE_CHANGE,
   BP_AUTOCALIBRATE, BP_DASHER_PAUSED,

Modified: trunk/Src/Gtk2/dasher_main.cpp
==============================================================================
--- trunk/Src/Gtk2/dasher_main.cpp	(original)
+++ trunk/Src/Gtk2/dasher_main.cpp	Sat Apr 11 22:58:39 2009
@@ -182,7 +182,7 @@
 
 /* ... Message handling from main window widgets */
 extern "C" gboolean dasher_main_cb_menu_command(GtkWidget *pWidget, gpointer pUserData);
-extern "C" gboolean speed_changed(GtkWidget *pWidget, gpointer user_data);
+extern "C" void speed_changed(GtkWidget *pWidget, gpointer user_data);
 extern "C" void alphabet_combo_changed(GtkWidget *pWidget, gpointer pUserData);
 extern "C" void dasher_main_cb_filename_changed(DasherEditor *pEditor, gpointer pUserData);
 extern "C" void dasher_main_cb_buffer_changed(DasherEditor *pEditor, gpointer pUserData);
@@ -1409,13 +1409,10 @@
   return FALSE; // TODO: Scheck semantics of return value
 }
 
-extern "C" gboolean 
+extern "C" void 
 speed_changed(GtkWidget *pWidget, gpointer user_data) {
   if(g_pDasherMain)
-    return dasher_main_speed_changed(g_pDasherMain);
-
-  // TODO: Check callback return functions
-  return false;
+    dasher_main_speed_changed(g_pDasherMain);
 }
 
 extern "C" void 



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