https://github.com/BestImageViewer/geeqie/issues/137
A third option to copy to both clipboards. Default is to copy to both.
<variablelist>\r
<varlistentry>\r
<term>\r
<variablelist>\r
<varlistentry>\r
<term>\r
- <guilabel>PRIMARY</guilabel>\r
+ <guilabel>Primary</guilabel>\r
</term>\r
<listitem>\r
<para>Paste using mouse middle-click, or shift-insert.</para>\r
</term>\r
<listitem>\r
<para>Paste using mouse middle-click, or shift-insert.</para>\r
</varlistentry>\r
<varlistentry>\r
<term>\r
</varlistentry>\r
<varlistentry>\r
<term>\r
- <guilabel>CLIPBOARD</guilabel>\r
+ <guilabel>Clipboard</guilabel>\r
</term>\r
<listitem>\r
<para>Paste using mouse right-click and select paste, or control-v.</para>\r
</listitem>\r
</varlistentry>\r
</term>\r
<listitem>\r
<para>Paste using mouse right-click and select paste, or control-v.</para>\r
</listitem>\r
</varlistentry>\r
+ <varlistentry>\r
+ <term>\r
+ <guilabel>Both</guilabel>\r
+ </term>\r
+ <listitem>\r
+ <para>Paste using either method.</para>\r
+ </listitem>\r
+ </varlistentry>\r
</variablelist>\r
</para>\r
</listitem>\r
</variablelist>\r
</para>\r
</listitem>\r
options->tree_descend_subdirs = FALSE;
options->view_dir_list_single_click_enter = TRUE;
options->update_on_time_change = TRUE;
options->tree_descend_subdirs = FALSE;
options->view_dir_list_single_click_enter = TRUE;
options->update_on_time_change = TRUE;
- options->clipboard_selection = PRIMARY;
+ options->clipboard_selection = CLIPBOARD_BOTH;
options->stereo.fixed_w = 1920;
options->stereo.fixed_h = 1080;
options->stereo.fixed_w = 1920;
options->stereo.fixed_h = 1080;
switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)))
{
case 0:
switch (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)))
{
case 0:
- default:
- *option = PRIMARY;
+ *option = CLIPBOARD_PRIMARY;
+ *option = CLIPBOARD_CLIPBOARD;
+ break;
+ case 2:
+ *option = CLIPBOARD_BOTH;
+ default:
+ *option = CLIPBOARD_BOTH;
combo = gtk_combo_box_text_new();
combo = gtk_combo_box_text_new();
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("PRIMARY"));
- if (option == PRIMARY) current = 0;
- gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("CLIPBOARD"));
- if (option == CLIPBOARD) current = 1;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Primary"));
+ if (option == CLIPBOARD_PRIMARY) current = 0;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Clipboard"));
+ if (option == CLIPBOARD_CLIPBOARD) current = 1;
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), _("Both"));
+ if (option == CLIPBOARD_BOTH) current = 2;
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), current);
} ZoomMode;
typedef enum {
} ZoomMode;
typedef enum {
- PRIMARY = 0,
- CLIPBOARD = 1,
+ CLIPBOARD_PRIMARY = 0,
+ CLIPBOARD_CLIPBOARD = 1,
+ CLIPBOARD_BOTH = 2
} ClipboardSelection;
typedef enum {
} ClipboardSelection;
typedef enum {
void file_util_copy_path_to_clipboard(FileData *fd, gboolean quoted)
{
void file_util_copy_path_to_clipboard(FileData *fd, gboolean quoted)
{
- GtkClipboard *clipboard;
-
if (!fd || !*fd->path) return;
if (!fd || !*fd->path) return;
- if (options->clipboard_selection == PRIMARY)
+ if (options->clipboard_selection == CLIPBOARD_PRIMARY)
- clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), quoted ? g_shell_quote(fd->path) : fd->path , -1);
+ else if (options->clipboard_selection == CLIPBOARD_CLIPBOARD)
- clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
- }
- if (quoted)
- {
- gtk_clipboard_set_text(clipboard, g_shell_quote(fd->path), -1);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), quoted ? g_shell_quote(fd->path) : fd->path , -1);
- gtk_clipboard_set_text(clipboard, fd->path, -1);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), quoted ? g_shell_quote(fd->path) : fd->path , -1);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), quoted ? g_shell_quote(fd->path) : fd->path , -1);
}
}
void file_util_copy_path_list_to_clipboard(GList *list, gboolean quoted)
{
}
}
void file_util_copy_path_list_to_clipboard(GList *list, gboolean quoted)
{
- GtkClipboard *clipboard;
GList *work;
GString *new;
GList *work;
GString *new;
- if (options->clipboard_selection == PRIMARY)
- {
- clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
- }
- else
- {
- clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
- }
-
new = g_string_new("");
work = list;
while (work) {
new = g_string_new("");
work = list;
while (work) {
if (work) g_string_append_c(new, ' ');
}
if (work) g_string_append_c(new, ' ');
}
- gtk_clipboard_set_text(clipboard, new->str, new->len);
+ if (options->clipboard_selection == CLIPBOARD_PRIMARY)
+ {
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), new->str, new->len);
+ }
+ else if (options->clipboard_selection == CLIPBOARD_CLIPBOARD)
+ {
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), new->str, new->len);
+ }
+ else
+ {
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), new->str, new->len);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), new->str, new->len);
+ }
+
g_string_free(new, TRUE);
filelist_free(list);
}
g_string_free(new, TRUE);
filelist_free(list);
}