commit 620eb8ef27884f9b83700659edca3d4c806e71fc
Author: phantomjinx <[email protected]>
Date: Sun May 1 22:09:10 2011 +0100
Repository creator wizard showing all widgets
* Should only display those widgets dependent upon the value of the
repository type, ie. local or ipod
plugins/repository_editor/repository_creator.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/plugins/repository_editor/repository_creator.c
b/plugins/repository_editor/repository_creator.c
index abb564d..76e94fd 100644
--- a/plugins/repository_editor/repository_creator.c
+++ b/plugins/repository_editor/repository_creator.c
@@ -176,9 +176,8 @@ static void create_delete_event(GtkWidget *widget, GdkEvent
*event, CreateRepWin
* Callback (repository type)
*
* ------------------------------------------------------------ */
-
-static void cr_repository_type_changed(GtkComboBox *cb, CreateRepWindow *cr) {
- gint index, i;
+static void show_hide_widgets(CreateRepWindow *cr, int index) {
+ gint i;
const gchar **show = NULL;
/* widgets to show for iPod repositories */
const gchar *show_ipod[] =
@@ -212,8 +211,6 @@ static void cr_repository_type_changed(GtkComboBox *cb,
CreateRepWindow *cr) {
NULL
};
- index = gtk_combo_box_get_active(cb);
-
switch (index) {
case REPOSITORY_TYPE_IPOD:
show = show_ipod;
@@ -236,6 +233,13 @@ static void cr_repository_type_changed(GtkComboBox *cb,
CreateRepWindow *cr) {
}
}
+static void cr_repository_type_changed(GtkComboBox *cb, CreateRepWindow *cr) {
+ gint index = 0;
+
+ index = gtk_combo_box_get_active(cb);
+ show_hide_widgets(cr, index);
+}
+
/**
* create_repository: Create a new repository.
*
@@ -314,4 +318,6 @@ void display_create_repository_dialog() {
g_free(buf1);
gtk_widget_show_all(cr->window);
+
+ show_hide_widgets(cr, 0);
}
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2