qulogic/libgnt

Add an accessor for GntComboBox->dropdown.
release-2.x.y
2019-04-11, Elliott Sales de Andrade
abe8010bbae0
Parents 67e94f90e55b
Children b1d6cdff79d5
Add an accessor for GntComboBox->dropdown.
--- a/gntcombobox.c Mon Apr 15 04:41:48 2019 -0500
+++ b/gntcombobox.c Thu Apr 11 04:34:59 2019 -0400
@@ -357,6 +357,14 @@
return widget;
}
+GntWidget *
+gnt_combo_box_get_dropdown(GntComboBox *box)
+{
+ g_return_val_if_fail(GNT_IS_BOX(box), NULL);
+
+ return box->dropdown;
+}
+
void gnt_combo_box_add_data(GntComboBox *box, gpointer key, const char *text)
{
gnt_tree_add_row_last(GNT_TREE(box->dropdown), key,
@@ -387,4 +395,3 @@
gnt_tree_remove_all(GNT_TREE(box->dropdown));
set_selection(box, NULL);
}
-
--- a/gntcombobox.h Mon Apr 15 04:41:48 2019 -0500
+++ b/gntcombobox.h Thu Apr 11 04:34:59 2019 -0400
@@ -53,9 +53,9 @@
{
GntWidget parent;
- GntWidget *GNTSEAL(dropdown); /* This is a GntTree */
+ GntWidget *GNTSEAL(dropdown); /* Deprecated. Use gnt_combo_box_get_dropdown. */
- void *GNTSEAL(selected); /* Currently selected key */
+ void *GNTSEAL(selected); /* Deprecated. Use gnt_combo_box_get_selected_data. */
};
struct _GntComboBoxClass
@@ -88,6 +88,18 @@
GntWidget * gnt_combo_box_new(void);
/**
+ * gnt_combo_box_get_dropdown:
+ * @box: The GntComboBox
+ *
+ * Get the dropdown GntTree that is shown when opened
+ *
+ * Returns: (transfer none): The dropdown for the combo box
+ *
+ * Since: 2.14.0
+ */
+GntWidget *gnt_combo_box_get_dropdown(GntComboBox *box);
+
+/**
* gnt_combo_box_add_data:
* @box: The GntComboBox
* @key: The data