From 288237a1c1681f71b2c5273e73bc56c5133edfa0 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 23 Nov 2022 20:51:37 +0100 Subject: Remove unused members and structures Based on a cppcheck report: https://caja.mate-desktop.dev/2022-11-23-174623-5790-cppcheck@ae663c369cf2_desktop-no-overflow/ --- libcaja-private/caja-mime-application-chooser.c | 1 - libcaja-private/caja-search-directory-file.c | 5 ---- libcaja-private/caja-search-directory-file.h | 3 -- libcaja-private/caja-search-directory.c | 1 - libcaja-private/caja-search-engine-simple.c | 1 - libcaja-private/caja-search-engine.c | 27 ------------------ libcaja-private/caja-search-engine.h | 3 -- src/file-manager/fm-icon-view.c | 38 ++++++------------------- src/file-manager/fm-tree-model.c | 6 ---- src/file-manager/fm-tree-view.c | 7 ----- 10 files changed, 9 insertions(+), 83 deletions(-) diff --git a/libcaja-private/caja-mime-application-chooser.c b/libcaja-private/caja-mime-application-chooser.c index ab9b8026..e461fb65 100644 --- a/libcaja-private/caja-mime-application-chooser.c +++ b/libcaja-private/caja-mime-application-chooser.c @@ -52,7 +52,6 @@ struct _CajaMimeApplicationChooserDetails guint refresh_timeout; GtkWidget *label; - GtkWidget *entry; GtkWidget *treeview; GtkWidget *remove_button; diff --git a/libcaja-private/caja-search-directory-file.c b/libcaja-private/caja-search-directory-file.c index 0984caf6..550d7702 100644 --- a/libcaja-private/caja-search-directory-file.c +++ b/libcaja-private/caja-search-directory-file.c @@ -39,11 +39,6 @@ #include "caja-file-utilities.h" #include "caja-search-directory.h" -struct CajaSearchDirectoryFileDetails -{ - CajaSearchDirectory *search_directory; -}; - G_DEFINE_TYPE(CajaSearchDirectoryFile, caja_search_directory_file, CAJA_TYPE_FILE); static void diff --git a/libcaja-private/caja-search-directory-file.h b/libcaja-private/caja-search-directory-file.h index ac6a8d0d..d0be816d 100644 --- a/libcaja-private/caja-search-directory-file.h +++ b/libcaja-private/caja-search-directory-file.h @@ -40,12 +40,9 @@ #define CAJA_SEARCH_DIRECTORY_FILE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_SEARCH_DIRECTORY_FILE, CajaSearchDirectoryFileClass)) -typedef struct CajaSearchDirectoryFileDetails CajaSearchDirectoryFileDetails; - typedef struct { CajaFile parent_slot; - CajaSearchDirectoryFileDetails *details; } CajaSearchDirectoryFile; typedef struct diff --git a/libcaja-private/caja-search-directory.c b/libcaja-private/caja-search-directory.c index 4613b564..da2e133b 100644 --- a/libcaja-private/caja-search-directory.c +++ b/libcaja-private/caja-search-directory.c @@ -49,7 +49,6 @@ struct CajaSearchDirectoryDetails gboolean search_finished; GList *files; - GHashTable *file_hash; GList *monitor_list; GList *callback_list; diff --git a/libcaja-private/caja-search-engine-simple.c b/libcaja-private/caja-search-engine-simple.c index 207baeaa..aae74d23 100644 --- a/libcaja-private/caja-search-engine-simple.c +++ b/libcaja-private/caja-search-engine-simple.c @@ -42,7 +42,6 @@ typedef struct GList *mime_types; GList *tags; char **words; - GList *found_list; GQueue *directories; /* GFiles */ diff --git a/libcaja-private/caja-search-engine.c b/libcaja-private/caja-search-engine.c index 234575de..d8d9d9a8 100644 --- a/libcaja-private/caja-search-engine.c +++ b/libcaja-private/caja-search-engine.c @@ -30,11 +30,6 @@ #include "caja-search-engine-simple.h" #include "caja-search-engine-tracker.h" -struct CajaSearchEngineDetails -{ - int none; -}; - enum { HITS_ADDED, @@ -50,30 +45,9 @@ G_DEFINE_ABSTRACT_TYPE (CajaSearchEngine, caja_search_engine, G_TYPE_OBJECT); -static GObjectClass *parent_class = NULL; - -static void -finalize (GObject *object) -{ - CajaSearchEngine *engine; - - engine = CAJA_SEARCH_ENGINE (object); - - g_free (engine->details); - - EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); -} - static void caja_search_engine_class_init (CajaSearchEngineClass *class) { - GObjectClass *gobject_class; - - parent_class = g_type_class_peek_parent (class); - - gobject_class = G_OBJECT_CLASS (class); - gobject_class->finalize = finalize; - signals[HITS_ADDED] = g_signal_new ("hits-added", G_TYPE_FROM_CLASS (class), @@ -118,7 +92,6 @@ caja_search_engine_class_init (CajaSearchEngineClass *class) static void caja_search_engine_init (CajaSearchEngine *engine) { - engine->details = g_new0 (CajaSearchEngineDetails, 1); } CajaSearchEngine * diff --git a/libcaja-private/caja-search-engine.h b/libcaja-private/caja-search-engine.h index 3d811ff4..90bd6593 100644 --- a/libcaja-private/caja-search-engine.h +++ b/libcaja-private/caja-search-engine.h @@ -35,12 +35,9 @@ #define CAJA_IS_SEARCH_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAJA_TYPE_SEARCH_ENGINE)) #define CAJA_SEARCH_ENGINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_SEARCH_ENGINE, CajaSearchEngineClass)) -typedef struct CajaSearchEngineDetails CajaSearchEngineDetails; - typedef struct CajaSearchEngine { GObject parent; - CajaSearchEngineDetails *details; } CajaSearchEngine; typedef struct diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 1843fd2e..04ff915f 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -80,8 +80,6 @@ typedef struct const CajaFileSortType sort_type; const char *metadata_text; const char *action; - const char *menu_label; - const char *menu_hint; } SortCriterion; typedef enum @@ -125,65 +123,47 @@ static const SortCriterion sort_criteria[] = { CAJA_FILE_SORT_BY_DISPLAY_NAME, "name", - "Sort by Name", - N_("by _Name"), - N_("Keep icons sorted by name in rows") + "Sort by Name" }, { CAJA_FILE_SORT_BY_SIZE, "size", - "Sort by Size", - N_("by _Size"), - N_("Keep icons sorted by size in rows") + "Sort by Size" }, { CAJA_FILE_SORT_BY_SIZE_ON_DISK, "size_on_disk", - "Sort by Size on Disk", - N_("by S_ize on Disk"), - N_("Keep icons sorted by disk usage in rows") + "Sort by Size on Disk" }, { CAJA_FILE_SORT_BY_TYPE, "type", - "Sort by Type", - N_("by _Type"), - N_("Keep icons sorted by type in rows") + "Sort by Type" }, { CAJA_FILE_SORT_BY_MTIME, "modification date", - "Sort by Modification Date", - N_("by Modification _Date"), - N_("Keep icons sorted by modification date in rows") + "Sort by Modification Date" }, { CAJA_FILE_SORT_BY_BTIME, "creation date", - "Sort by Creation Date", - N_("by _Creation Date"), - N_("Keep icons sorted by creation date in rows") + "Sort by Creation Date" }, { CAJA_FILE_SORT_BY_EMBLEMS, "emblems", - "Sort by Emblems", - N_("by _Emblems"), - N_("Keep icons sorted by emblems in rows") + "Sort by Emblems" }, { CAJA_FILE_SORT_BY_TRASHED_TIME, "trashed", - "Sort by Trash Time", - N_("by T_rash Time"), - N_("Keep icons sorted by trash time in rows") + "Sort by Trash Time" }, { CAJA_FILE_SORT_BY_EXTENSION, "extension", - "Sort by Extension", - N_("by E_xtension"), - N_("Keep icons sorted by reversed extension segments in rows") + "Sort by Extension" } }; diff --git a/src/file-manager/fm-tree-model.c b/src/file-manager/fm-tree-model.c index 3beb5f27..fba39e1c 100644 --- a/src/file-manager/fm-tree-model.c +++ b/src/file-manager/fm-tree-model.c @@ -119,12 +119,6 @@ struct FMTreeModelRoot TreeNode *root_node; }; -typedef struct -{ - CajaDirectory *directory; - FMTreeModel *model; -} DoneLoadingParameters; - static void fm_tree_model_tree_model_init (GtkTreeModelIface *iface); static void schedule_monitoring_update (FMTreeModel *model); static void destroy_node_without_reporting (FMTreeModel *model, diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c index 2e7cfbb5..a01f91e8 100644 --- a/src/file-manager/fm-tree-view.c +++ b/src/file-manager/fm-tree-view.c @@ -101,7 +101,6 @@ struct FMTreeViewDetails GtkWidget *popup_cut; GtkWidget *popup_copy; GtkWidget *popup_paste; - GtkWidget *popup_rename; GtkWidget *popup_trash; GtkWidget *popup_delete; GtkWidget *popup_properties; @@ -114,12 +113,6 @@ struct FMTreeViewDetails guint selection_changed_timer; }; -typedef struct -{ - GList *uris; - FMTreeView *view; -} PrependURIParameters; - static GdkAtom copied_files_atom; static void fm_tree_view_iface_init (CajaSidebarIface *iface); -- cgit v1.2.1