Re: [evolution-patches] add remote uri page to task list setup assistant



William Jon McCann wrote:
Hi,

This patch should add a remote uri page to the task list setup assistant.

This is a shameless cut-n-paste from the calendar setup stuff.

Please let me know if this looks ok.

Missed copying two things.  Updated patch attached.

Also removed separators from editor dialog while I was there.

Thanks,
Jon
? ChangeLog.new2
? gui/dialogs/calendar-setup.gladep
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2226
diff -p -u -r1.2226 ChangeLog
--- ChangeLog	30 Mar 2004 04:07:57 -0000	1.2226
+++ ChangeLog	30 Mar 2004 04:40:03 -0000
@@ -1,5 +1,11 @@
 2004-03-29  William Jon McCann  <mccann jhu edu>
 
+	* gui/dialogs/calendar-setup.glade:
+	* gui/dialogs/calendar-setup.c (new_task_list_finish)
+	(calendar_setup_new_task_list, calendar_setup_edit_task_list):
+	add remote calendar setup page to task list setup assistant.
+	Remove separators from dialog.
+
 	* gui/tasks-component.c (delete_task_list_cb): 
 	* gui/calendar-component.c (delete_calendar_cb):
 	don't require client to be loaded in order to remove the source
Index: gui/dialogs/calendar-setup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.c,v
retrieving revision 1.8
diff -p -u -r1.8 calendar-setup.c
--- gui/dialogs/calendar-setup.c	30 Jan 2004 15:57:47 -0000	1.8
+++ gui/dialogs/calendar-setup.c	30 Mar 2004 04:40:06 -0000
@@ -649,7 +649,8 @@ new_task_list_finish (SourceDialog *sour
 {
 	source_dialog->source =
 		create_new_source_with_group (GTK_WINDOW (source_dialog->window), source_dialog->source_group, 
-					      gtk_entry_get_text (GTK_ENTRY (source_dialog->name_entry)), NULL,
+					      gtk_entry_get_text (GTK_ENTRY (source_dialog->name_entry)),
+					      gtk_entry_get_text (GTK_ENTRY (source_dialog->uri_entry)),
 					      E_CAL_SOURCE_TYPE_TODO);
 	dialog_to_source (source_dialog);
 
@@ -685,6 +686,8 @@ calendar_setup_new_task_list (GtkWindow 
 				  G_CALLBACK (general_page_modified), source_dialog);
 	g_signal_connect_after (page, "prepare",
 				G_CALLBACK (general_page_prepare), source_dialog);
+	g_signal_connect_after (page, "next",
+				G_CALLBACK (general_page_forward), source_dialog);
 
 	source_dialog->source_list = e_source_list_new_for_gconf_default ("/apps/evolution/tasks/sources");
 	source_dialog->group_optionmenu =
@@ -704,6 +707,17 @@ calendar_setup_new_task_list (GtkWindow 
 	g_signal_connect_swapped (source_dialog->group_optionmenu, "changed",
 				  G_CALLBACK (source_group_changed), source_dialog);
 
+	/* Remote page */
+	page = glade_xml_get_widget (source_dialog->gui_xml, "remote-page");
+	source_dialog->uri_entry = glade_xml_get_widget (source_dialog->gui_xml, "uri-entry");
+	source_dialog->refresh_spin = glade_xml_get_widget (source_dialog->gui_xml, "refresh-spin");
+	g_signal_connect_swapped (source_dialog->uri_entry, "changed",
+				  G_CALLBACK (remote_page_modified), source_dialog);
+	g_signal_connect_swapped (source_dialog->refresh_spin, "changed",
+				  G_CALLBACK (remote_page_modified), source_dialog);
+	g_signal_connect_after (page, "prepare",
+				G_CALLBACK (remote_page_prepare), source_dialog);
+
 	/* Finish page */
 	page = glade_xml_get_widget (source_dialog->gui_xml, "finish-page");
 	g_signal_connect_swapped (page, "finish",
@@ -763,6 +777,14 @@ calendar_setup_edit_task_list (GtkWindow
 	g_signal_connect_swapped (source_dialog->name_entry, "activate",
 				  G_CALLBACK (edit_calendar_finish), source_dialog);
 
+	/* Remote page */
+	source_dialog->uri_entry = glade_xml_get_widget (source_dialog->gui_xml, "uri-entry");
+	source_dialog->refresh_spin = glade_xml_get_widget (source_dialog->gui_xml, "refresh-spin");
+	g_signal_connect_swapped (source_dialog->uri_entry, "changed",
+				  G_CALLBACK (remote_page_modified), source_dialog);
+	g_signal_connect_swapped (source_dialog->refresh_spin, "changed",
+				  G_CALLBACK (remote_page_modified), source_dialog);
+
 	/* Finishing */
 	g_signal_connect_swapped (glade_xml_get_widget (source_dialog->gui_xml, "ok-button"), "clicked",
 				  G_CALLBACK (edit_task_list_finish), source_dialog);
@@ -779,5 +801,8 @@ calendar_setup_edit_task_list (GtkWindow
 
 	gtk_widget_show_all (source_dialog->window);
 
+	if (!source_is_remote (source_dialog->source))
+		gtk_widget_hide (glade_xml_get_widget (source_dialog->gui_xml, "remote-page"));
+
 	return TRUE;
 }
Index: gui/dialogs/calendar-setup.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.glade,v
retrieving revision 1.3
diff -p -u -r1.3 calendar-setup.glade
--- gui/dialogs/calendar-setup.glade	6 Feb 2004 12:55:05 -0000	1.3
+++ gui/dialogs/calendar-setup.glade	30 Mar 2004 04:40:10 -0000
@@ -321,17 +321,6 @@
       </child>
 
       <child>
-	<widget class="GtkHSeparator" id="hseparator10">
-	  <property name="visible">True</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="hbox120">
 	  <property name="visible">True</property>
 	  <property name="homogeneous">False</property>
@@ -1209,6 +1198,227 @@ searches, and for creating and editing c
       </child>
 
       <child>
+	<widget class="GnomeDruidPageStandard" id="remote-page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Step 2: Remote Folder Parameters</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox10">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox74">
+		  <property name="border_width">16</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox75">
+		      <property name="border_width">6</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">6</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label560">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">You're creating a folder in a group that's stored in a remote location. This requires you
+to specify additional parameters.</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">7.45058e-09</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">3</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="GtkHSeparator" id="hseparator12">
+			  <property name="visible">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkTable" id="table37">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="n_rows">2</property>
+			  <property name="n_columns">2</property>
+			  <property name="homogeneous">False</property>
+			  <property name="row_spacing">6</property>
+			  <property name="column_spacing">3</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="uri-entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="has_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" translatable="yes">*</property>
+			      <property name="activates_default">False</property>
+			    </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="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label561">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">_Source 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</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			      <property name="mnemonic_widget">uri-entry</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="label567">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">_Refresh Interval:</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</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">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="GtkHBox" id="hbox122">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">4</property>
+
+			      <child>
+				<widget class="GtkSpinButton" id="refresh-spin">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="climb_rate">1</property>
+				  <property name="digits">0</property>
+				  <property name="numeric">False</property>
+				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				  <property name="snap_to_ticks">False</property>
+				  <property name="wrap">False</property>
+				  <property name="adjustment">30 1 9999 1 10 10</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label568">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">minute(s)</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>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+			    </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">fill</property>
+			    </packing>
+			  </child>
+			</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>
+		<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="GnomeDruidPageEdge" id="finish-page">
 	  <property name="visible">True</property>
 	  <property name="position">GNOME_EDGE_FINISH</property>
@@ -1254,7 +1464,7 @@ Please click the &quot;Apply&quot; butto
 	  <property name="enable_popup">False</property>
 
 	  <child>
-	    <widget class="GtkVBox" id="vbox85">
+	    <widget class="GtkVBox" id="general-page">
 	      <property name="border_width">6</property>
 	      <property name="visible">True</property>
 	      <property name="homogeneous">False</property>
@@ -1369,17 +1579,167 @@ Please click the &quot;Apply&quot; butto
 	      <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>
 
-      <child>
-	<widget class="GtkHSeparator" id="hseparator15">
-	  <property name="visible">True</property>
+	  <child>
+	    <widget class="GtkTable" id="remote-page">
+	      <property name="border_width">6</property>
+	      <property name="visible">True</property>
+	      <property name="n_rows">2</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">4</property>
+	      <property name="column_spacing">4</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label588">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_Source 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</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="mnemonic_widget">uri-entry</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="GtkEntry" id="uri-entry">
+		  <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" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</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="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label589">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_Refresh Interval:</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</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">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="GtkHBox" id="hbox126">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">4</property>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="refresh-spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">30 1 9999 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label590">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">minute(s)</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="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">fill</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label587">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Remote</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="type">tab</property>
+	    </packing>
+	  </child>
 	</widget>
 	<packing>
 	  <property name="padding">0</property>


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