[gnome-control-center/extensible-shell] network: remove the unnecessary GtkNotebook from the panel
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/extensible-shell] network: remove the unnecessary GtkNotebook from the panel
- Date: Thu, 22 Apr 2010 09:51:27 +0000 (UTC)
commit 7118c996c5ab2b8e9998109b8d17cd56c2b8f60b
Author: Thomas Wood <thomas wood intel com>
Date: Thu Apr 22 10:50:08 2010 +0100
network: remove the unnecessary GtkNotebook from the panel
The Notebook only had one page and displayed no tabs, so was not used in
any meaningful way. It also added an unnecessary extra frame.
capplets/network/cc-network-panel.c | 29 ++---------------------------
1 files changed, 2 insertions(+), 27 deletions(-)
---
diff --git a/capplets/network/cc-network-panel.c b/capplets/network/cc-network-panel.c
index 5299a05..cee9cf4 100644
--- a/capplets/network/cc-network-panel.c
+++ b/capplets/network/cc-network-panel.c
@@ -39,7 +39,6 @@
struct CcNetworkPanelPrivate
{
- GtkWidget *notebook;
CcPage *proxy_page;
};
@@ -80,48 +79,24 @@ cc_network_panel_get_property (GObject *object,
}
static void
-on_notebook_switch_page (GtkNotebook *notebook,
- GtkNotebookPage *page,
- guint page_num,
- CcNetworkPanel *panel)
-{
- if (page_num == 0) {
- g_object_set (panel,
- "current-page",
- panel->priv->proxy_page,
- NULL);
- }
-}
-
-static void
setup_panel (CcNetworkPanel *panel)
{
GtkWidget *label;
char *display_name;
- panel->priv->notebook = gtk_notebook_new ();
- g_signal_connect (panel->priv->notebook,
- "switch-page",
- G_CALLBACK (on_notebook_switch_page),
- panel);
-
- gtk_container_add (GTK_CONTAINER (panel), panel->priv->notebook);
- gtk_widget_show (panel->priv->notebook);
-
panel->priv->proxy_page = cc_network_proxy_page_new ();
g_object_get (panel->priv->proxy_page,
"display-name", &display_name,
NULL);
label = gtk_label_new (display_name);
g_free (display_name);
- gtk_notebook_append_page (GTK_NOTEBOOK (panel->priv->notebook), GTK_WIDGET (panel->priv->proxy_page), label);
gtk_widget_show (GTK_WIDGET (panel->priv->proxy_page));
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (panel->priv->notebook),
- FALSE);
g_object_set (panel,
"current-page", panel->priv->proxy_page,
NULL);
+
+ gtk_container_add (GTK_CONTAINER (panel), panel->priv->proxy_page);
}
static GObject *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]