[gtk+] menu: small code cleanup
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] menu: small code cleanup
- Date: Fri, 13 Jul 2012 13:00:35 +0000 (UTC)
commit 36bcb3bf95c313122616deabd34271711b330f36
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Jul 13 14:49:47 2012 +0200
menu: small code cleanup
Don't check twice for the widget being realized to move
both windows
gtk/gtkmenu.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index ec7bb1f..a5d3801 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -4998,10 +4998,10 @@ gtk_menu_scroll_to (GtkMenu *menu,
/* Scroll the menu: */
if (gtk_widget_get_realized (widget))
- gdk_window_move (priv->bin_window, 0, -offset);
-
- if (gtk_widget_get_realized (widget))
- gdk_window_move_resize (priv->view_window, x, y, view_width, view_height);
+ {
+ gdk_window_move (priv->bin_window, 0, -offset);
+ gdk_window_move_resize (priv->view_window, x, y, view_width, view_height);
+ }
priv->scroll_offset = offset;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]