[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 234/473: Merge configuration dialog appearance tabs.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:56:44 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 c4bf1f123107044dc46322312c769e0a22046961
Author: Graeme Gott <graeme at gottcode.org>
Date:   Mon Nov 11 08:10:14 2013 -0500

    Merge configuration dialog appearance tabs.
---
 panel-plugin/configuration-dialog.cpp |  145 ++++++++++++++++-----------------
 panel-plugin/configuration-dialog.h   |    1 -
 2 files changed, 69 insertions(+), 77 deletions(-)

diff --git a/panel-plugin/configuration-dialog.cpp b/panel-plugin/configuration-dialog.cpp
index c9c609f..52904be 100644
--- a/panel-plugin/configuration-dialog.cpp
+++ b/panel-plugin/configuration-dialog.cpp
@@ -61,7 +61,6 @@ ConfigurationDialog::ConfigurationDialog(Plugin* plugin) :
 	// Create tabs
 	GtkNotebook* notebook = GTK_NOTEBOOK(gtk_notebook_new());
 	gtk_notebook_append_page(notebook, init_appearance_tab(), gtk_label_new_with_mnemonic(_("_Appearance")));
-	gtk_notebook_append_page(notebook, init_panel_button_tab(), gtk_label_new_with_mnemonic(_("_Panel Button")));
 	gtk_notebook_append_page(notebook, init_behavior_tab(), gtk_label_new_with_mnemonic(_("_Behavior")));
 	gtk_notebook_append_page(notebook, init_commands_tab(), gtk_label_new_with_mnemonic(_("_Commands")));
 
@@ -232,14 +231,75 @@ void ConfigurationDialog::response(int response_id)
 
 GtkWidget* ConfigurationDialog::init_appearance_tab()
 {
-	// Create size group for labels
+	// Create page
+	GtkWidget* page = gtk_alignment_new(0, 0, 1, 0);
+	GtkBox* contents_vbox = GTK_BOX(gtk_vbox_new(false, 0));
+	gtk_container_add(GTK_CONTAINER(page), GTK_WIDGET(contents_vbox));
+
+	// Create panel button section
 	GtkSizeGroup* label_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+	GtkBox* panel_vbox = GTK_BOX(gtk_vbox_new(false, 6));
+	GtkWidget* panel_frame = xfce_gtk_frame_box_new_with_content(_("Panel Button"), GTK_WIDGET(panel_vbox));
+	gtk_box_pack_start(contents_vbox, panel_frame, false, false, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(panel_frame), 6);
 
-	// Create appearance section
-	GtkWidget* page = gtk_alignment_new(0, 0, 1, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(page), 8);
-	GtkBox* appearance_vbox = GTK_BOX(gtk_vbox_new(false, 8));
-	gtk_container_add(GTK_CONTAINER(page), GTK_WIDGET(appearance_vbox));
+	// Add button style selector
+	GtkBox* hbox = GTK_BOX(gtk_hbox_new(false, 12));
+	gtk_box_pack_start(panel_vbox, GTK_WIDGET(hbox), false, false, 0);
+
+	GtkWidget* label = gtk_label_new_with_mnemonic(_("Di_splay:"));
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+	gtk_box_pack_start(hbox, label, false, false, 0);
+	gtk_size_group_add_widget(label_size_group, label);
+
+	m_button_style = gtk_combo_box_text_new();
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(m_button_style), _("Icon"));
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(m_button_style), _("Title"));
+	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(m_button_style), _("Icon and title"));
+	gtk_combo_box_set_active(GTK_COMBO_BOX(m_button_style), static_cast<int>(m_plugin->get_button_style()) - 1);
+	gtk_box_pack_start(hbox, m_button_style, false, false, 0);
+	gtk_label_set_mnemonic_widget(GTK_LABEL(label), m_button_style);
+	g_signal_connect(m_button_style, "changed", G_CALLBACK(ConfigurationDialog::style_changed_slot), this);
+
+	// Add title selector
+	hbox = GTK_BOX(gtk_hbox_new(false, 12));
+	gtk_box_pack_start(panel_vbox, GTK_WIDGET(hbox), false, false, 0);
+
+	label = gtk_label_new_with_mnemonic(_("_Title:"));
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+	gtk_box_pack_start(hbox, label, false, false, 0);
+	gtk_size_group_add_widget(label_size_group, label);
+
+	m_title = gtk_entry_new();
+	gtk_entry_set_text(GTK_ENTRY(m_title), m_plugin->get_button_title().c_str());
+	gtk_box_pack_start(hbox, m_title, true, true, 0);
+	gtk_label_set_mnemonic_widget(GTK_LABEL(label), m_title);
+	g_signal_connect(m_title, "changed", G_CALLBACK(ConfigurationDialog::title_changed_slot), this);
+
+	// Add icon selector
+	hbox = GTK_BOX(gtk_hbox_new(false, 12));
+	gtk_box_pack_start(panel_vbox, GTK_WIDGET(hbox), false, false, 0);
+
+	label = gtk_label_new_with_mnemonic(_("_Icon:"));
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+	gtk_box_pack_start(hbox, label, false, false, 0);
+	gtk_size_group_add_widget(label_size_group, label);
+
+	m_icon_button = gtk_button_new();
+	gtk_box_pack_start(hbox, m_icon_button, false, false, 0);
+	gtk_label_set_mnemonic_widget(GTK_LABEL(label), m_icon_button);
+	g_signal_connect(m_icon_button, "clicked", G_CALLBACK(ConfigurationDialog::choose_icon_slot), this);
+
+	m_icon = xfce_panel_image_new_from_source(m_plugin->get_button_icon_name().c_str());
+	xfce_panel_image_set_size(XFCE_PANEL_IMAGE(m_icon), 48);
+	gtk_container_add(GTK_CONTAINER(m_icon_button), m_icon);
+
+	// Create menu section
+	label_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+	GtkBox* appearance_vbox = GTK_BOX(gtk_vbox_new(false, 6));
+	GtkWidget* appearance_frame = xfce_gtk_frame_box_new_with_content(_("Menu"), GTK_WIDGET(appearance_vbox));
+	gtk_box_pack_start(contents_vbox, appearance_frame, false, false, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(appearance_frame), 6);
 
 	// Add option to use generic names
 	m_show_names = gtk_check_button_new_with_mnemonic(_("Show applications by _name"));
@@ -267,10 +327,10 @@ GtkWidget* ConfigurationDialog::init_appearance_tab()
 	g_signal_connect(m_position_commands_alternate, "toggled", G_CALLBACK(ConfigurationDialog::toggle_position_commands_alternate_slot), this);
 
 	// Add item icon size selector
-	GtkBox* hbox = GTK_BOX(gtk_hbox_new(false, 12));
+	hbox = GTK_BOX(gtk_hbox_new(false, 12));
 	gtk_box_pack_start(appearance_vbox, GTK_WIDGET(hbox), false, false, 0);
 
-	GtkWidget* label = gtk_label_new_with_mnemonic(_("Ite_m icon size:"));
+	label = gtk_label_new_with_mnemonic(_("Ite_m icon size:"));
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 	gtk_box_pack_start(hbox, label, false, false, 0);
 	gtk_size_group_add_widget(label_size_group, label);
@@ -310,73 +370,6 @@ GtkWidget* ConfigurationDialog::init_appearance_tab()
 
 //-----------------------------------------------------------------------------
 
-GtkWidget* ConfigurationDialog::init_panel_button_tab()
-{
-	// Create size group for labels
-	GtkSizeGroup* label_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
-
-	// Create panel button section
-	GtkWidget* page = gtk_alignment_new(0, 0, 1, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(page), 8);
-	GtkBox* panel_vbox = GTK_BOX(gtk_vbox_new(false, 8));
-	gtk_container_add(GTK_CONTAINER(page), GTK_WIDGET(panel_vbox));
-
-	// Add button style selector
-	GtkBox* hbox = GTK_BOX(gtk_hbox_new(false, 12));
-	gtk_box_pack_start(panel_vbox, GTK_WIDGET(hbox), false, false, 0);
-
-	GtkWidget* label = gtk_label_new_with_mnemonic(_("Di_splay:"));
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-	gtk_box_pack_start(hbox, label, false, false, 0);
-	gtk_size_group_add_widget(label_size_group, label);
-
-	m_button_style = gtk_combo_box_text_new();
-	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(m_button_style), _("Icon"));
-	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(m_button_style), _("Title"));
-	gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(m_button_style), _("Icon and title"));
-	gtk_combo_box_set_active(GTK_COMBO_BOX(m_button_style), static_cast<int>(m_plugin->get_button_style()) - 1);
-	gtk_box_pack_start(hbox, m_button_style, false, false, 0);
-	gtk_label_set_mnemonic_widget(GTK_LABEL(label), m_button_style);
-	g_signal_connect(m_button_style, "changed", G_CALLBACK(ConfigurationDialog::style_changed_slot), this);
-
-	// Add title selector
-	hbox = GTK_BOX(gtk_hbox_new(false, 12));
-	gtk_box_pack_start(panel_vbox, GTK_WIDGET(hbox), false, false, 0);
-
-	label = gtk_label_new_with_mnemonic(_("_Title:"));
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-	gtk_box_pack_start(hbox, label, false, false, 0);
-	gtk_size_group_add_widget(label_size_group, label);
-
-	m_title = gtk_entry_new();
-	gtk_entry_set_text(GTK_ENTRY(m_title), m_plugin->get_button_title().c_str());
-	gtk_box_pack_start(hbox, m_title, true, true, 0);
-	gtk_label_set_mnemonic_widget(GTK_LABEL(label), m_title);
-	g_signal_connect(m_title, "changed", G_CALLBACK(ConfigurationDialog::title_changed_slot), this);
-
-	// Add icon selector
-	hbox = GTK_BOX(gtk_hbox_new(false, 12));
-	gtk_box_pack_start(panel_vbox, GTK_WIDGET(hbox), false, false, 0);
-
-	label = gtk_label_new_with_mnemonic(_("_Icon:"));
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-	gtk_box_pack_start(hbox, label, false, false, 0);
-	gtk_size_group_add_widget(label_size_group, label);
-
-	m_icon_button = gtk_button_new();
-	gtk_box_pack_start(hbox, m_icon_button, false, false, 0);
-	gtk_label_set_mnemonic_widget(GTK_LABEL(label), m_icon_button);
-	g_signal_connect(m_icon_button, "clicked", G_CALLBACK(ConfigurationDialog::choose_icon_slot), this);
-
-	m_icon = xfce_panel_image_new_from_source(m_plugin->get_button_icon_name().c_str());
-	xfce_panel_image_set_size(XFCE_PANEL_IMAGE(m_icon), 48);
-	gtk_container_add(GTK_CONTAINER(m_icon_button), m_icon);
-
-	return page;
-}
-
-//-----------------------------------------------------------------------------
-
 GtkWidget* ConfigurationDialog::init_behavior_tab()
 {
 	// Create behavior section
diff --git a/panel-plugin/configuration-dialog.h b/panel-plugin/configuration-dialog.h
index 887e4f5..4cfa55b 100644
--- a/panel-plugin/configuration-dialog.h
+++ b/panel-plugin/configuration-dialog.h
@@ -59,7 +59,6 @@ private:
 
 	void response(int response_id);
 	GtkWidget* init_appearance_tab();
-	GtkWidget* init_panel_button_tab();
 	GtkWidget* init_behavior_tab();
 	GtkWidget* init_commands_tab();
 

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


More information about the Xfce4-commits mailing list