summaryrefslogtreecommitdiffstats
path: root/plugins/xsettings/test-gtk-modules.c
blob: ef83fc3fc81e58635a3e43a3fb34283ceaa806a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "gsd-xsettings-gtk.h"

static void
gtk_modules_callback (GsdXSettingsGtk       *gtk,
		      GParamSpec            *spec,
		      gpointer               user_data)
{
	const char *modules;

	modules = gsd_xsettings_gtk_get_modules (gtk);
	g_message ("GTK+ modules list changed to: %s", modules ? modules : "(empty)");
}

int main (int argc, char **argv)
{
	GMainLoop *loop;
	GsdXSettingsGtk *gtk;

	gtk = gsd_xsettings_gtk_new ();
        g_signal_connect (G_OBJECT (gtk), "notify::gtk-modules",
			  G_CALLBACK (gtk_modules_callback), NULL);

	gtk_modules_callback (gtk, NULL, NULL);

	loop = g_main_loop_new (NULL, TRUE);
	g_main_loop_run (loop);

	return 0;
}