From c93f7a1ecc2a5e72f41d8ea9d59cd268c9c04223 Mon Sep 17 00:00:00 2001 From: "Timothee \"TTimo\" Besset" Date: Sun, 7 Jul 2013 08:08:38 -0500 Subject: [PATCH] cosmetic - this code isn't used anyway, surface inspector logic has moved to a plugin? --- radiant/surfacedialog.cpp | 38 ++++++++++++++---------------- radiant/surfacedialog.h | 49 +++++++++++++++++++-------------------- 2 files changed, 42 insertions(+), 45 deletions(-) diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index 0b6a467e..83c2e93a 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -273,25 +273,23 @@ static void OnCancel( GtkWidget *widget, gpointer data ){ g_dlgSurface.HideDlg(); } -static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ){ - if ( g_surfwin ) { - if ( event->keyval == GDK_Return ) { - if ( g_dlgSurface.m_bEditingTextureWidget ) { - OnApply( NULL, NULL ); - g_dlgSurface.m_bEditingTextureWidget = false; - } - else - { - OnDone( NULL, NULL ); - } - return TRUE; - } - if ( event->keyval == GDK_Escape ) { - OnCancel( NULL, NULL ); - return TRUE; - } - } - return FALSE; +static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ) { + if ( g_surfwin ) { + if ( event->keyval == GDK_Return ) { + if ( g_dlgSurface.m_bEditingTextureWidget ) { + OnApply( NULL, NULL ); + g_dlgSurface.m_bEditingTextureWidget = false; + } else { + OnDone( NULL, NULL ); + } + return TRUE; + } + if ( event->keyval == GDK_Escape ) { + OnCancel( NULL, NULL ); + return TRUE; + } + } + return FALSE; } // the widget can be one of hshift, vshift, hscale, vscale, rotate @@ -499,7 +497,7 @@ void SurfaceDlg::InitDefaultIncrement( texdef_t *tex ){ tex->rotate = 10; } -void SurfaceDlg::BuildDialog(){ +void SurfaceDlg::BuildDialog() { GtkWidget *dlg, *vbox, *hbox2, *frame, *table, *label; GtkWidget *button, *entry, *spin; diff --git a/radiant/surfacedialog.h b/radiant/surfacedialog.h index 159b73ff..e4b697df 100644 --- a/radiant/surfacedialog.h +++ b/radiant/surfacedialog.h @@ -28,42 +28,41 @@ //#define DBG_SI 1 #endif -class SurfaceDlg : public Dialog -{ -bool m_bPatchMode; -// brush primitive fake shift scale rot coords -float m_shift[2]; -float m_rotate; -float m_scale[2]; +class SurfaceDlg : public Dialog { + bool m_bPatchMode; + // brush primitive fake shift scale rot coords + float m_shift[2]; + float m_rotate; + float m_scale[2]; public: -SurfaceDlg (); + SurfaceDlg(); -virtual void ShowDlg(); -virtual void HideDlg(); -void SetTexMods(); -void GetTexMods(); + virtual void ShowDlg(); + virtual void HideDlg(); + void SetTexMods(); + void GetTexMods(); -void InitDefaultIncrement( texdef_t * ); + void InitDefaultIncrement( texdef_t * ); -// Dialog Data -int m_nHeight; -int m_nWidth; + // Dialog Data + int m_nHeight; + int m_nWidth; -// 0 is invalid, otherwise it's the Id of the last 'do' we are responsible for -int m_nUndoId; + // 0 is invalid, otherwise it's the Id of the last 'do' we are responsible for + int m_nUndoId; -// is the user editing the texture widget (that changes the behaviour of 'Enter' key from OnDone to OnApply -// reset to false at each SetTexMods or when dealing with Enter key -bool m_bEditingTextureWidget; + // is the user editing the texture widget (that changes the behaviour of 'Enter' key from OnDone to OnApply + // reset to false at each SetTexMods or when dealing with Enter key + bool m_bEditingTextureWidget; protected: -void BuildDialog(); + void BuildDialog(); public: -// called to perform a fitting from the outside (shortcut key) -void FitAll(); -GtkWidget *GetWidget(); // { return m_pWidget; } + // called to perform a fitting from the outside (shortcut key) + void FitAll(); + GtkWidget *GetWidget(); }; #endif // _SURFACEDIALOG_H_