1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
4 # T2 SDE: package/*/webkitgtk/default-uri.patch
5 # Copyright (C) 2021 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- webkitgtk-2.32.3/Tools/MiniBrowser/gtk/BrowserWindow.h.vanilla 2021-07-29 17:05:38.096130563 +0200
18 +++ webkitgtk-2.32.3/Tools/MiniBrowser/gtk/BrowserWindow.h 2021-07-29 17:05:57.046129807 +0200
20 #define BROWSER_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), BROWSER_TYPE_WINDOW))
21 #define BROWSER_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), BROWSER_TYPE_WINDOW))
22 #define BROWSER_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BROWSER_TYPE_WINDOW, BrowserWindowClass))
23 -#define BROWSER_DEFAULT_URL "http://www.webkitgtk.org/"
24 +#define BROWSER_DEFAULT_URL "http://t2sde.org/"
25 #define BROWSER_ABOUT_SCHEME "minibrowser-about"
27 typedef struct _BrowserWindow BrowserWindow;
28 --- webkitgtk-2.32.3/Tools/MiniBrowser/gtk/BrowserWindow.c.vanilla 2021-07-29 17:27:47.389077560 +0200
29 +++ webkitgtk-2.32.3/Tools/MiniBrowser/gtk/BrowserWindow.c 2021-07-29 17:29:07.242074376 +0200
32 static void activateUriEntryCallback(BrowserWindow *window)
34 - browser_window_load_uri(window,
36 #if GTK_CHECK_VERSION(3, 98, 0)
37 - gtk_editable_get_text(GTK_EDITABLE(window->uriEntry))
38 + gtk_editable_get_text(GTK_EDITABLE(window->uriEntry));
40 - gtk_entry_get_text(GTK_ENTRY(window->uriEntry))
41 + gtk_entry_get_text(GTK_ENTRY(window->uriEntry));
44 + const char* proto = strstr(uri, "://");
46 + char uri2[strlen("https://") + strlen(uri) + 1];
47 + snprintf(uri2, sizeof(uri2), "https://%s", uri);
48 + browser_window_load_uri(window, uri2);
50 + browser_window_load_uri(window, uri);
54 static void reloadOrStopCallback(GSimpleAction *action, GVariant *parameter, gpointer userData)