[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/03: Remove unnecessary GtkBox around window.

noreply at xfce.org noreply at xfce.org
Fri Aug 12 11:43:33 CEST 2016


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 e1f8d487dece2fa89b549b87c4280eb6851f47ef
Author: Graeme Gott <graeme at gottcode.org>
Date:   Fri Aug 12 05:24:41 2016 -0400

    Remove unnecessary GtkBox around window.
---
 panel-plugin/window.cpp | 15 ++++++---------
 panel-plugin/window.h   |  5 +----
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/panel-plugin/window.cpp b/panel-plugin/window.cpp
index b2e6041..3188678 100644
--- a/panel-plugin/window.cpp
+++ b/panel-plugin/window.cpp
@@ -73,13 +73,10 @@ WhiskerMenu::Window::Window() :
 	g_signal_connect_slot(m_window, "configure-event", &Window::on_configure_event, this);
 	g_signal_connect(m_window, "delete_event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
 
-	m_window_box = GTK_BOX(gtk_vbox_new(false, 0));
-	gtk_container_add(GTK_CONTAINER(m_window), GTK_WIDGET(m_window_box));
-
 	// Create the border of the window
-	m_window_contents = gtk_frame_new(NULL);
-	gtk_frame_set_shadow_type(GTK_FRAME(m_window_contents), GTK_SHADOW_OUT);
-	gtk_box_pack_start(m_window_box, m_window_contents, true, true, 0);
+	GtkWidget* frame = gtk_frame_new(NULL);
+	gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT);
+	gtk_container_add(GTK_CONTAINER(m_window), frame);
 
 	// Create the profile picture
 	m_profilepic = new ProfilePicture(this);
@@ -147,7 +144,7 @@ WhiskerMenu::Window::Window() :
 
 	// Create box for packing children
 	m_vbox = GTK_BOX(gtk_vbox_new(false, 6));
-	gtk_container_add(GTK_CONTAINER(m_window_contents), GTK_WIDGET(m_vbox));
+	gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(m_vbox));
 	gtk_container_set_border_width(GTK_CONTAINER(m_vbox), 2);
 
 	// Create box for packing commands
@@ -206,13 +203,13 @@ WhiskerMenu::Window::Window() :
 	gtk_size_group_add_widget(sidebar_size_group, GTK_WIDGET(m_commands_align));
 
 	// Show widgets
-	gtk_widget_show_all(GTK_WIDGET(m_window_box));
+	gtk_widget_show_all(frame);
 	gtk_widget_hide(m_favorites->get_widget());
 	gtk_widget_hide(m_recent->get_widget());
 	gtk_widget_hide(m_applications->get_widget());
 	gtk_widget_hide(m_search_results->get_widget());
 	m_default_button->set_active(true);
-	gtk_widget_show(m_window_contents);
+	gtk_widget_show(frame);
 
 	// Resize to last known size
 	gtk_window_set_default_size(m_window, m_geometry.width, m_geometry.height);
diff --git a/panel-plugin/window.h b/panel-plugin/window.h
index f2ce9dc..46e4793 100644
--- a/panel-plugin/window.h
+++ b/panel-plugin/window.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014, 2015 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2014, 2015, 2016 Graeme Gott <graeme at gottcode.org>
  *
  * This library is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -93,9 +93,6 @@ private:
 private:
 	GtkWindow* m_window;
 
-	GtkBox* m_window_box;
-	GtkWidget* m_window_contents;
-
 	GtkBox* m_vbox;
 	GtkBox* m_title_box;
 	GtkBox* m_commands_box;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list