aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-10-22 07:46:13 +0800
committerChristian Persch <chpe@src.gnome.org>2004-10-22 07:46:13 +0800
commit359f14df6b76ebf2a236245f51cf69e1ae0f351e (patch)
tree74741c4dc6a80bec3b4938a86cedf3b3d823e38d /lib
parentf946f0f12df551e2960114e1378785ab245ae0c6 (diff)
downloadgsoc2013-epiphany-359f14df6b76ebf2a236245f51cf69e1ae0f351e.tar
gsoc2013-epiphany-359f14df6b76ebf2a236245f51cf69e1ae0f351e.tar.gz
gsoc2013-epiphany-359f14df6b76ebf2a236245f51cf69e1ae0f351e.tar.bz2
gsoc2013-epiphany-359f14df6b76ebf2a236245f51cf69e1ae0f351e.tar.lz
gsoc2013-epiphany-359f14df6b76ebf2a236245f51cf69e1ae0f351e.tar.xz
gsoc2013-epiphany-359f14df6b76ebf2a236245f51cf69e1ae0f351e.tar.zst
gsoc2013-epiphany-359f14df6b76ebf2a236245f51cf69e1ae0f351e.zip
Add varargs version of ephy_dialog_get_control to get more than one
2004-10-22 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-dialog.c: (ephy_dialog_get_controls): * lib/ephy-dialog.h: Add varargs version of ephy_dialog_get_control to get more than one control at a time. * embed/downloader-view.c: (downloader_view_build_ui): * src/pdm-dialog.c: (pdm_dialog_show_help), (pdm_dialog_init): * src/prefs-dialog.c: (prefs_dialog_show_help), (setup_add_language_dialog), (create_language_section), (prefs_dialog_init): Use that.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-dialog.c25
-rw-r--r--lib/ephy-dialog.h4
2 files changed, 29 insertions, 0 deletions
diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c
index 09ead6a75..234680c4b 100644
--- a/lib/ephy-dialog.c
+++ b/lib/ephy-dialog.c
@@ -1228,6 +1228,31 @@ ephy_dialog_get_control (EphyDialog *dialog,
return info->widget;
}
+void
+ephy_dialog_get_controls (EphyDialog *dialog,
+ const char *property_id,
+ ...)
+{
+ PropertyInfo *info;
+ GtkWidget **wptr;
+ va_list varargs;
+
+ va_start (varargs, property_id);
+
+ while (property_id != NULL)
+ {
+ info = lookup_info (dialog, property_id);
+ g_return_if_fail (info != NULL);
+
+ wptr = va_arg (varargs, GtkWidget **);
+ *wptr = info->widget;
+
+ property_id = va_arg (varargs, const char *);
+ }
+
+ va_end (varargs);
+}
+
gboolean
ephy_dialog_get_value (EphyDialog *dialog,
const char *property_id,
diff --git a/lib/ephy-dialog.h b/lib/ephy-dialog.h
index cb9d88c9e..9cf7aebf7 100644
--- a/lib/ephy-dialog.h
+++ b/lib/ephy-dialog.h
@@ -121,6 +121,10 @@ void ephy_dialog_set_modal (EphyDialog *dialog,
GtkWidget *ephy_dialog_get_control (EphyDialog *dialog,
const char *property_id);
+void ephy_dialog_get_controls (EphyDialog *dialog,
+ const char *first_property_id,
+ ...);
+
gboolean ephy_dialog_get_value (EphyDialog *dialog,
const char *property_id,
GValue *value);