[evolution-patches] Patch for Proxy Assignement/ Editing and deleting



Hey, 

I am attaching a patch which adds a new tab to the Account Editor Tab
called "Proxy" for Groupwise Accounts. This tab allows users to add/
edit and delete users who can act as proxies. The tab uses groupwise
server API's which have been sent by Sankar before hand. I am attaching
the libedataserver/e-proxy.h for convenience.

Cheers,
Shreyas 
--- /dev/null	2005-03-20 01:06:14.000000000 +0530
+++ plugins/proxy/Makefile.am	2005-06-28 15:18:23.000000000 +0530
@@ -0,0 +1,30 @@
+INCLUDES =						\
+	-I$(top_srcdir)					\
+	-I$(top_srcdir)/camel                           \
+	$(EVOLUTION_MAIL_CFLAGS)			\
+	$(EVOLUTION_CALENDAR_CFLAGS)			\
+	$(CAMEL_GROUPWISE_CFLAGS)			\
+	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
+	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"		
+
+ EVO_PLUGIN_RULE@
+
+plugin_DATA = org-gnome-proxy.eplug
+plugin_LTLIBRARIES = liborg-gnome-proxy.la
+
+liborg_gnome_proxy_la_SOURCES = proxy.c
+liborg_gnome_proxy_la_LDFLAGS = -module -avoid-version
+liborg_gnome_proxy_la_LIBADD =				\
+	$(EVOLUTION_MAIL_LIBS)				\
+	$(CAMEL_GROUPWISE_LIBS)
+
+glade_DATA =
+	proxy-add-dialog.glade	\
+	proxy-listing.glade
+
+error_DATA = org-gnome-proxy-errors.xml
+errordir = $(privdatadir)/errors
+
+BUILT_SOURCES = $(error_i18n)
+
+EXTRA_DIST = org-gnome-proxy.eplug.xml
--- /dev/null	2005-03-20 01:06:14.000000000 +0530
+++ plugins/proxy/org-gnome-proxy.eplug.xml	2005-06-29 09:12:58.000000000 +0530
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<e-plugin-list>
+	<e-plugin id="org.gnome.evolution.proxy" type="shlib" name="proxy" description="proxy acl"
+		location="@PLUGINDIR@/liborg-gnome-proxy.so">
+	    <_description>Allows disabling of accounts.</_description>
+	    <author name="Sankar P" email="psankar novell com"/>
+			<hook class="org.gnome.evolution.mail.config:1.0">
+				<group id="org.gnome.evolution.mail.config.accountEditor" 
+				target="account" commit = "proxy_commit" abort="proxy_abort">
+					<item type="page" path="60.proxy" factory="org_gnome_proxy"/>
+				</group>
+			</hook>
+	</e-plugin>
+</e-plugin-list>
--- /dev/null	2005-03-20 01:06:14.000000000 +0530
+++ plugins/proxy/org-gnome-proxy-errors.xml	2005-06-29 10:04:03.000000000 +0530
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<error-list domain="org.gnome.evolution.proxy">
+<error id="invalid-user" type="error">
+<primary>Invalid user</primary>
+<secondary>
+Proxy access cannot be given to user &quot;{0}&quot; 
+</secondary>
+</error>
+
+<error id="no-user" type="error">
+<primary>Specify User</primary>
+<secondary>
+You have to specify a valid user name to give proxy rights.
+</secondary>
+</error>
+
+<error id="user-is-proxy" type="error">
+<primary>Specify User</primary>
+<secondary>
+	You have already given proxy permissions to this user. 
+</secondary>
+</error>
+
+
+</error-list>
+
--- /dev/null	2005-03-20 01:06:14.000000000 +0530
+++ plugins/proxy/proxy-listing.glade	2005-06-27 14:18:30.000000000 +0530
@@ -0,0 +1,202 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkDialog" id="tab_proxy">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">dialog1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="proxy_vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkNotebook" id="notebook1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">True</property>
+	  <property name="enable_popup">False</property>
+
+	  <child>
+	    <widget class="GtkVBox" id="proxy_vbox">
+	      <property name="border_width">12</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox2">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkTreeView" id="proxy_access_list">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="headers_visible">False</property>
+			  <property name="rules_hint">False</property>
+			  <property name="reorderable">False</property>
+			  <property name="enable_search">True</property>
+			  <property name="fixed_height_mode">False</property>
+			  <property name="hover_selection">False</property>
+			  <property name="hover_expand">False</property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">5</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox5">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">6</property>
+
+		      <child>
+			<widget class="GtkButton" id="add_proxy">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-add</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">6</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="edit_proxy">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-edit</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="remove_proxy">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-remove</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">4</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">5</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Proxy</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
--- /dev/null	2005-03-20 01:06:14.000000000 +0530
+++ plugins/proxy/proxy-add-dialog.glade	2005-06-28 13:57:59.000000000 +0530
@@ -0,0 +1,779 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
+
+<glade-interface>
+
+<widget class="GtkDialog" id="ProxyAccessRights">
+  <property name="border_width">8</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Add/Edit</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">True</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="proxy_help">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="proxy_cancel">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="proxy_button_ok">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox5">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox6">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkFrame" id="frame3">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment2">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkTable" id="table4">
+			  <property name="border_width">1</property>
+			  <property name="visible">True</property>
+			  <property name="n_rows">1</property>
+			  <property name="n_columns">1</property>
+			  <property name="homogeneous">False</property>
+			  <property name="row_spacing">0</property>
+			  <property name="column_spacing">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox1">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">27</property>
+
+			      <child>
+				<widget class="GtkEntry" id="proxy_account_name">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="visibility">True</property>
+				  <property name="max_length">0</property>
+				  <property name="text" translatable="yes"></property>
+				  <property name="has_frame">True</property>
+				  <property name="invisible_char">*</property>
+				  <property name="activates_default">False</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkHBox" id="proxy_name_box">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <placeholder/>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="contacts">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <accelerator key="t" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+				  <accelerator key="T" modifiers="GDK_MOD1_MASK" signal="clicked"/>
+
+				  <child>
+				    <widget class="GtkAlignment" id="alignment4">
+				      <property name="visible">True</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xscale">0</property>
+				      <property name="yscale">0</property>
+				      <property name="top_padding">0</property>
+				      <property name="bottom_padding">0</property>
+				      <property name="left_padding">0</property>
+				      <property name="right_padding">0</property>
+
+				      <child>
+					<widget class="GtkHBox" id="hbox1">
+					  <property name="visible">True</property>
+					  <property name="homogeneous">False</property>
+					  <property name="spacing">2</property>
+
+					  <child>
+					    <widget class="GtkImage" id="image1">
+					      <property name="visible">True</property>
+					      <property name="stock">gtk-jump-to</property>
+					      <property name="icon_size">4</property>
+					      <property name="xalign">0.5</property>
+					      <property name="yalign">0.5</property>
+					      <property name="xpad">0</property>
+					      <property name="ypad">0</property>
+					    </widget>
+					    <packing>
+					      <property name="padding">0</property>
+					      <property name="expand">False</property>
+					      <property name="fill">False</property>
+					    </packing>
+					  </child>
+
+					  <child>
+					    <widget class="GtkLabel" id="label19">
+					      <property name="visible">True</property>
+					      <property name="label" translatable="yes">Con_tacts</property>
+					      <property name="use_underline">True</property>
+					      <property name="use_markup">False</property>
+					      <property name="justify">GTK_JUSTIFY_LEFT</property>
+					      <property name="wrap">False</property>
+					      <property name="selectable">False</property>
+					      <property name="xalign">0.5</property>
+					      <property name="yalign">0.5</property>
+					      <property name="xpad">0</property>
+					      <property name="ypad">0</property>
+					      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+					      <property name="width_chars">-1</property>
+					      <property name="single_line_mode">False</property>
+					      <property name="angle">0</property>
+					    </widget>
+					    <packing>
+					      <property name="padding">0</property>
+					      <property name="expand">False</property>
+					      <property name="fill">False</property>
+					    </packing>
+					  </child>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">1</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label13">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;Name&lt;/b&gt;</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="frame4">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_OUT</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment3">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">2</property>
+		      <property name="bottom_padding">7</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox7">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">5</property>
+
+			  <child>
+			    <widget class="GtkTable" id="table5">
+			      <property name="visible">True</property>
+			      <property name="n_rows">4</property>
+			      <property name="n_columns">3</property>
+			      <property name="homogeneous">False</property>
+			      <property name="row_spacing">8</property>
+			      <property name="column_spacing">43</property>
+
+			      <child>
+				<widget class="GtkLabel" id="label15">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Mail</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">0</property>
+				  <property name="bottom_attach">1</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label16">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Appointments</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">1</property>
+				  <property name="bottom_attach">2</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label17">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Reminder Notes</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">2</property>
+				  <property name="bottom_attach">3</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label18">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Tasks</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">3</property>
+				  <property name="bottom_attach">4</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="mailRead">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Read</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="left_attach">1</property>
+				  <property name="right_attach">2</property>
+				  <property name="top_attach">0</property>
+				  <property name="bottom_attach">1</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="appRead">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Read</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="left_attach">1</property>
+				  <property name="right_attach">2</property>
+				  <property name="top_attach">1</property>
+				  <property name="bottom_attach">2</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="noteRead">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Read</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="left_attach">1</property>
+				  <property name="right_attach">2</property>
+				  <property name="top_attach">2</property>
+				  <property name="bottom_attach">3</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="taskRead">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Read</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="left_attach">1</property>
+				  <property name="right_attach">2</property>
+				  <property name="top_attach">3</property>
+				  <property name="bottom_attach">4</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="mailWrite">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Write</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="w" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="W" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="left_attach">2</property>
+				  <property name="right_attach">3</property>
+				  <property name="top_attach">0</property>
+				  <property name="bottom_attach">1</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="appWrite">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Write</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="w" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="W" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="left_attach">2</property>
+				  <property name="right_attach">3</property>
+				  <property name="top_attach">1</property>
+				  <property name="bottom_attach">2</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="noteWrite">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Write</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="w" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="W" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="left_attach">2</property>
+				  <property name="right_attach">3</property>
+				  <property name="top_attach">2</property>
+				  <property name="bottom_attach">3</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="taskWrite">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Write</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="w" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="W" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="left_attach">2</property>
+				  <property name="right_attach">3</property>
+				  <property name="top_attach">3</property>
+				  <property name="bottom_attach">4</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">6</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkVBox" id="vbox8">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">7</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="alarms">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Subscribe to my _alarms</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="a" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="A" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="notifications">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Subscribe to my _notifications</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="n" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="N" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="modify_rules">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Modify _folders/options/rules/</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="read_private">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Read items marked _private</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <accelerator key="p" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				  <accelerator key="P" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label14">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Access Rights</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">9</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
--- /dev/null	2005-03-20 01:06:14.000000000 +0530
+++ plugins/proxy/proxy.h	2005-06-29 09:18:22.000000000 +0530
@@ -0,0 +1,70 @@
+ /* Evolution calendar - Timezone selector dialog
+ *
+ * Copyright (C) 2005 Novell, Inc.
+ *
+ * Authors: 
+ * Shreyas Srinivasan <sshreyas novell com>
+ * Sankar P <psankar novell com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
+
+#define TYPE_PROXY_DIALOG       (proxy_dialog_get_type ())
+#define PROXY_DIALOG(obj)       (GTK_CHECK_CAST ((obj), TYPE_PROXY_DIALOG, proxyDialog))
+#define PROXY_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_PROXY_DIALOG, proxyDialogClass))
+#define IS_PROXY_DIALOG(obj)    (GTK_CHECK_TYPE ((obj), TYPE_PROXY_DIALOG))
+#define IS_PROXY_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_PROXY_DIALOG))
+
+typedef struct _proxyDialog		proxyDialog;
+typedef struct _proxyDialogClass        proxyDialogClass;
+typedef struct _proxyDialogPrivate	proxyDialogPrivate;
+
+struct _proxyDialog{
+    GObject object;
+
+    /*Connection */
+    EGwConnection *cnc;
+
+    /*List of proxies*/
+    GList *proxy_list;
+
+    /* Private Dialog Information*/
+    proxyDialogPrivate *priv;
+};
+
+struct _proxyDialogClass {
+	GObjectClass parent_class;
+};
+
+
+GType proxy_dialog_get_type (void);
+proxyDialog *proxy_dialog_new (void);
+void proxy_commit(GtkWidget *button, EConfigHookItemFactoryData *data);
+GtkWidget * org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data);
+void proxy_add_account (GtkWidget *button);
+void proxy_remove_account (GtkWidget *button);
+void update_tree_view ();
+void proxy_add_cancel();
+void proxy_edit_account (GtkWidget *button);
+void proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data);
+void proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data);
+void setup_meta_tree_view ();
+void update_tree_view ();
+proxyHandler *get_item_from_list (char *account_name);
+void proxy_add_cancel(GtkWidget *button, gint32 dialog_type);
+void load_edit_dialog (proxyHandler *edited);
--- /dev/null	2005-03-20 01:06:14.000000000 +0530
+++ plugins/proxy/proxy.c	2005-06-29 10:00:55.000000000 +0530
@@ -0,0 +1,784 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ *  Authors: 
+ *  Shreyas Srinivasan (sshreyas novell com)
+ *  Sankar P ( psankar novell com )
+ *
+ *  Copyright 2004 Novell, Inc. (www.novell.com)
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of version 2 of the GNU General Public
+ *  License as published by the Free Software Foundation.
+ *
+ *  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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <glib/gi18n.h>
+#include <glade/glade.h>
+#include <glib/gmain.h>
+
+#include <gtk/gtktreemodel.h>
+#include <gtk/gtkliststore.h>
+#include <gtk/gtktreeselection.h>
+#include <gtk/gtktreeview.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkbutton.h>
+#include <gtk/gtk.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkcellrenderertoggle.h>
+#include <gtk/gtkcellrenderertext.h>
+
+#include <libedataserverui/e-contact-store.h>
+
+#include <libgnomeui/gnome-ui-init.h>
+#include <libgnome/gnome-init.h>
+#include <e-util/e-error.h>
+#include <e-gw-container.h>
+#include <e-gw-connection.h>
+#include <e-gw-message.h>
+
+#include <mail/em-account-editor.h>
+#include <mail/em-config.h>
+#include <mail/mail-component.h>
+#include <mail/mail-ops.h>
+#include <e-util/e-account.h>
+#include <e-util/e-account-list.h>
+#include <e-util/e-icon-factory.h>
+
+#include <camel/camel-url.h>
+#include <libedataserverui/e-passwords.h>
+#include <libedataserverui/e-name-selector.h>
+#include <proxy.h>
+
+#define GW(name) glade_xml_get_widget (priv->xml, name)
+
+#define ACCOUNT_PICTURE 0
+#define ACCOUNT_NAME 1
+#define PROXY_ADD_DIALOG 2
+#define PROXY_EDIT_DIALOG 3
+
+proxyDialog *prd = NULL;
+static GObjectClass *parent_class = NULL;
+
+struct _proxyDialogPrivate {
+
+	/* Glade XML data for the Add/Edit Proxy dialog*/
+	GladeXML *xml;
+	/*Glade XML data for Proxy Tab*/
+	GladeXML *xml_tab;
+
+	/* Widgets */
+	GtkWidget *main;
+
+	/*Account Editor TAB*/
+	/*Tree Store*/
+	GtkTreeStore *store;
+	/*Tree View*/
+	GtkTreeView *tree;
+
+	/*name selector dialog*/
+	ENameSelector *proxy_name_selector;
+	
+	/*Add proxy dialog*/
+	/* Check Boxes for storing proxy priveleges*/
+	GtkWidget *account_name;
+	GtkWidget *mail_read;
+	GtkWidget *mail_write;
+	GtkWidget *app_read;
+	GtkWidget *app_write;
+	GtkWidget *note_read;
+	GtkWidget *note_write;
+	GtkWidget *task_read;
+	GtkWidget *task_write;
+	GtkWidget *alarms;
+	GtkWidget *notifications;
+	GtkWidget *options;
+	GtkWidget *private;
+        char *help_section;
+};
+
+static void
+proxy_dialog_dispose (GObject *object)
+{
+	proxyDialog *prd = (proxyDialog *) object;
+
+	g_return_if_fail (IS_PROXY_DIALOG (prd));
+
+	if (parent_class->dispose)
+		(* parent_class->dispose) (object);
+}
+
+static void
+free_proxy_handler (proxyHandler *handler)
+{
+	if (handler->uniqueid)
+		g_free (handler->uniqueid);
+	if (handler->proxy_name)
+		g_free (handler->proxy_name);
+	if (handler->proxy_email)
+		g_free (handler->proxy_email);			
+
+	handler->uniqueid = NULL;
+	handler->proxy_name = NULL;
+	handler->proxy_email = NULL;
+}
+
+static void
+proxy_dialog_finalize (GObject *object)
+{
+	proxyDialog *prd = (proxyDialog *) object;
+	proxyDialogPrivate *priv;
+
+	g_return_if_fail (IS_PROXY_DIALOG (prd));
+	priv = prd->priv;
+	
+	g_list_foreach (prd->proxy_list, (GFunc) free_proxy_handler, NULL);
+	g_list_free (prd->proxy_list);
+	prd->proxy_list = NULL;
+	
+	if(priv->proxy_name_selector)
+		g_object_unref (priv->proxy_name_selector);
+	g_free (priv->help_section);
+	g_object_unref (priv->xml_tab);
+
+	if (prd->priv) {
+		g_free (prd->priv);
+		prd->priv = NULL;
+	}
+	
+	if (parent_class->finalize)
+		(* parent_class->finalize) (object);
+}
+
+/* Class initialization function for the Proxy*/
+static void
+proxy_dialog_class_init (GObjectClass *object)
+{
+	proxyDialogClass *klass;
+	GObjectClass *object_class;
+
+	klass = PROXY_DIALOG_CLASS (object);
+	parent_class = g_type_class_peek_parent (klass);
+	object_class = G_OBJECT_CLASS (klass);
+
+	object_class->finalize = proxy_dialog_finalize;
+	object_class->dispose = proxy_dialog_dispose;
+}
+
+static void
+proxy_dialog_init (GObject *object)
+{
+	proxyDialog *prd;
+	proxyDialogPrivate *priv;
+
+	prd = PROXY_DIALOG (object);
+	priv = g_new0 (proxyDialogPrivate, 1);
+
+	prd->priv = priv;
+	
+	priv->xml = NULL;
+	priv->xml_tab = NULL;
+	priv->main = NULL;
+	priv->store = NULL;
+	priv->tree = NULL;
+	priv->proxy_name_selector = NULL;
+	priv->account_name = NULL;
+	priv->mail_read = NULL;
+	priv->mail_write = NULL;
+	priv->app_read = NULL;
+	priv->app_write = NULL;
+	priv->note_read = NULL;
+	priv->note_write = NULL;
+	priv->task_read = NULL;
+	priv->task_write = NULL;
+	priv->alarms = NULL;
+	priv->notifications = NULL; 
+	priv->options = NULL;
+	priv->private = NULL;
+	priv->help_section = NULL;
+}
+
+GType
+proxy_dialog_get_type (void) 
+{
+  static GType type = 0;
+  if (type == 0) {
+    static const GTypeInfo info = {
+      sizeof (proxyDialogClass),
+      NULL,   /* base_init */
+      NULL,   /* base_finalize */
+      (GClassInitFunc) proxy_dialog_class_init,   /* class_init */
+      NULL,   /* class_finalize */
+      NULL,   /* class_data */
+      sizeof (proxyDialog),
+     0,      /* n_preallocs */
+     (GInstanceInitFunc) proxy_dialog_init,
+ 	NULL    /* instance_init */
+    };
+    type = g_type_register_static (G_TYPE_OBJECT,
+                                   "proxyDialogType",
+                                   &info, 0);
+  }
+  return type;
+}
+
+proxyDialog * 
+proxy_dialog_new (void)
+{
+	proxyDialog *prd;
+
+	prd = g_object_new (TYPE_PROXY_DIALOG, NULL);
+	
+	return prd;
+}
+
+static int 
+get_permissions_from_dialog ()
+{
+	int permissions;
+	proxyDialogPrivate *priv;
+
+	priv = prd->priv;
+	permissions = 0;
+	
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->mail_read)))
+		permissions |= PROXY_MAIL_READ;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->mail_write)))
+		permissions |= PROXY_MAIL_WRITE;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->app_read)))
+		permissions |= PROXY_APPOINTMENT_READ;
+	if (gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (priv->app_write)))
+		permissions |= PROXY_APPOINTMENT_WRITE;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->task_read)))
+		permissions |= PROXY_TASK_READ;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->task_write)))
+		permissions |= PROXY_TASK_WRITE;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->note_read)))
+		permissions |= PROXY_NOTES_READ;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->note_write)))
+		permissions |= PROXY_NOTES_WRITE;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->alarms)))
+		permissions |= PROXY_GET_ALARMS;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->notifications)))
+		permissions |= PROXY_GET_NOTIFICATIONS;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->options)))
+		permissions |= PROXY_MODIFY_FOLDERS;
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->private)))
+		permissions |= PROXY_READ_PRIVATE;
+
+	return permissions;
+}
+
+	static int 
+proxy_dialog_store_widgets_data (gint32 dialog)
+{
+	GtkTreeIter iter;
+	GtkTreeSelection* account_select;
+	GtkTreeModel *model;
+	proxyHandler *new_proxy = NULL;
+	proxyDialogPrivate *priv;
+	char *account_mailid;
+
+	priv = prd->priv;
+
+	switch (dialog)
+	{
+		case PROXY_ADD_DIALOG:
+			{
+				ENameSelectorEntry *name_selector_entry;
+				EDestinationStore *destination_store;
+				GList *destinations, *tmp;
+				char *name, *email;
+				GList *existing_list;
+				name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector, "Add User");
+				destination_store = e_name_selector_entry_peek_destination_store (E_NAME_SELECTOR_ENTRY (
+							name_selector_entry));
+				destinations = e_destination_store_list_destinations (destination_store);
+				tmp = destinations;
+				if (!tmp) {
+					e_error_run (NULL, "org.gnome.evolution.proxy:no-user",NULL ,NULL);
+					return -1; 
+				}
+				for (; tmp != NULL; tmp = g_list_next (tmp)) {
+					email = NULL;
+					email = (char *)e_destination_get_email (tmp->data);
+					if (g_strrstr (email, "@") == NULL ) {
+						e_error_run (NULL, "org.gnome.evolution.proxy:invalid-user",email ,NULL);
+						return -1;
+					} 	
+					/*check whether already exists*/
+					existing_list = prd->proxy_list;
+					for (;existing_list; existing_list = g_list_next(existing_list)) {
+						new_proxy = (proxyHandler *) existing_list->data;
+						if ( !g_ascii_strcasecmp (new_proxy->proxy_email, email) ) {
+							e_error_run (NULL, "org.gnome.evolution.proxy:user-is-proxy",email ,NULL);
+							return -1;
+						}
+						}
+				}
+				tmp = destinations;
+				for (; tmp != NULL; tmp = g_list_next (tmp)) {
+					name = NULL; email = NULL;
+					email = (char *) e_destination_get_email (tmp->data);
+					name = (char *) e_destination_get_name (tmp->data);
+					new_proxy = (proxyHandler *) g_malloc (sizeof (proxyHandler));
+					if (name)
+						new_proxy->proxy_name = g_strdup (name);
+					else
+						new_proxy->proxy_name = g_strdup (email);
+					new_proxy->proxy_email = g_strdup (email);
+					new_proxy->uniqueid = NULL;
+					new_proxy->flags =  PROXY_NEW;
+					new_proxy->permissions = get_permissions_from_dialog();
+					prd->proxy_list = g_list_append (prd->proxy_list, new_proxy);
+				}
+			}
+			break;
+		case PROXY_EDIT_DIALOG:
+			account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree));
+			gtk_tree_selection_get_selected (account_select, &model, &iter);
+			gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1);
+			account_mailid = g_strrstr (account_mailid, "\n") + 1;
+			new_proxy = get_item_from_list (account_mailid);
+			if (!new_proxy->flags & PROXY_NEW)
+				new_proxy->flags = PROXY_EDITED;
+			new_proxy->permissions = get_permissions_from_dialog();
+			break;
+		default:
+			return -1;
+	}    
+	return 0;
+}
+
+
+static gboolean
+proxy_dialog_initialize_widgets ()
+{
+	proxyDialogPrivate *priv;
+
+	priv = prd->priv;
+	priv->account_name = GW ("proxy_account_name");
+	priv->mail_read = GW ("mailRead");
+	priv->mail_write = GW ("mailWrite");
+	priv->app_read = GW ("appRead");
+	priv->app_write = GW ("appWrite");
+	priv->note_read = GW ("noteRead");
+	priv->note_write = GW ("noteWrite");
+	priv->task_read = GW ("taskRead");
+	priv->task_write = GW ("taskWrite");
+	priv->alarms = GW ("alarms");
+	priv->notifications = GW ("notifications");
+	priv->options = GW ("modify_rules");
+	priv->private = GW ("read_private");
+	
+	return (priv->account_name
+		&& priv->mail_read
+		&& priv->mail_write
+		&& priv->app_read
+		&& priv->app_write
+		&& priv->note_read
+		&& priv->note_write
+		&& priv->task_read
+		&& priv->task_write
+		&& priv->alarms
+		&& priv->notifications
+		&& priv->options
+		&& priv->private);
+}
+
+static EGwConnection * 
+get_cnc (EAccount *account)
+{
+	EGwConnection *cnc;
+	char *uri, *failed_auth, *key, *prompt, *password = NULL;
+	CamelURL *url;
+	const char *poa_address, *use_ssl, *soap_port;
+	gboolean remember;
+
+	url = camel_url_new (account->source->url, NULL);
+	if (url == NULL) 
+		return NULL;
+	poa_address = url->host; 
+	if (!poa_address || strlen (poa_address) ==0)
+		return NULL;
+	
+        soap_port = camel_url_get_param (url, "soap_port");
+        if (!soap_port || strlen (soap_port) == 0)
+                soap_port = "7191";
+	use_ssl = camel_url_get_param (url, "use_ssl");
+
+	key =  g_strdup_printf ("groupwise://%s %s/", url->user, poa_address); 
+	
+	if (!g_str_equal (use_ssl, "never"))
+		uri = g_strdup_printf ("https://%s:%s/soap";, poa_address, soap_port);
+	else 
+		uri = g_strdup_printf ("http://%s:%s/soap";, poa_address, soap_port);
+	
+	failed_auth = "";
+	cnc = NULL;
+	
+	prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"),
+			failed_auth, poa_address, url->user);
+
+	password = e_passwords_get_password ("Groupwise", key);
+	if (!password)
+		password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
+				E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember, NULL);
+	g_free (prompt);
+
+	cnc = e_gw_connection_new (uri, url->user, password);
+	if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) {
+		char *http_uri = g_strconcat ("http://";, uri + 8, NULL);
+		cnc = e_gw_connection_new (http_uri, url->user, password);
+		g_free (http_uri);
+	}
+
+	camel_url_free (url);
+	return cnc;
+}
+
+void 
+proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data)
+{
+	g_object_unref (prd);
+}
+void 
+proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data)
+{
+	int i,n;
+	EAccount *account;
+	EMConfigTargetAccount *target_account;
+	proxyDialogPrivate *priv;
+
+	priv = prd->priv;
+	n = g_list_length(prd->proxy_list);
+	for (i=0;i<n;i++)
+	{
+		proxyHandler *aclInstance;
+		aclInstance = (proxyHandler *) g_list_nth_data(prd->proxy_list,i);
+
+		// Handle case where the structure is new and deleted
+		if ( !((aclInstance->flags & PROXY_NEW) && (aclInstance->flags & PROXY_DELETED))) {
+				if ( !E_IS_GW_CONNECTION(prd->cnc)) {
+				target_account = (EMConfigTargetAccount *)data->config->target;
+				account = target_account->account;
+				// Add check in case the connection request fails
+				prd->cnc = get_cnc (account);
+			}	
+			if (aclInstance->flags & PROXY_NEW )         	
+				e_gw_proxy_add (prd->cnc, aclInstance);		
+			if (aclInstance->flags & PROXY_DELETED)
+				e_gw_proxy_remove (prd->cnc, aclInstance);
+			if (aclInstance->flags & PROXY_EDITED)
+				e_gw_proxy_changed (prd->cnc, aclInstance);
+		}
+	}
+	g_object_unref (prd);
+}
+
+void 
+setup_meta_tree_view ()
+{
+	proxyDialogPrivate *priv;
+	GtkTreeSelection *selection;
+	GtkCellRenderer *renderer;
+	GtkTreeViewColumn *column;
+	
+	priv = prd->priv;
+	renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF,
+				 "xpad", 4,
+				 "ypad", 4,
+				 NULL);
+	column = gtk_tree_view_column_new_with_attributes ("Picture", renderer, "pixbuf", ACCOUNT_PICTURE, NULL);
+	gtk_tree_view_append_column (GTK_TREE_VIEW (priv->tree), column);
+	renderer = gtk_cell_renderer_text_new ();
+	column = gtk_tree_view_column_new_with_attributes ("Name", renderer, "text", ACCOUNT_NAME, NULL);
+	gtk_tree_view_append_column (GTK_TREE_VIEW (priv->tree), column);
+
+	gtk_tree_view_set_model (priv->tree, GTK_TREE_MODEL (priv->store));
+	selection = gtk_tree_view_get_selection (priv->tree);
+	gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
+}
+
+
+GtkWidget* 
+org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data)
+{
+	EMConfigTargetAccount *target_account;
+	EAccount *account;
+	GtkWidget *tab_dialog = NULL;
+	GtkButton *addProxy, *removeProxy, *editProxy;
+	proxyDialogPrivate *priv;
+	
+	prd = proxy_dialog_new();
+	priv = prd->priv;
+	target_account = (EMConfigTargetAccount *)data->config->target;
+	account = target_account->account;
+
+	if(!g_strrstr (account->source->url, "groupwise://"))
+		return NULL;
+	priv->xml_tab = glade_xml_new (EVOLUTION_GLADEDIR "/proxy-listing.glade", "proxy_vbox", NULL);
+	tab_dialog = GTK_WIDGET (glade_xml_get_widget (priv->xml_tab, "proxy_vbox"));
+	priv->tree = GTK_TREE_VIEW (glade_xml_get_widget (priv->xml_tab, "proxy_access_list"));
+	priv->store =  gtk_tree_store_new (2,
+					   GDK_TYPE_PIXBUF,
+					   G_TYPE_STRING
+					   );
+	setup_meta_tree_view ();
+
+	addProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "add_proxy");
+	removeProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "remove_proxy");
+	editProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "edit_proxy");
+
+
+	g_signal_connect (addProxy, "clicked", G_CALLBACK(proxy_add_account), NULL);	
+	g_signal_connect (removeProxy, "clicked", G_CALLBACK(proxy_remove_account), NULL);
+	g_signal_connect (editProxy, "clicked", G_CALLBACK(proxy_edit_account), NULL);
+
+	prd->cnc = get_cnc(account);
+	if (e_gw_connection_get_proxy_access_list(prd->cnc, &prd->proxy_list)!= E_GW_CONNECTION_STATUS_OK) {
+		return 0;
+	}
+	update_tree_view ();
+	gtk_notebook_append_page ((GtkNotebook *)(data->parent), (GtkWidget *)tab_dialog, gtk_label_new("Proxy"));
+	gtk_widget_show_all (tab_dialog);
+	return NULL;
+}
+
+void
+update_tree_view ()
+{
+    	GtkTreeIter iter;
+	int i,n;
+	GdkPixbuf *broken_image = NULL;
+
+	gchar *file_name = e_icon_factory_get_icon_filename ("stock_person", E_ICON_SIZE_DIALOG);
+	broken_image = gdk_pixbuf_new_from_file (file_name, NULL);
+	
+	proxyDialogPrivate *priv = prd->priv;
+	gtk_tree_store_clear (priv->store);
+	n = g_list_length(prd->proxy_list);
+	for (i=0;i<n;i++)
+	{
+		proxyHandler *aclInstance;
+		aclInstance = (proxyHandler *) g_list_nth_data(prd->proxy_list,i);
+		if(! (aclInstance->flags & PROXY_DELETED )) {
+			gtk_tree_store_append (priv->store, &iter, NULL);
+			gtk_tree_store_set (priv->store, &iter, 0, broken_image, 1, g_strconcat(aclInstance->proxy_name,"\n",aclInstance->proxy_email, NULL), -1);
+		}
+	}
+	gtk_tree_view_set_model (GTK_TREE_VIEW(priv->tree),GTK_TREE_MODEL (priv->store));
+}
+
+void
+proxy_add_cancel(GtkWidget *button, gint32 dialog_type)
+{
+	proxyDialogPrivate *priv;
+
+	priv = prd->priv;
+	gtk_widget_destroy (priv->main);
+	g_object_unref (priv->xml);
+}
+
+static void 
+proxy_ok (GtkWidget *button, gint32 dialog_type)
+{
+	proxyDialogPrivate *priv;
+
+	priv = prd->priv;
+	if ( proxy_dialog_store_widgets_data (dialog_type) < 0)
+		return;
+	update_tree_view();
+	gtk_widget_destroy (priv->main);
+	g_object_unref (priv->xml);
+}
+
+proxyHandler * 
+get_item_from_list (char *account_name)
+{
+	int i,n;
+
+	n = g_list_length(prd->proxy_list);
+	for (i=0;i<n;i++)
+	{
+		proxyHandler *iter;
+		iter = (proxyHandler *) g_list_nth_data(prd->proxy_list,i);
+		if ( g_str_equal (iter->proxy_email,account_name))
+			return iter;
+
+	}
+	return NULL;
+}
+
+void 
+proxy_remove_account (GtkWidget *button)
+{
+	GtkTreeIter iter;
+        GtkTreeModel *model;
+	proxyDialogPrivate *priv;
+	proxyHandler *deleted;
+	GtkTreeSelection* account_select;
+	char *account_mailid;
+     
+	priv = prd->priv;
+	account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree));
+
+        if (gtk_tree_selection_get_selected (account_select, &model, &iter)) {
+                gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1);
+		account_mailid = g_strrstr (account_mailid, "\n") + 1;
+		deleted = get_item_from_list (account_mailid);
+		if (deleted != NULL)
+			deleted->flags |= PROXY_DELETED;
+		update_tree_view ();
+        }
+}
+
+static void
+addressbook_dialog_response (ENameSelectorDialog *name_selector_dialog, gint response, gpointer user_data)
+{
+	gtk_widget_hide (GTK_WIDGET (name_selector_dialog));
+}
+
+static void
+addressbook_entry_changed (GtkWidget *entry, gpointer user_data)
+{
+}
+
+static void
+address_button_clicked (GtkButton *button, proxyDialog *prd)
+{
+	proxyDialogPrivate *priv;
+	ENameSelectorDialog *name_selector_dialog;
+
+	priv = prd->priv;
+	name_selector_dialog = e_name_selector_peek_dialog (priv->proxy_name_selector);
+	gtk_widget_show (GTK_WIDGET (name_selector_dialog));
+}
+
+void 
+proxy_add_account (GtkWidget *button)
+{
+	GtkButton *contacts, *cancel;
+	proxyDialogPrivate *priv;
+	GtkButton *okButton;
+	ENameSelectorDialog *name_selector_dialog;
+	ENameSelectorModel *name_selector_model;
+	ENameSelectorEntry *name_selector_entry;
+	GtkWidget *proxy_name, *name_box;
+
+	priv = prd->priv;
+	priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/proxy-add-dialog.glade", NULL, NULL);
+	proxy_dialog_initialize_widgets ();
+	priv->main = glade_xml_get_widget (priv->xml, "ProxyAccessRights");
+	okButton = (GtkButton *) glade_xml_get_widget (priv->xml,"proxy_button_ok");
+	contacts = (GtkButton *) glade_xml_get_widget (priv->xml,"contacts");
+	cancel = glade_xml_get_widget (priv->xml,"proxy_cancel");
+
+	priv->proxy_name_selector = e_name_selector_new ();
+	name_selector_dialog = e_name_selector_peek_dialog (priv->proxy_name_selector);
+
+	g_signal_connect ((GtkWidget *)okButton, "clicked", G_CALLBACK (proxy_ok), PROXY_ADD_DIALOG);
+	g_signal_connect ((GtkWidget *)cancel, "clicked", G_CALLBACK (proxy_add_cancel), PROXY_ADD_DIALOG);
+	g_signal_connect ((GtkWidget *)contacts, "clicked", G_CALLBACK (address_button_clicked), prd);
+	g_signal_connect (name_selector_dialog, "response", G_CALLBACK (addressbook_dialog_response), prd);
+	gtk_widget_show (GTK_WIDGET (priv->main));		
+
+	name_selector_model = e_name_selector_peek_model (priv->proxy_name_selector);
+	e_name_selector_model_add_section (name_selector_model, "Add User", "Add User", NULL);
+
+	name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector, "Add User");
+	g_signal_connect (name_selector_entry, "changed",
+			  G_CALLBACK (addressbook_entry_changed), prd);
+
+	proxy_name = glade_xml_get_widget (priv->xml, "proxy_account_name");
+	name_box = glade_xml_get_widget (priv->xml, "proxy_name_box");
+	gtk_widget_hide (proxy_name);
+	gtk_container_add ((GtkContainer *)name_box, (GtkWidget *)name_selector_entry);
+	gtk_widget_show ((GtkWidget *) name_selector_entry);
+	gtk_widget_grab_focus ((GtkWidget *) name_selector_entry);
+}
+
+void 
+load_edit_dialog (proxyHandler *edited)
+{
+	proxyDialogPrivate *priv;
+
+	priv = prd->priv;
+	gtk_entry_set_text ((GtkEntry *) priv->account_name, edited->proxy_email);
+	gtk_widget_set_sensitive (priv->account_name, FALSE);
+
+	if (edited->permissions & PROXY_MAIL_READ)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->mail_read), TRUE);
+	if (edited->permissions & PROXY_MAIL_WRITE)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->mail_write), TRUE);
+	if (edited->permissions & PROXY_APPOINTMENT_READ)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->app_read), TRUE);
+	if (edited->permissions & PROXY_APPOINTMENT_WRITE)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->app_write), TRUE);
+	if (edited->permissions & PROXY_NOTES_READ)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->note_read), TRUE);
+	if (edited->permissions & PROXY_NOTES_WRITE)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->note_write), TRUE);
+	if (edited->permissions & PROXY_TASK_READ)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_read), TRUE); 
+	if (edited->permissions & PROXY_TASK_WRITE)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_write), TRUE); 
+	if (edited->permissions & PROXY_GET_ALARMS)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->alarms), TRUE); 
+	if (edited->permissions & PROXY_GET_NOTIFICATIONS)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->notifications), TRUE); 
+	if (edited->permissions & PROXY_MODIFY_FOLDERS)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->options), TRUE); 
+	if (edited->permissions & PROXY_READ_PRIVATE)
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->private), TRUE); 
+}	
+
+void 
+proxy_edit_account (GtkWidget *button)
+{
+	GtkTreeIter iter;
+        GtkTreeModel *model;
+	proxyDialogPrivate *priv;
+	GtkTreeSelection* account_select;
+	proxyHandler *edited;
+	GtkButton *okButton, *proxyCancel;
+	char *account_mailid;
+	GtkWidget *contacts;
+	priv = prd->priv;
+		
+	account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree));
+
+	
+        if (gtk_tree_selection_get_selected (account_select, &model, &iter))
+        {
+                gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1);
+		account_mailid = g_strrstr (account_mailid, "\n") + 1;
+		edited = get_item_from_list (account_mailid);
+		if (edited) {
+			priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/proxy-add-dialog.glade", NULL, NULL);
+			priv->main = glade_xml_get_widget (priv->xml, "ProxyAccessRights");
+			proxy_dialog_initialize_widgets ();
+			okButton = (GtkButton *) glade_xml_get_widget (priv->xml,"proxy_button_ok");
+			proxyCancel = (GtkButton *) glade_xml_get_widget (priv->xml,"proxy_cancel");
+			contacts = glade_xml_get_widget (priv->xml, "contacts");
+
+			g_signal_connect ((GtkWidget *)okButton, "clicked", G_CALLBACK (proxy_ok), PROXY_EDIT_DIALOG);
+			g_signal_connect ((GtkWidget *)proxyCancel, "clicked", G_CALLBACK (proxy_add_cancel), PROXY_EDIT_DIALOG);
+			load_edit_dialog (edited);
+			gtk_widget_show (GTK_WIDGET (priv->main));		
+		}	
+        }
+}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* 
 * Authors : 
 *  Shreyas Srinivasan <sshreyas novell com>
 *  Sankar P <psankar novell com>
 *
 * Copyright 2003, Novell, Inc.
 *
 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of version 2 of the GNU General Public 
 * License as published by the Free Software Foundation.
 *
 * 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

/*State of each proxy grant*/

#define PROXY_NEW           (1 << 0)           
#define PROXY_DELETED       (1 << 1)
#define PROXY_EDITED	  (1 << 2)

/*Permissions associated with a proxy grant*/
#define PROXY_MAIL_READ                (1 << 0)           
#define PROXY_MAIL_WRITE               (1 << 1)
#define PROXY_APPOINTMENT_READ         (1 << 2)           
#define PROXY_APPOINTMENT_WRITE        (1 << 3)
#define PROXY_NOTES_READ               (1 << 4)
#define PROXY_NOTES_WRITE              (1 << 5)
#define PROXY_TASK_READ                (1 << 6)
#define PROXY_TASK_WRITE               (1 << 7)
#define PROXY_GET_ALARMS               (1 << 8)
#define PROXY_GET_NOTIFICATIONS        (1 << 9)
#define PROXY_MODIFY_FOLDERS           (1 << 10)
#define PROXY_READ_PRIVATE             (1 << 11)


struct _proxyHandler {
    char *uniqueid;
    char *proxy_name;
    char *proxy_email;   
    guint32 flags;
    guint32 permissions;
};

typedef struct _proxyHandler proxyHandler;


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