From 8b822640ad1064f8db9f25df7aa048f4a0ed512f Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Mon, 27 Aug 2001 14:52:37 +0000 Subject: [PATCH] r794: Send To menu lists contents of all Send To directories in Choices, not just the first one found. --- ROX-Filer/Help/Changes | 2 ++ ROX-Filer/src/menu.c | 18 +++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index 9ca07229..df136f05 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -5,6 +5,8 @@ 27-Aug-2001 ~~~~~~~~~~~ Updated Dutch translation (Jasper Huijsmans). +Send To menu lists contents of all Send To directories in Choices, not just +the first one found. 23-Aug-2001 ~~~~~~~~~~~ diff --git a/ROX-Filer/src/menu.c b/ROX-Filer/src/menu.c index bda0ff50..15a5ec6b 100644 --- a/ROX-Filer/src/menu.c +++ b/ROX-Filer/src/menu.c @@ -1543,19 +1543,21 @@ static void customise_send_to(gpointer data) static void show_send_to_menu(GList *paths, GdkEvent *event) { GtkWidget *menu, *item; - gchar *sendto_dname = NULL; - GList *widgets = NULL; + GPtrArray *path; + int i; menu = gtk_menu_new(); - sendto_dname = choices_find_path_load("SendTo", ""); - if (sendto_dname) + path = choices_list_dirs("SendTo"); + + for (i = 0; i < path->len; i++) { - widgets = menu_from_dir(menu, sendto_dname, - MIS_SMALL, + GList *widgets = NULL; + guchar *dir = (guchar *) path->pdata[i]; + + widgets = menu_from_dir(menu, dir, MIS_SMALL, (CallbackFn) do_send_to, FALSE, FALSE); - g_free(sendto_dname); if (widgets) gtk_menu_shell_append(GTK_MENU_SHELL(menu), @@ -1564,6 +1566,8 @@ static void show_send_to_menu(GList *paths, GdkEvent *event) g_list_free(widgets); /* TODO: Get rid of this */ } + choices_free_list(path); + item = gtk_menu_item_new_with_label(_("Customise")); gtk_signal_connect_object(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(customise_send_to), NULL); -- 2.11.4.GIT