update expose_text_select.patch

This commit is contained in:
Daniel Micay 2012-07-09 22:44:53 -04:00
parent 66f0ef35aa
commit a3785ebef0
1 changed files with 48 additions and 54 deletions

View File

@ -1,76 +1,70 @@
diff -aur vte-0.32.2-old/src/vteaccess.c vte-0.32.2/src/vteaccess.c
--- vte-0.32.2-old/src/vteaccess.c 2012-07-06 22:23:20.937715584 -0400
+++ vte-0.32.2/src/vteaccess.c 2012-07-06 22:23:26.521119667 -0400
@@ -1666,7 +1666,7 @@
VTE_TERMINAL_ACCESSIBLE_PRIVATE_DATA);
xy_from_offset (priv, start_offset, &start_x, &start_y);
xy_from_offset (priv, end_offset, &end_x, &end_y);
- _vte_terminal_select_text (terminal, start_x, start_y, end_x, end_y, start_offset, end_offset);
+ vte_terminal_select_text (terminal, start_x, start_y, end_x, end_y, start_offset, end_offset);
return TRUE;
}
diff -aur vte-0.32.2-old/src/vte.c vte-0.32.2/src/vte.c
--- vte-0.32.2-old/src/vte.c 2012-07-06 22:23:20.934382208 -0400
+++ vte-0.32.2/src/vte.c 2012-07-06 22:31:02.140287012 -0400
@@ -14568,7 +14568,7 @@
}
void
-_vte_terminal_select_text(VteTerminal *terminal,
+vte_terminal_select_text(VteTerminal *terminal,
long start_col, long start_row,
long end_col, long end_row,
int start_offset, int end_offset)
@@ -14593,6 +14593,16 @@
--- vte-0.32.2-old/src/vte.c 2012-07-09 22:28:18.307063631 -0400
+++ vte-0.32.2/src/vte.c 2012-07-09 22:31:58.323320464 -0400
@@ -14567,6 +14567,51 @@
}
}
+/**
+ * vte_terminal_get_selection_block_mode:
+ * @terminal: a #VteTerminal
+ *
+ * Checks whether or not block selection is enabled.
+ *
+ * Returns: %TRUE if block selection is enabled, %FALSE if not
+ */
+gboolean
+vte_terminal_get_selection_block_mode(VteTerminal *terminal) {
+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
+ return terminal->pvt->selection_block_mode;
+}
+
+/**
+ * vte_terminal_set_selection_block_mode:
+ * @terminal: a #VteTerminal
+ * @block_mode: whether block selection is enabled
+ *
+ * Sets whether or not block selection is enabled.
+ */
+void
+vte_terminal_set_selection_block_mode(VteTerminal *terminal, gboolean block_mode) {
+ return terminal->pvt->selection_block_mode = block_mode;
+ g_return_if_fail(VTE_IS_TERMINAL(terminal));
+ terminal->pvt->selection_block_mode = block_mode;
+}
+
+/**
+ * vte_terminal_select_text:
+ * @terminal: a #VteTerminal
+ * @start_col: the starting column for the selection
+ * @start_row: the starting row for the selection
+ * @end_col: the end column for the selection
+ * @end_row: the end row for the selection
+ *
+ * Sets the current selection region.
+ */
+void
+vte_terminal_select_text(VteTerminal *terminal,
+ long start_col, long start_row,
+ long end_col, long end_row) {
+ _vte_terminal_select_text(terminal, start_col, start_row, end_col, end_row, 0, 0);
+}
+
+
void
_vte_terminal_remove_selection(VteTerminal *terminal)
{
@@ -14603,7 +14613,7 @@
_vte_terminal_select_empty_at(VteTerminal *terminal,
long col, long row)
{
- _vte_terminal_select_text(terminal, col, row, col - 1, row, 0, 0);
+ vte_terminal_select_text(terminal, col, row, col - 1, row, 0, 0);
}
static void
@@ -15293,7 +15303,7 @@
g_free (row_text);
g_match_info_free (match_info);
- _vte_terminal_select_text (terminal, start_col, start_row, end_col, end_row, 0, 0);
+ vte_terminal_select_text (terminal, start_col, start_row, end_col, end_row, 0, 0);
/* Quite possibly the math here should not access adjustment directly... */
value = gtk_adjustment_get_value(terminal->adjustment);
page_size = gtk_adjustment_get_page_size(terminal->adjustment);
Only in vte-0.32.2/src: vte.gresource.xml
_vte_terminal_select_text(VteTerminal *terminal,
long start_col, long start_row,
diff -aur vte-0.32.2-old/src/vte.h vte-0.32.2/src/vte.h
--- vte-0.32.2-old/src/vte.h 2012-07-06 22:23:20.934382208 -0400
+++ vte-0.32.2/src/vte.h 2012-07-06 22:28:20.071533871 -0400
@@ -296,6 +296,12 @@
--- vte-0.32.2-old/src/vte.h 2012-07-09 22:28:18.307063631 -0400
+++ vte-0.32.2/src/vte.h 2012-07-09 22:28:21.587107210 -0400
@@ -296,6 +296,11 @@
/* simple manipulation of selection */
void vte_terminal_select_all(VteTerminal *terminal);
void vte_terminal_select_none(VteTerminal *terminal);
+void vte_terminal_select_text(VteTerminal *terminal,
+ long start_col, long start_row,
+ long end_col, long end_row,
+ int start_offset, int end_offset);
+gboolean vte_terminal_get_selection_block_mode(VteTerminal *terminal);
+void vte_terminal_set_selection_block_mode(VteTerminal *terminal, gboolean block_mode);
+void vte_terminal_select_text(VteTerminal *terminal,
+ long start_col, long start_row,
+ long end_col, long end_row);
/* Set the terminal's size. */
void vte_terminal_set_size(VteTerminal *terminal,