aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/gui/contact-editor/test-editor.c4
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-cards.c4
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-folders.c4
-rw-r--r--addressbook/tools/evolution-addressbook-export.c14
-rw-r--r--plugins/backup-restore/backup.c1
-rw-r--r--smime/tests/import-cert.c39
-rw-r--r--widgets/misc/test-calendar.c24
-rw-r--r--widgets/misc/test-dateedit.c30
-rw-r--r--widgets/misc/test-error.c4
-rw-r--r--widgets/misc/test-info-label.c22
-rw-r--r--widgets/misc/test-multi-config-dialog.c12
11 files changed, 69 insertions, 89 deletions
diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c
index 44703c9e57..2f55e4777c 100644
--- a/addressbook/gui/contact-editor/test-editor.c
+++ b/addressbook/gui/contact-editor/test-editor.c
@@ -24,8 +24,6 @@
#include <stdlib.h>
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
#include <glade/glade.h>
#include "e-contact-editor.h"
#include "ebook/e-card.h"
@@ -97,7 +95,7 @@ int main( int argc, char *argv[] )
char *cardstr;
EContactEditor *ce;
- gnome_program_init("Contact Editor Test", VERSION, LIBGNOMEUI_MODULE, argc, argv, NULL);
+ gtk_init (&argc, &argv);
glade_init ();
diff --git a/addressbook/tools/evolution-addressbook-export-list-cards.c b/addressbook/tools/evolution-addressbook-export-list-cards.c
index 4b98bc77ac..417214691b 100644
--- a/addressbook/tools/evolution-addressbook-export-list-cards.c
+++ b/addressbook/tools/evolution-addressbook-export-list-cards.c
@@ -27,10 +27,8 @@
#include <unistd.h>
#include <glib.h>
+#include <glib/gi18n.h>
#include <glib/gstdio.h>
-#include <bonobo-activation/bonobo-activation.h>
-#include <libbonobo.h>
-#include <libgnome/libgnome.h>
#include <libebook/e-book.h>
#include <libebook/e-contact.h>
diff --git a/addressbook/tools/evolution-addressbook-export-list-folders.c b/addressbook/tools/evolution-addressbook-export-list-folders.c
index f9679b3378..86affe41ff 100644
--- a/addressbook/tools/evolution-addressbook-export-list-folders.c
+++ b/addressbook/tools/evolution-addressbook-export-list-folders.c
@@ -24,10 +24,8 @@
#include <config.h>
#include <glib.h>
+#include <glib/gi18n.h>
#include <glib/gstdio.h>
-#include <bonobo-activation/bonobo-activation.h>
-#include <libbonobo.h>
-#include <libgnome/libgnome.h>
#include <libebook/e-book.h>
diff --git a/addressbook/tools/evolution-addressbook-export.c b/addressbook/tools/evolution-addressbook-export.c
index 38a73b7b02..bfcaca980c 100644
--- a/addressbook/tools/evolution-addressbook-export.c
+++ b/addressbook/tools/evolution-addressbook-export.c
@@ -25,9 +25,6 @@
#include <string.h>
#include <glib.h>
#include <glib/gi18n.h>
-#include <bonobo-activation/bonobo-activation.h>
-#include <bonobo/bonobo-main.h>
-#include <libgnome/gnome-init.h>
#include <libebook/e-book.h>
@@ -71,8 +68,8 @@ int
main (int argc, char **argv)
{
ActionContext actctx;
- GnomeProgram *program;
GOptionContext *context;
+ GError *error = NULL;
int current_action = ACTION_NOTHING;
int IsCSV = FALSE;
@@ -85,10 +82,11 @@ main (int argc, char **argv)
context = g_option_context_new (NULL);
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
- program = gnome_program_init (
- PACKAGE, VERSION, GNOME_BONOBO_MODULE, argc, argv,
- GNOME_PARAM_GOPTION_CONTEXT, context,
- GNOME_PARAM_NONE);
+ if (!g_option_context_parse (context, &argc, &argv, &error)) {
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
+ exit (-1);
+ }
/* Parsing Parameter */
if (opt_remaining && g_strv_length (opt_remaining) > 0)
diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c
index 47d439c7ae..99d7f8d41f 100644
--- a/plugins/backup-restore/backup.c
+++ b/plugins/backup-restore/backup.c
@@ -444,6 +444,7 @@ main (int argc, char **argv)
&argc, &argv, NULL, options, GETTEXT_PACKAGE, &error);
if (error != NULL) {
g_printerr ("%s\n", error->message);
+ g_error_free (error);
exit (1);
}
diff --git a/smime/tests/import-cert.c b/smime/tests/import-cert.c
index 006cb2c313..420afe78b8 100644
--- a/smime/tests/import-cert.c
+++ b/smime/tests/import-cert.c
@@ -19,7 +19,6 @@
*/
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-ui-init.h>
#include "e-cert-db.h"
#include "e-pkcs12.h"
@@ -27,31 +26,31 @@
int
main (int argc, char **argv)
{
- ECertDB *db;
- EPKCS12 *pkcs12;
+ ECertDB *db;
+ EPKCS12 *pkcs12;
- gnome_program_init("import-cert-test", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL);
+ gtk_init (&argc, &argv);
- db = e_cert_db_peek ();
+ db = e_cert_db_peek ();
- if (!e_cert_db_import_certs_from_file (db, "ca.crt", E_CERT_CA, NULL /* XXX */)) {
- g_warning ("CA cert import failed");
- }
+ if (!e_cert_db_import_certs_from_file (db, "ca.crt", E_CERT_CA, NULL /* XXX */)) {
+ g_warning ("CA cert import failed");
+ }
- if (!e_cert_db_import_certs_from_file (db, "", E_CERT_CONTACT, NULL /* XXX */)) {
- g_warning ("contact cert import failed");
- }
+ if (!e_cert_db_import_certs_from_file (db, "", E_CERT_CONTACT, NULL /* XXX */)) {
+ g_warning ("contact cert import failed");
+ }
- if (!e_cert_db_import_certs_from_file (db, "", E_CERT_SITE, NULL /* XXX */)) {
- g_warning ("server cert import failed");
- }
+ if (!e_cert_db_import_certs_from_file (db, "", E_CERT_SITE, NULL /* XXX */)) {
+ g_warning ("server cert import failed");
+ }
- pkcs12 = e_pkcs12_new ();
- if (!e_pkcs12_import_from_file (pkcs12, "newcert.p12", NULL /* XXX */)) {
- g_warning ("PKCS12 import failed");
- }
+ pkcs12 = e_pkcs12_new ();
+ if (!e_pkcs12_import_from_file (pkcs12, "newcert.p12", NULL /* XXX */)) {
+ g_warning ("PKCS12 import failed");
+ }
- e_cert_db_shutdown ();
+ e_cert_db_shutdown ();
- return 0;
+ return 0;
}
diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c
index 1906c70ede..117def6190 100644
--- a/widgets/misc/test-calendar.c
+++ b/widgets/misc/test-calendar.c
@@ -30,9 +30,6 @@
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
-
#include "e-calendar.h"
/* Drag and Drop stuff. */
@@ -61,21 +58,20 @@ delete_event_cb (GtkWidget *widget,
int
main (int argc, char **argv)
{
- GtkWidget *app;
+ GtkWidget *window;
GtkWidget *cal;
GtkWidget *vbox;
ECalendarItem *calitem;
- gnome_program_init (
- "test-calendar", "0.0", LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_NONE);
+ gtk_init (&argc, &argv);
- app = gnome_app_new ("Test", "Test");
- gtk_window_set_default_size (GTK_WINDOW (app), 400, 400);
- gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
- gtk_container_set_border_width (GTK_CONTAINER (app), 8);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "ECalendar Test");
+ gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
+ gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
+ gtk_container_set_border_width (GTK_CONTAINER (window), 8);
- g_signal_connect (app, "delete_event",
+ g_signal_connect (window, "delete_event",
G_CALLBACK (delete_event_cb), NULL);
cal = e_calendar_new ();
@@ -99,8 +95,8 @@ main (int argc, char **argv)
gtk_box_pack_start (GTK_BOX (vbox), cal, TRUE, TRUE, 0);
gtk_widget_show (vbox);
- gnome_app_set_contents (GNOME_APP (app), vbox);
- gtk_widget_show (app);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_widget_show (window);
gtk_main ();
diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c
index da6a5953b1..8c340ed45b 100644
--- a/widgets/misc/test-dateedit.c
+++ b/widgets/misc/test-dateedit.c
@@ -29,13 +29,11 @@
#endif
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomeui/gnome-app.h>
#include "e-dateedit.h"
static void delete_event_cb (GtkWidget *widget,
GdkEventAny *event,
- GtkWidget *app);
+ GtkWidget *window);
static void on_get_date_clicked (GtkWidget *button,
EDateEdit *dedit);
static void on_toggle_24_hour_clicked (GtkWidget *button,
@@ -52,27 +50,29 @@ static void on_time_changed (EDateEdit *dedit,
int
main (int argc, char **argv)
{
- GtkWidget *app;
+ GtkWidget *window;
EDateEdit *dedit;
GtkWidget *table, *button;
- gnome_program_init ("test-dateedit", "0.0", LIBGNOMEUI_MODULE, argc, argv, NULL);
+ gtk_init (&argc, &argv);
puts ("here");
- app = gnome_app_new ("Test", "Test");
- gtk_window_set_default_size (GTK_WINDOW (app), 300, 200);
- gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
- gtk_container_set_border_width (GTK_CONTAINER (app), 8);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "EDateEdit Test");
+ gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
+ gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
+ gtk_container_set_border_width (GTK_CONTAINER (window), 8);
- g_signal_connect (app, "delete_event",
- G_CALLBACK (delete_event_cb), app);
+ g_signal_connect (window, "delete_event",
+ G_CALLBACK (delete_event_cb), window);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_widget_show (table);
- gnome_app_set_contents (GNOME_APP (app), table);
+
+ gtk_container_add (GTK_CONTAINER (window), table);
/* EDateEdit 1. */
dedit = E_DATE_EDIT (e_date_edit_new ());
@@ -160,7 +160,7 @@ main (int argc, char **argv)
g_signal_connect (button, "clicked",
G_CALLBACK (on_toggle_24_hour_clicked), dedit);
- gtk_widget_show (app);
+ gtk_widget_show (window);
gtk_main ();
@@ -171,9 +171,9 @@ main (int argc, char **argv)
static void
delete_event_cb (GtkWidget *widget,
GdkEventAny *event,
- GtkWidget *app)
+ GtkWidget *window)
{
- gtk_widget_destroy (app);
+ gtk_widget_destroy (window);
gtk_main_quit ();
}
diff --git a/widgets/misc/test-error.c b/widgets/misc/test-error.c
index 84abd76ce3..c8b442b23a 100644
--- a/widgets/misc/test-error.c
+++ b/widgets/misc/test-error.c
@@ -25,14 +25,12 @@
#include <config.h>
#endif
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
#include "e-error.h"
int
main (int argc, char **argv)
{
- gnome_init ("test-error", "0.0", argc, argv);
+ gtk_init (&argc, &argv);
argc--;
switch (argc) {
diff --git a/widgets/misc/test-info-label.c b/widgets/misc/test-info-label.c
index fe7544350d..2ef47483ed 100644
--- a/widgets/misc/test-info-label.c
+++ b/widgets/misc/test-info-label.c
@@ -26,8 +26,6 @@
#endif
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
#include "e-info-label.h"
static void
@@ -41,20 +39,20 @@ delete_event_cb (GtkWidget *widget,
int
main (int argc, char **argv)
{
- GtkWidget *app;
+ GtkWidget *window;
GtkWidget *info_label;
GtkWidget *label;
GtkWidget *vbox;
- gnome_program_init (
- "test-title-bar", "0.0", LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_NONE);
+ gtk_init (&argc, &argv);
- app = gnome_app_new ("Test", "Test");
- gtk_window_set_default_size (GTK_WINDOW (app), 400, 400);
- gtk_window_set_resizable (GTK_WINDOW (app), TRUE);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "EInfoLabel Test");
+ gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
+ gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
- g_signal_connect (app, "delete_event", G_CALLBACK (delete_event_cb), NULL);
+ g_signal_connect (window, "delete_event",
+ G_CALLBACK (delete_event_cb), NULL);
info_label = e_info_label_new ("stock_default-folder");
e_info_label_set_info ((EInfoLabel *) info_label, "Component Name", "An annoyingly long component message");
@@ -68,8 +66,8 @@ main (int argc, char **argv)
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
gtk_widget_show (vbox);
- gnome_app_set_contents (GNOME_APP (app), vbox);
- gtk_widget_show (app);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_widget_show (window);
gtk_main ();
diff --git a/widgets/misc/test-multi-config-dialog.c b/widgets/misc/test-multi-config-dialog.c
index 28ed8d3eae..bc52f493c6 100644
--- a/widgets/misc/test-multi-config-dialog.c
+++ b/widgets/misc/test-multi-config-dialog.c
@@ -23,8 +23,6 @@
#include "e-multi-config-dialog.c"
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
#define NUM_PAGES 10
@@ -77,15 +75,13 @@ main (int argc, char **argv)
{
GtkWidget *dialog;
- gnome_program_init (
- "test-multi-config-dialog", "0.0", LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_NONE);
+ gtk_init (&argc, &argv);
dialog = e_multi_config_dialog_new ();
- gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 300);
- g_signal_connect((dialog), "delete_event",
- G_CALLBACK (delete_event_callback), NULL);
+ g_signal_connect(
+ dialog, "delete-event",
+ G_CALLBACK (delete_event_callback), NULL);
add_pages (E_MULTI_CONFIG_DIALOG (dialog));