GtkWidget *up_btn;
GtkWidget *down_btn;
- GtkWidget *dummy;
GList *combo_items;
gint i;
gchar *title[1];
- debug_print(_("Creating filtering setting window...\n"));
+ debug_print("Creating filtering setting window...\n");
window = gtk_window_new (GTK_WINDOW_DIALOG);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
gchar *prefix;
gchar *suffix;
gchar *dest_path;
+ gchar *old_path_with_sep;
gint destlen;
gint prefixlen;
gint oldpathlen;
g_return_if_fail(new_path != NULL);
oldpathlen = strlen(old_path);
+ old_path_with_sep = g_strconcat(old_path,G_DIR_SEPARATOR_S,NULL);
for (cur = global_processing; cur != NULL; cur = cur->next) {
FilteringProp *filtering = (FilteringProp *)cur->data;
g_free(prefix);
g_free(action->destination);
action->destination = dest_path;
+ } else { /* for non-leaf folders */
+ /* compare with trailing slash */
+ if (!strncmp(old_path_with_sep, action->destination, oldpathlen+1)) {
+
+ suffix = action->destination + oldpathlen + 1;
+ dest_path = g_strconcat(new_path,
+ G_DIR_SEPARATOR_S,
+ suffix, NULL);
+ g_free(action->destination);
+ action->destination = dest_path;
+ }
+ }
+ } else {
+ /* folder-moving a leaf */
+ if (!strcmp(old_path, action->destination)) {
+ dest_path = g_strdup(new_path);
+ g_free(action->destination);
+ action->destination = dest_path;
}
}
}
-
+ g_free(old_path_with_sep);
prefs_matcher_write_config();
}
FilteringProp *prop;
GSList * cur;
gchar * filtering_str;
- gchar * tmp;
GSList * prefs_filtering;
if (cur_item == NULL)
cond_str = gtk_entry_get_text(GTK_ENTRY(filtering.cond_entry));
if (*cond_str != '\0') {
- gchar * tmp;
-
- /* tmp = cond_str; */
matchers = matcher_parser_get_cond(cond_str);
if (matchers == NULL)
alertpanel_error(_("Match string is not valid."));
gchar * cond_str;
FilteringProp * prop;
FilteringAction * action;
- gchar * tmp;
gint list_id;
gint action_id;
gint action_type;
gint account_id;
gchar * destination;
- gint labelcolor;
+ gint labelcolor = 0;
cond_str = gtk_entry_get_text(GTK_ENTRY(filtering.cond_entry));
if (*cond_str == '\0') {
GdkEvent *event)
{
FilteringProp * prop;
- gchar * tmp;
gchar * filtering_str;
if (row == 0) {