2 * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 2007-2013 The Claws Mail Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "claws-features.h"
28 #include <glib/gi18n.h>
30 #include <gdk/gdkkeysyms.h>
38 #include "prefs_gtk.h"
41 #include "inputdialog.h"
42 #include "manage_window.h"
43 #include "mainwindow.h"
44 #include "prefs_common.h"
45 #include "alertpanel.h"
46 #include "summaryview.h"
53 TAG_SELECTED_INCONSISTENT
,
59 static gint
tag_cmp_func (GtkTreeModel
*model
, GtkTreeIter
*a
, GtkTreeIter
*b
, gpointer userdata
)
63 gtk_tree_model_get(model
, a
, TAG_NAME
, &name1
, -1);
64 gtk_tree_model_get(model
, b
, TAG_NAME
, &name2
, -1);
67 return name2
== NULL
? 0:1;
70 return name1
== NULL
? 0:1;
72 return g_utf8_collate(name1
,name2
);
75 static void apply_window_create(void);
77 static struct TagApplyWindow
89 GdkCursor
*watch_cursor
;
93 #define APPLYWINDOW_LOCK() { \
94 gdk_window_set_cursor(gtk_widget_get_window(applywindow.window), applywindow.watch_cursor); \
95 applywindow.busy = TRUE; \
98 #define APPLYWINDOW_UNLOCK() { \
99 gdk_window_set_cursor(gtk_widget_get_window(applywindow.window), NULL); \
100 applywindow.busy = FALSE; \
103 static void apply_window_load_tags (void);
104 static void apply_window_insert_check_column(GtkWidget
*list_view
);
106 void tag_apply_open(GSList
*msglist
)
108 if (!applywindow
.window
)
109 apply_window_create();
111 manage_window_set_transient(GTK_WINDOW(applywindow
.window
));
112 gtk_widget_grab_focus(applywindow
.close_btn
);
114 applywindow
.msglist
= msglist
;
115 apply_window_load_tags();
117 if (msglist
&& !applywindow
.has_tag_col
) {
118 apply_window_insert_check_column(applywindow
.taglist
);
119 applywindow
.has_tag_col
= TRUE
;
121 if (!msglist
&& applywindow
.has_tag_col
) {
122 gtk_tree_view_remove_column(GTK_TREE_VIEW(applywindow
.taglist
),
123 gtk_tree_view_get_column(GTK_TREE_VIEW(applywindow
.taglist
), 0));
124 applywindow
.has_tag_col
= FALSE
;
127 gtk_widget_show(applywindow
.window
);
128 gtk_widget_grab_focus(applywindow
.taglist
);
129 gtk_window_set_modal(GTK_WINDOW(applywindow
.window
), TRUE
);
132 static GtkListStore
* apply_window_create_data_store(void)
134 GtkListStore
*store
= gtk_list_store_new(N_TAG_EDIT_COLUMNS
,
140 GtkTreeSortable
*sortable
= GTK_TREE_SORTABLE(store
);
142 gtk_tree_sortable_set_sort_func(sortable
, 0, tag_cmp_func
,
148 static void tag_apply_selected_toggled(GtkCellRendererToggle
*widget
,
150 GtkWidget
*list_view
);
151 static void tag_apply_selected_edited(GtkCellRendererText
*widget
,
152 gchar
*arg1
, gchar
*arg2
,
153 GtkWidget
*list_view
);
155 static void apply_window_insert_check_column(GtkWidget
*list_view
)
157 GtkTreeViewColumn
*column
;
158 GtkCellRenderer
*renderer
;
160 renderer
= gtk_cell_renderer_toggle_new();
161 g_object_set(renderer
,
165 column
= gtk_tree_view_column_new_with_attributes
168 "active", TAG_SELECTED
,
169 "inconsistent", TAG_SELECTED_INCONSISTENT
,
171 gtk_tree_view_column_set_alignment (column
, 0.5);
172 gtk_tree_view_insert_column(GTK_TREE_VIEW(list_view
), column
, 0);
173 g_signal_connect(G_OBJECT(renderer
), "toggled",
174 G_CALLBACK(tag_apply_selected_toggled
),
178 static void apply_window_create_list_view_columns(GtkWidget
*list_view
)
180 GtkTreeViewColumn
*column
;
181 GtkCellRenderer
*renderer
;
183 renderer
= gtk_cell_renderer_text_new();
184 g_object_set(G_OBJECT(renderer
), "editable", TRUE
, NULL
);
186 column
= gtk_tree_view_column_new_with_attributes
191 gtk_tree_view_append_column(GTK_TREE_VIEW(list_view
), column
);
192 gtk_tree_view_column_set_resizable(column
, TRUE
);
193 gtk_tree_view_set_search_column(GTK_TREE_VIEW(list_view
),
195 g_signal_connect(G_OBJECT(renderer
), "edited",
196 G_CALLBACK(tag_apply_selected_edited
),
201 static GtkWidget
*apply_popup_menu
= NULL
;
203 static void apply_popup_delete (GtkAction
*action
, gpointer data
)
208 SummaryView
*summaryview
= NULL
;
210 if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection
211 (GTK_TREE_VIEW(applywindow
.taglist
)),
215 if (alertpanel(_("Delete tag"),
216 _("Do you really want to delete this tag?"),
217 GTK_STOCK_CANCEL
, GTK_STOCK_DELETE
, NULL
) != G_ALERTALTERNATE
)
222 /* XXX: Here's the reason why we need to store the original
223 * pointer: we search the slist for it. */
224 gtk_tree_model_get(model
, &sel
,
227 gtk_list_store_remove(GTK_LIST_STORE(model
), &sel
);
228 if (mainwindow_get_mainwindow() != NULL
)
229 summaryview
= mainwindow_get_mainwindow()->summaryview
;
231 summary_set_tag(summaryview
, -id
, NULL
);
234 APPLYWINDOW_UNLOCK();
237 static void apply_popup_delete_all (GtkAction
*action
, gpointer data
)
241 SummaryView
*summaryview
= NULL
;
243 if (alertpanel(_("Delete all tags"),
244 _("Do you really want to delete all tags?"),
245 GTK_STOCK_CANCEL
, GTK_STOCK_DELETE
, NULL
) != G_ALERTALTERNATE
)
250 model
= gtk_tree_view_get_model(GTK_TREE_VIEW(applywindow
.taglist
));
251 gtk_list_store_clear(GTK_LIST_STORE(model
));
253 if (mainwindow_get_mainwindow() != NULL
)
254 summaryview
= mainwindow_get_mainwindow()->summaryview
;
255 cur
= tags
= tags_get_list();
256 for (; cur
; cur
= cur
->next
) {
257 gint id
= GPOINTER_TO_INT(cur
->data
);
259 summary_set_tag(summaryview
, -id
, NULL
);
265 APPLYWINDOW_UNLOCK();
268 static GtkActionEntry apply_popup_actions
[] =
270 { "EditTags", NULL
, "EditTags" },
271 { "EditTags/Delete", NULL
, N_("_Delete"), NULL
, "Delete tag", G_CALLBACK(apply_popup_delete
) },
272 { "EditTags/DeleteAll", NULL
, N_("Delete _all"), NULL
, "Delete all tags", G_CALLBACK(apply_popup_delete_all
) }
275 static gint
apply_list_btn_pressed(GtkWidget
*widget
, GdkEventButton
*event
,
276 GtkTreeView
*list_view
)
278 GtkUIManager
*gui_manager
= gtkut_ui_manager();
280 if (applywindow
.busy
)
283 if (event
&& event
->button
== 3) {
284 GtkTreeModel
*model
= gtk_tree_view_get_model(list_view
);
288 if (!apply_popup_menu
) {
289 (void) cm_menu_create_action_group("EditTags", apply_popup_actions
,
290 G_N_ELEMENTS(apply_popup_actions
), (gpointer
)list_view
);
292 MENUITEM_ADDUI("/Menus", "EditTags", "EditTags", GTK_UI_MANAGER_MENU
)
293 MENUITEM_ADDUI("/Menus/EditTags", "Delete", "EditTags/Delete",
294 GTK_UI_MANAGER_MENUITEM
)
295 MENUITEM_ADDUI("/Menus/EditTags", "DeleteAll", "EditTags/DeleteAll",
296 GTK_UI_MANAGER_MENUITEM
)
298 apply_popup_menu
= gtk_menu_item_get_submenu(GTK_MENU_ITEM(
299 gtk_ui_manager_get_widget(gui_manager
, "/Menus/EditTags")) );
302 /* grey out popup menu items if list is empty */
303 non_empty
= gtk_tree_model_get_iter_first(model
, &iter
);
304 cm_menu_set_sensitive("EditTags/Delete", non_empty
);
305 cm_menu_set_sensitive("EditTags/DeleteAll", non_empty
);
307 gtk_menu_popup(GTK_MENU(apply_popup_menu
),
308 NULL
, NULL
, NULL
, NULL
,
309 event
->button
, event
->time
);
316 static gboolean
apply_list_popup_menu(GtkWidget
*widget
, gpointer data
)
318 GtkTreeView
*list_view
= (GtkTreeView
*)data
;
319 GdkEventButton event
;
322 event
.time
= gtk_get_current_event_time();
324 apply_list_btn_pressed(NULL
, &event
, list_view
);
329 static GtkWidget
*apply_window_list_view_create (void)
331 GtkTreeView
*list_view
;
332 GtkTreeSelection
*selector
;
335 model
= GTK_TREE_MODEL(apply_window_create_data_store());
336 list_view
= GTK_TREE_VIEW(gtk_tree_view_new_with_model(model
));
337 g_object_unref(model
);
338 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model
), TAG_NAME
, GTK_SORT_ASCENDING
);
340 gtk_tree_view_set_rules_hint(list_view
, prefs_common
.use_stripes_everywhere
);
342 selector
= gtk_tree_view_get_selection(list_view
);
343 gtk_tree_selection_set_mode(selector
, GTK_SELECTION_BROWSE
);
345 /* create the columns */
346 apply_window_create_list_view_columns(GTK_WIDGET(list_view
));
348 g_signal_connect(G_OBJECT(list_view
), "popup-menu",
349 G_CALLBACK(apply_list_popup_menu
), list_view
);
350 g_signal_connect(G_OBJECT(list_view
), "button-press-event",
351 G_CALLBACK(apply_list_btn_pressed
), list_view
);
352 return GTK_WIDGET(list_view
);
356 static void apply_window_list_view_clear_tags(GtkWidget
*list_view
);
358 static void apply_window_close(void)
360 if (applywindow
.busy
)
363 if (applywindow
.msglist
)
364 g_slist_free(applywindow
.msglist
);
365 applywindow
.msglist
= NULL
;
367 main_window_reflect_tags_changes(mainwindow_get_mainwindow());
368 APPLYWINDOW_UNLOCK();
369 apply_window_list_view_clear_tags(applywindow
.taglist
);
370 gtk_widget_hide(applywindow
.window
);
371 gtk_window_set_modal(GTK_WINDOW(applywindow
.window
), FALSE
);
374 static void apply_window_close_cb(GtkWidget
*widget
,
377 apply_window_close();
380 static void apply_window_list_view_insert_tag(GtkWidget
*list_view
,
381 GtkTreeIter
*row_iter
,
384 typedef struct FindTagInStore
{
390 static gboolean
find_tag_in_store(GtkTreeModel
*model
,
393 FindTagInStore
*data
)
396 gtk_tree_model_get(model
, iter
, TAG_DATA
, &tmp
, -1);
398 if (data
->tag_id
== GPOINTER_TO_INT(tmp
)) {
399 data
->path
= path
; /* signal we found it */
407 static void apply_window_add_tag(void)
409 gchar
*new_tag
= gtk_editable_get_chars(GTK_EDITABLE(applywindow
.add_entry
), 0, -1);
411 if (new_tag
&& *new_tag
) {
414 if (!(IS_NOT_RESERVED_TAG(new_tag
))) {
415 alertpanel_error(_("You entered a reserved tag name, please choose another instead."));
419 id
= tags_get_id_for_str(new_tag
);
422 id
= tags_add_tag(new_tag
);
424 if (mainwindow_get_mainwindow())
426 mainwindow_get_mainwindow()->summaryview
,
428 main_window_reflect_tags_changes(mainwindow_get_mainwindow());
429 apply_window_list_view_insert_tag(applywindow
.taglist
, NULL
, id
);
433 gtk_tree_model_foreach(gtk_tree_view_get_model
434 (GTK_TREE_VIEW(applywindow
.taglist
)),
435 (GtkTreeModelForeachFunc
) find_tag_in_store
,
438 GtkTreeSelection
*selection
;
440 GtkTreeModel
*model
= gtk_tree_view_get_model(
441 GTK_TREE_VIEW(applywindow
.taglist
));
443 if (mainwindow_get_mainwindow())
445 mainwindow_get_mainwindow()->summaryview
,
447 selection
= gtk_tree_view_get_selection(GTK_TREE_VIEW(applywindow
.taglist
));
448 gtk_tree_selection_select_iter(selection
, &fis
.iter
);
449 path
= gtk_tree_model_get_path(model
, &fis
.iter
);
450 /* XXX returned path may not be valid??? create new one to be sure */
451 gtk_tree_view_set_cursor(GTK_TREE_VIEW(applywindow
.taglist
), path
, NULL
, FALSE
);
452 apply_window_list_view_insert_tag(applywindow
.taglist
, &fis
.iter
, id
);
453 gtk_tree_path_free(path
);
455 APPLYWINDOW_UNLOCK();
457 alertpanel_error(_("Tag is not set."));
462 static void apply_window_add_tag_cb(GtkWidget
*widget
,
465 if (applywindow
.busy
)
467 apply_window_add_tag();
468 gtk_entry_set_text(GTK_ENTRY(applywindow
.add_entry
), "");
469 gtk_widget_grab_focus(applywindow
.taglist
);
472 static void apply_window_del_tag_cb(GtkWidget
*widget
,
475 if (applywindow
.busy
)
477 apply_popup_delete(NULL
, NULL
);
478 gtk_widget_grab_focus(applywindow
.taglist
);
481 static gboolean
apply_window_key_pressed(GtkWidget
*widget
, GdkEventKey
*event
, gpointer data
)
483 if (applywindow
.busy
)
485 if (event
&& event
->keyval
== GDK_KEY_Escape
)
486 apply_window_close();
487 else if (event
&& event
->keyval
== GDK_KEY_Delete
)
488 apply_popup_delete(NULL
, NULL
);
492 static gboolean
apply_window_add_key_pressed(GtkWidget
*widget
, GdkEventKey
*event
, gpointer data
)
494 if (applywindow
.busy
)
497 if (event
&& (event
->keyval
== GDK_KEY_KP_Enter
|| event
->keyval
== GDK_KEY_Return
)) {
498 apply_window_add_tag();
499 gtk_entry_set_text(GTK_ENTRY(applywindow
.add_entry
), "");
500 gtk_widget_grab_focus(applywindow
.taglist
);
506 static void apply_window_create(void)
513 GtkWidget
*close_btn
;
514 GtkWidget
*scrolledwin
;
515 GtkWidget
*new_tag_label
;
516 GtkWidget
*new_tag_entry
;
520 window
= gtkut_window_new(GTK_WINDOW_TOPLEVEL
, "tag_apply_window");
521 gtk_window_set_title (GTK_WINDOW(window
),
522 C_("Dialog title", "Apply tags"));
524 gtk_container_set_border_width (GTK_CONTAINER (window
), 8);
525 gtk_window_set_position (GTK_WINDOW (window
), GTK_WIN_POS_CENTER
);
526 gtk_window_set_resizable(GTK_WINDOW (window
), TRUE
);
527 g_signal_connect(G_OBJECT(window
), "delete_event",
528 G_CALLBACK(apply_window_close_cb
), NULL
);
529 g_signal_connect(G_OBJECT(window
), "key_press_event",
530 G_CALLBACK(apply_window_key_pressed
), NULL
);
531 MANAGE_WINDOW_SIGNALS_CONNECT (window
);
533 vbox1
= gtk_vbox_new(FALSE
, 6);
534 hbox1
= gtk_hbox_new(FALSE
, 6);
536 new_tag_label
= gtk_label_new(_("New tag:"));
537 gtk_misc_set_alignment(GTK_MISC(new_tag_label
), 0, 0.5);
538 gtk_box_pack_start(GTK_BOX(hbox1
), new_tag_label
, FALSE
, FALSE
, 0);
540 new_tag_entry
= gtk_entry_new();
541 gtk_box_pack_start(GTK_BOX(hbox1
), new_tag_entry
, FALSE
, FALSE
, 0);
542 g_signal_connect(G_OBJECT(new_tag_entry
), "key_press_event",
543 G_CALLBACK(apply_window_add_key_pressed
), NULL
);
545 add_btn
= gtk_button_new_from_stock(GTK_STOCK_ADD
);
546 gtk_box_pack_start(GTK_BOX(hbox1
), add_btn
, FALSE
, FALSE
, 0);
548 del_btn
= gtk_button_new_from_stock(GTK_STOCK_DELETE
);
549 gtk_box_pack_start(GTK_BOX(hbox1
), del_btn
, FALSE
, FALSE
, 0);
551 close_btn
= gtk_button_new_from_stock(GTK_STOCK_CLOSE
);
552 gtk_box_pack_end(GTK_BOX(hbox1
), close_btn
, FALSE
, FALSE
, 0);
554 gtk_widget_show(new_tag_label
);
555 gtk_widget_show(new_tag_entry
);
556 gtk_widget_show(close_btn
);
557 gtk_widget_show(add_btn
);
558 gtk_widget_show(del_btn
);
560 g_signal_connect(G_OBJECT(close_btn
), "clicked",
561 G_CALLBACK(apply_window_close_cb
), NULL
);
562 g_signal_connect(G_OBJECT(add_btn
), "clicked",
563 G_CALLBACK(apply_window_add_tag_cb
), NULL
);
564 g_signal_connect(G_OBJECT(del_btn
), "clicked",
565 G_CALLBACK(apply_window_del_tag_cb
), NULL
);
567 taglist
= apply_window_list_view_create();
569 label
= gtk_label_new(_("Please select tags to apply/remove. Changes are immediate."));
570 gtk_misc_set_alignment(GTK_MISC(label
), 0, 0.5);
571 gtk_box_pack_start(GTK_BOX(vbox1
), label
, FALSE
, TRUE
, 0);
573 scrolledwin
= gtk_scrolled_window_new(NULL
, NULL
);
574 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin
),
575 GTK_POLICY_AUTOMATIC
, GTK_POLICY_ALWAYS
);
577 gtk_widget_set_size_request(scrolledwin
, 500, 250);
579 gtk_container_add(GTK_CONTAINER(scrolledwin
), taglist
);
580 gtk_box_pack_start(GTK_BOX(vbox1
), scrolledwin
, TRUE
, TRUE
, 0);
581 gtk_box_pack_start(GTK_BOX(vbox1
), hbox1
, FALSE
, FALSE
, 0);
583 gtk_widget_show(label
);
584 gtk_widget_show(scrolledwin
);
585 gtk_widget_show(taglist
);
586 gtk_widget_show(hbox1
);
587 gtk_widget_show(vbox1
);
588 gtk_widget_show(close_btn
);
589 gtk_container_add(GTK_CONTAINER (window
), vbox1
);
591 applywindow
.window
= window
;
592 applywindow
.hbox1
= hbox1
;
593 applywindow
.vbox1
= vbox1
;
594 applywindow
.label
= label
;
595 applywindow
.taglist
= taglist
;
596 applywindow
.close_btn
= close_btn
;
597 applywindow
.add_btn
= add_btn
;
598 applywindow
.add_entry
= new_tag_entry
;
599 applywindow
.has_tag_col
= FALSE
;
600 applywindow
.watch_cursor
= gdk_cursor_new(GDK_WATCH
);
603 static void apply_window_list_view_clear_tags(GtkWidget
*list_view
)
605 GtkListStore
*list_store
= GTK_LIST_STORE(gtk_tree_view_get_model
606 (GTK_TREE_VIEW(list_view
)));
607 gtk_list_store_clear(list_store
);
611 static void tag_apply_selected_toggled(GtkCellRendererToggle
*widget
,
613 GtkWidget
*list_view
)
616 GtkTreeModel
*model
= gtk_tree_view_get_model(GTK_TREE_VIEW(list_view
));
617 gboolean enabled
= TRUE
, set
= FALSE
;
620 SummaryView
*summaryview
= NULL
;
622 if (applywindow
.busy
)
625 if (mainwindow_get_mainwindow() != NULL
)
626 summaryview
= mainwindow_get_mainwindow()->summaryview
;
628 if (!gtk_tree_model_get_iter_from_string(model
, &iter
, path
))
631 gtk_tree_model_get(model
, &iter
,
632 TAG_SELECTED
, &enabled
,
637 tag_id
= GPOINTER_TO_INT(tmp
);
639 gtk_list_store_set(GTK_LIST_STORE(model
), &iter
,
641 TAG_SELECTED_INCONSISTENT
, FALSE
,
646 summary_set_tag(summaryview
, set
? tag_id
: -tag_id
, NULL
);
647 APPLYWINDOW_UNLOCK();
650 static void tag_apply_selected_edited(GtkCellRendererText
*widget
,
651 gchar
*path
, gchar
*new_text
,
652 GtkWidget
*list_view
)
655 GtkTreeModel
*model
= gtk_tree_view_get_model(GTK_TREE_VIEW(list_view
));
658 SummaryView
*summaryview
= NULL
;
661 if (applywindow
.busy
)
664 if (mainwindow_get_mainwindow() != NULL
)
665 summaryview
= mainwindow_get_mainwindow()->summaryview
;
667 if (!gtk_tree_model_get_iter_from_string(model
, &iter
, path
))
670 if (!new_text
|| !*new_text
)
673 gtk_tree_model_get(model
, &iter
,
674 TAG_SELECTED
, &selected
,
678 tag_id
= GPOINTER_TO_INT(tmp
);
683 summary_set_tag(summaryview
, -tag_id
, NULL
);
686 tags_update_tag(tag_id
, new_text
);
688 gtk_list_store_set(GTK_LIST_STORE(model
), &iter
,
693 summary_set_tag(summaryview
, tag_id
, NULL
);
696 summary_set_tag(summaryview
, 0, NULL
);
698 APPLYWINDOW_UNLOCK();
701 static void apply_window_get_selected_state(gint tag
, gboolean
*selected
, gboolean
*selected_inconsistent
)
703 GSList
*cur
= applywindow
.msglist
;
705 gint num_selected
= 0;
706 for (; cur
; cur
= cur
->next
) {
707 MsgInfo
*msginfo
= (MsgInfo
*)cur
->data
;
709 if (msginfo
->tags
&& g_slist_find(msginfo
->tags
, GINT_TO_POINTER(tag
))) {
714 if (num_selected
> 0 && num_selected
< num_mails
)
715 *selected_inconsistent
= TRUE
;
717 *selected_inconsistent
= FALSE
;
720 static void apply_window_list_view_insert_tag(GtkWidget
*list_view
,
721 GtkTreeIter
*row_iter
,
725 GtkListStore
*list_store
= GTK_LIST_STORE(gtk_tree_view_get_model
726 (GTK_TREE_VIEW(list_view
)));
727 const gchar
*name
= tags_get_tag(tag
);
728 gboolean selected
= FALSE
, selected_inconsistent
= FALSE
;
730 apply_window_get_selected_state(tag
, &selected
, &selected_inconsistent
);
731 if (row_iter
== NULL
) {
733 gtk_list_store_append(list_store
, &iter
);
734 gtk_list_store_set(list_store
, &iter
,
735 TAG_SELECTED
, selected
,
736 TAG_SELECTED_INCONSISTENT
, selected_inconsistent
,
738 TAG_DATA
, GINT_TO_POINTER(tag
),
741 gtk_list_store_set(list_store
, row_iter
,
742 TAG_SELECTED
, selected
,
743 TAG_SELECTED_INCONSISTENT
, selected_inconsistent
,
745 TAG_DATA
, GINT_TO_POINTER(tag
),
750 static void apply_window_load_tags (void)
754 apply_window_list_view_clear_tags(applywindow
.taglist
);
756 cur
= tags
= tags_get_list();
757 for (; cur
; cur
= cur
->next
) {
758 id
= GPOINTER_TO_INT(cur
->data
);
759 apply_window_list_view_insert_tag(applywindow
.taglist
, NULL
, id
);