mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
Fixed conflicts after rebasing master into combo-refactor branch.
This commit is contained in:
parent
d681aa7977
commit
4ff893979b
@ -1548,10 +1548,10 @@ gtk_combo_box_detacher (GtkWidget *widget,
|
||||
|
||||
g_return_if_fail (priv->popup_widget == (GtkWidget *) menu);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (menu->toplevel,
|
||||
g_signal_handlers_disconnect_by_func (menu->priv->toplevel,
|
||||
gtk_combo_box_menu_show,
|
||||
combo_box);
|
||||
g_signal_handlers_disconnect_by_func (menu->toplevel,
|
||||
g_signal_handlers_disconnect_by_func (menu->priv->toplevel,
|
||||
gtk_combo_box_menu_hide,
|
||||
combo_box);
|
||||
|
||||
@ -1592,9 +1592,9 @@ gtk_combo_box_set_popup_widget (GtkComboBox *combo_box,
|
||||
* menu itself, since the menu is not shown/hidden when it is
|
||||
* popped up while torn-off.
|
||||
*/
|
||||
g_signal_connect (GTK_MENU (popup)->toplevel, "show",
|
||||
g_signal_connect (GTK_MENU (popup)->priv->toplevel, "show",
|
||||
G_CALLBACK (gtk_combo_box_menu_show), combo_box);
|
||||
g_signal_connect (GTK_MENU (popup)->toplevel, "hide",
|
||||
g_signal_connect (GTK_MENU (popup)->priv->toplevel, "hide",
|
||||
G_CALLBACK (gtk_combo_box_menu_hide), combo_box);
|
||||
|
||||
gtk_menu_attach_to_widget (GTK_MENU (popup),
|
||||
@ -1782,7 +1782,7 @@ gtk_combo_box_menu_position_over (GtkMenu *menu,
|
||||
menu_ypos -= child_allocation.height / 2;
|
||||
}
|
||||
|
||||
children = GTK_MENU_SHELL (combo_box->priv->popup_widget)->children;
|
||||
children = GTK_MENU_SHELL (combo_box->priv->popup_widget)->priv->children;
|
||||
while (children)
|
||||
{
|
||||
child = children->data;
|
||||
@ -1845,8 +1845,8 @@ gtk_combo_box_menu_position (GtkMenu *menu,
|
||||
gtk_combo_box_menu_position_over (menu, x, y, push_in, user_data);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (GTK_MENU (priv->popup_widget)->toplevel))
|
||||
gtk_window_set_type_hint (GTK_WINDOW (GTK_MENU (priv->popup_widget)->toplevel),
|
||||
if (!gtk_widget_get_visible (GTK_MENU (priv->popup_widget)->priv->toplevel))
|
||||
gtk_window_set_type_hint (GTK_WINDOW (GTK_MENU (priv->popup_widget)->priv->toplevel),
|
||||
GDK_WINDOW_TYPE_HINT_COMBO);
|
||||
}
|
||||
|
||||
|
@ -425,9 +425,9 @@ gtk_menu_item_init (GtkMenuItem *menu_item)
|
||||
priv->action = NULL;
|
||||
priv->use_action_appearance = TRUE;
|
||||
|
||||
menu_item->submenu = NULL;
|
||||
menu_item->toggle_size = 0;
|
||||
menu_item->accelerator_width = 0;
|
||||
menu_item->priv->submenu = NULL;
|
||||
menu_item->priv->toggle_size = 0;
|
||||
menu_item->priv->accelerator_width = 0;
|
||||
if (gtk_widget_get_direction (GTK_WIDGET (menu_item)) == GTK_TEXT_DIR_RTL)
|
||||
priv->submenu_direction = GTK_DIRECTION_LEFT;
|
||||
else
|
||||
@ -714,7 +714,7 @@ gtk_menu_item_get_preferred_width (GtkWidget *widget,
|
||||
|
||||
gtk_widget_get_preferred_width (child, &child_min, &child_nat);
|
||||
|
||||
if ((menu_item->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
if ((menu_item->priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
{
|
||||
guint arrow_spacing;
|
||||
gint arrow_size;
|
||||
@ -816,7 +816,7 @@ gtk_menu_item_get_preferred_height (GtkWidget *widget,
|
||||
min_height += child_min;
|
||||
nat_height += child_nat;
|
||||
|
||||
if ((menu_item->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
if ((menu_item->priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
{
|
||||
gint arrow_size;
|
||||
|
||||
@ -918,11 +918,10 @@ gtk_menu_item_get_preferred_height_for_width (GtkWidget *widget,
|
||||
|
||||
if (child != NULL && gtk_widget_get_visible (child))
|
||||
{
|
||||
GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
|
||||
gint child_min, child_nat;
|
||||
gint arrow_size = 0;
|
||||
|
||||
if ((menu_item->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
if ((priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
{
|
||||
guint arrow_spacing;
|
||||
|
||||
@ -944,7 +943,7 @@ gtk_menu_item_get_preferred_height_for_width (GtkWidget *widget,
|
||||
min_height += child_min;
|
||||
nat_height += child_nat;
|
||||
|
||||
if (menu_item->submenu && !GTK_IS_MENU_BAR (parent))
|
||||
if ((priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
{
|
||||
min_height = MAX (min_height, arrow_size);
|
||||
nat_height = MAX (nat_height, arrow_size);
|
||||
@ -1354,7 +1353,6 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
|
||||
child = gtk_bin_get_child (bin);
|
||||
if (child)
|
||||
{
|
||||
GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
|
||||
GtkStyle *style;
|
||||
guint horizontal_padding;
|
||||
guint border_width;
|
||||
@ -1395,7 +1393,7 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
|
||||
child_allocation.x += allocation->x;
|
||||
child_allocation.y += allocation->y;
|
||||
|
||||
if ((menu_item->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
if ((priv->submenu && !GTK_IS_MENU_BAR (parent)) || priv->reserve_indicator)
|
||||
{
|
||||
guint arrow_spacing;
|
||||
gint arrow_size;
|
||||
@ -1560,7 +1558,7 @@ gtk_menu_item_draw (GtkWidget *widget,
|
||||
x, y, w, h);
|
||||
}
|
||||
|
||||
if (menu_item->submenu && !GTK_IS_MENU_BAR (parent))
|
||||
if (priv->submenu && !GTK_IS_MENU_BAR (parent))
|
||||
{
|
||||
gint arrow_x, arrow_y;
|
||||
gint arrow_size;
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "gtkcellareacontext.h"
|
||||
#include "gtkcelllayout.h"
|
||||
#include "gtkcellview.h"
|
||||
#include "gtkmenushellprivate.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
|
||||
@ -1035,7 +1036,7 @@ row_changed_cb (GtkTreeModel *model,
|
||||
{
|
||||
/* Destroy the header item and then the following separator */
|
||||
gtk_widget_destroy (item);
|
||||
gtk_widget_destroy (GTK_MENU_SHELL (menu)->children->data);
|
||||
gtk_widget_destroy (GTK_MENU_SHELL (menu)->priv->children->data);
|
||||
|
||||
priv->menu_with_header = FALSE;
|
||||
}
|
||||
@ -1137,11 +1138,11 @@ area_apply_attributes_cb (GtkCellArea *area,
|
||||
/* For header items we need to set the sensitivity
|
||||
* of the following separator item
|
||||
*/
|
||||
if (GTK_MENU_SHELL (menu)->children &&
|
||||
GTK_MENU_SHELL (menu)->children->next)
|
||||
if (GTK_MENU_SHELL (menu)->priv->children &&
|
||||
GTK_MENU_SHELL (menu)->priv->children->next)
|
||||
{
|
||||
GtkWidget *separator =
|
||||
GTK_MENU_SHELL (menu)->children->next->data;
|
||||
GTK_MENU_SHELL (menu)->priv->children->next->data;
|
||||
|
||||
gtk_widget_set_sensitive (separator, sensitive);
|
||||
}
|
||||
@ -1188,7 +1189,7 @@ menu_occupied (GtkTreeMenu *menu,
|
||||
{
|
||||
GList *i;
|
||||
|
||||
for (i = GTK_MENU_SHELL (menu)->children; i; i = i->next)
|
||||
for (i = GTK_MENU_SHELL (menu)->priv->children; i; i = i->next)
|
||||
{
|
||||
guint l, r, b, t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user