Branch: refs/heads/master Author: LarsDW223 lars_paulsen@web.de Committer: LarsDW223 lars_paulsen@web.de Date: Wed, 17 Jan 2018 20:04:03 UTC Commit: 0dc3f7e8861ace761174c05a1f84cc63dff8a698 https://github.com/geany/geany-plugins/commit/0dc3f7e8861ace761174c05a1f84cc...
Log Message: ----------- workbench: renamed "folder" to "sub-directory"
Modified Paths: -------------- workbench/README workbench/src/popup_menu.c workbench/src/popup_menu.h workbench/src/sidebar.c workbench/src/sidebar.h workbench/src/wb_project.c
Modified: workbench/README 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -85,7 +85,7 @@ These are the available items: if you right clicked inside of a project. After selecting it a dialog will be opened. Chosse the directory which shall be added. After that the directory will be shown inside the project folder. After adding a - new directory, all files and folders beneath the directory will be + new directory, all files and sub-directories beneath the directory will be displayed. See "Directory settings" for more information.
**Remove directory** @@ -101,18 +101,18 @@ These are the available items: **Directory settings** Select this item to change the directory settings. It is only available if you right clicked inside of a project directory. In the directory - settings you can set a filter which controls the files and folders + settings you can set a filter which controls the files and sub-directories that shall be displayed or not.
**Fold/unfold directory** Fold or unfold the items belonging to the directory. It is only available if you right clicked inside of a directory.
**Unfold All** - Select this item to unfold all projects, directories and folders. + Select this item to unfold all projects, directories and sub-directories.
**Collapse All** - Select this item to collpase/fold all projects, directories and folders. + Select this item to collpase/fold all projects, directories and sub-directories.
**Add to Workbench Bookmarks** Add the file to the Workbench Bookmarks. It is only available
Modified: workbench/src/popup_menu.c 58 lines changed, 29 insertions(+), 29 deletions(-) =================================================================== @@ -50,8 +50,8 @@ static struct GtkWidget *fold_unfold_directory; GtkWidget *directory_open_all; GtkWidget *directory_close_all; - GtkWidget *folder_open_all; - GtkWidget *folder_close_all; + GtkWidget *subdir_open_all; + GtkWidget *subdir_close_all; GtkWidget *expand_all; GtkWidget *collapse_all; GtkWidget *add_wb_bookmark; @@ -89,8 +89,8 @@ void popup_menu_show(POPUP_CONTEXT context, GdkEventButton *event) gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_open_all, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_close_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_open_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_close_all, FALSE); break; case POPUP_CONTEXT_DIRECTORY: gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE); @@ -108,10 +108,10 @@ void popup_menu_show(POPUP_CONTEXT context, GdkEventButton *event) gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_open_all, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_close_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_open_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_close_all, FALSE); break; - case POPUP_CONTEXT_FOLDER: + case POPUP_CONTEXT_SUB_DIRECTORY: gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE); gtk_widget_set_sensitive (s_popup_menu.remove_project, TRUE); gtk_widget_set_sensitive (s_popup_menu.fold_unfold_project, TRUE); @@ -127,8 +127,8 @@ void popup_menu_show(POPUP_CONTEXT context, GdkEventButton *event) gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_open_all, TRUE); - gtk_widget_set_sensitive (s_popup_menu.folder_close_all, TRUE); + gtk_widget_set_sensitive (s_popup_menu.subdir_open_all, TRUE); + gtk_widget_set_sensitive (s_popup_menu.subdir_close_all, TRUE); break; case POPUP_CONTEXT_FILE: gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE); @@ -146,8 +146,8 @@ void popup_menu_show(POPUP_CONTEXT context, GdkEventButton *event) gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, TRUE); gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, TRUE); gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_open_all, TRUE); - gtk_widget_set_sensitive (s_popup_menu.folder_close_all, TRUE); + gtk_widget_set_sensitive (s_popup_menu.subdir_open_all, TRUE); + gtk_widget_set_sensitive (s_popup_menu.subdir_close_all, TRUE); break; case POPUP_CONTEXT_BACKGROUND: gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE); @@ -165,8 +165,8 @@ void popup_menu_show(POPUP_CONTEXT context, GdkEventButton *event) gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_open_all, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_close_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_open_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_close_all, FALSE); break; case POPUP_CONTEXT_WB_BOOKMARK: gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE); @@ -184,8 +184,8 @@ void popup_menu_show(POPUP_CONTEXT context, GdkEventButton *event) gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, TRUE); - gtk_widget_set_sensitive (s_popup_menu.folder_open_all, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_close_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_open_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_close_all, FALSE); break; case POPUP_CONTEXT_PRJ_BOOKMARK: gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE); @@ -203,8 +203,8 @@ void popup_menu_show(POPUP_CONTEXT context, GdkEventButton *event) gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE); gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, TRUE); - gtk_widget_set_sensitive (s_popup_menu.folder_open_all, FALSE); - gtk_widget_set_sensitive (s_popup_menu.folder_close_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_open_all, FALSE); + gtk_widget_set_sensitive (s_popup_menu.subdir_close_all, FALSE); break; } gtk_menu_popup(GTK_MENU(s_popup_menu.widget), NULL, NULL, NULL, NULL, @@ -478,12 +478,12 @@ static void popup_menu_on_remove_from_bookmarks(G_GNUC_UNUSED GtkMenuItem *menui }
-/* Handle popup menu item "Open all files" (folder) */ -static void popup_menu_on_folder_open_all (G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data) +/* Handle popup menu item "Open all files" (sub-directory) */ +static void popup_menu_on_subdir_open_all (G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data) { GPtrArray *list;
- list = sidebar_get_selected_folder_filelist(); + list = sidebar_get_selected_subdir_filelist(); if (list != NULL) { open_all_files_in_list(list); @@ -492,12 +492,12 @@ static void popup_menu_on_folder_open_all (G_GNUC_UNUSED GtkMenuItem *menuitem, }
-/* Handle popup menu item "Close all files" (folder) */ -static void popup_menu_on_folder_close_all (G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data) +/* Handle popup menu item "Close all files" (sub-directory) */ +static void popup_menu_on_subdir_close_all (G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data) { GPtrArray *list;
- list = sidebar_get_selected_folder_filelist(); + list = sidebar_get_selected_subdir_filelist(); if (list != NULL) { close_all_files_in_list(list); @@ -601,17 +601,17 @@ void popup_menu_init(void) gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
- item = gtk_menu_item_new_with_mnemonic(_("_Open all files in folder")); + item = gtk_menu_item_new_with_mnemonic(_("_Open all files in sub-directory")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); - g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_folder_open_all), NULL); - s_popup_menu.folder_open_all = item; + g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_subdir_open_all), NULL); + s_popup_menu.subdir_open_all = item;
- item = gtk_menu_item_new_with_mnemonic(_("_Close all files in folder")); + item = gtk_menu_item_new_with_mnemonic(_("_Close all files in sub-directory")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item); - g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_folder_close_all), NULL); - s_popup_menu.folder_close_all = item; + g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_subdir_close_all), NULL); + s_popup_menu.subdir_close_all = item;
item = gtk_separator_menu_item_new(); gtk_widget_show(item);
Modified: workbench/src/popup_menu.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -25,7 +25,7 @@ typedef enum { POPUP_CONTEXT_PROJECT, POPUP_CONTEXT_DIRECTORY, - POPUP_CONTEXT_FOLDER, + POPUP_CONTEXT_SUB_DIRECTORY, POPUP_CONTEXT_FILE, POPUP_CONTEXT_BACKGROUND, POPUP_CONTEXT_WB_BOOKMARK,
Modified: workbench/src/sidebar.c 28 lines changed, 14 insertions(+), 14 deletions(-) =================================================================== @@ -41,7 +41,7 @@ enum DATA_ID_PRJ_BOOKMARK, DATA_ID_DIRECTORY, DATA_ID_NO_DIRS, - DATA_ID_FOLDER, + DATA_ID_SUB_DIRECTORY, DATA_ID_FILE, };
@@ -90,7 +90,7 @@ static void sidebar_remove_children(GtkTreeIter *parent) }
-/* Create a branch for a folder */ +/* Create a branch for a sub-directory */ static void sidebar_create_branch(gint level, const gchar *abs_base_dir, GSList *leaf_list, GtkTreeIter *parent) { GSList *dir_list = NULL; @@ -185,7 +185,7 @@ static void sidebar_create_branch(gint level, const gchar *abs_base_dir, GSList gtk_tree_store_insert_with_values(sidebar.file_store, &iter, parent, 0, FILEVIEW_COLUMN_ICON, icon_dir, FILEVIEW_COLUMN_NAME, last_dir_name, - FILEVIEW_COLUMN_DATA_ID, DATA_ID_FOLDER, + FILEVIEW_COLUMN_DATA_ID, DATA_ID_SUB_DIRECTORY, -1);
sidebar_create_branch(level+1, abs_base_dir, tmp_list, &iter); @@ -201,7 +201,7 @@ static void sidebar_create_branch(gint level, const gchar *abs_base_dir, GSList gtk_tree_store_insert_with_values(sidebar.file_store, &iter, parent, 0, FILEVIEW_COLUMN_ICON, icon_dir, FILEVIEW_COLUMN_NAME, last_dir_name, - FILEVIEW_COLUMN_DATA_ID, DATA_ID_FOLDER, + FILEVIEW_COLUMN_DATA_ID, DATA_ID_SUB_DIRECTORY, -1);
sidebar_create_branch(level+1, abs_base_dir, tmp_list, &iter); @@ -225,7 +225,7 @@ static int rev_strcmp(const char *str1, const char *str2) }
-/* Insert given directory/folder into the sidebar file tree */ +/* Insert given directory/sub-directory into the sidebar file tree */ static void sidebar_insert_project_directory(WB_PROJECT *prj, WB_PROJECT_DIR *directory, GtkTreeIter *parent) { GSList *lst = NULL; @@ -757,9 +757,9 @@ static gboolean sidebar_file_view_on_button_release(G_GNUC_UNUSED GtkWidget * wi { popup_context = POPUP_CONTEXT_FILE; } - else if (context.folder != NULL) + else if (context.subdir != NULL) { - popup_context = POPUP_CONTEXT_FOLDER; + popup_context = POPUP_CONTEXT_SUB_DIRECTORY; } else if (context.directory != NULL) { @@ -960,8 +960,8 @@ gboolean sidebar_file_view_get_selected_context(SIDEBAR_CONTEXT *context) case DATA_ID_NO_DIRS: /* Has not got any data. */ break; - case DATA_ID_FOLDER: - context->folder = data; + case DATA_ID_SUB_DIRECTORY: + context->subdir = data; break; case DATA_ID_FILE: context->file = data; @@ -999,7 +999,7 @@ static void sidebar_get_filelist_for_iter(GPtrArray *list, GtkTreeIter iter) g_ptr_array_add(list, g_strdup(filename)); break; case DATA_ID_DIRECTORY: - case DATA_ID_FOLDER: + case DATA_ID_SUB_DIRECTORY: if (gtk_tree_model_iter_children(model, &childs, &iter) == TRUE) { sidebar_get_filelist_for_iter(list, childs); @@ -1013,7 +1013,7 @@ static void sidebar_get_filelist_for_iter(GPtrArray *list, GtkTreeIter iter)
/* Get the lkist of files belonging to the current selection for - id (id = project, directory, folder) */ + id (id = project, directory, sub-directory) */ static GPtrArray *sidebar_get_selected_filelist (guint id) { GtkTreeModel *model; @@ -1057,14 +1057,14 @@ GPtrArray *sidebar_get_selected_directory_filelist (void) }
-/** Get the list of files corresponding to the selected folder. +/** Get the list of files corresponding to the selected sub-directory. * * @return GPtrArray containing file names or NULL. * **/ -GPtrArray *sidebar_get_selected_folder_filelist (void) +GPtrArray *sidebar_get_selected_subdir_filelist (void) { - return sidebar_get_selected_filelist(DATA_ID_FOLDER); + return sidebar_get_selected_filelist(DATA_ID_SUB_DIRECTORY); }
/** Setup the sidebar.
Modified: workbench/src/sidebar.h 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -26,7 +26,7 @@ typedef struct { WB_PROJECT *project; WB_PROJECT_DIR *directory; - gchar *folder; + gchar *subdir; gchar *file; gchar *wb_bookmark; gchar *prj_bookmark; @@ -74,6 +74,6 @@ gboolean sidebar_file_view_get_selected_context(SIDEBAR_CONTEXT *context);
GPtrArray *sidebar_get_selected_project_filelist (void); GPtrArray *sidebar_get_selected_directory_filelist (void); -GPtrArray *sidebar_get_selected_folder_filelist (void); +GPtrArray *sidebar_get_selected_subdir_filelist (void);
#endif
Modified: workbench/src/wb_project.c 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -54,7 +54,7 @@ struct S_WB_PROJECT_DIR gchar **ignored_dirs_patterns; gchar **ignored_file_patterns; guint file_count; - guint folder_count; + guint subdir_count; GHashTable *file_table; /* contains all file names within base_dir, maps file_name->TMSourceFile */ gboolean is_prj_base_dir; }; @@ -527,8 +527,8 @@ static guint wb_project_dir_rescan_int(WB_PROJECT *prj, WB_PROJECT_DIR *root)
searchdir = get_combined_path(prj->filename, root->base_dir); root->file_count = 0; - root->folder_count = 0; - lst = gp_filelist_scan_directory(&(root->file_count), &(root->folder_count), + root->subdir_count = 0; + lst = gp_filelist_scan_directory(&(root->file_count), &(root->subdir_count), searchdir, file_patterns, root->ignored_dirs_patterns, root->ignored_file_patterns); g_free(searchdir);
@@ -978,7 +978,7 @@ gchar *wb_project_dir_get_info (WB_PROJECT_DIR *dir) g_string_append(temp, "\n"); }
- g_string_append_printf(temp, _("Number of Sub-Folders: %u\n"), dir->folder_count); + g_string_append_printf(temp, _("Number of Sub-Directories: %u\n"), dir->subdir_count); g_string_append_printf(temp, _("Number of Files: %u\n"), dir->file_count);
/* Steal string content */
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org