From c9497d958bb1ca646c1b8b69dfe344f2e2a555ed Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Sun, 4 May 2014 19:05:05 +0200 Subject: libmate-desktop: Update test to use MateColorButton --- libmate-desktop/test.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'libmate-desktop') diff --git a/libmate-desktop/test.c b/libmate-desktop/test.c index 75f0c38..0e97551 100644 --- a/libmate-desktop/test.c +++ b/libmate-desktop/test.c @@ -1,7 +1,7 @@ /* * test.c: general tests for libmate-desktop * - * Copyright (C) 2013 Stefano Karapetsas + * Copyright (C) 2013-2014 Stefano Karapetsas * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,14 +24,33 @@ #include #include "mate-desktop.h" +#include "mate-colorbutton.h" int main (int argc, char **argv) { -#if MATE_DESKTOP_CHECK_VERSION (1, 7, 2) - return 0; -#else - g_warning ("Old mate-desktop version!"); - return 1; -#endif + GtkWindow *window = NULL; + GtkWidget *widget = NULL; + + /* initialize GTK+ */ + gtk_init (&argc, &argv); + + /* create window */ + window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL)); + + gtk_window_set_title (window, "MATE Desktop Test"); + + /* create a MateColorButton */ + widget = mate_color_button_new (); + + /* add MateColorButton to window */ + gtk_container_add (GTK_CONTAINER (window), widget); + + /* quit signal */ + g_signal_connect (GTK_WIDGET (window), "destroy", gtk_main_quit, NULL); + + gtk_widget_show_all (GTK_WIDGET (window)); + + /* start application */ + gtk_main (); } -- cgit v1.2.1