Hello community, here is the log from the commit of package tilda for openSUSE:Factory checked in at 2020-05-29 21:23:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tilda (Old) and /work/SRC/openSUSE:Factory/.tilda.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tilda" Fri May 29 21:23:19 2020 rev:12 rq:809777 version:1.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/tilda/tilda.changes 2020-04-27 23:40:08.179729158 +0200 +++ /work/SRC/openSUSE:Factory/.tilda.new.3606/tilda.changes 2020-05-29 21:37:30.370672930 +0200 @@ -1,0 +2,6 @@ +Thu May 7 08:39:23 UTC 2020 - Paolo Stivanin <i...@paolostivanin.com> + +- Update to 1.5.1 + * tilda_terminal: match '@' character in URLs + +------------------------------------------------------------------- Old: ---- tilda-1.5.0.tar.gz New: ---- tilda-1.5.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tilda.spec ++++++ --- /var/tmp/diff_new_pack.HFckjI/_old 2020-05-29 21:37:30.854674371 +0200 +++ /var/tmp/diff_new_pack.HFckjI/_new 2020-05-29 21:37:30.858674383 +0200 @@ -17,7 +17,7 @@ Name: tilda -Version: 1.5.0 +Version: 1.5.1 Release: 0 Summary: A Gtk based drop down terminal for Linux and Unix License: GPL-2.0-or-later ++++++ tilda-1.5.0.tar.gz -> tilda-1.5.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tilda-tilda-1.5.0/src/tilda_terminal.c new/tilda-tilda-1.5.1/src/tilda_terminal.c --- old/tilda-tilda-1.5.0/src/tilda_terminal.c 2020-02-08 23:46:29.000000000 +0100 +++ new/tilda-tilda-1.5.1/src/tilda_terminal.c 2020-05-03 21:20:55.000000000 +0200 @@ -21,6 +21,7 @@ #include "tilda_terminal.h" #include "configsys.h" #include "wizard.h" /* wizard */ +#include "vte-util.h" #include <stdio.h> #include <stdlib.h> /* malloc */ @@ -31,7 +32,10 @@ #include <vte/vte.h> #include <string.h> -#define HTTP_REGEXP "(ftp|http)s?://[\\[\\]-a-zA-Z0-9.?!$%&/=_~#.,:;+]*" +#define PCRE2_CODE_UNIT_WIDTH 0 +#include <pcre2.h> + +#define HTTP_REGEXP "(ftp|http)s?://[\\[\\]-a-zA-Z0-9.?@!$%&/=_~#.,:;+]*" static void start_shell (tilda_term *tt, gboolean ignore_custom_command); static void start_default_shell (tilda_term *tt); @@ -67,39 +71,22 @@ g_clear_object (&term->scrollbar); g_clear_object (&term->vte_term); - g_regex_unref (term->http_regexp); + if (term->http_regexp != NULL) { + g_regex_unref (term->http_regexp); + } + + if (term->vte_regexp != NULL) { + vte_regex_unref (term->vte_regexp); + } term->http_regexp = NULL; + term->vte_regexp = NULL; g_free (term); return 0; } -static void tilda_terminal_switch_page_cb (GtkNotebook *notebook, - GtkWidget *page, - guint page_num, - tilda_window *tw) -{ - DEBUG_FUNCTION ("tilda_terminal_switch_page_cb"); - guint counter = 0; - tilda_term *term = NULL; - for(GList *item=tw->terms; item != NULL; item=item->next) { - if(counter == page_num) { - term = (tilda_term*) item->data; - } - counter++; - } - - char * current_title = tilda_terminal_get_title (term); - - if (current_title != NULL) { - gtk_window_set_title (GTK_WINDOW (tw->window), current_title); - } - - g_free (current_title); -} - struct tilda_term_ *tilda_term_init (struct tilda_window_ *tw) { DEBUG_FUNCTION ("tilda_term_init"); @@ -185,12 +172,21 @@ G_CALLBACK(refresh_window_cb), tw->window); g_signal_connect (G_OBJECT(term->vte_term), "move-window", G_CALLBACK(move_window_cb), tw->window); - g_signal_connect (G_OBJECT (tw->notebook), "switch-page", - G_CALLBACK (tilda_terminal_switch_page_cb), tw); /* Match URL's, etc */ - term->http_regexp=g_regex_new(HTTP_REGEXP, G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY, &error); - ret = vte_terminal_match_add_gregex(VTE_TERMINAL(term->vte_term), term->http_regexp,0); + if (VTE_CHECK_VERSION_RUMTIME (0, 56, 1)) { + term->vte_regexp = vte_regex_new_for_match (HTTP_REGEXP, -1, + PCRE2_CASELESS, &error); + + ret = vte_terminal_match_add_regex (VTE_TERMINAL(term->vte_term), term->vte_regexp, + PCRE2_NOTEMPTY); + } else { + term->http_regexp = g_regex_new (HTTP_REGEXP, G_REGEX_CASELESS, + G_REGEX_MATCH_NOTEMPTY, &error); + ret = vte_terminal_match_add_gregex (VTE_TERMINAL(term->vte_term), + term->http_regexp, 0); + } + vte_terminal_match_set_cursor_type (VTE_TERMINAL(term->vte_term), ret, GDK_HAND2); /* Show the child widgets */ @@ -852,6 +848,14 @@ } static void +on_selection_done (GtkWidget *widget, tilda_window *tw) +{ + DEBUG_FUNCTION ("on_selection_done"); + + gtk_menu_detach (GTK_MENU (widget)); +} + +static void popup_menu (tilda_window *tw, tilda_term *tt, GdkEvent * event) { DEBUG_FUNCTION ("popup_menu"); @@ -905,8 +909,12 @@ /* Disable auto hide */ tw->disable_auto_hide = TRUE; g_signal_connect (G_OBJECT(menu), "unmap", G_CALLBACK(on_popup_hide), tw); + g_signal_connect (G_OBJECT (menu), "selection-done", G_CALLBACK (on_selection_done), tw); gtk_menu_popup_at_pointer (GTK_MENU (menu), event); + + g_object_unref (action_group); + g_object_unref (builder); } static int button_press_cb (G_GNUC_UNUSED GtkWidget *widget, GdkEventButton *event, gpointer data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tilda-tilda-1.5.0/src/tilda_terminal.h new/tilda-tilda-1.5.1/src/tilda_terminal.h --- old/tilda-tilda-1.5.0/src/tilda_terminal.h 2020-02-08 23:46:29.000000000 +0100 +++ new/tilda-tilda-1.5.1/src/tilda_terminal.h 2020-05-03 21:20:55.000000000 +0200 @@ -20,6 +20,7 @@ #include "tilda-palettes.h" #include <gtk/gtk.h> +#include <vte/vte.h> G_BEGIN_DECLS @@ -31,6 +32,7 @@ GtkWidget *hbox; GtkWidget *scrollbar; GRegex *http_regexp; + VteRegex *vte_regexp; GPid pid; /* We remember if we have already dropped to the default * shell before, if so, then we know that this time we can diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tilda-tilda-1.5.0/src/tilda_window.c new/tilda-tilda-1.5.1/src/tilda_window.c --- old/tilda-tilda-1.5.0/src/tilda_window.c 2020-02-08 23:46:29.000000000 +0100 +++ new/tilda-tilda-1.5.1/src/tilda_window.c 2020-05-03 21:20:55.000000000 +0200 @@ -849,6 +849,31 @@ } } +static void switch_page_cb (GtkNotebook *notebook, + GtkWidget *page, + guint page_num, + tilda_window *tw) +{ + DEBUG_FUNCTION ("tilda_terminal_switch_page_cb"); + guint counter = 0; + tilda_term *term = NULL; + for(GList *item=tw->terms; item != NULL; item=item->next) { + if(counter == page_num) { + term = (tilda_term*) item->data; + } + counter++; + } + + char * current_title = tilda_terminal_get_title (term); + + if (current_title != NULL) { + gtk_window_set_title (GTK_WINDOW (tw->window), current_title); + } + + g_free (current_title); +} + + gboolean tilda_window_init (const gchar *config_file, const gint instance, tilda_window *tw) { DEBUG_FUNCTION ("tilda_window_init"); @@ -995,6 +1020,8 @@ * of tilda_terms in the tw->terms structure in sync with the order of tabs. */ g_signal_connect (G_OBJECT(tw->notebook), "page-reordered", G_CALLBACK (page_reordered_cb), tw); + g_signal_connect (G_OBJECT (tw->notebook), "switch-page", G_CALLBACK (switch_page_cb), tw); + /* Setup the tilda window. The tilda window consists of a top level window that contains the following widgets: * * The main_box holds a GtkNotebook with all the terminal tabs * * The search_box holds the TildaSearchBox widget diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tilda-tilda-1.5.0/src/tomboykeybinder.c new/tilda-tilda-1.5.1/src/tomboykeybinder.c --- old/tilda-tilda-1.5.0/src/tomboykeybinder.c 2020-02-08 23:46:29.000000000 +0100 +++ new/tilda-tilda-1.5.1/src/tomboykeybinder.c 2020-05-03 21:20:55.000000000 +0200 @@ -56,7 +56,7 @@ } Binding; static GSList *bindings = NULL; -static guint32 last_event_time = 0; +static Time last_event_time = 0; static gboolean processing_event = FALSE; /** @@ -243,9 +243,9 @@ * windows to avoid anti-focus-stealing code. */ processing_event = TRUE; - last_event_time = (guint32) xevent->xkey.time; + last_event_time = xevent->xkey.time; - g_debug ("Current event time %d", last_event_time); + g_debug ("Current event time %ld", last_event_time); event_mods = xevent->xkey.state & ~(num_lock_mask | caps_lock_mask |