[anjal] Fix compilation errors when configured "--without-anerley".



commit c48c40afad0c81cfc4513e585b8fd9717985b3fb
Author: Yan Li <yanli infradead org>
Date:   Tue Aug 11 23:51:36 2009 +0530

    Fix compilation errors when configured "--without-anerley".

 src/mail-shell.c |    4 ++++
 src/mail-view.c  |   14 +++++++++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/mail-shell.c b/src/mail-shell.c
index a93eae9..88cb76f 100644
--- a/src/mail-shell.c
+++ b/src/mail-shell.c
@@ -340,6 +340,7 @@ ms_unlink_people (MailViewChild *mvc, MailShell *shell)
 	shell->priv->people = NULL;
 }
 
+#if HAVE_ANERLEY
 static void
 ms_show_people (GtkButton *button, MailShell *shell)
 {
@@ -350,6 +351,7 @@ ms_show_people (GtkButton *button, MailShell *shell)
 		mail_view_switch_to_people ((MailView *)shell->mail_component->mail_view, shell->priv->people);
 	}
 }
+#endif
 
 static void
 ms_show_post_druid (MailViewChild *mfv, MailShell *shell)
@@ -522,9 +524,11 @@ mail_shell_construct (MailShell *shell)
 	gtk_widget_show (priv->side_pane);
 	gtk_widget_show (tmp);
 
+#if HAVE_ANERLEY
 	img = gtk_button_new_with_label(_("People"));
 	g_signal_connect (img, "clicked", G_CALLBACK(ms_show_people), shell);
 	gtk_widget_show (img);
+#endif
 
 	gtk_box_pack_end ((GtkBox *)tmp, img, FALSE, FALSE, 0);
 	gtk_box_pack_start ((GtkBox *)tmp, shell->mail_component->folder_tree, TRUE, TRUE, 6);
diff --git a/src/mail-view.c b/src/mail-view.c
index 6790d07..581a2eb 100644
--- a/src/mail-view.c
+++ b/src/mail-view.c
@@ -32,7 +32,9 @@
 #include "mail-composer-view.h"
 #include "mail-conv-view.h"
 #include "mail-settings-view.h"
-#include "mail-people-view.h"
+#if HAVE_ANERLEY
+#  include "mail-people-view.h"
+#endif
 #include "mail-account-view.h"
 #include "mail-search.h"
 #include "mail/em-folder-tree.h"
@@ -145,8 +147,10 @@ mv_switch (GtkNotebook     *notebook,GtkNotebookPage *page, guint page_num, gpoi
 			mail_account_view_activate ((MailAccountView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, FALSE);
 		else if (child->type == MAIL_VIEW_SETTINGS)
 			mail_settings_view_activate ((MailSettingsView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, shell->slider, FALSE);
+#if HAVE_ANERLEY
 		else if (child->type == MAIL_VIEW_PEOPLE)
 			mail_people_view_activate ((MailPeopleView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, shell->slider, FALSE);
+#endif
 
 		
 		
@@ -298,8 +302,10 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv)
 		mail_account_view_activate ((MailAccountView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE);
 	else if (child->type == MAIL_VIEW_SETTINGS)
 		mail_settings_view_activate ((MailSettingsView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE);
+#if HAVE_ANERLEY
 	else if (child->type == MAIL_VIEW_PEOPLE)
 		mail_people_view_activate ((MailPeopleView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE);
+#endif
 
 }
 
@@ -439,6 +445,7 @@ mail_view_add_settings (MailView *mv, gpointer data, gboolean block)
 	return (MailViewChild *)msv;
 }
 
+#if HAVE_ANERLEY
 void
 mail_view_switch_to_people (MailView* mv, MailViewChild *mpv)
 {
@@ -449,6 +456,7 @@ mail_view_switch_to_people (MailView* mv, MailViewChild *mpv)
 	gtk_notebook_set_current_page ((GtkNotebook *)mv, position);
 	mail_people_view_activate ((MailPeopleView *)mpv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE);
 }
+#endif
 
 void
 mail_view_switch_to_settings (MailView* mv, MailViewChild *mpv)
@@ -461,6 +469,7 @@ mail_view_switch_to_settings (MailView* mv, MailViewChild *mpv)
 	mail_settings_view_activate ((MailSettingsView *)mpv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE);
 }
  
+#if HAVE_ANERLEY
 static MailViewChild *
 mail_view_add_people (MailView *mv, gpointer data, gboolean block)
 {
@@ -482,6 +491,7 @@ mail_view_add_people (MailView *mv, gpointer data, gboolean block)
 
 	return (MailViewChild *)msv;
 }
+#endif
 
 static MailViewChild *
 mail_view_add_account (MailView *mv, gpointer data, gboolean block)
@@ -530,9 +540,11 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data)
 	case MAIL_VIEW_SETTINGS:
 		 child = mail_view_add_settings (mv, data, block);
 		break;
+#if HAVE_ANERLEY
 	case MAIL_VIEW_PEOPLE:
 		 child = mail_view_add_people (mv, data, block);
 		break;
+#endif
 	case MAIL_VIEW_ACCOUNT:
 		 child = mail_view_add_account (mv, data, block);
 		break;	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]