evolution r37133 - in trunk/addressbook: . printing
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r37133 - in trunk/addressbook: . printing
- Date: Mon, 26 Jan 2009 17:57:28 +0000 (UTC)
Author: mbarnes
Date: Mon Jan 26 17:57:28 2009
New Revision: 37133
URL: http://svn.gnome.org/viewvc/evolution?rev=37133&view=rev
Log:
2009-01-26 Matthew Barnes <mbarnes redhat com>
* addressbook/printing/test-print.c:
* addressbook/printing/test-contact-print-style-editor.c:
Migrate the test programs off libgnomeui/libbonobo.
Modified:
trunk/addressbook/ChangeLog
trunk/addressbook/printing/test-contact-print-style-editor.c
trunk/addressbook/printing/test-print.c
Modified: trunk/addressbook/printing/test-contact-print-style-editor.c
==============================================================================
--- trunk/addressbook/printing/test-contact-print-style-editor.c (original)
+++ trunk/addressbook/printing/test-contact-print-style-editor.c Mon Jan 26 17:57:28 2009
@@ -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;
}
Modified: trunk/addressbook/printing/test-print.c
==============================================================================
--- trunk/addressbook/printing/test-print.c (original)
+++ trunk/addressbook/printing/test-print.c Mon Jan 26 17:57:28 2009
@@ -24,35 +24,28 @@
#include <stdlib.h>
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-ui-init.h>
#include <glade/glade.h>
-#include <bonobo/bonobo-main.h>
#include "e-contact-print.h"
-int main( int argc, char *argv[] )
+int
+main (int argc, char *argv[])
{
- GList *shown_fields = NULL;
+ GList *shown_fields = NULL;
- /* bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);*/
+ gtk_init (&argc, &argv);
- gnome_program_init ("Contact Print Test", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv,
- NULL);
+ glade_init ();
- glade_init ();
+ shown_fields = g_list_append (shown_fields, "First field");
+ shown_fields = g_list_append (shown_fields, "Second field");
+ shown_fields = g_list_append (shown_fields, "Third field");
+ shown_fields = g_list_append (shown_fields, "Fourth field");
- shown_fields = g_list_append(shown_fields, "First field");
- shown_fields = g_list_append(shown_fields, "Second field");
- shown_fields = g_list_append(shown_fields, "Third field");
- shown_fields = g_list_append(shown_fields, "Fourth field");
+ /* does nothing */
+ e_contact_print (NULL, NULL, NULL, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
- /* does nothing */
- e_contact_print (NULL, NULL, NULL, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
+ gtk_main ();
- bonobo_main();
-
- /* Not reached. */
- return 0;
+ /* Not reached. */
+ return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]