diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-03-26 06:53:46 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-03-26 06:53:46 +0000 |
commit | 61735698878fdcce0d0a62d13da5fbb68edc9f19 (patch) | |
tree | 23d4642653bdf6815b7b72d6065d2c9e711d9707 | |
parent | 9df14117131cf7db5551e1cf44bd052afd1dc176 (diff) |
adjusted the menu position of account popup and toolbar arrow.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3032 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/mainwindow.c | 2 | ||||
-rw-r--r-- | src/menu.c | 7 | ||||
-rw-r--r-- | src/menu.h | 2 |
4 files changed, 10 insertions, 5 deletions
@@ -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 @@ -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, @@ -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 |