[gtkmm] Demos: Fix the build when using -Wshadow.



commit 5d5c4523722e201ac5c6f3d922e5d3a4ca852afa
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jul 16 09:33:41 2015 +0200

    Demos: Fix the build when using -Wshadow.

 demos/gtk-demo/example_drawingarea.cc |   16 ++++++++--------
 demos/gtk-demo/example_iconbrowser.cc |    4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/demos/gtk-demo/example_drawingarea.cc b/demos/gtk-demo/example_drawingarea.cc
index 564b617..6730f03 100644
--- a/demos/gtk-demo/example_drawingarea.cc
+++ b/demos/gtk-demo/example_drawingarea.cc
@@ -181,7 +181,7 @@ bool Example_DrawingArea::on_drawingarea_scribble_configure_event(GdkEventConfig
   return true;
 }
 
-bool Example_DrawingArea::on_drawingarea_scribble_motion_notify_event(GdkEventMotion* event)
+bool Example_DrawingArea::on_drawingarea_scribble_motion_notify_event(GdkEventMotion* motion_event)
 {
   if(!m_surface)
     return false; // paranoia check, in case we haven't gotten a configure event
@@ -190,21 +190,21 @@ bool Example_DrawingArea::on_drawingarea_scribble_motion_notify_event(GdkEventMo
    * don't call Gdk::Window::get_device_position() you'll only get a single motion
    * event.  The reason is that we specified Gdk::POINTER_MOTION_HINT_MASK to
    * Gtk::Widget::add_events().  If we hadn't specified that, we could just use
-   * event->x, event->y as the pointer location. But we'd also get deluged in
+   * motion_event->x, motion_event->y as the pointer location. But we'd also get deluged in
    * events.  By requesting the next event as we handle the current one, we
    * avoid getting a huge number of events faster than we can cope.
    */
-  if(event && event->window)
+  if(motion_event && motion_event->window)
   {
     const Glib::RefPtr<Gdk::Window> refWindow =
-        Glib::wrap(event->window, true); // true == take_copy
+        Glib::wrap(motion_event->window, true); // true == take_copy
 
     if(refWindow)
     {
       int x = 0, y = 0;
       Gdk::ModifierType state = Gdk::ModifierType(0);
       const Glib::RefPtr<const Gdk::Device> device =
-        Glib::wrap(event->device, true); // true == take_copy
+        Glib::wrap(motion_event->device, true); // true == take_copy
       refWindow->get_device_position(device, x, y, state);
 
       if((state & Gdk::BUTTON1_MASK) != 0)
@@ -216,13 +216,13 @@ bool Example_DrawingArea::on_drawingarea_scribble_motion_notify_event(GdkEventMo
   return true;
 }
 
-bool Example_DrawingArea::on_drawingarea_scribble_button_press_event(GdkEventButton* event)
+bool Example_DrawingArea::on_drawingarea_scribble_button_press_event(GdkEventButton* button_event)
 {
   if(!m_surface)
     return false; // paranoia check, in case we haven't gotten a configure event
 
-  if(event->button == 1)
-    scribble_draw_brush(int(event->x), int(event->y));
+  if(button_event->button == 1)
+    scribble_draw_brush(int(button_event->x), int(button_event->y));
 
   // We've handled the event, stop processing.
   return true;
diff --git a/demos/gtk-demo/example_iconbrowser.cc b/demos/gtk-demo/example_iconbrowser.cc
index 229a197..477d0b3 100644
--- a/demos/gtk-demo/example_iconbrowser.cc
+++ b/demos/gtk-demo/example_iconbrowser.cc
@@ -271,9 +271,9 @@ Example_IconBrowser::~Example_IconBrowser()
 {
 }
 
-bool Example_IconBrowser::on_window_key_press_event(GdkEventKey* event)
+bool Example_IconBrowser::on_window_key_press_event(GdkEventKey* key_press_event)
 {
-  return m_search_bar.handle_event(event);
+  return m_search_bar.handle_event(key_press_event);
 }
 
 void Example_IconBrowser::on_symbolic_radio_toggled()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]