diff options
Diffstat (limited to 'mail/mail-composer-prefs.c')
-rw-r--r-- | mail/mail-composer-prefs.c | 754 |
1 files changed, 370 insertions, 384 deletions
diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c index 8b361035dd..8e6cbb54f8 100644 --- a/mail/mail-composer-prefs.c +++ b/mail/mail-composer-prefs.c @@ -25,20 +25,16 @@ #include <config.h> #endif -#include <string.h> - #include "mail-composer-prefs.h" #include "composer/e-msg-composer.h" +#include <gtk/gtksignal.h> + #include <bonobo/bonobo-generic-factory.h> +#include <bonobo/bonobo-object-client.h> -#include <gal/util/e-iconv.h> #include <gal/widgets/e-gui-utils.h> - -#include <gtk/gtktreemodel.h> -#include <gtk/gtkliststore.h> -#include <gtk/gtktreeselection.h> -#include <gtk/gtktreeview.h> +#include <gal/widgets/e-unicode.h> #include "widgets/misc/e-charset-picker.h" @@ -52,30 +48,30 @@ static void mail_composer_prefs_class_init (MailComposerPrefsClass *class); static void mail_composer_prefs_init (MailComposerPrefs *dialog); static void mail_composer_prefs_destroy (GtkObject *obj); -static void mail_composer_prefs_finalise (GObject *obj); +static void mail_composer_prefs_finalise (GtkObject *obj); static void sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailComposerPrefs *prefs); static GtkVBoxClass *parent_class = NULL; -GType +GtkType mail_composer_prefs_get_type (void) { - static GType type = 0; + static GtkType type = 0; if (!type) { - static const GTypeInfo info = { - sizeof (MailComposerPrefsClass), - NULL, NULL, - (GClassInitFunc) mail_composer_prefs_class_init, - NULL, NULL, + GtkTypeInfo type_info = { + "MailComposerPrefs", sizeof (MailComposerPrefs), - 0, - (GInstanceInitFunc) mail_composer_prefs_init, + sizeof (MailComposerPrefsClass), + (GtkClassInitFunc) mail_composer_prefs_class_init, + (GtkObjectInitFunc) mail_composer_prefs_init, + (GtkArgSetFunc) NULL, + (GtkArgGetFunc) NULL }; - type = g_type_register_static (gtk_vbox_get_type (), "MailComposerPrefs", &info, 0); + type = gtk_type_unique (gtk_vbox_get_type (), &type_info); } return type; @@ -84,13 +80,15 @@ mail_composer_prefs_get_type (void) static void mail_composer_prefs_class_init (MailComposerPrefsClass *klass) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass); + GtkObjectClass *object_class; - parent_class = g_type_class_ref (gtk_vbox_get_type ()); + object_class = (GtkObjectClass *) klass; + parent_class = gtk_type_class (gtk_vbox_get_type ()); object_class->destroy = mail_composer_prefs_destroy; - gobject_class->finalize = mail_composer_prefs_finalise; + object_class->finalize = mail_composer_prefs_finalise; + /* override methods */ + } static void @@ -102,27 +100,28 @@ mail_composer_prefs_init (MailComposerPrefs *composer_prefs) } static void -mail_composer_prefs_finalise (GObject *obj) +mail_composer_prefs_finalise (GtkObject *obj) { MailComposerPrefs *prefs = (MailComposerPrefs *) obj; - g_object_unref (prefs->gui); - g_object_unref (prefs->pman); - g_object_unref (prefs->enabled_pixbuf); + gtk_object_unref (GTK_OBJECT (prefs->gui)); + gtk_object_unref (GTK_OBJECT (prefs->pman)); + gdk_pixbuf_unref (prefs->enabled_pixbuf); gdk_pixmap_unref (prefs->mark_pixmap); - g_object_unref (prefs->mark_bitmap); - - G_OBJECT_CLASS (parent_class)->finalize (obj); + gdk_bitmap_unref (prefs->mark_bitmap); + + ((GtkObjectClass *)(parent_class))->finalize (obj); } static void mail_composer_prefs_destroy (GtkObject *obj) { MailComposerPrefs *prefs = (MailComposerPrefs *) obj; - + mail_config_signature_unregister_client ((MailConfigSignatureClient) sig_event_client, prefs); - GTK_OBJECT_CLASS (parent_class)->destroy (obj); + if (GTK_OBJECT_CLASS (parent_class)) + (* GTK_OBJECT_CLASS (parent_class)->destroy) (obj); } static void @@ -130,7 +129,7 @@ attach_style_info (GtkWidget *item, gpointer user_data) { int *style = user_data; - g_object_set_data ((GObject *) item, "style", GINT_TO_POINTER (*style)); + gtk_object_set_data (GTK_OBJECT (item), "style", GINT_TO_POINTER (*style)); (*style)++; } @@ -164,7 +163,8 @@ option_menu_connect (GtkOptionMenu *omenu, gpointer user_data) items = GTK_MENU_SHELL (menu)->children; while (items) { item = items->data; - g_signal_connect (item, "activate", G_CALLBACK (menu_changed), user_data); + gtk_signal_connect (GTK_OBJECT (item), "activate", + menu_changed, user_data); items = items->next; } } @@ -178,18 +178,18 @@ sig_load_preview (MailComposerPrefs *prefs, MailConfigSignature *sig) gtk_html_load_from_string (GTK_HTML (prefs->sig_preview), " ", 1); return; } - + if (sig->script) str = mail_config_signature_run_script (sig->script); else str = e_msg_composer_get_sig_file_content (sig->filename, sig->html); if (!str) - str = g_strdup (""); + str = g_strdup (" "); /* printf ("HTML: %s\n", str); */ - if (sig->html) { + if (sig->html) gtk_html_load_from_string (GTK_HTML (prefs->sig_preview), str, strlen (str)); - } else { + else { GtkHTMLStream *stream; int len; @@ -205,181 +205,180 @@ sig_load_preview (MailComposerPrefs *prefs, MailConfigSignature *sig) g_free (str); } +static MailConfigSignature * +sig_current_sig (MailComposerPrefs *prefs) +{ + return gtk_clist_get_row_data (GTK_CLIST (prefs->sig_clist), prefs->sig_row); +} + static void -sig_edit_cb (GtkWidget *widget, MailComposerPrefs *prefs) +sig_edit (GtkWidget *widget, MailComposerPrefs *prefs) { - GtkTreeSelection *selection; - MailConfigSignature *sig; - GtkTreeModel *model; - GtkWidget *parent; - GtkTreeIter iter; - - selection = gtk_tree_view_get_selection (prefs->sig_list); - if (!gtk_tree_selection_get_selected (selection, &model, &iter)) - return; - - gtk_tree_model_get (model, &iter, 1, &sig, -1); + MailConfigSignature *sig = sig_current_sig (prefs); - if (!sig->filename || *sig->filename == '\0') { - g_free (sig->filename); - sig->filename = g_strdup (_("Unnamed")); - } - - parent = gtk_widget_get_toplevel ((GtkWidget *) prefs); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; - - mail_signature_editor (sig, (GtkWindow *) parent, FALSE); + if (sig->filename && *sig->filename) + mail_signature_editor (sig); + else + e_notice (GTK_WINDOW (prefs), GNOME_MESSAGE_BOX_ERROR, + _("Please specify signature filename\nin Advanced section of signature settings.")); } MailConfigSignature * -mail_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char *script) +mail_composer_prefs_new_signature (MailComposerPrefs *prefs, gboolean html, const gchar *script) { MailConfigSignature *sig; + char *name[1]; + int row; + + sig = mail_config_signature_add (html, script); + + if (prefs) { + if (!(name[0] = e_utf8_to_gtk_string (GTK_WIDGET (prefs->sig_clist), sig->name))) + name[0] = g_strdup (""); + + if (sig->script) { + char *tmp; + + tmp = name[0]; + name[0] = g_strconcat (tmp, _(" [script]"), NULL); + g_free (tmp); + } + + row = gtk_clist_append (prefs->sig_clist, name); + gtk_clist_set_row_data (prefs->sig_clist, row, sig); + gtk_clist_select_row (GTK_CLIST (prefs->sig_clist), row, 0); + g_free (name[0]); + /*gtk_widget_grab_focus (prefs->sig_name);*/ + } - sig = mail_config_signature_new (html, script); - mail_signature_editor (sig, parent, TRUE); + if (sig->filename && *sig->filename) + mail_signature_editor (sig); return sig; } +static void sig_row_unselect (GtkCList *clist, int row, int col, GdkEvent *event, MailComposerPrefs *prefs); + static void -sig_delete_cb (GtkWidget *widget, MailComposerPrefs *prefs) +sig_delete (GtkWidget *widget, MailComposerPrefs *prefs) { - MailConfigSignature *sig; - GtkTreeModel *model; - GtkTreeSelection *selection; - GtkTreeIter iter; - - selection = gtk_tree_view_get_selection (prefs->sig_list); - if (gtk_tree_selection_get_selected (selection, &model, &iter)) { - gtk_tree_model_get (model, &iter, 1, &sig, -1); - gtk_list_store_remove ((GtkListStore *) model, &iter); - mail_config_signature_delete (sig); - } + MailConfigSignature *sig = sig_current_sig (prefs); + + gtk_clist_remove (prefs->sig_clist, prefs->sig_row); + mail_config_signature_delete (sig); + if (prefs->sig_row < prefs->sig_clist->rows) + gtk_clist_select_row (prefs->sig_clist, prefs->sig_row, 0); + else if (prefs->sig_row) + gtk_clist_select_row (prefs->sig_clist, prefs->sig_row - 1, 0); + else + sig_row_unselect (prefs->sig_clist, prefs->sig_row, 0, NULL, prefs); } static void -sig_add_cb (GtkWidget *widget, MailComposerPrefs *prefs) +sig_add (GtkWidget *widget, MailComposerPrefs *prefs) { - GConfClient *gconf; - gboolean send_html; - GtkWidget *parent; - - gconf = gconf_client_get_default (); - send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL); - - parent = gtk_widget_get_toplevel ((GtkWidget *) prefs); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; - - mail_composer_prefs_new_signature ((GtkWindow *) parent, send_html, NULL); + mail_composer_prefs_new_signature (prefs, mail_config_get_send_html (), NULL); } static void -sig_add_script_response (GtkWidget *widget, int button, MailComposerPrefs *prefs) +sig_add_script_add (GtkWidget *widget, MailComposerPrefs *prefs) { - const char *script, *name; - GtkWidget *dialog; + char *script, *name; GtkWidget *entry; - if (button == GTK_RESPONSE_ACCEPT) { - entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script"); - script = gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (entry)))); + entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script"); + script = gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (entry)))); + + entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name"); + name = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry)); + if (script && *script) { + struct stat st; - entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name"); - name = gtk_entry_get_text (GTK_ENTRY (entry)); - if (script && *script) { - struct stat st; + if (!stat (script, &st) + && S_ISREG (st.st_mode) && (st.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR))) { + MailConfigSignature *sig; + + sig = mail_composer_prefs_new_signature (prefs, TRUE, script); + mail_config_signature_set_name (sig, name); + g_free (name); + gtk_widget_hide (prefs->sig_script_dialog); - if (!stat (script, &st) && S_ISREG (st.st_mode) && access (script, X_OK) == 0) { - MailConfigSignature *sig; - GtkWidget *parent; - - parent = gtk_widget_get_toplevel ((GtkWidget *) prefs); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; - - sig = mail_composer_prefs_new_signature ((GtkWindow *) parent, TRUE, script); - mail_config_signature_set_name (sig, name); - mail_config_signature_add (sig); - - gtk_widget_hide (prefs->sig_script_dialog); - - return; - } + return; } - - dialog = gtk_message_dialog_new (GTK_WINDOW (prefs->sig_script_dialog), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - "%s", _("You must specify a valid script name.")); - - gtk_dialog_run ((GtkDialog *) dialog); - gtk_widget_destroy (dialog); } - - gtk_widget_hide (widget); + gnome_dialog_run_and_close (GNOME_DIALOG (gnome_ok_dialog_parented (_("Please specify a valid script name"), + GTK_WINDOW (prefs->sig_script_dialog)))); } static void -sig_add_script_cb (GtkWidget *widget, MailComposerPrefs *prefs) +sig_add_script_cancel (GtkWidget *widget, MailComposerPrefs *prefs) +{ + gnome_dialog_close (GNOME_DIALOG (prefs->sig_script_dialog)); +} + +static void +sig_add_script (GtkWidget *widget, MailComposerPrefs *prefs) { GtkWidget *entry; entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name"); gtk_entry_set_text (GTK_ENTRY (entry), _("Unnamed")); - gtk_widget_show (prefs->sig_script_dialog); + gtk_widget_show_all (prefs->sig_script_dialog); gdk_window_raise (prefs->sig_script_dialog->window); } static void -sig_selection_changed (GtkTreeSelection *selection, MailComposerPrefs *prefs) +sig_row_select (GtkCList *clist, int row, int col, GdkEvent *event, MailComposerPrefs *prefs) { MailConfigSignature *sig; - GtkTreeModel *model; - GtkTreeIter iter; - int state; - - state = gtk_tree_selection_get_selected (selection, &model, &iter); - if (state) { - gtk_tree_model_get (model, &iter, 1, &sig, -1); - sig_load_preview (prefs, sig); - } - gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, state); - gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, state); + d(printf ("sig_row_select\n")); + sig = gtk_clist_get_row_data (prefs->sig_clist, row); + prefs->sig_row = row; + + gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, TRUE); + gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, sig->script == NULL); + + sig_load_preview (prefs, sig); } static void -sig_fill_clist (GtkTreeView *clist) +sig_row_unselect (GtkCList *clist, int row, int col, GdkEvent *event, MailComposerPrefs *prefs) { - GSList *l; - GtkListStore *model; - GtkTreeIter iter; - - model = (GtkListStore *) gtk_tree_view_get_model (clist); - gtk_list_store_clear (model); + d(printf ("sig_row_unselect\n")); + gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, FALSE); + gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, FALSE); +} + +static void +sig_fill_clist (GtkCList *clist) +{ + GList *l; + char *name[1]; + int row; + gtk_clist_freeze (clist); for (l = mail_config_get_signature_list (); l; l = l->next) { - MailConfigSignature *sig = l->data; - char *name = NULL, *val; - - gtk_list_store_append (model, &iter); - - if (sig->script) - name = val = g_strconcat (sig->name, " ", _("[script]"), NULL); - else - val = sig->name; - gtk_list_store_set (model, &iter, 0, val, 1, sig, -1); - g_free (name); + name[0] = e_utf8_to_gtk_string (GTK_WIDGET (clist), ((MailConfigSignature *) l->data)->name); + if (((MailConfigSignature *) l->data)->script) { + char *tmp; + + tmp = name [0]; + name[0] = g_strconcat (name[0], _(" [script]"), NULL); + g_free (tmp); + } + row = gtk_clist_append (clist, name); + gtk_clist_set_row_data (clist, row, l->data); + g_free (name [0]); } + gtk_clist_thaw (clist); } static void url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle) { GtkHTMLStreamStatus status; - char buf[128]; - ssize_t size; int fd; if (!strncmp (url, "file:", 5)) @@ -388,12 +387,14 @@ url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle) fd = open (url, O_RDONLY); status = GTK_HTML_STREAM_OK; if (fd != -1) { - while ((size = read (fd, buf, sizeof (buf)))) { + ssize_t size; + void *buf = alloca (1 << 7); + while ((size = read (fd, buf, 1 << 7))) { if (size == -1) { status = GTK_HTML_STREAM_ERROR; break; } else - gtk_html_write (html, handle, buf, size); + gtk_html_write (html, handle, (const gchar *) buf, size); } } else status = GTK_HTML_STREAM_ERROR; @@ -404,46 +405,29 @@ url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle) static void sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailComposerPrefs *prefs) { - MailConfigSignature *current; - GtkTreeSelection *selection; - GtkTreeModel *model; - GtkTreeIter iter; - char path[16]; + char *tmp, *tmp1; switch (event) { - case MAIL_CONFIG_SIG_EVENT_ADDED: - d(printf ("signature ADDED\n")); - - model = gtk_tree_view_get_model (prefs->sig_list); - gtk_list_store_append ((GtkListStore *) model, &iter); - gtk_list_store_set ((GtkListStore *) model, &iter, 0, sig->name, 1, sig, -1); - break; case MAIL_CONFIG_SIG_EVENT_NAME_CHANGED: - d(printf ("signature NAME CHANGED\n")); - - /* this is one bizarro interface */ - model = gtk_tree_view_get_model (prefs->sig_list); - sprintf (path, "%d", sig->id); - if (gtk_tree_model_get_iter_from_string (model, &iter, path)) { - char *val, *name = NULL; - - if (sig->script) - name = val = g_strconcat (sig->name, " ", _("[script]"), NULL); - else - val = sig->name; - - gtk_list_store_set ((GtkListStore *) model, &iter, 0, val, -1); - g_free (name); + d(printf ("accounts NAME CHANGED\n")); + tmp = e_utf8_to_gtk_string (GTK_WIDGET (prefs->sig_clist), sig->name); + if (sig->script) { + tmp1 = tmp; + tmp = g_strconcat (tmp, _(" [script]"), NULL); + g_free (tmp1); + } + gtk_clist_set_text (GTK_CLIST (prefs->sig_clist), sig->id, 0, tmp); + g_free (tmp); + if (sig == sig_current_sig (prefs)) { + prefs->sig_switch = TRUE; + /*e_utf8_gtk_entry_set_text (GTK_ENTRY (prefs->sig_name), sig->name);*/ + prefs->sig_switch = FALSE; } break; case MAIL_CONFIG_SIG_EVENT_CONTENT_CHANGED: - d(printf ("signature CONTENT CHANGED\n")); - selection = gtk_tree_view_get_selection (prefs->sig_list); - if (gtk_tree_selection_get_selected (selection, &model, &iter)) { - gtk_tree_model_get (model, &iter, 1, ¤t, -1); - if (sig == current) - sig_load_preview (prefs, sig); - } + d(printf ("accounts CONTENT CHANGED\n")); + if (sig == sig_current_sig (prefs)) + sig_load_preview (prefs, sig); break; default: ; @@ -459,38 +443,54 @@ sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailCompos #include "Spell.h" #define GNOME_SPELL_GCONF_DIR "/GNOME/Spell" -#define SPELL_API_VERSION "0.3" +#define SPELL_API_VERSION "0.2" static void -spell_set_ui (MailComposerPrefs *prefs) +spell_select_lang (MailComposerPrefs *prefs, const gchar *abrev) { - GtkListStore *model; - GtkTreeIter iter; - GHashTable *present; - gboolean go; - char **strv; int i; + + for (i = 0; i < prefs->language_seq->_length; i ++) { + if (!strcasecmp (abrev, prefs->language_seq->_buffer [i].abrev)) { + gtk_clist_set_pixmap (GTK_CLIST (prefs->language), i, 0, prefs->mark_pixmap, prefs->mark_bitmap); + } + } +} - prefs->spell_active = FALSE; - - /* setup the language list */ - strv = g_strsplit (prefs->language_str, " ", 0); - present = g_hash_table_new (g_str_hash, g_str_equal); - for (i = 0; strv[i]; i++) - g_hash_table_insert (present, strv[i], strv[i]); +static void +spell_set_ui_language (MailComposerPrefs *prefs) +{ + char *l, *last, *lang; + int i; - model = (GtkListStore *) gtk_tree_view_get_model (prefs->language); - for (go = gtk_tree_model_get_iter_first ((GtkTreeModel *) model, &iter); go; - go = gtk_tree_model_iter_next ((GtkTreeModel *) model, &iter)) { - char *abbr; - - gtk_tree_model_get ((GtkTreeModel *) model, &iter, 2, &abbr, -1); - gtk_list_store_set (model, &iter, 0, g_hash_table_lookup (present, abbr) != NULL, -1); + gtk_clist_freeze (GTK_CLIST (prefs->language)); + gtk_clist_unselect_all (GTK_CLIST (prefs->language)); + + for (i = 0; i < prefs->language_seq->_length; i ++) { + gtk_clist_set_pixmap (GTK_CLIST (prefs->language), i, 0, NULL, NULL); } - g_hash_table_destroy (present); - g_strfreev (strv); + last = prefs->language_str; + while ((l = strchr (last, ' '))) { + if (l != last) { + lang = g_strndup (last, l - last); + spell_select_lang (prefs, lang); + g_free (lang); + } + + last = l + 1; + } + if (last) + spell_select_lang (prefs, last); + gtk_clist_thaw (GTK_CLIST (prefs->language)); +} + +static void +spell_set_ui (MailComposerPrefs *prefs) +{ + prefs->spell_active = FALSE; + spell_set_ui_language (prefs); gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (prefs->colour), prefs->spell_error_color.red, prefs->spell_error_color.green, @@ -502,31 +502,26 @@ spell_set_ui (MailComposerPrefs *prefs) static gchar * spell_get_language_str (MailComposerPrefs *prefs) { - GString *str = g_string_new (""); - GtkListStore *model; - GtkTreeIter iter; - gboolean go; + GString *str = g_string_new (NULL); char *rv; - - model = (GtkListStore *) gtk_tree_view_get_model (prefs->language); - for (go = gtk_tree_model_get_iter_first ((GtkTreeModel *) model, &iter); - go; - go = gtk_tree_model_iter_next ((GtkTreeModel *) model, &iter)) { - char *abbr; - gboolean state; + int i; + + for (i = 0; i < GTK_CLIST (prefs->language)->rows; i ++) { + GdkPixmap *pmap = NULL; + GdkBitmap *bmap; - gtk_tree_model_get ((GtkTreeModel *) model, &iter, 0, &state, 2, &abbr, -1); - if (state) { + gtk_clist_get_pixmap (GTK_CLIST (prefs->language), i, 0, &pmap, &bmap); + if (pmap) { if (str->len) g_string_append_c (str, ' '); - g_string_append (str, abbr); + g_string_append (str, gtk_clist_get_row_data (GTK_CLIST (prefs->language), i)); } } rv = str->str; g_string_free (str, FALSE); - return rv; + return rv ? rv : g_strdup (""); } static void @@ -567,7 +562,7 @@ spell_load_values (MailComposerPrefs *prefs) GConfValue *val; char *def_lang; - def_lang = g_strdup ("en_us"); + def_lang = g_strdup ("en"); g_free (prefs->language_str); prefs->language_str = g_strdup (def_lang); prefs->spell_error_color.red = 0xffff; @@ -639,111 +634,141 @@ spell_color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, gpointer } static void -spell_language_selection_changed (GtkTreeSelection *selection, MailComposerPrefs *prefs) +spell_language_select_row (GtkWidget *widget, gint row, gint column, GdkEvent *event, MailComposerPrefs *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; + GList *sel = GTK_CLIST (prefs->language)->selection; + + if (sel) { + GdkPixmap *pmap = NULL; + GdkBitmap *bmap; + int row = GPOINTER_TO_INT (sel->data); + + gtk_clist_get_pixmap (GTK_CLIST (prefs->language), row, 0, &pmap, &bmap); + if (pmap) + gtk_label_set_text (GTK_LABEL (GTK_BIN (prefs->spell_able_button)->child), _("Disable")); + else + gtk_label_set_text (GTK_LABEL (GTK_BIN (prefs->spell_able_button)->child), _("Enable")); } - gtk_widget_set_sensitive (prefs->spell_able_button, state); + + gtk_widget_set_sensitive (prefs->spell_able_button, TRUE); +} + +static void +spell_language_unselect_row (GtkWidget *widget, gint row, gint column, GdkEvent *event, MailComposerPrefs *prefs) +{ + gtk_widget_set_sensitive (prefs->spell_able_button, FALSE); } static void spell_language_enable (GtkWidget *widget, MailComposerPrefs *prefs) { - GtkTreeIter iter; - GtkTreeModel *model; - GtkTreeSelection *selection; - gboolean state; + GList *sel = GTK_CLIST (prefs->language)->selection; - selection = gtk_tree_view_get_selection (prefs->language); - if (gtk_tree_selection_get_selected (selection, &model, &iter)) { - 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")); + if (sel) { + GdkPixmap *pmap = NULL; + GdkBitmap *bmap; + int row = GPOINTER_TO_INT (sel->data); + + gtk_clist_get_pixmap (GTK_CLIST (prefs->language), row, 0, &pmap, &bmap); + if (pmap) { + gtk_clist_set_pixmap (GTK_CLIST (prefs->language), row, 0, NULL, NULL); + gtk_label_set_text (GTK_LABEL (GTK_BIN (prefs->spell_able_button)->child), _("Enable")); + } else { + gtk_label_set_text (GTK_LABEL (GTK_BIN (prefs->spell_able_button)->child), _("Disable")); + gtk_clist_set_pixmap (GTK_CLIST (prefs->language), row, 0, prefs->mark_pixmap, prefs->mark_bitmap); + } + spell_changed (prefs); } } -static gboolean -spell_language_button_press (GtkTreeView *tv, GdkEventButton *event, MailComposerPrefs *prefs) +static void +spell_language_button_press (GtkWidget *widget, GdkEventButton *event, MailComposerPrefs *prefs) { - GtkTreePath *path = NULL; - GtkTreeViewColumn *column = NULL; - gtk_tree_view_get_path_at_pos (tv, event->x, event->y, &path, &column, NULL, NULL); - - if (path != NULL && column != NULL && !strcmp (gtk_tree_view_column_get_title (column), _("Enabled"))) { - GtkTreeIter iter; - GtkTreeModel *model; - gboolean enabled; - - model = gtk_tree_view_get_model (tv); - 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); - spell_changed (prefs); + int row, col; + + if (gtk_clist_get_selection_info (prefs->language, event->x, event->y, &row, &col)) { + if (col == 0) { + GList *sel = GTK_CLIST (prefs->language)->selection; + GdkPixmap *pmap = NULL; + GdkBitmap *bmap; + + gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "button_press_event"); + + gtk_clist_get_pixmap (GTK_CLIST (prefs->language), row, 0, &pmap, &bmap); + if (pmap) + gtk_clist_set_pixmap (GTK_CLIST (prefs->language), row, 0, NULL, NULL); + else + gtk_clist_set_pixmap (GTK_CLIST (prefs->language), row, 0, + prefs->mark_pixmap, prefs->mark_bitmap); + + if (sel && GPOINTER_TO_INT (sel->data) == row) + gtk_label_set_text (GTK_LABEL (GTK_BIN (prefs->spell_able_button)->child), + pmap ? _("Enable") : _("Disable")); + + spell_changed (prefs); + } } - - return FALSE; } static void spell_setup (MailComposerPrefs *prefs) { - GtkListStore *model; - GtkTreeIter iter; int i; - model = (GtkListStore *) gtk_tree_view_get_model (prefs->language); - + gtk_clist_freeze (GTK_CLIST (prefs->language)); if (prefs->language_seq) { for (i = 0; i < prefs->language_seq->_length; i++) { - gtk_list_store_append (model, &iter); - gtk_list_store_set (model, &iter, - 1, _(prefs->language_seq->_buffer[i].name), - 2, prefs->language_seq->_buffer[i].abbreviation, - -1); + char *texts[2]; + + texts[0] = NULL; + texts[1] = _(prefs->language_seq->_buffer [i].name); + gtk_clist_append (GTK_CLIST (prefs->language), texts); + gtk_clist_set_row_data (GTK_CLIST (prefs->language), i, prefs->language_seq->_buffer [i].abrev); } } + gtk_clist_thaw (GTK_CLIST (prefs->language)); spell_load_values (prefs); spell_set_ui (prefs); - glade_xml_signal_connect_data (prefs->gui, "spellColorSet", G_CALLBACK (spell_color_set), prefs); + glade_xml_signal_connect_data (prefs->gui, "spellColorSet", GTK_SIGNAL_FUNC (spell_color_set), prefs); + glade_xml_signal_connect_data (prefs->gui, "spellLanguageSelectRow", + GTK_SIGNAL_FUNC (spell_language_select_row), prefs); + glade_xml_signal_connect_data (prefs->gui, "spellLanguageUnselectRow", + GTK_SIGNAL_FUNC (spell_language_unselect_row), prefs); glade_xml_signal_connect_data (prefs->gui, "spellLanguageEnable", GTK_SIGNAL_FUNC (spell_language_enable), prefs); - g_signal_connect (prefs->language, "button_press_event", G_CALLBACK (spell_language_button_press), prefs); + gtk_signal_connect (GTK_OBJECT (prefs->language), "button_press_event", spell_language_button_press, prefs); } static gboolean spell_setup_check_options (MailComposerPrefs *prefs) { + BonoboObjectClient *dictionary_client; GNOME_Spell_Dictionary dict; CORBA_Environment ev; char *dictionary_id; dictionary_id = "OAFIID:GNOME_Spell_Dictionary:" SPELL_API_VERSION; - dict = bonobo_activation_activate_from_id (dictionary_id, 0, NULL, NULL); - if (dict == CORBA_OBJECT_NIL) { + dictionary_client = bonobo_object_activate (dictionary_id, 0); + + if (!dictionary_client) { g_warning ("Cannot activate %s", dictionary_id); return FALSE; } + dict = bonobo_object_corba_objref (BONOBO_OBJECT (dictionary_client)); CORBA_exception_init (&ev); prefs->language_seq = GNOME_Spell_Dictionary_getLanguages (dict, &ev); if (ev._major != CORBA_NO_EXCEPTION) prefs->language_seq = NULL; CORBA_exception_free (&ev); - + if (prefs->language_seq == NULL) return FALSE; - + gconf_client_add_dir (prefs->gconf, GNOME_SPELL_GCONF_DIR, GCONF_CLIENT_PRELOAD_NONE, NULL); spell_setup (prefs); @@ -759,13 +784,8 @@ static void mail_composer_prefs_construct (MailComposerPrefs *prefs) { GtkWidget *toplevel, *widget, *menu, *info_pixmap; - GtkDialog *dialog; GladeXML *gui; - GtkListStore *model; - GtkTreeSelection *selection; - gboolean bool; int style; - char *buf; char *names[][2] = { { "live_spell_check", "chkEnableSpellChecking" }, { "magic_smileys_check", "chkAutoSmileys" }, @@ -775,9 +795,9 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) prefs->gconf = gconf_client_get_default (); - gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "composer_tab", NULL); + gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "composer_tab"); prefs->gui = gui; - prefs->sig_script_gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "vbox_add_script_signature", NULL); + prefs->sig_script_gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "vbox_add_script_signature"); /* get our toplevel widget */ toplevel = glade_xml_get_widget (gui, "toplevel"); @@ -792,66 +812,46 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) /* Default Behavior */ prefs->send_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSendHTML")); - bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/composer/send_html", NULL); - gtk_toggle_button_set_active (prefs->send_html, bool); - g_signal_connect (prefs->send_html, "toggled", G_CALLBACK (toggle_button_toggled), prefs); + gtk_toggle_button_set_active (prefs->send_html, mail_config_get_send_html ()); + gtk_signal_connect (GTK_OBJECT (prefs->send_html), "toggled", + 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); + gtk_signal_connect (GTK_OBJECT (prefs->auto_smileys), "toggled", + 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); - g_signal_connect (prefs->prompt_empty_subject, "toggled", G_CALLBACK (toggle_button_toggled), prefs); + gtk_toggle_button_set_active (prefs->prompt_empty_subject, mail_config_get_prompt_empty_subject ()); + gtk_signal_connect (GTK_OBJECT (prefs->prompt_empty_subject), "toggled", + toggle_button_toggled, prefs); prefs->prompt_bcc_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptBccOnly")); - bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/prompts/only_bcc", NULL); - gtk_toggle_button_set_active (prefs->prompt_bcc_only, bool); - g_signal_connect (prefs->prompt_bcc_only, "toggled", G_CALLBACK (toggle_button_toggled), prefs); + gtk_toggle_button_set_active (prefs->prompt_bcc_only, mail_config_get_prompt_only_bcc ()); + gtk_signal_connect (GTK_OBJECT (prefs->prompt_bcc_only), "toggled", + 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 ()); + menu = e_charset_picker_new (mail_config_get_default_charset ()); gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu)); 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_signal_connect (GTK_OBJECT (prefs->pman), "changed", toggle_button_toggled, prefs); + gtk_object_ref (GTK_OBJECT (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")); - model = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER); - gtk_tree_view_set_model (prefs->language, (GtkTreeModel *) model); - gtk_tree_view_insert_column_with_attributes (prefs->language, -1, _("Enabled"), - gtk_cell_renderer_toggle_new (), - "active", 0, - NULL); - 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); -#if 0 - gtk_clist_set_column_justification (prefs->language, 0, GTK_JUSTIFY_RIGHT); - gtk_clist_set_column_auto_resize (prefs->language, 0, TRUE); -#endif - + prefs->language = GTK_CLIST (glade_xml_get_widget (gui, "clistSpellCheckLanguage")); prefs->spell_able_button = glade_xml_get_widget (gui, "buttonSpellCheckEnable"); info_pixmap = glade_xml_get_widget (gui, "pixmapSpellInfo"); - gtk_image_set_from_file (GTK_IMAGE (info_pixmap), EVOLUTION_IMAGES "/info-bulb.png"); + gtk_clist_set_column_justification (prefs->language, 0, GTK_JUSTIFY_RIGHT); + gtk_clist_set_column_auto_resize (prefs->language, 0, TRUE); + gnome_pixmap_load_file (GNOME_PIXMAP (info_pixmap), EVOLUTION_IMAGES "/info-bulb.png"); + if (!spell_setup_check_options (prefs)) { gtk_widget_hide (GTK_WIDGET (prefs->colour)); gtk_widget_hide (GTK_WIDGET (prefs->language)); @@ -859,55 +859,48 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) /* Forwards and Replies */ prefs->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle")); - style = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/format/forward_style", NULL); - gtk_option_menu_set_history (prefs->forward_style, style); + gtk_option_menu_set_history (prefs->forward_style, mail_config_get_default_forward_style ()); style = 0; gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->forward_style)), attach_style_info, &style); option_menu_connect (prefs->forward_style, prefs); prefs->reply_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuReplyStyle")); - style = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/format/reply_style", NULL); - gtk_option_menu_set_history (prefs->reply_style, style); + gtk_option_menu_set_history (prefs->reply_style, mail_config_get_default_reply_style ()); style = 0; gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->reply_style)), attach_style_info, &style); option_menu_connect (prefs->reply_style, prefs); /* Signatures */ - dialog = (GtkDialog *) gtk_dialog_new (); - prefs->sig_script_dialog = (GtkWidget *) dialog; - gtk_dialog_add_buttons (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, - GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); - gtk_window_set_title ((GtkWindow *) dialog, _("Add script signature")); - g_signal_connect (dialog, "response", G_CALLBACK (sig_add_script_response), prefs); - widget = glade_xml_get_widget (prefs->sig_script_gui, "vbox_add_script_signature"); - gtk_box_pack_start_defaults ((GtkBox *) dialog->vbox, widget); - prefs->sig_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureAdd")); - g_signal_connect (prefs->sig_add, "clicked", G_CALLBACK (sig_add_cb), prefs); + gtk_signal_connect (GTK_OBJECT (prefs->sig_add), "clicked", + GTK_SIGNAL_FUNC (sig_add), prefs); - glade_xml_signal_connect_data (gui, "cmdSignatureAddScriptClicked", - G_CALLBACK (sig_add_script_cb), prefs); + prefs->sig_script_dialog = gnome_dialog_new (_("Add script signature"), + _("Add Signature"), GNOME_STOCK_BUTTON_CANCEL, NULL); + gnome_dialog_close_hides (GNOME_DIALOG (prefs->sig_script_dialog), TRUE); + gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG (prefs->sig_script_dialog)->vbox), + glade_xml_get_widget (prefs->sig_script_gui, "vbox_add_script_signature")); + gnome_dialog_button_connect (GNOME_DIALOG (prefs->sig_script_dialog), 0, sig_add_script_add, prefs); + gnome_dialog_button_connect (GNOME_DIALOG (prefs->sig_script_dialog), 1, sig_add_script_cancel, prefs); + + glade_xml_signal_connect_data (gui, "cmdSignatureAddScriptClicked", sig_add_script, prefs); prefs->sig_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureEdit")); - g_signal_connect (prefs->sig_edit, "clicked", G_CALLBACK (sig_edit_cb), prefs); + gtk_signal_connect (GTK_OBJECT (prefs->sig_edit), "clicked", + GTK_SIGNAL_FUNC (sig_edit), prefs); prefs->sig_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureDelete")); - g_signal_connect (prefs->sig_delete, "clicked", G_CALLBACK (sig_delete_cb), prefs); - - prefs->sig_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "clistSignatures")); - model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); - gtk_tree_view_set_model (prefs->sig_list, (GtkTreeModel *)model); - gtk_tree_view_insert_column_with_attributes (prefs->sig_list, -1, _("Signature(s)"), - gtk_cell_renderer_text_new (), - "text", 0, - NULL); - selection = gtk_tree_view_get_selection (prefs->sig_list); - gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); - g_signal_connect (selection, "changed", G_CALLBACK (sig_selection_changed), prefs); - - sig_fill_clist (prefs->sig_list); + gtk_signal_connect (GTK_OBJECT (prefs->sig_delete), "clicked", + GTK_SIGNAL_FUNC (sig_delete), prefs); + + prefs->sig_clist = GTK_CLIST (glade_xml_get_widget (gui, "clistSignatures")); + sig_fill_clist (prefs->sig_clist); + gtk_signal_connect (GTK_OBJECT (prefs->sig_clist), "select_row", + GTK_SIGNAL_FUNC (sig_row_select), prefs); + gtk_signal_connect (GTK_OBJECT (prefs->sig_clist), "unselect_row", + GTK_SIGNAL_FUNC (sig_row_unselect), prefs); if (mail_config_get_signature_list () == NULL) { gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, FALSE); gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, FALSE); @@ -916,10 +909,13 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs) /* preview GtkHTML widget */ widget = glade_xml_get_widget (gui, "scrolled-sig"); prefs->sig_preview = (GtkHTML *) gtk_html_new (); - g_signal_connect (prefs->sig_preview, "url_requested", G_CALLBACK (url_requested), NULL); + gtk_signal_connect (GTK_OBJECT (prefs->sig_preview), "url_requested", GTK_SIGNAL_FUNC (url_requested), NULL); gtk_widget_show (GTK_WIDGET (prefs->sig_preview)); gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (prefs->sig_preview)); + if (GTK_CLIST (prefs->sig_clist)->rows) + gtk_clist_select_row (GTK_CLIST (prefs->sig_clist), 0, 0); + mail_config_signature_register_client ((MailConfigSignatureClient) sig_event_client, prefs); } @@ -929,7 +925,7 @@ mail_composer_prefs_new (void) { MailComposerPrefs *new; - new = (MailComposerPrefs *) g_object_new (mail_composer_prefs_get_type (), NULL); + new = (MailComposerPrefs *) gtk_type_new (mail_composer_prefs_get_type ()); mail_composer_prefs_construct (new); return (GtkWidget *) new; @@ -946,45 +942,35 @@ mail_composer_prefs_apply (MailComposerPrefs *prefs) /* General tab */ /* Default Behavior */ - gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/composer/send_html", - gtk_toggle_button_get_active (prefs->send_html), NULL); - - gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/empty_subject", - gtk_toggle_button_get_active (prefs->prompt_empty_subject), NULL); - - gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/only_bcc", - gtk_toggle_button_get_active (prefs->prompt_bcc_only), NULL); + mail_config_set_send_html (gtk_toggle_button_get_active (prefs->send_html)); + mail_config_set_prompt_empty_subject (gtk_toggle_button_get_active (prefs->prompt_empty_subject)); + mail_config_set_prompt_only_bcc (gtk_toggle_button_get_active (prefs->prompt_bcc_only)); menu = gtk_option_menu_get_menu (prefs->charset); - if (!(string = e_charset_picker_get_charset (menu))) - string = g_strdup (e_iconv_locale_charset ()); - - gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/composer/charset", string, NULL); - g_free (string); + string = e_charset_picker_get_charset (menu); + if (string) { + mail_config_set_default_charset (string); + g_free (string); + } /* Spell Checking */ -#warning "gtkhtml propmanager" -#if 0 gtk_html_propmanager_apply (prefs->pman); -#endif spell_apply (prefs); /* Forwards and Replies */ menu = gtk_option_menu_get_menu (prefs->forward_style); item = gtk_menu_get_active (GTK_MENU (menu)); - val = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "style")); - gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/format/forward_style", val, NULL); + val = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (item), "style")); + mail_config_set_default_forward_style (val); menu = gtk_option_menu_get_menu (prefs->reply_style); item = gtk_menu_get_active (GTK_MENU (menu)); - val = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "style")); - gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/format/reply_style", val, NULL); + val = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (item), "style")); + mail_config_set_default_reply_style (val); /* Keyboard Shortcuts */ /* FIXME: implement me */ /* Signatures */ /* FIXME: implement me */ - - gconf_client_suggest_sync (prefs->gconf, NULL); } |