aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog20
-rw-r--r--mail/em-composer-prefs.c86
-rw-r--r--mail/em-composer-prefs.h1
-rw-r--r--mail/mail-config.glade95
4 files changed, 63 insertions, 139 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 5f77219536..3b7d1ae020 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,21 @@
+2005-01-24 JP Rosevear <jpr@novell.com>
+
+ * searchtypes.xml: add back body contains
+
+2005-01-21 JP Rosevear <jpr@novell.com>
+
+ Fixes #46287
+
+ * mail-config.glade: remove enable/disable button
+
+ * em-composer-prefs.h: remove unused button
+
+ * em-composer-prefs.c (spell_language_toggled): handle the cell
+ being toggled
+ (spell_setup): enable/disable button is gone
+ (em_composer_prefs_construct): setup a listener for the toggle
+ cell
+
2005-01-24 Radek Doulik <rodo@ximian.com>
* em-popup.[ch]: removed EM_POPUP_SELECT_MARK_[NO]JUNK masks
@@ -13,7 +31,7 @@
* searchtypes.xml: changed for 69122.
2005-01-21 JP Rosevear <jpr@novell.com>
-
+
Fixes #46404
* em-folder-view.c (emfv_print_response): use the config in the
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c
index f9e1750251..33f0908a1c 100644
--- a/mail/em-composer-prefs.c
+++ b/mail/em-composer-prefs.c
@@ -579,28 +579,6 @@ spell_color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, EMCompos
gconf_client_set_int (prefs->gconf, GNOME_SPELL_GCONF_DIR "/spell_error_color_blue", b, NULL);
}
-static void
-spell_live_toggled (GtkWidget *widget, gpointer user_data)
-{
- /* FIXME: what gconf key is this? */
-}
-
-static void
-spell_language_selection_changed (GtkTreeSelection *selection, EMComposerPrefs *prefs)
-{
- GtkTreeIter iter;
- GtkTreeModel *model;
- gboolean state = FALSE;
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get ((GtkTreeModel *) model, &iter, 0, &state, -1);
- gtk_button_set_label ((GtkButton *) prefs->spell_able_button, state ? _("Disable") : _("Enable"));
- state = TRUE;
- }
-
- gtk_widget_set_sensitive (prefs->spell_able_button, state);
-}
-
static char *
spell_get_language_str (EMComposerPrefs *prefs)
{
@@ -637,58 +615,25 @@ spell_get_language_str (EMComposerPrefs *prefs)
return rv;
}
-static void
-spell_language_enable (GtkWidget *widget, EMComposerPrefs *prefs)
-{
- GtkTreeIter iter;
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- gboolean state;
- char *str;
-
- selection = gtk_tree_view_get_selection (prefs->language);
- if (!gtk_tree_selection_get_selected (selection, &model, &iter))
- return;
-
- gtk_tree_model_get (model, &iter, 0, &state, -1);
- gtk_list_store_set ((GtkListStore *) model, &iter, 0, !state, -1);
- gtk_button_set_label ((GtkButton *) prefs->spell_able_button, state ? _("Enable") : _("Disable"));
-
- str = spell_get_language_str (prefs);
- gconf_client_set_string (prefs->gconf, GNOME_SPELL_GCONF_DIR "/language", str ? str : "", NULL);
- g_free (str);
-}
-
-static gboolean
-spell_language_button_press (GtkTreeView *treeview, GdkEventButton *event, EMComposerPrefs *prefs)
+static void
+spell_language_toggled (GtkCellRendererToggle *renderer, const char *path_string, EMComposerPrefs *prefs)
{
- GtkTreeViewColumn *column = NULL;
- GtkTreePath *path = NULL;
+ GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
GtkTreeModel *model;
GtkTreeIter iter;
gboolean enabled;
char *str;
- if (!(gtk_tree_view_get_path_at_pos (treeview, event->x, event->y, &path, &column, NULL, NULL)))
- return FALSE;
-
- /* FIXME: This routine should just be a "toggled" event handler on the checkbox cell renderer which
- has "activatable" set. */
-
- if (strcmp (gtk_tree_view_column_get_title (column), _("Enabled")) != 0)
- return FALSE;
-
- model = gtk_tree_view_get_model (treeview);
+ model = gtk_tree_view_get_model (prefs->language);
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter, 0, &enabled, -1);
gtk_list_store_set ((GtkListStore *) model, &iter, 0, !enabled, -1);
- gtk_button_set_label ((GtkButton *) prefs->spell_able_button, enabled ? _("Enable") : _("Disable"));
str = spell_get_language_str (prefs);
gconf_client_set_string (prefs->gconf, GNOME_SPELL_GCONF_DIR "/language", str ? str : "", NULL);
g_free (str);
-
- return FALSE;
+
+ gtk_tree_path_free (path);
}
static void
@@ -715,14 +660,6 @@ spell_setup (EMComposerPrefs *prefs)
widget = glade_xml_get_widget (prefs->gui, "colorpickerSpellCheckColor");
g_signal_connect (widget, "color_set", G_CALLBACK (spell_color_set), prefs);
-
- widget = glade_xml_get_widget (prefs->gui, "buttonSpellCheckEnable");
- g_signal_connect (widget, "clicked", G_CALLBACK (spell_language_enable), prefs);
-
- widget = glade_xml_get_widget (prefs->gui, "chkEnableSpellChecking");
- g_signal_connect (widget, "toggled", G_CALLBACK (spell_live_toggled), prefs);
-
- g_signal_connect (prefs->language, "button_press_event", G_CALLBACK (spell_language_button_press), prefs);
}
static gboolean
@@ -879,6 +816,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
GladeXML *gui;
GtkListStore *model;
GtkTreeSelection *selection;
+ GtkCellRenderer *cell_renderer;
int style;
char *buf;
EMConfig *ec;
@@ -942,19 +880,19 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
prefs->language = GTK_TREE_VIEW (glade_xml_get_widget (gui, "listSpellCheckLanguage"));
model = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER);
gtk_tree_view_set_model (prefs->language, (GtkTreeModel *) model);
+ cell_renderer = gtk_cell_renderer_toggle_new ();
gtk_tree_view_insert_column_with_attributes (prefs->language, -1, _("Enabled"),
- gtk_cell_renderer_toggle_new (),
+ cell_renderer,
"active", 0,
NULL);
+ g_signal_connect (cell_renderer, "toggled", G_CALLBACK (spell_language_toggled), prefs);
+
gtk_tree_view_insert_column_with_attributes (prefs->language, -1, _("Language(s)"),
gtk_cell_renderer_text_new (),
"text", 1,
NULL);
selection = gtk_tree_view_get_selection (prefs->language);
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- g_signal_connect (selection, "changed", G_CALLBACK (spell_language_selection_changed), prefs);
-
- prefs->spell_able_button = glade_xml_get_widget (gui, "buttonSpellCheckEnable");
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE);
info_pixmap = glade_xml_get_widget (gui, "pixmapSpellInfo");
gtk_image_set_from_stock (GTK_IMAGE (info_pixmap), GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_BUTTON);
if (!spell_setup_check_options (prefs)) {
diff --git a/mail/em-composer-prefs.h b/mail/em-composer-prefs.h
index 74a2a3cf98..ca64ead692 100644
--- a/mail/em-composer-prefs.h
+++ b/mail/em-composer-prefs.h
@@ -77,7 +77,6 @@ struct _EMComposerPrefs {
gboolean spell_active;
struct _GdkPixbuf *enabled_pixbuf;
- struct _GtkWidget *spell_able_button;
/* Forwards and Replies */
struct _GtkOptionMenu *forward_style;
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index d8a7196158..225ba5b756 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -7232,57 +7232,6 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="spacing">12</property>
<child>
- <widget class="GtkHBox" id="hboxImageAndHelp">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkImage" id="pixmapSpellInfo">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-info</property>
- <property name="icon_size">6</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblSpellChecking">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This page allows you to configure spell checking behavior and language. The list of languages here reflects only the languages for which you have a dictionary installed.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
<widget class="GtkVBox" id="vbox196">
<property name="visible">True</property>
<property name="homogeneous">False</property>
@@ -7402,33 +7351,53 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
</child>
<child>
- <widget class="GtkHBox" id="hbox219">
+ <widget class="GtkHBox" id="hboxImageAndHelp">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkButton" id="buttonSpellCheckEnable">
+ <widget class="GtkImage" id="pixmapSpellInfo">
<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">_Enable</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
+ <property name="stock">gtk-dialog-info</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0</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="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblSpellChecking">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">The list of languages here reflects only the languages for which you have a dictionary installed.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</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="padding">0</property>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
</packing>
</child>
</widget>
@@ -7607,7 +7576,7 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
</packing>
</child>
</widget>