--- a/gntbox.c Mon Apr 22 03:07:09 2019 -0400
+++ b/gntbox.c Mon Apr 22 03:20:47 2019 -0400
@@ -77,8 +77,9 @@
GntBox *box = GNT_BOX(widget);
- if (box->focus == NULL && widget->parent == NULL)
+ if (box->focus == NULL && gnt_widget_get_parent(widget) == NULL) { g_list_foreach(box->list, add_to_focus, box);
g_list_foreach(box->list, (GFunc)gnt_widget_draw, NULL);
@@ -253,8 +254,10 @@
find_focusable_widget(GntBox *box)
/* XXX: Make sure the widget is visible? */
- if (box->focus == NULL && GNT_WIDGET(box)->parent == NULL)
+ if (box->focus == NULL && + gnt_widget_get_parent(GNT_WIDGET(box)) == NULL) { g_list_foreach(box->list, add_to_focus, box);
if (box->active == NULL && box->focus)
box->active = box->focus->data;
@@ -764,7 +767,7 @@
box->list = g_list_remove(box->list, widget);
if (gnt_widget_get_take_focus(widget) &&
- GNT_WIDGET(box)->parent == NULL && box->focus) {
+ gnt_widget_get_parent(GNT_WIDGET(box)) == NULL && box->focus) { if (widget == box->active)
@@ -794,8 +797,9 @@
- if (GNT_WIDGET(box)->parent != NULL)
+ if (gnt_widget_get_parent(GNT_WIDGET(box)) != NULL) { for (iter = box->list; iter; iter = iter->next)
@@ -821,8 +825,7 @@
- if (wid->parent == NULL)
+ if (gnt_widget_get_parent(wid) == NULL) { --- a/gntcombobox.c Mon Apr 22 03:07:09 2019 -0400
+++ b/gntcombobox.c Mon Apr 22 03:20:47 2019 -0400
@@ -73,7 +73,7 @@
set_selection(box, gnt_tree_get_selection_data(GNT_TREE(box->dropdown)));
gnt_tree_set_selected(GNT_TREE(box->dropdown), box->selected);
- gnt_widget_hide(box->dropdown->parent);
+ gnt_widget_hide(gnt_widget_get_parent(box->dropdown)); @@ -133,7 +133,7 @@
popup_dropdown(GntComboBox *box)
GntWidget *widget = GNT_WIDGET(box);
- GntWidget *parent = box->dropdown->parent;
+ GntWidget *parent = gnt_widget_get_parent(box->dropdown); int height = g_list_length(GNT_TREE(box->dropdown)->list);
int y = widget->priv.y + widget->priv.height - 1;
gnt_widget_set_size(box->dropdown, widget->priv.width, height + 2);
@@ -157,7 +157,9 @@
gnt_combo_box_key_pressed(GntWidget *widget, const char *text)
GntComboBox *box = GNT_COMBO_BOX(widget);
- gboolean showing = gnt_widget_get_mapped(box->dropdown->parent);
+ showing = gnt_widget_get_mapped(gnt_widget_get_parent(box->dropdown)); @@ -215,15 +217,17 @@
gnt_combo_box_destroy(GntWidget *widget)
- gnt_widget_destroy(GNT_COMBO_BOX(widget)->dropdown->parent);
+ GntComboBox *combo = GNT_COMBO_BOX(widget); + gnt_widget_destroy(gnt_widget_get_parent(combo->dropdown)); gnt_combo_box_lost_focus(GntWidget *widget)
GntComboBox *combo = GNT_COMBO_BOX(widget);
- if (gnt_widget_get_mapped(combo->dropdown->parent))
+ if (gnt_widget_get_mapped(gnt_widget_get_parent(combo->dropdown))) { hide_popup(combo, FALSE);
widget_lost_focus(widget);
@@ -232,7 +236,9 @@
G_GNUC_UNUSED int x, G_GNUC_UNUSED int y)
GntComboBox *box = GNT_COMBO_BOX(widget);
- gboolean dshowing = gnt_widget_get_mapped(box->dropdown->parent);
+ dshowing = gnt_widget_get_mapped(gnt_widget_get_parent(box->dropdown)); if (event == GNT_MOUSE_SCROLL_UP) {
@@ -262,9 +268,11 @@
dropdown_menu(GntBindable *b, G_GNUC_UNUSED GList *params)
- if (gnt_widget_get_mapped(GNT_COMBO_BOX(b)->dropdown->parent))
+ GntComboBox *combo = GNT_COMBO_BOX(b); + if (gnt_widget_get_mapped(gnt_widget_get_parent(combo->dropdown))) { - popup_dropdown(GNT_COMBO_BOX(b));
--- a/gntentry.c Mon Apr 22 03:07:09 2019 -0400
+++ b/gntentry.c Mon Apr 22 03:20:47 2019 -0400
@@ -154,7 +154,7 @@
destroy_suggest(GntEntryPrivate *priv)
- gnt_widget_destroy(priv->ddown->parent);
+ gnt_widget_destroy(gnt_widget_get_parent(priv->ddown)); @@ -299,7 +299,7 @@
- gnt_widget_draw(priv->ddown->parent);
+ gnt_widget_draw(gnt_widget_get_parent(priv->ddown)); @@ -1021,7 +1021,7 @@
- gnt_widget_destroy(priv->ddown->parent);
+ gnt_widget_destroy(gnt_widget_get_parent(priv->ddown)); g_free(priv->search->needle);