Skip to content

Commit

Permalink
[REFACTOR] CHANGELOG v2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
nots1dd committed Aug 29, 2024
1 parent 5947a5e commit b9b143d
Show file tree
Hide file tree
Showing 10 changed files with 683 additions and 559 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG/v2_5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CHANGE TYPE: MINOR

## Summary of Changes

-> Mostly refactor commits are ongoing

-> Created a new header `inodeinfo.h`

-> Respective debug and default CMakeLists.txt and meson.build files are updated accordingly
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ include_directories(${SDL2_MIXER_INCLUDE_DIRS})
include_directories(${CMAKE_SOURCE_DIR})

# Add the executable
add_executable(litefm lfm.c src/cursesutils.c src/filepreview.c src/dircontrol.c src/archivecontrol.c src/clipboard.c src/logging.c src/signalhandling.c src/highlight.c src/hashtable.c src/arg_helpers.c src/musicpreview.c)
add_executable(litefm lfm.c src/cursesutils.c src/filepreview.c src/dircontrol.c src/archivecontrol.c src/clipboard.c src/logging.c src/signalhandling.c src/highlight.c src/hashtable.c src/arg_helpers.c src/musicpreview.c src/inodeinfo.c)

# Link required libraries
target_link_libraries(litefm ${CURSES_LIBRARIES} ${LIBARCHIVE_LIBRARIES} ${LIBYAML_LIBRARIES} ${SDL2_LIBRARIES} ${SDL2_MIXER_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion debug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ include_directories(${SDL2_MIXER_INCLUDE_DIRS})
include_directories(${CMAKE_SOURCE_DIR})

# Add the executable
add_executable(litefm ../lfm.c ../src/cursesutils.c ../src/filepreview.c ../src/dircontrol.c ../src/archivecontrol.c ../src/clipboard.c ../src/logging.c ../src/signalhandling.c ../src/highlight.c ../src/hashtable.c ../src/arg_helpers.c ../src/musicpreview.c)
add_executable(litefm ../lfm.c ../src/cursesutils.c ../src/filepreview.c ../src/dircontrol.c ../src/archivecontrol.c ../src/clipboard.c ../src/logging.c ../src/signalhandling.c ../src/highlight.c ../src/hashtable.c ../src/arg_helpers.c ../src/musicpreview.c ../src/inodeinfo.c)

# Link required libraries
target_link_libraries(litefm ${CURSES_LIBRARIES} ${LIBARCHIVE_LIBRARIES} ${LIBYAML_LIBRARIES} ${SDL2_LIBRARIES} ${SDL2_MIXER_LIBRARIES})
Expand Down
3 changes: 2 additions & 1 deletion debug/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ src_files = files(
'../src/highlight.c',
'../src/hashtable.c',
'../src/arg_helpers.c',
'../src/musicpreview.c'
'../src/musicpreview.c',
'../src/inodeinfo.c'
)

# UNCOMMENT LINES 59, 60, 68, 69 to ENABLE ASAN Memory leak VERBOSE output
Expand Down
42 changes: 21 additions & 21 deletions include/cursesutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,35 @@

/* COLOR PAIRS DEF */

#define FILE_COLOR_PAIR 1
#define DIR_COLOR_PAIR 2
#define ARCHIVE_COLOR_PAIR 3
#define AUDIO_COLOR_PAIR 4
#define IMAGE_COLOR_PAIR 5
#define SYMLINK_COLOR_PAIR 6
#define AQUA_COLOR_PAIR 7
#define VIOLET_COLOR_PAIR 8
#define DARK_BG_COLOR_PAIR 9
#define MAGENTA_COLOR_PAIR 10
#define SPECIAL_COLOR_PAIR 11
#define ERROR_COLOR_PAIR 12
#define CUSTOM_COLOR_PAIR 13
#define TITLE_COLOR_PAIR 14
#define FILE_COLOR_PAIR 1
#define DIR_COLOR_PAIR 2
#define ARCHIVE_COLOR_PAIR 3
#define AUDIO_COLOR_PAIR 4
#define IMAGE_COLOR_PAIR 5
#define SYMLINK_COLOR_PAIR 6
#define AQUA_COLOR_PAIR 7
#define VIOLET_COLOR_PAIR 8
#define DARK_BG_COLOR_PAIR 9
#define MAGENTA_COLOR_PAIR 10
#define SPECIAL_COLOR_PAIR 11
#define ERROR_COLOR_PAIR 12
#define CUSTOM_COLOR_PAIR 13
#define TITLE_COLOR_PAIR 14
#define HIGHLIGHT_COLOR_PAIR 15

/* COMPRESSION OPTIONS COLOR PAIR + MISC DEF */

#define STEP_SELECT_FORMAT 0
#define STEP_SELECT_ACTION 1

#define COMP_COLOR_TITLE 31
#define COMP_COLOR_HIGHLIGHT 32
#define COMP_COLOR_NORMAL 33
#define COMP_COLOR_FOOTER 34
#define COMP_COLOR_TITLE 31
#define COMP_COLOR_HIGHLIGHT 32
#define COMP_COLOR_NORMAL 33
#define COMP_COLOR_FOOTER 34

#define OPTION_TAR 1
#define OPTION_ZIP 2
#define OPTION_EXIT 0
#define OPTION_TAR 1
#define OPTION_ZIP 2
#define OPTION_EXIT 0

// Function Prototypes
void show_message(WINDOW* win, const char* message);
Expand Down
44 changes: 44 additions & 0 deletions include/inodeinfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// // // // // //
// //
// LITE FM //
// //
// // // // // //

/*
* ---------------------------------------------------------------------------
* File: inodeinfo.h
* Description: Displaying of each inode's info onto the info_win,
* all its functions, both popup and main window logic
*
* Author: Siddharth Karanam
* Created: <29/08/24>
*
* Copyright: 2024 nots1dd. All rights reserved.
*
* License: <GNU GPL v3>
*
* Notes: inodeinfo also has the function `truncate_symlink_name`.
* It made sense as the function is only required in two areas;
* in string search, and for proper file info retreival
*
* Revision History:
* <29/08/24> - Initial creation and function declarations added.
*
* ---------------------------------------------------------------------------
*/

#ifndef INODE_INFO_H
#define INODE_INFO_H

#include <dirent.h>
#include <grp.h>
#include <ncurses.h>
#include <stdio.h>

#define MAX_ITEM_NAME_LENGTH 80

void get_file_info_popup(WINDOW* main_win, const char* path, const char* filename);
void get_file_info(WINDOW* info_win, const char* path, const char* filename);
void truncate_symlink_name(char* name);

#endif
Loading

0 comments on commit b9b143d

Please sign in to comment.