mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 06:33:47 +01:00
CS
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
dcc2e9f736
commit
250c575f44
34
utils.c
34
utils.c
@ -244,26 +244,26 @@ replace_substring(const char* string, const char* old, const char* new)
|
||||
|
||||
GdkAtom* get_selection(zathura_t* zathura)
|
||||
{
|
||||
g_return_val_if_fail(zathura != NULL, NULL);
|
||||
g_return_val_if_fail(zathura != NULL, NULL);
|
||||
|
||||
char* value;
|
||||
girara_setting_get(zathura->ui.session, "selection-clipboard", &value);
|
||||
char* value;
|
||||
girara_setting_get(zathura->ui.session, "selection-clipboard", &value);
|
||||
|
||||
GdkAtom* selection = g_malloc(sizeof(GdkAtom));
|
||||
|
||||
if (strcmp(value, "primary") == 0) {
|
||||
*selection = GDK_SELECTION_PRIMARY;
|
||||
} else if (strcmp(value, "clipboard") == 0) {
|
||||
*selection = GDK_SELECTION_CLIPBOARD;
|
||||
} else {
|
||||
girara_error("Invalid value for the selection-clipboard setting");
|
||||
g_free(value);
|
||||
g_free(selection);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
GdkAtom* selection = g_malloc(sizeof(GdkAtom));
|
||||
|
||||
if (strcmp(value, "primary") == 0) {
|
||||
*selection = GDK_SELECTION_PRIMARY;
|
||||
} else if (strcmp(value, "clipboard") == 0) {
|
||||
*selection = GDK_SELECTION_CLIPBOARD;
|
||||
} else {
|
||||
girara_error("Invalid value for the selection-clipboard setting");
|
||||
g_free(value);
|
||||
g_free(selection);
|
||||
|
||||
return selection;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_free(value);
|
||||
|
||||
return selection;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user