evolution r37303 - in branches/kill-bonobo: addressbook/gui/contact-editor addressbook/tools plugins/backup-restore shell smime/tests widgets/misc
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r37303 - in branches/kill-bonobo: addressbook/gui/contact-editor addressbook/tools plugins/backup-restore shell smime/tests widgets/misc
- Date: Sat, 21 Feb 2009 15:02:32 +0000 (UTC)
Author: mbarnes
Date: Sat Feb 21 15:02:32 2009
New Revision: 37303
URL: http://svn.gnome.org/viewvc/evolution?rev=37303&view=rev
Log:
Kill EDropdownButton.
Migrate off of gnome_program_init().
Removed:
branches/kill-bonobo/widgets/misc/e-dropdown-button.c
branches/kill-bonobo/widgets/misc/e-dropdown-button.h
branches/kill-bonobo/widgets/misc/test-dropdown-button.c
Modified:
branches/kill-bonobo/addressbook/gui/contact-editor/test-editor.c
branches/kill-bonobo/addressbook/tools/evolution-addressbook-export-list-cards.c
branches/kill-bonobo/addressbook/tools/evolution-addressbook-export-list-folders.c
branches/kill-bonobo/addressbook/tools/evolution-addressbook-export.c
branches/kill-bonobo/plugins/backup-restore/backup.c
branches/kill-bonobo/shell/main.c
branches/kill-bonobo/smime/tests/import-cert.c
branches/kill-bonobo/widgets/misc/Makefile.am
branches/kill-bonobo/widgets/misc/test-calendar.c
branches/kill-bonobo/widgets/misc/test-dateedit.c
branches/kill-bonobo/widgets/misc/test-preferences-window.c
Modified: branches/kill-bonobo/addressbook/gui/contact-editor/test-editor.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/contact-editor/test-editor.c (original)
+++ branches/kill-bonobo/addressbook/gui/contact-editor/test-editor.c Sat Feb 21 15:02:32 2009
@@ -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 @@
char *cardstr;
EContactEditor *ce;
- gnome_program_init("Contact Editor Test", VERSION, LIBGNOMEUI_MODULE, argc, argv, NULL);
+ gtk_init (&argc, &argv);
glade_init ();
Modified: branches/kill-bonobo/addressbook/tools/evolution-addressbook-export-list-cards.c
==============================================================================
--- branches/kill-bonobo/addressbook/tools/evolution-addressbook-export-list-cards.c (original)
+++ branches/kill-bonobo/addressbook/tools/evolution-addressbook-export-list-cards.c Sat Feb 21 15:02:32 2009
@@ -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>
Modified: branches/kill-bonobo/addressbook/tools/evolution-addressbook-export-list-folders.c
==============================================================================
--- branches/kill-bonobo/addressbook/tools/evolution-addressbook-export-list-folders.c (original)
+++ branches/kill-bonobo/addressbook/tools/evolution-addressbook-export-list-folders.c Sat Feb 21 15:02:32 2009
@@ -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>
Modified: branches/kill-bonobo/addressbook/tools/evolution-addressbook-export.c
==============================================================================
--- branches/kill-bonobo/addressbook/tools/evolution-addressbook-export.c (original)
+++ branches/kill-bonobo/addressbook/tools/evolution-addressbook-export.c Sat Feb 21 15:02:32 2009
@@ -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 @@
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 @@
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)
Modified: branches/kill-bonobo/plugins/backup-restore/backup.c
==============================================================================
--- branches/kill-bonobo/plugins/backup-restore/backup.c (original)
+++ branches/kill-bonobo/plugins/backup-restore/backup.c Sat Feb 21 15:02:32 2009
@@ -431,22 +431,21 @@
int
main (int argc, char **argv)
{
- GnomeProgram *program;
- GOptionContext *context;
char *file = NULL, *oper = NULL;
gint i;
+ GError *error = NULL;
- gtk_init (&argc, &argv);
bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- context = g_option_context_new (NULL);
- g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
- program = gnome_program_init (PACKAGE, VERSION, LIBGNOME_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- GNOME_PARAM_GOPTION_CONTEXT, context,
- GNOME_PARAM_NONE);
+ gtk_init_with_args (
+ &argc, &argv, NULL, options, GETTEXT_PACKAGE, &error);
+ if (error != NULL) {
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
+ exit (1);
+ }
if (opt_remaining) {
for (i = 0; i < g_strv_length (opt_remaining); i++) {
Modified: branches/kill-bonobo/shell/main.c
==============================================================================
--- branches/kill-bonobo/shell/main.c (original)
+++ branches/kill-bonobo/shell/main.c Sat Feb 21 15:02:32 2009
@@ -390,7 +390,7 @@
#define setup_segv_redirect() (void)0
#endif
-static const GOptionEntry options[] = {
+static GOptionEntry entries[] = {
{ "component", 'c', 0, G_OPTION_ARG_STRING, &requested_view,
N_("Start Evolution activating the specified component"), NULL },
{ "offline", '\0', 0, G_OPTION_ARG_NONE, &start_offline,
@@ -642,10 +642,8 @@
#ifdef DEVELOPMENT
gboolean skip_warning_dialog;
#endif
- GnomeProgram *program;
- GOptionContext *context;
- const gchar *parameter_string;
gchar *filename;
+ GError *error = NULL;
/* Make ElectricFence work. */
free (malloc (10));
@@ -654,21 +652,19 @@
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- parameter_string = _("- The Evolution PIM and Email Client");
- context = g_option_context_new (parameter_string);
- g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
- g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
-
#ifdef G_OS_WIN32
set_paths ();
#endif
- program = gnome_program_init (
- PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- GNOME_PARAM_GOPTION_CONTEXT, context,
- GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution"),
- NULL);
+ gtk_init_with_args (
+ &argc, &argv,
+ _("- The Evolution PIM and Email Client"),
+ entries, GETTEXT_PACKAGE, &error);
+ if (error != NULL) {
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
+ exit (1);
+ }
#ifdef G_OS_WIN32
if (strcmp (gettext (""), "") == 0) {
@@ -778,7 +774,6 @@
gtk_accel_map_save (e_get_accels_filename ());
e_icon_factory_shutdown ();
- g_object_unref (program);
gnome_sound_shutdown ();
e_cursors_shutdown ();
#ifdef G_OS_WIN32
Modified: branches/kill-bonobo/smime/tests/import-cert.c
==============================================================================
--- branches/kill-bonobo/smime/tests/import-cert.c (original)
+++ branches/kill-bonobo/smime/tests/import-cert.c Sat Feb 21 15:02:32 2009
@@ -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;
}
Modified: branches/kill-bonobo/widgets/misc/Makefile.am
==============================================================================
--- branches/kill-bonobo/widgets/misc/Makefile.am (original)
+++ branches/kill-bonobo/widgets/misc/Makefile.am Sat Feb 21 15:02:32 2009
@@ -51,7 +51,6 @@
e-charset-picker.h \
e-combo-cell-editable.h \
e-dateedit.h \
- e-dropdown-button.h \
e-expander.h \
e-icon-entry.h \
e-image-chooser.h \
@@ -103,7 +102,6 @@
e-charset-picker.c \
e-combo-cell-editable.c \
e-dateedit.c \
- e-dropdown-button.c \
e-expander.c \
e-icon-entry.c \
e-image-chooser.c \
@@ -167,7 +165,6 @@
noinst_PROGRAMS = \
test-calendar \
test-dateedit \
- test-dropdown-button \
test-preferences-window
# test-calendar
@@ -192,17 +189,6 @@
$(top_builddir)/filter/libfilter.la \
$(E_WIDGETS_LIBS)
-# test-dropdown-button
-
-test_dropdown_button_SOURCES = \
- test-dropdown-button.c
-
-test_dropdown_button_LDADD = \
- libemiscwidgets.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/filter/libfilter.la \
- $(E_WIDGETS_LIBS)
-
# test-preferences-window
test_preferences_window_SOURCES = \
Modified: branches/kill-bonobo/widgets/misc/test-calendar.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/test-calendar.c (original)
+++ branches/kill-bonobo/widgets/misc/test-calendar.c Sat Feb 21 15:02:32 2009
@@ -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 @@
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);
-
- 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);
+ gtk_init (&argc, &argv);
+
+ 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 @@
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 ();
@@ -122,7 +118,7 @@
start_day, start_month + 1, start_year,
end_day, end_month + 1, end_year);
- /* These days should appear bold. Remember month is 0 to 11. */
+ /* These days should windowear bold. Remember month is 0 to 11. */
e_calendar_item_mark_day (calitem, 2000, 7, 26, /* 26th Aug 2000. */
E_CALENDAR_ITEM_MARK_BOLD);
e_calendar_item_mark_day (calitem, 2000, 8, 13, /* 13th Sep 2000. */
Modified: branches/kill-bonobo/widgets/misc/test-dateedit.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/test-dateedit.c (original)
+++ branches/kill-bonobo/widgets/misc/test-dateedit.c Sat Feb 21 15:02:32 2009
@@ -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 @@
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 @@
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 @@
static void
delete_event_cb (GtkWidget *widget,
GdkEventAny *event,
- GtkWidget *app)
+ GtkWidget *window)
{
- gtk_widget_destroy (app);
+ gtk_widget_destroy (window);
gtk_main_quit ();
}
Modified: branches/kill-bonobo/widgets/misc/test-preferences-window.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/test-preferences-window.c (original)
+++ branches/kill-bonobo/widgets/misc/test-preferences-window.c Sat Feb 21 15:02:32 2009
@@ -22,8 +22,6 @@
#include "e-preferences-window.c"
#include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
#define NUM_PAGES 10
@@ -65,21 +63,20 @@
int
main (int argc, char **argv)
{
- GtkWidget *dialog;
+ GtkWidget *window;
- gnome_program_init (
- "test-preferences-window", "0.0", LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_NONE);
+ gtk_init (&argc, &argv);
- dialog = e_preferences_window_new ();
+ window = e_preferences_window_new ();
+ gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);
- 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(
+ window, "delete-event",
+ G_CALLBACK (delete_event_callback), NULL);
- add_pages (E_PREFERENCES_WINDOW (dialog));
+ add_pages (E_PREFERENCES_WINDOW (window));
- gtk_widget_show (dialog);
+ gtk_widget_show (window);
gtk_main ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]