[gimp] app: reduce nesting in gimp_display_shell_canvas_no_image_events()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: reduce nesting in gimp_display_shell_canvas_no_image_events()
- Date: Thu, 15 Dec 2011 21:39:02 +0000 (UTC)
commit 51a8e668248c08e50158d7713926e45e8644b5a2
Author: Michael Natterer <mitch gimp org>
Date: Thu Dec 15 22:35:44 2011 +0100
app: reduce nesting in gimp_display_shell_canvas_no_image_events()
app/display/gimpdisplayshell-tool-events.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 0ce60b9..bcf321e 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -248,18 +248,14 @@ gimp_display_shell_canvas_no_image_events (GtkWidget *canvas,
switch (event->type)
{
case GDK_BUTTON_PRESS:
- {
- GdkEventButton *bevent = (GdkEventButton *) event;
-
- if (gdk_event_triggers_context_menu ((GdkEvent *) bevent))
- {
- gimp_ui_manager_ui_popup (shell->popup_manager,
- "/dummy-menubar/image-popup",
- GTK_WIDGET (shell),
- NULL, NULL, NULL, NULL);
- return TRUE;
- }
- }
+ if (gdk_event_triggers_context_menu (event))
+ {
+ gimp_ui_manager_ui_popup (shell->popup_manager,
+ "/dummy-menubar/image-popup",
+ GTK_WIDGET (shell),
+ NULL, NULL, NULL, NULL);
+ return TRUE;
+ }
break;
case GDK_KEY_PRESS:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]