[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 04/06: Rename resizer widget.
noreply at xfce.org
noreply at xfce.org
Fri Feb 7 01:56:25 CET 2020
This is an automated email from the git hooks/post-receive script.
g o t t c o d e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit bea9a41296ace7773abd5d96eaee74c37ef8cc55
Author: Graeme Gott <graeme at gottcode.org>
Date: Thu Feb 6 13:13:11 2020 -0500
Rename resizer widget.
---
panel-plugin/CMakeLists.txt | 2 +-
.../{resizer-widget.cpp => resize-grip.cpp} | 24 +++++++++++-----------
panel-plugin/{resizer-widget.h => resize-grip.h} | 20 +++++++++---------
panel-plugin/window.cpp | 12 +++++------
panel-plugin/window.h | 4 ++--
5 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/panel-plugin/CMakeLists.txt b/panel-plugin/CMakeLists.txt
index 64e15f7..3132915 100644
--- a/panel-plugin/CMakeLists.txt
+++ b/panel-plugin/CMakeLists.txt
@@ -26,7 +26,7 @@ add_library(whiskermenu MODULE
query.cpp
recent-page.cpp
register-plugin.c
- resizer-widget.cpp
+ resize-grip.cpp
run-action.cpp
search-action.cpp
search-page.cpp
diff --git a/panel-plugin/resizer-widget.cpp b/panel-plugin/resize-grip.cpp
similarity index 82%
rename from panel-plugin/resizer-widget.cpp
rename to panel-plugin/resize-grip.cpp
index 3fa542a..44a47fa 100644
--- a/panel-plugin/resizer-widget.cpp
+++ b/panel-plugin/resize-grip.cpp
@@ -15,7 +15,7 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "resizer-widget.h"
+#include "resize-grip.h"
#include "settings.h"
#include "slot.h"
@@ -24,7 +24,7 @@ using namespace WhiskerMenu;
//-----------------------------------------------------------------------------
-ResizerWidget::ResizerWidget(GtkWindow* window) :
+ResizeGrip::ResizeGrip(GtkWindow* window) :
m_window(window),
m_cursor(nullptr),
m_shape(3)
@@ -35,17 +35,17 @@ ResizerWidget::ResizerWidget(GtkWindow* window) :
gtk_widget_set_size_request(m_drawing, 10, 10);
gtk_widget_add_events(m_drawing, GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
- g_signal_connect_slot(m_drawing, "button-press-event", &ResizerWidget::on_button_press_event, this);
- g_signal_connect_slot(m_drawing, "enter-notify-event", &ResizerWidget::on_enter_notify_event, this);
- g_signal_connect_slot(m_drawing, "leave-notify-event", &ResizerWidget::on_leave_notify_event, this);
- g_signal_connect_slot(m_drawing, "draw", &ResizerWidget::on_draw_event, this);
+ g_signal_connect_slot(m_drawing, "button-press-event", &ResizeGrip::on_button_press_event, this);
+ g_signal_connect_slot(m_drawing, "enter-notify-event", &ResizeGrip::on_enter_notify_event, this);
+ g_signal_connect_slot(m_drawing, "leave-notify-event", &ResizeGrip::on_leave_notify_event, this);
+ g_signal_connect_slot(m_drawing, "draw", &ResizeGrip::on_draw_event, this);
set_corner(TopRight);
}
//-----------------------------------------------------------------------------
-ResizerWidget::~ResizerWidget()
+ResizeGrip::~ResizeGrip()
{
if (m_cursor)
{
@@ -55,7 +55,7 @@ ResizerWidget::~ResizerWidget()
//-----------------------------------------------------------------------------
-void ResizerWidget::set_corner(Corner corner)
+void ResizeGrip::set_corner(Corner corner)
{
GdkCursorType type;
switch (corner)
@@ -100,7 +100,7 @@ void ResizerWidget::set_corner(Corner corner)
//-----------------------------------------------------------------------------
-gboolean ResizerWidget::on_button_press_event(GtkWidget*, GdkEvent* event)
+gboolean ResizeGrip::on_button_press_event(GtkWidget*, GdkEvent* event)
{
GdkEventButton* event_button = reinterpret_cast<GdkEventButton*>(event);
gtk_window_begin_resize_drag(m_window,
@@ -114,7 +114,7 @@ gboolean ResizerWidget::on_button_press_event(GtkWidget*, GdkEvent* event)
//-----------------------------------------------------------------------------
-gboolean ResizerWidget::on_enter_notify_event(GtkWidget* widget, GdkEvent*)
+gboolean ResizeGrip::on_enter_notify_event(GtkWidget* widget, GdkEvent*)
{
GdkWindow* window = gtk_widget_get_window(widget);
gdk_window_set_cursor(window, m_cursor);
@@ -123,7 +123,7 @@ gboolean ResizerWidget::on_enter_notify_event(GtkWidget* widget, GdkEvent*)
//-----------------------------------------------------------------------------
-gboolean ResizerWidget::on_leave_notify_event(GtkWidget* widget, GdkEvent*)
+gboolean ResizeGrip::on_leave_notify_event(GtkWidget* widget, GdkEvent*)
{
GdkWindow* window = gtk_widget_get_window(widget);
gdk_window_set_cursor(window, nullptr);
@@ -132,7 +132,7 @@ gboolean ResizerWidget::on_leave_notify_event(GtkWidget* widget, GdkEvent*)
//-----------------------------------------------------------------------------
-gboolean ResizerWidget::on_draw_event(GtkWidget* widget, cairo_t* cr)
+gboolean ResizeGrip::on_draw_event(GtkWidget* widget, cairo_t* cr)
{
GdkRGBA color;
GtkStyleContext* context = gtk_widget_get_style_context(widget);
diff --git a/panel-plugin/resizer-widget.h b/panel-plugin/resize-grip.h
similarity index 77%
rename from panel-plugin/resizer-widget.h
rename to panel-plugin/resize-grip.h
index b87b6af..bd66aa7 100644
--- a/panel-plugin/resizer-widget.h
+++ b/panel-plugin/resize-grip.h
@@ -15,8 +15,8 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef WHISKERMENU_RESIZER_WIDGET_H
-#define WHISKERMENU_RESIZER_WIDGET_H
+#ifndef WHISKERMENU_RESIZE_GRIP_H
+#define WHISKERMENU_RESIZE_GRIP_H
#include <vector>
@@ -25,16 +25,16 @@
namespace WhiskerMenu
{
-class ResizerWidget
+class ResizeGrip
{
public:
- explicit ResizerWidget(GtkWindow* window);
- ~ResizerWidget();
+ explicit ResizeGrip(GtkWindow* window);
+ ~ResizeGrip();
- ResizerWidget(const ResizerWidget&) = delete;
- ResizerWidget(ResizerWidget&&) = delete;
- ResizerWidget& operator=(const ResizerWidget&) = delete;
- ResizerWidget& operator=(ResizerWidget&&) = delete;
+ ResizeGrip(const ResizeGrip&) = delete;
+ ResizeGrip(ResizeGrip&&) = delete;
+ ResizeGrip& operator=(const ResizeGrip&) = delete;
+ ResizeGrip& operator=(ResizeGrip&&) = delete;
GtkWidget* get_widget() const
{
@@ -66,4 +66,4 @@ private:
}
-#endif // WHISKERMENU_RESIZER_WIDGET_H
+#endif // WHISKERMENU_RESIZE_GRIP_H
diff --git a/panel-plugin/window.cpp b/panel-plugin/window.cpp
index d586923..433cf8a 100644
--- a/panel-plugin/window.cpp
+++ b/panel-plugin/window.cpp
@@ -25,7 +25,7 @@
#include "plugin.h"
#include "profile-picture.h"
#include "recent-page.h"
-#include "resizer-widget.h"
+#include "resize-grip.h"
#include "search-page.h"
#include "settings.h"
#include "slot.h"
@@ -141,7 +141,7 @@ WhiskerMenu::Window::Window(Plugin* plugin) :
m_command_slots[i] = g_signal_connect_slot<GtkButton*>(m_commands_button[i], "clicked", &Window::hide, this);
}
- m_resizer = new ResizerWidget(m_window);
+ m_resizer = new ResizeGrip(m_window);
// Create search entry
m_search_entry = GTK_ENTRY(gtk_search_entry_new());
@@ -459,22 +459,22 @@ void WhiskerMenu::Window::show(const Position position)
{
if (layout_bottom)
{
- m_resizer->set_corner(ResizerWidget::TopRight);
+ m_resizer->set_corner(ResizeGrip::TopRight);
}
else
{
- m_resizer->set_corner(ResizerWidget::BottomRight);
+ m_resizer->set_corner(ResizeGrip::BottomRight);
}
}
else
{
if (layout_bottom)
{
- m_resizer->set_corner(ResizerWidget::TopLeft);
+ m_resizer->set_corner(ResizeGrip::TopLeft);
}
else
{
- m_resizer->set_corner(ResizerWidget::BottomLeft);
+ m_resizer->set_corner(ResizeGrip::BottomLeft);
}
}
diff --git a/panel-plugin/window.h b/panel-plugin/window.h
index b02cfb2..1e8c7b8 100644
--- a/panel-plugin/window.h
+++ b/panel-plugin/window.h
@@ -31,7 +31,7 @@ class FavoritesPage;
class Page;
class Plugin;
class ProfilePicture;
-class ResizerWidget;
+class ResizeGrip;
class RecentPage;
class SearchPage;
@@ -130,7 +130,7 @@ private:
ProfilePicture* m_profilepic;
GtkLabel* m_username;
- ResizerWidget* m_resizer;
+ ResizeGrip* m_resizer;
GtkWidget* m_commands_spacer;
GtkWidget* m_commands_button[9];
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list