Commit de80cc69 authored by Phil Cowans's avatar Phil Cowans
Browse files

Fixed a few of the more serious bugs

* Fixed a few of the more serious bugs

svn path=/branches/experimental_win_gtk/; revision=3518
parent 445cba67
......@@ -490,7 +490,7 @@ extern "C" void on_list_selection(GtkTreeSelection *pSelection, gpointer pUserDa
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 startonmousepos(GtkWidget *widget, gpointer user_data) {
}
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) {
......
......@@ -632,14 +632,16 @@ dasher_editor_internal_output(DasherEditor *pSelf, const gchar *szText, int iOff
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;
}
}
}
......
......@@ -1281,14 +1281,17 @@ dasher_main_command_about(DasherMain *pSelf) {
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment