aboutsummaryrefslogtreecommitdiff
path: root/x11/sakura/files/patch-vte-2.91
diff options
context:
space:
mode:
Diffstat (limited to 'x11/sakura/files/patch-vte-2.91')
-rw-r--r--x11/sakura/files/patch-vte-2.91228
1 files changed, 228 insertions, 0 deletions
diff --git a/x11/sakura/files/patch-vte-2.91 b/x11/sakura/files/patch-vte-2.91
new file mode 100644
index 000000000000..7a390ef020d4
--- /dev/null
+++ b/x11/sakura/files/patch-vte-2.91
@@ -0,0 +1,228 @@
+https://bugs.launchpad.net/sakura/+bug/1337962
+
+Unoffical patch to build with vte3 2.91 mentioned in #6 of the above bug
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7a07dbc..99ad5d6 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -23,9 +23,9 @@ IF (NOT GTK_FOUND)
+ MESSAGE(FATAL_ERROR "You don't seem to have gtk >= 3.0 development libraries installed...")
+ ENDIF (NOT GTK_FOUND)
+
+-pkg_check_modules (VTE REQUIRED vte-2.90)
++pkg_check_modules (VTE REQUIRED vte-2.91)
+ IF (NOT VTE_FOUND)
+- MESSAGE(FATAL_ERROR "You don't seem to have vte >= 2.90 development libraries installed...")
++ MESSAGE(FATAL_ERROR "You don't seem to have vte >= 2.91 development libraries installed...")
+ ENDIF (NOT VTE_FOUND)
+
+ FIND_PROGRAM(POD2MAN pod2man)
+diff --git a/src/sakura.c b/src/sakura.c
+index 84b5a5f..0987c17 100644
+--- src/sakura.c
++++ src/sakura.c
+@@ -225,7 +225,7 @@ static struct {
+ glong columns;
+ glong rows;
+ gint label_count;
+- VteTerminalCursorShape cursor_type;
++ VteCursorShape cursor_type;
+ bool first_tab;
+ bool show_scrollbar;
+ bool show_resize_grip;
+@@ -282,7 +282,7 @@ struct terminal {
+ GtkWidget *label;
+ gchar *label_text;
+ bool label_set_byuser;
+- GtkBorder *border; /* inner-property data */
++ GtkBorder padding; /* inner-property data */
+ int colorset;
+ };
+
+@@ -858,7 +858,7 @@ sakura_delete_event (GtkWidget *widget, void *data)
+ for (i=0; i < npages; i++) {
+
+ term = sakura_get_page_term(sakura, i);
+- pgid = tcgetpgrp(vte_terminal_get_pty(VTE_TERMINAL(term->vte)));
++ pgid = tcgetpgrp(vte_pty_get_fd(vte_terminal_get_pty(VTE_TERMINAL(term->vte))));
+
+ /* If running processes are found, we ask one time and exit */
+ if ( (pgid != -1) && (pgid != term->pid)) {
+@@ -1010,14 +1010,14 @@ sakura_set_colors ()
+ /* This is needed for set_opacity to have effect. The opacity does
+ take effect when switching tabs, so this setting to white is
+ actually needed only in the shown tab.*/
+- vte_terminal_set_color_background_rgba(VTE_TERMINAL (term->vte), &white);
+- vte_terminal_set_opacity(VTE_TERMINAL (term->vte), (int)((sakura.backcolors[term->colorset].alpha)*65535));
++ vte_terminal_set_color_background(VTE_TERMINAL (term->vte), &white);
++ //vte_terminal_set_alpha(VTE_TERMINAL (term->vte), sakura.backcolors[term->colorset].alpha);
+ }
+- vte_terminal_set_colors_rgba(VTE_TERMINAL(term->vte),
++ vte_terminal_set_colors(VTE_TERMINAL(term->vte),
+ &sakura.forecolors[term->colorset],
+ &sakura.backcolors[term->colorset],
+ sakura.palette, PALETTE_SIZE);
+- vte_terminal_set_color_cursor_rgba(VTE_TERMINAL(term->vte), &sakura.curscolors[term->colorset]);
++ vte_terminal_set_color_cursor(VTE_TERMINAL(term->vte), &sakura.curscolors[term->colorset]);
+ }
+
+ }
+@@ -1338,7 +1338,7 @@ sakura_clear (GtkWidget *widget, void *data)
+
+ gtk_widget_hide(sakura.item_clear_background);
+
+- vte_terminal_set_background_image(VTE_TERMINAL(term->vte), NULL);
++ //vte_terminal_set_background_image(VTE_TERMINAL(term->vte), NULL);
+
+ sakura_set_config_string("background", "none");
+
+@@ -1476,10 +1476,10 @@ sakura_visible_bell (GtkWidget *widget, void *data)
+ term = sakura_get_page_term(sakura, page);
+
+ if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
+- vte_terminal_set_visible_bell (VTE_TERMINAL(term->vte), TRUE);
++ //vte_terminal_set_visible_bell (VTE_TERMINAL(term->vte), TRUE);
+ sakura_set_config_string("visible_bell", "Yes");
+ } else {
+- vte_terminal_set_visible_bell (VTE_TERMINAL(term->vte), FALSE);
++ //vte_terminal_set_visible_bell (VTE_TERMINAL(term->vte), FALSE);
+ sakura_set_config_string("visible_bell", "No");
+ }
+ }
+@@ -1558,11 +1558,11 @@ sakura_set_palette(GtkWidget *widget, void *data)
+
+ for (i = (n_pages - 1); i >= 0; i--) {
+ term = sakura_get_page_term(sakura, i);
+- vte_terminal_set_colors_rgba(VTE_TERMINAL(term->vte),
++ vte_terminal_set_colors(VTE_TERMINAL(term->vte),
+ &sakura.forecolors[term->colorset],
+ &sakura.backcolors[term->colorset],
+ sakura.palette, PALETTE_SIZE);
+- vte_terminal_set_color_cursor_rgba(VTE_TERMINAL(term->vte), &sakura.curscolors[term->colorset]);
++ vte_terminal_set_color_cursor(VTE_TERMINAL(term->vte), &sakura.curscolors[term->colorset]);
+ }
+
+ sakura_set_config_string("palette", palette);
+@@ -1692,7 +1692,7 @@ sakura_close_tab (GtkWidget *widget, void *data)
+ }
+
+ /* Check if there are running processes for this tab. Use tcgetpgrp to compare to the shell PGID */
+- pgid = tcgetpgrp(vte_terminal_get_pty(VTE_TERMINAL(term->vte)));
++ pgid = tcgetpgrp(vte_pty_get_fd(vte_terminal_get_pty(VTE_TERMINAL(term->vte))));
+
+ if ( (pgid != -1) && (pgid != term->pid) && (!sakura.less_questions) ) {
+ dialog=gtk_message_dialog_new(GTK_WINDOW(sakura.main_window), GTK_DIALOG_MODAL,
+@@ -1748,7 +1748,7 @@ sakura_closebutton_clicked(GtkWidget *widget, void *data)
+ }
+
+ /* Check if there are running processes for this tab. Use tcgetpgrp to compare to the shell PGID */
+- pgid = tcgetpgrp(vte_terminal_get_pty(VTE_TERMINAL(term->vte)));
++ pgid = tcgetpgrp(vte_pty_get_fd(vte_terminal_get_pty(VTE_TERMINAL(term->vte))));
+
+ if ( (pgid != -1) && (pgid != term->pid) && (!sakura.less_questions) ) {
+ dialog=gtk_message_dialog_new(GTK_WINDOW(sakura.main_window), GTK_DIALOG_MODAL,
+@@ -2478,9 +2478,11 @@ sakura_set_size(void)
+ sakura.resized=FALSE;
+ }
+
+- gtk_widget_style_get(term->vte, "inner-border", &term->border, NULL);
+- pad_x = term->border->left + term->border->right;
+- pad_y = term->border->top + term->border->bottom;
++ gtk_style_context_get_padding(gtk_widget_get_style_context(term->vte),
++ gtk_widget_get_state_flags(term->vte),
++ &term->padding);
++ pad_x = term->padding.left + term->padding.right;
++ pad_y = term->padding.top + term->padding.bottom;
+ SAY("padding x %d y %d", pad_x, pad_y);
+ char_width = vte_terminal_get_char_width(VTE_TERMINAL(term->vte));
+ char_height = vte_terminal_get_char_height(VTE_TERMINAL(term->vte));
+@@ -2664,7 +2666,7 @@ sakura_add_tab()
+ vte_terminal_match_add_gregex(VTE_TERMINAL(term->vte), sakura.http_regexp, 0);
+ vte_terminal_set_mouse_autohide(VTE_TERMINAL(term->vte), TRUE);
+
+- term->scrollbar=gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, vte_terminal_get_adjustment(VTE_TERMINAL(term->vte)));
++ term->scrollbar=gtk_vscrollbar_new(gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(term->vte)));
+
+ gtk_box_pack_start(GTK_BOX(term->hbox), term->vte, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(term->hbox), term->scrollbar, FALSE, FALSE, 0);
+@@ -2799,8 +2801,8 @@ sakura_add_tab()
+ if (command_argc > 0) {
+ path=g_find_program_in_path(command_argv[0]);
+ if (path) {
+- if (!vte_terminal_fork_command_full(VTE_TERMINAL(term->vte), VTE_PTY_DEFAULT, NULL, command_argv, NULL,
+- G_SPAWN_SEARCH_PATH, NULL, NULL, &term->pid, &gerror)) {
++ if (!vte_terminal_spawn_sync(VTE_TERMINAL(term->vte), VTE_PTY_DEFAULT, NULL, command_argv, NULL,
++ G_SPAWN_SEARCH_PATH, NULL, NULL, &term->pid, NULL, &gerror)) {
+ SAY("error: %s", gerror->message);
+ }
+ } else {
+@@ -2819,8 +2821,8 @@ sakura_add_tab()
+ sakura_error("Hold option given without any command");
+ option_hold=FALSE;
+ }
+- vte_terminal_fork_command_full(VTE_TERMINAL(term->vte), VTE_PTY_DEFAULT, cwd, sakura.argv, NULL,
+- G_SPAWN_SEARCH_PATH|G_SPAWN_FILE_AND_ARGV_ZERO, NULL, NULL, &term->pid, NULL);
++ vte_terminal_spawn_sync(VTE_TERMINAL(term->vte), VTE_PTY_DEFAULT, cwd, sakura.argv, NULL,
++ G_SPAWN_SEARCH_PATH|G_SPAWN_FILE_AND_ARGV_ZERO, NULL, NULL, &term->pid, NULL, NULL);
+ }
+ /* Not the first tab */
+ } else {
+@@ -2838,23 +2840,23 @@ sakura_add_tab()
+ * function in the window is not visible *sigh*. Gtk documentation
+ * says this is for "historical" reasons. Me arse */
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(sakura.notebook), index);
+- vte_terminal_fork_command_full(VTE_TERMINAL(term->vte), VTE_PTY_DEFAULT, cwd, sakura.argv, NULL,
+- G_SPAWN_SEARCH_PATH|G_SPAWN_FILE_AND_ARGV_ZERO, NULL, NULL, &term->pid, NULL);
++ vte_terminal_spawn_sync(VTE_TERMINAL(term->vte), VTE_PTY_DEFAULT, cwd, sakura.argv, NULL,
++ G_SPAWN_SEARCH_PATH|G_SPAWN_FILE_AND_ARGV_ZERO, NULL, NULL, &term->pid, NULL, NULL);
+ }
+
+ free(cwd);
+
+ /* Configuration for the newly created terminal */
+ GdkRGBA white={255, 255, 255, 1};
+- vte_terminal_set_color_background_rgba(VTE_TERMINAL (term->vte), &white);
++ vte_terminal_set_color_background(VTE_TERMINAL (term->vte), &white);
+ vte_terminal_set_backspace_binding(VTE_TERMINAL(term->vte), VTE_ERASE_ASCII_DELETE);
+- vte_terminal_set_colors_rgba(VTE_TERMINAL(term->vte),
++ vte_terminal_set_colors(VTE_TERMINAL(term->vte),
+ &sakura.forecolors[term->colorset],
+ &sakura.backcolors[term->colorset],
+ sakura.palette, PALETTE_SIZE);
+- vte_terminal_set_color_cursor_rgba(VTE_TERMINAL(term->vte), &sakura.curscolors[term->colorset]);
++ vte_terminal_set_color_cursor(VTE_TERMINAL(term->vte), &sakura.curscolors[term->colorset]);
+ if (sakura.has_rgba) {
+- vte_terminal_set_opacity(VTE_TERMINAL (term->vte), (int)((sakura.backcolors[term->colorset].alpha)*65535));
++ //vte_terminal_set_alpha(VTE_TERMINAL (term->vte), sakura.backcolors[term->colorset].alpha);
+ }
+
+ if (sakura.background) {
+@@ -2862,12 +2864,12 @@ sakura_add_tab()
+ }
+
+ if (sakura.word_chars) {
+- vte_terminal_set_word_chars( VTE_TERMINAL (term->vte), sakura.word_chars );
++ //vte_terminal_set_word_chars( VTE_TERMINAL (term->vte), sakura.word_chars );
+ }
+
+ /* Get rid of these nasty bells */
+ vte_terminal_set_audible_bell (VTE_TERMINAL(term->vte), sakura.audible_bell ? TRUE : FALSE);
+- vte_terminal_set_visible_bell (VTE_TERMINAL(term->vte), sakura.visible_bell ? TRUE : FALSE);
++ //vte_terminal_set_visible_bell (VTE_TERMINAL(term->vte), sakura.visible_bell ? TRUE : FALSE);
+
+ /* Disable stupid blinking cursor */
+ vte_terminal_set_cursor_blink_mode (VTE_TERMINAL(term->vte), sakura.blinking_cursor ? VTE_CURSOR_BLINK_ON : VTE_CURSOR_BLINK_OFF);
+@@ -2949,9 +2951,9 @@ sakura_set_bgimage(char *infile)
+ if (!pixbuf) {
+ sakura_error("Error loading image file: %s\n", gerror->message);
+ } else {
+- vte_terminal_set_background_image(VTE_TERMINAL(term->vte), pixbuf);
+- vte_terminal_set_background_saturation(VTE_TERMINAL(term->vte), TRUE);
+- vte_terminal_set_background_transparent(VTE_TERMINAL(term->vte),FALSE);
++ //vte_terminal_set_background_image(VTE_TERMINAL(term->vte), pixbuf);
++ //vte_terminal_set_background_saturation(VTE_TERMINAL(term->vte), TRUE);
++ //vte_terminal_set_background_transparent(VTE_TERMINAL(term->vte),FALSE);
+
+ sakura_set_config_string("background", infile);
+ }