[gimp] Remove "close_rectangles" member and the feature it implemented
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] Remove "close_rectangles" member and the feature it implemented
- Date: Fri, 10 Jul 2009 18:15:11 +0000 (UTC)
commit 75ee288278021aed5272f1c3aaf1eeedbd43976f
Author: Michael Natterer <mitch gimp org>
Date: Fri Jul 10 02:17:00 2009 +0200
Remove "close_rectangles" member and the feature it implemented
Closing whatever popup by click on dead space within it is a no no,
otherwise one-pixel mis-clicks inside the widget make it go away,
which is totally unexpected.
app/widgets/gimptagpopup.c | 64 --------------------------------------------
app/widgets/gimptagpopup.h | 1 -
2 files changed, 0 insertions(+), 65 deletions(-)
---
diff --git a/app/widgets/gimptagpopup.c b/app/widgets/gimptagpopup.c
index b6abf7a..39571a0 100644
--- a/app/widgets/gimptagpopup.c
+++ b/app/widgets/gimptagpopup.c
@@ -362,13 +362,6 @@ gimp_tag_popup_dispose (GObject *object)
popup->context = NULL;
}
- if (popup->close_rectangles)
- {
- g_list_foreach (popup->close_rectangles, (GFunc) g_free, NULL);
- g_list_free (popup->close_rectangles);
- popup->close_rectangles = NULL;
- }
-
if (popup->tag_data)
{
g_free (popup->tag_data);
@@ -514,19 +507,6 @@ gimp_tag_popup_layout_tags (GimpTagPopup *popup,
if (tag_data->bounds.width + x + 3 + GIMP_TAG_POPUP_MARGIN > width)
{
- if (tag_data->bounds.width + line_height + GIMP_TAG_POPUP_MARGIN < width)
- {
- GdkRectangle *close_rect = g_malloc (sizeof (GdkRectangle));
-
- close_rect->x = x - space_width - 5;
- close_rect->y = y;
- close_rect->width = width - close_rect->x;
- close_rect->height = line_height + 2;
-
- popup->close_rectangles = g_list_append (popup->close_rectangles,
- close_rect);
- }
-
x = GIMP_TAG_POPUP_MARGIN;
y += line_height + 2;
}
@@ -537,20 +517,6 @@ gimp_tag_popup_layout_tags (GimpTagPopup *popup,
x += tag_data->bounds.width + space_width + 5;
}
- if (popup->tag_count > 0 &&
- (width - x) > line_height + GIMP_TAG_POPUP_MARGIN)
- {
- GdkRectangle *close_rect = g_malloc (sizeof (GdkRectangle));
-
- close_rect->x = x - space_width - 5;
- close_rect->y = y;
- close_rect->width = width - close_rect->x;
- close_rect->height = line_height + 2;
-
- popup->close_rectangles = g_list_append (popup->close_rectangles,
- close_rect);
- }
-
if (gtk_widget_get_direction (GTK_WIDGET (popup)) == GTK_TEXT_DIR_RTL)
{
GList *iterator;
@@ -563,15 +529,6 @@ gimp_tag_popup_layout_tags (GimpTagPopup *popup,
tag_data->bounds.x -
tag_data->bounds.width);
}
-
- for (iterator = popup->close_rectangles;
- iterator;
- iterator = g_list_next (iterator))
- {
- GdkRectangle *rect = iterator->data;
-
- rect->x = width - rect->x - rect->width;
- }
}
height = y + line_height + GIMP_TAG_POPUP_MARGIN;
@@ -877,27 +834,6 @@ gimp_tag_popup_list_event (GtkWidget *widget,
break;
}
}
-
- if (i == popup->tag_count)
- {
- GList *iterator;
-
- for (iterator = popup->close_rectangles;
- iterator;
- iterator = g_list_next (iterator))
- {
- GdkRectangle *bounds = iterator->data;
-
- if (x >= bounds->x &&
- y >= bounds->y &&
- x < bounds->x + bounds->width &&
- y < bounds->y + bounds->height)
- {
- gtk_widget_destroy (GTK_WIDGET (popup));
- break;
- }
- }
- }
}
else if (event->type == GDK_MOTION_NOTIFY)
{
diff --git a/app/widgets/gimptagpopup.h b/app/widgets/gimptagpopup.h
index f2324f8..1ed01a0 100644
--- a/app/widgets/gimptagpopup.h
+++ b/app/widgets/gimptagpopup.h
@@ -47,7 +47,6 @@ struct _GimpTagPopup
PopupTagData *tag_data;
PopupTagData *prelight;
gint tag_count;
- GList *close_rectangles;
guint timeout_id;
gint scroll_height;
gint scroll_y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]