]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/colordlg.cpp
Do not define __VISUALC__ for Intel C++ compiler under Windows.
[wxWidgets.git] / src / gtk / colordlg.cpp
index ed38b7d9332b870e8bf6f2acfdf9a41c994632c5..781a2316e1e8c68408604b4b0e70205c02e5573f 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Vaclav Slavik
 // Modified by:
 // Created:     2004/06/04
-// RCS-ID:      $Id$
 // Copyright:   (c) Vaclav Slavik, 2004
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -19,6 +18,7 @@
 #if wxUSE_COLOURDLG
 
 #include "wx/colordlg.h"
+#include "wx/modalhook.h"
 
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
@@ -27,6 +27,7 @@
 #include <gtk/gtk.h>
 #include "wx/gtk/private.h"
 #include "wx/gtk/private/gtk2-compat.h"
+#include "wx/gtk/private/dialogcount.h"
 
 #if wxUSE_LIBHILDON
     #include <hildon-widgets/hildon-color-selector.h>
@@ -82,8 +83,12 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
 
 int wxColourDialog::ShowModal()
 {
+    WX_HOOK_MODAL_DIALOG();
+
     ColourDataToDialog();
 
+    wxOpenModalDialogLocker modalLocker;
+
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
     gtk_widget_hide(m_widget);
 
@@ -131,13 +136,13 @@ void wxColourDialog::ColourDataToDialog()
         gtk_color_selection_dialog_get_color_selection(
         GTK_COLOR_SELECTION_DIALOG(m_widget)));
 
-    const wxColour& c = m_data.GetColour();
-    if (c.IsOk())
+    const wxColour& color = m_data.GetColour();
+    if (color.IsOk())
     {
 #ifdef __WXGTK3__
-        gtk_color_selection_set_current_rgba(sel, c);
+        gtk_color_selection_set_current_rgba(sel, color);
 #else
-        gtk_color_selection_set_current_color(sel, c.GetColor());
+        gtk_color_selection_set_current_color(sel, color.GetColor());
 #endif
     }