aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/mainwindow.c2
-rw-r--r--src/menu.c7
-rw-r--r--src/menu.h2
4 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index d42d0fb9..9836e6fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-03-26
+ * src/menu.c: menu_button_position(): adjusted the menu position.
+
+2012-03-26
+
* src/folderview.c
src/summaryview.c: also support Shift+F10 for menu popup.
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 09cb41c7..6a1dfda7 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/menu.c b/src/menu.c
index 82034dfb..2330b573 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -194,7 +194,7 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
gint width, height;
gint scr_width, scr_height;
- g_return_if_fail(x != NULL && y != NULL);
+ g_return_if_fail(x != NULL && y != NULL && push_in != NULL);
button = GTK_WIDGET(user_data);
@@ -204,7 +204,7 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
gdk_window_get_origin(button->window, &button_xpos, &button_ypos);
xpos = button_xpos + button->allocation.x;
- ypos = button_ypos + button->allocation.y + button->requisition.height;
+ ypos = button_ypos + button->allocation.y + button->allocation.height;
scr_width = gdk_screen_width();
scr_height = gdk_screen_height();
@@ -212,7 +212,7 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
if (xpos + width > scr_width)
xpos -= (xpos + width) - scr_width;
if (ypos + height > scr_height)
- ypos -= button->requisition.height + height;
+ ypos -= button->allocation.height + height;
if (xpos < 0)
xpos = 0;
if (ypos < 0)
@@ -220,6 +220,7 @@ void menu_button_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
*x = xpos;
*y = ypos;
+ *push_in = FALSE;
}
void menu_widget_position(GtkMenu *menu, gint *x, gint *y, gboolean *push_in,
diff --git a/src/menu.h b/src/menu.h
index a099df8d..004131ea 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by