diff options
author | Larry Ewing <lewing@ximian.com> | 2002-04-29 15:05:51 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2002-04-29 15:05:51 +0800 |
commit | c9dcabffdbe3fdb2102855660e285b7dc89e095e (patch) | |
tree | 9010b4c6010ecbc28e1bf0cef1bb5e2f7e748c52 /mail | |
parent | fa6c55ae45e80f123ff36096fa629c7bc9992f6b (diff) | |
download | gsoc2013-evolution-c9dcabffdbe3fdb2102855660e285b7dc89e095e.tar gsoc2013-evolution-c9dcabffdbe3fdb2102855660e285b7dc89e095e.tar.gz gsoc2013-evolution-c9dcabffdbe3fdb2102855660e285b7dc89e095e.tar.bz2 gsoc2013-evolution-c9dcabffdbe3fdb2102855660e285b7dc89e095e.tar.lz gsoc2013-evolution-c9dcabffdbe3fdb2102855660e285b7dc89e095e.tar.xz gsoc2013-evolution-c9dcabffdbe3fdb2102855660e285b7dc89e095e.tar.zst gsoc2013-evolution-c9dcabffdbe3fdb2102855660e285b7dc89e095e.zip |
handle requests for the font manager control.
2002-04-29 Larry Ewing <lewing@ximian.com>
* mail-config-factory.c (config_control_factory_cb): handle
requests for the font manager control.
* mail-config.glade: add fonts tabs and reorder composer options
to match the new dialogs from anna.
* GNOME_Evolution_Mail.oaf.in: add font manager control definition.
* mail-composer-prefs.c (mail_composer_prefs_construct): hook to
the gtkhtml propmanager.
(mail_composer_prefs_apply): apply propmanager changes.
(mail_composer_prefs_finalise): unref the propmanager.
* mail-composer-prefs.h: add propmanager member.
* mail-font-prefs.c: initialize gui properly.
* mail-preferences.c (mail_preferences_construct): hook to
gtkhtml's propmanager.
(mail_preferences_apply): apply propmanager changes.
(mail_preferences_finalise): unref the propmanager.
* mail-preferences.h: add propmanager member.
* Makefile.am (evolution_mail_SOURCES): add mail-font-prefs.[ch]
to the build.
svn path=/trunk/; revision=16627
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 27 | ||||
-rw-r--r-- | mail/GNOME_Evolution_Mail.oaf.in | 25 | ||||
-rw-r--r-- | mail/Makefile.am | 2 | ||||
-rw-r--r-- | mail/mail-composer-prefs.c | 27 | ||||
-rw-r--r-- | mail/mail-composer-prefs.h | 2 | ||||
-rw-r--r-- | mail/mail-config-factory.c | 8 | ||||
-rw-r--r-- | mail/mail-config.glade | 980 | ||||
-rw-r--r-- | mail/mail-font-prefs.c | 4 | ||||
-rw-r--r-- | mail/mail-preferences.c | 38 | ||||
-rw-r--r-- | mail/mail-preferences.h | 5 |
10 files changed, 688 insertions, 430 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 6f8565b8fc..6407eee8c0 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,32 @@ 2002-04-29 Larry Ewing <lewing@ximian.com> + * mail-config-factory.c (config_control_factory_cb): handle + requests for the font manager control. + + * mail-config.glade: add fonts tabs and reorder composer options + to match the new dialogs from anna. + + * GNOME_Evolution_Mail.oaf.in: add font manager control definition. + + * mail-composer-prefs.c (mail_composer_prefs_construct): hook to + the gtkhtml propmanager. + (mail_composer_prefs_apply): apply propmanager changes. + (mail_composer_prefs_finalise): unref the propmanager. + + * mail-composer-prefs.h: add propmanager member. + + * mail-font-prefs.c: initialize gui properly. + + * mail-preferences.c (mail_preferences_construct): hook to + gtkhtml's propmanager. + (mail_preferences_apply): apply propmanager changes. + (mail_preferences_finalise): unref the propmanager. + + * mail-preferences.h: add propmanager member. + + * Makefile.am (evolution_mail_SOURCES): add mail-font-prefs.[ch] + to the build. + * mail-tools.c (mail_tool_quote_message): use the html reply logic even for plain parts so that we can test out the new gtkhtml cite logic. diff --git a/mail/GNOME_Evolution_Mail.oaf.in b/mail/GNOME_Evolution_Mail.oaf.in index a643c22a64..8b3921d085 100644 --- a/mail/GNOME_Evolution_Mail.oaf.in +++ b/mail/GNOME_Evolution_Mail.oaf.in @@ -251,6 +251,31 @@ </oaf_server> + <!-- Font Preferences --> + <oaf_server iid="OAFIID:GNOME_Evolution_Mail_FontPrefs_ConfigControl" + type="factory" + location="OAFIID:GNOME_Evolution_Mail_ConfigControlFactory"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:GNOME/Evolution/ConfigControl:1.0"/> + </oaf_attribute> + + <oaf_attribute name="evolution:config_item:title" type="string" + _value="Font Preferences"/> + + <oaf_attribute name="evolution:config_item:description" type="string" + _value="This Page can be used to configure the Fonts"/> + + <oaf_attribute name="evolution:config_item:icon_name" type="string" + value="font.png"/> + + <oaf_attribute name="evolution:config_item:priority" type="string" value="-6"/> + + <oaf_attribute name="description" type="string" + _value="Configuration control for the Evolution Display Fonts."/> + + </oaf_server> + <!-- Composer Preferences --> <oaf_server iid="OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl" type="factory" diff --git a/mail/Makefile.am b/mail/Makefile.am index cae54ffe67..dba25abaf8 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -69,6 +69,8 @@ evolution_mail_SOURCES = \ mail-callbacks.h \ mail-composer-prefs.c \ mail-composer-prefs.h \ + mail-font-prefs.c \ + mail-font-prefs.h \ mail-config.c \ mail-config.h \ mail-config-druid.c \ diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c index c114999bf4..44bd0a08c8 100644 --- a/mail/mail-composer-prefs.c +++ b/mail/mail-composer-prefs.c @@ -94,7 +94,8 @@ mail_composer_prefs_finalise (GtkObject *obj) MailComposerPrefs *prefs = (MailComposerPrefs *) obj; gtk_object_unref (GTK_OBJECT (prefs->gui)); - + gtk_object_unref (GTK_OBJECT (prefs->pman)); + ((GtkObjectClass *)(parent_class))->finalize (obj); } @@ -104,13 +105,18 @@ mail_composer_prefs_destroy (GtkObject *obj) MailComposerPrefs *prefs = (MailComposerPrefs *) obj; mail_config_signature_unregister_client ((MailConfigSignatureClient) sig_event_client, prefs); + + if (GTK_OBJECT_CLASS (parent_class)) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (obj); } +#if 0 static void colorpicker_set_color (GnomeColorPicker *color, guint32 rgb) { gnome_color_picker_set_i8 (color, (rgb & 0xff0000) >> 16, (rgb & 0xff00) >> 8, rgb & 0xff, 0xff); } +#endif static guint32 colorpicker_get_color (GnomeColorPicker *color) @@ -549,10 +555,24 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) /* Spell Checking */ /* FIXME: do stuff with these */ - prefs->spell_check = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEnableSpellChecking")); + { + char *names[][2] = {{"live_spell_check", "chkEnableSpellChecking"}, + {"gtk_html_prop_keymap_option", "omenuShortcutsType"}, + {NULL, NULL}}; + + prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (NULL)); + gtk_object_ref (GTK_OBJECT (prefs->pman)); + gtk_object_sink (GTK_OBJECT (prefs->pman)); + + gtk_html_propmanager_set_names (prefs->pman, names); + gtk_html_propmanager_set_gui (prefs->pman, gui, NULL); + gtk_signal_connect (GTK_OBJECT (prefs->pman), "changed", toggle_button_toggled, prefs); + } + /* prefs->colour = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerSpellCheckColor")); prefs->language = GTK_COMBO (glade_xml_get_widget (gui, "cmboSpellCheckLanguage")); - + */ + /* Forwards and Replies */ prefs->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle")); gtk_option_menu_set_history (prefs->forward_style, mail_config_get_default_forward_style ()); @@ -667,6 +687,7 @@ mail_composer_prefs_apply (MailComposerPrefs *prefs) /* Spell Checking */ /* FIXME: implement me */ + gtk_html_propmanager_apply (prefs->pman); /* Forwards and Replies */ menu = gtk_option_menu_get_menu (prefs->forward_style); diff --git a/mail/mail-composer-prefs.h b/mail/mail-composer-prefs.h index 41867dd61c..89ccd0552a 100644 --- a/mail/mail-composer-prefs.h +++ b/mail/mail-composer-prefs.h @@ -35,6 +35,7 @@ extern "C" { #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-file-entry.h> #include <gtkhtml/gtkhtml.h> +#include <gtkhtml/gtkhtml-propmanager.h> #include "mail-signature-editor.h" @@ -67,6 +68,7 @@ struct _MailComposerPrefs { GtkOptionMenu *charset; /* Spell Checking */ + GtkHTMLPropmanager *pman; GtkToggleButton *spell_check; GnomeColorPicker *colour; GtkCombo *language; diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c index 2e825b8b5a..f7ce73fd38 100644 --- a/mail/mail-config-factory.c +++ b/mail/mail-config-factory.c @@ -28,6 +28,7 @@ #include "mail-accounts.h" #include "mail-preferences.h" #include "mail-composer-prefs.h" +#include "mail-font-prefs.h" #include "mail-config-factory.h" @@ -51,6 +52,7 @@ config_control_destroy_callback (EvolutionConfigControl *config_control, void *u struct _config_data *data = user_data; gtk_widget_unref (data->prefs); + g_free (data); } @@ -62,7 +64,6 @@ config_control_apply_callback (EvolutionConfigControl *config_control, void *use data->apply (data->prefs); } - static BonoboObject * config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data) { @@ -82,6 +83,9 @@ config_control_factory_cb (BonoboGenericFactory *factory, const char *component_ } else if (!strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID)) { prefs = mail_composer_prefs_new (); data->apply = (ApplyFunc) mail_composer_prefs_apply; + } else if (!strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID)) { + prefs = mail_font_prefs_new (); + data->apply = (ApplyFunc) mail_font_prefs_apply; } else { g_assert_not_reached (); } @@ -99,6 +103,8 @@ config_control_factory_cb (BonoboGenericFactory *factory, const char *component_ MAIL_PREFERENCES (prefs)->control = control; } else if (!strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID)) { MAIL_COMPOSER_PREFS (prefs)->control = control; + } else if (!strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID)) { + MAIL_FONT_PREFS (prefs)->control = control; } else { g_assert_not_reached (); } diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 1dbf9dc8e7..db72ae28b9 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -3841,6 +3841,53 @@ Baltic (ISO-8859-4) <spacing>3</spacing> <widget> + <class>GtkHBox</class> + <name>hboxShortcutsType</name> + <border_width>3</border_width> + <homogeneous>False</homogeneous> + <spacing>3</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>lblShortcutsType</name> + <label>Shortcuts _type:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <default_focus_target>omenuShortcutsType</default_focus_target> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkOptionMenu</class> + <name>omenuShortcutsType</name> + <can_focus>True</can_focus> + <items>Emacs +XEmacs +Microsoft +</items> + <initial_choice>0</initial_choice> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> <class>GtkFrame</class> <name>frameBehavior</name> <label>Default Behavior</label> @@ -3860,24 +3907,212 @@ Baltic (ISO-8859-4) <spacing>3</spacing> <widget> - <class>GtkCheckButton</class> - <name>chkSendHTML</name> - <can_focus>True</can_focus> - <label>S_end messages in HTML format by default</label> - <active>False</active> - <draw_indicator>True</draw_indicator> + <class>GtkTable</class> + <name>tableForwardsReplies</name> + <border_width>3</border_width> + <rows>3</rows> + <columns>2</columns> + <homogeneous>False</homogeneous> + <row_spacing>3</row_spacing> + <column_spacing>3</column_spacing> <child> <padding>0</padding> <expand>False</expand> <fill>False</fill> </child> + + <widget> + <class>GtkLabel</class> + <name>lblForwardStyle</name> + <label>_Forward style:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>lblReplyStyle</name> + <label>_Reply style:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkAlignment</class> + <name>alignment25</name> + <xalign>7.45058e-09</xalign> + <yalign>0.5</yalign> + <xscale>0</xscale> + <yscale>1</yscale> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + + <widget> + <class>GtkHBox</class> + <name>hboxReplyStyle</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + + <widget> + <class>GtkOptionMenu</class> + <name>omenuReplyStyle</name> + <can_focus>True</can_focus> + <items>Quote original message +Do not quote original message +Attach original message +</items> + <initial_choice>0</initial_choice> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>GtkHBox</class> + <name>hboxForwardStyle</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>True</yfill> + </child> + + <widget> + <class>GtkOptionMenu</class> + <name>omenuForwardStyle</name> + <can_focus>True</can_focus> + <items>Attachment +Inline +Quoted +</items> + <initial_choice>0</initial_choice> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + </widget> + + <widget> + <class>GtkLabel</class> + <name>lblCharset</name> + <label>C_haracter set:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <default_focus_target>omenuCharset</default_focus_target> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkOptionMenu</class> + <name>omenuCharset</name> + <can_focus>True</can_focus> + <items>Baltic (ISO-8859-13) +Baltic (ISO-8859-4) +</items> + <initial_choice>0</initial_choice> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> </widget> <widget> <class>GtkCheckButton</class> - <name>chkPromptEmptySubject</name> + <name>chkSendHTML</name> <can_focus>True</can_focus> - <label>_Prompt when sending messages with an empty subject line</label> + <label>Format messages in _HTML</label> <active>False</active> <draw_indicator>True</draw_indicator> <child> @@ -3886,12 +4121,32 @@ Baltic (ISO-8859-4) <fill>False</fill> </child> </widget> + </widget> + </widget> + + <widget> + <class>GtkFrame</class> + <name>frameAlerts</name> + <label>Alerts</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>True</fill> + </child> + + <widget> + <class>GtkVBox</class> + <name>vbox156</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> <widget> <class>GtkCheckButton</class> - <name>chkPromptBccOnly</name> + <name>chkPromptEmptySubject</name> <can_focus>True</can_focus> - <label>P_rompt when sending messages with only Bcc recipients defined</label> + <label>_Prompt when sending messages with an empty subject line</label> <active>False</active> <draw_indicator>True</draw_indicator> <child> @@ -3902,48 +4157,17 @@ Baltic (ISO-8859-4) </widget> <widget> - <class>GtkHBox</class> - <name>hboxCharset</name> - <homogeneous>False</homogeneous> - <spacing>3</spacing> + <class>GtkCheckButton</class> + <name>chkPromptBccOnly</name> + <can_focus>True</can_focus> + <label>Pr_ompt when sending messages with only Bcc recipients defined</label> + <active>False</active> + <draw_indicator>True</draw_indicator> <child> <padding>0</padding> <expand>False</expand> <fill>False</fill> </child> - - <widget> - <class>GtkLabel</class> - <name>lblCharset</name> - <label>_Character set:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <default_focus_target>omenuCharset</default_focus_target> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - - <widget> - <class>GtkOptionMenu</class> - <name>omenuCharset</name> - <can_focus>True</can_focus> - <items>Baltic (ISO-8859-13) -Baltic (ISO-8859-4) -</items> - <initial_choice>0</initial_choice> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> </widget> </widget> </widget> @@ -3956,8 +4180,8 @@ Baltic (ISO-8859-4) <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> <child> <padding>0</padding> - <expand>False</expand> - <fill>False</fill> + <expand>True</expand> + <fill>True</fill> </child> <widget> @@ -3971,7 +4195,7 @@ Baltic (ISO-8859-4) <name>chkEnableSpellChecking</name> <can_focus>True</can_focus> <label>_Enable spell checking</label> - <active>True</active> + <active>False</active> <draw_indicator>True</draw_indicator> <child> <padding>0</padding> @@ -3995,7 +4219,7 @@ Baltic (ISO-8859-4) <widget> <class>GtkLabel</class> <name>lblSpellCheckColor</name> - <label>C_olor for misspelled words: </label> + <label>_Color for misspelled words: </label> <justify>GTK_JUSTIFY_CENTER</justify> <wrap>False</wrap> <xalign>0.5</xalign> @@ -4088,165 +4312,6 @@ Arabic </widget> </widget> </widget> - - <widget> - <class>GtkFrame</class> - <name>frameForwardsReplies</name> - <label>Forwards and Replies</label> - <label_xalign>0</label_xalign> - <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkTable</class> - <name>tableForwardsReplies</name> - <border_width>3</border_width> - <rows>2</rows> - <columns>2</columns> - <homogeneous>False</homogeneous> - <row_spacing>3</row_spacing> - <column_spacing>3</column_spacing> - - <widget> - <class>GtkLabel</class> - <name>lblForwardStyle</name> - <label>_Default Forward style:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <left_attach>0</left_attach> - <right_attach>1</right_attach> - <top_attach>0</top_attach> - <bottom_attach>1</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> - <class>GtkLabel</class> - <name>lblReplyStyle</name> - <label>Def_ault Reply style:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <left_attach>0</left_attach> - <right_attach>1</right_attach> - <top_attach>1</top_attach> - <bottom_attach>2</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>False</yfill> - </child> - </widget> - - <widget> - <class>GtkAlignment</class> - <name>alignment25</name> - <xalign>7.45058e-09</xalign> - <yalign>0.5</yalign> - <xscale>0</xscale> - <yscale>1</yscale> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>1</top_attach> - <bottom_attach>2</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>False</yfill> - </child> - - <widget> - <class>GtkHBox</class> - <name>hboxReplyStyle</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> - - <widget> - <class>GtkOptionMenu</class> - <name>omenuReplyStyle</name> - <can_focus>True</can_focus> - <items>Quote original message -Do not quote original message -Attach original message -</items> - <initial_choice>0</initial_choice> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - </widget> - </widget> - - <widget> - <class>GtkHBox</class> - <name>hboxForwardStyle</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> - <child> - <left_attach>1</left_attach> - <right_attach>2</right_attach> - <top_attach>0</top_attach> - <bottom_attach>1</bottom_attach> - <xpad>0</xpad> - <ypad>0</ypad> - <xexpand>False</xexpand> - <yexpand>False</yexpand> - <xshrink>False</xshrink> - <yshrink>False</yshrink> - <xfill>True</xfill> - <yfill>True</yfill> - </child> - - <widget> - <class>GtkOptionMenu</class> - <name>omenuForwardStyle</name> - <can_focus>True</can_focus> - <items>Attachment -Inline -Quoted -</items> - <initial_choice>0</initial_choice> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - </widget> - </widget> - </widget> </widget> <widget> @@ -4264,200 +4329,6 @@ Quoted <widget> <class>GtkVBox</class> - <name>vboxShortcuts</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> - - <widget> - <class>GtkHBox</class> - <name>hbox159</name> - <border_width>3</border_width> - <homogeneous>False</homogeneous> - <spacing>3</spacing> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - - <widget> - <class>GtkLabel</class> - <name>label438</name> - <label>Shortcuts _type:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <default_focus_target>optionmenu36</default_focus_target> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - - <widget> - <class>GtkOptionMenu</class> - <name>optionmenu36</name> - <can_focus>True</can_focus> - <items>Emacs -XEmacs -Microsoft -</items> - <initial_choice>0</initial_choice> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - </widget> - - <widget> - <class>GtkHBox</class> - <name>hbox160</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkScrolledWindow</class> - <name>scrolledwindow45</name> - <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy> - <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy> - <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy> - <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkCList</class> - <name>clistKeybindings</name> - <can_focus>True</can_focus> - <columns>2</columns> - <column_widths>80,80</column_widths> - <selection_mode>GTK_SELECTION_SINGLE</selection_mode> - <show_titles>True</show_titles> - <shadow_type>GTK_SHADOW_IN</shadow_type> - - <widget> - <class>GtkLabel</class> - <child_name>CList:title</child_name> - <name>label439</name> - <label>Shortcut</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - - <widget> - <class>GtkLabel</class> - <child_name>CList:title</child_name> - <name>label440</name> - <label>Command</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - </widget> - </widget> - - <widget> - <class>GtkVBox</class> - <name>vbox155</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - - <widget> - <class>GtkLabel</class> - <name>label441</name> - <label> -</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - - <widget> - <class>GtkVButtonBox</class> - <name>vbuttonbox24</name> - <layout_style>GTK_BUTTONBOX_START</layout_style> - <spacing>0</spacing> - <child_min_width>85</child_min_width> - <child_min_height>27</child_min_height> - <child_ipad_x>7</child_ipad_x> - <child_ipad_y>0</child_ipad_y> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - - <widget> - <class>GtkButton</class> - <name>button222</name> - <can_default>True</can_default> - <can_focus>True</can_focus> - <label>_Add</label> - <relief>GTK_RELIEF_NORMAL</relief> - </widget> - - <widget> - <class>GtkButton</class> - <name>button223</name> - <can_default>True</can_default> - <can_focus>True</can_focus> - <label>_Delete</label> - <relief>GTK_RELIEF_NORMAL</relief> - </widget> - </widget> - </widget> - </widget> - </widget> - - <widget> - <class>GtkLabel</class> - <child_name>Notebook:tab</child_name> - <name>lblKeyboardShortcuts</name> - <label>_Keyboard Shortcuts</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - </widget> - - <widget> - <class>GtkVBox</class> <name>vboxSignatures</name> <border_width>3</border_width> <homogeneous>False</homogeneous> @@ -4853,4 +4724,305 @@ Microsoft </widget> </widget> +<widget> + <class>GtkWindow</class> + <name>font_tab</name> + <visible>False</visible> + <title>Font Properties</title> + <type>GTK_WINDOW_TOPLEVEL</type> + <position>GTK_WIN_POS_NONE</position> + <modal>False</modal> + <allow_shrink>False</allow_shrink> + <allow_grow>True</allow_grow> + <auto_shrink>False</auto_shrink> + + <widget> + <class>GtkVBox</class> + <name>toplevel</name> + <border_width>4</border_width> + <homogeneous>False</homogeneous> + <spacing>4</spacing> + + <widget> + <class>GtkFrame</class> + <name>frame3</name> + <label>On Screen fonts</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkTable</class> + <name>tblScreen</name> + <border_width>4</border_width> + <rows>2</rows> + <columns>2</columns> + <homogeneous>False</homogeneous> + <row_spacing>4</row_spacing> + <column_spacing>6</column_spacing> + + <widget> + <class>GtkLabel</class> + <name>lblScreenVariable</name> + <label>_Variable-width:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <default_focus_target>screen_variable</default_focus_target> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>label444</name> + <label>_Fixed-width:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <default_focus_target>screen_fixed</default_focus_target> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GnomeFontPicker</class> + <name>screen_fixed</name> + <can_focus>True</can_focus> + <signal> + <name>font_set</name> + <handler>changed</handler> + <last_modification_time>Mon, 11 Dec 2000 13:55:17 GMT</last_modification_time> + </signal> + <title>Select HTML fixed width font</title> + <preview_text>AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz</preview_text> + <mode>GNOME_FONT_PICKER_MODE_FONT_INFO</mode> + <show_size>True</show_size> + <use_font>True</use_font> + <use_font_size>14</use_font_size> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GnomeFontPicker</class> + <name>screen_variable</name> + <can_focus>True</can_focus> + <signal> + <name>font_set</name> + <handler>changed</handler> + <last_modification_time>Mon, 11 Dec 2000 13:52:30 GMT</last_modification_time> + </signal> + <title>Select HTML variable width font</title> + <preview_text>AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz</preview_text> + <mode>GNOME_FONT_PICKER_MODE_FONT_INFO</mode> + <show_size>True</show_size> + <use_font>True</use_font> + <use_font_size>14</use_font_size> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + </widget> + </widget> + + <widget> + <class>GtkFrame</class> + <name>frame4</name> + <label>Printed Fonts</label> + <label_xalign>0</label_xalign> + <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkTable</class> + <name>tblPrint</name> + <border_width>4</border_width> + <rows>2</rows> + <columns>2</columns> + <homogeneous>False</homogeneous> + <row_spacing>4</row_spacing> + <column_spacing>6</column_spacing> + + <widget> + <class>GtkLabel</class> + <name>lblPrintVariable</name> + <label>V_ariable-width:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <default_focus_target>print_variable</default_focus_target> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GtkLabel</class> + <name>lblPrintFixed</name> + <label>Fi_xed -width:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <default_focus_target>print_fixed</default_focus_target> + <child> + <left_attach>0</left_attach> + <right_attach>1</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GnomeFontPicker</class> + <name>print_fixed</name> + <can_focus>True</can_focus> + <signal> + <name>font_set</name> + <handler>changed</handler> + <last_modification_time>Mon, 11 Dec 2000 13:56:31 GMT</last_modification_time> + </signal> + <title>Select HTML fixed width font for printing</title> + <preview_text>AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz</preview_text> + <mode>GNOME_FONT_PICKER_MODE_FONT_INFO</mode> + <show_size>True</show_size> + <use_font>True</use_font> + <use_font_size>14</use_font_size> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>1</top_attach> + <bottom_attach>2</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + + <widget> + <class>GnomeFontPicker</class> + <name>print_variable</name> + <can_focus>True</can_focus> + <signal> + <name>font_set</name> + <handler>changed</handler> + <last_modification_time>Mon, 15 Oct 2001 18:13:14 GMT</last_modification_time> + </signal> + <title>Select HTML variable width font for printing</title> + <preview_text>AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz</preview_text> + <mode>GNOME_FONT_PICKER_MODE_FONT_INFO</mode> + <show_size>True</show_size> + <use_font>True</use_font> + <use_font_size>14</use_font_size> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>0</top_attach> + <bottom_attach>1</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> + </widget> + </widget> + </widget> +</widget> + </GTK-Interface> diff --git a/mail/mail-font-prefs.c b/mail/mail-font-prefs.c index be54049c4f..985e0c5c32 100644 --- a/mail/mail-font-prefs.c +++ b/mail/mail-font-prefs.c @@ -71,8 +71,8 @@ mail_font_prefs_init (MailFontPrefs *prefs) GtkWidget *toplevel; GladeXML *gui; - prefs->gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "font_tab"); - + gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "font_tab"); + prefs->gui = gui; prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (NULL)); gtk_html_propmanager_set_gui (prefs->pman, gui, NULL); diff --git a/mail/mail-preferences.c b/mail/mail-preferences.c index e0bae7e439..90e7d331bb 100644 --- a/mail/mail-preferences.c +++ b/mail/mail-preferences.c @@ -93,6 +93,7 @@ mail_preferences_finalise (GtkObject *obj) MailPreferences *prefs = (MailPreferences *) obj; gtk_object_unref (GTK_OBJECT (prefs->gui)); + gtk_object_unref (GTK_OBJECT (prefs->pman)); gtk_object_unref (GTK_OBJECT (prefs->gconf)); ((GtkObjectClass *)(parent_class))->finalize (obj); @@ -289,20 +290,22 @@ mail_preferences_construct (MailPreferences *prefs) toggle_button_toggled, prefs); /* Some GtkHTML settings */ - /* FIXME: use the gtkhtml interfaces for these settings when lewing gets around to adding them */ - prefs->show_animated = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkShowAnimatedImages")); - gtk_toggle_button_set_active (prefs->show_animated, - gconf_client_get_bool (prefs->gconf, GTK_HTML_GCONF_DIR "/animations", NULL)); - gtk_signal_connect (GTK_OBJECT (prefs->show_animated), "toggled", - toggle_button_toggled, prefs); - - prefs->autodetect_links = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkAutoDetectLinks")); - gtk_toggle_button_set_active (prefs->autodetect_links, - gconf_client_get_bool (prefs->gconf, GTK_HTML_GCONF_DIR "/magic_links", NULL)); - gtk_signal_connect (GTK_OBJECT (prefs->autodetect_links), "toggled", - toggle_button_toggled, prefs); - - + { + char *names[][2] = {{"anim_check", "chkShowAnimatedImages"}, + {"magic_check", "chkAutoDetectLinks"}, + {"gtk_html_prop_keymap_option", "omenuShortcutsType"}, + {NULL, NULL}}; + + prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (prefs->gconf)); + gtk_object_ref (GTK_OBJECT (prefs->pman)); + gtk_object_sink (GTK_OBJECT (prefs->pman)); + + gtk_html_propmanager_set_names (prefs->pman, names); + gtk_html_propmanager_set_gui (prefs->pman, gui, NULL); + gtk_signal_connect (GTK_OBJECT (prefs->pman), "changed", toggle_button_toggled, prefs); + + } + prefs->prompt_unwanted_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptWantHTML")); gtk_toggle_button_set_active (prefs->prompt_unwanted_html, mail_config_get_confirm_unwanted_html ()); gtk_signal_connect (GTK_OBJECT (prefs->prompt_unwanted_html), "toggled", @@ -409,11 +412,7 @@ mail_preferences_apply (MailPreferences *prefs) else mail_config_set_http_mode (MAIL_CONFIG_HTTP_NEVER); - gconf_client_set_bool (prefs->gconf, GTK_HTML_GCONF_DIR "/animations", - gtk_toggle_button_get_active (prefs->show_animated), NULL); - - gconf_client_set_bool (prefs->gconf, GTK_HTML_GCONF_DIR "/magic_links", - gtk_toggle_button_get_active (prefs->autodetect_links), NULL); + gtk_html_propmanager_apply (prefs->pman); mail_config_set_confirm_unwanted_html (gtk_toggle_button_get_active (prefs->prompt_unwanted_html)); @@ -437,3 +436,4 @@ mail_preferences_apply (MailPreferences *prefs) mail_config_set_label_color (i, rgb); } } + diff --git a/mail/mail-preferences.h b/mail/mail-preferences.h index 8403bdb719..86317a5239 100644 --- a/mail/mail-preferences.h +++ b/mail/mail-preferences.h @@ -34,7 +34,7 @@ extern "C" { #include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-file-entry.h> #include <glade/glade.h> - +#include <gtkhtml/gtkhtml-propmanager.h> #include <gconf/gconf-client.h> #include "evolution-config-control.h" @@ -89,6 +89,9 @@ struct _MailPreferences { GtkToggleButton *show_animated; GtkToggleButton *autodetect_links; GtkToggleButton *prompt_unwanted_html; + + /* GtkHTML Properties */ + GtkHTMLPropmanager *pman; /* Security tab */ GnomeFileEntry *pgp_path; |