Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-view.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2005-01-07 10:30:52 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-01-07 10:30:52 (GMT)
commit3a87fe3d6bd17d8151c675c9b4e9294619127b1b (patch)
tree17ce19206a2f6b3f82a303337ad672925b94cbc1 /shell/ev-view.c
parenta369c69460912502c842baffe73a373134f02fca (diff)
Cleanup and add select all.
2005-01-07 Marco Pesenti Gritti <marco@gnome.org> * data/evince-ui.xml: Cleanup and add select all. * shell/ev-view.c: (ev_view_select_all), (ev_view_button_press_event): * shell/ev-view.h: * shell/ev-window.c: (ev_window_cmd_edit_select_all): Add select all. Clear selection on click.
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 9936ce1..f878812 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -422,6 +422,21 @@ ev_view_expose_event (GtkWidget *widget,
}
void
+ev_view_select_all (EvView *ev_view)
+{
+ GtkWidget *widget = GTK_WIDGET (ev_view);
+
+ g_return_if_fail (EV_IS_VIEW (ev_view));
+
+ ev_view->has_selection = TRUE;
+ ev_view->selection.x = ev_view->selection.y = 0;
+ ev_view->selection.width = widget->requisition.width;
+ ev_view->selection.height = widget->requisition.height;
+
+ gtk_widget_queue_draw (widget);
+}
+
+void
ev_view_copy (EvView *ev_view)
{
GtkClipboard *clipboard;
@@ -490,6 +505,11 @@ ev_view_button_press_event (GtkWidget *widget,
switch (event->button) {
case 1:
+ if (view->has_selection) {
+ view->has_selection = FALSE;
+ gtk_widget_queue_draw (widget);
+ }
+
view->selection.x = event->x;
view->selection.y = event->y;
view->selection.width = 0;