forked from AuroraMiddleware/gtk
combobox: If typechecking, don’t reference before
This commit is contained in:
parent
ab051fd53f
commit
802f838aa0
@ -1717,7 +1717,7 @@ gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
|
||||
/* As above, this currently does not do anything useful, and nothing with the
|
||||
* passed-in device. But the bits that are not blatantly obsolete are kept. */
|
||||
|
||||
GtkComboBoxPrivate *priv = combo_box->priv;
|
||||
GtkComboBoxPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||
g_return_if_fail (GDK_IS_DEVICE (device));
|
||||
@ -1725,6 +1725,8 @@ gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
|
||||
if (!gtk_widget_get_realized (GTK_WIDGET (combo_box)))
|
||||
return;
|
||||
|
||||
priv = combo_box->priv;
|
||||
|
||||
if (gtk_widget_get_mapped (priv->popup_widget))
|
||||
return;
|
||||
|
||||
@ -1767,10 +1769,12 @@ gtk_combo_box_real_popdown (GtkComboBox *combo_box)
|
||||
void
|
||||
gtk_combo_box_popdown (GtkComboBox *combo_box)
|
||||
{
|
||||
GtkComboBoxPrivate *priv = combo_box->priv;
|
||||
GtkComboBoxPrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||
|
||||
priv = combo_box->priv;
|
||||
|
||||
if (priv->popup_widget)
|
||||
gtk_menu_popdown (GTK_MENU (priv->popup_widget));
|
||||
}
|
||||
@ -2790,7 +2794,7 @@ gtk_combo_box_set_model (GtkComboBox *combo_box,
|
||||
|
||||
priv = combo_box->priv;
|
||||
|
||||
if (model == combo_box->priv->model)
|
||||
if (model == priv->model)
|
||||
return;
|
||||
|
||||
gtk_combo_box_unset_model (combo_box);
|
||||
@ -3465,11 +3469,12 @@ void
|
||||
gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,
|
||||
gint text_column)
|
||||
{
|
||||
GtkComboBoxPrivate *priv = combo_box->priv;
|
||||
GtkComboBoxPrivate *priv;
|
||||
GtkTreeModel *model;
|
||||
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||
|
||||
priv = combo_box->priv;
|
||||
model = gtk_combo_box_get_model (combo_box);
|
||||
|
||||
g_return_if_fail (text_column >= 0);
|
||||
|
Loading…
Reference in New Issue
Block a user