(gtk) fix crash reported by hussam

This commit is contained in:
Charles Kerr 2007-12-22 16:34:47 +00:00
parent 3ecb9910e0
commit bf75469bbe
2 changed files with 2 additions and 2 deletions

View File

@ -384,10 +384,10 @@ tr_core_new( void )
TrCore * core = TR_CORE( g_object_new( TR_CORE_TYPE, NULL ) );
/* init from prefs & listen to pref changes */
g_signal_connect( core, "prefs-changed", G_CALLBACK(prefsChanged), NULL );
prefsChanged( core, PREF_KEY_SORT_MODE, NULL );
prefsChanged( core, PREF_KEY_SORT_REVERSED, NULL );
prefsChanged( core, PREF_KEY_MAX_PEERS_GLOBAL, NULL );
g_signal_connect( core, "prefs-changed", G_CALLBACK(prefsChanged), NULL );
return core;
}

View File

@ -303,11 +303,11 @@ tr_window_new( GtkUIManager * ui_manager, TrCore * core )
gtk_widget_show_all( vbox );
/* listen for prefs changes that affect the window */
p->core = core;
prefsChanged( core, PREF_KEY_MINIMAL_VIEW, self );
prefsChanged( core, PREF_KEY_STATUS_BAR, self );
prefsChanged( core, PREF_KEY_STATUS_BAR_STATS, self );
prefsChanged( core, PREF_KEY_TOOLBAR, self );
p->core = core;
p->pref_handler_id = g_signal_connect( core, "prefs-changed",
G_CALLBACK(prefsChanged), self );