Split declaration and assignment of combo_box.
Mon Feb 16 00:04:46 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_*): Split declaration and assignment of combo_box. * gtk/gtkcombobox.c (gtk_combo_box_list_setup): Remove a pointless cast
This commit is contained in:
committed by
Matthias Clasen
parent
be5d74ba4d
commit
2cc8cfa0ea
@ -1,3 +1,11 @@
|
|||||||
|
Mon Feb 16 00:04:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_*):
|
||||||
|
Split declaration and assignment of combo_box.
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Remove a
|
||||||
|
pointless cast
|
||||||
|
|
||||||
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
Mon Feb 16 00:04:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_*):
|
||||||
|
Split declaration and assignment of combo_box.
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Remove a
|
||||||
|
pointless cast
|
||||||
|
|
||||||
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
Mon Feb 16 00:04:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_*):
|
||||||
|
Split declaration and assignment of combo_box.
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Remove a
|
||||||
|
pointless cast
|
||||||
|
|
||||||
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
Mon Feb 16 00:04:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_*):
|
||||||
|
Split declaration and assignment of combo_box.
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Remove a
|
||||||
|
pointless cast
|
||||||
|
|
||||||
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
Mon Feb 16 00:04:46 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_*):
|
||||||
|
Split declaration and assignment of combo_box.
|
||||||
|
|
||||||
|
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Remove a
|
||||||
|
pointless cast
|
||||||
|
|
||||||
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
Sun Feb 15 22:08:53 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
* gtk/gtkoptionmenu.c (gtk_option_menu_get_history): Add
|
||||||
|
|||||||
@ -161,8 +161,6 @@ static void gtk_combo_box_menu_position (GtkMenu *menu,
|
|||||||
gint *y,
|
gint *y,
|
||||||
gint *push_in,
|
gint *push_in,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
static void gtk_combo_box_popup (GtkComboBox *combo_box);
|
|
||||||
static void gtk_combo_box_popdown (GtkComboBox *combo_box);
|
|
||||||
|
|
||||||
static gint gtk_combo_box_calc_requested_width (GtkComboBox *combo_box,
|
static gint gtk_combo_box_calc_requested_width (GtkComboBox *combo_box,
|
||||||
GtkTreePath *path);
|
GtkTreePath *path);
|
||||||
@ -746,12 +744,25 @@ gtk_combo_box_menu_position (GtkMenu *menu,
|
|||||||
*push_in = TRUE;
|
*push_in = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
/**
|
||||||
|
* gtk_combo_box_popup:
|
||||||
|
* @combo_box: a #GtkComboBox
|
||||||
|
*
|
||||||
|
* Pops up the menu or dropdown list of @combo_box.
|
||||||
|
*
|
||||||
|
* This function is mostly intended for use by accessibility technologies;
|
||||||
|
* applications should have little use for it.
|
||||||
|
*
|
||||||
|
* Since: 2.4
|
||||||
|
**/
|
||||||
|
void
|
||||||
gtk_combo_box_popup (GtkComboBox *combo_box)
|
gtk_combo_box_popup (GtkComboBox *combo_box)
|
||||||
{
|
{
|
||||||
gint x, y, width, height;
|
gint x, y, width, height;
|
||||||
GtkWidget *sample;
|
GtkWidget *sample;
|
||||||
|
|
||||||
|
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||||
|
|
||||||
if (GTK_WIDGET_MAPPED (combo_box->priv->popup_widget))
|
if (GTK_WIDGET_MAPPED (combo_box->priv->popup_widget))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -818,9 +829,22 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
/**
|
||||||
|
* gtk_combo_box_popdown:
|
||||||
|
* @combo_box: a #GtkComboBox
|
||||||
|
*
|
||||||
|
* Hides the menu or dropdown list of @combo_box.
|
||||||
|
*
|
||||||
|
* This function is mostly intended for use by accessibility technologies;
|
||||||
|
* applications should have little use for it.
|
||||||
|
*
|
||||||
|
* Since: 2.4
|
||||||
|
**/
|
||||||
|
void
|
||||||
gtk_combo_box_popdown (GtkComboBox *combo_box)
|
gtk_combo_box_popdown (GtkComboBox *combo_box)
|
||||||
{
|
{
|
||||||
|
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
||||||
|
|
||||||
if (GTK_IS_MENU (combo_box->priv->popup_widget))
|
if (GTK_IS_MENU (combo_box->priv->popup_widget))
|
||||||
{
|
{
|
||||||
gtk_menu_popdown (GTK_MENU (combo_box->priv->popup_widget));
|
gtk_menu_popdown (GTK_MENU (combo_box->priv->popup_widget));
|
||||||
@ -1823,8 +1847,7 @@ gtk_combo_box_list_setup (GtkComboBox *combo_box)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* set sample/popup widgets */
|
/* set sample/popup widgets */
|
||||||
gtk_combo_box_set_popup_widget (GTK_COMBO_BOX (combo_box),
|
gtk_combo_box_set_popup_widget (combo_box, combo_box->priv->tree_view);
|
||||||
combo_box->priv->tree_view);
|
|
||||||
|
|
||||||
gtk_widget_show (combo_box->priv->tree_view);
|
gtk_widget_show (combo_box->priv->tree_view);
|
||||||
}
|
}
|
||||||
@ -2048,12 +2071,14 @@ gtk_combo_box_cell_layout_pack_start (GtkCellLayout *layout,
|
|||||||
gboolean expand)
|
gboolean expand)
|
||||||
{
|
{
|
||||||
ComboCellInfo *info;
|
ComboCellInfo *info;
|
||||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
GtkComboBox *combo_box;
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||||
|
|
||||||
|
combo_box = GTK_COMBO_BOX (layout);
|
||||||
|
|
||||||
info = g_new0 (ComboCellInfo, 1);
|
info = g_new0 (ComboCellInfo, 1);
|
||||||
info->cell = cell;
|
info->cell = cell;
|
||||||
info->expand = expand;
|
info->expand = expand;
|
||||||
@ -2095,12 +2120,14 @@ gtk_combo_box_cell_layout_pack_end (GtkCellLayout *layout,
|
|||||||
gboolean expand)
|
gboolean expand)
|
||||||
{
|
{
|
||||||
ComboCellInfo *info;
|
ComboCellInfo *info;
|
||||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
GtkComboBox *combo_box;
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||||
|
|
||||||
|
combo_box = GTK_COMBO_BOX (layout);
|
||||||
|
|
||||||
info = g_new0 (ComboCellInfo, 1);
|
info = g_new0 (ComboCellInfo, 1);
|
||||||
info->cell = cell;
|
info->cell = cell;
|
||||||
info->expand = expand;
|
info->expand = expand;
|
||||||
@ -2138,10 +2165,12 @@ static void
|
|||||||
gtk_combo_box_cell_layout_clear (GtkCellLayout *layout)
|
gtk_combo_box_cell_layout_clear (GtkCellLayout *layout)
|
||||||
{
|
{
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
GtkComboBox *combo_box;
|
||||||
GSList *i;
|
GSList *i;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||||
|
|
||||||
|
combo_box = GTK_COMBO_BOX (layout);
|
||||||
|
|
||||||
if (combo_box->priv->cell_view)
|
if (combo_box->priv->cell_view)
|
||||||
gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo_box->priv->cell_view));
|
gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo_box->priv->cell_view));
|
||||||
@ -2188,12 +2217,14 @@ gtk_combo_box_cell_layout_add_attribute (GtkCellLayout *layout,
|
|||||||
gint column)
|
gint column)
|
||||||
{
|
{
|
||||||
ComboCellInfo *info;
|
ComboCellInfo *info;
|
||||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
GtkComboBox *combo_box;
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||||
|
|
||||||
|
combo_box = GTK_COMBO_BOX (layout);
|
||||||
|
|
||||||
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
||||||
|
|
||||||
info->attributes = g_slist_prepend (info->attributes,
|
info->attributes = g_slist_prepend (info->attributes,
|
||||||
@ -2241,10 +2272,12 @@ gtk_combo_box_cell_layout_set_cell_data_func (GtkCellLayout *layout,
|
|||||||
GDestroyNotify destroy)
|
GDestroyNotify destroy)
|
||||||
{
|
{
|
||||||
ComboCellInfo *info;
|
ComboCellInfo *info;
|
||||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
GtkComboBox *combo_box;
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
|
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||||
|
|
||||||
|
combo_box = GTK_COMBO_BOX (layout);
|
||||||
|
|
||||||
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
||||||
g_return_if_fail (info != NULL);
|
g_return_if_fail (info != NULL);
|
||||||
@ -2296,13 +2329,15 @@ gtk_combo_box_cell_layout_clear_attributes (GtkCellLayout *layout,
|
|||||||
GtkCellRenderer *cell)
|
GtkCellRenderer *cell)
|
||||||
{
|
{
|
||||||
ComboCellInfo *info;
|
ComboCellInfo *info;
|
||||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
GtkComboBox *combo_box;
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
GSList *list;
|
GSList *list;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||||
|
|
||||||
|
combo_box = GTK_COMBO_BOX (layout);
|
||||||
|
|
||||||
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
||||||
g_return_if_fail (info != NULL);
|
g_return_if_fail (info != NULL);
|
||||||
|
|
||||||
@ -2350,13 +2385,15 @@ gtk_combo_box_cell_layout_reorder (GtkCellLayout *layout,
|
|||||||
gint position)
|
gint position)
|
||||||
{
|
{
|
||||||
ComboCellInfo *info;
|
ComboCellInfo *info;
|
||||||
GtkComboBox *combo_box = GTK_COMBO_BOX (layout);
|
GtkComboBox *combo_box;
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
GSList *link;
|
GSList *link;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
g_return_if_fail (GTK_IS_COMBO_BOX (layout));
|
||||||
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
|
||||||
|
|
||||||
|
combo_box = GTK_COMBO_BOX (layout);
|
||||||
|
|
||||||
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
info = gtk_combo_box_get_cell_info (combo_box, cell);
|
||||||
|
|
||||||
g_return_if_fail (info != NULL);
|
g_return_if_fail (info != NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user