diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-09-07 07:23:57 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-09-09 02:53:45 +0800 |
commit | fa9051e04051156a9e11e2af72a0d7342f4ea2e4 (patch) | |
tree | 0d064bddb366257c660722359dc33f5ef3c610c7 /calendar/gui | |
parent | c9e7aa7aee6b407659843131cc8becdafa71992a (diff) | |
download | gsoc2013-evolution-fa9051e04051156a9e11e2af72a0d7342f4ea2e4.tar.gz gsoc2013-evolution-fa9051e04051156a9e11e2af72a0d7342f4ea2e4.tar.zst gsoc2013-evolution-fa9051e04051156a9e11e2af72a0d7342f4ea2e4.zip |
Finish killing Bonobo.
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/Makefile.am | 4 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/Makefile.am | 31 | ||||
-rw-r--r-- | calendar/gui/e-cal-component-preview.c | 84 | ||||
-rw-r--r-- | calendar/gui/e-cal-component-preview.h | 7 |
4 files changed, 9 insertions, 117 deletions
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am index ede213e1ff..f05a038624 100644 --- a/calendar/gui/Makefile.am +++ b/calendar/gui/Makefile.am @@ -2,7 +2,9 @@ if OS_WIN32 WIN32_BOOTSTRAP_LIBS = $(top_builddir)/win32/libevolution-mail.la endif -SUBDIRS = alarm-notify dialogs +# KILL-BONOBO: Temporarily disabled alarm-notify +#SUBDIRS = alarm-notify dialogs +SUBDIRS = dialogs privsolib_LTLIBRARIES = libevolution-calendar.la diff --git a/calendar/gui/alarm-notify/Makefile.am b/calendar/gui/alarm-notify/Makefile.am index ea1c36e0d9..d8a68387fe 100644 --- a/calendar/gui/alarm-notify/Makefile.am +++ b/calendar/gui/alarm-notify/Makefile.am @@ -1,19 +1,3 @@ -CORBA_GENERATED_H = \ - evolution-calendar.h -CORBA_GENERATED_C = \ - evolution-calendar-common.c \ - evolution-calendar-skels.c \ - evolution-calendar-stubs.c -CORBA_GENERATED = $(CORBA_GENERATED_C) $(CORBA_GENERATED_H) - -idls = $(top_srcdir)/calendar/idl/evolution-calendar.idl -idl_flags = $(IDL_INCLUDES) - -$(CORBA_GENERATED_H): $(idls) - $(ORBIT_IDL) $(idl_flags) $(top_srcdir)/calendar/idl/evolution-calendar.idl -$(CORBA_GENERATED_C): $(CORBA_GENERATED_H) - - privlibexec_PROGRAMS = evolution-alarm-notify @@ -59,19 +43,6 @@ if OS_WIN32 evolution_alarm_notify_LDFLAGS = -mwindows endif -server_in_files = GNOME_Evolution_Calendar_AlarmNotify.server.in.in -server_DATA = $(server_in_files:.server.in.in=.server) -@EVO_SERVER_RULE@ -@INTLTOOL_SERVER_RULE@ - -EXTRA_DIST = \ - $(server_in_files) \ - $(glade_DATA) - -BUILT_SOURCES = $(CORBA_GENERATED) $(server_DATA) -CLEANFILES = $(BUILT_SOURCES) - -dist-hook: - cd $(distdir); rm -f $(BUILT_SOURCES) +EXTRA_DIST = $(glade_DATA) -include $(top_srcdir)/git.mk diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index 633eb5678e..b0ba329286 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -271,83 +271,10 @@ cal_component_preview_write_html (GtkHTMLStream *stream, } static void -cal_component_preview_url_requested (GtkHTML *html, - const gchar *url, - GtkHTMLStream *html_stream) -{ - GFile *file; - GFileInputStream *input_stream; - gchar buffer[4096]; - gssize bytes_read; - GError *error = NULL; - - file = g_file_new_for_uri (url); - - /* XXX We only handle native files, which I guess minimizes - * the damage from doing blocking reads here. Annoying - * that GtkHTML does not handle this itself. */ - if (!g_file_is_native (file)) - goto exit; - - input_stream = g_file_read (file, NULL, &error); - - if (error != NULL) - goto fail; - - do { - bytes_read = g_input_stream_read ( - G_INPUT_STREAM (input_stream), - buffer, sizeof (buffer), NULL, &error); - - if (bytes_read > 0) - gtk_html_stream_write ( - html_stream, buffer, bytes_read); - - } while (bytes_read > 0); - - if (error != NULL) - goto fail; - - gtk_html_stream_close (html_stream, GTK_HTML_STREAM_OK); - - goto exit; - -fail: - g_warning ("%s", error->message); - g_error_free (error); - - gtk_html_stream_close (html_stream, GTK_HTML_STREAM_ERROR); - -exit: - if (input_stream != NULL) - g_object_unref (input_stream); - - g_object_unref (file); -} - -static void -cal_component_preview_link_clicked (GtkHTML *html, - const gchar *uri) -{ - gpointer parent; - - parent = gtk_widget_get_toplevel (GTK_WIDGET (html)); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; - - e_show_uri (parent, uri); -} - -static void cal_component_preview_class_init (ECalComponentPreviewClass *class) { - GtkHTMLClass *gtkhtml_class; - parent_class = g_type_class_peek_parent (class); g_type_class_add_private (class, sizeof (ECalComponentPreviewPrivate)); - - gtkhtml_class = GTK_HTML_CLASS (class); - gtkhtml_class->url_requested = cal_component_preview_url_requested; - gtkhtml_class->link_clicked = cal_component_preview_link_clicked; } static void @@ -384,7 +311,8 @@ e_cal_component_preview_get_type (void) }; type = g_type_register_static ( - GTK_TYPE_HTML, "ECalComponentPreview", &type_info, 0); + E_TYPE_WEB_VIEW, "ECalComponentPreview", + &type_info, 0); } return type; @@ -429,11 +357,3 @@ e_cal_component_preview_display (ECalComponentPreview *preview, stream, ecal, comp, preview->priv->zone); gtk_html_stream_close (stream, GTK_HTML_STREAM_OK); } - -void -e_cal_component_preview_clear (ECalComponentPreview *preview) -{ - g_return_if_fail (E_IS_CAL_COMPONENT_PREVIEW (preview)); - - gtk_html_load_empty (GTK_HTML (preview)); -} diff --git a/calendar/gui/e-cal-component-preview.h b/calendar/gui/e-cal-component-preview.h index 8b2b0acd18..78567f06ec 100644 --- a/calendar/gui/e-cal-component-preview.h +++ b/calendar/gui/e-cal-component-preview.h @@ -26,7 +26,7 @@ #include <gtk/gtk.h> #include <libecal/e-cal.h> -#include <gtkhtml/gtkhtml.h> +#include <misc/e-web-view.h> /* Standard GObject macros */ #define E_TYPE_CAL_COMPONENT_PREVIEW \ @@ -54,12 +54,12 @@ typedef struct _ECalComponentPreviewClass ECalComponentPreviewClass; typedef struct _ECalComponentPreviewPrivate ECalComponentPreviewPrivate; struct _ECalComponentPreview { - GtkHTML parent; + EWebView parent; ECalComponentPreviewPrivate *priv; }; struct _ECalComponentPreviewClass { - GtkHTMLClass parent_class; + EWebViewClass parent_class; /* Notification signals */ void (* selection_changed) (ECalComponentPreview *preview, gint n_selected); @@ -75,7 +75,6 @@ void e_cal_component_preview_set_default_timezone void e_cal_component_preview_display (ECalComponentPreview *preview, ECal *ecal, ECalComponent *comp); -void e_cal_component_preview_clear (ECalComponentPreview *preview); G_END_DECLS |