diff options
author | Stefano Karapetsas <[email protected]> | 2014-05-04 19:05:05 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-05-04 19:05:05 +0200 |
commit | c9497d958bb1ca646c1b8b69dfe344f2e2a555ed (patch) | |
tree | ba281deeca409deab2f990e1298e58360eacb3f3 | |
parent | 64dfc3d24b51456f5a90fa1a59771db1ef1d980c (diff) | |
download | mate-desktop-c9497d958bb1ca646c1b8b69dfe344f2e2a555ed.tar.bz2 mate-desktop-c9497d958bb1ca646c1b8b69dfe344f2e2a555ed.tar.xz |
libmate-desktop: Update test to use MateColorButton
-rw-r--r-- | libmate-desktop/test.c | 33 |
1 files changed, 26 insertions, 7 deletions
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 <config.h> #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 (); } |