evolution r36538 - in branches/kill-bonobo: addressbook/gui/component calendar/gui calendar/modules doc/reference/shell doc/reference/shell/tmpl shell shell/test ui
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36538 - in branches/kill-bonobo: addressbook/gui/component calendar/gui calendar/modules doc/reference/shell doc/reference/shell/tmpl shell shell/test ui
- Date: Fri, 3 Oct 2008 04:43:40 +0000 (UTC)
Author: mbarnes
Date: Fri Oct 3 04:43:40 2008
New Revision: 36538
URL: http://svn.gnome.org/viewvc/evolution?rev=36538&view=rev
Log:
Tasks progress. Merge EMemoPreview back into ECalComponentPreview.
Added:
branches/kill-bonobo/doc/reference/shell/tmpl/action-groups.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/shell-actions.sgml
Removed:
branches/kill-bonobo/calendar/gui/e-memo-preview.c
branches/kill-bonobo/calendar/gui/e-memo-preview.h
Modified:
branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c
branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c
branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h
branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c
branches/kill-bonobo/calendar/gui/Makefile.am
branches/kill-bonobo/calendar/gui/e-cal-component-preview.c
branches/kill-bonobo/calendar/gui/e-cal-component-preview.h
branches/kill-bonobo/calendar/modules/e-cal-shell-module.c
branches/kill-bonobo/calendar/modules/e-cal-shell-view.c
branches/kill-bonobo/calendar/modules/e-memo-shell-content.c
branches/kill-bonobo/calendar/modules/e-memo-shell-content.h
branches/kill-bonobo/calendar/modules/e-memo-shell-module.c
branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c
branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.c
branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.h
branches/kill-bonobo/calendar/modules/e-memo-shell-view.c
branches/kill-bonobo/calendar/modules/e-task-shell-content.c
branches/kill-bonobo/calendar/modules/e-task-shell-module.c
branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c
branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h
branches/kill-bonobo/calendar/modules/e-task-shell-view-private.c
branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h
branches/kill-bonobo/calendar/modules/e-task-shell-view.c
branches/kill-bonobo/doc/reference/shell/eshell-sections.txt
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-importer.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-module.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-switcher.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-view.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/e-shell.sgml
branches/kill-bonobo/doc/reference/shell/tmpl/eshell-unused.sgml
branches/kill-bonobo/shell/e-shell-content.c
branches/kill-bonobo/shell/e-shell-content.h
branches/kill-bonobo/shell/e-shell-module.c
branches/kill-bonobo/shell/e-shell-module.h
branches/kill-bonobo/shell/e-shell-view.h
branches/kill-bonobo/shell/e-shell-window-actions.c
branches/kill-bonobo/shell/e-shell-window-private.c
branches/kill-bonobo/shell/e-shell-window.c
branches/kill-bonobo/shell/test/e-test-shell-module.c
branches/kill-bonobo/ui/evolution-tasks.ui
Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-module.c Fri Oct 3 04:43:40 2008
@@ -43,7 +43,6 @@
#define MODULE_NAME "addressbook"
#define MODULE_ALIASES "contacts"
#define MODULE_SCHEMES ""
-#define MODULE_SEARCHES "addresstypes.xml"
#define MODULE_SORT_ORDER 300
#define LDAP_BASE_URI "ldap://"
@@ -405,7 +404,6 @@
MODULE_NAME,
MODULE_ALIASES,
MODULE_SCHEMES,
- MODULE_SEARCHES,
MODULE_SORT_ORDER,
/* Methods */
Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c Fri Oct 3 04:43:40 2008
@@ -519,7 +519,7 @@
/* Filter by category. */
value = e_shell_content_get_filter_value (shell_content);
- if (value >= CONTACT_FILTER_ANY_CATEGORY) {
+ if (value > CONTACT_FILTER_ANY_CATEGORY) {
GList *categories;
const gchar *category_name;
gchar *temp;
@@ -557,7 +557,6 @@
GtkRadioAction *current,
EBookShellView *book_shell_view)
{
- g_debug ("Contacts filter changed");
action_search_execute_cb (GTK_ACTION (current), book_shell_view);
}
Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.c Fri Oct 3 04:43:40 2008
@@ -227,11 +227,11 @@
G_CALLBACK (selection_change), book_shell_view);
book = e_book_new (source, NULL);
+ view = E_ADDRESSBOOK_VIEW (widget);
if (book != NULL)
- addressbook_load (book, book_open_cb, widget);
+ addressbook_load (book, book_open_cb, view);
- view = E_ADDRESSBOOK_VIEW (widget);
model = e_addressbook_view_get_model (view);
g_signal_connect_swapped (
@@ -444,8 +444,8 @@
book_shell_view);
e_book_shell_view_actions_init (book_shell_view);
- e_book_shell_view_update_search_filter (book_shell_view);
book_shell_view_activate_selected_source (book_shell_view, selector);
+ e_book_shell_view_update_search_filter (book_shell_view);
}
void
Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h (original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-private.h Fri Oct 3 04:43:40 2008
@@ -75,7 +75,7 @@
/* List these in the order to be displayed.
* Positive values are reserved for categories. */
enum {
- CONTACT_FILTER_ANY_CATEGORY
+ CONTACT_FILTER_ANY_CATEGORY = -1
};
/* List these in the order to be displayed. */
Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view.c Fri Oct 3 04:43:40 2008
@@ -151,6 +151,7 @@
shell_view_class->icon_name = "x-office-address-book";
shell_view_class->ui_definition = "evolution-contacts.ui";
shell_view_class->search_options = "/contact-search-options";
+ shell_view_class->search_rules = "addresstypes.xml";
shell_view_class->type_module = type_module;
shell_view_class->new_shell_content = e_book_shell_content_new;
shell_view_class->new_shell_sidebar = e_book_shell_sidebar_new;
Modified: branches/kill-bonobo/calendar/gui/Makefile.am
==============================================================================
--- branches/kill-bonobo/calendar/gui/Makefile.am (original)
+++ branches/kill-bonobo/calendar/gui/Makefile.am Fri Oct 3 04:43:40 2008
@@ -135,8 +135,6 @@
e-meeting-types.h \
e-meeting-utils.c \
e-meeting-utils.h \
- e-memo-preview.c \
- e-memo-preview.h \
e-memo-table.c \
e-memo-table.h \
e-memo-table-config.c \
Modified: branches/kill-bonobo/calendar/gui/e-cal-component-preview.c
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-component-preview.c (original)
+++ branches/kill-bonobo/calendar/gui/e-cal-component-preview.c Fri Oct 3 04:43:40 2008
@@ -22,48 +22,48 @@
*
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "e-cal-component-preview.h"
#include <string.h>
-#include <gio/gio.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <libgnome/gnome-url.h>
-#include <libedataserver/e-categories.h>
#include <libecal/e-cal-time-util.h>
-#include <gtkhtml/gtkhtml.h>
+#include <libedataserver/e-categories.h>
#include <gtkhtml/gtkhtml-stream.h>
#include <libedataserver/e-time-utils.h>
#include <e-util/e-categories-config.h>
#include "calendar-config.h"
-#include "e-cal-component-preview.h"
#include <camel/camel-mime-filter-tohtml.h>
-struct _ECalComponentPreviewPrivate {
- GtkWidget *html;
+#define E_CAL_COMPONENT_PREVIEW_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreviewPrivate))
+struct _ECalComponentPreviewPrivate {
icaltimezone *zone;
};
-G_DEFINE_TYPE (ECalComponentPreview, e_cal_component_preview, GTK_TYPE_TABLE)
+static gpointer parent_class;
static void
-on_link_clicked (GtkHTML *html, const char *url, gpointer data)
+cal_component_preview_link_clicked (GtkHTML *html,
+ const gchar *url)
{
- GError *err = NULL;
+ GdkScreen *screen;
+ GError *error = NULL;
- gnome_url_show (url, &err);
+ screen = gtk_widget_get_screen (GTK_WIDGET (html));
+ gtk_show_uri (screen, url, GDK_CURRENT_TIME, &error);
- if (err) {
- g_warning ("gnome_url_show: %s", err->message);
- g_error_free (err);
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
}
}
static void
-on_url_cb (GtkHTML *html, const char *url, gpointer data)
+cal_component_preview_on_url (GtkHTML *html,
+ const gchar *url)
{
#if 0
char *msg;
@@ -78,51 +78,11 @@
#endif
}
-/* Callback used when the user selects a URL in the HTML widget */
-void
-e_cal_comp_preview_url_requested_cb (GtkHTML *html, const char *url, GtkHTMLStream *html_stream, gpointer data)
-{
- int len = strlen ("file:///");
-
- if (!strncmp ("file:///", url, len)) {
- GFile *file;
- const char *path = url + len - 1;
-
- g_return_if_fail (html_stream != NULL);
- g_return_if_fail (path != NULL);
-
- file = g_file_new_for_path (path);
- if (file) {
- char buffer[4096];
- GInputStream *stream;
-
- /* ignore errors here */
- stream = G_INPUT_STREAM (g_file_read (file, NULL, NULL));
-
- if (stream) {
- gssize bread;
-
- do {
- /* ignore errors here as well */
- bread = g_input_stream_read (stream, buffer, sizeof (buffer), NULL, NULL);
- if (bread > 0)
- gtk_html_stream_write (html_stream, buffer, bread);
- } while (bread > 0);
-
- g_input_stream_close (stream, NULL, NULL);
- g_object_unref (stream);
-
- gtk_html_stream_close (html_stream, GTK_HTML_STREAM_OK);
- }
-
- g_object_unref (file);
- }
- }
-}
-
/* Converts a time_t to a string, relative to the specified timezone */
static char *
-timet_to_str_with_zone (ECalComponentDateTime *dt, ECal *ecal, icaltimezone *default_zone)
+timet_to_str_with_zone (ECalComponentDateTime *dt,
+ ECal *ecal,
+ icaltimezone *default_zone)
{
struct icaltimetype itt;
icaltimezone *zone;
@@ -152,12 +112,18 @@
}
static void
-write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone *default_zone)
+cal_component_preview_write_html (GtkHTMLStream *stream,
+ ECal *ecal,
+ ECalComponent *comp,
+ icaltimezone *default_zone)
{
ECalComponentText text;
ECalComponentDateTime dt;
gchar *str;
- GSList *l;
+ GString *string;
+ GSList *list, *iter;
+ icalcomponent *icalcomp;
+ icalproperty *icalprop;
icalproperty_status status;
const char *location;
int *priority_value;
@@ -176,28 +142,34 @@
"<HTML><BODY><H1><I>%s</I></H1>",
_("Untitled"));
-
/* write icons for the categories */
- e_cal_component_get_categories_list (comp, &l);
- if (l) {
- GSList *node;
-
- for (node = l; node != NULL; node = node->next) {
- const char *icon_file;
-
- icon_file = e_categories_get_icon_file_for ((const char *) node->data);
- if (icon_file) {
- gchar *icon_file_uri = g_filename_to_uri (icon_file, NULL, NULL);
- gtk_html_stream_printf (stream, "<IMG ALT=\"%s\" SRC=\"%s\">",
- (const char *) node->data, icon_file_uri);
- g_free (icon_file_uri);
- }
+ string = g_string_new (NULL);
+ e_cal_component_get_categories_list (comp, &list);
+ if (list != NULL)
+ gtk_html_stream_printf (stream, "<H3>%s ", _("Categories:"));
+ for (iter = list; iter != NULL; iter = iter->next) {
+ const gchar *category = iter->data;
+ const gchar *icon_file;
+
+ icon_file = e_categories_get_icon_file_for (category);
+ if (icon_file && g_file_test (icon_file, G_FILE_TEST_EXISTS)) {
+ gchar *uri;
+
+ uri = g_filename_to_uri (icon_file, NULL, NULL);
+ gtk_html_stream_printf (
+ stream, "<IMG ALT=\"%s\" SRC=\"%s\">",
+ category, uri);
+ g_free (uri);
+ } else {
+ if (iter != list)
+ g_string_append_len (string, ", ", 2);
+ g_string_append (string, category);
}
-
- e_cal_component_free_categories_list (l);
-
- gtk_html_stream_printf (stream, "<BR><BR><BR>");
}
+ if (string->len > 0)
+ gtk_html_stream_printf (stream, "%s</H3>", string->str);
+ e_cal_component_free_categories_list (list);
+ g_string_free (string, TRUE);
/* Start table */
gtk_html_stream_printf (stream, "<TABLE BORDER=\"0\" WIDTH=\"80%%\">"
@@ -243,26 +215,31 @@
e_cal_component_free_datetime (&dt);
/* write status */
- gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Status:"));
- e_cal_component_get_status (comp, &status);
- switch (status) {
- case ICAL_STATUS_INPROCESS :
- str = g_strdup (_("In Progress"));
- break;
- case ICAL_STATUS_COMPLETED :
- str = g_strdup (_("Completed"));
- break;
- case ICAL_STATUS_CANCELLED :
- str = g_strdup (_("Canceled"));
- break;
- case ICAL_STATUS_NONE :
- default :
- str = g_strdup (_("Not Started"));
- break;
- }
+ icalcomp = e_cal_component_get_icalcomponent (comp);
+ icalprop = icalcomponent_get_first_property (
+ icalcomp, ICAL_STATUS_PROPERTY);
+ if (icalprop != NULL) {
+ gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Status:"));
+ e_cal_component_get_status (comp, &status);
+ switch (status) {
+ case ICAL_STATUS_INPROCESS :
+ str = g_strdup (_("In Progress"));
+ break;
+ case ICAL_STATUS_COMPLETED :
+ str = g_strdup (_("Completed"));
+ break;
+ case ICAL_STATUS_CANCELLED :
+ str = g_strdup (_("Canceled"));
+ break;
+ case ICAL_STATUS_NONE :
+ default :
+ str = g_strdup (_("Not Started"));
+ break;
+ }
- gtk_html_stream_printf (stream, "<TD>%s</TD></TR>", str);
- g_free (str);
+ gtk_html_stream_printf (stream, "<TD>%s</TD></TR>", str);
+ g_free (str);
+ }
/* write priority */
e_cal_component_get_priority (comp, &priority_value);
@@ -284,15 +261,15 @@
/* write description and URL */
gtk_html_stream_printf (stream, "<TR><TD COLSPAN=\"2\"><HR></TD></TR>");
- e_cal_component_get_description_list (comp, &l);
- if (l) {
+ e_cal_component_get_description_list (comp, &list);
+ if (list) {
GSList *node;
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Description:"));
gtk_html_stream_printf (stream, "<TD><TT>");
- for (node = l; node != NULL; node = node->next) {
+ for (node = list; node != NULL; node = node->next) {
char *html;
text = * (ECalComponentText *) node->data;
@@ -306,7 +283,7 @@
gtk_html_stream_printf (stream, "</TT></TD></TR>");
- e_cal_component_free_text_list (l);
+ e_cal_component_free_text_list (list);
}
/* URL */
@@ -323,135 +300,120 @@
}
static void
-e_cal_component_preview_init (ECalComponentPreview *preview)
+cal_component_preview_finalize (GObject *object)
{
ECalComponentPreviewPrivate *priv;
- GtkWidget *scroll;
- priv = g_new0 (ECalComponentPreviewPrivate, 1);
- preview->priv = priv;
+ priv = E_CAL_COMPONENT_PREVIEW_GET_PRIVATE (object);
- priv->html = gtk_html_new ();
- gtk_html_set_default_content_type (GTK_HTML (priv->html), "charset=utf-8");
- gtk_html_load_empty (GTK_HTML (priv->html));
-
- g_signal_connect (G_OBJECT (priv->html), "url_requested",
- G_CALLBACK (e_cal_comp_preview_url_requested_cb), NULL);
- g_signal_connect (G_OBJECT (priv->html), "link_clicked",
- G_CALLBACK (on_link_clicked), preview);
- g_signal_connect (G_OBJECT (priv->html), "on_url",
- G_CALLBACK (on_url_cb), preview);
-
- scroll = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
-
- gtk_container_add (GTK_CONTAINER (scroll), priv->html);
- gtk_container_add (GTK_CONTAINER (preview), scroll);
- gtk_widget_show_all (scroll);
+ /* XXX Nothing to do? */
- priv->zone = icaltimezone_get_utc_timezone ();
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
-e_cal_component_preview_destroy (GtkObject *object)
+cal_component_preview_class_init (ECalComponentPreviewClass *class)
{
- ECalComponentPreview *preview;
- ECalComponentPreviewPrivate *priv;
+ GObjectClass *object_class;
+ GtkHTMLClass *gtkhtml_class;
- g_return_if_fail (object != NULL);
- g_return_if_fail (E_IS_CAL_COMPONENT_PREVIEW (object));
+ parent_class = g_type_class_peek_parent (class);
+ g_type_class_add_private (class, sizeof (ECalComponentPreviewPrivate));
- preview = E_CAL_COMPONENT_PREVIEW (object);
- priv = preview->priv;
+ object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = cal_component_preview_finalize;
- if (priv) {
+ gtkhtml_class = GTK_HTML_CLASS (class);
+ gtkhtml_class->link_clicked = cal_component_preview_link_clicked;
+ gtkhtml_class->on_url = cal_component_preview_on_url;
+}
- g_free (priv);
- preview->priv = NULL;
- }
+static void
+cal_component_preview_init (ECalComponentPreview *preview)
+{
+ ECalComponentPreviewPrivate *priv;
+ GtkHTML *html;
+
+ preview->priv = E_CAL_COMPONENT_PREVIEW_GET_PRIVATE (preview);
+
+ html = GTK_HTML (preview);
+ gtk_html_set_default_content_type (html, "charset=utf-8");
+ gtk_html_load_empty (html);
- if (GTK_OBJECT_CLASS (e_cal_component_preview_parent_class)->destroy)
- (* GTK_OBJECT_CLASS (e_cal_component_preview_parent_class)->destroy) (object);
+ priv->zone = icaltimezone_get_utc_timezone ();
}
-static void
-e_cal_component_preview_class_init (ECalComponentPreviewClass *klass)
+GType
+e_cal_component_preview_get_type (void)
{
- GtkObjectClass *object_class;
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0)) {
+ static const GTypeInfo type_info = {
+ sizeof (ECalComponentPreviewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_component_preview_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (ECalComponentPreview),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) cal_component_preview_init,
+ NULL /* value_table */
+ };
- object_class = (GtkObjectClass *) klass;
+ type = g_type_register_static (
+ GTK_TYPE_HTML, "ECalComponentPreview", &type_info, 0);
+ }
- object_class->destroy = e_cal_component_preview_destroy;
+ return type;
}
GtkWidget *
e_cal_component_preview_new (void)
{
- ECalComponentPreview *preview;
-
- preview = g_object_new (e_cal_component_preview_get_type (), NULL);
-
- return GTK_WIDGET (preview);
+ return g_object_new (E_TYPE_CAL_COMPONENT_PREVIEW, NULL);
}
icaltimezone *
e_cal_component_preview_get_default_timezone (ECalComponentPreview *preview)
{
- ECalComponentPreviewPrivate *priv;
-
- g_return_val_if_fail (preview != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_COMPONENT_PREVIEW (preview), NULL);
- priv = preview->priv;
-
- return priv->zone;
+ return preview->priv->zone;
}
void
-e_cal_component_preview_set_default_timezone (ECalComponentPreview *preview, icaltimezone *zone)
+e_cal_component_preview_set_default_timezone (ECalComponentPreview *preview,
+ icaltimezone *zone)
{
- ECalComponentPreviewPrivate *priv;
-
- g_return_if_fail (preview != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT_PREVIEW (preview));
g_return_if_fail (zone != NULL);
- priv = preview->priv;
-
- priv->zone = zone;
+ preview->priv->zone = zone;
}
void
-e_cal_component_preview_display (ECalComponentPreview *preview, ECal *ecal, ECalComponent *comp)
+e_cal_component_preview_display (ECalComponentPreview *preview,
+ ECal *ecal,
+ ECalComponent *comp)
{
- ECalComponentPreviewPrivate *priv;
GtkHTMLStream *stream;
- g_return_if_fail (preview != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT_PREVIEW (preview));
- g_return_if_fail (comp != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
- priv = preview->priv;
-
- stream = gtk_html_begin (GTK_HTML (priv->html));
- write_html (stream, ecal, comp, priv->zone);
+ stream = gtk_html_begin (GTK_HTML (preview));
+ cal_component_preview_write_html (
+ stream, ecal, comp, preview->priv->zone);
gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
}
void
e_cal_component_preview_clear (ECalComponentPreview *preview)
{
- ECalComponentPreviewPrivate *priv;
-
- g_return_if_fail (preview != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT_PREVIEW (preview));
- priv = preview->priv;
-
- gtk_html_load_empty (GTK_HTML (priv->html));
+ gtk_html_load_empty (GTK_HTML (preview));
}
-
Modified: branches/kill-bonobo/calendar/gui/e-cal-component-preview.h
==============================================================================
--- branches/kill-bonobo/calendar/gui/e-cal-component-preview.h (original)
+++ branches/kill-bonobo/calendar/gui/e-cal-component-preview.h Fri Oct 3 04:43:40 2008
@@ -1,5 +1,4 @@
/*
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -22,51 +21,63 @@
*
*/
-#ifndef _E_CAL_COMPONENT_PREVIEW_H_
-#define _E_CAL_COMPONENT_PREVIEW_H_
+#ifndef E_CAL_COMPONENT_PREVIEW_H
+#define E_CAL_COMPONENT_PREVIEW_H
#include <gtk/gtk.h>
#include <libecal/e-cal.h>
#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-stream.h>
-#define E_TYPE_CAL_COMPONENT_PREVIEW (e_cal_component_preview_get_type ())
-#define E_CAL_COMPONENT_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreview))
-#define E_CAL_COMPONENT_PREVIEW_CLASS(klass) (G_TYPE_CHECK_INSTANCE_CAST_CLASS ((klass), E_TYPE_CAL_COMPONENT_PREVIEW, \
- ECalComponentPreviewClass))
-#define E_IS_CAL_COMPONENT_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_COMPONENT_PREVIEW))
-#define E_IS_CAL_COMPONENT_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_COMPONENT_PREVIEW))
+/* Standard GObject macros */
+#define E_TYPE_CAL_COMPONENT_PREVIEW \
+ (e_cal_component_preview_get_type ())
+#define E_CAL_COMPONENT_PREVIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreview))
+#define E_CAL_COMPONENT_PREVIEW_CLASS(cls) \
+ (G_TYPE_CHECK_INSTANCE_CAST_CLASS \
+ ((cls), E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreviewClass))
+#define E_IS_CAL_COMPONENT_PREVIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_CAL_COMPONENT_PREVIEW))
+#define E_IS_CAL_COMPONENT_PREVIEW_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_CAL_COMPONENT_PREVIEW))
+#define E_CAL_COMPONENT_PREVIEW_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreviewClass))
+
+G_BEGIN_DECLS
typedef struct _ECalComponentPreview ECalComponentPreview;
typedef struct _ECalComponentPreviewClass ECalComponentPreviewClass;
typedef struct _ECalComponentPreviewPrivate ECalComponentPreviewPrivate;
struct _ECalComponentPreview {
- GtkTable table;
-
- /* Private data */
+ GtkHTML parent;
ECalComponentPreviewPrivate *priv;
};
struct _ECalComponentPreviewClass {
- GtkTableClass parent_class;
+ GtkHTMLClass parent_class;
/* Notification signals */
void (* selection_changed) (ECalComponentPreview *preview, int n_selected);
};
-GType e_cal_component_preview_get_type (void);
-GtkWidget *e_cal_component_preview_new (void);
-
-icaltimezone *e_cal_component_preview_get_default_timezone (ECalComponentPreview *preview);
-void e_cal_component_preview_set_default_timezone (ECalComponentPreview *preview, icaltimezone *zone);
-
-void e_cal_component_preview_display (ECalComponentPreview *preview, ECal *ecal, ECalComponent *comp);
-void e_cal_component_preview_clear (ECalComponentPreview *preview);
-
-/* Callback used when GtkHTML widget requests URL */
-void e_cal_comp_preview_url_requested_cb (GtkHTML *html, const char *url, GtkHTMLStream *html_stream, gpointer data);
+GType e_cal_component_preview_get_type(void);
+GtkWidget * e_cal_component_preview_new (void);
+icaltimezone * e_cal_component_preview_get_default_timezone
+ (ECalComponentPreview *preview);
+void e_cal_component_preview_set_default_timezone
+ (ECalComponentPreview *preview,
+ icaltimezone *zone);
+void e_cal_component_preview_display (ECalComponentPreview *preview,
+ ECal *ecal,
+ ECalComponent *comp);
+void e_cal_component_preview_clear (ECalComponentPreview *preview);
+G_END_DECLS
-#endif /* _E_CAL_COMPONENT_PREVIEW_H_ */
+#endif /* E_CAL_COMPONENT_PREVIEW_H */
Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-module.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-module.c (original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-module.c Fri Oct 3 04:43:40 2008
@@ -37,7 +37,6 @@
#define MODULE_NAME "calendar"
#define MODULE_ALIASES ""
#define MODULE_SCHEMES "calendar"
-#define MODULE_SEARCHES "caltypes.xml"
#define MODULE_SORT_ORDER 400
#define CONTACTS_BASE_URI "contacts://"
@@ -371,7 +370,6 @@
MODULE_NAME,
MODULE_ALIASES,
MODULE_SCHEMES,
- MODULE_SEARCHES,
MODULE_SORT_ORDER
};
Modified: branches/kill-bonobo/calendar/modules/e-cal-shell-view.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-cal-shell-view.c (original)
+++ branches/kill-bonobo/calendar/modules/e-cal-shell-view.c Fri Oct 3 04:43:40 2008
@@ -107,6 +107,7 @@
shell_view_class->icon_name = "evolution-cals";
shell_view_class->ui_definition = "evolution-calendars.ui";
shell_view_class->search_options = "/calendar-search-options";
+ shell_view_class->search_rules = "caltypes.xml";
shell_view_class->type_module = type_module;
shell_view_class->new_shell_sidebar = e_cal_shell_sidebar_new;
shell_view_class->update_actions = cal_shell_view_update_actions;
Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-content.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-content.c (original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-content.c Fri Oct 3 04:43:40 2008
@@ -131,18 +131,19 @@
gint row,
ETable *table)
{
- EMemoPreview *memo_preview;
+ ECalComponentPreview *memo_preview;
EMemoTable *memo_table;
ECalModel *model;
ECalModelComponent *comp_data;
ECalComponent *comp;
const gchar *uid;
- memo_preview = E_MEMO_PREVIEW (memo_shell_content->priv->memo_preview);
+ memo_preview = E_CAL_COMPONENT_PREVIEW (
+ memo_shell_content->priv->memo_preview);
memo_table = E_MEMO_TABLE (memo_shell_content->priv->memo_table);
if (e_table_selected_count (table) != 1) {
- e_memo_preview_clear (memo_preview);
+ e_cal_component_preview_clear (memo_preview);
return;
}
@@ -153,7 +154,8 @@
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (
comp, icalcomponent_new_clone (comp_data->icalcomp));
- e_memo_preview_display (memo_preview, comp_data->client, comp);
+ e_cal_component_preview_display (
+ memo_preview, comp_data->client, comp);
e_cal_component_get_uid (comp, &uid);
g_free (memo_shell_content->priv->current_uid);
@@ -166,14 +168,15 @@
memo_shell_content_selection_change_cb (EMemoShellContent *memo_shell_content,
ETable *table)
{
- EMemoPreview *memo_preview;
+ ECalComponentPreview *memo_preview;
- memo_preview = E_MEMO_PREVIEW (memo_shell_content->priv->memo_preview);
+ memo_preview = E_CAL_COMPONENT_PREVIEW (
+ memo_shell_content->priv->memo_preview);
/* XXX Old code emits a "selection-changed" signal here. */
if (e_table_selected_count (table) != 1)
- e_memo_preview_clear (memo_preview);
+ e_cal_component_preview_clear (memo_preview);
}
static void
@@ -341,9 +344,9 @@
container = widget;
- widget = e_memo_preview_new ();
- e_memo_preview_set_default_timezone (
- E_MEMO_PREVIEW (widget),
+ widget = e_cal_component_preview_new ();
+ e_cal_component_preview_set_default_timezone (
+ E_CAL_COMPONENT_PREVIEW (widget),
calendar_config_get_icaltimezone ());
gtk_container_add (GTK_CONTAINER (container), widget);
priv->memo_preview = g_object_ref (widget);
@@ -485,13 +488,14 @@
"shell-view", shell_view, NULL);
}
-EMemoPreview *
+ECalComponentPreview *
e_memo_shell_content_get_memo_preview (EMemoShellContent *memo_shell_content)
{
g_return_val_if_fail (
E_IS_MEMO_SHELL_CONTENT (memo_shell_content), NULL);
- return E_MEMO_PREVIEW (memo_shell_content->priv->memo_preview);
+ return E_CAL_COMPONENT_PREVIEW (
+ memo_shell_content->priv->memo_preview);
}
EMemoTable *
Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-content.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-content.h (original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-content.h Fri Oct 3 04:43:40 2008
@@ -25,8 +25,8 @@
#include <shell/e-shell-content.h>
#include <shell/e-shell-view.h>
-#include <calendar/gui/e-memo-preview.h>
#include <calendar/gui/e-memo-table.h>
+#include <calendar/gui/e-cal-component-preview.h>
#include <widgets/menus/gal-view-instance.h>
@@ -66,7 +66,8 @@
GType e_memo_shell_content_get_type (void);
GtkWidget * e_memo_shell_content_new (EShellView *shell_view);
-EMemoPreview * e_memo_shell_content_get_memo_preview
+ECalComponentPreview *
+ e_memo_shell_content_get_memo_preview
(EMemoShellContent *memo_shell_content);
EMemoTable * e_memo_shell_content_get_memo_table
(EMemoShellContent *memo_shell_content);
Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-module.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-module.c (original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-module.c Fri Oct 3 04:43:40 2008
@@ -41,7 +41,6 @@
#define MODULE_NAME "memos"
#define MODULE_ALIASES ""
#define MODULE_SCHEMES "memo"
-#define MODULE_SEARCHES "memotypes.xml"
#define MODULE_SORT_ORDER 500
#define WEB_BASE_URI "webcal://"
@@ -334,7 +333,6 @@
MODULE_NAME,
MODULE_ALIASES,
MODULE_SCHEMES,
- MODULE_SEARCHES,
MODULE_SORT_ORDER
};
Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c (original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view-actions.c Fri Oct 3 04:43:40 2008
@@ -79,7 +79,7 @@
EMemoShellView *memo_shell_view)
{
EMemoShellContent *memo_shell_content;
- EMemoPreview *memo_preview;
+ ECalComponentPreview *memo_preview;
EMemoTable *memo_table;
const gchar *status_message;
@@ -92,7 +92,7 @@
e_memo_table_delete_selected (memo_table);
e_memo_shell_view_set_status_message (memo_shell_view, NULL);
- e_memo_preview_clear (memo_preview);
+ e_cal_component_preview_clear (memo_preview);
}
static void
@@ -258,7 +258,7 @@
memo_table = e_memo_shell_content_get_memo_table (memo_shell_content);
table = e_memo_table_get_table (memo_table);
- print_action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG;
+ print_action = GTK_PRINT_OPERATION_ACTION_PREVIEW;
print_table (table, _("Print Memos"), _("Memos"), print_action);
}
@@ -292,6 +292,8 @@
ESource *primary;
GSList *list, *iter;
+ /* XXX ESourceSelector should provide a function for this. */
+
memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar;
selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar);
primary = e_source_selector_peek_primary_selection (selector);
Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.c (original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.c Fri Oct 3 04:43:40 2008
@@ -204,11 +204,6 @@
selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar);
g_signal_connect_swapped (
- shell_sidebar, "status-message",
- G_CALLBACK (e_memo_shell_view_set_status_message),
- memo_shell_view);
-
- g_signal_connect_swapped (
memo_table, "open-component",
G_CALLBACK (e_memo_shell_view_open_memo),
memo_shell_view);
@@ -249,16 +244,21 @@
memo_shell_view);
g_signal_connect_swapped (
- shell_sidebar, "client-added",
+ memo_shell_sidebar, "client-added",
G_CALLBACK (memo_shell_view_selector_client_added_cb),
memo_shell_view);
g_signal_connect_swapped (
- shell_sidebar, "client-removed",
+ memo_shell_sidebar, "client-removed",
G_CALLBACK (memo_shell_view_selector_client_removed_cb),
memo_shell_view);
g_signal_connect_swapped (
+ memo_shell_sidebar, "status-message",
+ G_CALLBACK (e_memo_shell_view_set_status_message),
+ memo_shell_view);
+
+ g_signal_connect_swapped (
selector, "popup-event",
G_CALLBACK (memo_shell_view_selector_popup_event_cb),
memo_shell_view);
@@ -315,7 +315,7 @@
EShellContent *shell_content;
GtkAction *action;
GString *string;
- EMemoPreview *memo_preview;
+ ECalComponentPreview *memo_preview;
EMemoTable *memo_table;
ECalModel *model;
FilterRule *rule;
@@ -371,7 +371,7 @@
"(and (has-categories? #f) %s", query);
g_free (query);
query = temp;
- } else if (value != MEMO_FILTER_ANY_CATEGORY) {
+ } else if (value >= 0) {
GList *categories;
const gchar *category_name;
gchar *temp;
@@ -401,8 +401,9 @@
e_cal_model_set_search_query (model, query);
g_free (query);
- memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content);
- e_memo_preview_clear (memo_preview);
+ memo_preview =
+ e_memo_shell_content_get_memo_preview (memo_shell_content);
+ e_cal_component_preview_clear (memo_preview);
}
void
Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.h (original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view-private.h Fri Oct 3 04:43:40 2008
@@ -35,8 +35,8 @@
#include "e-util/gconf-bridge.h"
#include "calendar/gui/comp-util.h"
+#include "calendar/gui/e-cal-component-preview.h"
#include "calendar/gui/e-calendar-selector.h"
-#include "calendar/gui/e-memo-preview.h"
#include "calendar/gui/print.h"
#include "calendar/gui/dialogs/calendar-setup.h"
#include "calendar/gui/dialogs/copy-source-dialog.h"
@@ -67,14 +67,14 @@
G_BEGIN_DECLS
-/* List these in the order to be displayed.
- * Positive values are reserved for categories. */
+/* Filter items are displayed in ascending order.
+ * Non-negative values are reserved for categories. */
enum {
- MEMO_FILTER_ANY_CATEGORY = -2,
- MEMO_FILTER_UNMATCHED = -1
+ MEMO_FILTER_ANY_CATEGORY = -2,
+ MEMO_FILTER_UNMATCHED = -1
};
-/* List these in the order to be displayed. */
+/* Search items are displayed in ascending order. */
enum {
MEMO_SEARCH_SUMMARY_CONTAINS,
MEMO_SEARCH_DESCRIPTION_CONTAINS,
Modified: branches/kill-bonobo/calendar/modules/e-memo-shell-view.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-memo-shell-view.c (original)
+++ branches/kill-bonobo/calendar/modules/e-memo-shell-view.c Fri Oct 3 04:43:40 2008
@@ -199,6 +199,7 @@
shell_view_class->icon_name = "evolution-memos";
shell_view_class->ui_definition = "evolution-memos.ui";
shell_view_class->search_options = "/memo-search-options";
+ shell_view_class->search_rules = "memotypes.xml";
shell_view_class->type_module = type_module;
shell_view_class->new_shell_content = e_memo_shell_content_new;
shell_view_class->new_shell_sidebar = e_memo_shell_sidebar_new;
Modified: branches/kill-bonobo/calendar/modules/e-task-shell-content.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-content.c (original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-content.c Fri Oct 3 04:43:40 2008
@@ -131,18 +131,19 @@
gint row,
ETable *table)
{
- ETaskPreview *task_preview;
+ ECalComponentPreview *task_preview;
ETaskTable *task_table;
ECalModel *model;
ECalModelComponent *comp_data;
ECalComponent *comp;
const gchar *uid;
- task_preview = E_TASK_PREVIEW (task_shell_content->priv->task_preview);
+ task_preview = E_CAL_COMPONENT_PREVIEW (
+ task_shell_content->priv->task_preview);
task_table = E_TASK_TABLE (task_shell_content->priv->task_table);
if (e_table_selected_count (table) != 1) {
- e_task_preview_clear (task_preview);
+ e_cal_component_preview_clear (task_preview);
return;
}
@@ -153,7 +154,8 @@
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (
comp, icalcomponent_new_clone (comp_data->icalcomp));
- e_task_preview_display (task_preview, comp_data->client, comp);
+ e_cal_component_preview_display (
+ task_preview, comp_data->client, comp);
e_cal_component_get_uid (comp, &uid);
g_free (task_shell_content->priv->current_uid);
@@ -166,14 +168,15 @@
task_shell_content_selection_change_cb (ETaskShellContent *task_shell_content,
ETable *table)
{
- ETaskPreview *task_preview;
+ ECalComponentPreview *task_preview;
- task_preview = E_TASK_PREVIEW (task_shell_content->priv->task_preview);
+ task_preview = E_CAL_COMPONENT_PREVIEW (
+ task_shell_content->priv->task_preview);
/* XXX Old code emits a "selection-changed" signal here. */
if (e_table_selected_count (table) != 1)
- e_task_preview_clear (task_preview);
+ e_cal_component_preview_clear (task_preview);
}
static void
@@ -340,9 +343,9 @@
container = widget;
- widget = e_task_preview_new ();
- e_task_preview_set_default_timezone (
- E_TASK_PREVIEW (widget),
+ widget = e_cal_component_preview_new ();
+ e_cal_component_preview_set_default_timezone (
+ E_CAL_COMPONENT_PREVIEW (widget),
calendar_config_get_icaltimezone ());
gtk_container_add (GTK_CONTAINER (container), widget);
priv->task_preview = g_object_ref (widget);
@@ -484,13 +487,14 @@
"shell-view", shell_view, NULL);
}
-ETaskPreview *
+ECalComponentPreview *
e_task_shell_content_get_task_preview (ETaskShellContent *task_shell_content)
{
g_return_val_if_fail (
E_IS_TASK_SHELL_CONTENT (task_shell_content), NULL);
- return E_TASK_PREVIEW (task_shell_content->priv->task_preview);
+ return E_CAL_COMPONENT_PREVIEW (
+ task_shell_content->priv->task_preview);
}
ETaskTable *
Modified: branches/kill-bonobo/calendar/modules/e-task-shell-module.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-module.c (original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-module.c Fri Oct 3 04:43:40 2008
@@ -37,7 +37,6 @@
#define MODULE_NAME "tasks"
#define MODULE_ALIASES ""
#define MODULE_SCHEMES "task"
-#define MODULE_SEARCHES "tasktypes.xml"
#define MODULE_SORT_ORDER 600
#define WEB_BASE_URI "webcal://"
@@ -194,21 +193,83 @@
}
static void
-action_task_new_cb (GtkAction *action,
- EShellWindow *shell_window)
+task_module_cal_opened_cb (ECal *cal,
+ ECalendarStatus status,
+ GtkAction *action)
{
+ ECalComponent *comp;
+ CompEditor *editor;
+ CompEditorFlags flags = 0;
+ const gchar *action_name;
+
+ /* XXX Handle errors better. */
+ if (status != E_CALENDAR_STATUS_OK)
+ return;
+
+ action_name = gtk_action_get_name (action);
+
+ flags |= COMP_EDITOR_NEW_ITEM;
+ if (strcmp (action_name, "task-assigned-new") == 0) {
+ flags |= COMP_EDITOR_IS_ASSIGNED;
+ flags |= COMP_EDITOR_USER_ORG;
+ }
+
+ editor = task_editor_new (cal, flags);
+ comp = cal_comp_task_new_with_defaults (cal);
+ comp_editor_edit_comp (editor, comp);
+
+ gtk_window_present (GTK_WINDOW (editor));
+
+ g_object_unref (comp);
+ g_object_unref (cal);
}
static void
-action_task_assigned_new_cb (GtkAction *action,
- EShellWindow *shell_window)
+action_task_new_cb (GtkAction *action,
+ EShellWindow *shell_window)
{
+ ECal *cal = NULL;
+ ECalSourceType source_type;
+ ESourceList *source_list;
+ gchar *uid;
+
+ /* This callback is used for both tasks and assigned tasks. */
+
+ source_type = E_CAL_SOURCE_TYPE_TODO;
+
+ if (!e_cal_get_sources (&source_list, source_type, NULL)) {
+ g_warning ("Could not get task sources from GConf!");
+ return;
+ }
+
+ uid = calendar_config_get_primary_tasks ();
+
+ if (uid != NULL) {
+ ESource *source;
+
+ source = e_source_list_peek_source_by_uid (source_list, uid);
+ if (source != NULL)
+ cal = auth_new_cal_from_source (source, source_type);
+ g_free (uid);
+ }
+
+ if (cal == NULL)
+ cal = auth_new_cal_from_default (source_type);
+
+ g_return_if_fail (cal != NULL);
+
+ g_signal_connect (
+ cal, "cal-opened",
+ G_CALLBACK (task_module_cal_opened_cb), action);
+
+ e_cal_open_async (cal, FALSE);
}
static void
action_task_list_new_cb (GtkAction *action,
EShellWindow *shell_window)
{
+ calendar_setup_new_task_list (GTK_WINDOW (shell_window));
}
static GtkActionEntry item_entries[] = {
@@ -216,7 +277,7 @@
{ "task-new",
"stock_task",
N_("_Task"), /* XXX Need C_() here */
- "<Control>t",
+ "<Shift><Control>t",
N_("Create a new task"),
G_CALLBACK (action_task_new_cb) },
@@ -225,7 +286,7 @@
N_("Assigne_d Task"),
NULL,
N_("Create a new assigned task"),
- G_CALLBACK (action_task_assigned_new_cb) }
+ G_CALLBACK (action_task_new_cb) }
};
static GtkActionEntry source_entries[] = {
@@ -268,7 +329,6 @@
MODULE_NAME,
MODULE_ALIASES,
MODULE_SCHEMES,
- MODULE_SEARCHES,
MODULE_SORT_ORDER
};
Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c (original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.c Fri Oct 3 04:43:40 2008
@@ -22,6 +22,44 @@
#include "e-task-shell-view-private.h"
static void
+action_gal_save_custom_view_cb (GtkAction *action,
+ ETaskShellView *task_shell_view)
+{
+ ETaskShellContent *task_shell_content;
+ EShellView *shell_view;
+ GalViewInstance *view_instance;
+
+ shell_view = E_SHELL_VIEW (task_shell_view);
+ if (!e_shell_view_is_active (shell_view))
+ return;
+
+ task_shell_content = task_shell_view->priv->task_shell_content;
+ view_instance = e_task_shell_content_get_view_instance (task_shell_content);
+ gal_view_instance_save_as (view_instance);
+}
+
+static void
+action_search_execute_cb (GtkAction *action,
+ ETaskShellView *task_shell_view)
+{
+ EShellView *shell_view;
+
+ shell_view = E_SHELL_VIEW (task_shell_view);
+ if (!e_shell_view_is_active (shell_view))
+ return;
+
+ e_task_shell_view_execute_search (task_shell_view);
+}
+
+static void
+action_search_filter_cb (GtkRadioAction *action,
+ GtkRadioAction *current,
+ ETaskShellView *task_shell_view)
+{
+ e_task_shell_view_execute_search (task_shell_view);
+}
+
+static void
action_task_assign_cb (GtkAction *action,
ETaskShellView *task_shell_view)
{
@@ -85,7 +123,7 @@
ETaskShellView *task_shell_view)
{
ETaskShellContent *task_shell_content;
- ETaskPreview *task_preview;
+ ECalComponentPreview *task_preview;
ETaskTable *task_table;
const gchar *status_message;
@@ -98,7 +136,7 @@
e_task_table_delete_selected (task_table);
e_task_shell_view_set_status_message (task_shell_view, NULL);
- e_task_preview_clear (task_preview);
+ e_cal_component_preview_clear (task_preview);
}
static void
@@ -134,20 +172,104 @@
action_task_list_copy_cb (GtkAction *action,
ETaskShellView *task_shell_view)
{
- /* FIXME */
+ ETaskShellSidebar *task_shell_sidebar;
+ EShellWindow *shell_window;
+ EShellView *shell_view;
+ ESourceSelector *selector;
+ ESource *source;
+
+ shell_view = E_SHELL_VIEW (task_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+ selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+ source = e_source_selector_peek_primary_selection (selector);
+ g_return_if_fail (E_IS_SOURCE (source));
+
+ copy_source_dialog (
+ GTK_WINDOW (shell_window),
+ source, E_CAL_SOURCE_TYPE_TODO);
}
static void
action_task_list_delete_cb (GtkAction *action,
ETaskShellView *task_shell_view)
{
- /* FIXME */
+ ETaskShellContent *task_shell_content;
+ ETaskShellSidebar *task_shell_sidebar;
+ EShellWindow *shell_window;
+ EShellView *shell_view;
+ ETaskTable *task_table;
+ ECal *client;
+ ECalModel *model;
+ ESourceSelector *selector;
+ ESourceGroup *source_group;
+ ESourceList *source_list;
+ ESource *source;
+ gint response;
+ gchar *uri;
+ GError *error = NULL;
+
+ shell_view = E_SHELL_VIEW (task_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ task_shell_content = task_shell_view->priv->task_shell_content;
+ task_table = e_task_shell_content_get_task_table (task_shell_content);
+ model = e_task_table_get_model (task_table);
+
+ task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+ selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+ source = e_source_selector_peek_primary_selection (selector);
+ g_return_if_fail (E_IS_SOURCE (source));
+
+ /* Ask for confirmation. */
+ response = e_error_run (
+ GTK_WINDOW (shell_window),
+ "calendar:prompt-delete-task-list",
+ e_source_peek_name (source));
+ if (response != GTK_RESPONSE_YES)
+ return;
+
+ uri = e_source_get_uri (source);
+ client = e_cal_model_get_client_for_uri (model, uri);
+ if (client == NULL)
+ client = e_cal_new_from_uri (uri, E_CAL_SOURCE_TYPE_JOURNAL);
+ g_free (uri);
+
+ g_return_if_fail (client != NULL);
+
+ if (!e_cal_remove (client, &error)) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ return;
+ }
+
+ if (e_source_selector_source_is_selected (selector, source)) {
+ e_task_shell_sidebar_remove_source (
+ task_shell_sidebar, source);
+ e_source_selector_unselect_source (selector, source);
+ }
+
+ source_group = e_source_peek_group (source);
+ e_source_group_remove_source (source_group, source);
+
+ source_list = task_shell_view->priv->source_list;
+ if (!e_source_list_sync (source_list, &error)) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ }
}
static void
action_task_list_new_cb (GtkAction *action,
ETaskShellView *task_shell_view)
{
+ EShellView *shell_view;
+ EShellWindow *shell_window;
+
+ shell_view = E_SHELL_VIEW (task_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+ calendar_setup_new_task_list (GTK_WINDOW (shell_window));
}
static void
@@ -157,14 +279,14 @@
ETaskShellContent *task_shell_content;
ETaskTable *task_table;
ETable *table;
+ GtkPrintOperationAction print_action;
task_shell_content = task_shell_view->priv->task_shell_content;
task_table = e_task_shell_content_get_task_table (task_shell_content);
table = e_task_table_get_table (task_table);
- print_table (
- table, _("Print Tasks"), _("Tasks"),
- GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
+ print_action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG;
+ print_table (table, _("Print Tasks"), _("Tasks"), print_action);
}
static void
@@ -174,20 +296,65 @@
ETaskShellContent *task_shell_content;
ETaskTable *task_table;
ETable *table;
+ GtkPrintOperationAction print_action;
task_shell_content = task_shell_view->priv->task_shell_content;
task_table = e_task_shell_content_get_task_table (task_shell_content);
table = e_task_table_get_table (task_table);
- print_table (
- table, _("Print Tasks"), _("Tasks"),
- GTK_PRINT_OPERATION_ACTION_PREVIEW);
+ print_action = GTK_PRINT_OPERATION_ACTION_PREVIEW;
+ print_table (table, _("Print Tasks"), _("Tasks"), print_action);
}
static void
action_task_list_properties_cb (GtkAction *action,
ETaskShellView *task_shell_view)
{
+ ETaskShellSidebar *task_shell_sidebar;
+ EShellView *shell_view;
+ EShellWindow *shell_window;
+ ESource *source;
+ ESourceSelector *selector;
+
+ shell_view = E_SHELL_VIEW (task_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+ selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+ source = e_source_selector_peek_primary_selection (selector);
+ g_return_if_fail (E_IS_SOURCE (source));
+
+ calendar_setup_edit_task_list (GTK_WINDOW (shell_window), source);
+}
+
+static void
+action_task_list_select_one_cb (GtkAction *action,
+ ETaskShellView *task_shell_view)
+{
+ ETaskShellSidebar *task_shell_sidebar;
+ ESourceSelector *selector;
+ ESource *primary;
+ GSList *list, *iter;
+
+ /* XXX ESourceSelector should provide a function for this. */
+
+ task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+ selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+ primary = e_source_selector_peek_primary_selection (selector);
+ g_return_if_fail (primary != NULL);
+
+ list = e_source_selector_get_selection (selector);
+ for (iter = list; iter != NULL; iter = iter->next) {
+ ESource *source = iter->data;
+
+ if (source == primary)
+ continue;
+
+ e_source_selector_unselect_source (selector, source);
+ }
+ e_source_selector_free_selection (list);
+
+ e_source_selector_select_source (selector, primary);
}
static void
@@ -238,6 +405,31 @@
action_task_new_cb (GtkAction *action,
ETaskShellView *task_shell_view)
{
+ ETaskShellContent *task_shell_content;
+ ETaskTable *task_table;
+ ECalModelComponent *comp_data;
+ ECal *client;
+ ECalComponent *comp;
+ CompEditor *editor;
+ GSList *list;
+
+ task_shell_content = task_shell_view->priv->task_shell_content;
+ task_table = e_task_shell_content_get_task_table (task_shell_content);
+
+ list = e_task_table_get_selected (task_table);
+ g_return_if_fail (list != NULL);
+ comp_data = list->data;
+ g_slist_free (list);
+
+ client = comp_data->client;
+ editor = task_editor_new (client, COMP_EDITOR_NEW_ITEM);
+ comp = cal_comp_task_new_with_defaults (client);
+ comp_editor_edit_comp (editor, comp);
+
+ gtk_window_present (GTK_WINDOW (editor));
+
+ g_object_unref (comp);
+ g_object_unref (client);
}
static void
@@ -246,11 +438,19 @@
{
ETaskShellContent *task_shell_content;
ETaskTable *task_table;
+ ECalModelComponent *comp_data;
+ GSList *list;
task_shell_content = task_shell_view->priv->task_shell_content;
task_table = e_task_shell_content_get_task_table (task_shell_content);
- e_task_table_open_selected (task_table);
+ list = e_task_table_get_selected (task_table);
+ g_return_if_fail (list != NULL);
+ comp_data = list->data;
+ g_slist_free (list);
+
+ /* XXX We only open the first selected task. */
+ e_task_shell_view_open_task (task_shell_view, comp_data);
}
static void
@@ -464,6 +664,13 @@
N_("Mark selected tasks as complete"),
G_CALLBACK (action_task_mark_complete_cb) },
+ { "task-mark-incomplete",
+ NULL,
+ N_("Mar_k as Incomplete"),
+ NULL,
+ N_("Mark selected tasks as incomplete"),
+ G_CALLBACK (action_task_mark_incomplete_cb) },
+
{ "task-new",
"stock_task",
N_("New _Task"),
@@ -518,6 +725,75 @@
TRUE }
};
+static GtkRadioActionEntry task_filter_entries[] = {
+
+ { "task-filter-active-tasks",
+ NULL,
+ N_("Active Tasks"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_FILTER_ACTIVE_TASKS },
+
+ { "task-filter-any-category",
+ NULL,
+ N_("Any Category"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_FILTER_ANY_CATEGORY },
+
+ { "task-filter-completed-tasks",
+ NULL,
+ N_("Completed Tasks"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_FILTER_COMPLETED_TASKS },
+
+ { "task-filter-next-7-days-tasks",
+ NULL,
+ N_("Next 7 Days' Tasks"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_FILTER_NEXT_7_DAYS_TASKS },
+
+ { "task-filter-overdue-tasks",
+ NULL,
+ N_("Overdue Tasks"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_FILTER_OVERDUE_TASKS },
+
+ { "task-filter-tasks-with-attachments",
+ NULL,
+ N_("Tasks with Attachments"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_FILTER_TASKS_WITH_ATTACHMENTS }
+};
+
+static GtkRadioActionEntry task_search_entries[] = {
+
+ { "task-search-any-field-contains",
+ NULL,
+ N_("Any field contains"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_SEARCH_ANY_FIELD_CONTAINS },
+
+ { "task-search-description-contains",
+ NULL,
+ N_("Description contains"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_SEARCH_DESCRIPTION_CONTAINS },
+
+ { "task-search-summary-contains",
+ NULL,
+ N_("Summary contains"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ TASK_SEARCH_SUMMARY_CONTAINS }
+};
+
void
e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
{
@@ -536,8 +812,6 @@
manager = e_shell_window_get_ui_manager (shell_window);
domain = GETTEXT_PACKAGE;
- e_load_ui_definition (manager, "evolution-tasks.ui");
-
action_group = task_shell_view->priv->task_actions;
gtk_action_group_set_translation_domain (action_group, domain);
gtk_action_group_add_actions (
@@ -546,6 +820,11 @@
gtk_action_group_add_toggle_actions (
action_group, task_toggle_entries,
G_N_ELEMENTS (task_toggle_entries), task_shell_view);
+ gtk_action_group_add_radio_actions (
+ action_group, task_search_entries,
+ G_N_ELEMENTS (task_search_entries),
+ TASK_SEARCH_SUMMARY_CONTAINS,
+ NULL, NULL);
gtk_ui_manager_insert_action_group (manager, action_group, 0);
/* Bind GObject properties to GConf keys. */
@@ -560,58 +839,71 @@
action = ACTION (TASK_DELETE);
g_object_set (action, "short-label", _("Delete"), NULL);
+
+ g_signal_connect (
+ ACTION (GAL_SAVE_CUSTOM_VIEW), "activate",
+ G_CALLBACK (action_gal_save_custom_view_cb), task_shell_view);
+
+ g_signal_connect (
+ ACTION (SEARCH_EXECUTE), "activate",
+ G_CALLBACK (action_search_execute_cb), task_shell_view);
}
void
-e_task_shell_view_actions_update (ETaskShellView *task_shell_view)
+e_task_shell_view_update_search_filter (ETaskShellView *task_shell_view)
{
- ETaskShellContent *task_shell_content;
- ECal *client;
- ETable *table;
- ECalModel *model;
- ETaskTable *task_table;
+ EShellContent *shell_content;
EShellView *shell_view;
- EShellWindow *shell_window;
- GtkAction *action;
- const gchar *label;
- gboolean read_only = TRUE;
- gboolean sensitive;
- gint n_selected;
+ GtkActionGroup *action_group;
+ GtkRadioAction *radio_action;
+ GList *list, *iter;
+ GSList *group;
+ gint ii;
shell_view = E_SHELL_VIEW (task_shell_view);
- shell_window = e_shell_view_get_shell_window (shell_view);
+ shell_content = e_shell_view_get_shell_content (shell_view);
+ action_group = task_shell_view->priv->filter_actions;
- task_shell_content = task_shell_view->priv->task_shell_content;
- task_table = e_task_shell_content_get_task_table (task_shell_content);
+ e_action_group_remove_all_actions (action_group);
- model = e_task_table_get_model (task_table);
- client = e_cal_model_get_default_client (model);
-
- table = e_task_table_get_table (task_table);
- n_selected = e_table_selected_count (table);
-
- if (client != NULL)
- e_cal_is_read_only (client, &read_only, NULL);
-
- action = ACTION (TASK_OPEN);
- sensitive = (n_selected == 1);
- gtk_action_set_sensitive (action, sensitive);
-
- action = ACTION (TASK_CLIPBOARD_COPY);
- sensitive = (n_selected > 0);
- gtk_action_set_sensitive (action, sensitive);
-
- action = ACTION (TASK_CLIPBOARD_CUT);
- sensitive = (n_selected > 0);
- gtk_action_set_sensitive (action, sensitive);
-
- action = ACTION (TASK_CLIPBOARD_PASTE);
- sensitive = (n_selected > 0);
- gtk_action_set_sensitive (action, sensitive);
+ /* Add the standard filter actions. */
+ gtk_action_group_add_radio_actions (
+ action_group, task_filter_entries,
+ G_N_ELEMENTS (task_filter_entries),
+ TASK_FILTER_ANY_CATEGORY,
+ G_CALLBACK (action_search_filter_cb),
+ task_shell_view);
+
+ /* Retrieve the radio group from an action we just added. */
+ list = gtk_action_group_list_actions (action_group);
+ radio_action = GTK_RADIO_ACTION (list->data);
+ group = gtk_radio_action_get_group (radio_action);
+ g_list_free (list);
+
+ /* Build the category actions. */
+
+ list = e_categories_get_list ();
+ for (iter = list, ii = 0; iter != NULL; iter = iter->next, ii++) {
+ const gchar *category_name = iter->data;
+ GtkAction *action;
+ gchar *action_name;
+
+ action_name = g_strdup_printf (
+ "task-filter-category-%d", ii);
+ radio_action = gtk_radio_action_new (
+ action_name, category_name, NULL, NULL, ii);
+ g_free (action_name);
+
+ gtk_radio_action_set_group (radio_action, group);
+ group = gtk_radio_action_get_group (radio_action);
+
+ /* The action group takes ownership of the action. */
+ action = GTK_ACTION (radio_action);
+ gtk_action_group_add_action (action_group, action);
+ g_object_unref (radio_action);
+ }
+ g_list_free (list);
- action = ACTION (TASK_DELETE);
- sensitive = (n_selected > 0) && !read_only;
- gtk_action_set_sensitive (action, sensitive);
- label = ngettext ("Delete Task", "Delete Tasks", n_selected);
- g_object_set (action, "label", label, NULL);
+ /* Use any action in the group; doesn't matter which. */
+ e_shell_content_set_filter_action (shell_content, radio_action);
}
Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h (original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-actions.h Fri Oct 3 04:43:40 2008
@@ -39,16 +39,58 @@
E_SHELL_WINDOW_ACTION ((window), "task-forward")
#define E_SHELL_WINDOW_ACTION_TASK_MARK_COMPLETE(window) \
E_SHELL_WINDOW_ACTION ((window), "task-mark-complete")
+#define E_SHELL_WINDOW_ACTION_TASK_MARK_INCOMPLETE(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-mark-incomplete")
+#define E_SHELL_WINDOW_ACTION_TASK_NEW(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-new")
#define E_SHELL_WINDOW_ACTION_TASK_OPEN(window) \
E_SHELL_WINDOW_ACTION ((window), "task-open")
+#define E_SHELL_WINDOW_ACTION_TASK_OPEN_URL(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-open-url")
#define E_SHELL_WINDOW_ACTION_TASK_PREVIEW(window) \
E_SHELL_WINDOW_ACTION ((window), "task-preview")
#define E_SHELL_WINDOW_ACTION_TASK_PRINT(window) \
E_SHELL_WINDOW_ACTION ((window), "task-print")
-#define E_SHELL_WINDOW_ACTION_TASK_PRINT_PREVIEW(window) \
- E_SHELL_WINDOW_ACTION ((window), "task-print-preview")
#define E_SHELL_WINDOW_ACTION_TASK_PURGE(window) \
E_SHELL_WINDOW_ACTION ((window), "task-purge")
+#define E_SHELL_WINDOW_ACTION_TASK_SAVE_AS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-save-as")
+
+/* Task List Actions */
+#define E_SHELL_WINDOW_ACTION_TASK_LIST_COPY(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-list-copy")
+#define E_SHELL_WINDOW_ACTION_TASK_LIST_DELETE(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-list-delete")
+#define E_SHELL_WINDOW_ACTION_TASK_LIST_NEW(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-list-new")
+#define E_SHELL_WINDOW_ACTION_TASK_LIST_PRINT(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-list-print")
+#define E_SHELL_WINDOW_ACTION_TASK_LIST_PRINT_PREVIEW(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-list-print-preview")
+#define E_SHELL_WINDOW_ACTION_TASK_LIST_PROPERTIES(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-list-properties")
+
+/* Task Query Actions */
+#define E_SHELL_WINDOW_ACTION_TASK_FILTER_ACTIVE_TASKS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-filter-active-tasks")
+#define E_SHELL_WINDOW_ACTION_TASK_FILTER_ANY_CATEGORY(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-filter-any-category")
+#define E_SHELL_WINDOW_ACTION_TASK_FILTER_COMPLETED_TASKS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-filter-completed-tasks")
+#define E_SHELL_WINDOW_ACTION_TASK_FILTER_NEXT_7_DAYS_TASKS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-filter-next-7-days-tasks")
+#define E_SHELL_WINDOW_ACTION_TASK_FILTER_OVERDUE_TASKS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-filter-overdue-tasks")
+#define E_SHELL_WINDOW_ACTION_TASK_FILTER_TASKS_WITH_ATTACHMENTS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-filter-tasks-with-attachments")
+#define E_SHELL_WINDOW_ACTION_TASK_FILTER_UNMATCHED(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-filter-unmatched")
+#define E_SHELL_WINDOW_ACTION_TASK_SEARCH_ANY_FIELD_CONTAINS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-search-any-field-contains")
+#define E_SHELL_WINDOW_ACTION_TASK_SEARCH_DESCRIPTION_CONTAINS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-search-description-contains")
+#define E_SHELL_WINDOW_ACTION_TASK_SEARCH_SUMMARY_CONTAINS(window) \
+ E_SHELL_WINDOW_ACTION ((window), "task-search-summary-contains")
/* Action Groups */
#define E_SHELL_WINDOW_ACTION_GROUP_TASKS(window) \
Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-private.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-private.c (original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-private.c Fri Oct 3 04:43:40 2008
@@ -24,175 +24,77 @@
#include <widgets/menus/gal-view-factory-etable.h>
static void
-task_shell_view_backend_died_cb (ETaskShellView *task_shell_view,
- ECal *client)
+task_shell_view_table_popup_event_cb (EShellView *shell_view,
+ GdkEventButton *event)
{
- EShellView *shell_view;
- EShellWindow *shell_window;
- GHashTable *client_table;
- ESource *source;
- const gchar *uid;
-
- shell_view = E_SHELL_VIEW (task_shell_view);
- shell_window = e_shell_view_get_shell_window (shell_view);
-
- source = e_cal_get_source (client);
- uid = e_source_peek_uid (source);
-
- g_object_ref (source);
-
- g_hash_table_remove (client_table, uid);
- e_task_shell_view_set_status_message (task_shell_view, NULL);
-
- e_error_run (
- GTK_WINDOW (shell_window),
- "calendar:tasks-crashed", NULL);
+ const gchar *widget_path;
- g_object_unref (source);
+ widget_path = "/task-popup";
+ e_shell_view_show_popup_menu (shell_view, widget_path, event);
}
static void
-task_shell_view_backend_error_cb (ETaskShellView *task_shell_view,
- const gchar *message,
- ECal *client)
+task_shell_view_table_user_created_cb (ETaskShellView *task_shell_view,
+ ETaskTable *task_table)
{
- EShellView *shell_view;
- EShellWindow *shell_window;
- GtkWidget *dialog;
- const gchar *uri;
- gchar *uri_no_passwd;
-
- shell_view = E_SHELL_VIEW (task_shell_view);
- shell_window = e_shell_view_get_shell_window (shell_view);
+ ETaskShellSidebar *task_shell_sidebar;
+ ECalModel *model;
+ ECal *client;
+ ESource *source;
- uri = e_cal_get_uri (client);
- uri_no_passwd = get_uri_without_password (uri);
+ /* This is the "Click to Add" handler. */
- dialog = gtk_message_dialog_new (
- GTK_WINDOW (shell_window),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- _("Error on %s:\n%s"),
- uri_no_passwd, message);
+ model = e_task_table_get_model (task_table);
+ client = e_cal_model_get_default_client (model);
+ source = e_cal_get_source (client);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
+ e_task_shell_sidebar_add_source (task_shell_sidebar, source);
- g_free (uri_no_passwd);
+ e_cal_model_add_client (model, client);
}
static void
-task_shell_view_client_opened_cb (ETaskShellView *task_shell_view,
- ECalendarStatus status,
- ECal *client)
-{
- /* FIXME */
-}
-
-static gboolean
-task_shell_view_add_source (ETaskShellView *task_shell_view,
- ESource *source)
+task_shell_view_selector_client_added_cb (ETaskShellView *task_shell_view,
+ ECal *client)
{
- ETaskShellSidebar *task_shell_sidebar;
- ESourceSelector *selector;
- GHashTable *client_table;
- ECal *default_client;
- ECal *client;
- const gchar *uid;
- const gchar *uri;
- gchar *status_message;
-
- client_table = task_shell_view->priv->client_table;
- default_client = task_shell_view->priv->default_client;
-
- uid = e_source_peek_uid (source);
- client = g_hash_table_lookup (client_table, uid);
-
- if (client != NULL)
- return TRUE;
-
- if (default_client != NULL) {
- ESource *default_source;
- const gchar *default_uid;
-
- default_source = e_cal_get_source (default_client);
- default_uid = e_source_peek_uid (default_source);
-
- if (strcmp (uid, default_uid) == 0)
- client = g_object_ref (default_client);
- }
-
- if (client == NULL)
- client = auth_new_cal_from_source (
- source, E_CAL_SOURCE_TYPE_TODO);
-
- if (client == NULL)
- return FALSE;
-
- g_signal_connect_swapped (
- client, "backend-died",
- G_CALLBACK (task_shell_view_backend_died_cb),
- task_shell_view);
-
- g_signal_connect_swapped (
- client, "backend-error",
- G_CALLBACK (task_shell_view_backend_error_cb),
- task_shell_view);
-
- g_hash_table_insert (client_table, g_strdup (uid), client);
-
- uri = e_cal_get_uri (client);
-
- status_message = g_strdup_printf (_("Opening tasks at %s"), uri);
- e_task_shell_view_set_status_message (task_shell_view, status_message);
- g_free (status_message);
-
- task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
- selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
- e_source_selector_select_source (selector, source);
-
- g_signal_connect_swapped (
- client, "cal-opened",
- G_CALLBACK (task_shell_view_client_opened_cb),
- task_shell_view);
+ ETaskShellContent *task_shell_content;
+ ETaskTable *task_table;
+ ECalModel *model;
- e_cal_open_async (client, FALSE);
+ task_shell_content = task_shell_view->priv->task_shell_content;
+ task_table = e_task_shell_content_get_task_table (task_shell_content);
+ model = e_task_table_get_model (task_table);
- return TRUE;
+ e_cal_model_add_client (model, client);
}
static void
-task_shell_view_table_popup_event_cb (ETaskShellView *task_shell_view,
- GdkEventButton *event)
+task_shell_view_selector_client_removed_cb (ETaskShellView *task_shell_view,
+ ECal *client)
{
- EShellView *shell_view;
- const gchar *widget_path;
+ ETaskShellContent *task_shell_content;
+ ETaskTable *task_table;
+ ECalModel *model;
- shell_view = E_SHELL_VIEW (task_shell_view);
- widget_path = "/task-popup";
+ task_shell_content = task_shell_view->priv->task_shell_content;
+ task_table = e_task_shell_content_get_task_table (task_shell_content);
+ model = e_task_table_get_model (task_table);
- e_task_shell_view_actions_update (task_shell_view);
- e_shell_view_show_popup_menu (shell_view, widget_path, event);
+ e_cal_model_remove_client (model, client);
}
-static void
-task_shell_view_table_user_created (ETaskShellView *task_shell_view,
- ETaskTable *task_table)
+static gboolean
+task_shell_view_selector_popup_event_cb (EShellView *shell_view,
+ ESource *primary_source,
+ GdkEventButton *event)
{
- ECal *client;
- ESource *source;
-
- if (task_table->user_created_cal != NULL)
- client = task_table->user_created_cal;
- else {
- ECalModel *model;
+ const gchar *widget_path;
- model = e_task_table_get_model (task_table);
- client = e_cal_model_get_default_client (model);
- }
+ widget_path = "/task-list-popup";
+ e_shell_view_show_popup_menu (shell_view, widget_path, event);
- source = e_cal_get_source (client);
- task_shell_view_add_source (task_shell_view, source);
+ return TRUE;
}
static void
@@ -251,21 +153,15 @@
{
ETaskShellViewPrivate *priv = task_shell_view->priv;
ESourceList *source_list;
- GHashTable *client_table;
GObject *object;
object = G_OBJECT (shell_view_class->type_module);
source_list = g_object_get_data (object, "source-list");
g_return_if_fail (E_IS_SOURCE_LIST (source_list));
- client_table = g_hash_table_new_full (
- g_str_hash, g_str_equal,
- (GDestroyNotify) g_free,
- (GDestroyNotify) g_object_unref);
-
priv->source_list = g_object_ref (source_list);
priv->task_actions = gtk_action_group_new ("tasks");
- priv->client_table = client_table;
+ priv->filter_actions = gtk_action_group_new ("tasks-filter");
if (!gal_view_collection_loaded (shell_view_class->view_collection))
task_shell_view_load_view_collection (shell_view_class);
@@ -280,14 +176,18 @@
{
ETaskShellViewPrivate *priv = task_shell_view->priv;
ETaskShellContent *task_shell_content;
+ ETaskShellSidebar *task_shell_sidebar;
+ EShellView *shell_view;
+ EShellWindow *shell_window;
EShellContent *shell_content;
EShellSidebar *shell_sidebar;
- EShellView *shell_view;
ETaskTable *task_table;
ECalModel *model;
ETable *table;
+ ESourceSelector *selector;
shell_view = E_SHELL_VIEW (task_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
shell_content = e_shell_view_get_shell_content (shell_view);
shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
@@ -300,6 +200,9 @@
model = e_task_table_get_model (task_table);
table = e_task_table_get_table (task_table);
+ task_shell_sidebar = E_TASK_SHELL_SIDEBAR (shell_sidebar);
+ selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+
g_signal_connect_swapped (
task_table, "open-component",
G_CALLBACK (e_task_shell_view_open_task),
@@ -340,8 +243,40 @@
G_CALLBACK (e_task_shell_view_update_sidebar),
task_shell_view);
+ g_signal_connect_swapped (
+ task_shell_sidebar, "client-added",
+ G_CALLBACK (task_shell_view_selector_client_added_cb),
+ task_shell_view);
+
+ g_signal_connect_swapped (
+ task_shell_sidebar, "client-removed",
+ G_CALLBACK (task_shell_view_selector_client_removed_cb),
+ task_shell_view);
+
+ g_signal_connect_swapped (
+ task_shell_sidebar, "status-message",
+ G_CALLBACK (e_task_shell_view_set_status_message),
+ task_shell_view);
+
+ g_signal_connect_swapped (
+ selector, "popup-event",
+ G_CALLBACK (task_shell_view_selector_popup_event_cb),
+ task_shell_view);
+
+ g_signal_connect_swapped (
+ selector, "primary-selection-changed",
+ G_CALLBACK (e_shell_view_update_actions),
+ task_shell_view);
+
+ e_categories_register_change_listener (
+ G_CALLBACK (e_task_shell_view_update_search_filter),
+ task_shell_view);
+
e_task_shell_view_actions_init (task_shell_view);
e_task_shell_view_update_sidebar (task_shell_view);
+ e_task_shell_view_update_search_filter (task_shell_view);
+
+ e_task_shell_view_execute_search (task_shell_view);
}
void
@@ -352,13 +287,11 @@
DISPOSE (priv->source_list);
DISPOSE (priv->task_actions);
+ DISPOSE (priv->filter_actions);
DISPOSE (priv->task_shell_content);
DISPOSE (priv->task_shell_sidebar);
- g_hash_table_remove_all (priv->client_table);
- DISPOSE (priv->default_client);
-
if (task_shell_view->priv->activity != NULL) {
/* XXX Activity is no cancellable. */
e_activity_complete (task_shell_view->priv->activity);
@@ -370,9 +303,13 @@
void
e_task_shell_view_private_finalize (ETaskShellView *task_shell_view)
{
- ETaskShellViewPrivate *priv = task_shell_view->priv;
+ /* XXX Nothing to do? */
+}
- g_hash_table_destroy (priv->client_table);
+void
+e_task_shell_view_execute_search (ETaskShellView *task_shell_view)
+{
+ /* FIXME */
}
void
Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h (original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view-private.h Fri Oct 3 04:43:40 2008
@@ -26,15 +26,18 @@
#include <string.h>
#include <glib/gi18n.h>
+#include <libedataserver/e-categories.h>
+#include <libedataserver/e-sexp.h>
#include "e-util/e-dialog-utils.h"
#include "e-util/e-error.h"
#include "e-util/e-util.h"
+#include "e-util/gconf-bridge.h"
#include "calendar/common/authentication.h"
#include "calendar/gui/misc.h"
+#include "calendar/gui/e-cal-component-preview.h"
#include "calendar/gui/e-calendar-selector.h"
-#include "calendar/gui/e-task-preview.h"
#include "calendar/gui/dialogs/calendar-setup.h"
#include "calendar/gui/dialogs/task-editor.h"
@@ -63,6 +66,25 @@
G_BEGIN_DECLS
+/* Filter items are displayed in ascending order.
+ * Non-negative values are reserved for categories. */
+enum {
+ TASK_FILTER_ANY_CATEGORY = -7,
+ TASK_FILTER_UNMATCHED = -6,
+ TASK_FILTER_NEXT_7_DAYS_TASKS = -5,
+ TASK_FILTER_ACTIVE_TASKS = -4,
+ TASK_FILTER_OVERDUE_TASKS = -3,
+ TASK_FILTER_COMPLETED_TASKS = -2,
+ TASK_FILTER_TASKS_WITH_ATTACHMENTS = -1
+};
+
+/* Search items are displayed in ascending order. */
+enum {
+ TASK_SEARCH_SUMMARY_CONTAINS,
+ TASK_SEARCH_DESCRIPTION_CONTAINS,
+ TASK_SEARCH_ANY_FIELD_CONTAINS
+};
+
struct _ETaskShellViewPrivate {
/*** Module Data ***/
@@ -72,6 +94,7 @@
/*** UI Management ***/
GtkActionGroup *task_actions;
+ GtkActionGroup *filter_actions;
/*** Other Stuff ***/
@@ -79,10 +102,6 @@
ETaskShellContent *task_shell_content;
ETaskShellSidebar *task_shell_sidebar;
- /* UID -> Client */
- GHashTable *client_table;
- ECal *default_client;
-
EActivity *activity;
};
@@ -100,7 +119,7 @@
void e_task_shell_view_actions_init
(ETaskShellView *task_shell_view);
-void e_task_shell_view_actions_update
+void e_task_shell_view_execute_search
(ETaskShellView *task_shell_view);
void e_task_shell_view_open_task
(ETaskShellView *task_shell_view,
@@ -110,6 +129,8 @@
const gchar *status_message);
void e_task_shell_view_update_sidebar
(ETaskShellView *task_shell_view);
+void e_task_shell_view_update_search_filter
+ (ETaskShellView *task_shell_view);
G_END_DECLS
Modified: branches/kill-bonobo/calendar/modules/e-task-shell-view.c
==============================================================================
--- branches/kill-bonobo/calendar/modules/e-task-shell-view.c (original)
+++ branches/kill-bonobo/calendar/modules/e-task-shell-view.c Fri Oct 3 04:43:40 2008
@@ -74,6 +74,145 @@
}
static void
+task_shell_view_update_actions (EShellView *shell_view)
+{
+ ETaskShellViewPrivate *priv;
+ ETaskShellContent *task_shell_content;
+ ETaskShellSidebar *task_shell_sidebar;
+ EShellWindow *shell_window;
+ ESourceSelector *selector;
+ ETable *table;
+ ETaskTable *task_table;
+ ESource *source;
+ GtkAction *action;
+ GSList *list, *iter;
+ const gchar *label;
+ const gchar *uri = NULL;
+ gboolean user_created_source;
+ gboolean assignable = TRUE;
+ gboolean editable = TRUE;
+ gboolean has_url = FALSE;
+ gboolean sensitive;
+ gint n_selected;
+ gint n_complete = 0;
+ gint n_incomplete = 0;
+
+ priv = E_TASK_SHELL_VIEW_GET_PRIVATE (shell_view);
+
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ task_shell_content = priv->task_shell_content;
+ task_table = e_task_shell_content_get_task_table (task_shell_content);
+
+ task_shell_sidebar = priv->task_shell_sidebar;
+ selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
+
+ table = e_task_table_get_table (task_table);
+ n_selected = e_table_selected_count (table);
+
+ list = e_task_table_get_selected (task_table);
+ for (iter = list; iter != NULL; iter = iter->next) {
+ ECalModelComponent *comp_data = iter->data;
+ icalproperty *prop;
+ const gchar *cap;
+ gboolean read_only;
+
+ e_cal_is_read_only (comp_data->client, &read_only, NULL);
+ editable &= !read_only;
+
+ cap = CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT;
+ if (e_cal_get_static_capability (comp_data->client, cap))
+ assignable = FALSE;
+
+ cap = CAL_STATIC_NO_CONV_TO_ASSIGN_TASK;
+ if (e_cal_get_static_capability (comp_data->client, cap))
+ assignable = FALSE;
+
+ prop = icalcomponent_get_first_property (
+ comp_data->icalcomp, ICAL_URL_PROPERTY);
+ has_url |= (prop != NULL);
+
+ prop = icalcomponent_get_first_property (
+ comp_data->icalcomp, ICAL_COMPLETED_PROPERTY);
+ if (prop != NULL)
+ n_complete++;
+ else
+ n_incomplete++;
+ }
+ g_slist_free (list);
+
+ source = e_source_selector_peek_primary_selection (selector);
+ if (source != NULL)
+ uri = e_source_peek_relative_uri (source);
+ user_created_source = (uri != NULL && strcmp (uri, "system") != 0);
+
+ action = ACTION (TASK_ASSIGN);
+ sensitive = (n_selected == 1) && editable && assignable;
+
+ action = ACTION (TASK_CLIPBOARD_COPY);
+ sensitive = (n_selected > 0);
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_CLIPBOARD_CUT);
+ sensitive = (n_selected > 0) && editable;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_CLIPBOARD_PASTE);
+ sensitive = editable;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_DELETE);
+ sensitive = (n_selected > 0) && editable;
+ gtk_action_set_sensitive (action, sensitive);
+ label = ngettext ("Delete Task", "Delete Tasks", n_selected);
+ g_object_set (action, "label", label, NULL);
+
+ action = ACTION (TASK_FORWARD);
+ sensitive = (n_selected == 1);
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_LIST_COPY);
+ sensitive = (source != NULL);
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_LIST_DELETE);
+ sensitive = user_created_source;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_LIST_PROPERTIES);
+ sensitive = (source != NULL);
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_MARK_COMPLETE);
+ sensitive = (n_selected > 0) && editable && (n_incomplete > 0);
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_MARK_INCOMPLETE);
+ sensitive = (n_selected > 0) && editable && (n_complete > 0);
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_OPEN);
+ sensitive = (n_selected == 1);
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_OPEN_URL);
+ sensitive = (n_selected == 1) && has_url;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_PRINT);
+ sensitive = (n_selected == 1);
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_PURGE);
+ sensitive = editable;
+ gtk_action_set_sensitive (action, sensitive);
+
+ action = ACTION (TASK_SAVE_AS);
+ sensitive = (n_selected == 1);
+ gtk_action_set_sensitive (action, sensitive);
+}
+
+static void
task_shell_view_class_init (ETaskShellView *class,
GTypeModule *type_module)
{
@@ -94,8 +233,11 @@
shell_view_class->icon_name = "evolution-tasks";
shell_view_class->ui_definition = "evolution-tasks.ui";
shell_view_class->search_options = "/task-search-options";
+ shell_view_class->search_rules = "tasktypes.xml";
shell_view_class->type_module = type_module;
+ shell_view_class->new_shell_content = e_task_shell_content_new;
shell_view_class->new_shell_sidebar = e_task_shell_sidebar_new;
+ shell_view_class->update_actions = task_shell_view_update_actions;
g_object_class_install_property (
object_class,
Modified: branches/kill-bonobo/doc/reference/shell/eshell-sections.txt
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/eshell-sections.txt (original)
+++ branches/kill-bonobo/doc/reference/shell/eshell-sections.txt Fri Oct 3 04:43:40 2008
@@ -33,36 +33,102 @@
</SECTION>
<SECTION>
-<FILE>e-shell-view</FILE>
-<TITLE>EShellView</TITLE>
-EShellView
-EShellViewClass
-e_shell_view_get_name
-e_shell_view_get_action
-e_shell_view_get_title
-e_shell_view_set_title
-e_shell_view_get_view_id
-e_shell_view_set_view_id
-e_shell_view_is_active
-e_shell_view_get_page_num
-e_shell_view_get_size_group
-e_shell_view_get_shell_content
-e_shell_view_get_shell_sidebar
-e_shell_view_get_shell_taskbar
-e_shell_view_get_shell_window
-e_shell_view_get_shell_module
-e_shell_view_update_actions
-e_shell_view_show_popup_menu
+<FILE>e-shell-content</FILE>
+<TITLE>EShellContent</TITLE>
+EShellContent
+e_shell_content_new
+e_shell_content_get_shell_view
+e_shell_content_get_context
+e_shell_content_set_context
+e_shell_content_get_filter_action
+e_shell_content_set_filter_action
+e_shell_content_get_filter_value
+e_shell_content_set_filter_value
+e_shell_content_get_filter_visible
+e_shell_content_set_filter_visible
+e_shell_content_add_filter_separator_after
+e_shell_content_get_search_context
+e_shell_content_get_search_rule
+e_shell_content_set_search_rule
+e_shell_content_get_search_text
+e_shell_content_set_search_text
+e_shell_content_get_search_value
+e_shell_content_set_search_value
+e_shell_content_get_search_visible
+e_shell_content_set_search_visible
+e_shell_content_get_scope_action
+e_shell_content_set_scope_action
+e_shell_content_get_scope_value
+e_shell_content_set_scope_value
+e_shell_content_get_scope_visible
+e_shell_content_set_scope_visible
+e_shell_content_get_view_id
+e_shell_content_set_view_id
+e_shell_content_run_advanced_search_dialog
+e_shell_content_run_edit_searches_dialog
+e_shell_content_run_save_search_dialog
<SUBSECTION Standard>
-E_SHELL_VIEW
-E_IS_SHELL_VIEW
-E_TYPE_SHELL_VIEW
-E_SHELL_VIEW_CLASS
-E_IS_SHELL_VIEW_CLASS
-E_SHELL_VIEW_GET_CLASS
-e_shell_view_get_type
+E_SHELL_CONTENT
+E_IS_SHELL_CONTENT
+E_TYPE_SHELL_CONTENT
+E_SHELL_CONTENT_CLASS
+E_IS_SHELL_CONTENT_CLASS
+E_SHELL_CONTENT_GET_CLASS
+EShellContentClass
+e_shell_content_get_type
<SUBSECTION Private>
-EShellViewPrivate
+EShellContentPrivate
+</SECTION>
+
+<SECTION>
+<FILE>e-shell-module</FILE>
+<TITLE>EShellModule</TITLE>
+EShellModule
+EShellModuleInfo
+e_shell_module_new
+e_shell_module_compare
+e_shell_module_get_config_dir
+e_shell_module_get_data_dir
+e_shell_module_get_filename
+e_shell_module_get_shell
+e_shell_module_add_activity
+e_shell_module_is_busy
+e_shell_module_shutdown
+e_shell_module_set_info
+<SUBSECTION Standard>
+E_SHELL_MODULE
+E_IS_SHELL_MODULE
+E_TYPE_SHELL_MODULE
+E_SHELL_MODULE_CLASS
+E_IS_SHELL_MODULE_CLASS
+E_SHELL_MODULE_GET_CLASS
+EShellModuleClass
+e_shell_module_get_type
+<SUBSECTION Private>
+EShellModulePrivate
+</SECTION>
+
+<SECTION>
+<FILE>e-shell-sidebar</FILE>
+<TITLE>EShellSidebar</TITLE>
+EShellSidebar
+e_shell_sidebar_new
+e_shell_sidebar_get_shell_view
+e_shell_sidebar_get_primary_text
+e_shell_sidebar_set_primary_text
+e_shell_sidebar_get_secondary_text
+e_shell_sidebar_set_secondary_text
+<SUBSECTION Standard>
+E_SHELL_SIDEBAR
+E_IS_SHELL_SIDEBAR
+E_TYPE_SHELL_SIDEBAR
+E_SHELL_SIDEBAR_CLASS
+E_IS_SHELL_SIDEBAR_CLASS
+E_SHELL_SIDEBAR_GET_CLASS
+EShellSidebarClass
+e_shell_sidebar_get_type
+<SUBSECTION Private>
+EShellSidebarPrivate
</SECTION>
<SECTION>
@@ -91,28 +157,14 @@
</SECTION>
<SECTION>
-<FILE>e-shell-sidebar</FILE>
-<TITLE>EShellSidebar</TITLE>
-EShellSidebar
-e_shell_sidebar_new
-<SUBSECTION Standard>
-E_SHELL_SIDEBAR
-E_IS_SHELL_SIDEBAR
-E_TYPE_SHELL_SIDEBAR
-E_SHELL_SIDEBAR_CLASS
-E_IS_SHELL_SIDEBAR_CLASS
-E_SHELL_SIDEBAR_GET_CLASS
-EShellSidebarClass
-e_shell_sidebar_get_type
-<SUBSECTION Private>
-EShellSidebarPrivate
-</SECTION>
-
-<SECTION>
<FILE>e-shell-taskbar</FILE>
<TITLE>EShellTaskbar</TITLE>
EShellTaskbar
e_shell_taskbar_new
+e_shell_taskbar_get_shell_view
+e_shell_taskbar_get_message
+e_shell_taskbar_set_message
+e_shell_taskbar_unset_message
<SUBSECTION Standard>
E_SHELL_TASKBAR
E_IS_SHELL_TASKBAR
@@ -127,50 +179,36 @@
</SECTION>
<SECTION>
-<FILE>e-shell-module</FILE>
-<TITLE>EShellModule</TITLE>
-EShellModule
-EShellModuleInfo
-e_shell_module_new
-e_shell_module_compare
-e_shell_module_get_config_dir
-e_shell_module_get_data_dir
-e_shell_module_get_filename
-e_shell_module_get_searches
-e_shell_module_get_shell
-e_shell_module_add_activity
-e_shell_module_is_busy
-e_shell_module_shutdown
-e_shell_module_set_info
-<SUBSECTION Standard>
-E_SHELL_MODULE
-E_IS_SHELL_MODULE
-E_TYPE_SHELL_MODULE
-E_SHELL_MODULE_CLASS
-E_IS_SHELL_MODULE_CLASS
-E_SHELL_MODULE_GET_CLASS
-EShellModuleClass
-e_shell_module_get_type
-<SUBSECTION Private>
-EShellModulePrivate
-</SECTION>
-
-<SECTION>
-<FILE>e-shell-content</FILE>
-<TITLE>EShellContent</TITLE>
-EShellContent
-e_shell_content_new
+<FILE>e-shell-view</FILE>
+<TITLE>EShellView</TITLE>
+EShellView
+EShellViewClass
+e_shell_view_get_name
+e_shell_view_get_action
+e_shell_view_get_title
+e_shell_view_set_title
+e_shell_view_get_view_id
+e_shell_view_set_view_id
+e_shell_view_is_active
+e_shell_view_get_page_num
+e_shell_view_get_size_group
+e_shell_view_get_shell_content
+e_shell_view_get_shell_sidebar
+e_shell_view_get_shell_taskbar
+e_shell_view_get_shell_window
+e_shell_view_get_shell_module
+e_shell_view_update_actions
+e_shell_view_show_popup_menu
<SUBSECTION Standard>
-E_SHELL_CONTENT
-E_IS_SHELL_CONTENT
-E_TYPE_SHELL_CONTENT
-E_SHELL_CONTENT_CLASS
-E_IS_SHELL_CONTENT_CLASS
-E_SHELL_CONTENT_GET_CLASS
-EShellContentClass
-e_shell_content_get_type
+E_SHELL_VIEW
+E_IS_SHELL_VIEW
+E_TYPE_SHELL_VIEW
+E_SHELL_VIEW_CLASS
+E_IS_SHELL_VIEW_CLASS
+E_SHELL_VIEW_GET_CLASS
+e_shell_view_get_type
<SUBSECTION Private>
-EShellContentPrivate
+EShellViewPrivate
</SECTION>
<SECTION>
Added: branches/kill-bonobo/doc/reference/shell/tmpl/action-groups.sgml
==============================================================================
--- (empty file)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/action-groups.sgml Fri Oct 3 04:43:40 2008
@@ -0,0 +1,69 @@
+<!-- ##### SECTION Title ##### -->
+Action Groups
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GROUP_SHELL ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GROUP_SWITCHER ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GROUP_NEW_ITEM ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GROUP_NEW_SOURCE ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GROUP_CUSTOM_RULES ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GROUP_GAL_VIEW ##### -->
+<para>
+
+</para>
+
+ window:
+
+
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-content.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-importer.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-importer.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-importer.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-module.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-module.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-module.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
@@ -49,7 +51,6 @@
@name:
@aliases:
@schemes:
- searches:
@sort_order:
@is_busy:
@shutdown:
@@ -101,15 +102,6 @@
@Returns:
-<!-- ##### FUNCTION e_shell_module_get_searches ##### -->
-<para>
-
-</para>
-
- shell_module:
- Returns:
-
-
<!-- ##### FUNCTION e_shell_module_get_shell ##### -->
<para>
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-switcher.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-switcher.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-switcher.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-taskbar.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-view.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-view.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-view.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
@@ -87,6 +89,7 @@
@icon_name:
@ui_definition:
@search_options:
+ search_rules:
@type_module:
@view_collection:
@new_shell_content:
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-window.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell.sgml Fri Oct 3 04:43:40 2008
@@ -9,11 +9,13 @@
</para>
+
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
+
<!-- ##### SECTION Stability_Level ##### -->
Modified: branches/kill-bonobo/doc/reference/shell/tmpl/eshell-unused.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/eshell-unused.sgml (original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/eshell-unused.sgml Fri Oct 3 04:43:40 2008
@@ -1,15 +0,0 @@
-<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GAL_VIEW_MENU ##### -->
-<para>
-
-</para>
-
- window:
-
-<!-- ##### FUNCTION e_shell_view_add_activity ##### -->
-<para>
-
-</para>
-
- shell_view:
- activity:
-
Added: branches/kill-bonobo/doc/reference/shell/tmpl/shell-actions.sgml
==============================================================================
--- (empty file)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/shell-actions.sgml Fri Oct 3 04:43:40 2008
@@ -0,0 +1,285 @@
+<!-- ##### SECTION Title ##### -->
+Shell Actions
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_ABOUT ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_CLOSE ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_CONTENTS ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_FAQ ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_FORGET_PASSWORDS ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GAL_CUSTOM_VIEW ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GAL_DEFINE_VIEWS ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_GAL_SAVE_CUSTOM_VIEW ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_IMPORT ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_NEW_WINDOW ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_PAGE_SETUP ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_PREFERENCES ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_QUICK_REFERENCE ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_QUIT ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SEARCH_ADVANCED ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SEARCH_CLEAR ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SEARCH_EDIT ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SEARCH_EXECUTE ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SEARCH_OPTIONS ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SEARCH_SAVE ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SEND_RECEIVE ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SHOW_SIDEBAR ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SHOW_STATUSBAR ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SHOW_SWITCHER ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SHOW_TOOLBAR ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SUBMIT_BUG ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SWITCHER_STYLE_BOTH ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SWITCHER_STYLE_ICONS ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SWITCHER_STYLE_TEXT ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SWITCHER_STYLE_USER ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_SYNC_OPTIONS ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_WORK_OFFLINE ##### -->
+<para>
+
+</para>
+
+ window:
+
+
+<!-- ##### MACRO E_SHELL_WINDOW_ACTION_WORK_ONLINE ##### -->
+<para>
+
+</para>
+
+ window:
+
+
Modified: branches/kill-bonobo/shell/e-shell-content.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-content.c (original)
+++ branches/kill-bonobo/shell/e-shell-content.c Fri Oct 3 04:43:40 2008
@@ -208,6 +208,7 @@
shell_content_init_search_context (EShellContent *shell_content)
{
EShellView *shell_view;
+ EShellViewClass *shell_view_class;
EShellModule *shell_module;
RuleContext *context;
FilterRule *rule;
@@ -217,13 +218,14 @@
shell_view = e_shell_content_get_shell_view (shell_content);
shell_module = e_shell_view_get_shell_module (shell_view);
+ shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
+ g_return_if_fail (shell_view_class->search_rules != NULL);
/* The filename for built-in searches is specified in a
* module's EShellModuleInfo. All built-in search rules
* live in the same directory. */
system_filename = g_build_filename (
- EVOLUTION_RULEDIR,
- e_shell_module_get_searches (shell_module), NULL);
+ EVOLUTION_RULEDIR, shell_view_class->search_rules, NULL);
/* The filename for custom saved searches is always of
* the form "$(shell_module_data_dir)/searches.xml". */
Modified: branches/kill-bonobo/shell/e-shell-content.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-content.h (original)
+++ branches/kill-bonobo/shell/e-shell-content.h Fri Oct 3 04:43:40 2008
@@ -125,9 +125,6 @@
void e_shell_content_set_scope_visible
(EShellContent *shell_content,
gboolean scope_visible);
-void e_shell_content_save_search_dialog
- (EShellContent *shell_content,
- const gchar *filename);
const gchar * e_shell_content_get_view_id (EShellContent *shell_content);
void e_shell_content_set_view_id (EShellContent *shell_content,
const gchar *view_id);
Modified: branches/kill-bonobo/shell/e-shell-module.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-module.c (original)
+++ branches/kill-bonobo/shell/e-shell-module.c Fri Oct 3 04:43:40 2008
@@ -405,26 +405,6 @@
}
/**
- * e_shell_module_get_searches:
- * @shell_module: an #EShellModule
- *
- * Returns the base name of the XML file containing predefined search
- * rules for @shell_module. The XML files are usually named something
- * like <filename><emphasis>module</emphasis>types.xml</filename>.
- *
- * XXX This function is likely to change or disappear.
- *
- * Returns: the base name of the XML filter file
- **/
-const gchar *
-e_shell_module_get_searches (EShellModule *shell_module)
-{
- g_return_val_if_fail (E_IS_SHELL_MODULE (shell_module), NULL);
-
- return shell_module->priv->info.searches;
-}
-
-/**
* e_shell_module_get_shell:
* @shell_module: an #EShellModule
*
@@ -551,7 +531,6 @@
module_info->aliases = g_intern_string (info->aliases);
module_info->schemes = g_intern_string (info->schemes);
- module_info->searches = g_intern_string (info->searches);
module_info->sort_order = info->sort_order;
module_info->is_busy = info->is_busy;
Modified: branches/kill-bonobo/shell/e-shell-module.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-module.h (original)
+++ branches/kill-bonobo/shell/e-shell-module.h Fri Oct 3 04:43:40 2008
@@ -70,9 +70,6 @@
* @schemes: Colon-separated list of URI schemes. The #EShell
* will forward command-line URIs to the appropriate
* module based on this list.
- * @searches: Base name of the XML file containing predefined
- * search rules for this module. These show up as
- * options in the search entry drop-down.
* @sort_order: Used to determine the order of modules listed in
* the main menu and in the switcher. See
* e_shell_module_compare().
@@ -89,7 +86,6 @@
const gchar *name;
const gchar *aliases;
const gchar *schemes;
- const gchar *searches;
gint sort_order;
gboolean (*is_busy) (EShellModule *shell_module);
@@ -119,7 +115,6 @@
const gchar * e_shell_module_get_config_dir (EShellModule *shell_module);
const gchar * e_shell_module_get_data_dir (EShellModule *shell_module);
const gchar * e_shell_module_get_filename (EShellModule *shell_module);
-const gchar * e_shell_module_get_searches (EShellModule *shell_module);
struct _EShell *e_shell_module_get_shell (EShellModule *shell_module);
void e_shell_module_add_activity (EShellModule *shell_module,
EActivity *activity);
Modified: branches/kill-bonobo/shell/e-shell-view.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-view.h (original)
+++ branches/kill-bonobo/shell/e-shell-view.h Fri Oct 3 04:43:40 2008
@@ -87,6 +87,10 @@
* @search_options: Widget path in the UI definition to the search
* options popup menu. The menu gets shown when the
* user clicks the "find" icon in the search entry.
+ * @search_rules: Base name of the XML file containing predefined
+ * search rules for this shell view. The XML files
+ * are usually named something like <filename>
+ * <emphasis>view</emphasis>types.xml</filename>.
* @type_module: The corresponding #GTypeModule for this shell
* view. Subclasses are responsible for setting
* this. An easy way do so is to pass it to the
@@ -127,6 +131,9 @@
/* Widget path to the search options popup menu. */
const gchar *search_options;
+ /* Base name of the search rule definition file. */
+ const gchar *search_rules;
+
/* Subclasses should set this via the "class_data" field in
* the GTypeInfo they pass to g_type_module_register_type(). */
GTypeModule *type_module;
Modified: branches/kill-bonobo/shell/e-shell-window-actions.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window-actions.c (original)
+++ branches/kill-bonobo/shell/e-shell-window-actions.c Fri Oct 3 04:43:40 2008
@@ -2083,6 +2083,8 @@
ui_manager = e_shell_window_get_ui_manager (shell_window);
view_name = e_shell_window_get_active_view (shell_window);
shell_view = e_shell_window_get_shell_view (shell_window, view_name);
+ g_return_if_fail (shell_view != NULL);
+
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
view_collection = shell_view_class->view_collection;
view_id = e_shell_view_get_view_id (shell_view);
Modified: branches/kill-bonobo/shell/e-shell-window-private.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window-private.c (original)
+++ branches/kill-bonobo/shell/e-shell-window-private.c Fri Oct 3 04:43:40 2008
@@ -109,7 +109,7 @@
{
GtkAction *action;
GtkLabel *label;
- gchar *tooltip;
+ gchar *tooltip = NULL;
action = g_object_get_data (G_OBJECT (menu_item), "action");
g_return_if_fail (GTK_IS_ACTION (action));
@@ -410,6 +410,9 @@
EShellView *shell_view;
gint page_num;
+ g_return_if_fail (E_IS_SHELL_WINDOW (shell_window));
+ g_return_if_fail (view_name != NULL);
+
shell_view = e_shell_window_get_shell_view (shell_window, view_name);
page_num = e_shell_view_get_page_num (shell_view);
@@ -440,7 +443,9 @@
EShellView *shell_view;
GtkAction *action;
const gchar *view_name;
- gchar *icon_name;
+ gchar *icon_name = NULL;
+
+ g_return_if_fail (E_IS_SHELL_WINDOW (shell_window));
view_name = e_shell_window_get_active_view (shell_window);
shell_view = e_shell_window_get_shell_view (shell_window, view_name);
@@ -459,6 +464,8 @@
const gchar *view_name;
gchar *window_title;
+ g_return_if_fail (E_IS_SHELL_WINDOW (shell_window));
+
view_name = e_shell_window_get_active_view (shell_window);
shell_view = e_shell_window_get_shell_view (shell_window, view_name);
view_title = e_shell_view_get_title (shell_view);
@@ -476,6 +483,8 @@
GtkWidget *widget;
const gchar *path;
+ g_return_if_fail (E_IS_SHELL_WINDOW (shell_window));
+
/* Update the "File -> New" submenu. */
path = "/main-menu/file-menu/new-menu";
menu = e_shell_window_create_new_menu (shell_window);
Modified: branches/kill-bonobo/shell/e-shell-window.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window.c (original)
+++ branches/kill-bonobo/shell/e-shell-window.c Fri Oct 3 04:43:40 2008
@@ -595,15 +595,15 @@
g_return_if_fail (shell_view != NULL);
action = e_shell_view_get_action (shell_view);
- gtk_action_activate (action);
/* XXX Radio actions refuse to activate if they're already active.
* This causes problems during intialization if we're trying to
* switch to the shell view whose corresponding radio action is
- * already active. Fortunately we can detect that and force
- * the switch. */
- if (shell_window->priv->active_view == NULL)
+ * already active. This works around the problem. */
+ if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
e_shell_window_switch_to_view (shell_window, view_name);
+ else
+ gtk_action_activate (action);
}
/**
Modified: branches/kill-bonobo/shell/test/e-test-shell-module.c
==============================================================================
--- branches/kill-bonobo/shell/test/e-test-shell-module.c (original)
+++ branches/kill-bonobo/shell/test/e-test-shell-module.c Fri Oct 3 04:43:40 2008
@@ -30,7 +30,6 @@
#define MODULE_NAME "test"
#define MODULE_ALIASES "monkey"
#define MODULE_SCHEMES ""
-#define MODULE_SEARCHES NULL
#define MODULE_SORT_ORDER 100
/* Module Entry Point */
@@ -133,7 +132,6 @@
MODULE_NAME,
MODULE_ALIASES,
MODULE_SCHEMES,
- MODULE_SEARCHES,
MODULE_SORT_ORDER,
/* Methods */
Modified: branches/kill-bonobo/ui/evolution-tasks.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-tasks.ui (original)
+++ branches/kill-bonobo/ui/evolution-tasks.ui Fri Oct 3 04:43:40 2008
@@ -18,6 +18,7 @@
<menuitem action='task-delete'/>
<separator/>
<menuitem action='task-mark-complete'/>
+ <menuitem action='task-mark-incomplete'/>
</placeholder>
</menu>
<menu action='view-menu'>
@@ -54,6 +55,7 @@
<menuitem action='task-assign'/>
<menuitem action='task-forward'/>
<menuitem action='task-mark-complete'/>
+ <menuitem action='task-mark-incomplete'/>
<separator/>
<menuitem action='task-delete'/>
</popup>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]