aboutsummaryrefslogtreecommitdiffstats
path: root/capplet
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-28 06:22:23 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-03-28 06:38:40 +0800
commita88e617009854ee7be9ac183a649fdd1d2e846f4 (patch)
treed8f59e949ebf75f34b512b4f0ffaf98d07809bee /capplet
parent63c26d5712c807f65db9c1b0c98ca06aad76171a (diff)
downloadgsoc2013-evolution-a88e617009854ee7be9ac183a649fdd1d2e846f4.tar
gsoc2013-evolution-a88e617009854ee7be9ac183a649fdd1d2e846f4.tar.gz
gsoc2013-evolution-a88e617009854ee7be9ac183a649fdd1d2e846f4.tar.bz2
gsoc2013-evolution-a88e617009854ee7be9ac183a649fdd1d2e846f4.tar.lz
gsoc2013-evolution-a88e617009854ee7be9ac183a649fdd1d2e846f4.tar.xz
gsoc2013-evolution-a88e617009854ee7be9ac183a649fdd1d2e846f4.tar.zst
gsoc2013-evolution-a88e617009854ee7be9ac183a649fdd1d2e846f4.zip
Rip out Anjal-specific cruft we don't need.
Need to trim off the fat if we're ever going to merge the souped up mail account wizard. Still a long way to go...
Diffstat (limited to 'capplet')
-rw-r--r--capplet/anjal-settings-main.c56
-rw-r--r--capplet/settings/Makefile.am2
-rw-r--r--capplet/settings/anjal-mail-view.c41
-rw-r--r--capplet/settings/anjal-mail-view.h6
-rw-r--r--capplet/settings/mail-capplet-shell.c16
-rw-r--r--capplet/settings/mail-capplet-shell.h2
-rw-r--r--capplet/settings/mail-decoration.c359
-rw-r--r--capplet/settings/mail-decoration.h68
-rw-r--r--capplet/settings/mail-view.c116
-rw-r--r--capplet/settings/mail-view.h15
10 files changed, 3 insertions, 678 deletions
diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c
index 4a281b6781..07dbda2b20 100644
--- a/capplet/anjal-settings-main.c
+++ b/capplet/anjal-settings-main.c
@@ -56,17 +56,9 @@
#endif
#endif
-gboolean windowed = FALSE;
-gboolean anjal_icon_decoration = FALSE;
-gboolean default_app = FALSE;
guint32 socket_id = 0;
GtkWidget *main_window;
static gchar **remaining_args;
-extern gchar *shell_moduledir;
-
-#define GCONF_KEY_MAILTO_ENABLED "/desktop/gnome/url-handlers/mailto/enabled"
-#define GCONF_KEY_MAILTO_COMMAND "/desktop/gnome/url-handlers/mailto/command"
-#define ANJAL_MAILTO_COMMAND "anjal %s"
static void
categories_icon_theme_hack (void)
@@ -99,48 +91,17 @@ categories_icon_theme_hack (void)
}
static void
-check_and_set_default_mail (void)
-{
- GConfClient *client = gconf_client_get_default ();
- gchar *mailer;
-
- mailer = gconf_client_get_string (client, GCONF_KEY_MAILTO_COMMAND, NULL);
- if (mailer && *mailer && (strcmp (mailer, ANJAL_MAILTO_COMMAND) == 0)) {
- g_object_unref (client);
- return; /* Anjal is the default mailer */
- }
-
- gconf_client_set_bool (client, GCONF_KEY_MAILTO_ENABLED, TRUE, NULL);
- gconf_client_set_string (client, GCONF_KEY_MAILTO_COMMAND, ANJAL_MAILTO_COMMAND, NULL);
- g_object_unref (client);
-}
-
-static gboolean
-idle_cb (MailCappletShell *mshell G_GNUC_UNUSED)
-{
-
- if (default_app) {
- check_and_set_default_mail ();
- }
-
- return FALSE;
-}
-
-static void
create_default_shell (void)
{
main_window = mail_capplet_shell_new (socket_id, FALSE, TRUE);
if (!socket_id)
gtk_widget_show (main_window);
- g_idle_add ((GSourceFunc) idle_cb, remaining_args);
}
gint
main (gint argc, gchar *argv[])
{
GError *error = NULL;
- GConfClient *client;
-
#ifdef G_OS_WIN32
/* Reduce risks */
@@ -181,8 +142,6 @@ main (gint argc, gchar *argv[])
#endif
static GOptionEntry entries[] = {
- { "windowed", 'w', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_NONE, &windowed,N_("Run Anjal in a window"), NULL },
- { "default-mailer", 'd', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_NONE, &default_app,N_("Make Anjal the default email client"), NULL },
{ "socket",
's',
G_OPTION_FLAG_IN_MAIN,
@@ -203,28 +162,17 @@ main (gint argc, gchar *argv[])
setlocale (LC_ALL, NULL);
- if (!gtk_init_with_args (&argc, &argv, _("Anjal email client"), entries, NULL, &error)) {
- g_error ("Unable to start Anjal: %s\n", error->message);
- g_error_free (error);
- }
+ if (!gtk_init_with_args (&argc, &argv, NULL, entries, NULL, &error))
+ g_error ("%s", error->message);
if (!g_thread_get_initialized ())
g_thread_init (NULL);
- client = gconf_client_get_default ();
-
e_passwords_init ();
- gtk_icon_theme_append_search_path (gtk_icon_theme_get_default(), PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "anjal" G_DIR_SEPARATOR_S "icons");
categories_icon_theme_hack ();
- gconf_client_set_bool (client, "/apps/evolution/mail/display/enable_vfolders", FALSE, NULL);
- g_object_unref (client);
-
create_default_shell ();
- if (windowed)
- anjal_icon_decoration = TRUE;
-
gtk_main ();
return 0;
diff --git a/capplet/settings/Makefile.am b/capplet/settings/Makefile.am
index 61b74c888b..e6ea573c11 100644
--- a/capplet/settings/Makefile.am
+++ b/capplet/settings/Makefile.am
@@ -45,8 +45,6 @@ libevolution_mail_settings_la_SOURCES = \
mail-view.h \
mail-capplet-shell.c \
mail-capplet-shell.h \
- mail-decoration.c \
- mail-decoration.h \
anjal-mail-view.h \
anjal-mail-view.c \
mail-guess-servers.c \
diff --git a/capplet/settings/anjal-mail-view.c b/capplet/settings/anjal-mail-view.c
index 92c811b69a..6779e2e444 100644
--- a/capplet/settings/anjal-mail-view.c
+++ b/capplet/settings/anjal-mail-view.c
@@ -93,44 +93,3 @@ anjal_mail_view_class_init (AnjalMailViewClass *klass)
klass->init_search = view_init_search;
};
-AnjalMailView *
-anjal_mail_view_new ()
-{
- AnjalMailView *shell = g_object_new (ANJAL_MAIL_VIEW_TYPE, NULL);
-
- return shell;
-}
-
-void
-anjal_mail_view_set_folder_uri (AnjalMailView *mv, const gchar *uri)
-{
- if (!mv || !uri)
- return;
-
- ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_uri (mv, uri);
-}
-
-void
-anjal_mail_view_set_folder_tree_widget (AnjalMailView *mv, GtkWidget *tree)
-{
- ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_tree_widget (mv, tree);
-}
-
-void
-anjal_mail_view_set_folder_tree (AnjalMailView *mv, GtkWidget *tree)
-{
- ANJAL_MAIL_VIEW_GET_CLASS (mv)->set_folder_tree (mv, (EMFolderTree *)tree);
-}
-
-void
-anjal_mail_view_set_search (AnjalMailView *view, const gchar *search)
-{
- ANJAL_MAIL_VIEW_GET_CLASS (view)->set_search (view, search);
-}
-
-void
-anjal_mail_view_init_search (AnjalMailView *mv, GtkWidget *search)
-{
- ANJAL_MAIL_VIEW_GET_CLASS (mv)->init_search (mv, search);
-}
-
diff --git a/capplet/settings/anjal-mail-view.h b/capplet/settings/anjal-mail-view.h
index 953aa4b935..115a877d9f 100644
--- a/capplet/settings/anjal-mail-view.h
+++ b/capplet/settings/anjal-mail-view.h
@@ -55,10 +55,4 @@ typedef struct _AnjalMailViewClass {
} AnjalMailViewClass;
GType anjal_mail_view_get_type (void);
-AnjalMailView * anjal_mail_view_new (void);
-void anjal_mail_view_set_folder_uri (AnjalMailView *mv, const gchar *uri);
-void anjal_mail_view_set_folder_tree_widget (AnjalMailView *mv, GtkWidget *tree);
-void anjal_mail_view_set_folder_tree (AnjalMailView *mv, GtkWidget *tree);
-void anjal_mail_view_set_search (AnjalMailView *view, const gchar *search);
-void anjal_mail_view_init_search (AnjalMailView *mv, GtkWidget *search);
#endif
diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c
index 030de15a94..cb5c7ec0e4 100644
--- a/capplet/settings/mail-capplet-shell.c
+++ b/capplet/settings/mail-capplet-shell.c
@@ -37,7 +37,6 @@
#include <e-util/e-util.h>
-#include "mail-decoration.h"
#include <mail/em-utils.h>
#include <mail/em-composer-utils.h>
#include <mail/mail-config.h>
@@ -254,31 +253,16 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean
if (just_druid) {
MailViewChild *mc;
- gchar *pdir = g_build_filename (g_get_home_dir(), ".gnome2_private", NULL);
gtk_notebook_set_show_tabs ((GtkNotebook *)shell->view, FALSE);
mc = mail_view_add_page ((MailView *)shell->view, MAIL_VIEW_ACCOUNT, NULL);
g_signal_connect (mc, "view-close", G_CALLBACK(ms_show_post_druid), shell);
setup_abooks ();
- if (!g_file_test (pdir, G_FILE_TEST_EXISTS)) {
- g_mkdir (pdir, 0700);
- }
- g_free (pdir);
} else
shell->priv->settings_view = mail_view_add_page ((MailView *)shell->view, MAIL_VIEW_SETTINGS, NULL);
}
-gint
-mail_capplet_shell_toolbar_height (MailCappletShell *shell)
-{
- GtkAllocation allocation;
-
- gtk_widget_get_allocation (shell->priv->top_bar, &allocation);
-
- return allocation.height;
-}
-
GtkWidget *
mail_capplet_shell_new (gint socket_id, gboolean just_druid, gboolean main_loop)
{
diff --git a/capplet/settings/mail-capplet-shell.h b/capplet/settings/mail-capplet-shell.h
index 05159a5595..5ddbe4cba8 100644
--- a/capplet/settings/mail-capplet-shell.h
+++ b/capplet/settings/mail-capplet-shell.h
@@ -54,8 +54,6 @@ GType mail_capplet_shell_get_type (void);
GtkWidget * mail_capplet_shell_new (gint socket_id,
gboolean just_druid,
gboolean main_loop);
-gint mail_capplet_shell_toolbar_height
- (MailCappletShell *shell);
#endif
diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c
deleted file mode 100644
index f8e56f316a..0000000000
--- a/capplet/settings/mail-decoration.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * 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
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Srinivasa Ragavan <sragavan@novell.com>
- *
- * Copyright (C) 2009 Novell, Inc. (www.novell.com)
- *
- */
-
-/* Many thanks to Aaron Bockover & Cubano. This is just a C version Cubano's self decoration */
-
-#include "mail-decoration.h"
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include <gdk/gdkkeysyms.h>
-#include <gconf/gconf-client.h>
-
-struct _MailDecorationPrivate
-{
- GdkCursor *cursors[8];
- gboolean default_cursor;
- gboolean resizing;
- GdkWindowEdge last_edge;
- gint resize_width;
- gint top_height;
- gboolean check_window;
- gboolean can_resize;
- gboolean full_screen;
-
- gint window_width;
- gint window_height;
-};
-
-static GObjectClass *parent_class = NULL;
-
-static void mail_decoration_class_init (MailDecorationClass *klass);
-static void mail_decoration_init (MailDecoration *facet);
-
-GType
-mail_decoration_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- static const GTypeInfo mail_decoration_info =
- {
- sizeof (MailDecorationClass),
- NULL,
- NULL,
- (GClassInitFunc) mail_decoration_class_init,
- NULL,
- NULL,
- sizeof (MailDecoration),
- 0,
- (GInstanceInitFunc) mail_decoration_init
- };
-
- type = g_type_register_static (G_TYPE_OBJECT,
- "MailDecoration",
- &mail_decoration_info, 0);
- }
-
- return type;
-}
-
-static void
-md_translate_position (GdkWindow *w, double ex, double ey, gint *x, gint *y, GtkWidget *window)
-{
- *x = (gint)ex;
- *y = (gint)ey;
-
- while (w && w != gtk_widget_get_window (window)) {
- gint cx, cy, cw, ch;
- gdk_window_get_geometry (w, &cx, &cy, &cw, &ch);
- *x += cx;
- *y += cy;
- w = gdk_window_get_parent (w);
- }
-}
-
-static gboolean
-in_top (MailDecoration *md, double y)
-{
- return y <= md->priv->resize_width;
-}
-
-static gboolean
-in_left (MailDecoration *md, double x)
-{
- return x <= md->priv->resize_width;
-}
-
-static gboolean
-in_bottom (MailDecoration *md, double y)
-{
- GtkAllocation allocation;
-
- gtk_widget_get_allocation (GTK_WIDGET (md->window), &allocation);
-
- return y >= allocation.height - md->priv->resize_width;
-}
-
-static gboolean
-in_right (MailDecoration *md, double x)
-{
- GtkAllocation allocation;
-
- gtk_widget_get_allocation (GTK_WIDGET (md->window), &allocation);
-
- return x >= allocation.width - md->priv->resize_width;
-}
-
-static void
-set_cursor (MailDecoration *md, GdkWindowEdge edge)
-{
- gdk_window_set_cursor (
- gtk_widget_get_window (GTK_WIDGET (md->window)),
- md->priv->cursors[edge]);
- md->priv->default_cursor = FALSE;
-}
-
-static void
-reset_cursor (MailDecoration *md)
-{
- if (!md->priv->default_cursor) {
- md->priv->default_cursor = TRUE;
- gdk_window_set_cursor (
- gtk_widget_get_window (GTK_WIDGET (md->window)),
- NULL);
- }
-
-}
-
-static void
-update_cursor (MailDecoration *md, double x, double y, gboolean update)
-{
- if (update)
- md->priv->resizing = TRUE;
-
- if (in_top (md, y) && in_left (md, x)) {
- md->priv->last_edge = GDK_WINDOW_EDGE_NORTH_WEST;
- set_cursor (md, GDK_WINDOW_EDGE_NORTH_WEST);
- } else if (in_top (md, y) && in_right (md, x)) {
- md->priv->last_edge = GDK_WINDOW_EDGE_NORTH_EAST;
- set_cursor (md, GDK_WINDOW_EDGE_NORTH_EAST);
- } else if (in_bottom (md, y) && in_left (md, x)) {
- md->priv->last_edge = GDK_WINDOW_EDGE_SOUTH_WEST;
- set_cursor (md, GDK_WINDOW_EDGE_SOUTH_WEST);
- } else if (in_bottom (md, y) && in_right (md, x)) {
- md->priv->last_edge = GDK_WINDOW_EDGE_SOUTH_EAST;
- set_cursor (md, GDK_WINDOW_EDGE_SOUTH_EAST);
- } else if (in_top (md, y)) {
- md->priv->last_edge = GDK_WINDOW_EDGE_NORTH;
- set_cursor (md, GDK_WINDOW_EDGE_NORTH);
- } else if (in_bottom (md, y)) {
- md->priv->last_edge = GDK_WINDOW_EDGE_SOUTH;
- set_cursor (md, GDK_WINDOW_EDGE_SOUTH);
- } else if (in_left (md, x)) {
- md->priv->last_edge = GDK_WINDOW_EDGE_WEST;
- set_cursor (md, GDK_WINDOW_EDGE_WEST);
- } else if (in_right (md, x)) {
- md->priv->last_edge = GDK_WINDOW_EDGE_EAST;
- set_cursor (md, GDK_WINDOW_EDGE_EAST);
- } else {
- if (update)
- md->priv->resizing = FALSE;
- reset_cursor (md);
- }
-}
-
-static gboolean
-md_motion_event (GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
-{
- gint x, y;
- MailDecoration *md = (MailDecoration *)user_data;
-
- md_translate_position (event->window, event->x, event->y, &x, &y, (GtkWidget *)md->window);
-
- if (md->priv->can_resize) {
- update_cursor (md, x, y, FALSE);
- }
-
- return FALSE;
-}
-
-static gboolean
-md_enter_event (GtkWidget *widget , GdkEventCrossing *event, gpointer user_data)
-{
- MailDecoration *md = (MailDecoration *)user_data;
- gint x, y;
-
- md_translate_position (event->window, event->x, event->y, &x, &y, (GtkWidget *)md->window);
-
- if (md->priv->can_resize) {
- update_cursor (md, x, y, FALSE);
- }
-
- return FALSE;
-}
-
-static gboolean
-md_leave_event (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
-{
- MailDecoration *md = (MailDecoration *)user_data;
-
- if (md->priv->can_resize)
- reset_cursor (md);
-
- return FALSE;
-}
-
-static void
-md_size_allocate_event (GtkWidget *widget, GtkAllocation *allocation, gpointer user_data)
-{
- gint width=1024, height=500;
- MailDecoration *md = (MailDecoration *)user_data;
-
- gtk_widget_queue_draw (widget);
- gtk_window_get_size ((GtkWindow *)widget, &width, &height);
- if (width != md->priv->window_width || height != md->priv->window_height) {
- GConfClient *client = gconf_client_get_default ();
-
- md->priv->window_height = height;
- md->priv->window_width = width;
- gconf_client_set_int (client, "/apps/anjal/window_width", width, NULL);
- gconf_client_set_int (client, "/apps/anjal/window_height", height, NULL);
- g_object_unref (client);
- }
-
-}
-
-static gboolean
-md_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
-{
- MailDecoration *md = (MailDecoration *)user_data;
- gint x_root = (gint) event->x_root;
- gint y_root = (gint) event->y_root;
- gint x, y;
-
- if (!md->priv->can_resize) {
- return FALSE;
- }
-
- md_translate_position (event->window, event->x, event->y, &x, &y, (GtkWidget *)md->window);
- update_cursor (md, x, y, TRUE);
- if (md->priv->resizing && event->button == 1 && event->type != GDK_2BUTTON_PRESS) {
- gtk_window_begin_resize_drag ((GtkWindow *)widget, md->priv->last_edge, 1, x_root, y_root, event->time);
-
- } else if ((md->priv->resizing && event->button == 2 && event->type != GDK_2BUTTON_PRESS) ||
- (event->button == 1 && y <= md->priv->top_height && event->type != GDK_2BUTTON_PRESS)) {
- gtk_window_begin_move_drag ((GtkWindow *)widget, event->button, x_root, y_root, event->time);
- } else if (y <= md->priv->top_height && event->type == GDK_2BUTTON_PRESS) {
- if (md->priv->full_screen)
- gtk_window_unfullscreen (md->window);
- else
- gtk_window_fullscreen (md->window);
-
- md->priv->full_screen = md->priv->full_screen != TRUE;
- } else
- return FALSE;
-
- return TRUE;
-}
-
-static gboolean
-md_button_release_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
-{
- gint x, y;
- MailDecoration *md = (MailDecoration *)user_data;
-
- md_translate_position (event->window, event->x, event->y, &x, &y, (GtkWidget *)md->window);
- if (md->priv->resizing) {
- update_cursor (md, x, y, TRUE);
- }
-
- return FALSE;
-}
-
-MailDecoration* mail_decoration_new (GtkWindow *window)
-{
- MailDecoration *md = g_object_new (mail_decoration_get_type (), NULL);
- GConfClient *client = gconf_client_get_default ();
- gint width, height;
-
- md->priv->window_width = width = gconf_client_get_int (client, "/apps/anjal/window_width", NULL);
- if (!width)
- md->priv->window_width = width = 1024;
- md->priv->window_height = height = gconf_client_get_int (client, "/apps/anjal/window_height", NULL);
- if (!height)
- md->priv->window_height = height = 500;
- g_object_unref (client);
-
- md->window = window;
- gtk_window_set_decorated (window, FALSE);
- gtk_widget_add_events ((GtkWidget *)window, GDK_BUTTON_PRESS_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_BUTTON_RELEASE_MASK);
-
- g_signal_connect (window, "motion-notify-event", G_CALLBACK(md_motion_event), md);
- g_signal_connect (window, "enter-notify-event", G_CALLBACK(md_enter_event), md);
- g_signal_connect (window, "leave-notify-event", G_CALLBACK(md_leave_event), md);
- g_signal_connect (window, "button-press-event", G_CALLBACK(md_button_press_event), md);
- g_signal_connect (window, "button-release-event", G_CALLBACK(md_button_release_event), md);
- g_signal_connect (window, "size-allocate", G_CALLBACK(md_size_allocate_event), md);
- gtk_window_set_default_size ((GtkWindow *)window , width, height);/* We officiall should support 800x600 */
-
- return md;
-}
-
-static void
-mail_decoration_class_init (MailDecorationClass *klass)
-{
-
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
- g_type_class_add_private (object_class, sizeof (MailDecorationPrivate));
-}
-
-static void
-mail_decoration_init (MailDecoration *md)
-{
- md->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- md, MAIL_DECORATION_TYPE, MailDecorationPrivate);
-
- md->priv->cursors[0]= gdk_cursor_new (GDK_TOP_LEFT_CORNER);
- md->priv->cursors[1]= gdk_cursor_new (GDK_TOP_SIDE);
- md->priv->cursors[2]= gdk_cursor_new (GDK_TOP_RIGHT_CORNER);
- md->priv->cursors[3]= gdk_cursor_new (GDK_LEFT_SIDE);
- md->priv->cursors[4]= gdk_cursor_new (GDK_RIGHT_SIDE);
- md->priv->cursors[5]= gdk_cursor_new (GDK_BOTTOM_LEFT_CORNER);
- md->priv->cursors[6]= gdk_cursor_new (GDK_BOTTOM_SIDE);
- md->priv->cursors[7]= gdk_cursor_new (GDK_BOTTOM_RIGHT_CORNER);
-
- md->priv->default_cursor = TRUE;
- md->priv->resizing = FALSE;
- md->priv->resize_width = 4;
- md->priv->top_height = 54;
- md->priv->check_window = TRUE;
- md->priv->can_resize = TRUE;
- md->priv->full_screen = TRUE;
-}
diff --git a/capplet/settings/mail-decoration.h b/capplet/settings/mail-decoration.h
deleted file mode 100644
index 1339cae305..0000000000
--- a/capplet/settings/mail-decoration.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Srinivasa Ragavan <sragavan@novell.com>
- *
- * Copyright (C) 2009 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef _MAIL_DECORATION_
-#define _MAIL_DECORATION_
-
-#include <gtk/gtk.h>
-
-#define MAIL_DECORATION_TYPE \
- (mail_decoration_get_type ())
-#define MAIL_DECORATION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), MAIL_DECORATION_TYPE, MailDecoration))
-#define MAIL_DECORATION_CLASS(cls) \
- (G_TYPE_CHECK_CLASS_CAST \
- ((cls), MAIL_DECORATION_TYPE, MailDecorationClass))
-#define IS_MAIL_DECORATION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), MAIL_DECORATION_TYPE))
-#define IS_MAIL_DECORATION_CLASS(cls) \
- (G_TYPE_CHECK_CLASS_TYPE \
- ((obj), MAIL_DECORATION_TYPE))
-#define MAIL_DECORATION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), MAIL_DECORATION_TYPE, MailDecorationClass))
-
-typedef struct _MailDecoration MailDecoration;
-typedef struct _MailDecorationClass MailDecorationClass;
-typedef struct _MailDecorationPrivate MailDecorationPrivate;
-
-struct _MailDecoration {
- GObject parent;
-
- GtkWindow *window;
- MailDecorationPrivate *priv;
-};
-
-struct _MailDecorationClass {
- GObjectClass parent_class;
-};
-
-GType mail_decoration_get_type (void);
-MailDecoration *mail_decoration_new (GtkWindow *);
-
-#endif
diff --git a/capplet/settings/mail-view.c b/capplet/settings/mail-view.c
index 356916d9e9..4c7c9ddd05 100644
--- a/capplet/settings/mail-view.c
+++ b/capplet/settings/mail-view.c
@@ -425,17 +425,6 @@ mail_view_add_settings (MailView *mv, gpointer data, gboolean block)
return (MailViewChild *)msv;
}
-void
-mail_view_switch_to_settings (MailView* mv, MailViewChild *mpv)
-{
- gint position = 0;
-
- position = mv_get_page_number ((GtkNotebook *)mv, (GtkWidget *)mpv);
- REALIGN_NODES (mv->priv->children,mpv);
- gtk_notebook_set_current_page ((GtkNotebook *)mv, position);
- mail_settings_view_activate ((MailSettingsView *)mpv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE);
-}
-
static MailViewChild *
mail_view_add_account (MailView *mv,
gpointer data,
@@ -551,23 +540,6 @@ mail_view_set_folder_uri (MailView *mv, const gchar *uri)
mv_switch_folder_view (mv, uri);
}
-void
-mail_view_show_sort_popup (MailView *mv, GtkWidget *button)
-{
- mail_folder_view_show_sort_popup ((MailFolderView *)mv->priv->current_view, button);
-}
-
-void
-mail_view_show_list (MailView *mv)
-{
- MailViewChild *child = (MailViewChild *)mv->priv->current_view;
-
- if (child->type == MAIL_VIEW_MESSAGE)
- mv_close_mcv (child, mv);
- else if (child->type == MAIL_VIEW_FOLDER)
- mail_folder_view_show_list ((MailFolderView *)mv->priv->current_view);
-
-}
#endif
void
mail_view_close_view (MailView *mv)
@@ -577,52 +549,12 @@ mail_view_close_view (MailView *mv)
mv_close_mcv (child, mv);
}
-#ifndef ANJAL_SETTINGS
-static void
-mv_slider_clicked (GtkButton *slider, MailView *mv)
-{
- gtk_widget_hide (mv->slider);
- gtk_widget_show (mv->folder_tree);
- if (mv->priv->current_view->type == MAIL_VIEW_FOLDER)
- mail_folder_view_show_list ((MailFolderView *)mv->priv->current_view);
- else {
- gtk_widget_show (mv->folder_tree);
- gtk_widget_hide ((GtkWidget *)slider);
- }
-}
-
-void
-mail_view_set_slider (MailView *mv, GtkWidget *slider)
-{
- mv->slider = slider;
- g_signal_connect (slider, "clicked", G_CALLBACK(mv_slider_clicked), mv);
-}
-#endif
-
-void
-mail_view_set_folder_tree_widget (MailView *mv, GtkWidget *tree)
-{
- mv->folder_tree = tree;
-}
-
void
mail_view_set_folder_tree (MailView *mv, GtkWidget *tree)
{
mv->tree = tree;
}
-void
-mail_view_set_check_email (MailView *mv, GtkWidget *button)
-{
- mv->check_mail = button;;
-}
-
-void
-mail_view_set_sort_by (MailView *mv, GtkWidget *button)
-{
- mv->sort_by = button;;
-}
-
#ifndef ANJAL_SETTINGS
static void
mv_spinner_done (CamelFolder *f, gpointer data)
@@ -632,42 +564,6 @@ mv_spinner_done (CamelFolder *f, gpointer data)
}
void
-mail_view_check_mail (MailView *mv, gboolean deep)
-{
- MailViewChild *child = (MailViewChild *)mv->priv->current_view;
-
- if (child && child->type == MAIL_VIEW_FOLDER) {
- mail_folder_view_check_mail ((MailFolderView *)child);
- CamelFolder *folder;
-
- if ((folder = em_folder_tree_get_selected_folder ((EMFolderTree *)mv->tree)) != NULL) {
- mv_spinner_show (mv, TRUE);
- mail_refresh_folder (folder, mv_spinner_done, mv);
- }
- }
-
- if (deep) {
- em_utils_clear_get_password_canceled_accounts_flag ();
- mail_send_receive (NULL);
- }
-}
-
-void
-mail_view_save (MailView *mv)
-{
- GList *child = mv->priv->children;
- MailViewChild *cview;
-
- while (child) {
- cview = (MailViewChild *)child->data;
- if (cview->type == MAIL_VIEW_FOLDER) {
- mail_folder_view_save ((MailFolderView *)cview);
- }
- child = child->next;
- }
-}
-
-void
mail_view_set_search (MailView *mv, const gchar *search)
{
MailViewChild *child = (MailViewChild *)mv->priv->current_view;
@@ -681,18 +577,6 @@ mail_view_set_search (MailView *mv, const gchar *search)
#endif
void
-mail_view_set_search_entry (MailView *mv, GtkWidget *entry)
-{
- mv->priv->search_entry = entry;
-}
-
-void
-mail_view_init_search (MailView *mv, GtkWidget *search)
-{
- mv->priv->search = search;
-}
-
-void
mail_view_set_shell_view (MailView *mv, EShellView *shell)
{
mv->shell_view = shell;
diff --git a/capplet/settings/mail-view.h b/capplet/settings/mail-view.h
index 904338e87d..558bb945a7 100644
--- a/capplet/settings/mail-view.h
+++ b/capplet/settings/mail-view.h
@@ -40,8 +40,7 @@ enum {
MAIL_VIEW_COMPOSER,
MAIL_VIEW_MESSAGE,
MAIL_VIEW_ACCOUNT,
- MAIL_VIEW_SETTINGS,
- MAIL_VIEW_PEOPLE
+ MAIL_VIEW_SETTINGS
};
typedef struct _MailViewPrivate MailViewPrivate;
@@ -79,22 +78,10 @@ typedef struct _MailViewChild {
GType mail_view_get_type (void);
MailView * mail_view_new (void);
void mail_view_set_folder_uri (MailView *mv, const gchar *uri);
-void mail_view_show_sort_popup (MailView *mv, GtkWidget *);
-void mail_view_show_list (MailView *mv);
void mail_view_close_view (MailView *mv);
-void mail_view_set_check_email (MailView *mv, GtkWidget *button);
-void mail_view_set_sort_by (MailView *mv, GtkWidget *button);
-void mail_view_check_mail (MailView *mv, gboolean deep);
-void mail_view_set_folder_tree_widget (MailView *mv, GtkWidget *tree);
void mail_view_set_folder_tree (MailView *mv, GtkWidget *tree);
-void mail_view_save (MailView *mv);
MailViewChild * mail_view_add_page (MailView *mv, guint16 type, gpointer data);
void mail_view_set_search (MailView *view, const gchar *search);
-void mail_view_set_slider (MailView *mv, GtkWidget *slider);
-void mail_view_init_search (MailView *mv, GtkWidget *search);
-void mail_view_switch_to_people (MailView* mv, MailViewChild *mpv);
-void mail_view_switch_to_settings (MailView* mv, MailViewChild *mpv);
-void mail_view_set_search_entry (MailView *mv, GtkWidget *entry);
void mail_view_set_shell_view (MailView *mv, EShellView *shell);
#endif