Merge lp:~bratsche/oif/disable-gestures into lp:~oif-team/oif/evince-gestures-trunk

Proposed by Cody Russell
Status: Merged
Merged at revision: 4206
Proposed branch: lp:~bratsche/oif/disable-gestures
Merge into: lp:~oif-team/oif/evince-gestures-trunk
Diff against target: 137 lines (+47/-26)
4 files modified
shell/ev-application.c (+14/-0)
shell/ev-application.h (+2/-0)
shell/ev-window.c (+28/-25)
shell/main.c (+3/-1)
To merge this branch: bzr merge lp:~bratsche/oif/disable-gestures
Reviewer Review Type Date Requested Status
Mohamed IKBEL Boulabiar (community) Approve
Review via email: mp+41180@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mohamed IKBEL Boulabiar (boulabiar) wrote :

Tested and works fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'shell/ev-application.c'
--- shell/ev-application.c 2010-07-26 13:34:18 +0000
+++ shell/ev-application.c 2010-11-18 14:51:58 +0000
@@ -72,6 +72,8 @@
7272
73 gchar *filechooser_open_uri;73 gchar *filechooser_open_uri;
74 gchar *filechooser_save_uri;74 gchar *filechooser_save_uri;
75
76 gboolean gestures_enabled;
75};77};
7678
77struct _EvApplicationClass {79struct _EvApplicationClass {
@@ -126,6 +128,18 @@
126 return instance;128 return instance;
127}129}
128130
131gboolean
132ev_application_get_gestures_enabled (EvApplication *application)
133{
134 return application->gestures_enabled;
135}
136
137void
138ev_application_set_gestures_enabled (EvApplication *application, gboolean enabled)
139{
140 application->gestures_enabled = enabled;
141}
142
129/* Session */143/* Session */
130gboolean144gboolean
131ev_application_load_session (EvApplication *application)145ev_application_load_session (EvApplication *application)
132146
=== modified file 'shell/ev-application.h'
--- shell/ev-application.h 2010-07-12 18:13:15 +0000
+++ shell/ev-application.h 2010-11-18 14:51:58 +0000
@@ -81,6 +81,8 @@
81const gchar *ev_application_get_dot_dir (EvApplication *application,81const gchar *ev_application_get_dot_dir (EvApplication *application,
82 gboolean create);82 gboolean create);
83const gchar *ev_application_get_data_dir (EvApplication *application);83const gchar *ev_application_get_data_dir (EvApplication *application);
84gboolean ev_application_get_gestures_enabled (EvApplication *application);
85void ev_application_set_gestures_enabled (EvApplication *application, gboolean enabled);
8486
85G_END_DECLS87G_END_DECLS
8688
8789
=== modified file 'shell/ev-window.c'
--- shell/ev-window.c 2010-10-12 18:00:39 +0000
+++ shell/ev-window.c 2010-11-18 14:51:58 +0000
@@ -5537,31 +5537,34 @@
5537 IdoGestureManager *manager;5537 IdoGestureManager *manager;
55385538
5539 window = GTK_WINDOW (widget);5539 window = GTK_WINDOW (widget);
5540 manager = ido_gesture_manager_get ();5540
55415541 if (ev_application_get_gestures_enabled (EV_APP)) {
5542 ido_gesture_manager_register_window (manager,5542 manager = ido_gesture_manager_get ();
5543 window,5543
5544 IDO_GESTURE_PINCH,5544 ido_gesture_manager_register_window (manager,
5545 2,5545 window,
5546 ev_pinch_gesture_start,5546 IDO_GESTURE_PINCH,
5547 ev_pinch_gesture_update,5547 2,
5548 ev_pinch_gesture_end);5548 ev_pinch_gesture_start,
55495549 ev_pinch_gesture_update,
5550 ido_gesture_manager_register_window (manager,5550 ev_pinch_gesture_end);
5551 window,5551
5552 IDO_GESTURE_DRAG,5552 ido_gesture_manager_register_window (manager,
5553 2,5553 window,
5554 ev_drag_gesture_start,5554 IDO_GESTURE_DRAG,
5555 ev_drag_gesture_update,5555 2,
5556 ev_drag_gesture_end);5556 ev_drag_gesture_start,
55575557 ev_drag_gesture_update,
5558 ido_gesture_manager_register_window (manager,5558 ev_drag_gesture_end);
5559 window,5559
5560 IDO_GESTURE_ROTATE,5560 ido_gesture_manager_register_window (manager,
5561 2,5561 window,
5562 ev_rotate_gesture_start,5562 IDO_GESTURE_ROTATE,
5563 ev_rotate_gesture_update,5563 2,
5564 ev_rotate_gesture_end);5564 ev_rotate_gesture_start,
5565 ev_rotate_gesture_update,
5566 ev_rotate_gesture_end);
5567 }
5565}5568}
55665569
5567static void5570static void
55685571
=== modified file 'shell/main.c'
--- shell/main.c 2010-07-26 13:34:18 +0000
+++ shell/main.c 2010-11-18 14:51:58 +0000
@@ -58,7 +58,7 @@
58static gboolean unlink_temp_file = FALSE;58static gboolean unlink_temp_file = FALSE;
59static gchar *print_settings;59static gchar *print_settings;
60static const char **file_arguments = NULL;60static const char **file_arguments = NULL;
6161static gboolean disable_gestures = FALSE;
6262
63static gboolean63static gboolean
64option_version_cb (const gchar *option_name,64option_version_cb (const gchar *option_name,
@@ -82,6 +82,7 @@
82 { "find", 'l', 0, G_OPTION_ARG_STRING, &ev_find_string, N_("The word or phrase to find in the document"), N_("STRING")},82 { "find", 'l', 0, G_OPTION_ARG_STRING, &ev_find_string, N_("The word or phrase to find in the document"), N_("STRING")},
83 { "unlink-tempfile", 'u', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &unlink_temp_file, NULL, NULL },83 { "unlink-tempfile", 'u', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &unlink_temp_file, NULL, NULL },
84 { "print-settings", 't', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_FILENAME, &print_settings, NULL, NULL },84 { "print-settings", 't', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_FILENAME, &print_settings, NULL, NULL },
85 { "disable-gestures", 'g', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &disable_gestures, NULL, NULL },
85 { "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL },86 { "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL },
86 { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file_arguments, NULL, N_("[FILE…]") },87 { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file_arguments, NULL, N_("[FILE…]") },
87 { NULL }88 { NULL }
@@ -312,6 +313,7 @@
312#endif /* WITH_SMCLIENT && GDK_WINDOWING_X11 */313#endif /* WITH_SMCLIENT && GDK_WINDOWING_X11 */
313314
314 ev_application_load_session (EV_APP);315 ev_application_load_session (EV_APP);
316 ev_application_set_gestures_enabled (EV_APP, !disable_gestures);
315 load_files (file_arguments);317 load_files (file_arguments);
316318
317 /* Change directory so we don't prevent unmounting in case the initial cwd319 /* Change directory so we don't prevent unmounting in case the initial cwd

Subscribers

People subscribed via source and target branches