Commit 0abfb73b authored by Alexander Schwinn's avatar Alexander Schwinn

fixed sensitivity of "create folder"

parent 7cb76073
......@@ -1276,6 +1276,7 @@ thunar_launcher_append_menu_item (ThunarLauncher *launcher,
gboolean show_delete_item;
gboolean show_item;
ThunarClipboardManager *clipboard;
ThunarFile *parent;
_thunar_return_val_if_fail (THUNAR_IS_LAUNCHER (launcher), NULL);
_thunar_return_val_if_fail (action_entry != NULL, NULL);
......@@ -1424,19 +1425,27 @@ thunar_launcher_append_menu_item (ThunarLauncher *launcher,
return NULL;
case THUNAR_LAUNCHER_ACTION_CREATE_FOLDER:
if (thunar_file_is_trashed (launcher->current_directory))
if (launcher->create_files_on_selected_folder == TRUE && launcher->single_folder_selected)
parent = launcher->single_folder;
else
parent = launcher->current_directory;
if (thunar_file_is_trashed (parent))
return NULL;
item = xfce_gtk_menu_item_new_from_action_entry (action_entry, G_OBJECT (launcher), GTK_MENU_SHELL (menu));
gtk_widget_set_sensitive (item, thunar_file_is_writable (launcher->current_directory));
gtk_widget_set_sensitive (item, thunar_file_is_writable (parent));
return item;
case THUNAR_LAUNCHER_ACTION_CREATE_DOCUMENT:
if (thunar_file_is_trashed (launcher->current_directory))
if (launcher->create_files_on_selected_folder == TRUE && launcher->single_folder_selected)
parent = launcher->single_folder;
else
parent = launcher->current_directory;
if (thunar_file_is_trashed (parent))
return NULL;
item = xfce_gtk_menu_item_new_from_action_entry (action_entry, G_OBJECT (launcher), GTK_MENU_SHELL (menu));
submenu = thunar_launcher_create_document_submenu_new (launcher);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu);
gtk_widget_set_sensitive (item, thunar_file_is_writable (launcher->current_directory));
gtk_widget_set_sensitive (item, thunar_file_is_writable (parent));
return item;
case THUNAR_LAUNCHER_ACTION_CUT:
......
......@@ -1284,12 +1284,12 @@ thunar_tree_view_context_menu (ThunarTreeView *view,
"force-section-open", TRUE, NULL);
// Shortcuts !!! (copy/cut/delete/..)
// !!!!!!!1 "Sensitivity of "Neuen Ordner erstellen" richtet sich nach der current directory, nicht nach "selected file" !!
// -- fix in seperate commit
// IS "device" needed at all in launcher ?
// thunar_tree_view_new_files - Nur wenn ZWeig offen (why??), springt thunar in den neuen Ordner rein
// - in neuen Reiter/Fenster öffnen öffnet falschen Ordner bei USB device
// - In neuen Reiter/Fenster öffnen öffnet falschen Ordner bei USB device
// - Einige Items fehlen im Menü des aktuellen Ordners (COpy/Cut/Trahs/Delete/Rename/SentTo)
g_object_set (G_OBJECT (view->launcher), "selected-device", device,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment