aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/nameres_prefs.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-30 22:50:55 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-30 22:50:55 +0000
commit1efb7e36272911cccd9f49c4b87bf8388ad901c6 (patch)
tree0de26d6c053bbfcd6463a483b319095e3c5f0006 /gtk/nameres_prefs.c
parentdf0e82fa104a361cad55d751bfebd5e935967b12 (diff)
Add Luis' uat_get_table_by_name() to fetch SMI uat tables.
svn path=/trunk/; revision=24229
Diffstat (limited to 'gtk/nameres_prefs.c')
-rw-r--r--gtk/nameres_prefs.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/gtk/nameres_prefs.c b/gtk/nameres_prefs.c
index b306ddb886..d5f5e3e4a7 100644
--- a/gtk/nameres_prefs.c
+++ b/gtk/nameres_prefs.c
@@ -50,8 +50,6 @@
#ifdef HAVE_LIBSMI
#define SP_RESOLVE_KEY "sp_resolve"
#define SM_RESOLVE_KEY "sm_resolve"
-extern uat_t *smi_paths_uat;
-extern uat_t *smi_modules_uat;
#endif
#ifdef HAVE_GNU_ADNS
@@ -80,6 +78,8 @@ nameres_prefs_show(void)
#endif /* HAVE_GNU_ADNS */
#ifdef HAVE_LIBSMI
GtkWidget *sp_resolv_cb, *sm_resolv_cb;
+ uat_t *smi_paths_uat;
+ uat_t *smi_modules_uat;
#endif
/*
* XXX - it would be nice if the current setting of the resolver
@@ -142,16 +142,22 @@ nameres_prefs_show(void)
#endif /* HAVE_GNU_ADNS */
#ifdef HAVE_LIBSMI
/* SMI paths UAT */
- table_row++;
- sp_resolv_cb = create_preference_uat(main_tb, table_row,
- "SMI paths", "SMI paths to MIBS", smi_paths_uat);
- OBJECT_SET_DATA(main_vb, SP_RESOLVE_KEY, sp_resolv_cb);
+ smi_paths_uat = uat_get_table_by_name("SMI Paths");
+ if (smi_paths_uat) {
+ table_row++;
+ sp_resolv_cb = create_preference_uat(main_tb, table_row,
+ "SMI paths", "SMI paths to MIBS", smi_paths_uat);
+ OBJECT_SET_DATA(main_vb, SP_RESOLVE_KEY, sp_resolv_cb);
+ }
/* SMI modules UAT */
- table_row++;
- sm_resolv_cb = create_preference_uat(main_tb, table_row,
- "SMI modules", "SMI list of modules", smi_modules_uat);
- OBJECT_SET_DATA(main_vb, SM_RESOLVE_KEY, sm_resolv_cb);
+ smi_modules_uat = uat_get_table_by_name("SMI Modules");
+ if (smi_modules_uat) {
+ table_row++;
+ sm_resolv_cb = create_preference_uat(main_tb, table_row,
+ "SMI modules", "SMI list of modules", smi_modules_uat);
+ OBJECT_SET_DATA(main_vb, SM_RESOLVE_KEY, sm_resolv_cb);
+ }
#endif
/* Show 'em what we got */