[evolution-patches] allow changing color of readonly sources



Hi,

This patch should enable the user to change the color of readonly sources (like those in contacts://).

Patches for e-d-s and evo.

Does this look ok?

Thanks,
Jon
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.139
diff -p -u -r1.139 ChangeLog
--- ChangeLog	12 Jul 2004 18:16:04 -0000	1.139
+++ ChangeLog	14 Jul 2004 16:55:06 -0000
@@ -1,3 +1,8 @@
+2004-07-14  William Jon McCann  <mccann jhu edu>
+
+	* libedataserver/e-source.c (e_source_set_color): Allow 
+	setting the source color on readonly sources.
+
 2004-07-12  Chris Toshok  <toshok ximian com>
 
 	[ most likely fixes #57999 ]
Index: libedataserver/e-source.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-source.c,v
retrieving revision 1.16
diff -p -u -r1.16 e-source.c
--- libedataserver/e-source.c	9 Jul 2004 16:12:35 -0000	1.16
+++ libedataserver/e-source.c	14 Jul 2004 16:55:06 -0000
@@ -524,9 +524,6 @@ e_source_set_color (ESource *source,
 {
 	g_return_if_fail (E_IS_SOURCE (source));
 
-	if (source->priv->readonly)
-		return;
-	
 	if (source->priv->has_color && source->priv->color == color)
 		return;
 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2445
diff -p -u -r1.2445 ChangeLog
--- ChangeLog	14 Jul 2004 02:20:55 -0000	1.2445
+++ ChangeLog	14 Jul 2004 16:59:26 -0000
@@ -1,3 +1,9 @@
+2004-07-14  William Jon McCann  <mccann jhu edu>
+
+	* gui/dialogs/calendar-setup.glade: 
+	* gui/dialogs/calendar-setup.c (general_update_dialog):
+	Always allow the source color to be changed.
+
 2004-07-12  JP Rosevear  <jpr novell com>
  
  	Fixes #57287, 58748
Index: gui/dialogs/calendar-setup.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.glade,v
retrieving revision 1.12
diff -p -u -r1.12 calendar-setup.glade
--- gui/dialogs/calendar-setup.glade	23 Jun 2004 03:42:05 -0000	1.12
+++ gui/dialogs/calendar-setup.glade	14 Jul 2004 16:59:26 -0000
@@ -207,7 +207,7 @@
 	  </child>
 
 	  <child>
-	    <widget class="GtkLabel" id="label35">
+	    <widget class="GtkLabel" id="source-color-label">
 	      <property name="visible">True</property>
 	      <property name="label" translatable="yes">C_olor:</property>
 	      <property name="use_underline">True</property>
@@ -562,7 +562,7 @@
 	  </child>
 
 	  <child>
-	    <widget class="GtkLabel" id="label593">
+	    <widget class="GtkLabel" id="source-color-label">
 	      <property name="visible">True</property>
 	      <property name="label" translatable="yes">C_olor:</property>
 	      <property name="use_underline">True</property>
@@ -662,7 +662,7 @@
 	  </child>
 
 	  <child>
-	    <widget class="GtkLabel" id="label594">
+	    <widget class="GtkLabel" id="group-label">
 	      <property name="visible">True</property>
 	      <property name="label" translatable="yes">_Type:</property>
 	      <property name="use_underline">True</property>
@@ -687,7 +687,7 @@
 	  </child>
 
 	  <child>
-	    <widget class="GtkLabel" id="label595">
+	    <widget class="GtkLabel" id="name-label">
 	      <property name="visible">True</property>
 	      <property name="label" translatable="yes">_Name:</property>
 	      <property name="use_underline">True</property>
Index: gui/dialogs/calendar-setup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/calendar-setup.c,v
retrieving revision 1.27
diff -p -u -r1.27 calendar-setup.c
--- gui/dialogs/calendar-setup.c	2 Jun 2004 03:53:44 -0000	1.27
+++ gui/dialogs/calendar-setup.c	14 Jul 2004 16:59:26 -0000
@@ -371,8 +371,21 @@ general_update_dialog (SourceDialog *sou
 	gboolean remote = FALSE;
 	gboolean mutable = source_group_is_mutable (source_dialog->source_group);
 
-	if (e_source_get_readonly (source_dialog->source))
-		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "settings-table"), FALSE);
+	if (e_source_get_readonly (source_dialog->source)) {
+		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "group-label"), FALSE);
+		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "group-optionmenu"), FALSE);
+		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "name-label"), FALSE);
+		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "name-entry"), FALSE);
+
+		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "uri-label"), FALSE);
+
+		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "uri-entry"), FALSE);
+		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "refresh-label"), FALSE);
+		gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "refresh-hbox"), FALSE);
+
+                gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "source-color"), TRUE);
+                gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "source-color-label"), TRUE);
+        }
 
 	/* These are calendar specific so make sure we have them */
 	if (source_dialog->uri_entry)


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