[gnome-settings-daemon] print-notifications: Simplify test app



commit 8687d048766563504f05864b784d4745bf192bcd
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Apr 26 17:20:52 2012 +0100

    print-notifications: Simplify test app

 plugins/print-notifications/Makefile.am            |    1 +
 .../print-notifications/test-print-notifications.c |   62 +------------------
 2 files changed, 5 insertions(+), 58 deletions(-)
---
diff --git a/plugins/print-notifications/Makefile.am b/plugins/print-notifications/Makefile.am
index 52b136f..6d854f3 100644
--- a/plugins/print-notifications/Makefile.am
+++ b/plugins/print-notifications/Makefile.am
@@ -58,6 +58,7 @@ test_print_notifications_SOURCES =		\
 
 test_print_notifications_CPPFLAGS =				\
 	-I$(top_srcdir)/gnome-settings-daemon			\
+	-I$(top_srcdir)/plugins/common				\
 	-DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" 	\
 	-DLIBEXECDIR=\""$(libexecdir)"\"			\
 	$(AM_CPPFLAGS)
diff --git a/plugins/print-notifications/test-print-notifications.c b/plugins/print-notifications/test-print-notifications.c
index 098d7f1..b3d9620 100644
--- a/plugins/print-notifications/test-print-notifications.c
+++ b/plugins/print-notifications/test-print-notifications.c
@@ -1,60 +1,6 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2007 William Jon McCann <mccann jhu edu>
- *
- * 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 the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- *
- *
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-
+#define NEW gsd_print_notifications_manager_new
+#define START gsd_print_notifications_manager_start
+#define MANAGER GsdPrintNotificationsManager
 #include "gsd-print-notifications-manager.h"
 
-static GsdPrintNotificationsManager *manager = NULL;
-
-int
-main (int    argc,
-      char **argv)
-{
-        GError  *error;
-
-        bindtextdomain (GETTEXT_PACKAGE, GNOME_SETTINGS_LOCALEDIR);
-        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-        textdomain (GETTEXT_PACKAGE);
-
-        g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
-
-        error = NULL;
-        if (! gtk_init_with_args (&argc, &argv, NULL, NULL, NULL, &error)) {
-                fprintf (stderr, "%s", error->message);
-                g_error_free (error);
-                exit (1);
-        }
-
-        manager = gsd_print_notifications_manager_new ();
-
-        error = NULL;
-        gsd_print_notifications_manager_start (manager, &error);
-
-        gtk_main ();
-
-        return 0;
-}
+#include "test-plugin.h"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]