[evolution-patches] Submission for bounty on bug #127541 - Default Free Busy URI



Hi,

Attached is my submission for bug #127541: Default free/busy URI

This patch adds an additional preference under the Free/Busy Publish
page in the calendar configuration preferences notebook, allowing you to
specify the default uri template, and will substitute <USER> and
<DOMAIN> with the respective parts of the attendee's email address.

I have also attached the patch to the bugzilla bug, before I was told by
jpr that I should have sent it to this address.

Thanks,

-- 
James Bowes <bowes cs dal ca>
? calendar/gui/dialogs/cal-prefs-dialog.gladep
? help/C/evolution-2.2-C.omf
? help/C/evolution-2.2.xml
? plugins/folder-unsubscribe/Makefile
? plugins/folder-unsubscribe/Makefile.in
? plugins/mark-calendar-offline/Makefile
? plugins/mark-calendar-offline/Makefile.in
? widgets/misc/test-source-option-menu
? widgets/misc/test-source-selector
Index: calendar/gui/apps_evolution_calendar.schemas.in.in
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/apps_evolution_calendar.schemas.in.in,v
retrieving revision 1.5
diff --unified -r1.5 apps_evolution_calendar.schemas.in.in
--- calendar/gui/apps_evolution_calendar.schemas.in.in	26 May 2004 19:51:49 -0000	1.5
+++ calendar/gui/apps_evolution_calendar.schemas.in.in	3 Nov 2004 03:26:28 -0000
@@ -367,5 +367,16 @@
         <short>List of urls for free/busy publishing</short>
       </locale>
     </schema>    
+
+    <schema>
+      <key>/schemas/apps/evolution/calendar/publish/template</key>
+      <applyto>/apps/evolution/calendar/publish/template</applyto>
+      <owner>evolution-calendar</owner>
+      <type>string</type>
+      <default>http://&lt;DOMAIN&gt;/&lt;USER&gt;.ifb</default>
+      <locale name="C">
+        <short>The url template to use as a free/busy data fallback</short>
+      </locale>
+    </schema>
   </schemalist>
 </gconfschemafile>
Index: calendar/gui/calendar-config-keys.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-config-keys.h,v
retrieving revision 1.5
diff --unified -r1.5 calendar-config-keys.h
--- calendar/gui/calendar-config-keys.h	13 Jan 2004 01:59:27 -0000	1.5
+++ calendar/gui/calendar-config-keys.h	3 Nov 2004 03:26:28 -0000
@@ -72,6 +72,7 @@
 
 /* Free/Busy settings */
 #define CALENDAR_CONFIG_PUBLISH CALENDAR_CONFIG_PREFIX"/publish/uris"
+#define CALENDAR_CONFIG_TEMPLATE CALENDAR_CONFIG_PREFIX"/publish/template"
 
 G_END_DECLS
 
Index: calendar/gui/calendar-config.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-config.c,v
retrieving revision 1.70
diff --unified -r1.70 calendar-config.c
--- calendar/gui/calendar-config.c	7 Oct 2004 21:03:36 -0000	1.70
+++ calendar/gui/calendar-config.c	3 Nov 2004 03:26:28 -0000
@@ -1063,3 +1063,15 @@
 	gconf_client_set_list (config, CALENDAR_CONFIG_PUBLISH, 
 			       GCONF_VALUE_STRING, url_list, NULL);
 }
+
+gchar *
+calendar_config_get_free_busy_template (void)
+{
+	return gconf_client_get_string (config, CALENDAR_CONFIG_TEMPLATE, NULL);
+}
+
+void
+calendar_config_set_free_busy_template (const gchar *template)
+{
+	gconf_client_set_string (config, CALENDAR_CONFIG_TEMPLATE, template, NULL);
+}
Index: calendar/gui/calendar-config.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-config.h,v
retrieving revision 1.34
diff --unified -r1.34 calendar-config.h
--- calendar/gui/calendar-config.h	30 Apr 2004 21:33:11 -0000	1.34
+++ calendar/gui/calendar-config.h	3 Nov 2004 03:26:28 -0000
@@ -206,6 +206,9 @@
 GSList * calendar_config_get_free_busy (void);
 void calendar_config_set_free_busy (GSList * url_list);
 
+gchar *calendar_config_get_free_busy_template (void);
+void calendar_config_set_free_busy_template (const gchar *template);
+
 /* Convenience functions to configure common properties of ECalendar,
    EDateEdit & ECalendarTable widgets, and the ECellDateEdit ETable cell. */
 void	  calendar_config_configure_e_calendar		(ECalendar	*cal);
Index: calendar/gui/e-meeting-store.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-meeting-store.c,v
retrieving revision 1.8
diff --unified -r1.8 e-meeting-store.c
--- calendar/gui/e-meeting-store.c	19 Oct 2004 03:51:01 -0000	1.8
+++ calendar/gui/e-meeting-store.c	3 Nov 2004 03:26:29 -0000
@@ -78,6 +78,8 @@
 
 static GObjectClass *parent_class = NULL;
 
+static void start_async_read (GnomeVFSAsyncHandle *handle, GnomeVFSResult result, gpointer data);
+
 static void
 start_addressbook_server (EMeetingStore *store)
 {
@@ -1116,6 +1118,23 @@
 	process_callbacks (qdata);
 }
 
+/* 
+ * Replace all instances of from_value in string with to_value 
+ * In the returned newly allocated string. 
+*/
+static gchar *
+replace_string (gchar *string, gchar *from_value, gchar *to_value)
+{
+	gchar *replaced;
+	gchar **split_uri;
+
+	split_uri = g_strsplit (string, from_value, 0);
+	replaced = g_strjoinv (to_value, split_uri);
+	g_strfreev (split_uri);
+
+	return replaced;
+}
+
 typedef struct {
 	ECal *client;
 	time_t startt;
@@ -1126,12 +1145,16 @@
 	EMeetingStoreQueueData *qdata;
 } FreeBusyAsyncData;
 
+#define USER_SUB   "<USER>"
+#define DOMAIN_SUB "<DOMAIN>"
+
 static gboolean
 freebusy_async (gpointer data)
 {
 	FreeBusyAsyncData *fbd = data;
 	EMeetingAttendee *attendee = fbd->attendee;
-	
+	gchar *default_fb_uri;
+
 	if (fbd->client) {
 		e_cal_get_free_busy (fbd->client, fbd->users, fbd->startt, fbd->endt, &(fbd->fb_data), NULL);
 
@@ -1145,22 +1168,54 @@
 			comp_str = e_cal_component_get_as_string (comp);
 			process_free_busy (fbd->qdata, comp_str);
 			g_free (comp_str);
+
+			return TRUE;
 		}
-		return TRUE;
 	}
-	
 
 	/* Look for fburl's of attendee with no free busy info on server */
 	if (!e_meeting_attendee_is_set_address (attendee)) {
 		process_callbacks (fbd->qdata);
 		return TRUE;
 	}
+
 	
+
+	/* Check for free busy info on the default server */
+	default_fb_uri = calendar_config_get_free_busy_template ();
+
+	if (default_fb_uri != NULL) {
+		GnomeVFSAsyncHandle *handle;
+		gchar *tmp_fb_uri;
+		gchar **split_email;
+		const gchar *email;
+
+		email = itip_strip_mailto (e_meeting_attendee_get_address (attendee));
+		
+		split_email = g_strsplit (email, "@", 2);
+		
+		tmp_fb_uri = replace_string (default_fb_uri, USER_SUB, split_email[0]);
+		g_free (default_fb_uri);
+		default_fb_uri = replace_string (tmp_fb_uri, DOMAIN_SUB, split_email[1]);
+
+		gnome_vfs_async_open (&handle, default_fb_uri, GNOME_VFS_OPEN_READ, 
+				      GNOME_VFS_PRIORITY_DEFAULT, start_async_read, 
+				      fbd->qdata);
+		
+		g_free (tmp_fb_uri);
+		g_strfreev (split_email);
+		g_free (default_fb_uri);
+	}
+
 	return TRUE;
 
 
 }
 
+#undef USER_SUB
+#undef DOMAIN_SUB
+
+
 static gboolean
 refresh_busy_periods (gpointer data)
 {	
@@ -1202,8 +1257,10 @@
 	
 	fbd = g_new0 (FreeBusyAsyncData, 1);
 	fbd->client = priv->client;
+	fbd->attendee = attendee;
 	fbd->users = NULL;
 	fbd->fb_data = NULL;	
+	fbd->qdata = qdata;
 
 	/* Check the server for free busy data */	
 	if (priv->client) {
@@ -1228,6 +1285,7 @@
 		fbd->qdata = qdata;
 		fbd->attendee = attendee;
 
+
 		user = itip_strip_mailto (e_meeting_attendee_get_address (attendee));
 		fbd->users = g_list_append (fbd->users, g_strdup (user));
 
@@ -1341,6 +1399,22 @@
 	}
 
 	gnome_vfs_async_read (handle, qdata->buffer, buf_size, async_read, qdata);	
+}
+
+static void
+start_async_read (GnomeVFSAsyncHandle *handle,
+		  GnomeVFSResult result,
+		  gpointer data)
+{
+	EMeetingStoreQueueData *qdata = data;
+	GnomeVFSFileSize buf_size = BUF_SIZE - 1;
+
+	if (result != GNOME_VFS_OK) {
+		g_warning ("Unable to access free/busy url");
+		return;
+	}
+
+	gnome_vfs_async_read (handle, qdata->buffer, buf_size, async_read, qdata);
 }
 
 void
Index: calendar/gui/dialogs/cal-prefs-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cal-prefs-dialog.c,v
retrieving revision 1.39
diff --unified -r1.39 cal-prefs-dialog.c
--- calendar/gui/dialogs/cal-prefs-dialog.c	7 Oct 2004 21:08:25 -0000	1.39
+++ calendar/gui/dialogs/cal-prefs-dialog.c	3 Nov 2004 03:26:30 -0000
@@ -371,6 +371,12 @@
 }
 
 static void
+template_url_changed (GtkEntry *entry, DialogData *dialog_data)
+{
+	calendar_config_set_free_busy_template (gtk_entry_get_text (entry));
+}
+
+static void
 setup_changes (DialogData *dialog_data)
 {
 	int i;
@@ -412,6 +418,8 @@
 			  G_CALLBACK (default_reminder_interval_changed), dialog_data);
 	g_signal_connect (GTK_OPTION_MENU (dialog_data->default_reminder_units)->menu, "selection-done",
 			  G_CALLBACK (default_reminder_units_changed), dialog_data);
+
+	g_signal_connect (dialog_data->template_url, "changed", G_CALLBACK (template_url_changed), dialog_data);
 }
 
 /* Gets the widgets from the XML file and returns if they are all available.
@@ -463,6 +471,8 @@
 	data->url_enable = GW ("url_enable");
 	data->url_list = GTK_TREE_VIEW (GW ("url_list"));
 
+	data->template_url = GW("template_url");
+
 #undef GW
 
 	return (data->page
@@ -859,6 +869,7 @@
 	GSList *url_config_list = NULL;
 	GtkListStore *model;
 	GtkTreeIter iter;
+	gchar *template_url;
 	
 	model = (GtkListStore *) gtk_tree_view_get_model (dialog_data->url_list);
 	gtk_list_store_clear (model);
@@ -910,6 +921,11 @@
 
 	g_slist_foreach (url_config_list, (GFunc) g_free, NULL);
 	g_slist_free (url_config_list);
+
+	template_url = calendar_config_get_free_busy_template ();
+	gtk_entry_set_text (GTK_ENTRY (dialog_data->template_url), template_url);
+
+	g_free (template_url);
 }
 
 /* Shows the current task list settings in the dialog */
Index: calendar/gui/dialogs/cal-prefs-dialog.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cal-prefs-dialog.glade,v
retrieving revision 1.29
diff --unified -r1.29 cal-prefs-dialog.glade
--- calendar/gui/dialogs/cal-prefs-dialog.glade	12 Oct 2004 06:58:11 -0000	1.29
+++ calendar/gui/dialogs/cal-prefs-dialog.glade	3 Nov 2004 03:26:31 -0000
@@ -1520,247 +1520,433 @@
 	  </child>
 
 	  <child>
-	    <widget class="GtkHBox" id="hbox20">
+	    <widget class="GtkVBox" id="vbox17">
 	      <property name="border_width">12</property>
 	      <property name="visible">True</property>
 	      <property name="homogeneous">False</property>
-	      <property name="spacing">6</property>
+	      <property name="spacing">12</property>
 
 	      <child>
-		<widget class="GtkScrolledWindow" id="scrolledwindow1">
+		<widget class="GtkFrame" id="frame2">
 		  <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_IN</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</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="GtkTreeView" id="url_list">
+		    <widget class="GtkAlignment" id="alignment8">
 		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">False</property>
-		      <property name="reorderable">False</property>
-		      <property name="enable_search">True</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkVBox" id="vbox15">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">6</property>
-
-		  <child>
-		    <widget class="GtkVButtonBox" id="vbuttonbox3">
-		      <property name="visible">True</property>
-		      <property name="layout_style">GTK_BUTTONBOX_START</property>
-		      <property name="spacing">6</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">12</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
 
 		      <child>
-			<widget class="GtkButton" id="url_add">
+			<widget class="GtkHBox" id="hbox20">
 			  <property name="visible">True</property>
-			  <property name="can_default">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
 
 			  <child>
-			    <widget class="GtkAlignment" id="alignment5">
+			    <widget class="GtkScrolledWindow" id="scrolledwindow1">
 			      <property name="visible">True</property>
-			      <property name="can_default">True</property>
 			      <property name="can_focus">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>
+			      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<widget class="GtkTreeView" id="url_list">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="headers_visible">True</property>
+				  <property name="rules_hint">False</property>
+				  <property name="reorderable">False</property>
+				  <property name="enable_search">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkVBox" id="vbox15">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">6</property>
 
 			      <child>
-				<widget class="GtkHBox" id="hbox22">
+				<widget class="GtkVButtonBox" id="vbuttonbox3">
 				  <property name="visible">True</property>
-				  <property name="homogeneous">False</property>
-				  <property name="spacing">2</property>
+				  <property name="layout_style">GTK_BUTTONBOX_START</property>
+				  <property name="spacing">6</property>
 
 				  <child>
-				    <widget class="GtkImage" id="image1">
+				    <widget class="GtkButton" id="url_add">
 				      <property name="visible">True</property>
-				      <property name="stock">gtk-add</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>
+				      <property name="can_default">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="relief">GTK_RELIEF_NORMAL</property>
+				      <property name="focus_on_click">True</property>
+
+				      <child>
+					<widget class="GtkAlignment" id="alignment5">
+					  <property name="visible">True</property>
+					  <property name="can_default">True</property>
+					  <property name="can_focus">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="hbox22">
+					      <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-add</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="labeladd">
+						  <property name="visible">True</property>
+						  <property name="can_default">True</property>
+						  <property name="can_focus">True</property>
+						  <property name="label" translatable="yes">_Add URL</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>
+						</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>
 
 				  <child>
-				    <widget class="GtkLabel" id="labeladd">
+				    <widget class="GtkButton" id="url_edit">
 				      <property name="visible">True</property>
+				      <property name="sensitive">False</property>
 				      <property name="can_default">True</property>
 				      <property name="can_focus">True</property>
-				      <property name="label" translatable="yes">_Add URL</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="relief">GTK_RELIEF_NORMAL</property>
+				      <property name="focus_on_click">True</property>
+
+				      <child>
+					<widget class="GtkAlignment" id="alignment6">
+					  <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="hbox23">
+					      <property name="visible">True</property>
+					      <property name="homogeneous">False</property>
+					      <property name="spacing">2</property>
+
+					      <child>
+						<widget class="GtkImage" id="image2">
+						  <property name="visible">True</property>
+						  <property name="stock">gtk-properties</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="label47">
+						  <property name="visible">True</property>
+						  <property name="label" translatable="yes">_Edit</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>
+						</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>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="url_edit">
-			  <property name="visible">True</property>
-			  <property name="sensitive">False</property>
-			  <property name="can_default">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment6">
-			      <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="hbox23">
-				  <property name="visible">True</property>
-				  <property name="homogeneous">False</property>
-				  <property name="spacing">2</property>
 
 				  <child>
-				    <widget class="GtkImage" id="image2">
+				    <widget class="GtkButton" id="url_remove">
 				      <property name="visible">True</property>
-				      <property name="stock">gtk-properties</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>
+				      <property name="sensitive">False</property>
+				      <property name="can_default">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">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
 				  </child>
 
 				  <child>
-				    <widget class="GtkLabel" id="label47">
+				    <widget class="GtkButton" id="url_enable">
 				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">_Edit</property>
+				      <property name="can_default">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="label" translatable="yes">E_nable</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="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>
 				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkVButtonBox" id="vbuttonbox4">
+				  <property name="visible">True</property>
+				  <property name="layout_style">GTK_BUTTONBOX_START</property>
+				  <property name="spacing">3</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="label46">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes"></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>
+				</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">False</property>
+			      <property name="fill">False</property>
+			    </packing>
 			  </child>
 			</widget>
 		      </child>
+		    </widget>
+		  </child>
 
-		      <child>
-			<widget class="GtkButton" id="url_remove">
-			  <property name="visible">True</property>
-			  <property name="sensitive">False</property>
-			  <property name="can_default">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>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="url_enable">
-			  <property name="visible">True</property>
-			  <property name="can_default">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">E_nable</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			</widget>
-		      </child>
+		  <child>
+		    <widget class="GtkLabel" id="label60">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;Publishing Free/Busy Status&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>
 		    </widget>
 		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
+		      <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="frame1">
+		  <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="GtkVButtonBox" id="vbuttonbox4">
+		    <widget class="GtkAlignment" id="alignment7">
 		      <property name="visible">True</property>
-		      <property name="layout_style">GTK_BUTTONBOX_START</property>
-		      <property name="spacing">3</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">12</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox18">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox30">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">12</property>
+
+			      <child>
+				<widget class="GtkLabel" id="label61">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Template:</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>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkEntry" id="template_url">
+				  <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>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label62">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">&lt;i&gt;&amp;lt;USER&amp;gt; and &amp;lt;DOMAIN&amp;gt; will be replaced by the left and right hand sides of the '@' in the addressbook entry, respectively.&lt;/i&gt;</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">True</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">True</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.49</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>
+			</widget>
+		      </child>
 		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
 		  </child>
 
 		  <child>
-		    <widget class="GtkLabel" id="label46">
+		    <widget class="GtkLabel" id="label59">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes"></property>
+		      <property name="label" translatable="yes">&lt;b&gt;Default Free/Busy Server&lt;/b&gt;</property>
 		      <property name="use_underline">False</property>
-		      <property name="use_markup">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>
@@ -1770,16 +1956,14 @@
 		      <property name="ypad">0</property>
 		    </widget>
 		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
+		      <property name="type">label_item</property>
 		    </packing>
 		  </child>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
 		  <property name="expand">False</property>
-		  <property name="fill">False</property>
+		  <property name="fill">True</property>
 		</packing>
 	      </child>
 	    </widget>
Index: calendar/gui/dialogs/cal-prefs-dialog.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cal-prefs-dialog.h,v
retrieving revision 1.10
diff --unified -r1.10 cal-prefs-dialog.h
--- calendar/gui/dialogs/cal-prefs-dialog.h	13 Jan 2004 01:59:28 -0000	1.10
+++ calendar/gui/dialogs/cal-prefs-dialog.h	3 Nov 2004 03:26:31 -0000
@@ -83,7 +83,9 @@
 	gboolean url_editor;
 	GtkWidget* url_editor_dlg;
 	guint destroyed : 1;
-	
+
+	/* widgets for the Free/Busy template */
+	GtkWidget *template_url;
 		
 	/* Other page options */
 	GtkWidget *confirm_delete;


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