# HG changeset patch
# Node ID 285423c0dec4
# Parent  faf4b46f690c
diff --git a/libpurple/plugins/purple-toast/purple-toast.c b/libpurple/plugins/purple-toast/purple-toast.c
--- a/libpurple/plugins/purple-toast/purple-toast.c
+++ b/libpurple/plugins/purple-toast/purple-toast.c
@@ -37,11 +37,7 @@
 		application = g_application_get_default();
 
 		if(application == NULL) {
-#if GLIB_CHECK_VERSION(2,74,0)
 			application = g_application_new(NULL, G_APPLICATION_DEFAULT_FLAGS);
-#else
-			application = g_application_new(NULL, G_APPLICATION_FLAGS_NONE);
-#endif
 			g_application_register(application, NULL, NULL);
 		}
 	}
diff --git a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -198,15 +198,15 @@
 #######################################################################
 # Once we require >= 2.74.0, remove the hack in the if(TRUE) block in
 # libpurple/core.c.
-glib = dependency('glib-2.0', version : '>= 2.70.0')
+glib = dependency('glib-2.0', version : '>= 2.76.0')
 gio = dependency('gio-2.0')
 gobject = dependency('gobject-2.0')
 gthread = dependency('gthread-2.0')
 gnome = import('gnome')
 
 add_project_arguments(
-	'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_70',
-	'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_70',
+	'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_76',
+	'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_76',
 	language : 'c',)
 
 #######################################################################
@@ -228,7 +228,7 @@
 # Check Pidgin dependencies
 #######################################################################
 if get_option('gtkui')
-	gtk = dependency('gtk4', version : '>= 4.6.0')
+	gtk = dependency('gtk4', version : '>= 4.10.0')
 	libadwaita = dependency('libadwaita-1', version : '>= 1.2')
 
 	talkatu_dep = dependency('talkatu',
diff --git a/pidgin/gtknotify.c b/pidgin/gtknotify.c
--- a/pidgin/gtknotify.c
+++ b/pidgin/gtknotify.c
@@ -612,14 +612,10 @@
 
 static void *
 pidgin_notify_uri(const char *uri) {
-#if GTK_CHECK_VERSION(4, 10, 0)
 	GtkUriLauncher *launcher = NULL;
 	launcher = gtk_uri_launcher_new(uri);
 	gtk_uri_launcher_launch(launcher, NULL, NULL, NULL, NULL);
 	g_object_unref(launcher);
-#else
-	gtk_show_uri(NULL, uri, GDK_CURRENT_TIME);
-#endif
 
 	return NULL;
 }
diff --git a/pidgin/gtkwhiteboard.c b/pidgin/gtkwhiteboard.c
--- a/pidgin/gtkwhiteboard.c
+++ b/pidgin/gtkwhiteboard.c
@@ -455,7 +455,6 @@
 	gtk_native_dialog_show(GTK_NATIVE_DIALOG(chooser));
 }
 
-#if GTK_CHECK_VERSION(4, 10, 0)
 static void
 notify_color_cb(GObject *obj, G_GNUC_UNUSED GParamSpec *pspec, gpointer data) {
 	PidginWhiteboard *gtkwb = data;
@@ -473,25 +472,6 @@
 	purple_whiteboard_get_brush(wb, &old_size, &old_color);
 	purple_whiteboard_send_brush(wb, old_size, new_color);
 }
-#else
-static void
-color_selected(GtkColorButton *button, PidginWhiteboard *gtkwb)
-{
-	GdkRGBA color;
-	PurpleWhiteboard *wb = gtkwb->wb;
-	int old_size, old_color;
-	int new_color;
-
-	gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(button), &color);
-
-	new_color = (unsigned int)(color.red * 255) << 16;
-	new_color |= (unsigned int)(color.green * 255) << 8;
-	new_color |= (unsigned int)(color.blue * 255);
-
-	purple_whiteboard_get_brush(wb, &old_size, &old_color);
-	purple_whiteboard_send_brush(wb, old_size, new_color);
-}
-#endif
 
 static void
 pidgin_whiteboard_create(PurpleWhiteboard *wb)
@@ -535,13 +515,8 @@
 	                            gtkwb->width, gtkwb->height);
 
 	pidgin_whiteboard_rgb24_to_rgba(gtkwb->brush_color, &color);
-#if GTK_CHECK_VERSION(4, 10, 0)
 	gtk_color_dialog_button_set_rgba(GTK_COLOR_DIALOG_BUTTON(gtkwb->color_button),
 	                                 &color);
-#else
-	gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(gtkwb->color_button),
-	                           &color);
-#endif
 
 	/* Make all this (window) visible */
 	gtk_widget_set_visible(GTK_WIDGET(gtkwb), TRUE);
@@ -576,15 +551,9 @@
 pidgin_whiteboard_init(PidginWhiteboard *self) {
 	gtk_widget_init_template(GTK_WIDGET(self));
 
-#if GTK_CHECK_VERSION(4, 10, 0)
 	self->color_button = gtk_color_dialog_button_new(gtk_color_dialog_new());
 	g_signal_connect(self->color_button, "notify::rgba",
 	                 G_CALLBACK(notify_color_cb), self);
-#else
-	self->color_button = gtk_color_button_new();
-	g_signal_connect(self->color_button, "color-set",
-	                 G_CALLBACK(color_selected), self);
-#endif
 	gtk_box_append(self->toolbar, GTK_WIDGET(self->color_button));
 }
 
diff --git a/pidgin/gtkxfer.c b/pidgin/gtkxfer.c
--- a/pidgin/gtkxfer.c
+++ b/pidgin/gtkxfer.c
@@ -434,20 +434,14 @@
 static void
 open_button_cb(G_GNUC_UNUSED GtkButton *button, PidginXferDialog *dialog)
 {
-#if GTK_CHECK_VERSION(4, 10, 0)
 	GtkUriLauncher *launcher = NULL;
-#endif
 	gchar *uri = NULL;
 
 	uri = g_strdup_printf("file://%s",
 	                      purple_xfer_get_local_filename(dialog->selected_xfer));
-#if GTK_CHECK_VERSION(4, 10, 0)
 	launcher = gtk_uri_launcher_new(uri);
 	gtk_uri_launcher_launch(launcher, GTK_WINDOW(dialog), NULL, NULL, NULL);
 	g_object_unref(launcher);
-#else
-	gtk_show_uri(GTK_WINDOW(dialog), uri, GDK_CURRENT_TIME);
-#endif
 	g_free(uri);
 }
 
diff --git a/pidgin/pidginabout.c b/pidgin/pidginabout.c
--- a/pidgin/pidginabout.c
+++ b/pidgin/pidginabout.c
@@ -589,14 +589,10 @@
 pidgin_about_dialog_open_url_cb(G_GNUC_UNUSED TalkatuView *view,
                                 const char *url, gpointer data)
 {
-#if GTK_CHECK_VERSION(4, 10, 0)
 	GtkUriLauncher *launcher = NULL;
 	launcher = gtk_uri_launcher_new(url);
 	gtk_uri_launcher_launch(launcher, GTK_WINDOW(data), NULL, NULL, NULL);
 	g_object_unref(launcher);
-#else
-	gtk_show_uri(GTK_WINDOW(data), url, GDK_CURRENT_TIME);
-#endif
 }
 
 static void
diff --git a/pidgin/pidginavatar.c b/pidgin/pidginavatar.c
--- a/pidgin/pidginavatar.c
+++ b/pidgin/pidginavatar.c
@@ -468,10 +468,9 @@
 
 	gtk_widget_init_template(GTK_WIDGET(avatar));
 
-#if GTK_CHECK_VERSION(4,8,0)
 	gtk_picture_set_content_fit(GTK_PICTURE(avatar->icon),
 	                            GTK_CONTENT_FIT_SCALE_DOWN);
-#endif
+
 	/* Now setup our actions. */
 	group = g_simple_action_group_new();
 	g_action_map_add_action_entries(G_ACTION_MAP(group), actions,
