evolution r35994 - in branches/kill-bonobo: . addressbook addressbook/gui/component addressbook/gui/contact-editor addressbook/gui/widgets calendar calendar/gui calendar/gui/alarm-notify calendar/gui/dialogs composer e-util help help/es mail plugins/attachment-reminder plugins/audio-inline plugins/backup-restore plugins/bbdb plugins/copy-tool plugins/default-mailer plugins/email-custom-header plugins/exchange-operations plugins/folder-unsubscribe plugins/google-account-setup plugins/import-ics-attachments plugins/ipod-sync plugins/itip-formatter plugins/mail-notification plugins/mail-to-meeting plugins/mail-to-task plugins/mailing-list-actions plugins/mark-calendar-offline plugins/prefer-plain plugins/save-calendar plugins/select-one-source plugins/startup-wizard plugins/subject-thread plugins/templates plugins/webdav-account-setup po shell widgets/misc widgets/table
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35994 - in branches/kill-bonobo: . addressbook addressbook/gui/component addressbook/gui/contact-editor addressbook/gui/widgets calendar calendar/gui calendar/gui/alarm-notify calendar/gui/dialogs composer e-util help help/es mail plugins/attachment-reminder plugins/audio-inline plugins/backup-restore plugins/bbdb plugins/copy-tool plugins/default-mailer plugins/email-custom-header plugins/exchange-operations plugins/folder-unsubscribe plugins/google-account-setup plugins/import-ics-attachments plugins/ipod-sync plugins/itip-formatter plugins/mail-notification plugins/mail-to-meeting plugins/mail-to-task plugins/mailing-list-actions plugins/mark-calendar-offline plugins/prefer-plain plugins/save-calendar plugins/select-one-source plugins/startup-wizard plugins/subject-thread plugins/templates plugins/webdav-account-setup po shell widgets/misc widgets/table
- Date: Thu, 14 Aug 2008 20:19:12 +0000 (UTC)
Author: mbarnes
Date: Thu Aug 14 20:19:12 2008
New Revision: 35994
URL: http://svn.gnome.org/viewvc/evolution?rev=35994&view=rev
Log:
Merge revisions 35951:35992 from trunk.
Added:
branches/kill-bonobo/plugins/webdav-account-setup/ChangeLog
Modified:
branches/kill-bonobo/ChangeLog
branches/kill-bonobo/addressbook/ChangeLog
branches/kill-bonobo/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.c
branches/kill-bonobo/addressbook/gui/component/addressbook-view.c
branches/kill-bonobo/addressbook/gui/component/addressbook.c
branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-address.c
branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-fullname.c
branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-im.c
branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor.c
branches/kill-bonobo/addressbook/gui/widgets/e-addressbook-view.c
branches/kill-bonobo/addressbook/gui/widgets/eab-gui-util.c
branches/kill-bonobo/calendar/ChangeLog
branches/kill-bonobo/calendar/gui/alarm-notify/alarm-notify-dialog.c
branches/kill-bonobo/calendar/gui/alarm-notify/alarm-queue.c
branches/kill-bonobo/calendar/gui/cal-search-bar.c
branches/kill-bonobo/calendar/gui/calendar-component.c
branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.c
branches/kill-bonobo/calendar/gui/dialogs/alarm-list-dialog.c
branches/kill-bonobo/calendar/gui/dialogs/cal-attachment-select-file.c
branches/kill-bonobo/calendar/gui/dialogs/cancel-comp.c
branches/kill-bonobo/calendar/gui/dialogs/changed-comp.c
branches/kill-bonobo/calendar/gui/dialogs/comp-editor.c
branches/kill-bonobo/calendar/gui/dialogs/delete-comp.c
branches/kill-bonobo/calendar/gui/dialogs/delete-error.c
branches/kill-bonobo/calendar/gui/dialogs/event-editor.c
branches/kill-bonobo/calendar/gui/dialogs/event-page.c
branches/kill-bonobo/calendar/gui/dialogs/event-page.glade
branches/kill-bonobo/calendar/gui/dialogs/memo-page.c
branches/kill-bonobo/calendar/gui/dialogs/memo-page.glade
branches/kill-bonobo/calendar/gui/dialogs/select-source-dialog.c
branches/kill-bonobo/calendar/gui/dialogs/task-editor.c
branches/kill-bonobo/calendar/gui/dialogs/task-page.glade
branches/kill-bonobo/calendar/gui/e-cal-list-view-config.c
branches/kill-bonobo/calendar/gui/e-cal-list-view.c
branches/kill-bonobo/calendar/gui/e-cal-list-view.h
branches/kill-bonobo/calendar/gui/e-cal-model.c
branches/kill-bonobo/calendar/gui/e-cal-model.h
branches/kill-bonobo/calendar/gui/e-calendar-table.c
branches/kill-bonobo/calendar/gui/e-calendar-view.c
branches/kill-bonobo/calendar/gui/e-calendar-view.h
branches/kill-bonobo/calendar/gui/e-day-view-config.c
branches/kill-bonobo/calendar/gui/e-day-view.c
branches/kill-bonobo/calendar/gui/e-day-view.h
branches/kill-bonobo/calendar/gui/e-memo-table.c
branches/kill-bonobo/calendar/gui/e-timezone-entry.c
branches/kill-bonobo/calendar/gui/e-week-view-config.c
branches/kill-bonobo/calendar/gui/e-week-view.c
branches/kill-bonobo/calendar/gui/e-week-view.h
branches/kill-bonobo/calendar/gui/gnome-cal.c
branches/kill-bonobo/calendar/gui/memos-component.c
branches/kill-bonobo/calendar/gui/memos-control.c
branches/kill-bonobo/calendar/gui/migration.c
branches/kill-bonobo/calendar/gui/tasks-component.c
branches/kill-bonobo/calendar/gui/tasks-control.c
branches/kill-bonobo/composer/e-msg-composer.c
branches/kill-bonobo/configure.in
branches/kill-bonobo/e-util/ChangeLog
branches/kill-bonobo/e-util/e-config.c
branches/kill-bonobo/e-util/e-event.c
branches/kill-bonobo/e-util/e-gui-utils.c
branches/kill-bonobo/e-util/e-gui-utils.h
branches/kill-bonobo/e-util/e-icon-factory.c
branches/kill-bonobo/e-util/e-icon-factory.h
branches/kill-bonobo/e-util/e-import.c
branches/kill-bonobo/e-util/e-popup.c
branches/kill-bonobo/e-util/e-util.c
branches/kill-bonobo/e-util/e-util.h
branches/kill-bonobo/help/ChangeLog
branches/kill-bonobo/help/es/es.po
branches/kill-bonobo/mail/ChangeLog
branches/kill-bonobo/mail/em-config.c
branches/kill-bonobo/mail/em-event.c
branches/kill-bonobo/mail/em-folder-browser.c
branches/kill-bonobo/mail/em-folder-utils.c
branches/kill-bonobo/mail/em-format-hook.c
branches/kill-bonobo/mail/em-format-html-display.c
branches/kill-bonobo/mail/em-format-html.c
branches/kill-bonobo/mail/em-junk-hook.c
branches/kill-bonobo/mail/em-menu.c
branches/kill-bonobo/mail/em-network-prefs.c
branches/kill-bonobo/mail/em-popup.c
branches/kill-bonobo/mail/mail-mt.c
branches/kill-bonobo/mail/mail-send-recv.c
branches/kill-bonobo/mail/message-list.c
branches/kill-bonobo/mail/message-tag-followup.c
branches/kill-bonobo/mail/searchtypes.xml
branches/kill-bonobo/plugins/attachment-reminder/ChangeLog
branches/kill-bonobo/plugins/attachment-reminder/Makefile.am
branches/kill-bonobo/plugins/audio-inline/ChangeLog
branches/kill-bonobo/plugins/audio-inline/Makefile.am
branches/kill-bonobo/plugins/audio-inline/audio-inline.c
branches/kill-bonobo/plugins/backup-restore/ChangeLog
branches/kill-bonobo/plugins/backup-restore/Makefile.am
branches/kill-bonobo/plugins/bbdb/ChangeLog
branches/kill-bonobo/plugins/bbdb/Makefile.am
branches/kill-bonobo/plugins/copy-tool/ChangeLog
branches/kill-bonobo/plugins/copy-tool/Makefile.am
branches/kill-bonobo/plugins/default-mailer/ChangeLog
branches/kill-bonobo/plugins/default-mailer/Makefile.am
branches/kill-bonobo/plugins/email-custom-header/ChangeLog
branches/kill-bonobo/plugins/email-custom-header/Makefile.am
branches/kill-bonobo/plugins/email-custom-header/email-custom-header.c
branches/kill-bonobo/plugins/exchange-operations/ChangeLog
branches/kill-bonobo/plugins/exchange-operations/exchange-send-options.c
branches/kill-bonobo/plugins/folder-unsubscribe/ChangeLog
branches/kill-bonobo/plugins/folder-unsubscribe/Makefile.am
branches/kill-bonobo/plugins/google-account-setup/ChangeLog
branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.c
branches/kill-bonobo/plugins/import-ics-attachments/ChangeLog
branches/kill-bonobo/plugins/import-ics-attachments/Makefile.am
branches/kill-bonobo/plugins/import-ics-attachments/icsimporter.c
branches/kill-bonobo/plugins/ipod-sync/ChangeLog
branches/kill-bonobo/plugins/ipod-sync/ipod-sync.c
branches/kill-bonobo/plugins/itip-formatter/ChangeLog
branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c
branches/kill-bonobo/plugins/itip-formatter/itip-view.c
branches/kill-bonobo/plugins/mail-notification/ChangeLog
branches/kill-bonobo/plugins/mail-notification/Makefile.am
branches/kill-bonobo/plugins/mail-notification/mail-notification.c
branches/kill-bonobo/plugins/mail-to-meeting/ChangeLog
branches/kill-bonobo/plugins/mail-to-meeting/Makefile.am
branches/kill-bonobo/plugins/mail-to-task/ChangeLog
branches/kill-bonobo/plugins/mail-to-task/Makefile.am
branches/kill-bonobo/plugins/mailing-list-actions/ChangeLog
branches/kill-bonobo/plugins/mailing-list-actions/Makefile.am
branches/kill-bonobo/plugins/mark-calendar-offline/ChangeLog
branches/kill-bonobo/plugins/mark-calendar-offline/Makefile.am
branches/kill-bonobo/plugins/prefer-plain/ChangeLog
branches/kill-bonobo/plugins/prefer-plain/Makefile.am
branches/kill-bonobo/plugins/save-calendar/ChangeLog
branches/kill-bonobo/plugins/save-calendar/Makefile.am
branches/kill-bonobo/plugins/select-one-source/ChangeLog
branches/kill-bonobo/plugins/select-one-source/Makefile.am
branches/kill-bonobo/plugins/startup-wizard/startup-wizard.c
branches/kill-bonobo/plugins/subject-thread/ChangeLog
branches/kill-bonobo/plugins/subject-thread/Makefile.am
branches/kill-bonobo/plugins/templates/ChangeLog
branches/kill-bonobo/plugins/templates/Makefile.am
branches/kill-bonobo/plugins/webdav-account-setup/Makefile.am
branches/kill-bonobo/po/ChangeLog
branches/kill-bonobo/po/es.po
branches/kill-bonobo/po/fi.po
branches/kill-bonobo/po/gl.po
branches/kill-bonobo/po/kn.po
branches/kill-bonobo/po/pt.po
branches/kill-bonobo/shell/e-shell-nm-glib.c
branches/kill-bonobo/widgets/misc/ChangeLog
branches/kill-bonobo/widgets/misc/e-activity-handler.c
branches/kill-bonobo/widgets/misc/e-activity-handler.h
branches/kill-bonobo/widgets/misc/e-combo-button.c
branches/kill-bonobo/widgets/misc/e-info-label.c
branches/kill-bonobo/widgets/misc/e-search-bar.c
branches/kill-bonobo/widgets/misc/e-send-options.c
branches/kill-bonobo/widgets/misc/e-task-widget.c
branches/kill-bonobo/widgets/misc/e-task-widget.h
branches/kill-bonobo/widgets/misc/e-url-entry.c
branches/kill-bonobo/widgets/misc/test-info-label.c
branches/kill-bonobo/widgets/table/ChangeLog
branches/kill-bonobo/widgets/table/e-tree-table-adapter.c
branches/kill-bonobo/widgets/table/e-tree-table-adapter.h
branches/kill-bonobo/widgets/table/e-tree.c
branches/kill-bonobo/widgets/table/e-tree.h
Modified: branches/kill-bonobo/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in (original)
+++ branches/kill-bonobo/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in Thu Aug 14 20:19:12 2008
@@ -102,7 +102,7 @@
<oaf_attribute name="evolution2:config_item:priority" type="string" value="-6"/>
<oaf_attribute name="name" type="string"
- _value="Evolution S/Mime Certificate Management Control"/>
+ _value="Evolution S/MIME Certificate Management Control"/>
</oaf_server>
Modified: branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.c Thu Aug 14 20:19:12 2008
@@ -122,7 +122,7 @@
{
char *text;
- text = g_strdup_printf (_("Migrating `%s':"), folder_name);
+ text = g_strdup_printf (_("Migrating '%s':"), folder_name);
gtk_label_set_text (GTK_LABEL (context->folder_label), text);
g_free (text);
Modified: branches/kill-bonobo/addressbook/gui/component/addressbook-view.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/addressbook-view.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/addressbook-view.c Thu Aug 14 20:19:12 2008
@@ -43,7 +43,6 @@
#include "misc/e-task-bar.h"
#include "misc/e-info-label.h"
-
#include "e-util/e-icon-factory.h"
#include "e-util/e-util-private.h"
#include "shell/e-user-creatable-items-handler.h"
@@ -66,10 +65,6 @@
#define PARENT_TYPE G_TYPE_OBJECT
static GObjectClass *parent_class = NULL;
-/* This is used for the addressbook status bar */
-#define EVOLUTION_CONTACTS_PROGRESS_IMAGE "contact-new"
-static GdkPixbuf *progress_icon = NULL;
-
#define d(x)
struct _AddressbookViewPrivate {
@@ -489,11 +484,8 @@
} else if (priv->activity_id == 0) {
char *clientid = g_strdup_printf ("%p", view);
- if (progress_icon == NULL)
- progress_icon = e_icon_factory_get_icon (EVOLUTION_CONTACTS_PROGRESS_IMAGE, E_ICON_SIZE_STATUS);
-
- priv->activity_id = e_activity_handler_operation_started (activity_handler, clientid,
- progress_icon, message, TRUE);
+ priv->activity_id = e_activity_handler_operation_started (
+ activity_handler, clientid, message, TRUE);
g_free (clientid);
} else {
Modified: branches/kill-bonobo/addressbook/gui/component/addressbook.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/addressbook.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/addressbook.c Thu Aug 14 20:19:12 2008
@@ -73,6 +73,9 @@
load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure)
{
LoadSourceData *data = closure;
+ gboolean was_in = g_object_get_data (G_OBJECT (book), "authenticated") != NULL;
+
+ g_object_set_data (G_OBJECT (book), "authenticated", NULL);
if (data->cancelled) {
free_load_source_data (data);
@@ -99,38 +102,42 @@
"%s", _("Accessing LDAP Server anonymously"));
g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
- if (data->cb)
- data->cb (book, E_BOOK_ERROR_OK, data->closure);
- free_load_source_data (data);
- return;
+ status = E_BOOK_ERROR_OK;
+
+ goto done;
}
} else if (status == E_BOOK_ERROR_INVALID_SERVER_VERSION) {
e_error_run (NULL, "addressbook:server-version", NULL);
status = E_BOOK_ERROR_OK;
- if (data->cb)
- data->cb (book, status, data->closure);
- free_load_source_data (data);
- return;
-
+ goto done;
+ } else if (status == E_BOOK_ERROR_UNSUPPORTED_AUTHENTICATION_METHOD) {
+ goto done;
} else {
- const gchar *uri = e_book_get_uri (book);
- gchar *stripped_uri = remove_parameters_from_uri (uri);
- const gchar *auth_domain = e_source_get_property (data->source, "auth-domain");
- const gchar *component_name;
+ if (status == E_BOOK_ERROR_AUTHENTICATION_FAILED) {
+ const gchar *uri = e_book_get_uri (book);
+ gchar *stripped_uri = remove_parameters_from_uri (uri);
+ const gchar *auth_domain = e_source_get_property (data->source, "auth-domain");
+ const gchar *component_name;
- component_name = auth_domain ? auth_domain : "Addressbook";
+ component_name = auth_domain ? auth_domain : "Addressbook";
- if (status == E_BOOK_ERROR_AUTHENTICATION_FAILED) {
e_passwords_forget_password (component_name, stripped_uri);
+
+ g_free (stripped_uri);
+ } else if (was_in) {
+ /* We already tried to authenticate to the server, and it failed with
+ other reason than with E_BOOK_ERROR_AUTHENTICATION_FAILED, thus stop
+ poking with the server and report error to the user. */
+ goto done;
}
+ g_object_set_data (G_OBJECT (book), "authenticated", GINT_TO_POINTER (1));
addressbook_authenticate (book, TRUE, data->source, load_source_auth_cb, closure);
-
- g_free (stripped_uri);
return;
}
}
+done:
if (data->cb)
data->cb (book, status, data->closure);
Modified: branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-address.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-address.c (original)
+++ branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-address.c Thu Aug 14 20:19:12 2008
@@ -22,7 +22,6 @@
#include <config.h>
#include <e-contact-editor-address.h>
-#include <e-util/e-icon-factory.h>
#include <e-util/e-util-private.h>
#include <glib/gi18n.h>
@@ -417,7 +416,6 @@
{
GladeXML *gui;
GtkWidget *widget;
- GList *icon_list;
char *gladefile;
gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_address),
@@ -450,12 +448,8 @@
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0);
g_object_unref(widget);
- icon_list = e_icon_factory_get_icon_list ("contact-new");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_address), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (
+ GTK_WINDOW (e_contact_editor_address), "contact-new");
}
static void
Modified: branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-fullname.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-fullname.c (original)
+++ branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-fullname.c Thu Aug 14 20:19:12 2008
@@ -21,7 +21,6 @@
#include <config.h>
#include "e-contact-editor-fullname.h"
-#include <e-util/e-icon-factory.h>
#include <e-util/e-util-private.h>
#include <libgnome/gnome-util.h>
#include <glib/gi18n.h>
@@ -100,7 +99,6 @@
{
GladeXML *gui;
GtkWidget *widget;
- GList *icon_list;
char *gladefile;
gtk_widget_realize (GTK_WIDGET (e_contact_editor_fullname));
@@ -136,12 +134,8 @@
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0);
g_object_unref(widget);
- icon_list = e_icon_factory_get_icon_list ("contact-new");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_fullname), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (
+ GTK_WINDOW (e_contact_editor_fullname), "contact-new");
}
static void
Modified: branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-im.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-im.c (original)
+++ branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor-im.c Thu Aug 14 20:19:12 2008
@@ -24,7 +24,6 @@
#include <libgnome/gnome-util.h>
#include <glib/gi18n.h>
#include <string.h>
-#include <e-util/e-icon-factory.h>
#include <e-util/e-util-private.h>
static void e_contact_editor_im_init (EContactEditorIm *card);
@@ -189,7 +188,8 @@
gtk_container_add(GTK_CONTAINER(item), hbox);
gtk_widget_show(hbox);
- image = e_icon_factory_get_image (im_images[i], E_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name (
+ im_images[i], GTK_ICON_SIZE_MENU);
gtk_size_group_add_widget(sg, image);
@@ -240,7 +240,6 @@
{
GladeXML *gui;
GtkWidget *widget;
- GList *icon_list;
char *gladefile;
gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_im),
@@ -279,13 +278,8 @@
gtk_widget_grab_focus(glade_xml_get_widget(gui, "entry-username"));
- /* set the icon */
- icon_list = e_icon_factory_get_icon_list ("contact-new");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (e_contact_editor_im), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (
+ GTK_WINDOW (e_contact_editor_im), "contact-new");
}
static void
Modified: branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor.c (original)
+++ branches/kill-bonobo/addressbook/gui/contact-editor/e-contact-editor.c Thu Aug 14 20:19:12 2008
@@ -28,10 +28,7 @@
#include <time.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
-#include <libgnomeui/gnome-window-icon.h>
-#include <libgnome/gnome-util.h>
#include <glib/gi18n.h>
-#include <libgnome/gnome-help.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libedataserverui/e-categories-dialog.h>
@@ -45,6 +42,7 @@
#include "addressbook/gui/component/addressbook.h"
#include "addressbook/printing/e-contact-print.h"
#include "addressbook/gui/widgets/eab-gui-util.h"
+#include "e-util/e-util.h"
#include "e-util/e-gui-utils.h"
#include "e-util/e-error.h"
#include "misc/e-dateedit.h"
@@ -3210,14 +3208,8 @@
static void
show_help_cb (GtkWidget *widget, gpointer data)
{
- GError *error = NULL;
-
- gnome_help_display (
- "evolution.xml", "usage-contact-cards", &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ /* FIXME Pass a proper parent window. */
+ e_display_help (NULL, "usage-contact-cards");
}
static GList *
@@ -3314,7 +3306,6 @@
{
GladeXML *gui;
GtkWidget *widget, *label;
- char *icon_path;
char *gladefile;
e_contact_editor->name = e_contact_name_new();
Modified: branches/kill-bonobo/addressbook/gui/widgets/e-addressbook-view.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/widgets/e-addressbook-view.c (original)
+++ branches/kill-bonobo/addressbook/gui/widgets/e-addressbook-view.c Thu Aug 14 20:19:12 2008
@@ -31,7 +31,6 @@
#include <filter/rule-editor.h>
#include <widgets/menus/gal-view-etable.h>
#include <e-util/e-xml-utils.h>
-#include <e-util/e-icon-factory.h>
#include <libgnomeui/gnome-dialog-util.h>
#include "addressbook/printing/e-contact-print.h"
@@ -1476,8 +1475,16 @@
char *str = NULL;
str = e_str_without_underscores (subitems[i].search.text);
menu_item = gtk_image_menu_item_new_with_label (str);
-/* if (subitems[i].image)
- gtk_image_menu_item_set_image (menu_item, e_icon_factory_get_image (subitems[i].image, E_ICON_SIZE_MENU)); */
+ if (subitems[i].image) {
+ GtkWidget *image;
+
+ image = gtk_image_new_from_icon_name (
+ subitems[i].image,
+ GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (
+ GTK_IMAGE_MENU_ITEM (menu_item),
+ image);
+ }
g_free (str);
} else {
menu_item = gtk_menu_item_new ();
Modified: branches/kill-bonobo/addressbook/gui/widgets/eab-gui-util.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/widgets/eab-gui-util.c (original)
+++ branches/kill-bonobo/addressbook/gui/widgets/eab-gui-util.c Thu Aug 14 20:19:12 2008
@@ -75,7 +75,8 @@
/* E_BOOK_ERROR_NO_SUCH_SOURCE */ N_("No such source"),
/* E_BOOK_ERROR_OFFLINE_UNAVAILABLE */ N_("Not available in offline mode"),
/* E_BOOK_ERROR_OTHER_ERROR */ N_("Other error"),
- /* E_BOOK_ERROR_INVALID_SERVER_VERSION */ N_("Invalid server version")
+ /* E_BOOK_ERROR_INVALID_SERVER_VERSION */ N_("Invalid server version"),
+ /* E_BOOK_ERROR_UNSUPPORTED_AUTHENTICATION_METHOD */ N_("Unsupported authentication method")
};
void
@@ -131,6 +132,12 @@
_("We were unable to open this addressbook. This either "
"means you have entered an incorrect URI, or the server "
"is unreachable.");
+
+ /* do not show repository offline message, it's kind of generic error */
+ if (status != E_BOOK_ERROR_REPOSITORY_OFFLINE && status > 0 && status < G_N_ELEMENTS (status_to_string) && status_to_string [status]) {
+ label = g_strconcat (label_string, "\n\n", _("Detailed error:"), " ", _(status_to_string [status]), NULL);
+ label_string = label;
+ }
}
dialog = e_error_new ((GtkWindow *) parent, "addressbook:load-error", label_string, NULL);
Modified: branches/kill-bonobo/calendar/gui/alarm-notify/alarm-notify-dialog.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/alarm-notify/alarm-notify-dialog.c (original)
+++ branches/kill-bonobo/calendar/gui/alarm-notify/alarm-notify-dialog.c Thu Aug 14 20:19:12 2008
@@ -32,7 +32,6 @@
#include "alarm-notify-dialog.h"
#include "config-data.h"
#include "util.h"
-#include "e-util/e-icon-factory.h"
#include "e-util/e-util-private.h"
@@ -212,8 +211,6 @@
GtkWidget *edit_btn;
GtkWidget *snooze_btn;
GtkWidget *image;
- char *icon_path;
- GList *icon_list;
GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
AlarmNotificationsDialog *na = NULL;
AlarmNotify *an = g_new0 (AlarmNotify, 1);
@@ -286,10 +283,9 @@
gtk_widget_realize (an->dialog);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->action_area), 12);
- image = glade_xml_get_widget (an->xml, "alarm-image");
- icon_path = e_icon_factory_get_icon_filename ("stock_alarm", E_ICON_SIZE_DIALOG);
- gtk_image_set_from_file (GTK_IMAGE (image), icon_path);
- g_free (icon_path);
+ image = glade_xml_get_widget (an->xml, "alarm-image");
+ gtk_image_set_from_icon_name (
+ GTK_IMAGE (image), "stock_alarm", GTK_ICON_SIZE_DIALOG);
g_signal_connect (edit_btn, "clicked", G_CALLBACK (edit_pressed_cb), an);
g_signal_connect (snooze_btn, "clicked", G_CALLBACK (snooze_pressed_cb), an);
@@ -298,12 +294,8 @@
if (!GTK_WIDGET_REALIZED (an->dialog))
gtk_widget_realize (an->dialog);
- icon_list = e_icon_factory_get_icon_list ("stock_alarm");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (an->dialog), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+
+ gtk_window_set_icon_name (GTK_WINDOW (an->dialog), "stock_alarm");
/* Set callback for updating the snooze "minutes" label */
g_signal_connect (G_OBJECT (an->snooze_time_min), "value_changed",
Modified: branches/kill-bonobo/calendar/gui/alarm-notify/alarm-queue.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/alarm-notify/alarm-queue.c (original)
+++ branches/kill-bonobo/calendar/gui/alarm-notify/alarm-queue.c Thu Aug 14 20:19:12 2008
@@ -35,7 +35,6 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomeui/gnome-uidefs.h>
-#include <e-util/e-icon-factory.h>
#include <libecal/e-cal-time-util.h>
#include <libecal/e-cal-component.h>
@@ -1384,19 +1383,18 @@
tray_icon_blink_cb (gpointer data)
{
static gboolean tray_blink_state = FALSE;
- GdkPixbuf *pixbuf;
+ const gchar *icon_name;
tray_blink_countdown--;
tray_blink_state = !tray_blink_state;
- pixbuf = e_icon_factory_get_icon ((tray_blink_state || tray_blink_countdown <= 0)?
- "stock_appointment-reminder-excl" :
- "stock_appointment-reminder",
- E_ICON_SIZE_LARGE_TOOLBAR);
+ if (tray_blink_state || tray_blink_countdown <= 0)
+ icon_name = "stock_appointment-reminder-excl";
+ else
+ icon_name = "stock_appointment-reminder";
if (tray_icon)
- gtk_status_icon_set_from_pixbuf (tray_icon, pixbuf);
- g_object_unref (pixbuf);
+ gtk_status_icon_set_from_icon_name (tray_icon, icon_name);
if (tray_blink_countdown <= 0)
tray_blink_id = -1;
@@ -1480,7 +1478,8 @@
/* create the tray icon */
if (tray_icon == NULL) {
tray_icon = gtk_status_icon_new ();
- gtk_status_icon_set_from_pixbuf (tray_icon, e_icon_factory_get_icon ("stock_appointment-reminder", E_ICON_SIZE_LARGE_TOOLBAR));
+ gtk_status_icon_set_from_icon_name (
+ tray_icon, "stock_appointment-reminder");
g_signal_connect (G_OBJECT (tray_icon), "activate",
G_CALLBACK (icon_activated), NULL);
g_signal_connect (G_OBJECT (tray_icon), "popup-menu",
Modified: branches/kill-bonobo/calendar/gui/cal-search-bar.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/cal-search-bar.c (original)
+++ branches/kill-bonobo/calendar/gui/cal-search-bar.c Thu Aug 14 20:19:12 2008
@@ -28,7 +28,6 @@
#include <glib/gi18n.h>
#include <libedataserver/e-categories.h>
#include <libecal/e-cal-time-util.h>
-#include <e-util/e-icon-factory.h>
#include <libedataserver/e-categories.h>
#include <filter/rule-editor.h>
@@ -546,8 +545,16 @@
char *str = NULL;
str = e_str_without_underscores (subitems[i].search.text);
menu_item = gtk_image_menu_item_new_with_label (str);
-/* if (subitems[i].image)
- gtk_image_menu_item_set_image (menu_item, e_icon_factory_get_image (subitems[i].image, E_ICON_SIZE_MENU));*/
+ if (subitems[i].image) {
+ GtkWidget *image;
+
+ image = gtk_image_new_from_icon_name (
+ subitems[i].image,
+ GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (
+ GTK_IMAGE_MENU_ITEM (menu_item),
+ image);
+ }
g_free (str);
} else {
menu_item = gtk_menu_item_new ();
Modified: branches/kill-bonobo/calendar/gui/calendar-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/calendar-component.c (original)
+++ branches/kill-bonobo/calendar/gui/calendar-component.c Thu Aug 14 20:19:12 2008
@@ -54,7 +54,6 @@
#include "dialogs/event-editor.h"
#include "misc/e-info-label.h"
#include "e-util/e-error.h"
-#include "e-util/e-icon-factory.h"
#include "e-cal-menu.h"
#include "e-cal-popup.h"
Modified: branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/alarm-dialog.c Thu Aug 14 20:19:12 2008
@@ -37,7 +37,6 @@
#include <libecal/e-cal-util.h>
#include <libecal/e-cal-time-util.h>
#include "e-util/e-dialog-widgets.h"
-#include "e-util/e-icon-factory.h"
#include "e-util/e-util-private.h"
#include <libebook/e-destination.h>
#include <libedataserverui/e-name-selector.h>
@@ -1142,7 +1141,6 @@
{
Dialog dialog;
int response_id;
- GList *icon_list;
char *gladefile;
g_return_val_if_fail (alarm != NULL, FALSE);
@@ -1178,12 +1176,8 @@
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->action_area), 12);
- icon_list = e_icon_factory_get_icon_list ("x-office-calendar");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (dialog.toplevel), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (
+ GTK_WINDOW (dialog.toplevel), "x-office-calendar");
gtk_window_set_transient_for (GTK_WINDOW (dialog.toplevel),
GTK_WINDOW (parent));
Modified: branches/kill-bonobo/calendar/gui/dialogs/alarm-list-dialog.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/alarm-list-dialog.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/alarm-list-dialog.c Thu Aug 14 20:19:12 2008
@@ -37,7 +37,6 @@
#include <libecal/e-cal-util.h>
#include <libecal/e-cal-time-util.h>
#include "e-util/e-dialog-widgets.h"
-#include "e-util/e-icon-factory.h"
#include "e-util/e-util-private.h"
#include "alarm-dialog.h"
#include "alarm-list-dialog.h"
@@ -263,7 +262,6 @@
{
Dialog dialog;
int response_id;
- GList *icon_list;
char *gladefile;
dialog.ecal = ecal;
@@ -293,12 +291,8 @@
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->action_area), 12);
- icon_list = e_icon_factory_get_icon_list ("x-office-calendar");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (dialog.toplevel), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (
+ GTK_WINDOW (dialog.toplevel), "x-office-calendar");
gtk_window_set_transient_for (GTK_WINDOW (dialog.toplevel),
GTK_WINDOW (parent));
Modified: branches/kill-bonobo/calendar/gui/dialogs/cal-attachment-select-file.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/cal-attachment-select-file.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/cal-attachment-select-file.c Thu Aug 14 20:19:12 2008
@@ -36,7 +36,6 @@
#include <glib/gi18n.h>
#include "cal-attachment-select-file.h"
-#include <e-util/e-icon-factory.h>
enum {
SELECTOR_MODE_MULTI = (1 << 0),
@@ -49,7 +48,6 @@
GtkWidget *selection;
GtkWidget *showinline = NULL;
char *path;
- GList *icon_list;
path = g_object_get_data ((GObject *) editor, "attach_path");
@@ -90,12 +88,7 @@
gtk_window_set_wmclass ((GtkWindow *) selection, "fileselection", "Evolution:editor");
gtk_window_set_modal ((GtkWindow *) selection, TRUE);
- icon_list = e_icon_factory_get_icon_list ("mail-message-new");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (selection), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (GTK_WINDOW (selection), "mail-message-new");
if (gtk_dialog_run ((GtkDialog *) selection) == GTK_RESPONSE_OK) {
if (showinline_p)
Modified: branches/kill-bonobo/calendar/gui/dialogs/cancel-comp.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/cancel-comp.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/cancel-comp.c Thu Aug 14 20:19:12 2008
@@ -25,7 +25,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libgnomeui/gnome-uidefs.h>
-#include <e-util/e-icon-factory.h>
#include "e-util/e-error.h"
#include "cancel-comp.h"
Modified: branches/kill-bonobo/calendar/gui/dialogs/changed-comp.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/changed-comp.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/changed-comp.c Thu Aug 14 20:19:12 2008
@@ -24,7 +24,6 @@
#include <glib/gi18n.h>
#include <libgnomeui/gnome-uidefs.h>
-#include <e-util/e-icon-factory.h>
#include "changed-comp.h"
@@ -48,7 +47,6 @@
ECalComponentVType vtype;
char *str;
gint response;
- GList *icon_list;
vtype = e_cal_component_get_vtype (comp);
@@ -105,12 +103,7 @@
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO, "%s", str);
- icon_list = e_icon_factory_get_icon_list ("x-office-calendar");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), "x-office-calendar");
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
Modified: branches/kill-bonobo/calendar/gui/dialogs/comp-editor.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/comp-editor.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/comp-editor.c Thu Aug 14 20:19:12 2008
@@ -31,6 +31,7 @@
#include <glib/gstdio.h>
#include <gdk/gdkkeysyms.h>
#include <libgnome/libgnome.h>
+#include <e-util/e-util.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
#include <e-util/gconf-bridge.h>
@@ -2255,16 +2256,11 @@
comp_editor_show_help (CompEditor *editor)
{
CompEditorClass *class;
- GError *error = NULL;
class = COMP_EDITOR_GET_CLASS (editor);
g_return_if_fail (class->help_section != NULL);
- gnome_help_display ("evolution.xml", class->help_section, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ e_display_help (GTK_WINDOW (editor), class->help_section);
}
Modified: branches/kill-bonobo/calendar/gui/dialogs/delete-comp.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/delete-comp.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/delete-comp.c Thu Aug 14 20:19:12 2008
@@ -23,7 +23,6 @@
#endif
#include <glib/gi18n.h>
-#include <e-util/e-icon-factory.h>
#include "e-util/e-error.h"
#include "../calendar-config.h"
#include "delete-comp.h"
Modified: branches/kill-bonobo/calendar/gui/dialogs/delete-error.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/delete-error.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/delete-error.c Thu Aug 14 20:19:12 2008
@@ -25,7 +25,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libgnomeui/gnome-uidefs.h>
-#include <e-util/e-icon-factory.h>
#include "delete-error.h"
@@ -39,9 +38,9 @@
void
delete_error_dialog (GError *error, ECalComponentVType vtype)
{
- GList *icon_list = NULL;
GtkWidget *dialog;
const char *str;
+ const gchar *icon_name = NULL;
if (!error)
return;
@@ -106,15 +105,12 @@
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK, "%s", str);
if (vtype == E_CAL_COMPONENT_EVENT)
- icon_list = e_icon_factory_get_icon_list ("x-office-calendar");
+ icon_name = "x-office-calendar";
else if (vtype == E_CAL_COMPONENT_TODO)
- icon_list = e_icon_factory_get_icon_list ("stock_todo");
+ icon_name = "stock_todo";
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ if (icon_name)
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), icon_name);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
Modified: branches/kill-bonobo/calendar/gui/dialogs/event-editor.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-editor.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-editor.c Thu Aug 14 20:19:12 2008
@@ -32,7 +32,6 @@
#include <glib/gi18n.h>
#include <misc/e-dateedit.h>
-#include <e-util/e-icon-factory.h>
#include <e-util/e-plugin-ui.h>
#include <e-util/e-util-private.h>
#include <evolution-shell-component-utils.h>
Modified: branches/kill-bonobo/calendar/gui/dialogs/event-page.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-page.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-page.c Thu Aug 14 20:19:12 2008
@@ -42,7 +42,6 @@
#include "../e-timezone-entry.h"
#include <e-util/e-dialog-utils.h>
#include <e-util/e-dialog-widgets.h>
-#include <e-util/e-icon-factory.h>
#include <e-util/e-util-private.h>
#include "../e-meeting-attendee.h"
@@ -688,7 +687,7 @@
GtkWidget *image, *box;
box = gtk_event_box_new ();
- image = e_icon_factory_get_image (image_text, E_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name (image_text, GTK_ICON_SIZE_MENU);
gtk_container_add ((GtkContainer *) box, image);
gtk_widget_show_all (box);
@@ -2544,8 +2543,8 @@
return;
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (epage));
- client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT);
source = e_source_combo_box_get_active (source_combo_box);
+ client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT);
if (client) {
icaltimezone *zone;
Modified: branches/kill-bonobo/calendar/gui/dialogs/event-page.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/event-page.glade (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/event-page.glade Thu Aug 14 20:19:12 2008
@@ -159,7 +159,7 @@
<child>
<widget class="GtkLabel" id="description-label">
<property name="visible">True</property>
- <property name="label" translatable="yes">D_escription:</property>
+ <property name="label" translatable="yes">_Description:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
Modified: branches/kill-bonobo/calendar/gui/dialogs/memo-page.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/memo-page.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/memo-page.c Thu Aug 14 20:19:12 2008
@@ -826,8 +826,8 @@
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (mpage));
flags = comp_editor_get_flags (editor);
- client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_JOURNAL);
source = e_source_combo_box_get_active (source_combo_box);
+ client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_JOURNAL);
if (!client || !e_cal_open (client, FALSE, NULL)) {
GtkWidget *dialog;
Modified: branches/kill-bonobo/calendar/gui/dialogs/memo-page.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/memo-page.glade (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/memo-page.glade Thu Aug 14 20:19:12 2008
@@ -159,6 +159,7 @@
<widget class="GtkLabel" id="label18">
<property name="visible">True</property>
<property name="label" translatable="yes">_Description:</property>
+ <property name="mnemonic_widget">memo_content</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
Modified: branches/kill-bonobo/calendar/gui/dialogs/select-source-dialog.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/select-source-dialog.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/select-source-dialog.c Thu Aug 14 20:19:12 2008
@@ -23,7 +23,6 @@
#endif
#include <glib/gi18n.h>
-#include <e-util/e-icon-factory.h>
#include <libedataserverui/e-source-selector-dialog.h>
#include "select-source-dialog.h"
@@ -40,7 +39,7 @@
ESource *selected_source = NULL;
const char *gconf_key;
GConfClient *conf_client;
- GList *icon_list = NULL;
+ const gchar *icon_name = NULL;
if (obj_type == E_CAL_SOURCE_TYPE_EVENT)
gconf_key = "/apps/evolution/calendar/sources";
@@ -58,17 +57,14 @@
dialog = e_source_selector_dialog_new (parent, source_list);
if (obj_type == E_CAL_SOURCE_TYPE_EVENT)
- icon_list = e_icon_factory_get_icon_list ("x-office-calendar");
+ icon_name = "x-office-calendar";
else if (obj_type == E_CAL_SOURCE_TYPE_TODO)
- icon_list = e_icon_factory_get_icon_list ("stock_todo");
+ icon_name = "stock_todo";
else if (obj_type == E_CAL_SOURCE_TYPE_JOURNAL)
- icon_list = e_icon_factory_get_icon_list ("stock_journal");
+ icon_name = "stock_journal";
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ if (icon_name)
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), icon_name);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
selected_source = e_source_selector_dialog_peek_primary_selection (E_SOURCE_SELECTOR_DIALOG (dialog));
Modified: branches/kill-bonobo/calendar/gui/dialogs/task-editor.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/task-editor.c (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/task-editor.c Thu Aug 14 20:19:12 2008
@@ -31,7 +31,6 @@
#include <glade/glade.h>
#include <glib/gi18n.h>
-#include <e-util/e-icon-factory.h>
#include <e-util/e-plugin-ui.h>
#include <e-util/e-util-private.h>
#include <evolution-shell-component-utils.h>
Modified: branches/kill-bonobo/calendar/gui/dialogs/task-page.glade
==============================================================================
--- branches/kill-bonobo/calendar/gui/dialogs/task-page.glade (original)
+++ branches/kill-bonobo/calendar/gui/dialogs/task-page.glade Thu Aug 14 20:19:12 2008
@@ -169,7 +169,7 @@
<child>
<widget class="GtkLabel" id="due-date-label">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Due date:</property>
+ <property name="label" translatable="yes">D_ue date:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
@@ -274,7 +274,7 @@
<child>
<widget class="GtkLabel" id="label18">
<property name="visible">True</property>
- <property name="label" translatable="yes">De_scription:</property>
+ <property name="label" translatable="yes">_Description:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
Modified: branches/kill-bonobo/calendar/gui/e-cal-list-view-config.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-list-view-config.c (original)
+++ branches/kill-bonobo/calendar/gui/e-cal-list-view-config.c Thu Aug 14 20:19:12 2008
@@ -145,26 +145,6 @@
}
static void
-set_timezone (ECalListView *list_view)
-{
- icaltimezone *zone;
-
- zone = calendar_config_get_icaltimezone ();
- e_calendar_view_set_timezone (E_CALENDAR_VIEW (list_view), zone);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- ECalListViewConfig *view_config = data;
- ECalListViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_timezone (priv->view);
-}
-
-static void
set_twentyfour_hour (ECalListView *list_view)
{
gboolean use_24_hour;
@@ -214,12 +194,6 @@
priv->view = g_object_ref (list_view);
- /* Time zone */
- set_timezone (list_view);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
/* 24 Hour format */
set_twentyfour_hour (list_view);
Modified: branches/kill-bonobo/calendar/gui/e-cal-list-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-list-view.c (original)
+++ branches/kill-bonobo/calendar/gui/e-cal-list-view.c Thu Aug 14 20:19:12 2008
@@ -314,13 +314,9 @@
* Creates a new #ECalListView.
**/
GtkWidget *
-e_cal_list_view_new (void)
+e_cal_list_view_new (ECalModel *model)
{
ECalListView *cal_list_view;
- ECalModel *model;
-
- model = E_CAL_MODEL (e_cal_model_calendar_new ());
- e_cal_model_set_flags (model, E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
cal_list_view = g_object_new (e_cal_list_view_get_type (), "model", model, NULL);
if (!e_cal_list_view_construct (cal_list_view)) {
Modified: branches/kill-bonobo/calendar/gui/e-cal-list-view.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-list-view.h (original)
+++ branches/kill-bonobo/calendar/gui/e-cal-list-view.h Thu Aug 14 20:19:12 2008
@@ -75,7 +75,7 @@
GType e_cal_list_view_get_type (void);
GtkWidget *e_cal_list_view_construct (ECalListView *cal_list_view);
-GtkWidget *e_cal_list_view_new (void);
+GtkWidget *e_cal_list_view_new (ECalModel *cal_model);
void e_cal_list_view_load_state (ECalListView *cal_list_view, gchar *filename);
void e_cal_list_view_save_state (ECalListView *cal_list_view, gchar *filename);
Modified: branches/kill-bonobo/calendar/gui/e-cal-model.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-model.c (original)
+++ branches/kill-bonobo/calendar/gui/e-cal-model.c Thu Aug 14 20:19:12 2008
@@ -75,6 +75,10 @@
gboolean use_24_hour_format;
};
+#define E_CAL_MODEL_COMPONENT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_MODEL_COMPONENT, ECalModelComponentPrivate))
+
static void e_cal_model_dispose (GObject *object);
static void e_cal_model_finalize (GObject *object);
@@ -1111,7 +1115,6 @@
e_cal_model_set_timezone (ECalModel *model, icaltimezone *zone)
{
ECalModelPrivate *priv;
- GList *l;
g_return_if_fail (E_IS_CAL_MODEL (model));
@@ -1120,9 +1123,6 @@
e_table_model_pre_change (E_TABLE_MODEL (model));
priv->zone = zone;
- for (l = priv->clients; l; l = l->next)
- e_cal_set_default_timezone (((ECalModelClient *)l->data)->client, priv->zone, NULL);
-
/* the timezone affects the times shown for date fields,
so we need to redisplay everything */
e_table_model_changed (E_TABLE_MODEL (model));
@@ -1364,13 +1364,11 @@
e_cal_component_set_dtend (comp, &to_set);
e_cal_component_free_datetime (&datetime);
- comp_data = g_new0 (ECalModelComponent, 1);
+ comp_data = g_object_new (E_TYPE_CAL_MODEL_COMPONENT, NULL);
comp_data->client = g_object_ref (rdata->client);
comp_data->icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (comp));
comp_data->instance_start = instance_start;
comp_data->instance_end = instance_end;
- comp_data->dtstart = comp_data->dtend = comp_data->due = comp_data->completed = NULL;
- comp_data->color = NULL;
g_ptr_array_add (priv->objects, comp_data);
e_table_model_row_inserted (E_TABLE_MODEL (rdata->model), priv->objects->len - 1);
@@ -1456,12 +1454,10 @@
} else {
e_table_model_pre_change (E_TABLE_MODEL (model));
- comp_data = g_new0 (ECalModelComponent, 1);
+ comp_data = g_object_new (E_TYPE_CAL_MODEL_COMPONENT, NULL);
comp_data->client = g_object_ref (e_cal_view_get_client (query));
comp_data->icalcomp = icalcomponent_new_clone (l->data);
e_cal_model_set_instance_times (comp_data, priv->zone);
- comp_data->dtstart = comp_data->dtend = comp_data->due = comp_data->completed = NULL;
- comp_data->color = NULL;
g_ptr_array_add (priv->objects, comp_data);
e_table_model_row_inserted (E_TABLE_MODEL (model), priv->objects->len - 1);
@@ -1537,6 +1533,8 @@
update_e_cal_view_for_client (ECalModel *model, ECalModelClient *client_data)
{
ECalModelPrivate *priv;
+ GError *error = NULL;
+ gint tries = 0;
priv = model->priv;
@@ -1559,7 +1557,16 @@
if (!client_data->do_query)
return;
- if (!e_cal_get_query (client_data->client, priv->full_sexp, &client_data->query, NULL)) {
+try_again:
+ if (!e_cal_get_query (client_data->client, priv->full_sexp, &client_data->query, &error)) {
+ if (error->code == E_CALENDAR_STATUS_BUSY && tries != 3) {
+ tries++;
+ /*TODO chose an optimal value */
+ g_usleep (50);
+ g_clear_error (&error);
+ goto try_again;
+ }
+
g_warning (G_STRLOC ": Unable to get query");
return;
@@ -1597,7 +1604,6 @@
if (status != E_CALENDAR_STATUS_OK) {
e_cal_model_remove_client (model, client);
-
return;
}
@@ -1619,6 +1625,11 @@
priv = model->priv;
+ /* DEBUG the load state should always be loaded here
+ if (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED) {
+ g_assert_not_reached ();
+ } */
+
/* Look to see if we already have this client */
client_data = find_client_data (model, client);
if (client_data) {
@@ -2075,6 +2086,7 @@
return g_strdup (buffer);
}
+/* FIXME is it still needed ?
static ECellDateEditValue *
copy_ecdv (ECellDateEditValue *ecdv)
{
@@ -2085,47 +2097,34 @@
new_ecdv->zone = ecdv ? ecdv->zone : NULL;
return new_ecdv;
-}
+} */
-/**
- * e_cal_model_copy_component_data
- */
-ECalModelComponent *
-e_cal_model_copy_component_data (ECalModelComponent *comp_data)
-{
- ECalModelComponent *new_data;
- g_return_val_if_fail (comp_data != NULL, NULL);
+struct _ECalModelComponentPrivate {
+};
+
+static void e_cal_model_component_finalize (GObject *object);
- new_data = g_new0 (ECalModelComponent, 1);
+static GObjectClass *parent_class;
- new_data->instance_start = comp_data->instance_start;
- new_data->instance_end = comp_data->instance_end;
- if (comp_data->icalcomp)
- new_data->icalcomp = icalcomponent_new_clone (comp_data->icalcomp);
- if (comp_data->client)
- new_data->client = g_object_ref (comp_data->client);
- if (comp_data->dtstart)
- new_data->dtstart = copy_ecdv (comp_data->dtstart);
- if (comp_data->dtend)
- new_data->dtend = copy_ecdv (comp_data->dtend);
- if (comp_data->due)
- new_data->due = copy_ecdv (comp_data->due);
- if (comp_data->completed)
- new_data->completed = copy_ecdv (comp_data->completed);
- if (comp_data->color)
- new_data->color = g_strdup (comp_data->color);
+/* Class initialization function for the calendar component object */
+static void
+e_cal_model_component_class_init (ECalModelComponentClass *klass)
+{
+ GObjectClass *object_class;
- return new_data;
+ object_class = (GObjectClass *) klass;
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ object_class->finalize = e_cal_model_component_finalize;
}
-/**
- * e_cal_model_free_component_data
- */
-void
-e_cal_model_free_component_data (ECalModelComponent *comp_data)
+
+static void
+e_cal_model_component_finalize (GObject *object)
{
- g_return_if_fail (comp_data != NULL);
+ ECalModelComponent *comp_data = E_CAL_MODEL_COMPONENT(object);
if (comp_data->client) {
g_object_unref (comp_data->client);
@@ -2155,8 +2154,64 @@
g_free (comp_data->color);
comp_data->color = NULL;
}
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+/* Object initialization function for the calendar component object */
+static void
+e_cal_model_component_init (ECalModelComponent *comp)
+{
+ comp->dtstart = NULL;
+ comp->dtend = NULL;
+ comp->due = NULL;
+ comp->completed = NULL;
+ comp->color = NULL;
+}
+
+GType
+e_cal_model_component_get_type (void)
+{
+ static GType e_cal_model_component_type = 0;
+
+ if (!e_cal_model_component_type) {
+ static GTypeInfo info = {
+ sizeof (ECalModelComponentClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) e_cal_model_component_class_init,
+ NULL, NULL,
+ sizeof (ECalModelComponent),
+ 0,
+ (GInstanceInitFunc) e_cal_model_component_init
+ };
+ e_cal_model_component_type = g_type_register_static (G_TYPE_OBJECT, "ECalModelComponent", &info, 0);
+ }
+
+ return e_cal_model_component_type;
+}
+
+/**
+ * e_cal_model_copy_component_data
+ */
+ECalModelComponent *
+e_cal_model_copy_component_data (ECalModelComponent *comp_data)
+{
+ g_return_val_if_fail (comp_data != NULL, NULL);
+
+ return g_object_ref (comp_data);
+}
- g_free (comp_data);
+/**
+ * e_cal_model_free_component_data
+ */
+void
+e_cal_model_free_component_data (ECalModelComponent *comp_data)
+{
+ g_return_if_fail (comp_data != NULL);
+
+ g_object_unref (comp_data);
}
/**
Modified: branches/kill-bonobo/calendar/gui/e-cal-model.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-model.h (original)
+++ branches/kill-bonobo/calendar/gui/e-cal-model.h Thu Aug 14 20:19:12 2008
@@ -57,19 +57,39 @@
E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES = 0x01
} ECalModelFlags;
-typedef struct {
+#define E_TYPE_CAL_MODEL_COMPONENT (e_cal_model_component_get_type ())
+#define E_CAL_MODEL_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_MODEL_COMPONENT, ECalModelComponent))
+#define E_CAL_MODEL_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_MODEL_COMPONENT, \
+ ECalComponentClass))
+#define E_IS_CAL_MODEL_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_MODEL_COMPONENT))
+#define E_IS_CAL_MODEL_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_MODEL_COMPONENT))
+
+typedef struct _ECalModelComponent ECalModelComponent;
+typedef struct _ECalModelComponentClass ECalModelComponentClass;
+typedef struct _ECalModelComponentPrivate ECalModelComponentPrivate;
+
+struct _ECalModelComponent {
+ GObject object;
+
ECal *client;
icalcomponent *icalcomp;
time_t instance_start;
time_t instance_end;
-
- /* private data */
+
+ /* Private data used by ECalModelCalendar and ECalModelTasks */
+ /* keep these public to avoid many accessor functions */
ECellDateEditValue *dtstart;
ECellDateEditValue *dtend;
ECellDateEditValue *due;
ECellDateEditValue *completed;
gchar *color;
-} ECalModelComponent;
+
+ ECalModelComponentPrivate *priv;
+};
+
+struct _ECalModelComponentClass {
+ GObjectClass parent_class;
+};
typedef struct {
ECalModelComponent *comp_data;
@@ -97,6 +117,7 @@
} ECalModelClass;
GType e_cal_model_get_type (void);
+GType e_cal_model_component_get_type (void);
icalcomponent_kind e_cal_model_get_component_kind (ECalModel *model);
void e_cal_model_set_component_kind (ECalModel *model,
icalcomponent_kind kind);
Modified: branches/kill-bonobo/calendar/gui/e-calendar-table.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-table.c (original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-table.c Thu Aug 14 20:19:12 2008
@@ -1836,10 +1836,6 @@
#endif
-/* Displays messages on the status bar */
-#define EVOLUTION_TASKS_PROGRESS_IMAGE "stock_todo"
-static GdkPixbuf *progress_icon = NULL;
-
void
e_calendar_table_set_activity_handler (ECalendarTable *cal_table, EActivityHandler *activity_handler)
{
@@ -1864,11 +1860,8 @@
} else if (cal_table->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", cal_table);
- if (progress_icon == NULL)
- progress_icon = e_icon_factory_get_icon (EVOLUTION_TASKS_PROGRESS_IMAGE, E_ICON_SIZE_STATUS);
-
- cal_table->activity_id = e_activity_handler_operation_started (cal_table->activity_handler, client_id,
- progress_icon, message, TRUE);
+ cal_table->activity_id = e_activity_handler_operation_started (
+ cal_table->activity_handler, client_id, message, TRUE);
g_free (client_id);
} else {
Modified: branches/kill-bonobo/calendar/gui/e-calendar-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-view.c (original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-view.c Thu Aug 14 20:19:12 2008
@@ -61,10 +61,6 @@
#include "e-cal-popup.h"
#include "misc.h"
-/* Used for the status bar messages */
-#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "x-office-calendar"
-static GdkPixbuf *progress_icon = NULL;
-
struct _ECalendarViewPrivate {
/* The GnomeCalendar we are associated to */
GnomeCalendar *calendar;
@@ -397,8 +393,6 @@
e_calendar_view_init (ECalendarView *cal_view)
{
cal_view->priv = g_new0 (ECalendarViewPrivate, 1);
-
- cal_view->priv->model = (ECalModel *) e_cal_model_calendar_new ();
}
static void
@@ -467,7 +461,6 @@
}
cal_view->priv->model = g_object_ref (model);
- e_calendar_view_update_query (cal_view);
}
icaltimezone *
@@ -582,10 +575,8 @@
} else if (priv->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", cal_view);
- if (progress_icon == NULL)
- progress_icon = e_icon_factory_get_icon (EVOLUTION_CALENDAR_PROGRESS_IMAGE, E_ICON_SIZE_STATUS);
-
- priv->activity_id = e_activity_handler_operation_started (priv->activity_handler, client_id, progress_icon, message, TRUE);
+ priv->activity_id = e_activity_handler_operation_started (
+ priv->activity_handler, client_id, message, TRUE);
g_free (client_id);
} else {
Modified: branches/kill-bonobo/calendar/gui/e-calendar-view.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-calendar-view.h (original)
+++ branches/kill-bonobo/calendar/gui/e-calendar-view.h Thu Aug 14 20:19:12 2008
@@ -81,6 +81,8 @@
struct _ECalendarView {
GtkTable table;
+
+ gboolean in_focus;
ECalendarViewPrivate *priv;
};
Modified: branches/kill-bonobo/calendar/gui/e-day-view-config.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-day-view-config.c (original)
+++ branches/kill-bonobo/calendar/gui/e-day-view-config.c Thu Aug 14 20:19:12 2008
@@ -145,26 +145,6 @@
}
static void
-set_timezone (EDayView *day_view)
-{
- icaltimezone *zone;
-
- zone = calendar_config_get_icaltimezone ();
- e_calendar_view_set_timezone (E_CALENDAR_VIEW (day_view), zone);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EDayViewConfig *view_config = data;
- EDayViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_timezone (priv->view);
-}
-
-static void
set_week_start (EDayView *day_view)
{
int week_start_day;
@@ -420,12 +400,6 @@
priv->view = g_object_ref (day_view);
- /* Time zone */
- set_timezone (day_view);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
/* Week start */
set_week_start (day_view);
Modified: branches/kill-bonobo/calendar/gui/e-day-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-day-view.c (original)
+++ branches/kill-bonobo/calendar/gui/e-day-view.c Thu Aug 14 20:19:12 2008
@@ -486,6 +486,11 @@
g_return_if_fail (E_IS_DAY_VIEW (day_view));
+ if (!E_CALENDAR_VIEW (day_view)->in_focus) {
+ e_day_view_free_events (day_view);
+ return;
+ }
+
/* Calculate the first day that should be shown, based on start_time
and the days_shown setting. If we are showing 1 day it is just the
start of the day given by start_time, otherwise it is the previous
@@ -568,6 +573,10 @@
{
EDayView *day_view = E_DAY_VIEW (user_data);
+ if (!E_CALENDAR_VIEW (day_view)->in_focus) {
+ return;
+ }
+
update_row (day_view, row);
}
@@ -576,6 +585,10 @@
{
EDayView *day_view = E_DAY_VIEW (user_data);
+ if (!E_CALENDAR_VIEW (day_view)->in_focus) {
+ return;
+ }
+
update_row (day_view, row);
}
@@ -586,6 +599,10 @@
ECalModel *model;
int i;
+ if (!E_CALENDAR_VIEW (day_view)->in_focus) {
+ return;
+ }
+
e_day_view_stop_editing_event (day_view);
model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
@@ -612,6 +629,10 @@
EDayView *day_view = E_DAY_VIEW (user_data);
int i;
+ if (!E_CALENDAR_VIEW (day_view)->in_focus) {
+ return;
+ }
+
e_day_view_stop_editing_event (day_view);
for (i = row + count; i > row; i--) {
@@ -653,6 +674,10 @@
g_return_if_fail (E_IS_DAY_VIEW (day_view));
+
+ if (!cal_view->in_focus)
+ return;
+
/* If our time hasn't been set yet, just return. */
if (day_view->lower == 0 && day_view->upper == 0)
return;
@@ -673,7 +698,6 @@
{
gint day;
GnomeCanvasGroup *canvas_group;
- ECalModel *model;
GtkWidget *w;
GTK_WIDGET_SET_FLAGS (day_view, GTK_CAN_FOCUS);
@@ -981,9 +1005,16 @@
target_table, n_targets,
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
- /* Get the model */
- model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
+ /* connect to ECalendarView's signals */
+ g_signal_connect (G_OBJECT (day_view), "timezone_changed",
+ G_CALLBACK (timezone_changed_cb), NULL);
+}
+
+
+static void
+init_model (EDayView *day_view, ECalModel *model)
+{
/* connect to ECalModel's signals */
g_signal_connect (G_OBJECT (model), "time_range_changed",
G_CALLBACK (time_range_changed_cb), day_view);
@@ -995,10 +1026,6 @@
G_CALLBACK (model_rows_inserted_cb), day_view);
g_signal_connect (G_OBJECT (model), "model_rows_deleted",
G_CALLBACK (model_rows_deleted_cb), day_view);
-
- /* connect to ECalendarView's signals */
- g_signal_connect (G_OBJECT (day_view), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), NULL);
}
/* Turn off the background of the canvas windows. This reduces flicker
@@ -1019,12 +1046,13 @@
* Creates a new #EDayView.
**/
GtkWidget *
-e_day_view_new (void)
+e_day_view_new (ECalModel *model)
{
GObject *day_view;
day_view = g_object_new (e_day_view_get_type (), NULL);
- e_cal_model_set_flags (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
+ e_calendar_view_set_model ((ECalendarView *)day_view, model);
+ init_model ((EDayView *) day_view, model);
return GTK_WIDGET (day_view);
}
@@ -2346,7 +2374,7 @@
e_day_view_recalc_num_rows (day_view);
/* If we aren't visible, we'll sort it out later. */
- if (!GTK_WIDGET_VISIBLE (day_view))
+ if (!E_CALENDAR_VIEW (day_view)->in_focus)
return;
for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++)
@@ -4147,12 +4175,11 @@
add_event_data = data;
-#if 0
+ /*
g_print ("Day view lower: %s", ctime (&add_event_data->day_view->lower));
g_print ("Day view upper: %s", ctime (&add_event_data->day_view->upper));
g_print ("Event start: %s", ctime (&start));
- g_print ("Event end : %s\n", ctime (&end));
-#endif
+ g_print ("Event end : %s\n", ctime (&end)); */
/* Check that the event times are valid. */
g_return_val_if_fail (start <= end, TRUE);
@@ -4167,7 +4194,7 @@
if (add_event_data->comp_data) {
event.comp_data = e_cal_model_copy_component_data (add_event_data->comp_data);
} else {
- event.comp_data = g_new0 (ECalModelComponent, 1);
+ event.comp_data = g_object_new (E_TYPE_CAL_MODEL_COMPONENT, NULL);
event.comp_data->client = g_object_ref (e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (add_event_data->day_view))));
e_cal_component_abort_sequence (comp);
@@ -4241,7 +4268,7 @@
gint day, rows_in_top_display;
/* Don't bother if we aren't visible. */
- if (!GTK_WIDGET_VISIBLE (day_view))
+ if (!E_CALENDAR_VIEW (day_view)->in_focus)
return;
/* Make sure the events are sorted (by start and size). */
Modified: branches/kill-bonobo/calendar/gui/e-day-view.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-day-view.h (original)
+++ branches/kill-bonobo/calendar/gui/e-day-view.h Thu Aug 14 20:19:12 2008
@@ -474,7 +474,7 @@
GType e_day_view_get_type (void);
-GtkWidget* e_day_view_new (void);
+GtkWidget* e_day_view_new (ECalModel *model);
/* Whether we are displaying a work-week, in which case the display always
starts on the first day of the working week. */
Modified: branches/kill-bonobo/calendar/gui/e-memo-table.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-memo-table.c (original)
+++ branches/kill-bonobo/calendar/gui/e-memo-table.c Thu Aug 14 20:19:12 2008
@@ -1095,10 +1095,6 @@
#endif
-/* Displays messages on the status bar */
-#define EVOLUTION_MEMOS_PROGRESS_IMAGE "stock_notes"
-static GdkPixbuf *progress_icon = NULL;
-
void
e_memo_table_set_activity_handler (EMemoTable *memo_table, EActivityHandler *activity_handler)
{
@@ -1123,11 +1119,8 @@
} else if (memo_table->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", memo_table);
- if (progress_icon == NULL)
- progress_icon = e_icon_factory_get_icon (EVOLUTION_MEMOS_PROGRESS_IMAGE, E_ICON_SIZE_STATUS);
-
- memo_table->activity_id = e_activity_handler_operation_started (memo_table->activity_handler, client_id,
- progress_icon, message, TRUE);
+ memo_table->activity_id = e_activity_handler_operation_started (
+ memo_table->activity_handler, client_id, message, TRUE);
g_free (client_id);
} else {
Modified: branches/kill-bonobo/calendar/gui/e-timezone-entry.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-timezone-entry.c (original)
+++ branches/kill-bonobo/calendar/gui/e-timezone-entry.c Thu Aug 14 20:19:12 2008
@@ -33,7 +33,6 @@
#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
#include <glib/gi18n.h>
#include "e-timezone-entry.h"
-#include <e-util/e-icon-factory.h>
struct _ETimezoneEntryPrivate {
/* The current timezone, set in e_timezone_entry_set_timezone()
@@ -106,7 +105,7 @@
e_timezone_entry_init (ETimezoneEntry *tentry)
{
ETimezoneEntryPrivate *priv;
- GtkWidget *gtk_image;
+ GtkWidget *image;
AtkObject *a11y;
tentry->priv = priv = g_new0 (ETimezoneEntryPrivate, 1);
@@ -130,9 +129,10 @@
atk_object_set_name (a11y, _("Select Timezone"));
}
- gtk_image = e_icon_factory_get_image ("stock_timezone", E_ICON_SIZE_BUTTON);
- gtk_container_add (GTK_CONTAINER (priv->button), gtk_image);
- gtk_widget_show (gtk_image);
+ image = gtk_image_new_from_icon_name (
+ "stock_timezone", GTK_ICON_SIZE_BUTTON);
+ gtk_container_add (GTK_CONTAINER (priv->button), image);
+ gtk_widget_show (image);
}
Modified: branches/kill-bonobo/calendar/gui/e-week-view-config.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-week-view-config.c (original)
+++ branches/kill-bonobo/calendar/gui/e-week-view-config.c Thu Aug 14 20:19:12 2008
@@ -145,26 +145,6 @@
}
static void
-set_timezone (EWeekView *week_view)
-{
- icaltimezone *zone;
-
- zone = calendar_config_get_icaltimezone ();
- e_calendar_view_set_timezone (E_CALENDAR_VIEW (week_view), zone);
-}
-
-static void
-timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
- EWeekViewConfig *view_config = data;
- EWeekViewConfigPrivate *priv;
-
- priv = view_config->priv;
-
- set_timezone (priv->view);
-}
-
-static void
set_week_start (EWeekView *week_view)
{
int week_start_week;
@@ -280,12 +260,6 @@
priv->view = g_object_ref (week_view);
- /* Time zone */
- set_timezone (week_view);
-
- not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
/* Week start */
set_week_start (week_view);
Modified: branches/kill-bonobo/calendar/gui/e-week-view.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-week-view.c (original)
+++ branches/kill-bonobo/calendar/gui/e-week-view.c Thu Aug 14 20:19:12 2008
@@ -242,6 +242,11 @@
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
+ if (!E_CALENDAR_VIEW (week_view)->in_focus) {
+ e_week_view_free_events (week_view);
+ return;
+ }
+
time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
/* Calculate the weekday of the given date, 0 = Mon. */
@@ -346,6 +351,11 @@
model_row_changed_cb (ETableModel *etm, int row, gpointer user_data)
{
EWeekView *week_view = E_WEEK_VIEW (user_data);
+
+ if (!E_CALENDAR_VIEW (week_view)->in_focus) {
+ return;
+ }
+
update_row (week_view, row);
}
@@ -355,6 +365,10 @@
{
EWeekView *week_view = E_WEEK_VIEW (user_data);
+ if (!E_CALENDAR_VIEW (week_view)->in_focus) {
+ return;
+ }
+
update_row (week_view, row);
}
@@ -365,6 +379,10 @@
ECalModel *model;
int i;
+ if (!E_CALENDAR_VIEW (week_view)->in_focus) {
+ return;
+ }
+
model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
for (i = 0; i < count; i++) {
@@ -389,6 +407,9 @@
int i;
/* FIXME Stop editing? */
+ if (!E_CALENDAR_VIEW (week_view)->in_focus) {
+ return;
+ }
for (i = row + count; i > row; i--) {
gint event_num;
@@ -428,6 +449,9 @@
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
+ if (!cal_view->in_focus)
+ return;
+
/* If we don't have a valid date set yet, just return. */
if (!g_date_valid (&week_view->first_day_shown))
return;
@@ -450,7 +474,6 @@
GnomeCanvasGroup *canvas_group;
GtkObject *adjustment;
GdkPixbuf *pixbuf;
- ECalModel *model;
gint i;
GTK_WIDGET_SET_FLAGS (week_view, GTK_CAN_FOCUS);
@@ -586,9 +609,14 @@
week_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
week_view->last_cursor_set = NULL;
- /* Get the model */
- model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
+ /* connect to ECalendarView's signals */
+ g_signal_connect (G_OBJECT (week_view), "timezone_changed",
+ G_CALLBACK (timezone_changed_cb), NULL);
+}
+static void
+init_model (EWeekView *week_view, ECalModel *model)
+{
/* connect to ECalModel's signals */
g_signal_connect (G_OBJECT (model), "time_range_changed",
G_CALLBACK (time_range_changed_cb), week_view);
@@ -601,12 +629,8 @@
g_signal_connect (G_OBJECT (model), "model_rows_deleted",
G_CALLBACK (model_rows_deleted_cb), week_view);
- /* connect to ECalendarView's signals */
- g_signal_connect (G_OBJECT (week_view), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), NULL);
}
-
/**
* e_week_view_new:
* @Returns: a new #EWeekView.
@@ -614,12 +638,13 @@
* Creates a new #EWeekView.
**/
GtkWidget *
-e_week_view_new (void)
+e_week_view_new (ECalModel *model)
{
GtkWidget *week_view;
week_view = GTK_WIDGET (g_object_new (e_week_view_get_type (), NULL));
- e_cal_model_set_flags (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)), E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
+ e_calendar_view_set_model ((ECalendarView *) week_view, model);
+ init_model ((EWeekView *) week_view, model);
return week_view;
}
@@ -2403,7 +2428,7 @@
if (add_event_data->comp_data) {
event.comp_data = e_cal_model_copy_component_data (add_event_data->comp_data);
} else {
- event.comp_data = g_new0 (ECalModelComponent, 1);
+ event.comp_data = g_object_new (E_TYPE_CAL_MODEL_COMPONENT, NULL);
event.comp_data->client = g_object_ref (e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (add_event_data->week_view))));
e_cal_component_abort_sequence (comp);
@@ -2447,7 +2472,7 @@
e_week_view_check_layout (EWeekView *week_view)
{
/* Don't bother if we aren't visible. */
- if (!GTK_WIDGET_VISIBLE (week_view))
+ if (!E_CALENDAR_VIEW (week_view)->in_focus)
return;
/* Make sure the events are sorted (by start and size). */
Modified: branches/kill-bonobo/calendar/gui/e-week-view.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-week-view.h (original)
+++ branches/kill-bonobo/calendar/gui/e-week-view.h Thu Aug 14 20:19:12 2008
@@ -348,7 +348,7 @@
GType e_week_view_get_type (void);
-GtkWidget* e_week_view_new (void);
+GtkWidget* e_week_view_new (ECalModel *model);
/* The first day shown. Note that it will be rounded down to the start of a
week when set. The returned value will be invalid if no date has been set
Modified: branches/kill-bonobo/calendar/gui/gnome-cal.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/gnome-cal.c (original)
+++ branches/kill-bonobo/calendar/gui/gnome-cal.c Thu Aug 14 20:19:12 2008
@@ -91,7 +91,7 @@
#define G_MAXINT32 ((gint32) 0x7fffffff)
#endif
-
+#define d(x) x
/* Private part of the GnomeCalendar structure */
struct _GnomeCalendarPrivate {
@@ -249,6 +249,41 @@
static void update_todo_view (GnomeCalendar *gcal);
static void update_memo_view (GnomeCalendar *gcal);
+static void default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal);
+static void client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal);
+
+/* Simple asynchronous message dispatcher */
+typedef struct _Message Message;
+typedef void (*MessageFunc) (Message *msg);
+
+struct _Message {
+ MessageFunc func;
+};
+
+static void
+message_proxy (Message *msg)
+{
+ g_return_if_fail (msg->func != NULL);
+
+ msg->func (msg);
+}
+
+static gpointer
+create_thread_pool (void)
+{
+ /* once created, run forever */
+ return g_thread_pool_new ((GFunc) message_proxy, NULL, 1, FALSE, NULL);
+}
+
+static void
+message_push (Message *msg)
+{
+ static GOnce once = G_ONCE_INIT;
+
+ g_once (&once, (GThreadFunc) create_thread_pool, NULL);
+
+ g_thread_pool_push ((GThreadPool *) once.retval, msg, NULL);
+}
G_DEFINE_TYPE (GnomeCalendar, gnome_calendar, GTK_TYPE_VBOX)
@@ -813,24 +848,22 @@
return new_sexp;
}
-/* Restarts a query for the date navigator in the calendar */
-static void
-update_query (GnomeCalendar *gcal)
+struct _date_query_msg {
+ Message header;
+ GnomeCalendar *gcal;
+};
+
+static void
+update_query_async (struct _date_query_msg *msg)
{
+ GnomeCalendar *gcal = msg->gcal;
GnomeCalendarPrivate *priv;
ECalView *old_query;
char *real_sexp;
GList *l;
priv = gcal->priv;
-
- if (priv->updating == TRUE) {
- return;
- }
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Updating query"), -1);
- e_calendar_item_clear_marks (priv->date_navigator->calitem);
-
- priv->updating = TRUE;
+
/* free the previous queries */
for (l = priv->dn_queries; l != NULL; l = l->next) {
old_query = l->data;
@@ -849,20 +882,33 @@
real_sexp = adjust_e_cal_view_sexp (gcal, priv->sexp);
if (!real_sexp) {
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
- priv->updating = FALSE;
return; /* No time range is set, so don't start a query */
}
-
+
/* create queries for each loaded client */
for (l = priv->clients_list[E_CAL_SOURCE_TYPE_EVENT]; l != NULL; l = l->next) {
+ GError *error = NULL;
+ gint tries = 0;
+
/* don't create queries for clients not loaded yet */
if (e_cal_get_load_state ((ECal *) l->data) != E_CAL_LOAD_LOADED)
continue;
+try_again:
old_query = NULL;
- if (!e_cal_get_query ((ECal *) l->data, real_sexp, &old_query, NULL)) {
- g_warning (G_STRLOC ": Could not create the query");
+ if (!e_cal_get_query ((ECal *) l->data, real_sexp, &old_query, &error)) {
+ /* If calendar is busy try again for 3 times. */
+ if (error->code == E_CALENDAR_STATUS_BUSY && tries != 3) {
+ tries++;
+ /*TODO chose an optimal value */
+ g_usleep (50);
+
+ g_clear_error (&error);
+ goto try_again;
+ }
+
+ g_warning (G_STRLOC ": Could not create the query: %s ", error->message);
+ g_clear_error (&error);
continue;
}
@@ -882,10 +928,26 @@
}
/* free memory */
- priv->updating = FALSE;
g_free (real_sexp);
- e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
update_todo_view (gcal);
+
+ g_object_unref (msg->gcal);
+ g_slice_free (struct _date_query_msg, msg);
+}
+
+/* Restarts a query for the date navigator in the calendar */
+static void
+update_query (GnomeCalendar *gcal)
+{
+ struct _date_query_msg *msg;
+
+ e_calendar_item_clear_marks (gcal->priv->date_navigator->calitem);
+
+ msg = g_slice_new0 (struct _date_query_msg);
+ msg->header.func = (MessageFunc) update_query_async;
+ msg->gcal = g_object_ref (gcal);
+
+ message_push ((Message *) msg);
}
static void
@@ -908,26 +970,28 @@
priv->sexp = g_strdup (sexp);
+ d(g_print ("Changing the queries %s \n", sexp));
+
update_query (gcal);
+ i = priv->current_view_type;
+
/* Set the query on the views */
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- if (i == GNOME_CAL_LIST_VIEW) {
- if (!priv->lview_select_daten_range) {
- cal_search_bar_get_time_range ((CalSearchBar *)priv->search_bar, &start, &end);
- e_cal_model_set_search_query_with_time_range (e_calendar_view_get_model (priv->views [i]), sexp, start, end);
- } else {
- start = priv->base_view_time;
- get_times_for_views (gcal, GNOME_CAL_LIST_VIEW, &start, &end);
+ if (i == GNOME_CAL_LIST_VIEW) {
+ if (!priv->lview_select_daten_range) {
+ cal_search_bar_get_time_range ((CalSearchBar *)priv->search_bar, &start, &end);
+ e_cal_model_set_search_query_with_time_range (e_calendar_view_get_model (priv->views [i]), sexp, start, end);
+ } else {
+ start = priv->base_view_time;
+ get_times_for_views (gcal, GNOME_CAL_LIST_VIEW, &start, &end);
- e_cal_model_set_search_query_with_time_range (e_calendar_view_get_model (priv->views [i]), sexp, start, end);
+ e_cal_model_set_search_query_with_time_range (e_calendar_view_get_model (priv->views [i]), sexp, start, end);
- if (priv->current_view_type == GNOME_CAL_LIST_VIEW)
- gnome_calendar_update_date_navigator (gcal);
- }
- } else
- e_cal_model_set_search_query (e_calendar_view_get_model (priv->views[i]), sexp);
- }
+ if (priv->current_view_type == GNOME_CAL_LIST_VIEW)
+ gnome_calendar_update_date_navigator (gcal);
+ }
+ } else
+ e_cal_model_set_search_query (e_calendar_view_get_model (priv->views[i]), sexp);
/* Set the query on the task pad */
update_todo_view (gcal);
@@ -1224,6 +1288,9 @@
/* FIXME Error checking */
e_cal_set_default_timezone (priv->default_client[i], priv->zone, NULL);
}
+
+ if (priv->views [priv->current_view_type])
+ e_calendar_view_set_timezone (priv->views [priv->current_view_type], priv->zone);
}
static void
@@ -1506,6 +1573,7 @@
ECalModel *w_model;
GtkWidget *vbox;
GtkWidget *label;
+ ECalModel *cal_model;
int i;
char *tmp;
@@ -1610,8 +1678,12 @@
/* Timeout check to hide completed items */
priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_todo_view_cb, gcal, NULL);
+ /* Create the model for the views */
+ cal_model = (ECalModel *) e_cal_model_calendar_new ();
+ e_cal_model_set_flags (cal_model, E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
+
/* The Day View. */
- priv->day_view = e_day_view_new ();
+ priv->day_view = e_day_view_new (cal_model);
e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->day_view), gcal);
e_calendar_view_set_timezone (E_CALENDAR_VIEW (priv->day_view), priv->zone);
g_signal_connect (priv->day_view, "selection_changed",
@@ -1619,7 +1691,7 @@
connect_day_view_focus (gcal, E_DAY_VIEW (priv->day_view));
/* The Work Week View. */
- priv->work_week_view = e_day_view_new ();
+ priv->work_week_view = e_day_view_new (cal_model);
e_day_view_set_work_week_view (E_DAY_VIEW (priv->work_week_view),
TRUE);
e_day_view_set_days_shown (E_DAY_VIEW (priv->work_week_view), 5);
@@ -1631,7 +1703,7 @@
priv->update_marcus_bains_line_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_marcus_bains_line_cb, gcal, NULL);
/* The Week View. */
- priv->week_view = e_week_view_new ();
+ priv->week_view = e_week_view_new (cal_model);
e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->week_view), gcal);
e_calendar_view_set_timezone (E_CALENDAR_VIEW (priv->week_view), priv->zone);
g_signal_connect (priv->week_view, "selection_changed",
@@ -1650,7 +1722,7 @@
G_CALLBACK (view_done_cb), gcal);
/* The Month View. */
- priv->month_view = e_week_view_new ();
+ priv->month_view = e_week_view_new (cal_model);
e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->month_view), gcal);
e_calendar_view_set_timezone (E_CALENDAR_VIEW (priv->month_view), priv->zone);
e_week_view_set_multi_week_view (E_WEEK_VIEW (priv->month_view), TRUE);
@@ -1666,7 +1738,7 @@
gcal);
/* The List View. */
- priv->list_view = e_cal_list_view_new ();
+ priv->list_view = e_cal_list_view_new (cal_model);
e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->list_view), gcal);
e_calendar_view_set_timezone (E_CALENDAR_VIEW (priv->list_view), priv->zone);
@@ -1733,10 +1805,6 @@
g_signal_connect (e_memo_table_get_model ((EMemoTable *)priv->memo), "cal_view_done",
G_CALLBACK (view_done_cb), gcal);
-
- /* make sure we set the initial time ranges for the views */
- update_view_times (gcal, time (NULL));
- gnome_calendar_update_date_navigator (gcal);
}
/* Object initialization function for the gnome calendar */
@@ -2041,25 +2109,21 @@
update_view_times (GnomeCalendar *gcal, time_t start_time)
{
GnomeCalendarPrivate *priv;
- int i;
+ ECalModel *model;
+ time_t real_start_time = start_time;
+ time_t end_time;
priv = gcal->priv;
priv->base_view_time = start_time;
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- ECalModel *model;
- time_t real_start_time = start_time;
- time_t end_time;
+ model = e_calendar_view_get_model (priv->views [priv->current_view_type]);
+ get_times_for_views (gcal, priv->current_view_type, &real_start_time, &end_time);
- model = e_calendar_view_get_model (priv->views[i]);
- get_times_for_views (gcal, i, &real_start_time, &end_time);
-
- if (i == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range)
- continue;
+ if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range)
+ return;
- e_cal_model_set_time_range (model, real_start_time, end_time);
- }
+ e_cal_model_set_time_range (model, real_start_time, end_time);
}
static void
@@ -2233,6 +2297,7 @@
{
GnomeCalendarPrivate *priv;
gboolean preserve_day;
+ int i;
priv = gcal->priv;
@@ -2276,10 +2341,17 @@
}
priv->current_view_type = view_type;
+ E_CALENDAR_VIEW (priv->views [view_type])->in_focus = TRUE;
gtk_notebook_set_current_page (
GTK_NOTEBOOK (priv->notebook), (int) view_type);
+ for (i = 0; i < GNOME_CAL_LAST_VIEW ; i++) {
+ if (i == view_type)
+ continue;
+ E_CALENDAR_VIEW (priv->views [i])->in_focus = FALSE;
+ }
+
if (grab_focus)
focus_current_view (gcal);
@@ -2331,12 +2403,15 @@
display_view (gcal, view_type, TRUE);
+
+ if (!priv->base_view_time)
+ update_view_times (gcal, time (NULL));
+ else
+ update_view_times (gcal, priv->base_view_time);
+
gnome_calendar_update_date_navigator (gcal);
gnome_calendar_notify_dates_shown_changed (gcal);
- if (!priv->lview_select_daten_range && priv->current_view_type != GNOME_CAL_LIST_VIEW)
- update_query (gcal);
-
}
/**
@@ -2607,15 +2682,44 @@
}
}
+struct _mclient_msg {
+ Message header;
+ ECalModel *model;
+ ECal *client;
+};
+
+static void
+add_mclient_async (struct _mclient_msg *msg)
+{
+ e_cal_model_add_client (msg->model, msg->client);
+
+ g_object_unref (msg->client);
+ g_object_unref (msg->model);
+ g_slice_free (struct _mclient_msg, msg);
+}
+
+static void
+add_mclient (ECalModel *model, ECal *client)
+{
+ struct _mclient_msg *msg;
+
+ msg = g_slice_new0 (struct _mclient_msg);
+ msg->header.func = (MessageFunc) add_mclient_async;
+ msg->model = g_object_ref (model);
+ msg->client = g_object_ref (client);
+
+ message_push ((Message *) msg);
+}
+
static void
client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
{
GnomeCalendarPrivate *priv;
ECalSourceType source_type;
ESource *source;
+ ECalModel *model;
ECalLoadState state;
char *msg;
- int i;
priv = gcal->priv;
@@ -2682,7 +2786,6 @@
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, client_cal_opened_cb, NULL);
-
switch (source_type) {
case E_CAL_SOURCE_TYPE_EVENT :
msg = g_strdup_printf (_("Loading appointments at %s"), e_cal_get_uri (ecal));
@@ -2690,12 +2793,8 @@
g_free (msg);
/* add client to the views */
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- ECalModel *model;
-
- model = e_calendar_view_get_model (priv->views[i]);
- e_cal_model_add_client (model, ecal);
- }
+ model = e_calendar_view_get_model (priv->views[priv->current_view_type]);
+ add_mclient (model, ecal);
/* update date navigator query */
update_query (gcal);
@@ -2731,7 +2830,6 @@
ECalSourceType source_type;
ESource *source;
ECalLoadState state;
- int i;
priv = gcal->priv;
@@ -2788,11 +2886,9 @@
switch (source_type) {
case E_CAL_SOURCE_TYPE_EVENT:
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
e_cal_model_set_default_client (
- e_calendar_view_get_model (E_CALENDAR_VIEW (priv->views[i])),
+ e_calendar_view_get_model (E_CALENDAR_VIEW (priv->views[priv->current_view_type])),
ecal);
- }
break;
case E_CAL_SOURCE_TYPE_TODO:
@@ -3111,7 +3207,6 @@
GnomeCalendarPrivate *priv;
ECal *client;
ECalModel *model;
- int i;
GList *l;
g_return_val_if_fail (gcal != NULL, FALSE);
@@ -3143,10 +3238,8 @@
}
}
- for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- model = e_calendar_view_get_model (priv->views[i]);
- e_cal_model_remove_client (model, client);
- }
+ model = e_calendar_view_get_model (priv->views[priv->current_view_type]);
+ e_cal_model_remove_client (model, client);
/* update date navigator query */
update_query (gcal);
@@ -3413,8 +3506,9 @@
/* If the selection hasn't changed just return. */
if (!g_date_compare (&start_date, &new_start_date)
- && !g_date_compare (&end_date, &new_end_date))
+ && !g_date_compare (&end_date, &new_end_date)) {
return;
+ }
new_days_shown = g_date_get_julian (&new_end_date) - g_date_get_julian (&new_start_date) + 1;
@@ -3458,8 +3552,8 @@
/* Make the views display things properly */
update_view_times (gcal, new_time);
-
set_view (gcal, view_type, TRUE);
+
gnome_calendar_notify_dates_shown_changed (gcal);
}
Modified: branches/kill-bonobo/calendar/gui/memos-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/memos-component.c (original)
+++ branches/kill-bonobo/calendar/gui/memos-component.c Thu Aug 14 20:19:12 2008
@@ -51,7 +51,6 @@
#include "dialogs/copy-source-dialog.h"
#include "dialogs/memo-editor.h"
#include "widgets/misc/e-info-label.h"
-#include "e-util/e-icon-factory.h"
#include "e-util/e-error.h"
#include "calendar-component.h"
Modified: branches/kill-bonobo/calendar/gui/memos-control.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/memos-control.c (original)
+++ branches/kill-bonobo/calendar/gui/memos-control.c Thu Aug 14 20:19:12 2008
@@ -35,8 +35,8 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-ui-util.h>
#include <e-util/e-dialog-utils.h>
-#include <e-util/e-print.h>
#include <e-util/e-icon-factory.h>
+#include <e-util/e-print.h>
#include <e-util/e-util-private.h>
#include "calendar-config.h"
Modified: branches/kill-bonobo/calendar/gui/migration.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/migration.c (original)
+++ branches/kill-bonobo/calendar/gui/migration.c Thu Aug 14 20:19:12 2008
@@ -192,7 +192,7 @@
{
char *text;
- text = g_strdup_printf (_("Migrating `%s':"), folder_name);
+ text = g_strdup_printf (_("Migrating '%s':"), folder_name);
gtk_label_set_text (label, text);
g_free (text);
Modified: branches/kill-bonobo/calendar/gui/tasks-component.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/tasks-component.c (original)
+++ branches/kill-bonobo/calendar/gui/tasks-component.c Thu Aug 14 20:19:12 2008
@@ -52,7 +52,6 @@
#include "dialogs/task-editor.h"
#include "misc/e-info-label.h"
#include "e-util/e-error.h"
-#include "e-util/e-icon-factory.h"
#define CREATE_TASK_ID "task"
#define CREATE_TASK_ASSIGNED_ID "task-assigned"
Modified: branches/kill-bonobo/calendar/gui/tasks-control.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/tasks-control.c (original)
+++ branches/kill-bonobo/calendar/gui/tasks-control.c Thu Aug 14 20:19:12 2008
@@ -34,8 +34,8 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-ui-util.h>
#include <e-util/e-dialog-utils.h>
-#include <e-util/e-print.h>
#include <e-util/e-icon-factory.h>
+#include <e-util/e-print.h>
#include <e-util/e-util-private.h>
#include "dialogs/cal-prefs-dialog.h"
#include "calendar-config.h"
Modified: branches/kill-bonobo/composer/e-msg-composer.c
==============================================================================
--- branches/kill-bonobo/composer/e-msg-composer.c (original)
+++ branches/kill-bonobo/composer/e-msg-composer.c Thu Aug 14 20:19:12 2008
@@ -110,7 +110,6 @@
#include "e-composer-header-table.h"
#include "evolution-shell-component-utils.h"
-#include <e-util/e-icon-factory.h>
#ifdef HAVE_XFREE
#include <X11/XF86keysym.h>
Modified: branches/kill-bonobo/configure.in
==============================================================================
--- branches/kill-bonobo/configure.in (original)
+++ branches/kill-bonobo/configure.in Thu Aug 14 20:19:12 2008
@@ -13,7 +13,7 @@
# Required Packages
m4_define([glib_minimum_version], [2.16.0])
m4_define([gtk_minimum_version], [2.12.0])
-m4_define([eds_minimum_version], [2.23.6])
+m4_define([eds_minimum_version], [2.23.90])
m4_define([gnome_icon_theme_minimum_version], [2.19.91])
m4_define([libbonobo_minimum_version], [2.20.3])
m4_define([libbonoboui_minimum_version], [2.4.2])
Modified: branches/kill-bonobo/e-util/e-config.c
==============================================================================
--- branches/kill-bonobo/e-util/e-config.c (original)
+++ branches/kill-bonobo/e-util/e-config.c Thu Aug 14 20:19:12 2008
@@ -35,8 +35,6 @@
#include "e-config.h"
-#include <e-util/e-icon-factory.h>
-
#include <glib/gi18n.h>
#define d(x)
Modified: branches/kill-bonobo/e-util/e-event.c
==============================================================================
--- branches/kill-bonobo/e-util/e-event.c (original)
+++ branches/kill-bonobo/e-util/e-event.c Thu Aug 14 20:19:12 2008
@@ -31,8 +31,6 @@
#include "e-event.h"
-#include <e-util/e-icon-factory.h>
-
#include <glib/gi18n.h>
#include <libedataserver/e-msgport.h>
Modified: branches/kill-bonobo/e-util/e-gui-utils.c
==============================================================================
--- branches/kill-bonobo/e-util/e-gui-utils.c (original)
+++ branches/kill-bonobo/e-util/e-gui-utils.c Thu Aug 14 20:19:12 2008
@@ -18,7 +18,6 @@
#include <string.h>
#include "e-gui-utils.h"
-#include <e-util/e-icon-factory.h>
#include <libgnome/gnome-program.h>
#include <libgnomeui/gnome-icon-lookup.h>
@@ -53,29 +52,3 @@
return pixbuf;
}
-
-GtkWidget *e_create_image_widget(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- GtkWidget *alignment = NULL;
- GtkWidget *w;
-
- if (string1) {
- w = e_icon_factory_get_image (string1, E_ICON_SIZE_DIALOG);
-
- gtk_misc_set_alignment (GTK_MISC (w), 0.5, 0.5);
-
- alignment = gtk_widget_new(gtk_alignment_get_type(),
- "child", w,
- "xalign", (double) 0,
- "yalign", (double) 0,
- "xscale", (double) 0,
- "yscale", (double) 0,
- NULL);
-
- gtk_widget_show_all (alignment);
- }
-
- return alignment;
-}
Modified: branches/kill-bonobo/e-util/e-gui-utils.h
==============================================================================
--- branches/kill-bonobo/e-util/e-gui-utils.h (original)
+++ branches/kill-bonobo/e-util/e-gui-utils.h Thu Aug 14 20:19:12 2008
@@ -4,6 +4,5 @@
#include <gtk/gtk.h>
GdkPixbuf *e_icon_for_mime_type (const char *mime_type, int size);
-GtkWidget *e_create_image_widget (gchar *name, gchar *string1, gchar *string2, gint int1, gint int2);
#endif /* E_GUI_UTILS_H */
Modified: branches/kill-bonobo/e-util/e-icon-factory.c
==============================================================================
--- branches/kill-bonobo/e-util/e-icon-factory.c (original)
+++ branches/kill-bonobo/e-util/e-icon-factory.c Thu Aug 14 20:19:12 2008
@@ -353,62 +353,6 @@
return pixbuf;
}
-GtkWidget *
-e_icon_factory_get_image (const char *icon_name, int icon_size)
-{
- GdkPixbuf *pixbuf;
- GtkWidget *image;
-
- pixbuf = e_icon_factory_get_icon (icon_name, icon_size);
- image = gtk_image_new_from_pixbuf (pixbuf);
- g_object_unref (pixbuf);
-
- return image;
-}
-
-/**
- * e_icon_factory_get_icon_list:
- * @icon_name: name of the icon
- *
- * Returns a list of GdkPixbufs of the requested name suitable for
- * gtk_window_set_icon_list().
- **/
-GList *
-e_icon_factory_get_icon_list (const char *icon_name)
-{
- static int icon_list_sizes[] = { 128, 64, 48, 32, 16 };
- GList *list = NULL;
- char *icon_key;
- Icon *icon;
- int size, i;
-
- if (!icon_name || !strcmp (icon_name, ""))
- return NULL;
-
- g_static_mutex_lock (&mutex);
-
- icon_key = g_alloca (strlen (icon_name) + 9);
-
- for (i = 0; i < G_N_ELEMENTS (icon_list_sizes); i++) {
- size = icon_list_sizes[i];
- sprintf (icon_key, "%dx%d/%s", size, size, icon_name);
-
- if (!(icon = g_hash_table_lookup (name_to_icon, icon_key))) {
- if ((icon = load_icon (icon_key, icon_name, size, FALSE)))
- g_hash_table_insert (name_to_icon, icon->name, icon);
- }
-
- if (icon && icon->pixbuf) {
- list = g_list_prepend (list, icon->pixbuf);
- g_object_ref (icon->pixbuf);
- }
- }
-
- g_static_mutex_unlock (&mutex);
-
- return list;
-}
-
/**
* e_icon_factory_pixbuf_scale
* Scales pixbuf to desired size.
Modified: branches/kill-bonobo/e-util/e-icon-factory.h
==============================================================================
--- branches/kill-bonobo/e-util/e-icon-factory.h (original)
+++ branches/kill-bonobo/e-util/e-icon-factory.h Thu Aug 14 20:19:12 2008
@@ -50,10 +50,6 @@
GdkPixbuf *e_icon_factory_get_icon (const char *icon_name, int icon_size);
-GtkWidget *e_icon_factory_get_image (const char *icon_name, int icon_size);
-
-GList *e_icon_factory_get_icon_list (const char *icon_name);
-
GdkPixbuf *e_icon_factory_pixbuf_scale (GdkPixbuf *pixbuf, int width, int height);
#endif /* _E_ICON_FACTORY_H_ */
Modified: branches/kill-bonobo/e-util/e-import.c
==============================================================================
--- branches/kill-bonobo/e-util/e-import.c (original)
+++ branches/kill-bonobo/e-util/e-import.c Thu Aug 14 20:19:12 2008
@@ -35,8 +35,6 @@
#include "e-import.h"
-#include <e-util/e-icon-factory.h>
-
#include <glib/gi18n.h>
#define d(x)
Modified: branches/kill-bonobo/e-util/e-popup.c
==============================================================================
--- branches/kill-bonobo/e-util/e-popup.c (original)
+++ branches/kill-bonobo/e-util/e-popup.c Thu Aug 14 20:19:12 2008
@@ -31,8 +31,6 @@
#include "e-popup.h"
-#include <e-util/e-icon-factory.h>
-
#include <glib/gi18n.h>
#define d(x)
@@ -357,12 +355,8 @@
if (item->image) {
GtkWidget *image;
- /* work-around e-icon-factory not doing GTK_STOCK stuff */
- if (strncmp((char *)item->image, "gtk-", 4) == 0)
- image = gtk_image_new_from_stock((char *)item->image, GTK_ICON_SIZE_MENU);
- else
- image = e_icon_factory_get_image((char *)item->image, E_ICON_SIZE_MENU);
-
+ image = gtk_image_new_from_icon_name (
+ (gchar *) item->image, GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
menuitem = (GtkMenuItem *)gtk_image_menu_item_new();
gtk_image_menu_item_set_image((GtkImageMenuItem *)menuitem, image);
Modified: branches/kill-bonobo/e-util/e-util.c
==============================================================================
--- branches/kill-bonobo/e-util/e-util.c (original)
+++ branches/kill-bonobo/e-util/e-util.c Thu Aug 14 20:19:12 2008
@@ -35,10 +35,11 @@
#include <sys/stat.h>
#include <fcntl.h>
-#include <glib.h>
-#include <glib/gstdio.h>
-#include <gtk/gtk.h>
#include <gio/gio.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+#include <libgnome/gnome-help.h>
#include <libgnome/gnome-util.h>
#ifdef G_OS_WIN32
@@ -70,6 +71,41 @@
}
/**
+ * e_display_help:
+ * @parent: a parent #GtkWindow or %NULL
+ * @link_id: help section to present or %NULL
+ *
+ * Opens the user documentation to the section given by @link_id, or to the
+ * table of contents if @link_id is %NULL. If the user documentation cannot
+ * be opened, it presents a dialog describing the error. The dialog is set
+ * as transient to @parent if @parent is non-%NULL.
+ **/
+void
+e_display_help (GtkWindow *parent,
+ const gchar *link_id)
+{
+ GtkWidget *dialog;
+ GError *error = NULL;
+
+ if (gnome_help_display ("evolution.xml", link_id, &error))
+ return;
+
+ dialog = gtk_message_dialog_new_with_markup (
+ parent, GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ "<big><b>%s</b></big>",
+ _("Could not display help for Evolution."));
+
+ gtk_message_dialog_format_secondary_text (
+ GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+
+ gtk_widget_destroy (dialog);
+ g_error_free (error);
+}
+
+/**
* e_load_ui_definition:
* @manager: a #GtkUIManager
* @basename: basename of the UI definition file
Modified: branches/kill-bonobo/e-util/e-util.h
==============================================================================
--- branches/kill-bonobo/e-util/e-util.h (original)
+++ branches/kill-bonobo/e-util/e-util.h Thu Aug 14 20:19:12 2008
@@ -42,6 +42,8 @@
} EFocus;
const gchar * e_get_user_data_dir (void);
+void e_display_help (GtkWindow *parent,
+ const gchar *link_id);
guint e_load_ui_definition (GtkUIManager *manager,
const gchar *basename);
Modified: branches/kill-bonobo/mail/em-config.c
==============================================================================
--- branches/kill-bonobo/mail/em-config.c (original)
+++ branches/kill-bonobo/mail/em-config.c Thu Aug 14 20:19:12 2008
@@ -33,7 +33,6 @@
#include "em-config.h"
#include "libedataserver/e-msgport.h"
-#include <e-util/e-icon-factory.h>
#include "em-utils.h"
#include "em-composer-utils.h"
Modified: branches/kill-bonobo/mail/em-event.c
==============================================================================
--- branches/kill-bonobo/mail/em-event.c (original)
+++ branches/kill-bonobo/mail/em-event.c Thu Aug 14 20:19:12 2008
@@ -32,7 +32,6 @@
#include "em-event.h"
#include "composer/e-msg-composer.h"
#include "libedataserver/e-msgport.h"
-#include <e-util/e-icon-factory.h>
#include <camel/camel-store.h>
#include <camel/camel-folder.h>
Modified: branches/kill-bonobo/mail/em-folder-browser.c
==============================================================================
--- branches/kill-bonobo/mail/em-folder-browser.c (original)
+++ branches/kill-bonobo/mail/em-folder-browser.c Thu Aug 14 20:19:12 2008
@@ -293,10 +293,19 @@
for (i = 0; emfb_view_items[i].search.id != -1; ++i) {
if (emfb_view_items[i].search.text) {
char *str;
+
str = e_str_without_underscores (_(emfb_view_items[i].search.text));
menu_item = gtk_image_menu_item_new_with_label (str);
- if (emfb_view_items[i].image)
- gtk_image_menu_item_set_image ((GtkImageMenuItem *)menu_item, e_icon_factory_get_image (emfb_view_items[i].image, E_ICON_SIZE_MENU));
+ if (emfb_view_items[i].image) {
+ GtkWidget *image;
+
+ image = gtk_image_new_from_icon_name (
+ emfb_view_items[i].image,
+ GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (
+ GTK_IMAGE_MENU_ITEM (menu_item),
+ image);
+ }
g_free (str);
} else {
menu_item = gtk_menu_item_new ();
@@ -351,8 +360,16 @@
char *str;
str = e_str_without_underscores (_(temp_view_items[i].search.text));
menu_item = gtk_image_menu_item_new_with_label (str);
- if (temp_view_items[i].image)
- gtk_image_menu_item_set_image ((GtkImageMenuItem *)menu_item, e_icon_factory_get_image (temp_view_items[i].image, E_ICON_SIZE_MENU));
+ if (temp_view_items[i].image) {
+ GtkWidget *image;
+
+ image = gtk_image_new_from_icon_name (
+ temp_view_items[i].image,
+ GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (
+ GTK_IMAGE_MENU_ITEM (menu_item),
+ image);
+ }
g_free (str);
} else {
menu_item = gtk_menu_item_new ();
Modified: branches/kill-bonobo/mail/em-folder-utils.c
==============================================================================
--- branches/kill-bonobo/mail/em-folder-utils.c (original)
+++ branches/kill-bonobo/mail/em-folder-utils.c Thu Aug 14 20:19:12 2008
@@ -51,7 +51,6 @@
#include "e-util/e-mktemp.h"
#include "e-util/e-request.h"
-#include "e-util/e-icon-factory.h"
#include "e-util/e-error.h"
Modified: branches/kill-bonobo/mail/em-format-hook.c
==============================================================================
--- branches/kill-bonobo/mail/em-format-hook.c (original)
+++ branches/kill-bonobo/mail/em-format-hook.c Thu Aug 14 20:19:12 2008
@@ -31,8 +31,6 @@
#include "em-format-hook.h"
-#include <e-util/e-icon-factory.h>
-
#include <glib/gi18n.h>
Modified: branches/kill-bonobo/mail/em-format-html-display.c
==============================================================================
--- branches/kill-bonobo/mail/em-format-html-display.c (original)
+++ branches/kill-bonobo/mail/em-format-html-display.c Thu Aug 14 20:19:12 2008
@@ -1181,15 +1181,16 @@
{
GtkWidget *icon, *button;
struct _smime_pobject *po = (struct _smime_pobject *)pobject;
- const char *name;
+ const char *icon_name;
/* FIXME: need to have it based on encryption and signing too */
if (po->valid->sign.status != 0)
- name = smime_sign_table[po->valid->sign.status].icon;
+ icon_name = smime_sign_table[po->valid->sign.status].icon;
else
- name = smime_encrypt_table[po->valid->encrypt.status].icon;
+ icon_name = smime_encrypt_table[po->valid->encrypt.status].icon;
- icon = e_icon_factory_get_image (name, E_ICON_SIZE_LARGE_TOOLBAR);
+ icon = gtk_image_new_from_icon_name (
+ icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_widget_show(icon);
button = gtk_button_new();
@@ -2371,7 +2372,8 @@
button = gtk_button_new();
hbox = gtk_hbox_new (FALSE, 0);
- img = e_icon_factory_get_image ("stock_show-all", E_ICON_SIZE_BUTTON);
+ img = gtk_image_new_from_icon_name (
+ "stock_show-all", GTK_ICON_SIZE_BUTTON);
label = gtk_label_new_with_mnemonic(_("View _Unformatted"));
g_object_set_data (G_OBJECT (button), "text-label", (gpointer)label);
gtk_box_pack_start (GTK_BOX (hbox), img, TRUE, TRUE, 2);
@@ -2390,7 +2392,8 @@
button = gtk_button_new();
hbox = gtk_hbox_new (FALSE, 0);
- img = e_icon_factory_get_image ("stock_open", E_ICON_SIZE_BUTTON);
+ img = gtk_image_new_from_stock (
+ GTK_STOCK_OPEN, GTK_ICON_SIZE_BUTTON);
label = gtk_label_new_with_mnemonic(_("O_pen With"));
gtk_box_pack_start (GTK_BOX (hbox), img, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 2);
Modified: branches/kill-bonobo/mail/em-format-html.c
==============================================================================
--- branches/kill-bonobo/mail/em-format-html.c (original)
+++ branches/kill-bonobo/mail/em-format-html.c Thu Aug 14 20:19:12 2008
@@ -497,6 +497,7 @@
}
instream = camel_http_stream_new(CAMEL_HTTP_METHOD_GET, ((EMFormat *)job->format)->session, url);
+ camel_http_stream_set_user_agent((CamelHttpStream *)instream, "CamelHttpStream/1.0 Evolution/" VERSION);
proxy = em_utils_get_proxy_uri();
camel_http_stream_set_proxy((CamelHttpStream *)instream, proxy);
g_free(proxy);
Modified: branches/kill-bonobo/mail/em-junk-hook.c
==============================================================================
--- branches/kill-bonobo/mail/em-junk-hook.c (original)
+++ branches/kill-bonobo/mail/em-junk-hook.c Thu Aug 14 20:19:12 2008
@@ -29,7 +29,6 @@
#include <glib.h>
#include "em-junk-hook.h"
#include "mail-session.h"
-#include <e-util/e-icon-factory.h>
#include "e-util/e-error.h"
#include "em-utils.h"
#include <camel/camel-junk-plugin.h>
Modified: branches/kill-bonobo/mail/em-menu.c
==============================================================================
--- branches/kill-bonobo/mail/em-menu.c (original)
+++ branches/kill-bonobo/mail/em-menu.c Thu Aug 14 20:19:12 2008
@@ -33,7 +33,6 @@
#include "em-menu.h"
#include "libedataserver/e-msgport.h"
-#include <e-util/e-icon-factory.h>
#include "em-utils.h"
#include "em-composer-utils.h"
Modified: branches/kill-bonobo/mail/em-network-prefs.c
==============================================================================
--- branches/kill-bonobo/mail/em-network-prefs.c (original)
+++ branches/kill-bonobo/mail/em-network-prefs.c Thu Aug 14 20:19:12 2008
@@ -42,7 +42,6 @@
#include "e-util/e-error.h"
#include "e-util/e-util-private.h"
-#include "e-util/e-icon-factory.h"
#include "mail-config.h"
#include "em-config.h"
Modified: branches/kill-bonobo/mail/em-popup.c
==============================================================================
--- branches/kill-bonobo/mail/em-popup.c (original)
+++ branches/kill-bonobo/mail/em-popup.c Thu Aug 14 20:19:12 2008
@@ -35,7 +35,6 @@
#include "em-popup.h"
#include "libedataserver/e-msgport.h"
-#include <e-util/e-icon-factory.h>
#include "em-utils.h"
#include "em-composer-utils.h"
Modified: branches/kill-bonobo/mail/mail-mt.c
==============================================================================
--- branches/kill-bonobo/mail/mail-mt.c (original)
+++ branches/kill-bonobo/mail/mail-mt.c Thu Aug 14 20:19:12 2008
@@ -71,8 +71,6 @@
gboolean cancelable;
};
-static GdkPixbuf *progress_icon = NULL;
-
/* mail_msg stuff */
#ifdef LOG_OPS
static FILE *log;
@@ -983,9 +981,6 @@
} else {
data->activity_state = 1;
- if (progress_icon == NULL)
- progress_icon = e_icon_factory_get_icon ("mail-unread", E_ICON_SIZE_MENU);
-
MAIL_MT_UNLOCK (mail_msg_lock);
if (msg->info->desc)
what = msg->info->desc (msg);
@@ -996,7 +991,7 @@
what = g_strdup("");
}
- data->activity_id = e_activity_handler_cancelable_operation_started (activity_handler, "evolution-mail", progress_icon, what, TRUE, (void (*) (gpointer)) camel_operation_cancel, msg->cancel);
+ data->activity_id = e_activity_handler_cancelable_operation_started (activity_handler, "evolution-mail", what, TRUE, (void (*) (gpointer)) camel_operation_cancel, msg->cancel);
g_free (what);
MAIL_MT_LOCK (mail_msg_lock);
Modified: branches/kill-bonobo/mail/mail-send-recv.c
==============================================================================
--- branches/kill-bonobo/mail/mail-send-recv.c (original)
+++ branches/kill-bonobo/mail/mail-send-recv.c Thu Aug 14 20:19:12 2008
@@ -46,7 +46,6 @@
#include "mail-send-recv.h"
#include "mail-folder-cache.h"
#include "em-event.h"
-#include <e-util/e-icon-factory.h>
#include <e-util/gconf-bridge.h>
#define d(x)
@@ -379,7 +378,6 @@
char *pretty_url;
EAccount *account;
EIterator *iter;
- GList *icon_list;
EMEventTargetSendReceive *target;
gd = (GtkDialog *)(send_recv_dialog = gtk_dialog_new_with_buttons(_("Send & Receive Mail"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL));
@@ -401,12 +399,7 @@
gtk_widget_show (cancel_button);
gtk_dialog_add_action_widget (gd, cancel_button, GTK_RESPONSE_CANCEL);
- icon_list = e_icon_factory_get_icon_list ("mail-send-receive");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (gd), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (GTK_WINDOW (gd), "mail-send-receive");
num_sources = 0;
@@ -487,8 +480,8 @@
} else if (info->timeout_id == 0)
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
- recv_icon = e_icon_factory_get_image (
- "mail-inbox", E_ICON_SIZE_LARGE_TOOLBAR);
+ recv_icon = gtk_image_new_from_icon_name (
+ "mail-inbox", GTK_ICON_SIZE_LARGE_TOOLBAR);
pretty_url = format_url (source->url, account->name);
label = gtk_label_new (NULL);
gtk_label_set_ellipsize (
@@ -564,8 +557,8 @@
} else if (info->timeout_id == 0)
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
- send_icon = e_icon_factory_get_image (
- "mail-outbox", E_ICON_SIZE_LARGE_TOOLBAR);
+ send_icon = gtk_image_new_from_icon_name (
+ "mail-outbox", GTK_ICON_SIZE_LARGE_TOOLBAR);
pretty_url = format_url (destination, NULL);
label = gtk_label_new (NULL);
gtk_label_set_ellipsize (
Modified: branches/kill-bonobo/mail/message-list.c
==============================================================================
--- branches/kill-bonobo/mail/message-list.c (original)
+++ branches/kill-bonobo/mail/message-list.c Thu Aug 14 20:19:12 2008
@@ -110,6 +110,7 @@
gboolean destroyed;
gboolean thread_latest;
+ gboolean any_row_changed; /* save state before regen list when this is set to true */
};
static struct {
@@ -1797,32 +1798,29 @@
filename = mail_config_folder_to_cachename(ml->folder, "et-expanded-");
e_tree_save_expanded_state(ml->tree, filename);
g_free(filename);
+
+ ml->priv->any_row_changed = FALSE;
}
static void
-load_tree_expand_all (MessageList *ml, gboolean state)
+load_tree_state (MessageList *ml, xmlDoc *expand_state)
{
-
if (ml->folder == NULL || ml->tree == NULL)
return;
- e_tree_load_all_expanded_state (ml->tree, state);
- save_tree_state (ml);
-}
-static void
-load_tree_state (MessageList *ml)
-{
- char *filename;
+ if (expand_state) {
+ e_tree_load_expanded_state_xml (ml->tree, expand_state);
+ } else {
+ char *filename;
- if (ml->folder == NULL || ml->tree == NULL)
- return;
+ filename = mail_config_folder_to_cachename (ml->folder, "et-expanded-");
+ e_tree_load_expanded_state (ml->tree, filename);
+ g_free (filename);
+ }
- filename = mail_config_folder_to_cachename (ml->folder, "et-expanded-");
- e_tree_load_expanded_state (ml->tree, filename);
- g_free (filename);
+ ml->priv->any_row_changed = FALSE;
}
-
void
message_list_save_state (MessageList *ml)
{
@@ -2172,6 +2170,12 @@
g_signal_emit (ml, message_list_signals[MESSAGE_LIST_SCROLLED], 0);
}
+static void
+on_model_row_changed (ETableModel *model, int row, MessageList *ml)
+{
+ ml->priv->any_row_changed = TRUE;
+}
+
/*
* GObject::init
*/
@@ -2212,6 +2216,7 @@
p->invisible = gtk_invisible_new();
p->destroyed = FALSE;
g_object_ref_sink(p->invisible);
+ p->any_row_changed = FALSE;
matom = gdk_atom_intern ("x-uid-list", FALSE);
gtk_selection_add_target(p->invisible, GDK_SELECTION_CLIPBOARD, matom, 0);
@@ -2367,6 +2372,25 @@
message_list_init_images ();
}
+static gboolean
+read_boolean_with_default (GConfClient *gconf, const char *key, gboolean def_value)
+{
+ GConfValue *value;
+ gboolean res;
+
+ g_return_val_if_fail (gconf != NULL, def_value);
+ g_return_val_if_fail (key != NULL, def_value);
+
+ value = gconf_client_get (gconf, key, NULL);
+ if (!value)
+ return def_value;
+
+ res = gconf_value_get_bool (value);
+ gconf_value_free (value);
+
+ return res;
+}
+
static void
message_list_construct (MessageList *message_list)
{
@@ -2400,11 +2424,11 @@
message_list);
e_tree_memory_set_expanded_default(E_TREE_MEMORY(message_list->model),
- gconf_client_get_bool (gconf,
- "/apps/evolution/mail/display/thread_expand",
- NULL));
+ read_boolean_with_default (gconf,
+ "/apps/evolution/mail/display/thread_expand",
+ TRUE));
- message_list->priv->thread_latest = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/thread_latest", NULL);
+ message_list->priv->thread_latest = read_boolean_with_default (gconf, "/apps/evolution/mail/display/thread_latest", TRUE);
/*
* The etree
@@ -2429,6 +2453,8 @@
atk_object_set_name(a11y, _("Messages"));
}
+ g_signal_connect (e_tree_get_table_adapter (message_list->tree), "model_row_changed", G_CALLBACK (on_model_row_changed), message_list);
+
g_signal_connect((message_list->tree), "cursor_activated",
G_CALLBACK (on_cursor_activated_cmd),
message_list);
@@ -3869,6 +3895,8 @@
GPtrArray *summary;
int last_row; /* last selected (cursor) row */
+
+ xmlDoc *expand_state; /* stored expanded state of the previous view */
};
/*
@@ -4116,10 +4144,19 @@
e_profile_event_emit("list.buildtree", m->folder->full_name, 0);
if (m->dotree) {
- if (m->ml->just_set_folder)
+ gboolean forcing_expand_state = m->ml->expand_all || m->ml->collapse_all;
+
+ if (m->ml->just_set_folder) {
m->ml->just_set_folder = FALSE;
- else /* Saving the tree state causes bug 352695 but fixes bug 387312 */
- save_tree_state (m->ml);
+ if (m->expand_state) {
+ /* rather load state from disk than use the memory data when changing folders */
+ xmlFreeDoc (m->expand_state);
+ m->expand_state = NULL;
+ }
+ }
+
+ if (forcing_expand_state)
+ e_tree_force_expanded_state (m->ml->tree, m->ml->expand_all ? 1 : -1);
build_tree (m->ml, m->tree, m->changes);
if (m->ml->thread_tree)
@@ -4127,12 +4164,13 @@
m->ml->thread_tree = m->tree;
m->tree = NULL;
- if (m->ml->expand_all)
- load_tree_expand_all (m->ml, TRUE);
- else if (m->ml->collapse_all)
- load_tree_expand_all (m->ml, FALSE);
- else
- load_tree_state (m->ml);
+ if (forcing_expand_state) {
+ if (m->ml->folder != NULL && m->ml->tree != NULL)
+ save_tree_state (m->ml);
+ /* do not forget to set this back to use the default value... */
+ e_tree_force_expanded_state (m->ml->tree, 0);
+ } else
+ load_tree_state (m->ml, m->expand_state);
m->ml->expand_all = 0;
m->ml->collapse_all = 0;
@@ -4177,6 +4215,7 @@
e_tree_set_info_message (m->ml->tree, NULL);
g_signal_emit (m->ml, message_list_signals[MESSAGE_LIST_BUILT], 0);
+ m->ml->priv->any_row_changed = FALSE;
}
static void
@@ -4206,6 +4245,9 @@
/* we have to poke this here as well since we might've been cancelled and regened wont get called */
m->ml->regen = g_list_remove(m->ml->regen, m);
+ if (m->expand_state)
+ xmlFreeDoc (m->expand_state);
+
g_object_unref(m->ml);
}
@@ -4304,6 +4346,7 @@
m->folder = ml->folder;
camel_object_ref(m->folder);
m->last_row = -1;
+ m->expand_state = NULL;
if ((!m->hidedel || !m->dotree) && ml->thread_tree) {
camel_folder_thread_messages_unref(ml->thread_tree);
@@ -4320,6 +4363,13 @@
e_tree_set_info_message (m->ml->tree, txt);
g_free (txt);
+ } else if (ml->priv->any_row_changed && m->dotree && !ml->just_set_folder && (!ml->search || g_str_equal (ml->search, " "))) {
+ /* there has been some change on any row, if it was an expand state change,
+ then let it save; if not, then nothing happen. */
+ message_list_save_state (ml);
+ } else if (m->dotree && !ml->just_set_folder) {
+ /* remember actual expand state and restore it after regen */
+ m->expand_state = e_tree_save_expanded_state_xml (ml->tree);
}
/* if we're busy already kick off timeout processing, so normal updates are immediate */
Modified: branches/kill-bonobo/mail/message-tag-followup.c
==============================================================================
--- branches/kill-bonobo/mail/message-tag-followup.c (original)
+++ branches/kill-bonobo/mail/message-tag-followup.c Thu Aug 14 20:19:12 2008
@@ -35,7 +35,6 @@
#include <libgnomeui/gnome-pixmap.h>
#include <glib/gi18n.h>
-#include "e-util/e-icon-factory.h"
#include "e-util/e-util-private.h"
#include "misc/e-dateedit.h"
@@ -271,19 +270,13 @@
GtkWidget *widget;
GList *strings;
GladeXML *gui;
- GList *icon_list;
- GdkPixbuf *pixbuf;
int i;
char *gladefile;
gtk_window_set_title (GTK_WINDOW (editor), _("Flag to Follow Up"));
- icon_list = e_icon_factory_get_icon_list ("stock_mail-flag-for-followup");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (editor), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
+ gtk_window_set_icon_name (
+ GTK_WINDOW (editor), "stock_mail-flag-for-followup");
gtk_dialog_set_has_separator (GTK_DIALOG (editor), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (editor)->vbox), 0);
@@ -302,9 +295,9 @@
gtk_box_set_child_packing (GTK_BOX (GTK_DIALOG (editor)->vbox), widget, TRUE, TRUE, 6, GTK_PACK_START);
widget = glade_xml_get_widget (gui, "pixmap");
- pixbuf = e_icon_factory_get_icon ("stock_mail-flag-for-followup", E_ICON_SIZE_DIALOG);
- gtk_image_set_from_pixbuf ((GtkImage *)widget, pixbuf);
- g_object_unref (pixbuf);
+ gtk_image_set_from_icon_name (
+ GTK_IMAGE (widget), "stock_mail-flag-for-followup",
+ GTK_ICON_SIZE_DIALOG);
followup->message_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "message_list"));
model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
Modified: branches/kill-bonobo/mail/searchtypes.xml
==============================================================================
--- branches/kill-bonobo/mail/searchtypes.xml (original)
+++ branches/kill-bonobo/mail/searchtypes.xml Thu Aug 14 20:19:12 2008
@@ -462,6 +462,21 @@
</rule>
<rule grouping="any" source="demand">
+ <_title>Subject or Recipients contains</_title>
+ <partset>
+ <part name="subject">
+ <value name="subject-type" type="option" value="contains"/>
+ <value name="subject" type="string"/>
+ </part>
+ <part name="to">
+ <value name="recipient-type" type="option" value="contains"/>
+ <value name="recipient" type="address"/>
+ </part>
+ </partset>
+ <sources/>
+ </rule>
+
+ <rule grouping="any" source="demand">
<_title>Recipients contain</_title>
<partset>
<part name="to">
Modified: branches/kill-bonobo/plugins/attachment-reminder/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/attachment-reminder/Makefile.am (original)
+++ branches/kill-bonobo/plugins/attachment-reminder/Makefile.am Thu Aug 14 20:19:12 2008
@@ -19,7 +19,12 @@
plugin_LTLIBRARIES = liborg-gnome-evolution-attachment-reminder.la
liborg_gnome_evolution_attachment_reminder_la_SOURCES = attachment-reminder.c
-liborg_gnome_evolution_attachment_reminder_la_LDFLAGS = -module -avoid-version
+liborg_gnome_evolution_attachment_reminder_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_evolution_attachment_reminder_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/widgets/misc/libemiscwidgets.la \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(EVOLUTION_MAIL_LIBS)
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_in_files = apps-evolution-attachment-reminder.schemas.in
@@ -27,12 +32,25 @@
@INTLTOOL_SCHEMAS_RULE@
+if OS_WIN32
install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
- done \
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ (echo set GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE); \
+ echo $(GCONFTOOL) --makefile-install-rule $$p) >_temp.bat; \
+ cmd /c _temp.bat; \
+ rm _temp.bat; \
+ done \
fi
+else
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-install-rule $$p; \
+ done \
+ fi
+endif
EXTRA_DIST = org-gnome-evolution-attachment-reminder.eplug.xml \
org-gnome-attachment-reminder.error.xml \
Modified: branches/kill-bonobo/plugins/audio-inline/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/audio-inline/Makefile.am (original)
+++ branches/kill-bonobo/plugins/audio-inline/Makefile.am Thu Aug 14 20:19:12 2008
@@ -9,8 +9,10 @@
plugin_LTLIBRARIES = liborg-gnome-audio-inline.la
liborg_gnome_audio_inline_la_SOURCES = audio-inline.c
-liborg_gnome_audio_inline_la_LDFLAGS = -module -avoid-version
-liborg_gnome_audio_inline_la_LIBADD = $(GSTREAMER_LIBS)
+liborg_gnome_audio_inline_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_audio_inline_la_LIBADD = \
+ $(GSTREAMER_LIBS) \
+ $(EVOLUTION_MAIL_LIBS)
EXTRA_DIST = org-gnome-audio-inline.eplug.xml
Modified: branches/kill-bonobo/plugins/audio-inline/audio-inline.c
==============================================================================
--- branches/kill-bonobo/plugins/audio-inline/audio-inline.c (original)
+++ branches/kill-bonobo/plugins/audio-inline/audio-inline.c Thu Aug 14 20:19:12 2008
@@ -12,7 +12,6 @@
#include <gtk/gtk.h>
#include <glib/gstdio.h>
-#include "e-util/e-icon-factory.h"
#include "e-util/e-mktemp.h"
#include "camel/camel-medium.h"
#include "camel/camel-mime-part.h"
Modified: branches/kill-bonobo/plugins/backup-restore/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/backup-restore/Makefile.am (original)
+++ branches/kill-bonobo/plugins/backup-restore/Makefile.am Thu Aug 14 20:19:12 2008
@@ -18,7 +18,9 @@
plugin_LTLIBRARIES = liborg-gnome-backup-restore.la
liborg_gnome_backup_restore_la_SOURCES = backup-restore.c
-liborg_gnome_backup_restore_la_LDFLAGS = -module -avoid-version
+liborg_gnome_backup_restore_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_backup_restore_la_LIBADD = \
+ $(EVOLUTION_MAIL_LIBS)
privlibexec_PROGRAMS = evolution-backup
evolution_backup_SOURCES = backup.c
Modified: branches/kill-bonobo/plugins/bbdb/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/bbdb/Makefile.am (original)
+++ branches/kill-bonobo/plugins/bbdb/Makefile.am Thu Aug 14 20:19:12 2008
@@ -10,7 +10,10 @@
plugin_LTLIBRARIES = liborg-gnome-evolution-bbdb.la
liborg_gnome_evolution_bbdb_la_SOURCES = bbdb.c bbdb.h gaimbuddies.c
-liborg_gnome_evolution_bbdb_la_LDFLAGS = -module -avoid-version
+liborg_gnome_evolution_bbdb_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_evolution_bbdb_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(EVOLUTION_ADDRESSBOOK_LIBS)
EXTRA_DIST = org-gnome-evolution-bbdb.eplug.xml
Modified: branches/kill-bonobo/plugins/copy-tool/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/copy-tool/Makefile.am (original)
+++ branches/kill-bonobo/plugins/copy-tool/Makefile.am Thu Aug 14 20:19:12 2008
@@ -8,7 +8,9 @@
plugin_LTLIBRARIES = liborg-gnome-copy-tool.la
liborg_gnome_copy_tool_la_SOURCES = copy-tool.c
-liborg_gnome_copy_tool_la_LDFLAGS = -module -avoid-version
+liborg_gnome_copy_tool_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_copy_tool_la_LIBADD = \
+ $(EVOLUTION_MAIL_LIBS)
EXTRA_DIST = org-gnome-copy-tool.eplug.xml
Modified: branches/kill-bonobo/plugins/default-mailer/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/default-mailer/Makefile.am (original)
+++ branches/kill-bonobo/plugins/default-mailer/Makefile.am Thu Aug 14 20:19:12 2008
@@ -12,7 +12,10 @@
plugin_LTLIBRARIES = liborg-gnome-default-mailer.la
liborg_gnome_default_mailer_la_SOURCES = default-mailer.c
-liborg_gnome_default_mailer_la_LDFLAGS = -module -avoid-version
+liborg_gnome_default_mailer_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_default_mailer_la_LIBADD = \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(EVOLUTION_MAIL_LIBS)
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_in_files = apps-evolution-mail-prompts-checkdefault.schemas.in
@@ -20,12 +23,25 @@
@INTLTOOL_SCHEMAS_RULE@
+if OS_WIN32
install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
- done \
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ (echo set GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE); \
+ echo $(GCONFTOOL) --makefile-install-rule $$p) >_temp.bat; \
+ cmd /c _temp.bat; \
+ rm _temp.bat; \
+ done \
fi
+else
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-install-rule $$p; \
+ done \
+ fi
+endif
EXTRA_DIST = \
org-gnome-default-mailer.eplug.xml \
Modified: branches/kill-bonobo/plugins/email-custom-header/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/email-custom-header/Makefile.am (original)
+++ branches/kill-bonobo/plugins/email-custom-header/Makefile.am Thu Aug 14 20:19:12 2008
@@ -24,6 +24,7 @@
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
$(top_builddir)/mail/libevolution-mail.la \
+ $(EVOLUTION_MAIL_LIBS) \
$(NO_UNDEFINED_REQUIRED_LIBS)
liborg_gnome_email_custom_header_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
@@ -34,12 +35,25 @@
@INTLTOOL_SCHEMAS_RULE@
+if OS_WIN32
install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
- done \
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ (echo set GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE); \
+ echo $(GCONFTOOL) --makefile-install-rule $$p) >_temp.bat; \
+ cmd /c _temp.bat; \
+ rm _temp.bat; \
+ done \
fi
+else
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-install-rule $$p; \
+ done \
+ fi
+endif
glade_DATA = \
org-gnome-email-custom-header.glade \
Modified: branches/kill-bonobo/plugins/email-custom-header/email-custom-header.c
==============================================================================
--- branches/kill-bonobo/plugins/email-custom-header/email-custom-header.c (original)
+++ branches/kill-bonobo/plugins/email-custom-header/email-custom-header.c Thu Aug 14 20:19:12 2008
@@ -26,7 +26,6 @@
#include <glib/gi18n.h>
#include <gconf/gconf-client.h>
#include <e-util/e-error.h>
-#include <libgnome/libgnome.h>
#include <glade/glade.h>
#include "mail/em-menu.h"
#include "mail/em-utils.h"
@@ -34,6 +33,7 @@
#include "composer/e-msg-composer.h"
#include "libedataserver/e-account.h"
#include "e-util/e-config.h"
+#include "e-util/e-util.h"
#include "email-custom-header.h"
@@ -197,7 +197,6 @@
{
EmailCustomHeaderOptionsDialogPrivate *priv;
CustomHeaderOptionsDialog *mch;
- GError *error = NULL;
mch = func_data;
priv = mch->priv;
@@ -211,12 +210,9 @@
g_object_unref (priv->xml);
break;
case GTK_RESPONSE_HELP:
- gnome_help_display (
- "evolution.xml", priv->help_section, &error);
- if (error) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ e_display_help (
+ GTK_WINDOW (priv->main),
+ priv->help_section);
break;
}
Modified: branches/kill-bonobo/plugins/exchange-operations/exchange-send-options.c
==============================================================================
--- branches/kill-bonobo/plugins/exchange-operations/exchange-send-options.c (original)
+++ branches/kill-bonobo/plugins/exchange-operations/exchange-send-options.c Thu Aug 14 20:19:12 2008
@@ -26,9 +26,8 @@
#include <libedataserverui/e-name-selector.h>
#include <libedataserverui/e-contact-store.h>
#include "exchange-operations.h"
+#include <e-util/e-util.h>
#include <e-util/e-error.h>
-#include <libgnome/libgnome.h>
-#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include "e-util/e-util-private.h"
@@ -280,7 +279,6 @@
{
ExchangeSendOptionsDialogPrivate *priv;
ExchangeSendOptionsDialog *sod;
- GError *error = NULL;
sod = func_data;
priv = sod->priv;
@@ -295,12 +293,9 @@
g_object_unref (priv->xml);
break;
case GTK_RESPONSE_HELP:
- gnome_help_display (
- "evolution.xml", priv->help_section, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ e_display_help (
+ GTK_WINDOW (priv->main),
+ priv->help_section);
break;
}
g_signal_emit (G_OBJECT (func_data), signals[SOD_RESPONSE], 0, state);
Modified: branches/kill-bonobo/plugins/folder-unsubscribe/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/folder-unsubscribe/Makefile.am (original)
+++ branches/kill-bonobo/plugins/folder-unsubscribe/Makefile.am Thu Aug 14 20:19:12 2008
@@ -8,6 +8,9 @@
plugin_LTLIBRARIES = liborg-gnome-mail-folder-unsubscribe.la
liborg_gnome_mail_folder_unsubscribe_la_SOURCES = folder-unsubscribe.c
-liborg_gnome_mail_folder_unsubscribe_la_LDFLAGS = -module -avoid-version
+liborg_gnome_mail_folder_unsubscribe_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_mail_folder_unsubscribe_la_LIBADD = \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(EVOLUTION_MAIL_LIBS)
EXTRA_DIST = org-gnome-mail-folder-unsubscribe.eplug.xml
Modified: branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.c
==============================================================================
--- branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.c (original)
+++ branches/kill-bonobo/plugins/google-account-setup/google-contacts-source.c Thu Aug 14 20:19:12 2008
@@ -117,34 +117,102 @@
}
static void
-on_update_cb_toggled (GtkToggleButton *tb, gpointer user_data)
+on_ssl_cb_toggled (GtkToggleButton *tb, gpointer user_data)
{
ESource *source = user_data;
- GtkWidget *sb = g_object_get_data (G_OBJECT (tb), "sb");
- gtk_widget_set_sensitive (sb, gtk_toggle_button_get_active (tb));
if (gtk_toggle_button_get_active (tb)) {
- gdouble value;
- char *value_string;
-
- value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (sb));
- value_string = g_strdup_printf ("%d", (int)(value * 60.0));
- e_source_set_property (source, "refresh-interval", value_string);
- g_free (value_string);
+ e_source_set_property (source, "use-ssl", "true");
} else {
- e_source_set_property (source, "refresh-interval", "-1");
+ e_source_set_property (source, "use-ssl", "false");
}
}
+typedef enum {
+ MINUTES,
+ HOURS,
+ DAYS,
+ WEEKS
+} IntervalType;
+
+static void
+seconds_to_interval (guint seconds, IntervalType *type, int *time)
+{
+ int minutes = seconds / 60;
+
+ *type = MINUTES;
+ *time = minutes;
+ if (minutes && !(minutes % 10080)) {
+ *type = WEEKS;
+ *time = minutes / 10080;
+ } else if (minutes && !(minutes % 1440)) {
+ *type = DAYS;
+ *time = minutes / 1440;
+ } else if (minutes && !(minutes % 60)) {
+ *type = HOURS;
+ *time = minutes / 60;
+ }
+}
+
+static guint
+interval_to_seconds (IntervalType type, int time)
+{
+ switch (type) {
+ case MINUTES:
+ return time * 60;
+ case HOURS:
+ return time * 60 * 60;
+ case DAYS:
+ return time * 60 * 60 * 24;
+ case WEEKS:
+ return time * 60 * 60 * 24 * 7;
+ default:
+ g_warning ("Time unit out of range");
+ break;
+ }
+ return 0;
+}
+
static void
on_interval_sb_value_changed (GtkSpinButton *sb, gpointer user_data)
{
ESource *source = user_data;
- gdouble value;
+ gdouble time;
+ guint seconds;
+ char *value_string;
+ GtkWidget *interval_combo;
+ IntervalType type;
+
+ interval_combo = g_object_get_data (G_OBJECT (sb), "interval-combo");
+ type = gtk_combo_box_get_active (GTK_COMBO_BOX (interval_combo));
+
+ time = gtk_spin_button_get_value (sb);
+
+ seconds = interval_to_seconds (type, time);
+
+ value_string = g_strdup_printf ("%u", seconds);
+ e_source_set_property (source, "refresh-interval", value_string);
+ g_free (value_string);
+}
+
+static void
+on_interval_combo_changed (GtkComboBox *combo, gpointer user_data)
+{
+ ESource *source = user_data;
+ gdouble time;
+ guint seconds;
char *value_string;
+ GtkWidget *sb;
+ IntervalType type;
+
+ sb = g_object_get_data (G_OBJECT (combo), "interval-sb");
+ type = gtk_combo_box_get_active (combo);
+
+ time = gtk_spin_button_get_value (GTK_SPIN_BUTTON (sb));
+
+ seconds = interval_to_seconds (type, time);
- value = gtk_spin_button_get_value (sb);
- value_string = g_strdup_printf ("%d", (int)(value * 60.0));
+ value_string = g_strdup_printf ("%u", seconds);
e_source_set_property (source, "refresh-interval", value_string);
g_free (value_string);
}
@@ -159,7 +227,9 @@
const char *base_uri;
const char *username;
const char *refresh_interval_str;
- int refresh_interval;
+ guint refresh_interval;
+ const char *use_ssl_str;
+ gboolean use_ssl;
GtkWidget *parent;
GtkWidget *vbox;
@@ -171,18 +241,18 @@
GtkWidget *label;
GtkWidget *username_entry;
- GtkWidget *update_cb;
GtkWidget *interval_sb;
+ GtkWidget *interval_combo;
+ IntervalType type;
+ int time;
+ GtkWidget *ssl_cb;
source = t->source;
group = e_source_peek_group (source);
base_uri = e_source_group_peek_base_uri (group);
- g_object_set_data_full (G_OBJECT (epl), "widget", NULL,
- (GDestroyNotify)gtk_widget_destroy);
-
if (strcmp (base_uri, "google://")) {
return NULL;
}
@@ -205,7 +275,7 @@
spacer = gtk_label_new (" ");
gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
- label = gtk_label_new (_("Username:"));
+ label = gtk_label_new_with_mnemonic (_("User_name:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
username_entry = gtk_entry_new ();
@@ -221,43 +291,59 @@
spacer = gtk_label_new (" ");
gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
+ use_ssl_str = e_source_get_property (source, "use-ssl");
+ if (use_ssl_str && ('1' == use_ssl_str[0] ||
+ 0 == g_ascii_strcasecmp (use_ssl_str, "true"))) {
+ use_ssl = 1;
+ } else {
+ use_ssl = 0;
+ }
+ ssl_cb = gtk_check_button_new_with_mnemonic (_("Use _SSL"));
+ gtk_box_pack_start (GTK_BOX (hbox), ssl_cb, FALSE, FALSE, 0);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ssl_cb),
+ use_ssl);
+
+ hbox = gtk_hbox_new (FALSE, 10);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
+
+ spacer = gtk_label_new (" ");
+ gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
+
refresh_interval_str = e_source_get_property (source, "refresh-interval");
if (refresh_interval_str &&
- (1 == sscanf (refresh_interval_str, "%d", &refresh_interval))) {
+ (1 == sscanf (refresh_interval_str, "%u", &refresh_interval))) {
} else {
refresh_interval = -1;
}
+ seconds_to_interval (refresh_interval, &type, &time);
- /* Translators: This is the first half of the sentence "Update
- * every NNN minute(s)", where NNN is a spin button widget. */
- update_cb = gtk_check_button_new_with_label (_("Update every"));
- gtk_box_pack_start (GTK_BOX (hbox), update_cb, FALSE, FALSE, 0);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (update_cb),
- refresh_interval > 0);
-
- interval_sb = gtk_spin_button_new_with_range (1, 60, 1);
- gtk_widget_set_sensitive (interval_sb,
- refresh_interval > 0);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (interval_sb),
- refresh_interval > 0 ? refresh_interval / 60 : 30);
+ label = gtk_label_new_with_mnemonic (_("Re_fresh:"));
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+ interval_sb = gtk_spin_button_new_with_range (1, 100, 1);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (interval_sb), time);
gtk_box_pack_start (GTK_BOX (hbox), interval_sb, FALSE, FALSE, 0);
- /* Translators: This is the second half of the sentence "Update
- * every NNN minute(s)", where NNN is a spin button widget. */
- label = gtk_label_new (_("minute(s)"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+ interval_combo = gtk_combo_box_new_text ();
+ gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("minutes"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("hours"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("days"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (interval_combo), _("weeks"));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (interval_combo), type);
+ gtk_box_pack_start (GTK_BOX (hbox), interval_combo, FALSE, FALSE, 0);
gtk_widget_show_all (vbox2);
- g_object_set_data (G_OBJECT (update_cb), "sb", interval_sb);
- g_object_set_data_full (G_OBJECT (epl), "widget", vbox2,
- (GDestroyNotify)gtk_widget_destroy);
-
+ g_object_set_data (G_OBJECT (interval_sb), "interval-combo", interval_combo);
+ g_object_set_data (G_OBJECT (interval_combo), "interval-sb", interval_sb);
g_signal_connect (G_OBJECT (username_entry), "changed",
G_CALLBACK (on_username_entry_changed),
source);
- g_signal_connect (G_OBJECT (update_cb), "toggled",
- G_CALLBACK (on_update_cb_toggled),
+ g_signal_connect (G_OBJECT (interval_combo), "changed",
+ G_CALLBACK (on_interval_combo_changed),
+ source);
+ g_signal_connect (G_OBJECT (ssl_cb), "toggled",
+ G_CALLBACK (on_ssl_cb_toggled),
source);
g_signal_connect (G_OBJECT (interval_sb), "value-changed",
G_CALLBACK (on_interval_sb_value_changed),
Modified: branches/kill-bonobo/plugins/import-ics-attachments/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/import-ics-attachments/Makefile.am (original)
+++ branches/kill-bonobo/plugins/import-ics-attachments/Makefile.am Thu Aug 14 20:19:12 2008
@@ -24,6 +24,8 @@
liborg_gnome_evolution_mail_attachments_import_ics_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/mail/libevolution-mail.la \
+ $(top_builddir)/calendar/common/libevolution-calendarprivate.la \
+ $(EVOLUTION_CALENDAR_LIBS) \
$(EVOLUTION_MAIL_LIBS)
EXTRA_DIST = org-gnome-evolution-mail-attachments-import-ics.eplug.xml
Modified: branches/kill-bonobo/plugins/import-ics-attachments/icsimporter.c
==============================================================================
--- branches/kill-bonobo/plugins/import-ics-attachments/icsimporter.c (original)
+++ branches/kill-bonobo/plugins/import-ics-attachments/icsimporter.c Thu Aug 14 20:19:12 2008
@@ -38,7 +38,6 @@
#include "e-attachment-bar.h"
#include <camel/camel-vee-folder.h>
#include "e-util/e-error.h"
-#include "e-util/e-icon-factory.h"
#include <libedataserverui/e-source-selector.h>
#include <libecal/e-cal.h>
#include <libical/icalvcal.h>
@@ -254,7 +253,8 @@
g_object_unref (source_list);
hbox = gtk_hbox_new (FALSE, FALSE);
- icon = e_icon_factory_get_image ("stock_mail-import", E_ICON_SIZE_MENU);
+ icon = gtk_image_new_from_icon_name (
+ "stock_mail-import", GTK_ICON_SIZE_MENU);
gtk_box_pack_start (GTK_BOX(hbox), icon, FALSE, FALSE, 6);
label = gtk_label_new_with_mnemonic (_("_Import"));
gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 6);
Modified: branches/kill-bonobo/plugins/ipod-sync/ipod-sync.c
==============================================================================
--- branches/kill-bonobo/plugins/ipod-sync/ipod-sync.c (original)
+++ branches/kill-bonobo/plugins/ipod-sync/ipod-sync.c Thu Aug 14 20:19:12 2008
@@ -32,6 +32,7 @@
#include <glib.h>
#include <gio/gio.h>
#include <glib/gi18n.h>
+#include <unistd.h>
#include <libebook/e-book.h>
#include <libebook/e-contact.h>
Modified: branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c
==============================================================================
--- branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c (original)
+++ branches/kill-bonobo/plugins/itip-formatter/itip-formatter.c Thu Aug 14 20:19:12 2008
@@ -50,7 +50,6 @@
#include <mail/mail-tools.h>
#include <mail/mail-mt.h>
#include <libedataserver/e-account-list.h>
-#include <e-util/e-icon-factory.h>
#include <e-util/e-error.h>
#include <calendar/gui/calendar-config.h>
#include <calendar/gui/itip-utils.h>
Modified: branches/kill-bonobo/plugins/itip-formatter/itip-view.c
==============================================================================
--- branches/kill-bonobo/plugins/itip-formatter/itip-view.c (original)
+++ branches/kill-bonobo/plugins/itip-formatter/itip-view.c Thu Aug 14 20:19:12 2008
@@ -40,7 +40,6 @@
#include <mail/em-format-hook.h>
#include <mail/em-format-html.h>
#include <libedataserver/e-account-list.h>
-#include <e-util/e-icon-factory.h>
#include <e-util/e-util.h>
#include <calendar/gui/itip-utils.h>
#include "itip-view.h"
@@ -723,7 +722,7 @@
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_SMALL_TOOLBAR);
break;
case ITIP_VIEW_INFO_ITEM_TYPE_PROGRESS:
- image = e_icon_factory_get_image ("stock_animation", E_ICON_SIZE_BUTTON);
+ image = gtk_image_new_from_icon_name ("stock_animation", GTK_ICON_SIZE_BUTTON);
break;
case ITIP_VIEW_INFO_ITEM_TYPE_NONE:
default:
@@ -963,7 +962,8 @@
gtk_box_set_spacing (GTK_BOX (view), 12);
/* The meeting icon */
- icon = e_icon_factory_get_image (MEETING_ICON, E_ICON_SIZE_LARGE_TOOLBAR);
+ icon = gtk_image_new_from_icon_name (
+ MEETING_ICON, GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0);
gtk_widget_show (icon);
Modified: branches/kill-bonobo/plugins/mail-notification/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/mail-notification/Makefile.am (original)
+++ branches/kill-bonobo/plugins/mail-notification/Makefile.am Thu Aug 14 20:19:12 2008
@@ -29,12 +29,25 @@
@INTLTOOL_SCHEMAS_RULE@
+if OS_WIN32
install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
- done \
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ (echo set GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE); \
+ echo $(GCONFTOOL) --makefile-install-rule $$p) >_temp.bat; \
+ cmd /c _temp.bat; \
+ rm _temp.bat; \
+ done \
fi
+else
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-install-rule $$p; \
+ done \
+ fi
+endif
BUILT_SOURCES = $(plugin_DATA)
Modified: branches/kill-bonobo/plugins/mail-notification/mail-notification.c
==============================================================================
--- branches/kill-bonobo/plugins/mail-notification/mail-notification.c (original)
+++ branches/kill-bonobo/plugins/mail-notification/mail-notification.c Thu Aug 14 20:19:12 2008
@@ -38,7 +38,6 @@
#include <time.h>
#include "e-util/e-config.h"
-#include "e-util/e-icon-factory.h"
#include "mail/em-utils.h"
#include "mail/em-event.h"
#include "mail/em-folder-tree-model.h"
@@ -449,7 +448,7 @@
if (new_icon) {
status_icon = gtk_status_icon_new ();
- gtk_status_icon_set_from_pixbuf (status_icon, e_icon_factory_get_icon ("mail-unread", E_ICON_SIZE_LARGE_TOOLBAR));
+ gtk_status_icon_set_from_icon_name (status_icon, "mail-unread");
}
if (!status_count) {
Modified: branches/kill-bonobo/plugins/mail-to-meeting/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/mail-to-meeting/Makefile.am (original)
+++ branches/kill-bonobo/plugins/mail-to-meeting/Makefile.am Thu Aug 14 20:19:12 2008
@@ -8,7 +8,10 @@
plugin_LTLIBRARIES = liborg-gnome-mail-to-meeting.la
liborg_gnome_mail_to_meeting_la_SOURCES = mail-to-meeting.c
-liborg_gnome_mail_to_meeting_la_LDFLAGS = -module -avoid-version
+liborg_gnome_mail_to_meeting_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_mail_to_meeting_la_LIBADD = \
+ $(EVOLUTION_CALENDAR_LIBS) \
+ $(EVOLUTION_MAIL_LIBS)
EXTRA_DIST = org-gnome-mail-to-meeting.eplug.xml
Modified: branches/kill-bonobo/plugins/mail-to-task/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/mail-to-task/Makefile.am (original)
+++ branches/kill-bonobo/plugins/mail-to-task/Makefile.am Thu Aug 14 20:19:12 2008
@@ -8,7 +8,13 @@
plugin_LTLIBRARIES = liborg-gnome-mail-to-task.la
liborg_gnome_mail_to_task_la_SOURCES = mail-to-task.c
-liborg_gnome_mail_to_task_la_LDFLAGS = -module -avoid-version
+liborg_gnome_mail_to_task_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_mail_to_task_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/calendar/common/libevolution-calendarprivate.la \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(EVOLUTION_CALENDAR_LIBS) \
+ $(EVOLUTION_MAIL_LIBS)
EXTRA_DIST = org-gnome-mail-to-task.eplug.xml \
org-gnome-mail-to-task.xml
Modified: branches/kill-bonobo/plugins/mailing-list-actions/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/mailing-list-actions/Makefile.am (original)
+++ branches/kill-bonobo/plugins/mailing-list-actions/Makefile.am Thu Aug 14 20:19:12 2008
@@ -9,7 +9,11 @@
plugin_LTLIBRARIES = liborg-gnome-mailing-list-actions.la
liborg_gnome_mailing_list_actions_la_SOURCES = mailing-list-actions.c
-liborg_gnome_mailing_list_actions_la_LDFLAGS = -module -avoid-version
+liborg_gnome_mailing_list_actions_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_mailing_list_actions_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(EVOLUTION_MAIL_LIBS)
error_DATA = org-gnome-mailing-list-actions.error
errordir = $(privdatadir)/errors
Modified: branches/kill-bonobo/plugins/mark-calendar-offline/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/mark-calendar-offline/Makefile.am (original)
+++ branches/kill-bonobo/plugins/mark-calendar-offline/Makefile.am Thu Aug 14 20:19:12 2008
@@ -8,7 +8,9 @@
plugin_LTLIBRARIES = liborg-gnome-mark-calendar-offline.la
liborg_gnome_mark_calendar_offline_la_SOURCES = mark-calendar-offline.c
-liborg_gnome_mark_calendar_offline_la_LDFLAGS = -module -avoid-version
+liborg_gnome_mark_calendar_offline_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_mark_calendar_offline_la_LIBADD = \
+ $(EVOLUTION_CALENDAR_LIBS)
EXTRA_DIST = org-gnome-mark-calendar-offline.eplug.xml
Modified: branches/kill-bonobo/plugins/prefer-plain/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/prefer-plain/Makefile.am (original)
+++ branches/kill-bonobo/plugins/prefer-plain/Makefile.am Thu Aug 14 20:19:12 2008
@@ -8,7 +8,10 @@
plugin_LTLIBRARIES = liborg-gnome-prefer-plain.la
liborg_gnome_prefer_plain_la_SOURCES = prefer-plain.c
-liborg_gnome_prefer_plain_la_LDFLAGS = -module -avoid-version
+liborg_gnome_prefer_plain_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_prefer_plain_la_LIBADD = \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(EVOLUTION_MAIL_LIBS)
EXTRA_DIST = org-gnome-prefer-plain.eplug.xml
Modified: branches/kill-bonobo/plugins/save-calendar/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/save-calendar/Makefile.am (original)
+++ branches/kill-bonobo/plugins/save-calendar/Makefile.am Thu Aug 14 20:19:12 2008
@@ -14,7 +14,10 @@
rdf-format.c \
format-handler.h
-liborg_gnome_save_calendar_la_LDFLAGS = -module -avoid-version
+liborg_gnome_save_calendar_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_save_calendar_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(EVOLUTION_CALENDAR_LIBS)
EXTRA_DIST = org-gnome-save-calendar.eplug.xml
Modified: branches/kill-bonobo/plugins/select-one-source/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/select-one-source/Makefile.am (original)
+++ branches/kill-bonobo/plugins/select-one-source/Makefile.am Thu Aug 14 20:19:12 2008
@@ -8,7 +8,9 @@
plugin_LTLIBRARIES = liborg-gnome-select-one-source.la
liborg_gnome_select_one_source_la_SOURCES = select-one-source.c
-liborg_gnome_select_one_source_la_LDFLAGS = -module -avoid-version
+liborg_gnome_select_one_source_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_select_one_source_la_LIBADD = \
+ $(EVOLUTION_CALENDAR_LIBS)
EXTRA_DIST = org-gnome-select-one-source.eplug.xml
Modified: branches/kill-bonobo/plugins/startup-wizard/startup-wizard.c
==============================================================================
--- branches/kill-bonobo/plugins/startup-wizard/startup-wizard.c (original)
+++ branches/kill-bonobo/plugins/startup-wizard/startup-wizard.c Thu Aug 14 20:19:12 2008
@@ -23,7 +23,6 @@
#include <gtk/gtk.h>
#include <libgnomeui/libgnomeui.h>
#include "widgets/e-timezone-dialog/e-timezone-dialog.h"
-#include "e-util/e-icon-factory.h"
#include "e-util/e-error.h"
#include "e-util/e-import.h"
#include "shell/es-event.h"
Modified: branches/kill-bonobo/plugins/subject-thread/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/subject-thread/Makefile.am (original)
+++ branches/kill-bonobo/plugins/subject-thread/Makefile.am Thu Aug 14 20:19:12 2008
@@ -8,7 +8,9 @@
plugin_LTLIBRARIES = liborg-gnome-subject-thread.la
liborg_gnome_subject_thread_la_SOURCES = subject-thread.c
-liborg_gnome_subject_thread_la_LDFLAGS = -module -avoid-version
+liborg_gnome_subject_thread_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_subject_thread_la_LIBADD = \
+ $(EVOLUTION_MAIL_LIBS)
EXTRA_DIST = org-gnome-subject-thread.eplug.xml
Modified: branches/kill-bonobo/plugins/templates/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/templates/Makefile.am (original)
+++ branches/kill-bonobo/plugins/templates/Makefile.am Thu Aug 14 20:19:12 2008
@@ -15,7 +15,11 @@
plugin_LTLIBRARIES = liborg-gnome-templates.la
liborg_gnome_templates_la_SOURCES = templates.c
-liborg_gnome_templates_la_LDFLAGS = -module -avoid-version
+liborg_gnome_templates_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+liborg_gnome_templates_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(EVOLUTION_MAIL_LIBS)
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_in_files = apps-evolution-template-placeholders.schemas.in
@@ -23,12 +27,25 @@
@INTLTOOL_SCHEMAS_RULE@
+if OS_WIN32
install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
- done \
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ (echo set GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE); \
+ echo $(GCONFTOOL) --makefile-install-rule $$p) >_temp.bat; \
+ cmd /c _temp.bat; \
+ rm _temp.bat; \
+ done \
fi
+else
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-install-rule $$p; \
+ done \
+ fi
+endif
EXTRA_DIST = org-gnome-templates.eplug.xml \
$(schema_in_files) \
Modified: branches/kill-bonobo/plugins/webdav-account-setup/Makefile.am
==============================================================================
--- branches/kill-bonobo/plugins/webdav-account-setup/Makefile.am (original)
+++ branches/kill-bonobo/plugins/webdav-account-setup/Makefile.am Thu Aug 14 20:19:12 2008
@@ -12,7 +12,8 @@
webdav-contacts-source.c
liborg_gnome_evolution_webdav_la_LIBADD = \
- $(EPLUGIN_LIBS)
+ $(EPLUGIN_LIBS) \
+ $(EVOLUTION_ADDRESSBOOK_LIBS)
liborg_gnome_evolution_webdav_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
Modified: branches/kill-bonobo/shell/e-shell-nm-glib.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-nm-glib.c (original)
+++ branches/kill-bonobo/shell/e-shell-nm-glib.c Thu Aug 14 20:19:12 2008
@@ -26,9 +26,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <Evolution.h>
#include <libnm_glib.h>
-#include <e-shell-window.h>
+#include <e-shell.h>
static libnm_glib_ctx *nm_ctx = NULL;
static guint id = 0;
Modified: branches/kill-bonobo/widgets/misc/e-activity-handler.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-activity-handler.c (original)
+++ branches/kill-bonobo/widgets/misc/e-activity-handler.c Thu Aug 14 20:19:12 2008
@@ -39,7 +39,6 @@
struct _ActivityInfo {
char *component_id;
- GdkPixbuf *icon_pixbuf;
int error_type;
guint id;
char *information;
@@ -131,7 +130,6 @@
static ActivityInfo *
activity_info_new (const char *component_id,
guint id,
- GdkPixbuf *icon,
const char *information,
gboolean cancellable)
{
@@ -140,7 +138,6 @@
info = g_new (ActivityInfo, 1);
info->component_id = g_strdup (component_id);
info->id = id;
- info->icon_pixbuf = icon ? g_object_ref (icon): NULL;
info->information = g_strdup (information);
info->cancellable = cancellable;
info->progress = -1.0; /* (Unknown) */
@@ -155,9 +152,6 @@
activity_info_free (ActivityInfo *info)
{
g_free (info->component_id);
-
- if (info->icon_pixbuf)
- g_object_unref (info->icon_pixbuf);
g_free (info->information);
if (info->menu != NULL)
@@ -172,9 +166,11 @@
GtkWidget *widget;
ETaskWidget *etw;
- widget = e_task_widget_new_with_cancel (activity_info->icon_pixbuf,
- activity_info->component_id,
- activity_info->information, activity_info->cancel_func, activity_info->data);
+ widget = e_task_widget_new_with_cancel (
+ activity_info->component_id,
+ activity_info->information,
+ activity_info->cancel_func,
+ activity_info->data);
etw = (ETaskWidget *) widget;
etw->id = activity_info->id;
gtk_widget_show (widget);
@@ -411,7 +407,6 @@
/* CORBA methods. */
guint e_activity_handler_cancelable_operation_started (EActivityHandler *activity_handler,
const char *component_id,
- GdkPixbuf *icon_pixbuf,
const char *information,
gboolean cancellable,
void (*cancel_func)(gpointer),
@@ -426,7 +421,7 @@
priv = activity_handler->priv;
activity_id = get_new_activity_id (activity_handler);
- activity_info = activity_info_new (component_id, activity_id, icon_pixbuf, information, cancellable);
+ activity_info = activity_info_new (component_id, activity_id, information, cancellable);
data = g_new(struct _cancel_wdata, 1);
data->handler = activity_handler;
@@ -457,7 +452,6 @@
guint
e_activity_handler_operation_started (EActivityHandler *activity_handler,
const char *component_id,
- GdkPixbuf *icon_pixbuf,
const char *information,
gboolean cancellable)
{
@@ -470,7 +464,7 @@
activity_id = get_new_activity_id (activity_handler);
- activity_info = activity_info_new (component_id, activity_id, icon_pixbuf, information, cancellable);
+ activity_info = activity_info_new (component_id, activity_id, information, cancellable);
for (p = priv->task_bars; p != NULL; p = p->next) {
ETaskWidget *tw = task_widget_new_from_activity_info (activity_info);
@@ -558,7 +552,7 @@
priv = activity_handler->priv;
activity_id = get_new_activity_id (activity_handler);
- activity_info = activity_info_new (component_id, activity_id, NULL, information, TRUE);
+ activity_info = activity_info_new (component_id, activity_id, information, TRUE);
activity_info->error = error;
activity_info->error_time = time (NULL);
activity_info->error_type = error_type;
Modified: branches/kill-bonobo/widgets/misc/e-activity-handler.h
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-activity-handler.h (original)
+++ branches/kill-bonobo/widgets/misc/e-activity-handler.h Thu Aug 14 20:19:12 2008
@@ -71,12 +71,10 @@
guint e_activity_handler_operation_started (EActivityHandler *activity_handler,
const char *component_id,
- GdkPixbuf *icon_pixbuf,
const char *information,
gboolean cancellable);
guint e_activity_handler_cancelable_operation_started (EActivityHandler *activity_handler,
const char *component_id,
- GdkPixbuf *icon_pixbuf,
const char *information,
gboolean cancellable,
void (*cancel_func)(gpointer),
Modified: branches/kill-bonobo/widgets/misc/e-combo-button.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-combo-button.c (original)
+++ branches/kill-bonobo/widgets/misc/e-combo-button.c Thu Aug 14 20:19:12 2008
@@ -26,7 +26,6 @@
#include "e-combo-button.h"
#include "ea-widgets.h"
-#include <e-util/e-icon-factory.h>
struct _EComboButtonPrivate {
GdkPixbuf *icon;
@@ -461,7 +460,8 @@
gtk_container_add (GTK_CONTAINER (combo_button), priv->hbox);
gtk_widget_show (priv->hbox);
- priv->icon_image = e_icon_factory_get_image (NULL, E_ICON_SIZE_MENU);
+ priv->icon_image = gtk_image_new_from_stock (
+ GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_MENU);
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->icon_image, TRUE, TRUE, 0);
gtk_widget_show (priv->icon_image);
@@ -498,7 +498,8 @@
priv->vbox = gtk_vbox_new (FALSE, 0);
gtk_widget_show (priv->vbox);
- priv->icon_image = e_icon_factory_get_image (NULL, E_ICON_SIZE_MENU);
+ priv->icon_image = gtk_image_new_from_stock (
+ GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_MENU);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->icon_image, TRUE, TRUE, 0);
gtk_widget_show (priv->icon_image);
Modified: branches/kill-bonobo/widgets/misc/e-info-label.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-info-label.c (original)
+++ branches/kill-bonobo/widgets/misc/e-info-label.c Thu Aug 14 20:19:12 2008
@@ -27,8 +27,6 @@
#include "e-info-label.h"
-#include <e-util/e-icon-factory.h>
-
static GtkHBoxClass *el_parent;
static void
@@ -184,10 +182,8 @@
{
EInfoLabel *el = g_object_new(e_info_label_get_type(), NULL);
GtkWidget *image;
- char *name = e_icon_factory_get_icon_filename (icon, E_ICON_SIZE_MENU);
- image = gtk_image_new_from_file(name);
- g_free(name);
+ image = gtk_image_new_from_icon_name (icon, GTK_ICON_SIZE_MENU);
gtk_misc_set_padding((GtkMisc *)image, 6, 6);
gtk_box_pack_start((GtkBox *)el, image, FALSE, TRUE, 0);
gtk_widget_show(image);
Modified: branches/kill-bonobo/widgets/misc/e-search-bar.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-search-bar.c (original)
+++ branches/kill-bonobo/widgets/misc/e-search-bar.c Thu Aug 14 20:19:12 2008
@@ -45,7 +45,6 @@
#include "e-search-bar.h"
#include "e-util/e-util.h"
#include "e-util/e-util-marshal.h"
-#include "e-util/e-icon-factory.h"
enum {
Modified: branches/kill-bonobo/widgets/misc/e-send-options.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-send-options.c (original)
+++ branches/kill-bonobo/widgets/misc/e-send-options.c Thu Aug 14 20:19:12 2008
@@ -23,11 +23,11 @@
#endif
#include <string.h>
-#include <libgnome/libgnome.h>
#include <glib/gi18n.h>
#include <glade/glade.h>
#include <time.h>
+#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
#include "e-dateedit.h"
@@ -586,7 +586,6 @@
{
ESendOptionsDialogPrivate *priv;
ESendOptionsDialog *sod;
- GError *error = NULL;
sod = func_data;
priv = sod->priv;
@@ -600,12 +599,9 @@
g_object_unref (priv->xml);
break;
case GTK_RESPONSE_HELP:
- gnome_help_display (
- "evolution.xml", priv->help_section, &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ e_display_help (
+ GTK_WINDOW (priv->main),
+ priv->help_section);
break;
}
Modified: branches/kill-bonobo/widgets/misc/e-task-widget.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-task-widget.c (original)
+++ branches/kill-bonobo/widgets/misc/e-task-widget.c Thu Aug 14 20:19:12 2008
@@ -26,7 +26,6 @@
#include "e-task-widget.h"
#include "e-spinner.h"
-#include <e-util/e-icon-factory.h>
#include <glib/gi18n.h>
@@ -36,7 +35,6 @@
struct _ETaskWidgetPrivate {
char *component_id;
- GdkPixbuf *icon_pixbuf;
GtkWidget *label;
GtkWidget *box;
GtkWidget *image;
@@ -50,24 +48,6 @@
/* GObject methods. */
static void
-impl_dispose (GObject *object)
-{
- ETaskWidget *task_widget;
- ETaskWidgetPrivate *priv;
-
- task_widget = E_TASK_WIDGET (object);
-
- priv = task_widget->priv;
-
- if (priv->icon_pixbuf != NULL) {
- g_object_unref (priv->icon_pixbuf);
- priv->icon_pixbuf = NULL;
- }
-
- (* G_OBJECT_CLASS (e_task_widget_parent_class)->dispose) (object);
-}
-
-static void
impl_finalize (GObject *object)
{
ETaskWidget *task_widget;
@@ -88,7 +68,6 @@
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
}
@@ -100,7 +79,6 @@
priv = g_new (ETaskWidgetPrivate, 1);
priv->component_id = NULL;
- priv->icon_pixbuf = NULL;
priv->label = NULL;
priv->image = NULL;
priv->box = NULL;
@@ -137,15 +115,12 @@
void
e_task_widget_construct (ETaskWidget *task_widget,
- GdkPixbuf *icon_pixbuf,
const char *component_id,
const char *information,
void (*cancel_func) (gpointer data),
gpointer data)
{
ETaskWidgetPrivate *priv;
- /*GdkPixmap *pixmap;
- GdkBitmap *mask;*/
GtkWidget *box;
GtkWidget *frame;
@@ -169,15 +144,10 @@
gtk_widget_set_size_request (box, 1, -1);
- /* FIXME: Experimenting Spinner widget instead of an image. REWORK THIS */
- /* priv->icon_pixbuf = g_object_ref (icon_pixbuf); */
-
- /* gdk_pixbuf_render_pixmap_and_mask (icon_pixbuf, &pixmap, &mask, 128); */
priv->box = gtk_hbox_new (FALSE, 0);
priv->image = e_spinner_new ();
e_spinner_set_size (E_SPINNER (priv->image), GTK_ICON_SIZE_SMALL_TOOLBAR);
e_spinner_start (E_SPINNER (priv->image));
- /* gtk_image_new_from_pixmap (pixmap, mask); */
gtk_widget_show (priv->image);
gtk_widget_show (priv->box);
gtk_box_pack_start (GTK_BOX (priv->box), priv->image, FALSE, TRUE, 0);
@@ -187,9 +157,16 @@
gtk_widget_show (priv->label);
gtk_box_pack_start (GTK_BOX (box), priv->label, TRUE, TRUE, 0);
if (cancel_func) {
- GtkWidget *image = e_icon_factory_get_image ("gtk-stop", E_ICON_SIZE_MENU);
+ GdkPixbuf *pixbuf;
+ GtkWidget *image;
GtkWidget *tool;
+ pixbuf = gtk_icon_theme_load_icon (
+ gtk_icon_theme_get_default (),
+ "gtk-stop", 16, 0, NULL);
+ image = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
+
tool = (GtkWidget *) gtk_tool_button_new (image, NULL);
gtk_box_pack_end (GTK_BOX (box), tool, FALSE, TRUE, 0);
gtk_widget_show_all (tool);
@@ -198,9 +175,6 @@
priv->cancel_func = cancel_func;
priv->data = data;
g_signal_connect (tool, "clicked", G_CALLBACK (button_press_event_cb), task_widget);
- /* g_object_unref (pixmap);
- if (mask)
- g_object_unref (mask); */
g_signal_connect (task_widget, "button-press-event", G_CALLBACK (prepare_popup), task_widget);
}
@@ -209,34 +183,31 @@
}
GtkWidget *
-e_task_widget_new_with_cancel (GdkPixbuf *icon_pixbuf,
- const char *component_id,
- const char *information,
- void (*cancel_func) (gpointer data),
- gpointer data)
+e_task_widget_new_with_cancel (const char *component_id,
+ const char *information,
+ void (*cancel_func) (gpointer data),
+ gpointer data)
{
ETaskWidget *task_widget;
g_return_val_if_fail (information != NULL, NULL);
task_widget = g_object_new (e_task_widget_get_type (), NULL);
- e_task_widget_construct (task_widget, icon_pixbuf, component_id, information, cancel_func, data);
+ e_task_widget_construct (task_widget, component_id, information, cancel_func, data);
return GTK_WIDGET (task_widget);
}
GtkWidget *
-e_task_widget_new (GdkPixbuf *icon_pixbuf,
- const char *component_id,
+e_task_widget_new (const char *component_id,
const char *information)
{
ETaskWidget *task_widget;
- g_return_val_if_fail (icon_pixbuf != NULL, NULL);
g_return_val_if_fail (information != NULL, NULL);
task_widget = g_object_new (e_task_widget_get_type (), NULL);
- e_task_widget_construct (task_widget, icon_pixbuf, component_id, information, NULL, NULL);
+ e_task_widget_construct (task_widget, component_id, information, NULL, NULL);
return GTK_WIDGET (task_widget);
}
@@ -245,14 +216,20 @@
e_task_widget_update_image (ETaskWidget *task_widget,
const char *stock, const char *text)
{
- GtkWidget *img, *tool;
+ GtkWidget *image, *tool;
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gtk_icon_theme_load_icon (
+ gtk_icon_theme_get_default (),
+ stock, 16, 0, NULL);
+ image = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
- img = e_icon_factory_get_image (stock, E_ICON_SIZE_MENU);
- tool = (GtkWidget *) gtk_tool_button_new (img, NULL);
+ tool = (GtkWidget *) gtk_tool_button_new (image, NULL);
gtk_box_pack_start (GTK_BOX(task_widget->priv->box), tool, FALSE, TRUE, 0);
gtk_widget_show_all (task_widget->priv->box);
gtk_widget_hide (task_widget->priv->image);
- task_widget->priv->image = img;
+ task_widget->priv->image = image;
gtk_label_set_text (GTK_LABEL (task_widget->priv->label), text);
return tool;
Modified: branches/kill-bonobo/widgets/misc/e-task-widget.h
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-task-widget.h (original)
+++ branches/kill-bonobo/widgets/misc/e-task-widget.h Thu Aug 14 20:19:12 2008
@@ -53,34 +53,27 @@
};
-GType e_task_widget_get_type (void);
-void e_task_widget_construct (ETaskWidget *task_widget,
- GdkPixbuf *icon_pixbuf,
- const char *component_id,
- const char *information,
- void (*cancel_func) (gpointer data),
- gpointer data);
-GtkWidget *e_task_widget_new (GdkPixbuf *icon_pixbuf,
- const char *component_id,
- const char *information);
-GtkWidget *
-e_task_widget_new_with_cancel (GdkPixbuf *icon_pixbuf,
- const char *component_id,
- const char *information,
- void (*cancel_func) (gpointer data),
- gpointer data);
-
-void e_task_widget_update (ETaskWidget *task_widget,
- const char *information,
- double completion);
-GtkWidget *
-e_task_widget_update_image (ETaskWidget *task_widget,
- const char *stock, const char *text);
-
-void e_task_wiget_alert (ETaskWidget *task_widget);
-void e_task_wiget_unalert (ETaskWidget *task_widget);
-
-const char *e_task_widget_get_component_id (ETaskWidget *task_widget);
+GType e_task_widget_get_type (void);
+void e_task_widget_construct (ETaskWidget *task_widget,
+ const char *component_id,
+ const char *information,
+ void (*cancel_func) (gpointer data),
+ gpointer data);
+GtkWidget * e_task_widget_new (const char *component_id,
+ const char *information);
+GtkWidget * e_task_widget_new_with_cancel (const char *component_id,
+ const char *information,
+ void (*cancel_func) (gpointer data),
+ gpointer data);
+void e_task_widget_update (ETaskWidget *task_widget,
+ const char *information,
+ double completion);
+GtkWidget * e_task_widget_update_image (ETaskWidget *task_widget,
+ const char *stock,
+ const char *text);
+void e_task_wiget_alert (ETaskWidget *task_widget);
+void e_task_wiget_unalert (ETaskWidget *task_widget);
+const char * e_task_widget_get_component_id (ETaskWidget *task_widget);
#ifdef __cplusplus
}
Modified: branches/kill-bonobo/widgets/misc/e-url-entry.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-url-entry.c (original)
+++ branches/kill-bonobo/widgets/misc/e-url-entry.c Thu Aug 14 20:19:12 2008
@@ -29,7 +29,6 @@
#include <libgnome/gnome-url.h>
#include <glib/gi18n.h>
#include "e-url-entry.h"
-#include <e-util/e-icon-factory.h>
struct _EUrlEntryPrivate {
GtkWidget *entry;
@@ -105,7 +104,7 @@
gtk_widget_set_sensitive (priv->button, FALSE);
gtk_box_pack_start (GTK_BOX (url_entry), priv->button, FALSE, FALSE, 0);
atk_object_set_name (gtk_widget_get_accessible (priv->button), _("Click here to go to URL"));
- pixmap = e_icon_factory_get_image ("go-jump", E_ICON_SIZE_BUTTON);
+ pixmap = gtk_image_new_from_icon_name ("go-jump", GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (priv->button), pixmap);
gtk_widget_show (pixmap);
Modified: branches/kill-bonobo/widgets/misc/test-info-label.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/test-info-label.c (original)
+++ branches/kill-bonobo/widgets/misc/test-info-label.c Thu Aug 14 20:19:12 2008
@@ -27,7 +27,6 @@
#include <gtk/gtk.h>
#include <libgnomeui/gnome-app.h>
#include <libgnomeui/gnome-ui-init.h>
-#include <e-util/e-icon-factory.h>
#include "e-info-label.h"
static void
@@ -36,7 +35,6 @@
gpointer data)
{
gtk_main_quit ();
- e_icon_factory_shutdown ();
}
int
@@ -50,7 +48,6 @@
gnome_program_init (
"test-title-bar", "0.0", LIBGNOMEUI_MODULE,
argc, argv, GNOME_PARAM_NONE);
- e_icon_factory_init ();
app = gnome_app_new ("Test", "Test");
gtk_window_set_default_size (GTK_WINDOW (app), 400, 400);
Modified: branches/kill-bonobo/widgets/table/e-tree-table-adapter.c
==============================================================================
--- branches/kill-bonobo/widgets/table/e-tree-table-adapter.c (original)
+++ branches/kill-bonobo/widgets/table/e-tree-table-adapter.c Thu Aug 14 20:19:12 2008
@@ -82,6 +82,8 @@
int sort_info_changed_id;
guint resort_idle_id;
+
+ int force_expanded_state; /* use this instead of model's default if not 0; <0 ... collapse, >0 ... expand */
};
static void etta_sort_info_changed (ETableSortInfo *sort_info, ETreeTableAdapter *etta);
@@ -322,7 +324,7 @@
node = g_new0(node_t, 1);
node->path = path;
node->index = -1;
- node->expanded = e_tree_model_get_expanded_default(etta->priv->source);
+ node->expanded = etta->priv->force_expanded_state == 0 ? e_tree_model_get_expanded_default (etta->priv->source) : etta->priv->force_expanded_state > 0;
node->expandable = e_tree_model_node_is_expandable(etta->priv->source, path);
node->expandable_set = 1;
node->num_visible_children = 0;
@@ -737,6 +739,7 @@
etta->priv->node_request_collapse_id = 0;
etta->priv->resort_idle_id = 0;
+ etta->priv->force_expanded_state = 0;
}
static void
@@ -912,14 +915,14 @@
}
}
-void
-e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *filename)
+xmlDoc *
+e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta)
{
TreeAndRoot tar;
xmlDocPtr doc;
xmlNode *root;
- g_return_if_fail(etta != NULL);
+ g_return_val_if_fail (etta != NULL, NULL);
doc = xmlNewDoc ((const unsigned char *)"1.0");
root = xmlNewDocNode (doc, NULL, (const unsigned char *)"expanded_state", NULL);
@@ -934,8 +937,21 @@
g_hash_table_foreach (etta->priv->nodes, save_expanded_state_func, &tar);
- e_xml_save_file (filename, doc);
- xmlFreeDoc (doc);
+ return doc;
+}
+
+void
+e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *filename)
+{
+ xmlDoc *doc;
+
+ g_return_if_fail (etta != NULL);
+
+ doc = e_tree_table_adapter_save_expanded_state_xml (etta);
+ if (doc) {
+ e_xml_save_file (filename, doc);
+ xmlFreeDoc (doc);
+ }
}
static xmlDoc *
@@ -983,57 +999,24 @@
return doc;
}
-static void
-set_expanded_state_func (gpointer keyp, gpointer value, gpointer data)
-{
- ETreePath path = keyp;
- node_t *node = ((GNode *)value)->data;
- ETreeTableAdapter *etta = (ETreeTableAdapter *) data;
-
- if (node->expanded != TRUE) {
- e_tree_table_adapter_node_set_expanded_recurse (etta, path, TRUE);
- node->expanded = TRUE;
- }
-}
-
-static void
-set_collapsed_state_func (gpointer keyp, gpointer value, gpointer data)
-{
- ETreePath path = keyp;
- node_t *node = ((GNode *)value)->data;
- ETreeTableAdapter *etta = (ETreeTableAdapter *) data;
-
- if (node->expanded != FALSE) {
- e_tree_table_adapter_node_set_expanded_recurse (etta, path, FALSE);
- node->expanded = FALSE;
- }
-}
-
+/* state: <0 ... collapse; 0 ... use default; >0 ... expand */
void
-e_tree_table_adapter_load_all_expanded_state (ETreeTableAdapter *etta, gboolean state)
+e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, int state)
{
+ g_return_if_fail (etta != NULL);
- g_return_if_fail(etta != NULL);
-
- if (state)
- g_hash_table_foreach (etta->priv->nodes, set_expanded_state_func, etta);
- else
- g_hash_table_foreach (etta->priv->nodes, set_collapsed_state_func, etta);
+ etta->priv->force_expanded_state = state;
}
void
-e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *filename)
+e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *doc)
{
- xmlDoc *doc;
xmlNode *root, *child;
gboolean model_default;
gboolean file_default = FALSE;
- g_return_if_fail(etta != NULL);
-
- doc = open_file(etta, filename);
- if (!doc)
- return;
+ g_return_if_fail (etta != NULL);
+ g_return_if_fail (doc != NULL);
root = xmlDocGetRootElement (doc);
@@ -1084,12 +1067,26 @@
g_free (id);
}
- xmlFreeDoc (doc);
-
e_table_model_changed (E_TABLE_MODEL (etta));
}
void
+e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *filename)
+{
+ xmlDoc *doc;
+
+ g_return_if_fail(etta != NULL);
+
+ doc = open_file(etta, filename);
+ if (!doc)
+ return;
+
+ e_tree_table_adapter_load_expanded_state_xml (etta, doc);
+
+ xmlFreeDoc (doc);
+}
+
+void
e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean visible)
{
int size;
Modified: branches/kill-bonobo/widgets/table/e-tree-table-adapter.h
==============================================================================
--- branches/kill-bonobo/widgets/table/e-tree-table-adapter.h (original)
+++ branches/kill-bonobo/widgets/table/e-tree-table-adapter.h Thu Aug 14 20:19:12 2008
@@ -30,6 +30,7 @@
#include <table/e-tree-model.h>
#include <table/e-table-sort-info.h>
#include <table/e-table-header.h>
+#include <libxml/tree.h>
G_BEGIN_DECLS
@@ -71,8 +72,8 @@
void e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta,
ETreePath path,
gboolean expanded);
-void e_tree_table_adapter_load_all_expanded_state (ETreeTableAdapter *etta,
- gboolean state);
+void e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta,
+ int state);
void e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta,
gboolean visible);
ETreePath e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta,
@@ -89,6 +90,9 @@
void e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta,
const char *filename);
+xmlDoc *e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta);
+void e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *doc);
+
void e_tree_table_adapter_set_sort_info (ETreeTableAdapter *etta,
ETableSortInfo *sort_info);
Modified: branches/kill-bonobo/widgets/table/e-tree.c
==============================================================================
--- branches/kill-bonobo/widgets/table/e-tree.c (original)
+++ branches/kill-bonobo/widgets/table/e-tree.c Thu Aug 14 20:19:12 2008
@@ -2069,10 +2069,32 @@
e_tree_table_adapter_load_expanded_state (et->priv->etta, filename);
}
+xmlDoc *
+e_tree_save_expanded_state_xml (ETree *et)
+{
+ g_return_val_if_fail (et != NULL, NULL);
+ g_return_val_if_fail (E_IS_TREE (et), NULL);
+
+ return e_tree_table_adapter_save_expanded_state_xml (et->priv->etta);
+}
+
+void
+e_tree_load_expanded_state_xml (ETree *et, xmlDoc *doc)
+{
+ g_return_if_fail (et != NULL);
+ g_return_if_fail (E_IS_TREE (et));
+ g_return_if_fail (doc != NULL);
+
+ e_tree_table_adapter_load_expanded_state_xml (et->priv->etta, doc);
+}
+
+/* state: <0 ... collapse; 0 ... no force - use default; >0 ... expand;
+ when using this, be sure to reset to 0 once no forcing is required
+ anymore, aka the build of the tree is done */
void
-e_tree_load_all_expanded_state (ETree *et, gboolean state)
+e_tree_force_expanded_state (ETree *et, int state)
{
- e_tree_table_adapter_load_all_expanded_state (et->priv->etta, state);
+ e_tree_table_adapter_force_expanded_state (et->priv->etta, state);
}
gint
Modified: branches/kill-bonobo/widgets/table/e-tree.h
==============================================================================
--- branches/kill-bonobo/widgets/table/e-tree.h (original)
+++ branches/kill-bonobo/widgets/table/e-tree.h Thu Aug 14 20:19:12 2008
@@ -286,9 +286,13 @@
char *filename);
void e_tree_load_expanded_state (ETree *et,
char *filename);
+
+xmlDoc *e_tree_save_expanded_state_xml (ETree *et);
+void e_tree_load_expanded_state_xml (ETree *et, xmlDoc *doc);
+
int e_tree_row_count (ETree *et);
GtkWidget *e_tree_get_tooltip (ETree *et);
-void e_tree_load_all_expanded_state (ETree *et, gboolean state);
+void e_tree_force_expanded_state (ETree *et, int state);
typedef enum {
E_TREE_FIND_NEXT_BACKWARD = 0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]