From 6e7e53cd25c81532e9b6d0e588b9a84ee3e414d3 Mon Sep 17 00:00:00 2001 From: Salvatore Iovene Date: Wed, 9 Dec 2009 21:29:41 +0200 Subject: [PATCH] Add sections' names. --- libmaemo-tweaks-section/maemo-tweaks-section.h | 1 + maemo-tweaks.c | 3 +++ modules/maemo-tweaks-desktop.c | 1 + modules/maemo-tweaks-mce.c | 1 + 4 files changed, 6 insertions(+) diff --git a/libmaemo-tweaks-section/maemo-tweaks-section.h b/libmaemo-tweaks-section/maemo-tweaks-section.h index d1c05b3..1fe1509 100644 --- a/libmaemo-tweaks-section/maemo-tweaks-section.h +++ b/libmaemo-tweaks-section/maemo-tweaks-section.h @@ -36,6 +36,7 @@ struct _MaemoTweaksSection /* The widget that the section populates (usually a vbox */ GtkWidget *widget; + const gchar *name; }; struct _MaemoTweaksSectionClass diff --git a/maemo-tweaks.c b/maemo-tweaks.c index 5cd5b40..aa0568b 100644 --- a/maemo-tweaks.c +++ b/maemo-tweaks.c @@ -65,6 +65,9 @@ osso_return_t execute (osso_context_t *osso, gpointer data, sections = g_list_prepend (sections, section); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + gtk_label_new (section->name), + TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), maemo_tweaks_section_get_widget (section), TRUE, TRUE, 0); diff --git a/modules/maemo-tweaks-desktop.c b/modules/maemo-tweaks-desktop.c index f934b7e..4dab65c 100644 --- a/modules/maemo-tweaks-desktop.c +++ b/modules/maemo-tweaks-desktop.c @@ -200,6 +200,7 @@ maemo_tweaks_desktop_section_init (MaemoTweaksDesktopSection *section) iface = MAEMO_TWEAKS_SECTION (section); + iface->name = "Desktop"; iface->widget = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (iface->widget), section->snap_button, TRUE, TRUE, 0); diff --git a/modules/maemo-tweaks-mce.c b/modules/maemo-tweaks-mce.c index 47b70b1..4435b4b 100644 --- a/modules/maemo-tweaks-mce.c +++ b/modules/maemo-tweaks-mce.c @@ -328,6 +328,7 @@ maemo_tweaks_mce_section_init (MaemoTweaksMceSection *section) section->value_changed = FALSE; iface = MAEMO_TWEAKS_SECTION (section); + iface->name = "Mce"; iface->widget = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (iface->widget), section->short_power_key, TRUE, TRUE, 0); -- 1.7.9.5