Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
a85decc8
Commit
a85decc8
authored
Feb 14, 2014
by
Sebastian Ramacher
Browse files
Only copy selected text in normal and fullscreen mode
Signed-off-by:
Sebastian Ramacher
<
sebastian+dev@ramacher.at
>
parent
f2fbf926
Changes
3
Hide whitespace changes
Inline
Side-by-side
callbacks.c
View file @
a85decc8
...
...
@@ -50,7 +50,8 @@ cb_buffer_changed(girara_session_t* session)
}
static
void
update_visible_pages
(
zathura_t
*
zathura
)
{
update_visible_pages
(
zathura_t
*
zathura
)
{
const
unsigned
int
number_of_pages
=
zathura_document_get_number_of_pages
(
zathura
->
document
);
for
(
unsigned
int
page_id
=
0
;
page_id
<
number_of_pages
;
page_id
++
)
{
...
...
@@ -539,6 +540,11 @@ cb_page_widget_text_selected(ZathuraPage* page, const char* text, void* data)
g_return_if_fail
(
data
!=
NULL
);
zathura_t
*
zathura
=
data
;
girara_mode_t
mode
=
girara_mode_get
(
zathura
->
ui
.
session
);
if
(
mode
!=
zathura
->
modes
.
normal
&&
mode
!=
zathura
->
modes
.
fullscreen
)
{
return
;
}
GdkAtom
*
selection
=
get_selection
(
zathura
);
/* copy to clipboard */
...
...
dbus-interface.c
View file @
a85decc8
...
...
@@ -483,8 +483,8 @@ zathura_dbus_goto_page_and_highlight(const char* filename, unsigned int page,
}
GError
*
error
=
NULL
;
GDBusConnection
*
connection
=
g_bus_get_sync
(
G_BUS_TYPE_SESSION
,
NULL
,
&
error
);
GDBusConnection
*
connection
=
g_bus_get_sync
(
G_BUS_TYPE_SESSION
,
NULL
,
&
error
);
if
(
connection
==
NULL
)
{
girara_error
(
"Could not connect to session bus: %s"
,
error
->
message
);
g_error_free
(
error
);
...
...
shortcuts.c
View file @
a85decc8
...
...
@@ -1242,7 +1242,7 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t*
girara_mode_set
(
session
,
zathura
->
modes
.
fullscreen
);
}
fullscreen
=
fullscreen
?
false
:
true
;
fullscreen
=
!
fullscreen
;
return
false
;
}
...
...
@@ -1315,7 +1315,7 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t*
girara_mode_set
(
session
,
zathura
->
modes
.
presentation
);
}
fullscreen
=
fullscreen
?
false
:
true
;
fullscreen
=
!
fullscreen
;
return
false
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment