#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <gtk/gtkoptionmenu.h>
#include <gdk/gdkkeysyms.h>
#include <stdio.h>
#include <stdlib.h>
#include "stock_pixmap.h"
#include "manage_window.h"
+#include "combobox.h"
#include "gtkutils.h"
#include "mainwindow.h"
#include "alertpanel.h"
STOCK_PIXMAP_MAIL_REPLY,
STOCK_PIXMAP_MAIL_REPLY_TO_ALL,
STOCK_PIXMAP_MAIL_REPLY_TO_AUTHOR,
+ STOCK_PIXMAP_MAIL_REPLY_TO_LIST,
STOCK_PIXMAP_MAIL_SEND,
STOCK_PIXMAP_MAIL_SEND_QUEUE,
STOCK_PIXMAP_MAIL_SIGN,
STOCK_PIXMAP_GO_FOLDERS,
STOCK_PIXMAP_MIME_TEXT_PLAIN,
STOCK_PIXMAP_MIME_TEXT_HTML,
+ STOCK_PIXMAP_MIME_TEXT_PATCH,
STOCK_PIXMAP_MIME_APPLICATION,
STOCK_PIXMAP_MIME_IMAGE,
STOCK_PIXMAP_MIME_AUDIO,
STOCK_PIXMAP_MIME_MESSAGE,
STOCK_PIXMAP_SPAM_BTN,
STOCK_PIXMAP_HAM_BTN,
+ STOCK_PIXMAP_TRASH,
+ STOCK_PIXMAP_DELETE,
+ STOCK_PIXMAP_CANCEL,
STOCK_PIXMAP_EMPTY, /* last entry */
};
item->index = toolbar_ret_val_from_descr(event);
g_free(event);
- /* TODO: save A_SYL_ACTIONS only if they are still active */
+ /* TODO: save A_CLAWS_ACTIONS only if they are still active */
toolbar_set_list_item(item, prefs_toolbar->source);
g_free(item->file);
static void prefs_toolbar_populate(ToolbarPage *prefs_toolbar)
{
- GList *cur;
- GSList *cur2;
+ GSList *cur;
gchar *act, *act_name;
- gtk_combo_box_append_text(GTK_COMBO_BOX(prefs_toolbar->item_type_combo),
- _("Internal Function"));
- gtk_combo_box_append_text(GTK_COMBO_BOX(prefs_toolbar->item_type_combo),
- _("User Action"));
- gtk_combo_box_append_text(GTK_COMBO_BOX(prefs_toolbar->item_type_combo),
- _("Separator"));
-
prefs_toolbar->combo_action_list = toolbar_get_action_items(prefs_toolbar->source);
- for(cur = prefs_toolbar->combo_action_list; cur != NULL; cur = cur->next) {
- act = (gchar *)cur->data;
- gtk_combo_box_append_text(GTK_COMBO_BOX(prefs_toolbar->item_func_combo),
- act);
- }
-
+ combobox_set_popdown_strings(GTK_COMBO_BOX(prefs_toolbar->item_func_combo),
+ prefs_toolbar->combo_action_list);
+
/* get currently defined sylpheed actions */
if (prefs_common.actions_list != NULL) {
- for (cur2 = prefs_common.actions_list; cur2 != NULL; cur2 = cur2->next) {
- act = (gchar *)cur2->data;
+ for (cur = prefs_common.actions_list; cur != NULL; cur = cur->next) {
+ act = (gchar *)cur->data;
get_action_name(act, &act_name);
gtk_combo_box_append_text(
}
- gtk_combo_box_set_active(GTK_COMBO_BOX(prefs_toolbar->item_type_combo), 0);
gtk_combo_box_set_active(GTK_COMBO_BOX(prefs_toolbar->item_func_combo), 0);
gtk_combo_box_set_active(GTK_COMBO_BOX(prefs_toolbar->item_action_combo), 0);
return;
}
} else
- event = toolbar_ret_descr_from_val(A_SYL_ACTIONS);
+ event = toolbar_ret_descr_from_val(A_CLAWS_ACTIONS);
text = gtk_editable_get_chars(
GTK_EDITABLE(prefs_toolbar->item_text_entry), 0 , -1);
return;
}
} else
- icon_event = toolbar_ret_descr_from_val(A_SYL_ACTIONS);
+ icon_event = toolbar_ret_descr_from_val(A_CLAWS_ACTIONS);
text = gtk_editable_get_chars(
GTK_EDITABLE(prefs_toolbar->item_text_entry), 0 , -1);
GtkWidget *reg_hbox;
GtkWidget *arrow;
GtkWidget *btn_hbox;
-#ifdef MAEMO
+#ifdef GENERIC_UMPC
GtkWidget *hbox;
#endif
GtkWidget *reg_btn;
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- item_type_combo = gtk_combo_box_new_text();
+ item_type_combo = combobox_text_new(FALSE, _("Internal Function"),
+ _("User Action"), _("Separator"), NULL);
gtk_widget_set_size_request(item_type_combo, 200, -1);
gtk_table_attach(GTK_TABLE(table), item_type_combo, 1, 3, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
prefs_toolbar);
default_btn = gtk_button_new_with_label(_(" Use default "));
-#ifndef MAEMO
+#ifndef GENERIC_UMPC
gtk_box_pack_end(GTK_BOX(reg_hbox), default_btn, FALSE, TRUE, 0);
#else
hbox = gtk_hbox_new(FALSE, 0);
ToolbarPage *page;
static gchar *mainpath[3], *messagepath[3], *composepath[3];
- mainpath[0] = _("Customize Toolbars");
+ mainpath[0] = _("Toolbars");
mainpath[1] = _("Main Window");
mainpath[2] = NULL;
prefs_gtk_register_page((PrefsPage *) page);
prefs_toolbar_mainwindow = page;
- messagepath[0] = _("Customize Toolbars");
+ messagepath[0] = _("Toolbars");
messagepath[1] = _("Message Window");
messagepath[2] = NULL;
prefs_gtk_register_page((PrefsPage *) page);
prefs_toolbar_messageview = page;
- composepath[0] = _("Customize Toolbars");
+ composepath[0] = _("Toolbars");
composepath[1] = _("Compose Window");
composepath[2] = NULL;
gtk_tree_view_column_set_title(column, _("Icon"));
renderer = gtk_cell_renderer_pixbuf_new();
gtk_tree_view_column_pack_start(column, renderer, FALSE);
-
+ gtk_tree_view_set_reorderable(list_view, TRUE);
/* tell pixbuf renderer it is only visible if
* the icon is not represented by text */
gtk_tree_view_column_set_cell_data_func(column, renderer,
gtk_entry_set_text(GTK_ENTRY(prefs_toolbar->item_text_entry),
icon_text);
- if (g_utf8_collate(toolbar_ret_descr_from_val(A_SYL_ACTIONS), descr) == 0) {
+ if (g_utf8_collate(toolbar_ret_descr_from_val(A_CLAWS_ACTIONS), descr) == 0) {
gtk_combo_box_set_active(GTK_COMBO_BOX(
prefs_toolbar->item_type_combo), ITEM_USER_ACTION);
}
}
+ gtk_widget_show(prefs_toolbar->item_action_combo);
+ gtk_widget_hide(prefs_toolbar->item_func_combo);
+
g_free(icon_text);
g_free(descr);
gtk_combo_box_set_active(GTK_COMBO_BOX(
prefs_toolbar->item_type_combo),ITEM_FUNCTION);
+ gtk_widget_hide(prefs_toolbar->item_action_combo);
+ gtk_widget_show(prefs_toolbar->item_func_combo);
g_free(icon_text);
g_free(descr);