mirror of https://github.com/GNOME/gimp.git
Rename member "drawing_area" to "tag_area"
This commit is contained in:
parent
f350e5ac51
commit
4d860185c1
|
@ -159,7 +159,7 @@ gimp_tag_popup_constructor (GType type,
|
||||||
GimpTagPopup *popup;
|
GimpTagPopup *popup;
|
||||||
GimpFilteredContainer *container;
|
GimpFilteredContainer *container;
|
||||||
GtkWidget *alignment;
|
GtkWidget *alignment;
|
||||||
GtkWidget *drawing_area;
|
GtkWidget *tag_area;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
gint x;
|
gint x;
|
||||||
gint y;
|
gint y;
|
||||||
|
@ -200,15 +200,15 @@ gimp_tag_popup_constructor (GType type,
|
||||||
alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
|
alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
||||||
|
|
||||||
drawing_area = gtk_drawing_area_new ();
|
tag_area = gtk_drawing_area_new ();
|
||||||
gtk_widget_add_events (GTK_WIDGET (drawing_area),
|
gtk_widget_add_events (tag_area,
|
||||||
GDK_BUTTON_PRESS_MASK |
|
GDK_BUTTON_PRESS_MASK |
|
||||||
GDK_BUTTON_RELEASE_MASK |
|
GDK_BUTTON_RELEASE_MASK |
|
||||||
GDK_POINTER_MOTION_MASK);
|
GDK_POINTER_MOTION_MASK);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), drawing_area);
|
gtk_container_add (GTK_CONTAINER (alignment), tag_area);
|
||||||
|
|
||||||
popup->alignment = alignment;
|
popup->alignment = alignment;
|
||||||
popup->drawing_area = drawing_area;
|
popup->tag_area = tag_area;
|
||||||
popup->context = gtk_widget_create_pango_context (GTK_WIDGET (popup));
|
popup->context = gtk_widget_create_pango_context (GTK_WIDGET (popup));
|
||||||
popup->layout = pango_layout_new (popup->context);
|
popup->layout = pango_layout_new (popup->context);
|
||||||
popup->prelight = NULL;
|
popup->prelight = NULL;
|
||||||
|
@ -313,8 +313,8 @@ gimp_tag_popup_constructor (GType type,
|
||||||
popup->scroll_step = 0;
|
popup->scroll_step = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawing_area->requisition.width = width;
|
tag_area->requisition.width = width;
|
||||||
drawing_area->requisition.height = popup_height;
|
tag_area->requisition.height = popup_height;
|
||||||
|
|
||||||
gtk_window_move (GTK_WINDOW (popup), popup_rect.x, popup_rect.y);
|
gtk_window_move (GTK_WINDOW (popup), popup_rect.x, popup_rect.y);
|
||||||
gtk_window_resize (GTK_WINDOW (popup), popup_rect.width, popup_rect.height);
|
gtk_window_resize (GTK_WINDOW (popup), popup_rect.width, popup_rect.height);
|
||||||
|
@ -327,10 +327,10 @@ gimp_tag_popup_constructor (GType type,
|
||||||
g_signal_connect (popup, "event",
|
g_signal_connect (popup, "event",
|
||||||
G_CALLBACK (gimp_tag_popup_border_event),
|
G_CALLBACK (gimp_tag_popup_border_event),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect (drawing_area, "expose-event",
|
g_signal_connect (tag_area, "expose-event",
|
||||||
G_CALLBACK (gimp_tag_popup_list_expose),
|
G_CALLBACK (gimp_tag_popup_list_expose),
|
||||||
popup);
|
popup);
|
||||||
g_signal_connect (drawing_area, "event",
|
g_signal_connect (tag_area, "event",
|
||||||
G_CALLBACK (gimp_tag_popup_list_event),
|
G_CALLBACK (gimp_tag_popup_list_event),
|
||||||
popup);
|
popup);
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@ gimp_tag_popup_border_event (GtkWidget *widget,
|
||||||
|
|
||||||
gdk_window_get_pointer (widget->window, &x, &y, NULL);
|
gdk_window_get_pointer (widget->window, &x, &y, NULL);
|
||||||
|
|
||||||
if (button_event->window != popup->drawing_area->window &&
|
if (button_event->window != popup->tag_area->window &&
|
||||||
(x < widget->allocation.y ||
|
(x < widget->allocation.y ||
|
||||||
y < widget->allocation.x ||
|
y < widget->allocation.x ||
|
||||||
x > widget->allocation.x + widget->allocation.width ||
|
x > widget->allocation.x + widget->allocation.width ||
|
||||||
|
@ -1200,7 +1200,7 @@ gimp_tag_popup_scroll_by (GimpTagPopup *popup,
|
||||||
{
|
{
|
||||||
popup->scroll_y = new_scroll_y;
|
popup->scroll_y = new_scroll_y;
|
||||||
|
|
||||||
gdk_window_scroll (popup->drawing_area->window, 0, -step);
|
gdk_window_scroll (popup->tag_area->window, 0, -step);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,11 @@ typedef struct _PopupTagData PopupTagData;
|
||||||
struct _GimpTagPopup
|
struct _GimpTagPopup
|
||||||
{
|
{
|
||||||
GtkWindow parent_instance;
|
GtkWindow parent_instance;
|
||||||
|
|
||||||
GimpComboTagEntry *combo_entry;
|
GimpComboTagEntry *combo_entry;
|
||||||
GtkWidget *alignment;
|
GtkWidget *alignment;
|
||||||
GtkWidget *drawing_area;
|
GtkWidget *tag_area;
|
||||||
|
|
||||||
PangoContext *context;
|
PangoContext *context;
|
||||||
PangoLayout *layout;
|
PangoLayout *layout;
|
||||||
PopupTagData *tag_data;
|
PopupTagData *tag_data;
|
||||||
|
|
Loading…
Reference in New Issue