dasher r3518 - branches/experimental_win_gtk/Src/Gtk2
- From: pcowans svn gnome org
- To: svn-commits-list gnome org
- Subject: dasher r3518 - branches/experimental_win_gtk/Src/Gtk2
- Date: Wed, 23 Apr 2008 22:12:37 +0100 (BST)
Author: pcowans
Date: Wed Apr 23 21:12:37 2008
New Revision: 3518
URL: http://svn.gnome.org/viewvc/dasher?rev=3518&view=rev
Log:
* Fixed a few of the more serious bugs
Modified:
branches/experimental_win_gtk/Src/Gtk2/Preferences.cpp
branches/experimental_win_gtk/Src/Gtk2/dasher_editor_internal.cpp
branches/experimental_win_gtk/Src/Gtk2/dasher_main.cpp
Modified: branches/experimental_win_gtk/Src/Gtk2/Preferences.cpp
==============================================================================
--- branches/experimental_win_gtk/Src/Gtk2/Preferences.cpp (original)
+++ branches/experimental_win_gtk/Src/Gtk2/Preferences.cpp Wed Apr 23 21:12:37 2008
@@ -490,7 +490,7 @@
gtk_tree_model_get(pModel, &oIter, 0, &iParameter, 1, &pHelper, 2, &szValue, 4, &pHelperWindow, 5, &pHelperWindowRef, -1);
dasher_app_settings_set_string(pPrivate->pAppSettings, iParameter, szValue);
- free(szValue);
+ //free(szValue);
if(pHelper) {
gtk_widget_set_sensitive(GTK_WIDGET(pHelper), pHelperWindow != NULL);
@@ -786,13 +786,15 @@
}
extern "C" void PrefsSpeedSliderChanged(GtkHScale *hscale, gpointer user_data) {
-#ifndef DASHER_WIN32
// DasherPreferencesDialoguePrivate *pPrivate = DASHER_PREFERENCES_DIALOGUE_PRIVATE(pSelf);
DasherPreferencesDialoguePrivate *pPrivate = DASHER_PREFERENCES_DIALOGUE_PRIVATE(g_pPreferencesDialogue); // TODO: Fix NULL
-
+
+#ifdef DASHER_WIN32
+ long iNewValue = long(floor(gtk_range_get_value(GTK_RANGE(hscale)) * 100 + 0.5));
+#else
long iNewValue = long(round(gtk_range_get_value(GTK_RANGE(hscale)) * 100));
- dasher_app_settings_set_long(pPrivate->pAppSettings, LP_MAX_BITRATE, iNewValue);
#endif
+ dasher_app_settings_set_long(pPrivate->pAppSettings, LP_MAX_BITRATE, iNewValue);
}
extern "C" void orientation(GtkRadioButton *widget, gpointer user_data) {
Modified: branches/experimental_win_gtk/Src/Gtk2/dasher_editor_internal.cpp
==============================================================================
--- branches/experimental_win_gtk/Src/Gtk2/dasher_editor_internal.cpp (original)
+++ branches/experimental_win_gtk/Src/Gtk2/dasher_editor_internal.cpp Wed Apr 23 21:12:37 2008
@@ -632,14 +632,16 @@
gboolean bActionIterStarted = false;
EditorAction *pActionIter = pPrivate->pActionRing;
- while((pActionIter != pPrivate->pActionRing) || !bActionIterStarted) {
- bActionIterStarted = true;
+ if(pActionIter) {
+ while((pActionIter != pPrivate->pActionRing) || !bActionIterStarted) {
+ bActionIterStarted = true;
- if(!strcmp(dasher_action_get_name(pActionIter->pAction), "Speak")) {
- dasher_action_preview(pActionIter->pAction, DASHER_EDITOR(pSelf));
- }
+ if(!strcmp(dasher_action_get_name(pActionIter->pAction), "Speak")) {
+ dasher_action_preview(pActionIter->pAction, DASHER_EDITOR(pSelf));
+ }
- pActionIter = pActionIter->pNext;
+ pActionIter = pActionIter->pNext;
+ }
}
}
Modified: branches/experimental_win_gtk/Src/Gtk2/dasher_main.cpp
==============================================================================
--- branches/experimental_win_gtk/Src/Gtk2/dasher_main.cpp (original)
+++ branches/experimental_win_gtk/Src/Gtk2/dasher_main.cpp Wed Apr 23 21:12:37 2008
@@ -1281,14 +1281,17 @@
static gboolean
dasher_main_speed_changed(DasherMain *pSelf) {
-#ifndef DASHER_WIN32
DasherMainPrivate *pPrivate = DASHER_MAIN_GET_PRIVATE(pSelf);
-
+
+#ifdef DASHER_WIN32
+ int iNewValue( static_cast<int>(floor(gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(pPrivate->pSpeedBox)) * 100 + 0.5)));
+#else
int iNewValue( static_cast<int>(round(gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(pPrivate->pSpeedBox)) * 100)));
+#endif
if(dasher_app_settings_get_long(pPrivate->pAppSettings, LP_MAX_BITRATE) != iNewValue)
dasher_app_settings_set_long(pPrivate->pAppSettings, LP_MAX_BITRATE, iNewValue);
-#endif
+
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]