]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge commit 'c845c5cd8f427d39665d6a8b1f6eeff401370d80' into garux-merge
authorThomas Debesse <dev@illwieckz.net>
Tue, 26 May 2020 13:46:36 +0000 (15:46 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 26 May 2020 13:46:36 +0000 (15:46 +0200)
25 files changed:
1  2 
contrib/bobtoolz/DPatch.cpp
contrib/bobtoolz/bobToolz-GTK.cpp
contrib/bobtoolz/bobToolz-GTK.h
contrib/bobtoolz/dialogs/dialogs-gtk.cpp
contrib/bobtoolz/funchandlers-GTK.cpp
contrib/brushexport/interface.cpp
contrib/brushexport/plugin.cpp
contrib/brushexport/plugin.h
contrib/gtkgensurf/plugin.cpp
contrib/prtview/AboutDialog.cpp
contrib/prtview/ConfigDialog.cpp
contrib/prtview/LoadPortalFileDialog.cpp
contrib/prtview/prtview.cpp
contrib/prtview/prtview.h
include/iselection.h
radiant/camwindow.cpp
radiant/entity.cpp
radiant/mainframe.cpp
radiant/mainframe.h
radiant/preferences.cpp
radiant/select.cpp
radiant/selection.cpp
radiant/view.h
radiant/xywindow.cpp
radiant/xywindow.h

Simple merge
index deb2ce5ba0c6b431ae42458d84ab7298225a5829,e11a6427bd3e497375bcef746ce5b967b3a4e5ea..b012a4d5064826790214fe287a1d2f47a82d1ffc
@@@ -57,14 -59,14 +59,11 @@@ void BobToolz_destroy()
  }
  
  // plugin name
 -char* PLUGIN_NAME = "bobToolz";
 +const char* PLUGIN_NAME = "bobToolz";
  
  // commands in the menu
 -static char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Split patches cols,Split patches rows,Turn edge";
 -
 -// globals
 -GtkWidget *g_pRadiantWnd = NULL;
 +static const char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Split patches cols,Split patches rows,Turn edge";
  
- // globals
- ui::Window g_pRadiantWnd{ui::null};
  static const char *PLUGIN_ABOUT =   "bobToolz for SDRadiant\n"
                                                                        "by digibob (digibob@splashdamage.com)\n"
                                                                        "http://www.splashdamage.com\n\n"
index 0000000000000000000000000000000000000000,d10acc482e5a6006f32a1a626a5caedd6f43adcf..e7dcce25ff58b8da5820e24a26ca8d65e69768a7
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,7 +1,8 @@@
 -
+ #if !defined(INCLUDED_BOBTOOLZGTK_H)
+ #define INCLUDED_BOBTOOLZGTK_H
 -extern GtkWidget *g_pRadiantWnd;
++#include <uilib/uilib.h>
++
++extern ui::Widget g_pRadiantWnd;
+ #endif
index 9329f306a2817e7823d6e95fb456ee9e310861b3,a4a08b7a9b0d61a847e885fb3918f8d274ff4f76..ad4446795e45386b418ad7f697df927d55ccefe4
@@@ -209,11 -215,15 +211,12 @@@ EMessageBoxReturn DoMessageBox( const c
        EMessageBoxReturn ret;
        int loop = 1;
  
 -      window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
 +      auto window = ui::Window( ui::window_type::TOP );
+       gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pRadiantWnd ) );
 -      gtk_window_set_modal( GTK_WINDOW( window ), TRUE );
 -      gtk_signal_connect( GTK_OBJECT( window ), "delete_event",
 -                                              GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
 -      gtk_signal_connect( GTK_OBJECT( window ), "destroy",
 -                                              GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
 -      gtk_window_set_title( GTK_WINDOW( window ), lpCaption );
 -      gtk_container_border_width( GTK_CONTAINER( window ), 10 );
 +      window.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), NULL );
 +      window.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
 +      gtk_window_set_title( window, lpCaption );
 +      gtk_container_set_border_width( GTK_CONTAINER( window ), 10 );
        g_object_set_data( G_OBJECT( window ), "loop", &loop );
        g_object_set_data( G_OBJECT( window ), "ret", &ret );
        gtk_widget_realize( window );
                ret = eIDNO;
        }
  
-       gtk_window_set_position( window, GTK_WIN_POS_CENTER );
+       gtk_window_set_position( GTK_WINDOW( window ),GTK_WIN_POS_CENTER_ON_PARENT );
 -      gtk_widget_show( window );
 +      window.show();
        gtk_grab_add( window );
  
        while ( loop )
@@@ -403,13 -424,19 +406,14 @@@ EMessageBoxReturn DoPolygonBox( Polygon
        EMessageBoxReturn ret;
        int loop = 1;
  
 -      window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
 +      auto window = ui::Window( ui::window_type::TOP );
+       gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pRadiantWnd ) );
  
 -      gtk_signal_connect( GTK_OBJECT( window ), "delete_event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
 -      gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
 +      window.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), NULL );
 +      window.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
  
 -      gtk_window_set_title( GTK_WINDOW( window ), "Polygon Builder" );
 -      gtk_container_border_width( GTK_CONTAINER( window ), 10 );
 +      gtk_window_set_title( window, "Polygon Builder" );
 +      gtk_container_set_border_width( GTK_CONTAINER( window ), 10 );
  
        g_object_set_data( G_OBJECT( window ), "loop", &loop );
        g_object_set_data( G_OBJECT( window ), "ret", &ret );
  
        // ---- /vbox ----
  
-       gtk_window_set_position( window, GTK_WIN_POS_CENTER );
+       gtk_window_set_position( GTK_WINDOW( window ),GTK_WIN_POS_CENTER_ON_PARENT );
+       gtk_window_set_modal( GTK_WINDOW( window ), TRUE );
 -      gtk_widget_show( window );
 +      window.show();
        gtk_grab_add( window );
  
        bool dialogError = TRUE;
@@@ -1273,13 -1318,15 +1278,15 @@@ EMessageBoxReturn DoResetTextureBox( Re
        EMessageBoxReturn ret;
        int loop = 1;
  
 -      window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
 +      auto window = ui::Window( ui::window_type::TOP );
+       gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pRadiantWnd ) );
+       gtk_window_set_modal( GTK_WINDOW( window ), TRUE );
  
 -      gtk_signal_connect( GTK_OBJECT( window ), "delete_event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
 -      gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
 +      window.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), NULL );
 +      window.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
  
 -      gtk_window_set_title( GTK_WINDOW( window ), "Texture Reset" );
 -      gtk_container_border_width( GTK_CONTAINER( window ), 10 );
 +      gtk_window_set_title( window, "Texture Reset" );
 +      gtk_container_set_border_width( GTK_CONTAINER( window ), 10 );
  
        g_object_set_data( G_OBJECT( window ), "loop", &loop );
        g_object_set_data( G_OBJECT( window ), "ret", &ret );
  
        // ---- /vbox ----
  
-       gtk_window_set_position( window, GTK_WIN_POS_CENTER );
+       gtk_window_set_position( GTK_WINDOW( window ),GTK_WIN_POS_CENTER_ON_PARENT );
 -      gtk_widget_show( window );
 +      window.show();
        gtk_grab_add( window );
  
        Update_TextureReseter();
Simple merge
index d464a02a810e96c89520c0ad2276b8252be99c42,0342e246715ea0f4fed51e12bdbc52086107c7f7..ec661495ede3ee4a76e9b0add6a031b9686588bb
@@@ -7,43 -8,69 +8,44 @@@
  
  #define GLADE_HOOKUP_OBJECT( component,widget,name ) \
        g_object_set_data_full( G_OBJECT( component ), name, \
 -                                                      gtk_widget_ref( widget ), (GDestroyNotify) gtk_widget_unref )
 +                                                      g_object_ref( (void *) widget ), (GDestroyNotify) g_object_unref )
  
  #define GLADE_HOOKUP_OBJECT_NO_REF( component,widget,name )   \
 -      g_object_set_data( G_OBJECT( component ), name, widget )
 +      g_object_set_data( G_OBJECT( component ), name, (void *) widget )
  
  // created by glade
 -GtkWidget*
 -create_w_plugplug2( void ){
 -      GtkWidget *w_plugplug2;
 -      GtkWidget *vbox1;
 -      GtkWidget *hbox2;
 -      GtkWidget *vbox4;
 -      GtkWidget *r_collapse;
 +ui::Widget create_w_plugplug2( void ){
        GSList *r_collapse_group = NULL;
 -      GtkWidget *r_collapsebymaterial;
 -      GtkWidget *r_nocollapse;
 -      GtkWidget *vbox3;
 -      GtkWidget *b_export;
 -      GtkWidget *b_close;
 -      GtkWidget *vbox2;
 -      GtkWidget *label1;
 -      GtkWidget *scrolledwindow1;
 -      GtkWidget *t_materialist;
 -      GtkWidget *ed_materialname;
 -      GtkWidget *hbox1;
 -      GtkWidget *b_addmaterial;
 -      GtkWidget *b_removematerial;
 -      GtkWidget *t_exportmaterials;
 -      GtkWidget *t_limitmatnames;
 -      GtkWidget *t_objects;
 -      GtkTooltips *tooltips;
 -
 -      tooltips = gtk_tooltips_new();
 -
 -      w_plugplug2 = gtk_window_new( GTK_WINDOW_TOPLEVEL );
 +
 +      auto w_plugplug2 = ui::Window( ui::window_type::TOP );
        gtk_widget_set_name( w_plugplug2, "w_plugplug2" );
 -      gtk_window_set_title( GTK_WINDOW( w_plugplug2 ), "BrushExport-Plugin 3.0 by namespace" );
 +      gtk_window_set_title( w_plugplug2, "BrushExport-Plugin 3.0 by namespace" );
-       gtk_window_set_position( w_plugplug2, GTK_WIN_POS_CENTER );
+       gtk_window_set_position( GTK_WINDOW( w_plugplug2 ), GTK_WIN_POS_CENTER_ON_PARENT );
+       gtk_window_set_transient_for( GTK_WINDOW( w_plugplug2 ), GTK_WINDOW( g_pRadiantWnd ) );
 -      gtk_window_set_destroy_with_parent( GTK_WINDOW( w_plugplug2 ), TRUE );
 +      gtk_window_set_destroy_with_parent( w_plugplug2, TRUE );
  
 -      vbox1 = gtk_vbox_new( FALSE, 0 );
 +      auto vbox1 = ui::VBox( FALSE, 0 );
        gtk_widget_set_name( vbox1, "vbox1" );
 -      gtk_widget_show( vbox1 );
 -      gtk_container_add( GTK_CONTAINER( w_plugplug2 ), vbox1 );
 +      vbox1.show();
 +      w_plugplug2.add(vbox1);
        gtk_container_set_border_width( GTK_CONTAINER( vbox1 ), 5 );
  
 -      hbox2 = gtk_hbox_new( TRUE, 5 );
 +      auto hbox2 = ui::HBox( TRUE, 5 );
        gtk_widget_set_name( hbox2, "hbox2" );
 -      gtk_widget_show( hbox2 );
 -      gtk_box_pack_start( GTK_BOX( vbox1 ), hbox2, FALSE, FALSE, 0 );
 +      hbox2.show();
 +      vbox1.pack_start( hbox2, FALSE, FALSE, 0 );
        gtk_container_set_border_width( GTK_CONTAINER( hbox2 ), 5 );
  
 -      vbox4 = gtk_vbox_new( TRUE, 0 );
 +      auto vbox4 = ui::VBox( TRUE, 0 );
        gtk_widget_set_name( vbox4, "vbox4" );
 -      gtk_widget_show( vbox4 );
 -      gtk_box_pack_start( GTK_BOX( hbox2 ), vbox4, TRUE, FALSE, 0 );
 +      vbox4.show();
 +      hbox2.pack_start( vbox4, TRUE, FALSE, 0 );
  
 -      r_collapse = gtk_radio_button_new_with_mnemonic( NULL, "Collapse mesh" );
 +      auto r_collapse = ui::Widget::from(gtk_radio_button_new_with_mnemonic( NULL, "Collapse mesh" ));
        gtk_widget_set_name( r_collapse, "r_collapse" );
 -      gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), r_collapse, "Collapse all brushes into a single group", "Collapse all brushes into a single group" );
 -      gtk_widget_show( r_collapse );
 -      gtk_box_pack_start( GTK_BOX( vbox4 ), r_collapse, FALSE, FALSE, 0 );
 +      gtk_widget_set_tooltip_text(r_collapse, "Collapse all brushes into a single group");
 +      r_collapse.show();
 +      vbox4.pack_start( r_collapse, FALSE, FALSE, 0 );
        gtk_radio_button_set_group( GTK_RADIO_BUTTON( r_collapse ), r_collapse_group );
        r_collapse_group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( r_collapse ) );
  
index 2a221c7143d201067edc57c3e97c198f8b0d5afb,581878710b4f9d75d6fbf5be0be0da19993e0019..77c54c7e1f1b7afc661e692615582c4d32a10ff0
@@@ -47,13 -48,16 +47,16 @@@ void CreateWindow( void )
  void DestroyWindow( void );
  bool IsWindowOpen( void );
  
 -GtkWidget *g_pRadiantWnd = NULL;
++ui::Widget g_pRadiantWnd{ui::null};
  namespace BrushExport
  {
 -GtkWindow* g_mainwnd;
 +ui::Window g_mainwnd{ui::null};
  
  const char* init( void* hApp, void* pMainWidget ){
 -      g_mainwnd = (GtkWindow*)pMainWidget;
 -      g_pRadiantWnd = (GtkWidget*)pMainWidget;
 -      ASSERT_NOTNULL( g_mainwnd );
 +      g_mainwnd = ui::Window::from(pMainWidget);
++      g_pRadiantWnd = ui::Window::from(pMainWidget);
 +      ASSERT_TRUE( g_mainwnd );
        return "";
  }
  const char* getName(){
index d924f64728304201369e6b6cebb50994008965a3,a5e3f4c594a8a3d75cb172bdc49caf46f41d9704..b0f4b05861e6c89eb7f11c5bd8702baff9afa0e9
@@@ -22,4 -22,7 +22,8 @@@
  #if !defined( INCLUDED_BRUSH_EXPORT_H )
  #define INCLUDED_BRUSH_EXPORT_H
  
 -typedef struct _GtkWidget GtkWidget;
 -extern GtkWidget *g_pRadiantWnd;
++#include <uilib/uilib.h>
++
++extern ui::Widget g_pRadiantWnd;
  #endif
index 6acaa4b9bf41a378cd420078e0a9c40c18b26582,38a730da77c133f3f2830898fed1cc2b825421a0..928bd1458f6bf68b47a75946c8f4c2024e455501
@@@ -17,6 -17,6 +17,8 @@@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   */
  
++#include <uilib/uilib.h>
++
  #include "gensurf.h"
  
  // Global plugin FuncTable
@@@ -32,7 -32,7 +34,7 @@@ bool g_bInitDone
  #include "iplugin.h"
  
  const char* QERPlug_Init( void* hApp, void* pMainWidget ){
--      g_pRadiantWnd = (GtkWidget*)pMainWidget;
++      g_pRadiantWnd = ui::Window::from(pMainWidget);
  
        return "GenSurf for Q3Radiant";
  }
index f320de22e74b9771c2dd3ac697ebbacb9a51bb21,5713b162f76d92c1aa1a6a69443fc58221bad172..2966d105e620420ece677916204837090728415c
@@@ -46,48 -49,55 +46,51 @@@ static gint dialog_delete_callback( ui:
  }
  
  void DoAboutDlg(){
 -      GtkWidget *dlg, *hbox, *vbox, *button, *label;
        int loop = 1, ret = IDCANCEL;
  
 -      dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL );
 +      auto dlg = ui::Window(ui::window_type::TOP);
+       gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pRadiantWnd ) );
+       gtk_window_set_position( GTK_WINDOW( dlg ),GTK_WIN_POS_CENTER_ON_PARENT );
+       gtk_window_set_modal( GTK_WINDOW( dlg ), TRUE );
 -      gtk_window_set_title( GTK_WINDOW( dlg ), "About Portal Viewer" );
 -      gtk_signal_connect( GTK_OBJECT( dlg ), "delete_event",
 -                                              GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
 -      gtk_signal_connect( GTK_OBJECT( dlg ), "destroy",
 -                                              GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
 -      g_object_set_data( G_OBJECT( dlg ), "loop", &loop );
 -      g_object_set_data( G_OBJECT( dlg ), "ret", &ret );
 -
 -      hbox = gtk_hbox_new( FALSE, 10 );
 -      gtk_widget_show( hbox );
 -      gtk_container_add( GTK_CONTAINER( dlg ), hbox );
 -      gtk_container_set_border_width( GTK_CONTAINER( hbox ), 10 );
 -
 -      label = gtk_label_new( "Version 1.000\n\n"
 -                                                 "Gtk port by Leonardo Zide\nleo@lokigames.com\n\n"
 -                                                 "Written by Geoffrey DeWan\ngdewan@prairienet.org\n\n"
 -                                                 "Built against NetRadiant " RADIANT_VERSION "\n"
 -                                                 __DATE__
 -                                                 );
 -      gtk_widget_show( label );
 -      gtk_box_pack_start( GTK_BOX( hbox ), label, TRUE, TRUE, 0 );
 -      gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT );
 -
 -      vbox = gtk_vbox_new( FALSE, 0 );
 -      gtk_widget_show( vbox );
 -      gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, FALSE, 0 );
 -
 -      button = gtk_button_new_with_label( "OK" );
 -      gtk_widget_show( button );
 -      gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 );
 -      gtk_signal_connect( GTK_OBJECT( button ), "clicked",
 -                                              GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
 -      gtk_widget_set_usize( button, 60, -2 );
 -
 -      gtk_grab_add( dlg );
 -      gtk_widget_show( dlg );
 -
 -      while ( loop )
 +      gtk_window_set_title(dlg, "About Portal Viewer");
 +      dlg.connect("delete_event", G_CALLBACK(dialog_delete_callback), NULL);
 +      dlg.connect("destroy", G_CALLBACK(gtk_widget_destroy), NULL);
 +      g_object_set_data(G_OBJECT(dlg), "loop", &loop);
 +      g_object_set_data(G_OBJECT(dlg), "ret", &ret);
 +
 +      auto hbox = ui::HBox(FALSE, 10);
 +      hbox.show();
 +      dlg.add(hbox);
 +      gtk_container_set_border_width(GTK_CONTAINER(hbox), 10);
 +
 +      char const *label_text = "Version 1.000\n\n"
 +                      "Gtk port by Leonardo Zide\nleo@lokigames.com\n\n"
 +                      "Written by Geoffrey DeWan\ngdewan@prairienet.org\n\n"
 +                      "Built against NetRadiant " RADIANT_VERSION "\n"
 +                      __DATE__;
 +      auto label = ui::Label(label_text);
 +      label.show();
 +      hbox.pack_start( label, TRUE, TRUE, 0);
 +      gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
 +
 +      auto vbox = ui::VBox(FALSE, 0);
 +      vbox.show();
 +      hbox.pack_start( vbox, FALSE, FALSE, 0);
 +
 +      auto button = ui::Button("OK");
 +      button.show();
 +      vbox.pack_start( button, FALSE, FALSE, 0);
 +      button.connect("clicked", G_CALLBACK(dialog_button_callback), GINT_TO_POINTER(IDOK));
 +      button.dimensions(60, -1);
 +
 +      gtk_grab_add(dlg);
 +      dlg.show();
 +
 +      while (loop)
                gtk_main_iteration();
  
 -      gtk_grab_remove( dlg );
 -      gtk_widget_destroy( dlg );
 +      gtk_grab_remove(dlg);
 +      dlg.destroy();
  }
  
  
index 1d7f2743499b4a31460baa1b26376d230d39bb14,63080a2b5b90e250e2ab299b5093f1f8be245bcf..3b3e80c05b8d1b4b52041ce984f1df9411ebf6f4
@@@ -50,23 -53,27 +50,27 @@@ static gint dialog_delete_callback( ui:
  // Color selection dialog
  
  static int DoColor( PackedColour *c ){
 -      GtkWidget* dlg;
 -      double clr[4];
 +      GdkColor clr;
        int loop = 1, ret = IDCANCEL;
  
 -      clr[0] = ( (double)GetRValue( *c ) ) / 255.0;
 -      clr[1] = ( (double)GetGValue( *c ) ) / 255.0;
 -      clr[2] = ( (double)GetBValue( *c ) ) / 255.0;
 +      clr.red = (guint16) (GetRValue(*c) * (65535 / 255));
 +      clr.blue = (guint16) (GetGValue(*c) * (65535 / 255));
 +      clr.green = (guint16) (GetBValue(*c) * (65535 / 255));
 +
 +      auto dlg = ui::Widget::from(gtk_color_selection_dialog_new( "Choose Color" ));
 -      dlg = gtk_color_selection_dialog_new( "Choose Color" );
+       gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pRadiantWnd ) );
+       gtk_window_set_position( GTK_WINDOW( dlg ),GTK_WIN_POS_CENTER_ON_PARENT );
+       gtk_window_set_modal( GTK_WINDOW( dlg ), TRUE );
 -      gtk_color_selection_set_color( GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG( dlg )->colorsel ), clr );
 -      gtk_signal_connect( GTK_OBJECT( dlg ), "delete_event",
 -                                              GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
 -      gtk_signal_connect( GTK_OBJECT( dlg ), "destroy",
 -                                              GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
 -      gtk_signal_connect( GTK_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->ok_button ), "clicked",
 -                                              GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
 -      gtk_signal_connect( GTK_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->cancel_button ), "clicked",
 -                                              GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
 +      gtk_color_selection_set_current_color( GTK_COLOR_SELECTION( gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(dlg)) ), &clr );
 +      dlg.connect( "delete_event", G_CALLBACK( dialog_delete_callback ), NULL );
 +      dlg.connect( "destroy", G_CALLBACK( gtk_widget_destroy ), NULL );
 +
 +      GtkWidget *ok_button, *cancel_button;
 +      g_object_get(dlg, "ok-button", &ok_button, "cancel-button", &cancel_button, nullptr);
 +
 +      ui::Widget::from(ok_button).connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
 +      ui::Widget::from(cancel_button).connect( "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
        g_object_set_data( G_OBJECT( dlg ), "loop", &loop );
        g_object_set_data( G_OBJECT( dlg ), "ret", &ret );
  
@@@ -234,14 -241,23 +238,19 @@@ static void OnClip(ui::Widget widget, g
  }
  
  void DoConfigDialog(){
 -      GtkWidget *dlg, *hbox, *vbox, *vbox2, *button, *table, *frame;
 -      GtkWidget *lw3slider, *lw3label, *lw2slider, *lw2label, *zlist, *menu, *item;
 -      GtkWidget *aa2check, *aa3check, *depthcheck, *linescheck, *polyscheck;
 -      GtkWidget *transslider, *translabel, *clipslider, *cliplabel;
 -      GtkWidget *show2check, *show3check, *portalcheck;
        int loop = 1, ret = IDCANCEL;
 -      GtkObject *adj;
  
 -      dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL );
 +      auto dlg = ui::Window( ui::window_type::TOP );
++
+       gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pRadiantWnd ) );
+       gtk_window_set_position( GTK_WINDOW( dlg ),GTK_WIN_POS_CENTER_ON_PARENT );
+       gtk_window_set_modal( GTK_WINDOW( dlg ), TRUE );
 -      gtk_window_set_title( GTK_WINDOW( dlg ), "Portal Viewer Configuration" );
 -      gtk_signal_connect( GTK_OBJECT( dlg ), "delete_event",
 -                                              GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
 -      gtk_signal_connect( GTK_OBJECT( dlg ), "destroy",
 -                                              GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
++
 +      gtk_window_set_title( dlg, "Portal Viewer Configuration" );
 +      dlg.connect( "delete_event",
 +                                              G_CALLBACK( dialog_delete_callback ), NULL );
 +      dlg.connect( "destroy",
 +                                              G_CALLBACK( gtk_widget_destroy ), NULL );
        g_object_set_data( G_OBJECT( dlg ), "loop", &loop );
        g_object_set_data( G_OBJECT( dlg ), "ret", &ret );
  
index 9ebcd69b916ddba8f24a5eeb35684d4930c3c67a,f2725838dec19c5ccdb282893cd516bfdef94a9d..2d6b4d75fdb70520af1eb96f2e6f4ea2d2e9bddf
@@@ -51,21 -54,51 +51,25 @@@ static gint dialog_delete_callback( ui:
        return TRUE;
  }
  
 -static void file_sel_callback( GtkWidget *widget, gpointer data ){
 -      GtkWidget *parent;
 -      int *loop;
 -      char **filename;
 -
 -      parent = gtk_widget_get_toplevel( widget );
 -      loop = (int*)g_object_get_data( G_OBJECT( parent ), "loop" );
 -      filename = (char**)g_object_get_data( G_OBJECT( parent ), "filename" );
 -
 -      *loop = 0;
 -      if ( gpointer_to_int( data ) == IDOK ) {
 -              *filename = g_strdup( gtk_file_selection_get_filename( GTK_FILE_SELECTION( parent ) ) );
 -      }
 -}
 -
 -static void change_clicked( GtkWidget *widget, gpointer data ){
 -      GtkWidget* file_sel;
 +static void change_clicked(ui::Widget widget, gpointer data ){
        char* filename = NULL;
 -      int loop = 1;
  
 -      file_sel = gtk_file_selection_new( "Locate portal (.prt) file" );
 +      auto file_sel = ui::Widget::from(gtk_file_chooser_dialog_new ( "Locate portal (.prt) file", nullptr, GTK_FILE_CHOOSER_ACTION_OPEN,
 +                                                                                       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 +                                                                                       GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
 +                                                                                       nullptr));
 +
+       gtk_window_set_transient_for( GTK_WINDOW( file_sel ), GTK_WINDOW( g_pRadiantWnd ) );
+       gtk_window_set_position( GTK_WINDOW( file_sel ),GTK_WIN_POS_CENTER_ON_PARENT );
+       gtk_window_set_modal( GTK_WINDOW( file_sel ), TRUE );
 -      gtk_signal_connect( GTK_OBJECT( GTK_FILE_SELECTION( file_sel )->ok_button ), "clicked",
 -                                              GTK_SIGNAL_FUNC( file_sel_callback ), GINT_TO_POINTER( IDOK ) );
 -      gtk_signal_connect( GTK_OBJECT( GTK_FILE_SELECTION( file_sel )->cancel_button ), "clicked",
 -                                              GTK_SIGNAL_FUNC( file_sel_callback ), GINT_TO_POINTER( IDCANCEL ) );
 -      gtk_signal_connect( GTK_OBJECT( file_sel ), "delete_event",
 -                                              GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
 -      gtk_file_selection_hide_fileop_buttons( GTK_FILE_SELECTION( file_sel ) );
 -
 -      g_object_set_data( G_OBJECT( file_sel ), "loop", &loop );
 -      g_object_set_data( G_OBJECT( file_sel ), "filename", &filename );
 -      gtk_file_selection_set_filename( GTK_FILE_SELECTION( file_sel ), portals.fn );
 -      gtk_grab_add( file_sel );
 -      gtk_widget_show( file_sel );
 -
 -      while ( loop )
 -              gtk_main_iteration();
 +      gtk_file_chooser_set_filename( GTK_FILE_CHOOSER(file_sel), portals.fn );
  
 -      gtk_grab_remove( file_sel );
 -      gtk_widget_destroy( file_sel );
 +      if (gtk_dialog_run (GTK_DIALOG (file_sel)) == GTK_RESPONSE_ACCEPT)
 +      {
 +              filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_sel));
 +      }
 +      ui::Widget(file_sel).destroy();
  
        if ( filename != NULL ) {
                strcpy( portals.fn, filename );
  }
  
  int DoLoadPortalFileDialog(){
 -      GtkWidget *dlg, *vbox, *hbox, *button, *entry, *check2d, *check3d;
        int loop = 1, ret = IDCANCEL;
  
 -      dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL );
 +      auto dlg = ui::Window( ui::window_type::TOP );
++
+       gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pRadiantWnd ) );
+       gtk_window_set_position( GTK_WINDOW( dlg ),GTK_WIN_POS_CENTER_ON_PARENT );
+       gtk_window_set_modal( GTK_WINDOW( dlg ), TRUE );
 -      gtk_window_set_title( GTK_WINDOW( dlg ), "Load .prt" );
 -      gtk_signal_connect( GTK_OBJECT( dlg ), "delete_event",
 -                                              GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
 -      gtk_signal_connect( GTK_OBJECT( dlg ), "destroy",
 -                                              GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
++
 +      gtk_window_set_title( dlg, "Load .prt" );
 +      dlg.connect( "delete_event",
 +                                              G_CALLBACK( dialog_delete_callback ), NULL );
 +      dlg.connect( "destroy",
 +                                              G_CALLBACK( gtk_widget_destroy ), NULL );
        g_object_set_data( G_OBJECT( dlg ), "loop", &loop );
        g_object_set_data( G_OBJECT( dlg ), "ret", &ret );
  
index 080af13a3c8ba35a8b1e087a4cc7a7865c95b3a5,2b3d9c047a82657aa915080310bd8e344523cf51..fe6bf41a8ba47798c57c137c5a5c6aa1d22daa2d
@@@ -22,6 -22,6 +22,8 @@@
  #include <stdio.h>
  #include <stdlib.h>
  
++#include <uilib/uilib.h>
++
  #include "profile/profile.h"
  
  #include "qerplugin.h"
@@@ -201,8 -201,10 +203,10 @@@ static const char *PLUGIN_COMMANDS 
        Q3R_CMD_LOAD;
  
  
 -GtkWidget *g_pRadiantWnd = NULL;
++ui::Widget g_pRadiantWnd{ui::null};
  
  const char* QERPlug_Init( void *hApp, void* pMainWidget ){
 -      g_pRadiantWnd = (GtkWidget*)pMainWidget;
++      g_pRadiantWnd = ui::Window::from(pMainWidget);
        return "Portal Viewer for Q3Radiant";
  }
  
index 6b0487826aff3b6b7834b80e9c5488c3e3c21d23,5b3734f500defea1a3e3ce846930ea0d6fcae879..96b77b5dcaf43412b75b654035a91c95c65994eb
  #if !defined( INCLUDED_PRTVIEW_H )
  #define INCLUDED_PRTVIEW_H
  
++#include <uilib/uilib.h>
++
  #define MSG_PREFIX "Portal Viewer plugin: "
  
  void InitInstance();
  void SaveConfig();
  
 -int INIGetInt( char *key, int def );
 -void INISetInt( char *key, int val, char *comment = 0 );
 -
 -typedef struct _GtkWidget GtkWidget;
 -extern GtkWidget *g_pRadiantWnd;
 +int INIGetInt( const char *key, int def );
 +void INISetInt( const char *key, int val, const char *comment = 0 );
  
 -#define IDOK                1
 -#define IDCANCEL            2
++extern ui::Widget g_pRadiantWnd;
 +const int IDOK                = 1;
 +const int IDCANCEL            = 2;
  
  #endif
Simple merge
index 358d1b51711fa7b4634d97996941c585bfe70dc1,45f590160b7d8a1600d169e7b15cacf705b30eb5..eafc1da093d41d8bf1044178492d1baefc792c74
@@@ -1911,32 -1954,33 +1955,33 @@@ void CameraSpeed_decrease()
  
  /// \brief Initialisation for things that have the same lifespan as this module.
  void CamWnd_Construct(){
 -      GlobalCommands_insert( "CenterView", FreeCaller<GlobalCamera_ResetAngles>(), Accelerator( GDK_End ) );
 -      GlobalCommands_insert( "CameraFocusOnSelected", FreeCaller<GlobalCamera_FocusOnSelected>(), Accelerator( GDK_Tab ) );
 +      GlobalCommands_insert( "CenterView", makeCallbackF(GlobalCamera_ResetAngles), Accelerator( GDK_KEY_End ) );
++      GlobalCommands_insert( "CameraFocusOnSelected", makeCallbackF( GlobalCamera_FocusOnSelected ), Accelerator( GDK_Tab ) );
  
 -      GlobalToggles_insert( "ToggleCubicClip", FreeCaller<Camera_ToggleFarClip>(), ToggleItem::AddCallbackCaller( g_getfarclip_item ), Accelerator( '\\', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "CubicClipZoomIn", FreeCaller<Camera_CubeIn>(), Accelerator( '[', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "CubicClipZoomOut", FreeCaller<Camera_CubeOut>(), Accelerator( ']', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalToggles_insert( "ToggleCubicClip", makeCallbackF(Camera_ToggleFarClip), ToggleItem::AddCallbackCaller( g_getfarclip_item ), Accelerator( '\\', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "CubicClipZoomIn", makeCallbackF(Camera_CubeIn), Accelerator( '[', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "CubicClipZoomOut", makeCallbackF(Camera_CubeOut), Accelerator( ']', (GdkModifierType)GDK_CONTROL_MASK ) );
  
 -      GlobalCommands_insert( "UpFloor", FreeCaller<Camera_ChangeFloorUp>(), Accelerator( GDK_Prior ) );
 -      GlobalCommands_insert( "DownFloor", FreeCaller<Camera_ChangeFloorDown>(), Accelerator( GDK_Next ) );
 +      GlobalCommands_insert( "UpFloor", makeCallbackF(Camera_ChangeFloorUp), Accelerator( GDK_KEY_Prior ) );
 +      GlobalCommands_insert( "DownFloor", makeCallbackF(Camera_ChangeFloorDown), Accelerator( GDK_KEY_Next ) );
  
        GlobalToggles_insert( "ToggleCamera", ToggleShown::ToggleCaller( g_camera_shown ), ToggleItem::AddCallbackCaller( g_camera_shown.m_item ), Accelerator( 'C', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -//    GlobalCommands_insert( "LookThroughSelected", FreeCaller<GlobalCamera_LookThroughSelected>() );
 -//    GlobalCommands_insert( "LookThroughCamera", FreeCaller<GlobalCamera_LookThroughCamera>() );
 +//    GlobalCommands_insert( "LookThroughSelected", makeCallbackF(GlobalCamera_LookThroughSelected) );
 +//    GlobalCommands_insert( "LookThroughCamera", makeCallbackF(GlobalCamera_LookThroughCamera) );
  
        if ( g_pGameDescription->mGameType == "doom3" ) {
 -              GlobalCommands_insert( "TogglePreview", FreeCaller<CamWnd_TogglePreview>(), Accelerator( GDK_F3 ) );
 +              GlobalCommands_insert( "TogglePreview", makeCallbackF(CamWnd_TogglePreview), Accelerator( GDK_KEY_F3 ) );
        }
  
 -      GlobalCommands_insert( "CameraSpeedInc", FreeCaller<CameraSpeed_increase>(), Accelerator( GDK_KP_Add, (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "CameraSpeedDec", FreeCaller<CameraSpeed_decrease>(), Accelerator( GDK_KP_Subtract, (GdkModifierType)GDK_SHIFT_MASK ) );
 +      GlobalCommands_insert( "CameraSpeedInc", makeCallbackF(CameraSpeed_increase), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)GDK_SHIFT_MASK ) );
 +      GlobalCommands_insert( "CameraSpeedDec", makeCallbackF(CameraSpeed_decrease), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)GDK_SHIFT_MASK ) );
  
 -      GlobalShortcuts_insert( "CameraForward", Accelerator( GDK_Up ) );
 -      GlobalShortcuts_insert( "CameraBack", Accelerator( GDK_Down ) );
 -      GlobalShortcuts_insert( "CameraLeft", Accelerator( GDK_Left ) );
 -      GlobalShortcuts_insert( "CameraRight", Accelerator( GDK_Right ) );
 -      GlobalShortcuts_insert( "CameraStrafeRight", Accelerator( 'D' ) );
 -      GlobalShortcuts_insert( "CameraStrafeLeft", Accelerator( 'A' ) );
 +      GlobalShortcuts_insert( "CameraForward", Accelerator( GDK_KEY_Up ) );
 +      GlobalShortcuts_insert( "CameraBack", Accelerator( GDK_KEY_Down ) );
 +      GlobalShortcuts_insert( "CameraLeft", Accelerator( GDK_KEY_Left ) );
 +      GlobalShortcuts_insert( "CameraRight", Accelerator( GDK_KEY_Right ) );
 +      GlobalShortcuts_insert( "CameraStrafeRight", Accelerator( GDK_KEY_period ) );
 +      GlobalShortcuts_insert( "CameraStrafeLeft", Accelerator( GDK_KEY_comma ) );
  
        GlobalShortcuts_insert( "CameraUp", accelerator_null() );
        GlobalShortcuts_insert( "CameraDown", accelerator_null() );
index d865161c3dadb854364cc6a5c390a517521d2fbd,ff82b7ab087469b2b3a2542db14e08aa17a869a0..9f36b89c0f4e2c11495c7436b00542e73518fd69
@@@ -521,16 -512,7 +522,7 @@@ void Entity_setColour()
                                        g_entity_globals.color_entity = rgb;
                                }
                        }
-                       if ( g_pGameDescription->mGameType == "doom3" ) {
-                               normalize = false;
-                       }
 -                      if ( color_dialog( GTK_WIDGET( MainFrame_getWindow() ), g_entity_globals.color_entity ) ) {
 +                      if ( color_dialog( MainFrame_getWindow(), g_entity_globals.color_entity ) ) {
-                               if ( normalize ) {
-                                       NormalizeColor( g_entity_globals.color_entity );
-                               }
                                char buffer[128];
                                sprintf( buffer, "%g %g %g", g_entity_globals.color_entity[0],
                                                 g_entity_globals.color_entity[1],
index cf0525aa56145feab1fb4aa83c8a7bcfdb2eea00,8d07afe6c4402d8660c00bb76a32025d6a89c93a..01399dfb8896f13486277d7876e2d4374b0c5182
@@@ -2208,9 -2060,12 +2209,12 @@@ ui::MenuItem create_selection_menu()
                create_menu_item_with_mnemonic( menu_in_menu, "Nudge Right", "SelectNudgeRight" );
                create_menu_item_with_mnemonic( menu_in_menu, "Nudge Up", "SelectNudgeUp" );
                create_menu_item_with_mnemonic( menu_in_menu, "Nudge Down", "SelectNudgeDown" );
+               menu_separator( menu_in_menu );
+               create_menu_item_with_mnemonic( menu_in_menu, "Nudge +Z", "MoveSelectionUP" );
+               create_menu_item_with_mnemonic( menu_in_menu, "Nudge -Z", "MoveSelectionDOWN" );
        }
        {
 -              GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "Rotate" );
 +              auto menu_in_menu = create_sub_menu_with_mnemonic( menu, "Rotate" );
                if ( g_Layout_enableDetachableMenus.m_value ) {
                        menu_tearoff( menu_in_menu );
                }
@@@ -2350,9 -2205,9 +2354,9 @@@ ui::MenuItem create_help_menu()
        // it will take care of hooking the Sys_OpenURL calls etc.
        create_game_help_menu( menu );
  
 -//    create_menu_item_with_mnemonic( menu, "Bug report", FreeCaller<OpenBugReportURL>() );
 -      create_menu_item_with_mnemonic( menu, "Shortcuts", FreeCaller<DoCommandListDlg>() );
 -      create_menu_item_with_mnemonic( menu, "_About", FreeCaller<DoAbout>() );
 +      create_menu_item_with_mnemonic( menu, "Bug report", makeCallbackF(OpenBugReportURL) );
-       create_menu_item_with_mnemonic( menu, "Shortcuts list", makeCallbackF(DoCommandListDlg) );
++      create_menu_item_with_mnemonic( menu, "Shortcuts", makeCallbackF(DoCommandListDlg) );
 +      create_menu_item_with_mnemonic( menu, "_About", makeCallbackF(DoAbout) );
  
        return help_menu_item;
  }
@@@ -3532,80 -3358,78 +3536,80 @@@ void Maximize_View()
  #include "stringio.h"
  
  void MainFrame_Construct(){
 -      GlobalCommands_insert( "OpenManual", FreeCaller<OpenHelpURL>(), Accelerator( GDK_F1 ) );
 -
 -      GlobalCommands_insert( "Sleep", FreeCaller<thunk_OnSleep>(), Accelerator( 'P', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -      GlobalCommands_insert( "NewMap", FreeCaller<NewMap>() );
 -      GlobalCommands_insert( "OpenMap", FreeCaller<OpenMap>(), Accelerator( 'O', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "ImportMap", FreeCaller<ImportMap>() );
 -      GlobalCommands_insert( "SaveMap", FreeCaller<SaveMap>(), Accelerator( 'S', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "SaveMapAs", FreeCaller<SaveMapAs>() );
 -      GlobalCommands_insert( "SaveSelected", FreeCaller<ExportMap>() );
 -      GlobalCommands_insert( "SaveRegion", FreeCaller<SaveRegion>() );
 -      GlobalCommands_insert( "RefreshReferences", FreeCaller<RefreshReferences>() );
 -      GlobalCommands_insert( "ProjectSettings", FreeCaller<DoProjectSettings>() );
 -      GlobalCommands_insert( "CheckForUpdate", FreeCaller<OpenUpdateURL>() );
 -      GlobalCommands_insert( "Exit", FreeCaller<Exit>() );
 -
 -      GlobalCommands_insert( "Undo", FreeCaller<Undo>(), Accelerator( 'Z', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "Redo", FreeCaller<Redo>(), Accelerator( 'Y', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "Copy", FreeCaller<Copy>(), Accelerator( 'C', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "Paste", FreeCaller<Paste>(), Accelerator( 'V', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "PasteToCamera", FreeCaller<PasteToCamera>(), Accelerator( 'V', (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "CloneSelection", FreeCaller<Selection_Clone>(), Accelerator( GDK_space ) );
 -      GlobalCommands_insert( "CloneSelectionAndMakeUnique", FreeCaller<Selection_Clone_MakeUnique>(), Accelerator( GDK_space, (GdkModifierType)GDK_SHIFT_MASK ) );
 -//    GlobalCommands_insert( "DeleteSelection", FreeCaller<deleteSelection>(), Accelerator( GDK_BackSpace ) );
 -      GlobalCommands_insert( "DeleteSelection2", FreeCaller<deleteSelection>(), Accelerator( GDK_BackSpace ) );
 -      GlobalCommands_insert( "DeleteSelection", FreeCaller<deleteSelection>(), Accelerator( 'Z' ) );
 -      GlobalCommands_insert( "ParentSelection", FreeCaller<Scene_parentSelected>() );
 -//    GlobalCommands_insert( "UnSelectSelection", FreeCaller<Selection_Deselect>(), Accelerator( GDK_Escape ) );
 -      GlobalCommands_insert( "UnSelectSelection2", FreeCaller<Selection_Deselect>(), Accelerator( GDK_Escape ) );
 -      GlobalCommands_insert( "UnSelectSelection", FreeCaller<Selection_Deselect>(), Accelerator( 'C' ) );
 -      GlobalCommands_insert( "InvertSelection", FreeCaller<Select_Invert>(), Accelerator( 'I' ) );
 -      GlobalCommands_insert( "SelectInside", FreeCaller<Select_Inside>() );
 -      GlobalCommands_insert( "SelectTouching", FreeCaller<Select_Touching>() );
 -      GlobalCommands_insert( "ExpandSelectionToEntities", FreeCaller<Scene_ExpandSelectionToEntities>(), Accelerator( 'E', (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "Preferences", FreeCaller<PreferencesDialog_showDialog>(), Accelerator( 'P' ) );
 -
 -      GlobalCommands_insert( "ToggleConsole", FreeCaller<Console_ToggleShow>(), Accelerator( 'O' ) );
 -      GlobalCommands_insert( "ToggleEntityInspector", FreeCaller<EntityInspector_ToggleShow>(), Accelerator( 'N' ) );
 -      GlobalCommands_insert( "EntityList", FreeCaller<EntityList_toggleShown>(), Accelerator( 'L' ) );
 -
 -//    GlobalCommands_insert( "ShowHidden", FreeCaller<Select_ShowAllHidden>(), Accelerator( 'H', (GdkModifierType)GDK_SHIFT_MASK ) );
 -//    GlobalCommands_insert( "HideSelected", FreeCaller<HideSelected>(), Accelerator( 'H' ) );
 +      GlobalCommands_insert( "OpenManual", makeCallbackF(OpenHelpURL), Accelerator( GDK_KEY_F1 ) );
 +
 +      GlobalCommands_insert( "Sleep", makeCallbackF(thunk_OnSleep), Accelerator( 'P', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "NewMap", makeCallbackF(NewMap) );
 +      GlobalCommands_insert( "OpenMap", makeCallbackF(OpenMap), Accelerator( 'O', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "ImportMap", makeCallbackF(ImportMap) );
 +      GlobalCommands_insert( "SaveMap", makeCallbackF(SaveMap), Accelerator( 'S', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "SaveMapAs", makeCallbackF(SaveMapAs) );
 +      GlobalCommands_insert( "ExportSelected", makeCallbackF(ExportMap) );
 +      GlobalCommands_insert( "SaveRegion", makeCallbackF(SaveRegion) );
 +      GlobalCommands_insert( "RefreshReferences", makeCallbackF(VFS_Refresh) );
 +      GlobalCommands_insert( "ProjectSettings", makeCallbackF(DoProjectSettings) );
 +      GlobalCommands_insert( "Exit", makeCallbackF(Exit) );
 +
 +      GlobalCommands_insert( "Undo", makeCallbackF(Undo), Accelerator( 'Z', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "Redo", makeCallbackF(Redo), Accelerator( 'Y', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "Copy", makeCallbackF(Copy), Accelerator( 'C', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "Paste", makeCallbackF(Paste), Accelerator( 'V', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "PasteToCamera", makeCallbackF(PasteToCamera), Accelerator( 'V', (GdkModifierType)GDK_MOD1_MASK ) );
 +      GlobalCommands_insert( "CloneSelection", makeCallbackF(Selection_Clone), Accelerator( GDK_KEY_space ) );
 +      GlobalCommands_insert( "CloneSelectionAndMakeUnique", makeCallbackF(Selection_Clone_MakeUnique), Accelerator( GDK_KEY_space, (GdkModifierType)GDK_SHIFT_MASK ) );
 +//    GlobalCommands_insert( "DeleteSelection", makeCallbackF(deleteSelection), Accelerator( GDK_KEY_BackSpace ) );
 +      GlobalCommands_insert( "DeleteSelection2", makeCallbackF(deleteSelection), Accelerator( GDK_KEY_BackSpace ) );
 +      GlobalCommands_insert( "DeleteSelection", makeCallbackF(deleteSelection), Accelerator( 'Z' ) );
 +      GlobalCommands_insert( "ParentSelection", makeCallbackF(Scene_parentSelected) );
 +//    GlobalCommands_insert( "UnSelectSelection", makeCallbackF(Selection_Deselect), Accelerator( GDK_KEY_Escape ) );
 +      GlobalCommands_insert( "UnSelectSelection2", makeCallbackF(Selection_Deselect), Accelerator( GDK_KEY_Escape ) );
 +      GlobalCommands_insert( "UnSelectSelection", makeCallbackF(Selection_Deselect), Accelerator( 'C' ) );
 +      GlobalCommands_insert( "InvertSelection", makeCallbackF(Select_Invert), Accelerator( 'I' ) );
 +      GlobalCommands_insert( "SelectInside", makeCallbackF(Select_Inside) );
 +      GlobalCommands_insert( "SelectTouching", makeCallbackF(Select_Touching) );
 +      GlobalCommands_insert( "ExpandSelectionToEntities", makeCallbackF(Scene_ExpandSelectionToEntities), Accelerator( 'E', (GdkModifierType)( GDK_MOD1_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "Preferences", makeCallbackF(PreferencesDialog_showDialog), Accelerator( 'P' ) );
 +
 +      GlobalCommands_insert( "ToggleConsole", makeCallbackF(Console_ToggleShow), Accelerator( 'O' ) );
 +      GlobalCommands_insert( "ToggleEntityInspector", makeCallbackF(EntityInspector_ToggleShow), Accelerator( 'N' ) );
 +      GlobalCommands_insert( "EntityList", makeCallbackF(EntityList_toggleShown), Accelerator( 'L' ) );
 +
- //    GlobalCommands_insert( "ShowHidden", FreeCaller<Select_ShowAllHidden>(), Accelerator( 'H', (GdkModifierType)GDK_SHIFT_MASK ) );
- //    GlobalCommands_insert( "HideSelected", FreeCaller<HideSelected>(), Accelerator( 'H' ) );
++//    GlobalCommands_insert( "ShowHidden", makeCallbackF( Select_ShowAllHidden ), Accelerator( 'H', (GdkModifierType)GDK_SHIFT_MASK ) );
++//    GlobalCommands_insert( "HideSelected", makeCallbackF( HideSelected ), Accelerator( 'H' ) );
 +
        Select_registerCommands();
  
 -      GlobalToggles_insert( "DragVertices", FreeCaller<SelectVertexMode>(), ToggleItem::AddCallbackCaller( g_vertexMode_button ), Accelerator( 'V' ) );
 -      GlobalToggles_insert( "DragEdges", FreeCaller<SelectEdgeMode>(), ToggleItem::AddCallbackCaller( g_edgeMode_button ), Accelerator( 'E' ) );
 -      GlobalToggles_insert( "DragFaces", FreeCaller<SelectFaceMode>(), ToggleItem::AddCallbackCaller( g_faceMode_button ), Accelerator( 'F' ) );
 +      GlobalToggles_insert( "DragVertices", makeCallbackF(SelectVertexMode), ToggleItem::AddCallbackCaller( g_vertexMode_button ), Accelerator( 'V' ) );
 +      GlobalToggles_insert( "DragEdges", makeCallbackF(SelectEdgeMode), ToggleItem::AddCallbackCaller( g_edgeMode_button ), Accelerator( 'E' ) );
 +      GlobalToggles_insert( "DragFaces", makeCallbackF(SelectFaceMode), ToggleItem::AddCallbackCaller( g_faceMode_button ), Accelerator( 'F' ) );
  
 -      GlobalCommands_insert( "ArbitraryRotation", FreeCaller<DoRotateDlg>(), Accelerator( 'R', (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "ArbitraryScale", FreeCaller<DoScaleDlg>(), Accelerator( 'S', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "ArbitraryRotation", makeCallbackF(DoRotateDlg), Accelerator( 'R', (GdkModifierType)GDK_SHIFT_MASK ) );
 +      GlobalCommands_insert( "ArbitraryScale", makeCallbackF(DoScaleDlg), Accelerator( 'S', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
  
 -      GlobalCommands_insert( "BuildMenuCustomize", FreeCaller<DoBuildMenu>() );
 -      GlobalCommands_insert( "Build_runRecentExecutedBuild", FreeCaller<Build_runRecentExecutedBuild>(), Accelerator( GDK_F5 ) );
 +      GlobalCommands_insert( "BuildMenuCustomize", makeCallbackF(DoBuildMenu) );
 +      GlobalCommands_insert( "Build_runRecentExecutedBuild", makeCallbackF(Build_runRecentExecutedBuild), Accelerator( GDK_F5 ) );
  
 -      GlobalCommands_insert( "FindBrush", FreeCaller<DoFind>() );
 +      GlobalCommands_insert( "FindBrush", makeCallbackF(DoFind) );
  
 -      GlobalCommands_insert( "MapInfo", FreeCaller<DoMapInfo>(), Accelerator( 'M' ) );
 +      GlobalCommands_insert( "MapInfo", makeCallbackF(DoMapInfo), Accelerator( 'M' ) );
  
  
 -      GlobalToggles_insert( "ToggleClipper", FreeCaller<ClipperMode>(), ToggleItem::AddCallbackCaller( g_clipper_button ), Accelerator( 'X' ) );
 +      GlobalToggles_insert( "ToggleClipper", makeCallbackF(ClipperMode), ToggleItem::AddCallbackCaller( g_clipper_button ), Accelerator( 'X' ) );
  
 -      GlobalToggles_insert( "MouseTranslate", FreeCaller<TranslateMode>(), ToggleItem::AddCallbackCaller( g_translatemode_button ), Accelerator( 'W' ) );
 -      GlobalToggles_insert( "MouseRotate", FreeCaller<RotateMode>(), ToggleItem::AddCallbackCaller( g_rotatemode_button ), Accelerator( 'R' ) );
 -      GlobalToggles_insert( "MouseScale", FreeCaller<ScaleMode>(), ToggleItem::AddCallbackCaller( g_scalemode_button ) );
 -      GlobalToggles_insert( "MouseDrag", FreeCaller<DragMode>(), ToggleItem::AddCallbackCaller( g_dragmode_button ) );
 -      GlobalCommands_insert( "MouseRotateOrScale", FreeCaller<ToggleRotateScaleModes>() );
 -      GlobalCommands_insert( "MouseDragOrScale", FreeCaller<ToggleDragScaleModes>(), Accelerator( 'Q' ) );
 +      GlobalToggles_insert( "MouseTranslate", makeCallbackF(TranslateMode), ToggleItem::AddCallbackCaller( g_translatemode_button ), Accelerator( 'W' ) );
 +      GlobalToggles_insert( "MouseRotate", makeCallbackF(RotateMode), ToggleItem::AddCallbackCaller( g_rotatemode_button ), Accelerator( 'R' ) );
 +      GlobalToggles_insert( "MouseScale", makeCallbackF(ScaleMode), ToggleItem::AddCallbackCaller( g_scalemode_button ) );
 +      GlobalToggles_insert( "MouseDrag", makeCallbackF(DragMode), ToggleItem::AddCallbackCaller( g_dragmode_button ) );
 +      GlobalCommands_insert( "MouseRotateOrScale", makeCallbackF(ToggleRotateScaleModes) );
 +      GlobalCommands_insert( "MouseDragOrScale", makeCallbackF(ToggleDragScaleModes), Accelerator( 'Q' ) );
  
 -      GlobalCommands_insert( "gtkThemeDlg", FreeCaller<gtkThemeDlg>() );
 -      GlobalCommands_insert( "ColorSchemeOriginal", FreeCaller<ColorScheme_Original>() );
 -      GlobalCommands_insert( "ColorSchemeQER", FreeCaller<ColorScheme_QER>() );
 -      GlobalCommands_insert( "ColorSchemeBlackAndGreen", FreeCaller<ColorScheme_Black>() );
 -      GlobalCommands_insert( "ColorSchemeYdnar", FreeCaller<ColorScheme_Ydnar>() );
 +#ifndef GARUX_DISABLE_GTKTHEME
 +      GlobalCommands_insert( "gtkThemeDlg", makeCallbackF(gtkThemeDlg) );
 +#endif
 +      GlobalCommands_insert( "ColorSchemeOriginal", makeCallbackF(ColorScheme_Original) );
 +      GlobalCommands_insert( "ColorSchemeQER", makeCallbackF(ColorScheme_QER) );
 +      GlobalCommands_insert( "ColorSchemeBlackAndGreen", makeCallbackF(ColorScheme_Black) );
 +      GlobalCommands_insert( "ColorSchemeYdnar", makeCallbackF(ColorScheme_Ydnar) );
        GlobalCommands_insert( "ChooseTextureBackgroundColor", makeCallback( g_ColoursMenu.m_textureback ) );
        GlobalCommands_insert( "ChooseGridBackgroundColor", makeCallback( g_ColoursMenu.m_xyback ) );
        GlobalCommands_insert( "ChooseGridMajorColor", makeCallback( g_ColoursMenu.m_gridmajor ) );
@@@ -3740,7 -3558,7 +3744,7 @@@ void MainFrame_Destroy()
  
  
  void GLWindow_Construct(){
-       GlobalPreferenceSystem().registerPreference( "MouseButtons", make_property_string( g_glwindow_globals.m_nMouseType ) );
 -//    GlobalPreferenceSystem().registerPreference( "MouseButtons", IntImportStringCaller( g_glwindow_globals.m_nMouseType ), IntExportStringCaller( g_glwindow_globals.m_nMouseType ) );
++//    GlobalPreferenceSystem().registerPreference( "MouseButtons", make_property_string( g_glwindow_globals.m_nMouseType ) );
  }
  
  void GLWindow_Destroy(){
index ba9d94b10c0b85c44720fd4bdb69d9a7a2d91040,1d9cfad7fc6d218dbcaf6e4b474c3e5cc131e210..296319cc44f7645513ce4ec23f5298a2d2e7ad15
@@@ -144,8 -145,8 +144,8 @@@ bool FloatingGroupDialog()
  
  extern MainFrame* g_pParentWnd;
  
 -GtkWindow* MainFrame_getWindow();
 +ui::Window MainFrame_getWindow();
+ /*
  enum EMouseButtonMode
  {
        ETwoButton = 0,
@@@ -164,10 -165,11 +164,10 @@@ struct glwindow_globals_
  void GLWindow_Construct();
  void GLWindow_Destroy();
  
- extern glwindow_globals_t g_glwindow_globals;
//extern glwindow_globals_t g_glwindow_globals;
  template<typename Value>
  class LatchedValue;
 -typedef LatchedValue<bool> LatchedBool;
 -extern LatchedBool g_Layout_enableDetachableMenus;
 +extern LatchedValue<bool> g_Layout_enableDetachableMenus;
  
  void deleteSelection();
  
Simple merge
Simple merge
Simple merge
diff --cc radiant/view.h
Simple merge
index e573d6568d55dcd13035df48c6c81bbcbaeda1a8,0f7857417a9014a2df97c81edc5ec28297e69b8d..f1d3888a74c1eb9ba8c275b6a8cab361a2b564c6
@@@ -372,11 -368,9 +372,11 @@@ struct xywindow_globals_private_
  
                show_blocks( false ),
  
              m_bCamXYUpdate( true ),
//            m_bCamXYUpdate( true ),
                m_bChaseMouse( true ),
 -              m_bSizePaint( true ){
 +              m_bSizePaint( true ),
 +
 +              g_bCrossHairs( false ){
        }
  
  };
@@@ -1212,12 -1235,12 +1240,12 @@@ void addItem( const char* name, const c
  };
  
  void XYWnd::OnContextMenu(){
      if ( g_xywindow_globals.m_bRightClick == false ) {
              return;
      }
//    if ( g_xywindow_globals.m_bRightClick == false ) {
//            return;
//    }
  
 -      if ( m_mnuDrop == 0 ) { // first time, load it up
 -              GtkMenu* menu = m_mnuDrop = GTK_MENU( gtk_menu_new() );
 +      if ( !m_mnuDrop ) { // first time, load it up
 +              auto menu = m_mnuDrop = ui::Menu(ui::New);
  
                EntityClassMenuInserter inserter( menu );
                GlobalEntityClassManager().forEach( inserter );
@@@ -3066,47 -3013,45 +3095,47 @@@ void XYWindow_Construct()
        GlobalToggles_insert( "ToggleView", ToggleShown::ToggleCaller( g_xy_top_shown ), ToggleItem::AddCallbackCaller( g_xy_top_shown.m_item ), Accelerator( 'V', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
        GlobalToggles_insert( "ToggleSideView", ToggleShown::ToggleCaller( g_yz_side_shown ), ToggleItem::AddCallbackCaller( g_yz_side_shown.m_item ) );
        GlobalToggles_insert( "ToggleFrontView", ToggleShown::ToggleCaller( g_xz_front_shown ), ToggleItem::AddCallbackCaller( g_xz_front_shown.m_item ) );
 -      GlobalCommands_insert( "NextView", FreeCaller<XY_Next>(), Accelerator( GDK_Tab, (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "ZoomIn", FreeCaller<XY_ZoomIn>(), Accelerator( GDK_Delete ) );
 -      GlobalCommands_insert( "ZoomOut", FreeCaller<XY_ZoomOut>(), Accelerator( GDK_Insert ) );
 -      GlobalCommands_insert( "ViewTop", FreeCaller<XY_Top>(), Accelerator( GDK_KP_Home ) );
 -      GlobalCommands_insert( "ViewSide", FreeCaller<XY_Side>(), Accelerator( GDK_KP_Page_Down ) );
 -      GlobalCommands_insert( "ViewFront", FreeCaller<XY_Front>(), Accelerator( GDK_KP_End ) );
 -      GlobalCommands_insert( "Zoom100", FreeCaller<XY_Zoom100>() );
 -      GlobalCommands_insert( "CenterXYView", FreeCaller<XY_Focus>(), Accelerator( GDK_Tab, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "ClipCaulk", BoolImportStringCaller( g_clip_useCaulk ), BoolExportStringCaller( g_clip_useCaulk ) );
 -
 -//    GlobalPreferenceSystem().registerPreference( "NewRightClick", BoolImportStringCaller( g_xywindow_globals.m_bRightClick ), BoolExportStringCaller( g_xywindow_globals.m_bRightClick ) );
 -      GlobalPreferenceSystem().registerPreference( "ImprovedWheelZoom", BoolImportStringCaller( g_xywindow_globals.m_bImprovedWheelZoom ), BoolExportStringCaller( g_xywindow_globals.m_bImprovedWheelZoom ) );
 -      GlobalPreferenceSystem().registerPreference( "ChaseMouse", BoolImportStringCaller( g_xywindow_globals_private.m_bChaseMouse ), BoolExportStringCaller( g_xywindow_globals_private.m_bChaseMouse ) );
 -      GlobalPreferenceSystem().registerPreference( "SizePainting", BoolImportStringCaller( g_xywindow_globals_private.m_bSizePaint ), BoolExportStringCaller( g_xywindow_globals_private.m_bSizePaint ) );
 -      GlobalPreferenceSystem().registerPreference( "ShowCrosshair", BoolImportStringCaller( g_bCrossHairs ), BoolExportStringCaller( g_bCrossHairs ) );
 -      GlobalPreferenceSystem().registerPreference( "NoStipple", BoolImportStringCaller( g_xywindow_globals.m_bNoStipple ), BoolExportStringCaller( g_xywindow_globals.m_bNoStipple ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_ShowCoords", BoolImportStringCaller( g_xywindow_globals_private.show_coordinates ), BoolExportStringCaller( g_xywindow_globals_private.show_coordinates ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_ShowOutlines", BoolImportStringCaller( g_xywindow_globals_private.show_outline ), BoolExportStringCaller( g_xywindow_globals_private.show_outline ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_ShowAxis", BoolImportStringCaller( g_xywindow_globals_private.show_axis ), BoolExportStringCaller( g_xywindow_globals_private.show_axis ) );
 -//    GlobalPreferenceSystem().registerPreference( "CamXYUpdate", BoolImportStringCaller( g_xywindow_globals_private.m_bCamXYUpdate ), BoolExportStringCaller( g_xywindow_globals_private.m_bCamXYUpdate ) );
 -      GlobalPreferenceSystem().registerPreference( "ShowWorkzone", BoolImportStringCaller( g_xywindow_globals_private.d_show_work ), BoolExportStringCaller( g_xywindow_globals_private.d_show_work ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "SI_AxisColors0", Vector3ImportStringCaller( g_xywindow_globals.AxisColorX ), Vector3ExportStringCaller( g_xywindow_globals.AxisColorX ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_AxisColors1", Vector3ImportStringCaller( g_xywindow_globals.AxisColorY ), Vector3ExportStringCaller( g_xywindow_globals.AxisColorY ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_AxisColors2", Vector3ImportStringCaller( g_xywindow_globals.AxisColorZ ), Vector3ExportStringCaller( g_xywindow_globals.AxisColorZ ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors1", Vector3ImportStringCaller( g_xywindow_globals.color_gridback ), Vector3ExportStringCaller( g_xywindow_globals.color_gridback ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors2", Vector3ImportStringCaller( g_xywindow_globals.color_gridminor ), Vector3ExportStringCaller( g_xywindow_globals.color_gridminor ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors3", Vector3ImportStringCaller( g_xywindow_globals.color_gridmajor ), Vector3ExportStringCaller( g_xywindow_globals.color_gridmajor ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors6", Vector3ImportStringCaller( g_xywindow_globals.color_gridblock ), Vector3ExportStringCaller( g_xywindow_globals.color_gridblock ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors7", Vector3ImportStringCaller( g_xywindow_globals.color_gridtext ), Vector3ExportStringCaller( g_xywindow_globals.color_gridtext ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors8", Vector3ImportStringCaller( g_xywindow_globals.color_brushes ), Vector3ExportStringCaller( g_xywindow_globals.color_brushes ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors9", Vector3ImportStringCaller( g_xywindow_globals.color_viewname ), Vector3ExportStringCaller( g_xywindow_globals.color_viewname ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors10", Vector3ImportStringCaller( g_xywindow_globals.color_clipper ), Vector3ExportStringCaller( g_xywindow_globals.color_clipper ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors11", Vector3ImportStringCaller( g_xywindow_globals.color_selbrushes ), Vector3ExportStringCaller( g_xywindow_globals.color_selbrushes ) );
 -
 -
 -      GlobalPreferenceSystem().registerPreference( "XZVIS", makeBoolStringImportCallback( ToggleShownImportBoolCaller( g_xz_front_shown ) ), makeBoolStringExportCallback( ToggleShownExportBoolCaller( g_xz_front_shown ) ) );
 -      GlobalPreferenceSystem().registerPreference( "YZVIS", makeBoolStringImportCallback( ToggleShownImportBoolCaller( g_yz_side_shown ) ), makeBoolStringExportCallback( ToggleShownExportBoolCaller( g_yz_side_shown ) ) );
 +      GlobalCommands_insert( "NextView", makeCallbackF(XY_Next), Accelerator( GDK_KEY_Tab, (GdkModifierType)GDK_CONTROL_MASK ) ); // fixme: doesn't show its shortcut
 +      GlobalCommands_insert( "ZoomIn", makeCallbackF(XY_ZoomIn), Accelerator( GDK_KEY_Delete ) );
 +      GlobalCommands_insert( "ZoomOut", makeCallbackF(XY_ZoomOut), Accelerator( GDK_KEY_Insert ) );
 +      GlobalCommands_insert( "ViewTop", makeCallbackF(XY_Top), Accelerator( GDK_KEY_KP_Home ) );
 +      GlobalCommands_insert( "ViewSide", makeCallbackF(XY_Side), Accelerator( GDK_KEY_KP_Page_Down ) );
 +      GlobalCommands_insert( "ViewFront", makeCallbackF(XY_Front), Accelerator( GDK_KEY_KP_End ) );
 +      GlobalCommands_insert( "Zoom100", makeCallbackF(XY_Zoom100) );
 +      GlobalCommands_insert( "CenterXYView", makeCallbackF(XY_Focus), Accelerator( GDK_KEY_Tab, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +
 +      GlobalPreferenceSystem().registerPreference( "ClipCaulk", make_property_string( g_clip_useCaulk ) );
 +
-       GlobalPreferenceSystem().registerPreference( "NewRightClick", make_property_string( g_xywindow_globals.m_bRightClick ) );
++//    GlobalPreferenceSystem().registerPreference( "NewRightClick", make_property_string( g_xywindow_globals.m_bRightClick ) );
 +      GlobalPreferenceSystem().registerPreference( "ImprovedWheelZoom", make_property_string( g_xywindow_globals.m_bImprovedWheelZoom ) );
 +      GlobalPreferenceSystem().registerPreference( "ChaseMouse", make_property_string( g_xywindow_globals_private.m_bChaseMouse ) );
 +      GlobalPreferenceSystem().registerPreference( "SizePainting", make_property_string( g_xywindow_globals_private.m_bSizePaint ) );
 +      GlobalPreferenceSystem().registerPreference( "ShowCrosshair", make_property_string( g_xywindow_globals_private.g_bCrossHairs ) );
 +      GlobalPreferenceSystem().registerPreference( "NoStipple", make_property_string( g_xywindow_globals.m_bNoStipple ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_ShowCoords", make_property_string( g_xywindow_globals_private.show_coordinates ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_ShowOutlines", make_property_string( g_xywindow_globals_private.show_outline ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_ShowAxis", make_property_string( g_xywindow_globals_private.show_axis ) );
-       GlobalPreferenceSystem().registerPreference( "CamXYUpdate", make_property_string( g_xywindow_globals_private.m_bCamXYUpdate ) );
++//    GlobalPreferenceSystem().registerPreference( "CamXYUpdate", make_property_string( g_xywindow_globals_private.m_bCamXYUpdate ) );
 +      GlobalPreferenceSystem().registerPreference( "ShowWorkzone", make_property_string( g_xywindow_globals_private.d_show_work ) );
 +
 +      GlobalPreferenceSystem().registerPreference( "SI_AxisColors0", make_property_string( g_xywindow_globals.AxisColorX ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_AxisColors1", make_property_string( g_xywindow_globals.AxisColorY ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_AxisColors2", make_property_string( g_xywindow_globals.AxisColorZ ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors1", make_property_string( g_xywindow_globals.color_gridback ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors2", make_property_string( g_xywindow_globals.color_gridminor ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors3", make_property_string( g_xywindow_globals.color_gridmajor ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors6", make_property_string( g_xywindow_globals.color_gridblock ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors7", make_property_string( g_xywindow_globals.color_gridtext ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors8", make_property_string( g_xywindow_globals.color_brushes ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors9", make_property_string( g_xywindow_globals.color_viewname ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors10", make_property_string( g_xywindow_globals.color_clipper ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors11", make_property_string( g_xywindow_globals.color_selbrushes ) );
 +
 +
 +
 +
 +      GlobalPreferenceSystem().registerPreference( "XZVIS", make_property_string<ToggleShown_Bool>( g_xz_front_shown ) );
 +      GlobalPreferenceSystem().registerPreference( "YZVIS", make_property_string<ToggleShown_Bool>( g_yz_side_shown ) );
  
        Orthographic_registerPreferencesPage();
        Clipper_registerPreferencesPage();
Simple merge