[glom] event handlers: Rename the event parameters.



commit 930d7c67114fe787b2180c9fb7a40982d0b90b53
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jul 6 13:39:26 2015 +0200

    event handlers: Rename the event parameters.
    
    Because they shadow an event() method in gtkmm.

 glom/mode_data/box_data_calendar_related.cc        |    8 ++++----
 glom/mode_data/buttonglom.cc                       |    8 ++++----
 glom/mode_data/datawidget/checkbutton.cc           |    8 ++++----
 glom/mode_data/datawidget/combo.cc                 |    8 ++++----
 .../mode_data/datawidget/combo_as_radio_buttons.cc |   16 ++++++++--------
 glom/mode_data/datawidget/datawidget.cc            |    8 ++++----
 glom/mode_data/datawidget/datawidget.h             |    2 +-
 glom/mode_data/datawidget/entry.cc                 |   12 ++++++------
 glom/mode_data/datawidget/entry.h                  |    2 +-
 glom/mode_data/datawidget/label.cc                 |    8 ++++----
 glom/mode_data/datawidget/textview.cc              |   12 ++++++------
 glom/mode_data/datawidget/textview.h               |    2 +-
 glom/mode_data/db_adddel/db_adddel.cc              |   19 +++++++++----------
 glom/mode_data/db_adddel/db_adddel.h               |    6 +++---
 glom/mode_data/flowtablewithfields.cc              |    8 ++++----
 .../print_layouts/window_print_layout_edit.cc      |   18 +++++++++---------
 .../print_layouts/window_print_layout_edit.h       |    8 ++++----
 glom/print_layout/canvas_print_layout.h            |    2 +-
 glom/utility_widgets/adddel/adddel.cc              |   12 ++++++------
 glom/utility_widgets/adddel/adddel.h               |    4 ++--
 glom/utility_widgets/imageglom.cc                  |   10 +++++-----
 glom/utility_widgets/notebooklabelglom.cc          |    9 +++++----
 22 files changed, 95 insertions(+), 95 deletions(-)
---
diff --git a/glom/mode_data/box_data_calendar_related.cc b/glom/mode_data/box_data_calendar_related.cc
index a10c481..8889433 100644
--- a/glom/mode_data/box_data_calendar_related.cc
+++ b/glom/mode_data/box_data_calendar_related.cc
@@ -538,7 +538,7 @@ void Box_Data_Calendar_Related::setup_menu(Gtk::Widget* /* this */)
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 }
 
-void Box_Data_Calendar_Related::on_calendar_button_press_event(GdkEventButton *event)
+void Box_Data_Calendar_Related::on_calendar_button_press_event(GdkEventButton *button_event)
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Enable/Disable items.
@@ -552,16 +552,16 @@ void Box_Data_Calendar_Related::on_calendar_button_press_event(GdkEventButton *e
 #endif
 
   GdkModifierType mods;
-  gdk_window_get_device_position( gtk_widget_get_window(Gtk::Widget::gobj()), event->device, 0, 0, &mods );
+  gdk_window_get_device_position( gtk_widget_get_window(Gtk::Widget::gobj()), button_event->device, 0, 0, 
&mods );
   if(mods & GDK_BUTTON3_MASK)
   {
     //Give user choices of actions on this item:
-    m_pMenuPopup->popup(event->button, event->time);
+    m_pMenuPopup->popup(button_event->button, button_event->time);
     return; //handled.
   }
   else
   {
-    if(event->type == GDK_2BUTTON_PRESS)
+    if(button_event->type == GDK_2BUTTON_PRESS)
     {
       //Double-click means edit.
       //Don't do this usually, because users sometimes double-click by accident when they just want to edit 
a cell.
diff --git a/glom/mode_data/buttonglom.cc b/glom/mode_data/buttonglom.cc
index 14d558f..e87d5fc 100644
--- a/glom/mode_data/buttonglom.cc
+++ b/glom/mode_data/buttonglom.cc
@@ -82,21 +82,21 @@ void ButtonGlom::on_menu_properties_activate()
   delete dialog;
 }
 
-bool ButtonGlom::on_button_press_event(GdkEventButton *event)
+bool ButtonGlom::on_button_press_event(GdkEventButton *button_event)
 {
   AppWindow* pApp = get_appwindow();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     GdkModifierType mods;
-    gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, &mods 
);
+    gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 0, 
&mods );
     if(mods & GDK_BUTTON3_MASK)
     {
       //Give user choices of actions on this item:
-      m_pPopupMenuUtils->popup(event->button, event->time);
+      m_pPopupMenuUtils->popup(button_event->button, button_event->time);
       return true; //We handled this event.
     }
   }
-  return Gtk::Button::on_button_press_event(event);
+  return Gtk::Button::on_button_press_event(button_event);
 }
 #endif
 
diff --git a/glom/mode_data/datawidget/checkbutton.cc b/glom/mode_data/datawidget/checkbutton.cc
index 636b074..c0f044d 100644
--- a/glom/mode_data/datawidget/checkbutton.cc
+++ b/glom/mode_data/datawidget/checkbutton.cc
@@ -51,7 +51,7 @@ void CheckButton::init()
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool CheckButton::on_button_press_event(GdkEventButton *event)
+bool CheckButton::on_button_press_event(GdkEventButton *button_event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_appwindow is more likely to work now:
@@ -70,16 +70,16 @@ bool CheckButton::on_button_press_event(GdkEventButton *event)
     if(pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
     {
       GdkModifierType mods;
-      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, 
&mods );
+      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 
0, &mods );
       if(mods & GDK_BUTTON3_MASK)
       {
         //Give user choices of actions on this item:
-        m_pMenuPopup->popup(event->button, event->time);
+        m_pMenuPopup->popup(button_event->button, button_event->time);
         return true; //We handled this event.
       }
     }
   }
-  return Gtk::CheckButton::on_button_press_event(event);
+  return Gtk::CheckButton::on_button_press_event(button_event);
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/mode_data/datawidget/combo.cc b/glom/mode_data/datawidget/combo.cc
index 2a62985..7992cc8 100644
--- a/glom/mode_data/datawidget/combo.cc
+++ b/glom/mode_data/datawidget/combo.cc
@@ -311,7 +311,7 @@ Gnome::Gda::Value ComboGlom::get_value() const
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool ComboGlom::on_button_press_event(GdkEventButton *event)
+bool ComboGlom::on_button_press_event(GdkEventButton *button_event)
 {
 g_warning("ComboGlom::on_button_press_event()");
 
@@ -332,18 +332,18 @@ g_warning("ComboGlom::on_button_press_event()");
     if(pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
     {
       GdkModifierType mods;
-      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, 
&mods );
+      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 
0, &mods );
       if(mods & GDK_BUTTON3_MASK)
       {
         //Give user choices of actions on this item:
-        m_pMenuPopup->popup(event->button, event->time);
+        m_pMenuPopup->popup(button_event->button, button_event->time);
         return true; //We handled this event.
       }
     }
 
   }
 
-  return Gtk::ComboBox::on_button_press_event(event);
+  return Gtk::ComboBox::on_button_press_event(button_event);
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/mode_data/datawidget/combo_as_radio_buttons.cc 
b/glom/mode_data/datawidget/combo_as_radio_buttons.cc
index f5d72dc..3dd80a6 100644
--- a/glom/mode_data/datawidget/combo_as_radio_buttons.cc
+++ b/glom/mode_data/datawidget/combo_as_radio_buttons.cc
@@ -259,7 +259,7 @@ Glib::ustring ComboAsRadioButtons::get_text() const
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-void ComboAsRadioButtons::show_context_menu(GdkEventButton *event)
+void ComboAsRadioButtons::show_context_menu(GdkEventButton *button_event)
 {
   std::cout << "ComboAsRadioButtons::show_context_menu()" << std::endl;
   AppWindow* pApp = get_appwindow();
@@ -279,27 +279,27 @@ void ComboAsRadioButtons::show_context_menu(GdkEventButton *event)
     if(pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
     {
       GdkModifierType mods;
-      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, 
&mods );
+      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 
0, &mods );
       if(mods & GDK_BUTTON3_MASK)
       {
         //Give user choices of actions on this item:
-        m_pMenuPopup->popup(event->button, event->time);
+        m_pMenuPopup->popup(button_event->button, button_event->time);
       }
     }
   }
 }
 
-bool ComboAsRadioButtons::on_radiobutton_button_press_event(GdkEventButton *event)
+bool ComboAsRadioButtons::on_radiobutton_button_press_event(GdkEventButton *button_event)
 {
-  show_context_menu(event);
+  show_context_menu(button_event);
   return false; //Let other signal handlers handle it too.
 }
 
-bool ComboAsRadioButtons::on_button_press_event(GdkEventButton *event)
+bool ComboAsRadioButtons::on_button_press_event(GdkEventButton *button_event)
 {
-  show_context_menu(event);
+  show_context_menu(button_event);
 
-  return Gtk::Box::on_button_press_event(event);
+  return Gtk::Box::on_button_press_event(button_event);
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index e3ebe69..abf7029 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -420,7 +420,7 @@ void DataWidget::set_editable(bool editable)
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool DataWidget::on_button_press_event(GdkEventButton *event)
+bool DataWidget::on_button_press_event(GdkEventButton *button_event)
 {
   //g_warning("DataWidget::on_button_press_event_popup");
 
@@ -442,17 +442,17 @@ bool DataWidget::on_button_press_event(GdkEventButton *event)
     if(pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
     {
       GdkModifierType mods;
-      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, 
&mods );
+      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 
0, &mods );
       if(mods & GDK_BUTTON3_MASK)
       {
         //Give user choices of actions on this item:
-        m_pMenuPopup->popup(event->button, event->time);
+        m_pMenuPopup->popup(button_event->button, button_event->time);
         return true; //We handled this event.
       }
     }
   }
 
-  return Gtk::EventBox::on_button_press_event(event);
+  return Gtk::EventBox::on_button_press_event(button_event);
 }
 
 std::shared_ptr<LayoutItem_Field> DataWidget::offer_field_list(const Glib::ustring& table_name)
diff --git a/glom/mode_data/datawidget/datawidget.h b/glom/mode_data/datawidget/datawidget.h
index 25d449f..f45322e 100644
--- a/glom/mode_data/datawidget/datawidget.h
+++ b/glom/mode_data/datawidget/datawidget.h
@@ -95,7 +95,7 @@ private:
   //Overrides of default signal handlers:
   void on_widget_edited(); //From Gtk::Entry, or Gtk::CheckButton.
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  virtual bool on_button_press_event(GdkEventButton* event) override;
+  virtual bool on_button_press_event(GdkEventButton* button_event) override;
   virtual void on_child_user_requested_layout();
   virtual void on_child_user_requested_layout_properties();
   virtual void on_child_layout_item_added(LayoutWidgetBase::enumType item_type);
diff --git a/glom/mode_data/datawidget/entry.cc b/glom/mode_data/datawidget/entry.cc
index 0f91791..9dd3e0f 100644
--- a/glom/mode_data/datawidget/entry.cc
+++ b/glom/mode_data/datawidget/entry.cc
@@ -118,9 +118,9 @@ void Entry::check_for_change()
   }
 }
 
-bool Entry::on_focus_out_event(GdkEventFocus* event)
+bool Entry::on_focus_out_event(GdkEventFocus* focus_event)
 {
-  const auto result = Gtk::Entry::on_focus_out_event(event);
+  const auto result = Gtk::Entry::on_focus_out_event(focus_event);
 
   //The user has finished editing.
   check_for_change();
@@ -188,7 +188,7 @@ Gnome::Gda::Value Entry::get_value() const
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool Entry::on_button_press_event(GdkEventButton *event)
+bool Entry::on_button_press_event(GdkEventButton *button_event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_appwindow is more likely to work now:
@@ -207,18 +207,18 @@ bool Entry::on_button_press_event(GdkEventButton *event)
     if(pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
     {
       GdkModifierType mods;
-      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, 
&mods );
+      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 
0, &mods );
       if(mods & GDK_BUTTON3_MASK)
       {
         //Give user choices of actions on this item:
-        m_pMenuPopup->popup(event->button, event->time);
+        m_pMenuPopup->popup(button_event->button, button_event->time);
         return true; //We handled this event.
       }
     }
 
   }
 
-  return Gtk::Entry::on_button_press_event(event);
+  return Gtk::Entry::on_button_press_event(button_event);
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/mode_data/datawidget/entry.h b/glom/mode_data/datawidget/entry.h
index 0696aff..e2bfeec 100644
--- a/glom/mode_data/datawidget/entry.h
+++ b/glom/mode_data/datawidget/entry.h
@@ -68,7 +68,7 @@ private:
   //Overrides of default signal handlers:
   virtual void on_changed() override; //From Gtk::Entry.
   virtual void on_activate() override; //From Gtk::Entry.
-  virtual bool on_focus_out_event(GdkEventFocus* event) override; //From Gtk::Widget
+  virtual bool on_focus_out_event(GdkEventFocus* focus_event) override; //From Gtk::Widget
 
   void check_for_change();
 
diff --git a/glom/mode_data/datawidget/label.cc b/glom/mode_data/datawidget/label.cc
index e3afb17..28b9474 100644
--- a/glom/mode_data/datawidget/label.cc
+++ b/glom/mode_data/datawidget/label.cc
@@ -102,22 +102,22 @@ void Label::on_menu_properties_activate()
   delete dialog;
 }
 
-bool Label::on_button_press_event(GdkEventButton *event)
+bool Label::on_button_press_event(GdkEventButton *button_event)
 {
   AppWindow* pApp = get_appwindow();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     GdkModifierType mods;
-    gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, &mods 
);
+    gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 0, 
&mods );
     if(mods & GDK_BUTTON3_MASK)
     {
       //Give user choices of actions on this item:
-      m_pPopupMenuUtils->popup(event->button, event->time);
+      m_pPopupMenuUtils->popup(button_event->button, button_event->time);
       return true; //We handled this event.
     }
   }
 
-  return Gtk::EventBox::on_button_press_event(event);
+  return Gtk::EventBox::on_button_press_event(button_event);
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/mode_data/datawidget/textview.cc b/glom/mode_data/datawidget/textview.cc
index 267346b..c1cef38 100644
--- a/glom/mode_data/datawidget/textview.cc
+++ b/glom/mode_data/datawidget/textview.cc
@@ -111,10 +111,10 @@ void TextView::check_for_change()
   }
 }
 
-bool TextView::on_textview_focus_out_event(GdkEventFocus* event)
+bool TextView::on_textview_focus_out_event(GdkEventFocus* focus_event)
 {
   //Call base class:
-  bool result = Gtk::ScrolledWindow::on_focus_out_event(event);
+  bool result = Gtk::ScrolledWindow::on_focus_out_event(focus_event);
 
   //The user has finished editing.
   check_for_change();
@@ -175,7 +175,7 @@ Gnome::Gda::Value TextView::get_value() const
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool TextView::on_button_press_event(GdkEventButton *event)
+bool TextView::on_button_press_event(GdkEventButton *button_event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_appwindow is more likely to work now:
@@ -194,18 +194,18 @@ bool TextView::on_button_press_event(GdkEventButton *event)
     if(pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
     {
       GdkModifierType mods;
-      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, 
&mods );
+      gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 
0, &mods );
       if(mods & GDK_BUTTON3_MASK)
       {
         //Give user choices of actions on this item:
-        m_pMenuPopup->popup(event->button, event->time);
+        m_pMenuPopup->popup(button_event->button, button_event->time);
         return true; //We handled this event.
       }
     }
 
   }
 
-  return Gtk::ScrolledWindow::on_button_press_event(event);
+  return Gtk::ScrolledWindow::on_button_press_event(button_event);
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/mode_data/datawidget/textview.h b/glom/mode_data/datawidget/textview.h
index c66ae11..580050c 100644
--- a/glom/mode_data/datawidget/textview.h
+++ b/glom/mode_data/datawidget/textview.h
@@ -70,7 +70,7 @@ private:
   //Overrides of default signal handlers:
   void on_buffer_changed();
   //virtual void on_activate() override; //From Gtk::Entry.
-  bool on_textview_focus_out_event(GdkEventFocus* event);
+  bool on_textview_focus_out_event(GdkEventFocus* focus_event);
   //virtual void on_insert_text(const Glib::ustring& text, int* position); //From Gtk::Editable
 
   virtual void check_for_change();
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index 2dcbfd9..2d0f41f 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -283,7 +283,7 @@ void DbAddDel::setup_menu(Gtk::Widget* /* widget */)
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 }
 
-bool DbAddDel::on_button_press_event_Popup(GdkEventButton *event)
+bool DbAddDel::on_button_press_event_Popup(GdkEventButton *button_event)
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Enable/Disable items.
@@ -297,16 +297,16 @@ bool DbAddDel::on_button_press_event_Popup(GdkEventButton *event)
 #endif
 
   GdkModifierType mods;
-  gdk_window_get_device_position( gtk_widget_get_window(Gtk::Widget::gobj()), event->device, 0, 0, &mods );
+  gdk_window_get_device_position( gtk_widget_get_window(Gtk::Widget::gobj()), button_event->device, 0, 0, 
&mods );
   if(mods & GDK_BUTTON3_MASK)
   {
     //Give user choices of actions on this item:
-    m_pMenuPopup->popup(event->button, event->time);
+    m_pMenuPopup->popup(button_event->button, button_event->time);
     return true; //handled.
   }
   else
   {
-    if(event->type == GDK_2BUTTON_PRESS)
+    if(button_event->type == GDK_2BUTTON_PRESS)
     {
       //Double-click means edit.
       //Don't do this usually, because users sometimes double-click by accident when they just want to edit 
a cell.
@@ -1532,18 +1532,17 @@ void DbAddDel::on_treeview_cell_edited(const Glib::ustring& path_string, const G
   }
 }
 
-void DbAddDel::on_treeview_button_press_event(GdkEventButton* event)
+void DbAddDel::on_treeview_button_press_event(GdkEventButton* button_event)
 {
-  on_button_press_event_Popup(event);
+  on_button_press_event_Popup(button_event);
 }
 
-bool DbAddDel::on_treeview_columnheader_button_press_event(GdkEventButton* event)
+bool DbAddDel::on_treeview_columnheader_button_press_event(GdkEventButton* button_event)
 {
   //If this is a right-click with the mouse:
-  if( (event->type == GDK_BUTTON_PRESS) && (event->button == 3) )
+  if( (button_event->type == GDK_BUTTON_PRESS) && (button_event->button == 3) )
   {
-
-
+    //TODO: Is something supposed to happen here?
   }
 
   return false;
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index 82cddc7..0edcb2e 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -331,8 +331,8 @@ private:
   bool on_treeview_column_drop(Gtk::TreeView* treeview, Gtk::TreeViewColumn* column, Gtk::TreeViewColumn* 
prev_column, Gtk::TreeViewColumn* next_column);
   void on_treeview_columns_changed();
 
-  bool on_button_press_event_Popup(GdkEventButton* event);
-  void on_treeview_button_press_event(GdkEventButton* event);
+  bool on_button_press_event_Popup(GdkEventButton* button_event);
+  void on_treeview_button_press_event(GdkEventButton* button_event);
   void on_treeview_selection_changed();
 
 protected:
@@ -347,7 +347,7 @@ private:
   void on_MenuPopup_activate_layout();
 #endif
 
-  bool on_treeview_columnheader_button_press_event(GdkEventButton* event);
+  bool on_treeview_columnheader_button_press_event(GdkEventButton* button_event);
   void on_treeview_column_clicked(int model_column_index);
   //void on_treeview_column_resized(int model_column_index, DbTreeViewColumnGlom* view_column);
   void on_idle_row_edit();
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index c803ca3..cb6c7a3 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -1307,21 +1307,21 @@ void FlowTableWithFields::on_menu_delete_activate()
   }
 }
 
-bool FlowTableWithFields::on_button_press_event(GdkEventButton *event)
+bool FlowTableWithFields::on_button_press_event(GdkEventButton *button_event)
 {
   AppWindow* pApp = AppWindow::get_appwindow();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     GdkModifierType mods;
-    gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, &mods 
);
+    gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 0, 
&mods );
     if(mods & GDK_BUTTON3_MASK)
     {
       //Give user choices of actions on this item:
-      m_pPopupMenuUtils->popup(event->button, event->time);
+      m_pPopupMenuUtils->popup(button_event->button, button_event->time);
       return true; //We handled this event.
     }
   }
-  return Gtk::Widget::on_button_press_event(event);
+  return Gtk::Widget::on_button_press_event(button_event);
 }
 
 //TODO: Rename this? It's not a simpler getter. It does UI.
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc 
b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index 1a2741d..70cef17 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -713,12 +713,12 @@ void Window_PrintLayout_Edit::setup_context_menu()
   m_context_menu->attach_to_widget(*this);
 }
 
-bool Window_PrintLayout_Edit::on_canvas_motion_notify_event(GdkEventMotion* event)
+bool Window_PrintLayout_Edit::on_canvas_motion_notify_event(GdkEventMotion* motion_event)
 {
   //Notice that, unlike drag-motion, motion-notify-event's x/y position already 
   //seems to have the scrolling taken into account.
-  double x = event->x;
-  double y = event->y;
+  double x = motion_event->x;
+  double y = motion_event->y;
   canvas_convert_from_drag_pixels(x, y, false /* do not adjust for scrolling */);
 
   gimp_ruler_set_position(m_hruler, x);
@@ -1334,9 +1334,9 @@ void Window_PrintLayout_Edit::on_scroll_value_changed()
   gimp_ruler_set_range(m_vruler, y, y + height, y + height);
 }
 
-bool Window_PrintLayout_Edit::on_configure_event(GdkEventConfigure* event)
+bool Window_PrintLayout_Edit::on_configure_event(GdkEventConfigure* configure_event)
 {
-  const auto result = Gtk::Window::on_configure_event(event);
+  const auto result = Gtk::Window::on_configure_event(configure_event);
 
   //If we are in fit-page-width then rescale the canvas:
   int percent = 0;
@@ -1595,9 +1595,9 @@ void Window_PrintLayout_Edit::on_spinbutton_height()
     m_spinbutton_height->get_value());
 }
 
-bool Window_PrintLayout_Edit::on_hruler_button_press_event(GdkEventButton* event)
+bool Window_PrintLayout_Edit::on_hruler_button_press_event(GdkEventButton* button_event)
 {
-  if(event->button != 1)
+  if(button_event->button != 1)
     return true;
 
   m_temp_rule_horizontal = true;
@@ -1605,9 +1605,9 @@ bool Window_PrintLayout_Edit::on_hruler_button_press_event(GdkEventButton* event
   return false;
 }
 
-bool Window_PrintLayout_Edit::on_vruler_button_press_event(GdkEventButton* event)
+bool Window_PrintLayout_Edit::on_vruler_button_press_event(GdkEventButton* button_event)
 {
-  if(event->button != 1)
+  if(button_event->button != 1)
     return true;
 
   m_temp_rule_horizontal = false; //vertical.
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.h 
b/glom/mode_design/print_layouts/window_print_layout_edit.h
index 12a844b..e79f8ae 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.h
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.h
@@ -92,7 +92,7 @@ private:
   void on_menu_align_left();
   void on_menu_align_right();
 
-  bool on_canvas_motion_notify_event(GdkEventMotion* event);
+  bool on_canvas_motion_notify_event(GdkEventMotion* motion_event);
   void on_canvas_show_context_menu(guint button, guint32 activate_time);
   void on_context_menu_insert_field();
   void on_context_menu_insert_text();
@@ -115,11 +115,11 @@ private:
   void on_spinbutton_width();
   void on_spinbutton_height();
 
-  bool on_hruler_button_press_event(GdkEventButton* event);
-  bool on_vruler_button_press_event(GdkEventButton* event);
+  bool on_hruler_button_press_event(GdkEventButton* button_event);
+  bool on_vruler_button_press_event(GdkEventButton* button_event);
 
   //override:
-  virtual bool on_configure_event(GdkEventConfigure* event) override;
+  virtual bool on_configure_event(GdkEventConfigure* configure_event) override;
 
   void do_menu_view_show_grid(bool active);
   void do_menu_view_show_rules(bool active);
diff --git a/glom/print_layout/canvas_print_layout.h b/glom/print_layout/canvas_print_layout.h
index 06875ba..4b69f20 100644
--- a/glom/print_layout/canvas_print_layout.h
+++ b/glom/print_layout/canvas_print_layout.h
@@ -124,7 +124,7 @@ private:
   void on_context_menu_edit();
   void on_context_menu_formatting();
   void on_context_menu_delete();
-  bool on_background_button_press_event(const Glib::RefPtr<Goocanvas::Item>& target, GdkEventButton* event);
+  bool on_background_button_press_event(const Glib::RefPtr<Goocanvas::Item>& target, GdkEventButton* 
button_event);
 
   void on_dialog_format_hide();
 #endif
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index 7b66766..89b9435 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -254,18 +254,18 @@ void AddDel::setup_menu(Gtk::Widget* /* widget */)
   m_pMenuPopup->attach_to_widget(*this);
 }
 
-bool AddDel::on_button_press_event_Popup(GdkEventButton *event)
+bool AddDel::on_button_press_event_Popup(GdkEventButton *button_event)
 {
   GdkModifierType mods;
-  gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, &mods );
+  gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 0, 
&mods );
   if(mods & GDK_BUTTON3_MASK)
   {
     //Give user choices of actions on this item:
-    m_pMenuPopup->popup(event->button, event->time);
+    m_pMenuPopup->popup(button_event->button, button_event->time);
   }
   else
   {
-    if(event->type == GDK_2BUTTON_PRESS)
+    if(button_event->type == GDK_2BUTTON_PRESS)
     {
       //Double-click means edit.
       //Disable this, because it is confusing when single-click activates editable cells too.
@@ -1310,9 +1310,9 @@ AddDel::type_signal_user_reordered_columns AddDel::signal_user_reordered_columns
   return m_signal_user_reordered_columns;
 }
 
-void AddDel::on_treeview_button_press_event(GdkEventButton* event)
+void AddDel::on_treeview_button_press_event(GdkEventButton* button_event)
 {
-  on_button_press_event_Popup(event);
+  on_button_press_event_Popup(button_event);
 }
 
 bool AddDel::on_treeview_column_drop(Gtk::TreeView* /* treeview */, Gtk::TreeViewColumn* /* column */, 
Gtk::TreeViewColumn* /* prev_column */, Gtk::TreeViewColumn* /* next_column */)
diff --git a/glom/utility_widgets/adddel/adddel.h b/glom/utility_widgets/adddel/adddel.h
index e9d2e45..afe963a 100644
--- a/glom/utility_widgets/adddel/adddel.h
+++ b/glom/utility_widgets/adddel/adddel.h
@@ -263,9 +263,9 @@ private:
   bool on_treeview_column_drop(Gtk::TreeView* treeview, Gtk::TreeViewColumn* column, Gtk::TreeViewColumn* 
prev_column, Gtk::TreeViewColumn* next_column);
   void on_treeview_columns_changed();
 
-  bool on_button_press_event_Popup(GdkEventButton* event);
+  bool on_button_press_event_Popup(GdkEventButton* button_event);
 
-  void on_treeview_button_press_event(GdkEventButton* event);
+  void on_treeview_button_press_event(GdkEventButton* button_event);
 
   /** Set the menu to popup when the user right-clicks on the column titles.
    * This method does not take ownership of the Gtk::Menu.
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index d0b9dbd..797ee7b 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -107,10 +107,10 @@ void ImageGlom::set_layout_item(const std::shared_ptr<LayoutItem>& layout_item,
 #endif  
 }
 
-bool ImageGlom::on_button_press_event(GdkEventButton *event)
+bool ImageGlom::on_button_press_event(GdkEventButton *button_event)
 {
   GdkModifierType mods;
-  gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, &mods );
+  gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 0, 
&mods );
 
   //Enable/Disable items.
   //We did this earlier, but get_appwindow is more likely to work now:
@@ -134,7 +134,7 @@ bool ImageGlom::on_button_press_event(GdkEventButton *event)
       if(mods & GDK_BUTTON3_MASK)
       {
         //Give user choices of actions on this item:
-        popup_menu(event->button, event->time);
+        popup_menu(button_event->button, button_event->time);
        
         return true; //We handled this event.
       }
@@ -146,7 +146,7 @@ bool ImageGlom::on_button_press_event(GdkEventButton *event)
       if(mods & GDK_BUTTON3_MASK)
       {
         //Give user choices of actions on this item:
-        popup_menu(event->button, event->time);
+        popup_menu(button_event->button, button_event->time);
 
         return true; //We handled this event.
       }
@@ -161,7 +161,7 @@ bool ImageGlom::on_button_press_event(GdkEventButton *event)
     }
   }
 
-  return Gtk::EventBox::on_button_press_event(event);
+  return Gtk::EventBox::on_button_press_event(button_event);
 }
 
 AppWindow* ImageGlom::get_appwindow() const
diff --git a/glom/utility_widgets/notebooklabelglom.cc b/glom/utility_widgets/notebooklabelglom.cc
index 622d7c4..4cc0252 100644
--- a/glom/utility_widgets/notebooklabelglom.cc
+++ b/glom/utility_widgets/notebooklabelglom.cc
@@ -128,21 +128,22 @@ void NotebookLabel::setup_menu(Gtk::Widget* /* widget */)
   m_pPopupMenu->attach_to_widget(*this);
 }
 
-bool NotebookLabel::on_button_press_event(GdkEventButton *event)
+bool NotebookLabel::on_button_press_event(GdkEventButton *button_event)
 {
   AppWindow* pApp = get_appwindow();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     GdkModifierType mods;
-    gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), event->device, 0, 0, &mods 
);
+    gdk_window_get_device_position( gtk_widget_get_window (Gtk::Widget::gobj()), button_event->device, 0, 0, 
&mods );
     if(mods & GDK_BUTTON3_MASK)
     {
       //Give user choices of actions on this item:
-      m_pPopupMenu->popup(event->button, event->time);
+      m_pPopupMenu->popup(button_event->button, button_event->time);
       return true; //We handled this event.
     }
   }
-  return Gtk::EventBox::on_button_press_event(event);
+
+  return Gtk::EventBox::on_button_press_event(button_event);
 }
 
 } //namespace Glom


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