aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/printing/test-contact-print-style-editor.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-27 02:49:51 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-27 02:49:51 +0800
commitbc80332460c353e391cd620f2cc51f7b56eef4de (patch)
tree37881bffee0b32bad8c3eaaf8640f206fdfc4ccf /addressbook/printing/test-contact-print-style-editor.c
parent8bfadde575e8a49da66bf7ba17e89963aa84bbf5 (diff)
downloadgsoc2013-evolution-bc80332460c353e391cd620f2cc51f7b56eef4de.tar
gsoc2013-evolution-bc80332460c353e391cd620f2cc51f7b56eef4de.tar.gz
gsoc2013-evolution-bc80332460c353e391cd620f2cc51f7b56eef4de.tar.bz2
gsoc2013-evolution-bc80332460c353e391cd620f2cc51f7b56eef4de.tar.lz
gsoc2013-evolution-bc80332460c353e391cd620f2cc51f7b56eef4de.tar.xz
gsoc2013-evolution-bc80332460c353e391cd620f2cc51f7b56eef4de.tar.zst
gsoc2013-evolution-bc80332460c353e391cd620f2cc51f7b56eef4de.zip
Miscellaneous stuff.
svn path=/branches/kill-bonobo/; revision=37134
Diffstat (limited to 'addressbook/printing/test-contact-print-style-editor.c')
-rw-r--r--addressbook/printing/test-contact-print-style-editor.c54
1 files changed, 19 insertions, 35 deletions
diff --git a/addressbook/printing/test-contact-print-style-editor.c b/addressbook/printing/test-contact-print-style-editor.c
index 2ca9afb159..de9fd6b6d6 100644
--- a/addressbook/printing/test-contact-print-style-editor.c
+++ b/addressbook/printing/test-contact-print-style-editor.c
@@ -24,51 +24,35 @@
#include <stdlib.h>
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <bonobo/bonobo-main.h>
#include "e-contact-print-style-editor.h"
-/* This is a horrible thing to do, but it is just a test. */
-static GtkWidget *editor;
-
-static void destroy_callback(GtkWidget *app, gpointer data)
+int
+main (int argc, char *argv[])
{
- static int count = 2;
- count --;
- if ( count <= 0 )
- exit(0);
-}
-
-int main( int argc, char *argv[] )
-{
- GtkWidget *app;
-
- /* bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);*/
+ GtkWidget *editor;
+ GtkWidget *window;
+ const gchar *title;
- gnome_program_init ("Contact Print Style Editor Test", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- NULL);
+ title = "Contact Print Style Editor Test";
- glade_init ();
+ gtk_init (&argc, &argv);
- app = gnome_app_new("Contact Print Style Editor Test", NULL);
+ glade_init ();
- editor = e_contact_print_style_editor_new("");
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), title);
- gnome_app_set_contents( GNOME_APP( app ), editor );
+ editor = e_contact_print_style_editor_new ("");
+ gtk_container_add (GTK_CONTAINER (window), editor);
- /* Connect the signals */
- g_signal_connect( app, "destroy",
- G_CALLBACK ( destroy_callback ),
- ( gpointer ) app );
+ g_signal_connect (
+ window, "delete-event",
+ G_CALLBACK (gtk_main_quit), NULL);
- gtk_widget_show_all( app );
+ gtk_widget_show_all (window);
- bonobo_main();
+ gtk_main ();
- /* Not reached. */
- return 0;
+ /* Not reached. */
+ return 0;
}