mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 20:10:56 +00:00
fix preferences panes being off by 1
This commit is contained in:
parent
7cdf4a24cb
commit
9123ea1cb0
1 changed files with 32 additions and 14 deletions
|
@ -1753,14 +1753,17 @@ void PrefsDlg::BuildDialog(){
|
||||||
gtk_widget_set_size_request( GTK_WIDGET( vbox ), 350, -1 );
|
gtk_widget_set_size_request( GTK_WIDGET( vbox ), 350, -1 );
|
||||||
gtk_widget_show( vbox );
|
gtk_widget_show( vbox );
|
||||||
|
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
gint page_index;
|
||||||
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_FRONT );
|
||||||
|
|
||||||
/******** global preferences group ****************************/
|
/******** global preferences group ****************************/
|
||||||
preflabel = gtk_label_new( _( "Globals" ) );
|
preflabel = gtk_label_new( _( "Globals" ) );
|
||||||
gtk_widget_show( preflabel );
|
gtk_widget_show( preflabel );
|
||||||
|
|
||||||
pageframe = mGamesDialog.GetGlobalFrame();
|
pageframe = mGamesDialog.GetGlobalFrame();
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_GAME_SETTINGS );
|
||||||
|
|
||||||
/******** 2D prefs group (xy views/rendering options) *********/
|
/******** 2D prefs group (xy views/rendering options) *********/
|
||||||
preflabel = gtk_label_new( _( "2D Display" ) );
|
preflabel = gtk_label_new( _( "2D Display" ) );
|
||||||
|
@ -1821,7 +1824,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_2D );
|
||||||
|
|
||||||
/******** 3D Camera view group *********/
|
/******** 3D Camera view group *********/
|
||||||
preflabel = gtk_label_new( _( "3D View" ) );
|
preflabel = gtk_label_new( _( "3D View" ) );
|
||||||
|
@ -1960,7 +1964,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
AddDialogData( check, &m_bCamXYUpdate, DLG_CHECK_BOOL );
|
AddDialogData( check, &m_bCamXYUpdate, DLG_CHECK_BOOL );
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_CAMERA );
|
||||||
|
|
||||||
/******** Texture group *********/
|
/******** Texture group *********/
|
||||||
preflabel = gtk_label_new( _( "Textures" ) );
|
preflabel = gtk_label_new( _( "Textures" ) );
|
||||||
|
@ -2113,6 +2118,10 @@ void PrefsDlg::BuildDialog(){
|
||||||
}
|
}
|
||||||
g_list_free( combo_list );
|
g_list_free( combo_list );
|
||||||
|
|
||||||
|
// Add the page to the notebook
|
||||||
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_TEXTURE );
|
||||||
|
|
||||||
/******** Texture dir list group *********/
|
/******** Texture dir list group *********/
|
||||||
preflabel = gtk_label_new( _( "Texture directory list" ) );
|
preflabel = gtk_label_new( _( "Texture directory list" ) );
|
||||||
gtk_widget_show( preflabel );
|
gtk_widget_show( preflabel );
|
||||||
|
@ -2129,9 +2138,9 @@ void PrefsDlg::BuildDialog(){
|
||||||
gtk_widget_show( check );
|
gtk_widget_show( check );
|
||||||
AddDialogData( check, &m_bShowTexDirList, DLG_CHECK_BOOL );
|
AddDialogData( check, &m_bShowTexDirList, DLG_CHECK_BOOL );
|
||||||
|
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_TEXTURE_DIR );
|
||||||
|
|
||||||
/******** Layout group *********/
|
/******** Layout group *********/
|
||||||
preflabel = gtk_label_new( _( "Layout" ) );
|
preflabel = gtk_label_new( _( "Layout" ) );
|
||||||
|
@ -2260,7 +2269,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_LAYOUT );
|
||||||
|
|
||||||
/******** Mouse group *********/
|
/******** Mouse group *********/
|
||||||
preflabel = gtk_label_new( _( "Mouse" ) );
|
preflabel = gtk_label_new( _( "Mouse" ) );
|
||||||
|
@ -2334,7 +2344,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
AddDialogData( spin, &m_nWheelInc, DLG_SPIN_INT );
|
AddDialogData( spin, &m_nWheelInc, DLG_SPIN_INT );
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_MOUSE );
|
||||||
|
|
||||||
/******** Editing group *********/
|
/******** Editing group *********/
|
||||||
preflabel = gtk_label_new( _( "Editing" ) );
|
preflabel = gtk_label_new( _( "Editing" ) );
|
||||||
|
@ -2447,7 +2458,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
AddDialogData( spin, &m_nSubdivisions, DLG_SPIN_INT );
|
AddDialogData( spin, &m_nSubdivisions, DLG_SPIN_INT );
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_EDITING );
|
||||||
|
|
||||||
/******** Save/Load group *********/
|
/******** Save/Load group *********/
|
||||||
preflabel = gtk_label_new( _( "Startup/Auto save" ) );
|
preflabel = gtk_label_new( _( "Startup/Auto save" ) );
|
||||||
|
@ -2511,7 +2523,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
AddDialogData( check, &m_bSaveBeep, DLG_CHECK_BOOL );
|
AddDialogData( check, &m_bSaveBeep, DLG_CHECK_BOOL );
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_STARTUP );
|
||||||
|
|
||||||
/******** Paths group *********/
|
/******** Paths group *********/
|
||||||
preflabel = gtk_label_new( _( "Paths" ) );
|
preflabel = gtk_label_new( _( "Paths" ) );
|
||||||
|
@ -2584,7 +2597,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
gtk_widget_show( button );
|
gtk_widget_show( button );
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_PATHS );
|
||||||
|
|
||||||
/******** Brush group ********/
|
/******** Brush group ********/
|
||||||
preflabel = gtk_label_new( _( "Brush" ) );
|
preflabel = gtk_label_new( _( "Brush" ) );
|
||||||
|
@ -2632,7 +2646,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
AddDialogData( check, &m_bCaulkNewBrushes, DLG_CHECK_BOOL );
|
AddDialogData( check, &m_bCaulkNewBrushes, DLG_CHECK_BOOL );
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_BRUSH );
|
||||||
|
|
||||||
/******** Misc group *********/
|
/******** Misc group *********/
|
||||||
preflabel = gtk_label_new( _( "Misc" ) );
|
preflabel = gtk_label_new( _( "Misc" ) );
|
||||||
|
@ -2660,6 +2675,7 @@ void PrefsDlg::BuildDialog(){
|
||||||
gtk_widget_show( table );
|
gtk_widget_show( table );
|
||||||
|
|
||||||
label = gtk_label_new( _( "Light radiuses:" ) );
|
label = gtk_label_new( _( "Light radiuses:" ) );
|
||||||
|
|
||||||
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
|
gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
|
||||||
(GtkAttachOptions) ( 0 ),
|
(GtkAttachOptions) ( 0 ),
|
||||||
(GtkAttachOptions) ( 0 ), 0, 0 );
|
(GtkAttachOptions) ( 0 ), 0, 0 );
|
||||||
|
@ -2737,7 +2753,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_MISC );
|
||||||
|
|
||||||
/******** BSP Monitoring group *********/
|
/******** BSP Monitoring group *********/
|
||||||
// this is never displayed if the plugin isn't available
|
// this is never displayed if the plugin isn't available
|
||||||
|
@ -2799,7 +2816,8 @@ void PrefsDlg::BuildDialog(){
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Add the page to the notebook
|
// Add the page to the notebook
|
||||||
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
page_index = gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
|
||||||
|
assert( page_index == PTAB_BSPMONITOR );
|
||||||
|
|
||||||
gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook ), PTAB_FRONT );
|
gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook ), PTAB_FRONT );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue