forked from AuroraMiddleware/gtk
Allow passing NULL to unset the model. (#137211, patch by Mariano
Fri Jun 25 23:35:42 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkentrycompletion.c (gtk_entry_completion_set_model): * gtk/gtkcombobox.c (gtk_combo_box_set_model): Allow passing NULL to unset the model. (#137211, patch by Mariano Suárez-Alvarez) Fri Jun 25 23:33:05 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkcombobox.c (gtk_combo_box_menu_position_below): Fix the placement policy for GtkComboBoxEntry to be: if it fits below, place below, if it fits above place above, else place in the larger space and scroll so that the scroll arrow appear at the far end. (#144362, David A. Knight)
This commit is contained in:
parent
c3bb3bef04
commit
57e15782ff
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
Fri Jun 25 23:35:42 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model):
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_set_model): Allow passing
|
||||
NULL to unset the model. (#137211, patch by Mariano Suárez-Alvarez)
|
||||
|
||||
Fri Jun 25 23:33:05 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below): Fix the
|
||||
placement policy for GtkComboBoxEntry to be: if it fits below,
|
||||
place below, if it fits above place above, else place in the
|
||||
larger space and scroll so that the scroll arrow appear at the
|
||||
far end. (#144362, David A. Knight)
|
||||
|
||||
Fri Jun 25 22:49:58 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): Avoid uninitialized
|
||||
|
@ -1,3 +1,17 @@
|
||||
Fri Jun 25 23:35:42 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model):
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_set_model): Allow passing
|
||||
NULL to unset the model. (#137211, patch by Mariano Suárez-Alvarez)
|
||||
|
||||
Fri Jun 25 23:33:05 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below): Fix the
|
||||
placement policy for GtkComboBoxEntry to be: if it fits below,
|
||||
place below, if it fits above place above, else place in the
|
||||
larger space and scroll so that the scroll arrow appear at the
|
||||
far end. (#144362, David A. Knight)
|
||||
|
||||
Fri Jun 25 22:49:58 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): Avoid uninitialized
|
||||
|
@ -1,3 +1,17 @@
|
||||
Fri Jun 25 23:35:42 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model):
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_set_model): Allow passing
|
||||
NULL to unset the model. (#137211, patch by Mariano Suárez-Alvarez)
|
||||
|
||||
Fri Jun 25 23:33:05 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below): Fix the
|
||||
placement policy for GtkComboBoxEntry to be: if it fits below,
|
||||
place below, if it fits above place above, else place in the
|
||||
larger space and scroll so that the scroll arrow appear at the
|
||||
far end. (#144362, David A. Knight)
|
||||
|
||||
Fri Jun 25 22:49:58 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): Avoid uninitialized
|
||||
|
@ -1,3 +1,17 @@
|
||||
Fri Jun 25 23:35:42 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_set_model):
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_set_model): Allow passing
|
||||
NULL to unset the model. (#137211, patch by Mariano Suárez-Alvarez)
|
||||
|
||||
Fri Jun 25 23:33:05 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_menu_position_below): Fix the
|
||||
placement policy for GtkComboBoxEntry to be: if it fits below,
|
||||
place below, if it fits above place above, else place in the
|
||||
larger space and scroll so that the scroll arrow appear at the
|
||||
far end. (#144362, David A. Knight)
|
||||
|
||||
Fri Jun 25 22:49:58 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_move): Avoid uninitialized
|
||||
|
@ -985,12 +985,16 @@ gtk_combo_box_menu_position_below (GtkMenu *menu,
|
||||
else if (*x + req.width > monitor.x + monitor.width)
|
||||
*x = monitor.x + monitor.width - req.width;
|
||||
|
||||
if (*y + child->allocation.height + req.height <= monitor.y + monitor.height)
|
||||
if (monitor.y + monitor.height - *y - child->allocation.height >= req.height)
|
||||
*y += child->allocation.height;
|
||||
else if (*y - monitor.y >= req.height)
|
||||
*y -= req.height;
|
||||
else if (monitor.y + monitor.height - *y - child->allocation.height > *y - monitor.y)
|
||||
*y += child->allocation.height;
|
||||
else
|
||||
*y -= req.height;
|
||||
|
||||
*push_in = TRUE;
|
||||
*push_in = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -3523,6 +3527,13 @@ gtk_combo_box_set_model (GtkComboBox *combo_box,
|
||||
GtkTreeModel *model)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||
|
||||
if (!model)
|
||||
{
|
||||
gtk_combo_box_unset_model (combo_box);
|
||||
return;
|
||||
}
|
||||
|
||||
g_return_if_fail (GTK_IS_TREE_MODEL (model));
|
||||
|
||||
if (model == combo_box->priv->model)
|
||||
|
@ -827,7 +827,7 @@ gtk_entry_completion_set_model (GtkEntryCompletion *completion,
|
||||
GtkTreeModel *model)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
|
||||
g_return_if_fail (GTK_IS_TREE_MODEL (model));
|
||||
g_return_if_fail (model == NULL || GTK_IS_TREE_MODEL (model));
|
||||
|
||||
/* code will unref the old filter model (if any) */
|
||||
completion->priv->filter_model =
|
||||
|
Loading…
Reference in New Issue
Block a user