[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 32/473: Remove extended initializer lists.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:53:22 CET 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit 52765937d811112a7eeaa018fd389223e9dababe
Author: Graeme Gott <graeme at gottcode.org>
Date: Wed Jun 26 15:06:18 2013 -0400
Remove extended initializer lists.
Downgrade to C++98.
---
src/favorites_page.cpp | 15 +++++++++++----
src/menu.cpp | 6 +++++-
src/resizer_widget.cpp | 16 +++++++++++-----
3 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/src/favorites_page.cpp b/src/favorites_page.cpp
index 59d0f7f..977dff2 100644
--- a/src/favorites_page.cpp
+++ b/src/favorites_page.cpp
@@ -26,12 +26,19 @@ using namespace WhiskerMenu;
//-----------------------------------------------------------------------------
+static const std::string default_favorites[4] =
+{
+ "exo-terminal-emulator.desktop",
+ "exo-file-manager.desktop",
+ "exo-mail-reader.desktop",
+ "exo-web-browser.desktop"
+};
+
+//-----------------------------------------------------------------------------
+
FavoritesPage::FavoritesPage(XfceRc* settings, Menu* menu) :
ListPage(settings, "favorites",
- {"exo-terminal-emulator.desktop",
- "exo-file-manager.desktop",
- "exo-mail-reader.desktop",
- "exo-web-browser.desktop"},
+ std::vector<std::string>(&default_favorites[0], &default_favorites[3]),
menu)
{
get_view()->set_reorderable(true);
diff --git a/src/menu.cpp b/src/menu.cpp
index d9e11a9..0820e48 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -54,10 +54,14 @@ static GtkButton* new_action_button(const gchar* icon, const gchar* text)
Menu::Menu(XfceRc* settings) :
m_window(NULL),
- m_geometry{0,0,400,500},
m_layout_left(true),
m_layout_bottom(true)
{
+ m_geometry.x = 0;
+ m_geometry.y = 0;
+ m_geometry.width = 400;
+ m_geometry.height = 500;
+
// Create the window
m_window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
gtk_window_set_modal(m_window, true);
diff --git a/src/resizer_widget.cpp b/src/resizer_widget.cpp
index 54b2751..2b57302 100644
--- a/src/resizer_widget.cpp
+++ b/src/resizer_widget.cpp
@@ -22,7 +22,8 @@ using namespace WhiskerMenu;
ResizerWidget::ResizerWidget(GtkWindow* window) :
m_window(window),
- m_cursor(NULL)
+ m_cursor(NULL),
+ m_shape(3)
{
m_alignment = GTK_ALIGNMENT(gtk_alignment_new(1,0,0,0));
@@ -53,31 +54,36 @@ ResizerWidget::~ResizerWidget()
void ResizerWidget::set_corner(Corner corner)
{
+ static const GdkPoint bottomleft[] = { {10,10}, {0,10}, {0,0} };
+ static const GdkPoint topleft[] = { {10,0}, {0,10}, {0,0} };
+ static const GdkPoint bottomright[] = { {10,10}, {0,10}, {10,0} };
+ static const GdkPoint topright[] = { {10,0}, {10,10}, {0,0} };
+
GdkCursorType type;
switch (corner)
{
case BottomLeft:
gtk_alignment_set(m_alignment, 0,1,0,0);
- m_shape = { {10,10}, {0,10}, {0,0} };
+ m_shape.assign(bottomleft, bottomleft + 3);
m_edge = GDK_WINDOW_EDGE_SOUTH_WEST;
type = GDK_BOTTOM_LEFT_CORNER;
break;
case TopLeft:
gtk_alignment_set(m_alignment, 0,0,0,0);
- m_shape = { {10,0}, {0,10}, {0,0} };
+ m_shape.assign(topleft, topleft + 3);
m_edge = GDK_WINDOW_EDGE_NORTH_WEST;
type = GDK_TOP_LEFT_CORNER;
break;
case BottomRight:
gtk_alignment_set(m_alignment, 1,1,0,0);
- m_shape = { {10,10}, {0,10}, {10,0} };
+ m_shape.assign(bottomright, bottomright + 3);
m_edge = GDK_WINDOW_EDGE_SOUTH_EAST;
type = GDK_BOTTOM_RIGHT_CORNER;
break;
case TopRight:
default:
gtk_alignment_set(m_alignment, 1,0,0,0);
- m_shape = { {10,0}, {10,10}, {0,0} };
+ m_shape.assign(topright, topright + 3);
m_edge = GDK_WINDOW_EDGE_NORTH_EAST;
type = GDK_TOP_RIGHT_CORNER;
break;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list