[evolution-patches] big setting patch



This hooks up the settings that were not hooked up and add the
appropriate schema entries.

--Larry
? .evolution-mail.schemas.swp
? gtkhtml-1.1.7-domain.patch
? mail-fonts.c
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2732
diff -u -p -r1.2732 ChangeLog
--- ChangeLog	20 May 2003 15:53:45 -0000	1.2732
+++ ChangeLog	20 May 2003 16:20:51 -0000
@@ -1,3 +1,19 @@
+2003-05-20  Larry Ewing  <lewing ximian com>
+
+	* mail-composer-prefs.c: remove references to gtkhtml property
+	manager.  Connect to missing settings.
+
+	* mail-preferences.c: remove references to gtkhtml property
+	manager.  Connect to missing settings.
+
+	* mail-config.glade: remove keybinding setting.
+
+	* mail-display.c (mail_display_destroy): remove notification.
+	(display_notify): set animate and redisplay.  We have to redisplay
+	because the citation color may have changed.
+
+	* evolution-mail.schemas: add composer and display gconf entries.
+	
 2003-05-19  Jeffrey Stedfast  <fejj ximian com>
 
 	* mail-account-gui.c (mail_account_gui_save): Only re-add the
Index: evolution-mail.schemas
===================================================================
RCS file: /cvs/gnome/evolution/mail/evolution-mail.schemas,v
retrieving revision 1.14
diff -u -p -r1.14 evolution-mail.schemas
--- evolution-mail.schemas	7 May 2003 23:40:43 -0000	1.14
+++ evolution-mail.schemas	20 May 2003 16:20:51 -0000
@@ -32,6 +32,48 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/evolution/mail/composer/magic_links</key>
+      <applyto>/apps/evolution/mail/composer/magic_links</applyto>
+      <owner>evolution-mail</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Automatic link recognition</short>
+         <long>
+	 Recognize links in text and replace them.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/mail/composer/magic_smileys</key>
+      <applyto>/apps/evolution/mail/composer/send_smileys</applyto>
+      <owner>evolution-mail</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Automatic smiley recognition</short>
+         <long>
+	 Recognize smileys in text and replace them with images.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/mail/composer/inline_spelling</key>
+      <applyto>/apps/evolution/mail/composer/inline_spelling</applyto>
+      <owner>evolution-mail</owner>
+      <type>bool</type>
+      <default>tru</default>
+      <locale name="C">
+         <short>Spell check inline</short>
+         <long>
+	 Draw spelling error indicators on words as you type.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/evolution/mail/composer/view/From</key>
       <applyto>/apps/evolution/mail/composer/view/From</applyto>
       <owner>evolution-mail</owner>
@@ -147,6 +189,20 @@
          </long>
       </locale>
     </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/mail/display/animate_images</key>
+      <applyto>/apps/evolution/mail/display/animate_images</applyto>
+      <owner>evolution-mail</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Show Animations</short>
+         <long>
+          Show animated images as animations.
+         </long>
+      </locale>
+    </schema>   
 
     <schema>
       <key>/schemas/apps/evolution/mail/display/mime_types</key>
Index: mail-composer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-composer-prefs.c,v
retrieving revision 1.62
diff -u -p -r1.62 mail-composer-prefs.c
--- mail-composer-prefs.c	8 May 2003 02:43:10 -0000	1.62
+++ mail-composer-prefs.c	20 May 2003 16:20:51 -0000
@@ -107,7 +107,6 @@ mail_composer_prefs_finalise (GObject *o
 	MailComposerPrefs *prefs = (MailComposerPrefs *) obj;
 	
 	g_object_unref (prefs->gui);
-	g_object_unref (prefs->pman);
 	g_object_unref (prefs->enabled_pixbuf);
 	gdk_pixmap_unref (prefs->mark_pixmap);
 	g_object_unref (prefs->mark_bitmap);
@@ -796,12 +795,6 @@ mail_composer_prefs_construct (MailCompo
 	gboolean bool;
 	int style;
 	char *buf;
-	char *names[][2] = {
-		{ "live_spell_check", "chkEnableSpellChecking" },
-		{ "magic_smileys_check", "chkAutoSmileys" },
-		{ "gtk_html_prop_keymap_option", "omenuShortcutsType" },
-		{ NULL, NULL }
-	};
 	
 	prefs->gconf = gconf_client_get_default ();
 	
@@ -826,10 +819,6 @@ mail_composer_prefs_construct (MailCompo
 	gtk_toggle_button_set_active (prefs->send_html, bool);
 	g_signal_connect (prefs->send_html, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
 	
-	prefs->auto_smileys = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkAutoSmileys"));
-	/* FIXME: set active? */
-	g_signal_connect (prefs->auto_smileys, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
-	
 	prefs->prompt_empty_subject = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptEmptySubject"));
 	bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/empty_subject", NULL);
 	gtk_toggle_button_set_active (prefs->prompt_empty_subject, bool);
@@ -840,6 +829,16 @@ mail_composer_prefs_construct (MailCompo
 	gtk_toggle_button_set_active (prefs->prompt_bcc_only, bool);
 	g_signal_connect (prefs->prompt_bcc_only, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
 	
+	prefs->auto_smileys = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkAutoSmileys"));
+	bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/composer/magic_smileys", NULL);
+	gtk_toggle_button_set_active (prefs->auto_smileys, bool);
+	g_signal_connect (prefs->auto_smileys, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
+
+	prefs->spell_check = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEnableSpellChecking"));
+	bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/composer/inline_spelling", NULL);
+	gtk_toggle_button_set_active (prefs->spell_check, bool);
+	g_signal_connect (prefs->spell_check, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
+
 	prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
 	buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/composer/charset", NULL);
 	menu = e_charset_picker_new (buf ? buf : e_iconv_locale_charset ());
@@ -847,17 +846,6 @@ mail_composer_prefs_construct (MailCompo
 	option_menu_connect (prefs->charset, prefs);
 	g_free (buf);
 	
-#warning "gtkhtml prop manager"
-#if 0	
-	/* Spell Checking: GtkHTML part */
-	prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (NULL));
-	g_signal_connect (prefs->pman, "changed", G_CALLBACK(toggle_button_toggled), prefs);
-	g_object_ref (prefs->pman);
-	
-	gtk_html_propmanager_set_names (prefs->pman, names);
-	gtk_html_propmanager_set_gui (prefs->pman, gui, NULL);
-#endif
-
 	/* Spell Checking: GNOME Spell part */
 	prefs->colour = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerSpellCheckColor"));
 	prefs->language = GTK_TREE_VIEW (glade_xml_get_widget (gui, "clistSpellCheckLanguage"));
@@ -985,6 +973,12 @@ mail_composer_prefs_apply (MailComposerP
 	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/only_bcc",
 			       gtk_toggle_button_get_active (prefs->prompt_bcc_only), NULL);
 	
+	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/composer/inline_spelling",
+			       gtk_toggle_button_get_active (prefs->spell_check), NULL);
+	
+	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/composer/magic_smileys",
+			       gtk_toggle_button_get_active (prefs->auto_smileys), NULL);
+	
 	menu = gtk_option_menu_get_menu (prefs->charset);
 	if (!(string = e_charset_picker_get_charset (menu)))
 		string = g_strdup (e_iconv_locale_charset ());
@@ -993,10 +987,6 @@ mail_composer_prefs_apply (MailComposerP
 	g_free (string);
 	
 	/* Spell Checking */
-#warning "gtkhtml propmanager"
-#if 0
-	gtk_html_propmanager_apply (prefs->pman);
-#endif
 	spell_apply (prefs);
 	
 	/* Forwards and Replies */
Index: mail-composer-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-composer-prefs.h,v
retrieving revision 1.17
diff -u -p -r1.17 mail-composer-prefs.h
--- mail-composer-prefs.h	7 Mar 2003 20:54:54 -0000	1.17
+++ mail-composer-prefs.h	20 May 2003 16:20:51 -0000
@@ -32,9 +32,6 @@ extern "C" {
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 #include <gtkhtml/gtkhtml.h>
-#warning "re-add gtkhtml prop manager"
-/* this isn't ported in gtkhtml yet */
-/*#include <gtkhtml/gtkhtml-propmanager.h>*/
 
 #include <libgnomeui/gnome-color-picker.h>
 #include <libgnomeui/gnome-file-entry.h>
@@ -74,8 +71,6 @@ struct _MailComposerPrefs {
 	GtkToggleButton *prompt_bcc_only;
 	GtkOptionMenu *charset;
 	
-	/* Spell Checking */
-	struct _GtkHTMLPropmanager *pman;
 	GtkToggleButton *spell_check;
 	GnomeColorPicker *colour;
 	GtkTreeView *language;
Index: mail-config.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.glade,v
retrieving revision 1.118
diff -u -p -r1.118 mail-config.glade
--- mail-config.glade	28 Apr 2003 16:00:45 -0000	1.118
+++ mail-config.glade	20 May 2003 16:20:52 -0000
@@ -4302,84 +4302,6 @@ For example: &quot;Work&quot; or &quot;P
 	  <property name="spacing">3</property>
 
 	  <child>
-	    <widget class="GtkHBox" id="hboxShortcutsType">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">6</property>
-
-	      <child>
-		<widget class="GtkLabel" id="lblShortcutsType">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Shortcuts _type:</property>
-		  <property name="use_underline">True</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_CENTER</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="mnemonic_widget">omenuShortcutsType</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkOptionMenu" id="omenuShortcutsType">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="history">0</property>
-
-		  <child internal-child="menu">
-		    <widget class="GtkMenu" id="convertwidget29">
-		      <property name="visible">True</property>
-
-		      <child>
-			<widget class="GtkMenuItem" id="convertwidget30">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Emacs</property>
-			  <property name="use_underline">True</property>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="convertwidget31">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">XEmacs</property>
-			  <property name="use_underline">True</property>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="convertwidget32">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Microsoft</property>
-			  <property name="use_underline">True</property>
-			</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="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
 	    <widget class="GtkFrame" id="frameBehavior">
 	      <property name="visible">True</property>
 	      <property name="label_xalign">0</property>
Index: mail-display.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-display.c,v
retrieving revision 1.278
diff -u -p -r1.278 mail-display.c
--- mail-display.c	19 May 2003 15:12:12 -0000	1.278
+++ mail-display.c	20 May 2003 16:20:52 -0000
@@ -100,6 +100,8 @@ struct _MailDisplayPrivate {
 	struct _mail_msg *fetch_msg ;
 	GIOChannel *fetch_cancel_channel;
 	guint fetch_cancel_watch;
+
+	guint display_notify_id;
 };
 
 /* max number of connections to download images */
@@ -1812,7 +1814,7 @@ mail_display_render (MailDisplay *md, Gt
 	const char *flag, *completed;
 	GtkHTMLStream *html_stream;
 	MailDisplayStream *stream;
-	
+
 	g_return_if_fail (IS_MAIL_DISPLAY (md));
 	g_return_if_fail (GTK_IS_HTML (html));
 	
@@ -1826,7 +1828,7 @@ mail_display_render (MailDisplay *md, Gt
 		/* This is a hack until there's a clean way to do this. */
 		GTK_HTML (md->html)->engine->newPage = FALSE;
 	}
-	
+
 	gtk_html_stream_write (html_stream, HTML_HEADER, sizeof (HTML_HEADER) - 1);
 	
 	if (md->current_message && md->display_style == MAIL_CONFIG_DISPLAY_SOURCE)
@@ -2112,6 +2114,13 @@ mail_display_destroy (GtkObject *object)
 		mail_display->invisible = NULL;
 	}
 	
+	if (mail_display->priv && mail_display->priv->display_notify_id) {
+		GConfClient *gconf = gconf_client_get_default ();
+		gconf_client_notify_remove (gconf, mail_display->priv->display_notify_id);
+		mail_display->priv->display_notify_id = 0;
+		g_object_unref (gconf);
+	}
+	
 	g_free (mail_display->priv);
 	mail_display->priv = NULL;
 	
@@ -2639,6 +2648,17 @@ html_on_url (GtkHTML *html, const char *
 	}
 }
 
+/* If if a gconf setting for the mail display has changed redisplay to pick up the changes */
+static void
+display_notify (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointer data)
+{
+	MailDisplay *md = data;
+	
+	/* this should really check which setting has changed but it is late */
+	gtk_html_set_animate (md->html, gconf_client_get_bool (gconf, "/apps/evolution/mail/display/animate_images", NULL));
+	mail_display_queue_redisplay ((MailDisplay *)data);
+}
+
 GtkWidget *
 mail_display_new (void)
 {
@@ -2646,7 +2666,8 @@ mail_display_new (void)
 	GtkWidget *scroll, *html;
 	GdkAtom clipboard_atom;
 	HTMLTokenizer *tok;
-	
+	GConfClient *gconf;
+
 	gtk_box_set_homogeneous (GTK_BOX (mail_display), FALSE);
 	gtk_widget_show (GTK_WIDGET (mail_display));
 	
@@ -2679,6 +2700,14 @@ mail_display_new (void)
 		gtk_selection_add_target (mail_display->invisible,
 					  clipboard_atom, GDK_SELECTION_TYPE_STRING, 1);
 	
+	gconf = gconf_client_get_default ();
+	gtk_html_set_animate (GTK_HTML (html), gconf_client_get_bool (gconf, "/apps/evolution/mail/display/animate_images", NULL));
+
+	gconf_client_add_dir (gconf, "/apps/evolution/mail/display",GCONF_CLIENT_PRELOAD_NONE, NULL);
+	mail_display->priv->display_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display",
+									 display_notify, mail_display, NULL, NULL);
+	g_object_unref (gconf);
+
 	mail_display->scroll = GTK_SCROLLED_WINDOW (scroll);
 	mail_display->html = GTK_HTML (html);
 	g_object_ref (mail_display->html);
Index: mail-preferences.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-preferences.c,v
retrieving revision 1.30
diff -u -p -r1.30 mail-preferences.c
--- mail-preferences.c	9 Apr 2003 09:52:32 -0000	1.30
+++ mail-preferences.c	20 May 2003 16:20:52 -0000
@@ -90,7 +90,6 @@ mail_preferences_finalise (GObject *obj)
 	MailPreferences *prefs = (MailPreferences *) obj;
 	
 	g_object_unref (prefs->gui);
-	g_object_unref (prefs->pman);
 	g_object_unref (prefs->gconf);
 	
         ((GObjectClass *)(parent_class))->finalize (obj);
@@ -311,6 +310,7 @@ mail_preferences_construct (MailPreferen
 	/* HTML Mail tab */
 	
 	/* Loading Images */
+
 	val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", NULL);
 	prefs->images_never = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesNever"));
 	gtk_toggle_button_set_active (prefs->images_never, val == MAIL_CONFIG_HTTP_NEVER);
@@ -324,6 +324,11 @@ mail_preferences_construct (MailPreferen
 	gtk_toggle_button_set_active (prefs->images_always, val == MAIL_CONFIG_HTTP_ALWAYS);
 	g_signal_connect (prefs->images_always, "toggled", G_CALLBACK (settings_changed), prefs);
 	
+	prefs->show_animated = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkShowAnimatedImages"));
+	bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/display/animate_images", NULL);
+	gtk_toggle_button_set_active (prefs->show_animated, bool);
+	g_signal_connect (prefs->show_animated, "toggled", G_CALLBACK (settings_changed), prefs);
+
 	prefs->prompt_unwanted_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptWantHTML"));
 	bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/unwanted_html", NULL);
 	gtk_toggle_button_set_active (prefs->prompt_unwanted_html, bool);
@@ -436,19 +441,18 @@ mail_preferences_apply (MailPreferences 
 	
 	gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", val, NULL);
 	
-#warning "gtkhtml propmanager"
-#if 0	
-	gtk_html_propmanager_apply (prefs->pman);
-#endif
 	gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/fonts/variable",
 				 gnome_font_picker_get_font_name (prefs->font_variable), NULL);
 	gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace",
 				 gnome_font_picker_get_font_name (prefs->font_fixed), NULL);
 	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/fonts/use_custom",
 			       !gtk_toggle_button_get_active (prefs->font_share), NULL);
+	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/animate_images",
+			       gtk_toggle_button_get_active (prefs->show_animated), NULL);
 
 	gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/unwanted_html",
 			       gtk_toggle_button_get_active (prefs->prompt_unwanted_html), NULL);
+	
 	
 	/* Labels and Colours */
 	list = NULL;
Index: mail-preferences.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-preferences.h,v
retrieving revision 1.10
diff -u -p -r1.10 mail-preferences.h
--- mail-preferences.h	9 Apr 2003 09:52:32 -0000	1.10
+++ mail-preferences.h	20 May 2003 16:20:52 -0000
@@ -36,9 +36,6 @@ extern "C" {
 #include <libgnomeui/gnome-color-picker.h>
 #include <libgnomeui/gnome-font-picker.h>
 
-#warning "gtkhtml-propmanger"
-/*#include <gtkhtml/gtkhtml-propmanager.h>*/
-
 #include "evolution-config-control.h"
 
 #include <shell/Evolution.h>
@@ -95,9 +92,6 @@ struct _MailPreferences {
 	GtkToggleButton *autodetect_links;
 	GtkToggleButton *prompt_unwanted_html;
 
-	/* GtkHTML Properties */
-	struct _GtkHTMLPropmanager *pman;
-	
 	/* Labels and Colours tab */
 	struct {
 		GtkEntry *name;


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