# HG changeset patch
# Node ID 2c586b946dcc
# Parent  64805b295a5c
diff --git a/.reviewboardrc b/.reviewboardrc
--- a/.reviewboardrc
+++ b/.reviewboardrc
@@ -1,6 +1,6 @@
 REVIEWBOARD_URL = "https://reviews.imfreedom.org/"
 REPOSITORY = "pidgin/pidgin"
 REPOSITORY_TYPE = "mercurial"
-BRANCH = "default"
-LAND_DEST_BRANCH = "default"
+BRANCH = "gtk4"
+LAND_DEST_BRANCH = "gtk4"
 LAND_PUSH = False
diff --git a/doc/reference/pidgin/meson.build b/doc/reference/pidgin/meson.build
--- a/doc/reference/pidgin/meson.build
+++ b/doc/reference/pidgin/meson.build
@@ -26,7 +26,7 @@
 			'--no-namespace-dir',
 			'--content-dir=@0@'.format(meson.current_source_dir()),
 			'--add-include-path=@0@'.format(meson.global_build_root() / 'subprojects/gplugin/gplugin'),
-			'--add-include-path=@0@'.format(meson.global_build_root() / 'subprojects/gplugin/gplugin-gtk3'),
+			'--add-include-path=@0@'.format(meson.global_build_root() / 'subprojects/gplugin/gplugin-gtk4'),
 			'--add-include-path=@0@'.format(meson.project_build_root() / 'libpurple'),
 			'--add-include-path=@0@'.format(meson.global_build_root() / 'subprojects/talkatu/talkatu'),
 			'@INPUT1@'
diff --git a/doc/reference/pidgin/pidgin.toml.in b/doc/reference/pidgin/pidgin.toml.in
--- a/doc/reference/pidgin/pidgin.toml.in
+++ b/doc/reference/pidgin/pidgin.toml.in
@@ -7,7 +7,7 @@
 logo_url = ""
 license = "GPL-2.0-or-later"
 description = "Pidgin Universal Chat Client"
-dependencies = [ "GLib-2.0", "GObject-2.0", "Gtk-3.0", "Purple-3.0", "GPlugin-1.0", "GPlugin-Gtk3-1.0", "Talkatu-0.0" ]
+dependencies = [ "GLib-2.0", "GObject-2.0", "Gtk-4.0", "Purple-3.0", "GPlugin-1.0", "GPlugin-Gtk4-1.0", "Talkatu-0.0" ]
 devhelp = true
 search_index = true
 
@@ -21,10 +21,10 @@
   description = "The base type system library"
   docs_url = "https://docs.gtk.org/gobject/"
 
-  [dependencies."Gtk-3.0"]
+  [dependencies."Gtk-4.0"]
   name = "Gtk"
   description = "The GTK toolkit"
-  docs_url = "https://docs.gtk.org/gtk3/"
+  docs_url = "https://docs.gtk.org/gtk4/"
 
   [dependencies."Purple-3.0"]
   name = "Purple"
@@ -36,14 +36,14 @@
   description = "GPlugin Plugin Library"
   docs_urls = "https://docs.imfreedom.org/gplugin/"
 
-  [dependencies."GPlugin-Gtk3-1.0"]
-  name = "GPlugin-Gtk3"
-  description = "GPlugin Gtk3 Widget Library"
-  docs_urls = "https://docs.imfreedom.org/gplugin-gtk3/"
+  [dependencies."GPlugin-Gtk4-1.0"]
+  name = "GPlugin-Gtk"
+  description = "GPlugin Gtk4 Widget Library"
+  docs_urls = "https://docs.imfreedom.org/gplugin-gtk4/"
 
   [dependencies."Talkatu-0.0"]
   name = "Talkatu"
-  description = "Talkatu Gtk3 Chat Widgets"
+  description = "Talkatu Gtk Chat Widgets"
   docs_urls = "https://docs.imfreedom.org/talkatu/"
 
 [theme]
diff --git a/doc/reference/pidgin/urlmap.js b/doc/reference/pidgin/urlmap.js
--- a/doc/reference/pidgin/urlmap.js
+++ b/doc/reference/pidgin/urlmap.js
@@ -6,8 +6,8 @@
     [ 'GLib', 'https://docs.gtk.org/glib/' ],
     [ 'GObject', 'https://docs.gtk.org/gobject/' ],
     [ 'GPlugin', 'https://docs.imfreedom.org/gplugin/' ],
-    [ 'GPlugin-Gtk3', 'https://docs.imfreedom.org/gplugin-gtk3/' ],
-    [ 'Gtk', 'https://docs.gtk.org/gtk3/' ],
+    [ 'GPlugin-Gtk4', 'https://docs.imfreedom.org/gplugin-gtk4/' ],
+    [ 'Gtk', 'https://docs.gtk.org/gtk4/' ],
     [ 'Purple3', 'https://docs.imfreedom.org/purple3/' ],
     [ 'Talkatu', 'https://docs.imfreedom.org/talkatu/' ],
 ]
diff --git a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -256,7 +256,7 @@
 # Check Pidgin dependencies
 #######################################################################
 if get_option('gtkui')
-	gtk = dependency('gtk+-3.0', version : '>= 3.24.0')
+	gtk = dependency('gtk4', version : '>= 4.0.0')
 	libhandy = dependency('libhandy-1', version : '>= 1')
 
 	talkatu_dep = dependency('talkatu',
@@ -564,9 +564,9 @@
 	fallback : ['gplugin', 'gplugin_dep'])
 
 if get_option('gtkui')
-	gplugin_gtk_dep = dependency('gplugin-gtk3',
+	gplugin_gtk_dep = dependency('gplugin-gtk4',
 		version : ['>=0.37.0', '<0.38.0'],
-		fallback : ['gplugin-gtk', 'gplugin_gtk3_dep'])
+		fallback : ['gplugin-gtk4', 'gplugin_gtk4_dep'])
 endif
 
 #######################################################################
diff --git a/pidgin/meson.build b/pidgin/meson.build
--- a/pidgin/meson.build
+++ b/pidgin/meson.build
@@ -248,12 +248,12 @@
 	pkgconfig.generate(
 	    libpidgin,
 	    name : 'Pidgin',
-	    description : 'Pidgin is a GTK3-based instant messenger application.',
+	    description : 'Pidgin is a GTK based instant messenger application.',
 	    version : meson.project_version(),
 	    filebase : pidgin_filebase,
 	    subdirs : pidgin_filebase,
 	    # NOTE: Don't use dependencies from subprojects.
-	    requires : [gtk, libhandy, libpurple, 'talkatu', 'gplugin-gtk3'],
+	    requires : [gtk, libhandy, libpurple, 'talkatu', 'gplugin-gtk4'],
 	    variables : ['plugindir=${libdir}/pidgin-@0@'.format(purple_major_version)])
 
 	PIDGIN_DESKTOP_FILE = 'im.pidgin.Pidgin3.desktop'
@@ -299,7 +299,7 @@
 		pidgin_gir = gnome.generate_gir(libpidgin,
 			sources : introspection_sources,
 			header : 'pidgin.h',
-			includes : ['GLib-2.0', 'GObject-2.0', 'Gtk-3.0', libpurple_gir[0], 'Talkatu-0.0'],
+			includes : ['GLib-2.0', 'GObject-2.0', 'Gtk-4.0', libpurple_gir[0], 'Talkatu-0.0'],
 			namespace : 'Pidgin',
 			symbol_prefix : 'pidgin',
 			identifier_prefix : 'Pidgin',
diff --git a/subprojects/talkatu.wrap b/subprojects/talkatu.wrap
--- a/subprojects/talkatu.wrap
+++ b/subprojects/talkatu.wrap
@@ -1,4 +1,4 @@
 [wrap-hg]
 directory = talkatu
 url = https://keep.imfreedom.org/talkatu/talkatu
-revision = default
+revision = gtk4
