Copyright (C) 2019-2020 Michał Bąbik

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

2020-04-11  Michal Babik  <michalb1981@o2.pl>

	* chkwch.c (check_daemon_presence): Function for checks if wchangerd
	  is running.
	  (check_daemon_exit): New function to count number of running
	  wchangerd processes and exit if there is more than one.
	  (check_daemon_kill): Function kills wchangerd process.
	* cmdline.c, cmdline.h: New files with functions for command line
	  operations.
	* procfn.c, procfn.h, procitem.c, procitem.h, proclist.c proclist.h:
	  New files with functions for getting active process information.
	* wcngdmn.c (main): Added checking if wchangerd is already running with
	  check_daemon_exit function.
	  Added command line options operations, starting, stopping, restarting
	  wchangerd daemon.
	* wchanger.c (event_start_daemon_pressed, event_stop_daemon_pressed):
	  New functions for starting and stopping wchangerd daemon.
	  (daemon_monitor): New function for monitoring the presence of
	  wchangerd process.
	  (create_daemon_widget): Creating widget for monitoring wchangerd
	  process.
	* Some changes in error and warning messages, changed to use warnx,
	  errx functions.

2020-03-25  Michal Babik  <michalb1981@o2.pl>

	* chkwch.c (check_display): Changed display check to reading out
	  X11 lib.

2020-03-06  Michal Babik  <michalb1981@o2.pl>

	* chkwch.c, chkwch.h: New file with functions for background working
	  wchangerd. File contains functions to load settings, change wallpaper
	  and check for display presence.
	* jsfun.c (js_json_string_to_stlist, js_settings_check_for_update):
	  Changed json parse function to json_tokener_parse_verbose from
	  json_tokener_parse for mode detailed error output, added more
	  conditions to evaluate json object type.
	* wcngdmn.c (main): Changed as functions to check settings and set
	  wallpaper are moved to other file.
	* wallsett.h: Config file string s_cfgfile in WallSett structure
	  changed to pointer from array.
	* wallsett.c (wallset_new): New function to create new WallSett item.
	  (wallset_free): Added freeing WallSett item and nulling config path.
	  (wallset_set_cfgfile): Changed to only set a cfg path, changed return
	  type from int to void.
	  (wallset_get_cfgfile): Skipped const char in return as it is now a const
	  char by default.
	  (wallset_init): Removed memset as config file string is not stored now in
	  array.
	* dialogdata.h: Config file path s_cfg_file in DialogData structore changed
	  from array to pointer.
	* dialogdata.c (dialogdata_free): Added freeing config path data.
	  (dialogdata_new): Changed setting config path to dynamic allocate string.
	* defs.h: Removed CFG_PTH_LEN as it is no longer needed.
	* cfgfile.c (cfgfile_get_config_path): Renamed from check_config_path_file.
	  (set_config_file_path): Removed, not needed now.
	  (cfgfile_get_config_path_exit): New function, returns config file path
	  or exits if error occurred.

2020-02-20  Michal Babik  <michalb1981@o2.pl>

	* dlgs.c (about_app_dialog): Updated link to my page.

2020-02-19  Michal Babik  <michalb1981@o2.pl>

	* treev.c: Removed uneeded printf.
	* Some comments updated.

2020-02-14  Michal Babik  <michalb1981@o2.pl>

	* defs.h: Added CFG_PTH_LEN with size of config path array.
	* dialogdata.c (dialogdata_new): Setting config file moved to this
	  function from dialogdata_init.
	* iminfo.c (imageinfo_sort, imageinfo_remove_duplicates,
	  compare_imageitems): Functions removed.
	* strfun.c (str_set_up_wallpaper_command): Corrected wallpaper command
	  when it is set with file sign [F].
	* wcngdmn.c (main): Changed some calls to WallSett object.

2020-02-06  Michal Babik  <michalb1981@o2.pl>

	* cres.c (create_resize): Function renamed to cres.
	  (cres): Changed from calloc to malloc for better performance.
	* dlgs.c (about_app_dialog): Changed function argument, now it takes
	  unused pointer to connect directly to event.
	* dialogdata.c, dialogdata.h: New files with DialogData structrure
	  and functions, moved from wchanger.c
	* fdops.c (glist_filter_by_extensions_list): Function removed.
	  (get_directory_filtered_content_glist): New function renamed
	  from get_directory_content_glist, with added extensions filtering.
	* imgs.h: Added W_IMG_COUNT to IconImg enum.
	* imgs.c: Removed sort icon.
	* iminfo.c (imageinfo_new): calloc changed to malloc.
	  (imageinfo_set_wxh): Small improvements.
	* jsfun.c (js_settings_check_for_update, js_json_string_to_stlist): Added
	  check for wrong json file.
	* rwdt.c (read_file_data): Acting on error in file size read.
	* treev.c (treeview_sort_compare_fun, treeview_replace_data,
	  treeview_sort_list): Functions removed.
	  (create_tview): Changed to enable sorting on title click.
	* wchanger.c (event_rem_from_list_pressed, event_move_up_pressed,
	  event_move_down_pressed event_sort_list_pressed, event_rem_dupl_pressed):
	  Functions removed, signals connected to it's functions directly.
	  (event_set_wallpaper_pressed, event_save_settings_pressed,
	  event_on_delete, activate): Changed access to config file path.
	  (create_buttons_widget): Changed some calls to signal connect functions
	  to swapped and linked straight to it's destinations.
	  (create_image_button): Added condition to not add image to button.
	  (create_buttons_widget): Removed sort button.
	  (event_about_app_pressed): Function removed.
	  (main): DialogData item is created dynamically.
	* all_files: Some type changes, added some attributes.

2020-01-15  Michal Babik  <michalb1981@o2.pl>

	* fdops.c (glist_filter_by_extensions_list): Corrected removing
	  file name from list.
	* fdops.c (get_pbuf_exts_to_ghash): Updated format list declaration.

2020-01-14  Michal Babik  <michalb1981@o2.pl>

	* fdops.c (get_dir_content_filter_images): New function to read
	  directory data and filter out non images (it runs two functions
	  that were used separately before).
	* preview.c (create_preview_label): New function to create labels
	  with screen resolution info.
	* wchanger.c (activate): Added inserting screen description labels.
	  (event_add_img_dir_pressed): Reading directory content with one
	  function, not two like it was before.
	* wpset.c (wallpaper_set_file, wallpaper_set_random,
	  wallpaper_set_next_in_list): Removed unneeded returns.
	  (wallpaper_set_file): Added system value reading for compiler not
	  to complain.
	  (wallpaper_startup_set): Removed some unneeded code.

2020-01-11  Michal Babik  <michalb1981@o2.pl>

	* wcngdmn.c (main): Added checking for Display.

2020-01-07  Michal Babik  <michalb1981@o2.pl>

	* iminfo.c (imageinfo_set_wxh): Changed sprintf to snprintf.

2020-01-06  Michal Babik  <michalb1981@o2.pl>

	* strfun.c (str_set_up_wallpaper_command): Change in string copy
	  when no file alias specified.
	* wchanger.c: Removed unneeded shutdown signal

2020-01-03  Michal Babik  <michalb1981@o2.pl>

	* cres.c (create_resise): Changed return value to void.
	* fdops.c (get_pbuf_exts_to_ghash): Changed str_dup to strdup.
	* iminfo.c (imageinfo_new): Function exits instead of returning null
	  on alloc error.
	  (imageinfo_new_from_file, imageinfo_set_full_name,
	  imageinfo_set_file_name, imageinfo_set_file_path):
	  Changed str_dup to strdup.
	* jsfun.c (js_settings_check_for_update): Changed str_dup to strdup.
	* setting.c: Removed setting_hashfun function.
	  (setting_assign_to_array): Changed function call from setting_hashfun
	  to hash.
	  (setting_copy, setting_create_default): Function exits instead of
	  returning null on alloc error.
	  (setting_new_int, setting_new_uint, setting_new_int64,
	  setting_new_uint64, setting_new_int32, setting_new_uint32,
	  setting_new_int16, setting_new_uint16, setting_new_int8,
	  setting_new_uint8, setting_new_double, setting_new_string,
	  setting_new_array): Removed null return.
	* settlist.c (stlist_insert_setting, stlist_remove_setting_at_pos,
	  stlist_remove_setting, stlist_remove_setting_with_name):
	  Changed return value to void.
	* strfun.c (str_dup, str_ndup): Functions removed from project.
	  (str_name_with_number): Function exits instead of returning
	  null on alloc error.
	* treev.c (liststore_add_item): Function renamed to treeview_add_item.
	  (liststore_add_items_glist): Function renamed to
	  treeview_add_items_glist.
	  (liststore_add_items_gslist): Function renamed to
	  treeview_add_items_gslist.
	  (liststore_add_items_settlist): Function renamed to
	  treeview_add_items_settlist.
	* wchanger.c (set_wallpaper_list): Changed function call from
	  liststore_add_items_settlist to treeview_add_items_settlist.
	  (event_add_img_pressed): Changed function call from
	  liststore_add_items_gslist to treeview_add_items_gslist.
	  (event_add_img_dir_pressed): Changed function call from
	  liststore_add_items_glist to treeview_add_items_glist.
	* misc_files: Added attributes that may improve performance a little bit.

2019-12-22  Michal Babik  <michalb1981@o2.pl>

	* flist.c, flist.h: File removed from project.
	* hashfun.c: Hash function moved to this file.
	* defs.h: New file with program defines.
	* fdops.c: New file with file and directory load operations.
	* errs.c: New file with function to generate error messages.
	* rwdt.c: New file, renamed from miscfun.c.
	* cfgfile.c: New file with functions to get config file path (moved from
	  miscfun.c).
	  (set_config_file_path): New function to write program settings
	  file path to array of chars.
	* setting.c (setting_remove_from_array): Function renamed to
	  setting_reset_array.
	* setting.h: Added to errors enum SET_ER_WRONG for wrong input data.
	* settlist.c (stlist_free_p): New function to free list of pointers.
	  (stlist_get_setting_with_id_pos): New function to return position
	  of setting with specific id.
	  (stlist_get_setting_pos): Changed equivalent code to
	  stlist_get_setting_with_id_pos function.
	  (stlist_get_setting_val_str_pos): New function for getting position
	  of setting with particulat string value.
	  (stlist_get_settings_owned_by_p): New function to return list of
	  pointers to settings owned by setting with specific id.
	  (stlist_get_settings_in_array_name_p): New function to return
	  list of pointers to settings in array with given name.
	  (stlist_get_settings_in_array_obj_p): New function to return
	  list of pointers to settings in array.
	  (stlist_get_settings_main_p): New function to return list of pointers
	  to top level settings.
	  (stlist_remove_setting_at_pos, stlist_remove_setting,
	  stlist_remove_setting_with_name): New function to remove settings from
	  list.
	* setts.c (settlist_check_defaults): New function to check default setting
	  values.
	* wpset.c (wallpaper_set_file, wallpaper_set_random,
	  wallpaper_set_next_in_list): Changed function return value type from int
	  to void.
	  (wallpaper_set_random, wallpaper_set_next_in_list): Operating on
	  SettList instead of FList.
	  (wallpaper_set_next_in_list): Merged some code in function.
	* wallsett.h: In WallSett structure wallpapet list from FList to SettList
	  and s_cfgfile from dynamic char string to fixed table.
	* wallsett.c (wallset_init): Removed flist_init and changed set config
	  file path from check_config_path_file to set_config_file_path.
	  (wallset_free): Removed flist_free added stlist_free_p.
	  (wallset_set_last_used_fn, wallset_set_command): Function
	  stores pointer to string instead of string.
	* wchanger.c: Structure DialogData s_cfg_file changed from dynamic string
	  to fixed table string.
	  (widgets_set_settings): Changed
	  stlist_get_settings_in_array_name to stlist_get_settings_in_array_name_p
	  and stlist_free to stlist_free_p
	  (event_add_img_dir_pressed): flist_free changed to
	  flist_clear
	  (activate): Changed config file path set to set fixed char
	  table instead of previous dynamic char string.
	  (activate, event_on_delete, event_save_settings_pressed,
	  event_set_wallpaper_pressed): Changed displaying error message dialog,
	  it shows more concrete error message.
	  (shutdown): Removed freeing config file path string.
	  (get_default_bg_cmd): Function removed.
	* wcngdmn.c: Removed FList dependency. Wallpaper changing works directly
	  on SettList instead of creating FList and working on it.
	  Settings are loaded dynamically at every wallpaper change and
	  freed after change.

2019-12-09  Michal Babik  <michalb1981@o2.pl>

	* strfun.c, strfun.h: New file with functions to duplicate string.
	* miscfun.c, miscfun.h: Removed str_dup and str_ndup function.
	  Renamed some values for better readability.
	* settlist.c, settlist.h: Renamed some values for better readability.
	* jsfun.c: Renamed some values for better readability.
	* setting.c (setting_set_string, setting_set_name, setting_copy2):
	  strdup function call changed to str_dup.
	* dlgs.c (about_app_dialog): Changed app website url.

2019-12-07  Michal Babik  <michalb1981@o2.pl>

	* jsfun.c (js_json_array_to_stlist): Removed const from
	  json_object parameter for compatibility with json-c functions.
	* wchangercfg: renamed from wchanger-cfg.

2019-12-02  Michal Babik  <michalb1981@o2.pl>

	* dlgs.c (about_app_dialog): added s_ver argument to pass
	  string with application version.
	* wallsett.h, wallsett.c: Removed i_lastused from WallSett structure
	  and functions to set, get and work with this value.
	* Added some cont qualifiers in functions.

2019-11-27  Michal Babik  <michalb1981@o2.pl>

	* dlgs.c, dlgs.h (about_app_dialog): New function with info dialog.
	* wchanger.c: Updates to show application info dialog.
	* wpset.c: Renamed from wallset.c.
	* wpset.h: Renamed from wallset.h.
	* wallsett.c: Renamed from settstr.c.
	* wallsett.h: Renamed from settstr.h.

2019-11-25  Michal Babik  <michalb1981@o2.pl>

	* settlist.c: New file with functions to manage settings.
	* settlist.h: New file with functions to manage settings.
	* setting.c: New file with functions to manage settings.
	* setting.h: New file with functions to manage settings.
	* preview.c: Wallpaper preview related functions moved here.
	* preview.h: Wallpaper preview related functions moved here.
	* setts.c (get_setting_name): New function that returns
	  setting name based on enum int value.
	  (settings_update_last_used): Changed updating of last used
	  wallpaper setting.
	  (settings_update_window_size): Changed updating of window
	  size setting.
	  (settings_check_update): New function to check if settings
	  are an update.
	  (settings_update_file): New function for updating settings file.
	  (settings_check_update_file): New function to
	  check if settings are an update and update if they are.
	* jsfun.c (js_json_array_to_stlist): Function converts SettList
	  to json array.
	  (js_stlist_array_to_json): Converts SettList to json array.
	  (js_json_object_to_setting): Converts json object to Setting.
	  (js_setting_to_json_object): Converts Setting to json object.
	  (js_json_string_to_settlist): Coverts string with json data to
	  SettList list of Setting objects.
	  (js_settlist_append_to_json_object): Converts SettList to json
	  objects and adds it to json object.
	  (js_settings_check_update): New function to check if settings
	  are an update.
	  (js_settings_update_file): New function for updating settings file.
	  (js_settings_check_update_file): New function to check if settings
	  are an update and update if they are.

2019-11-19  Michal Babik  <michalb1981@o2.pl>

	* wchanger.c (create_settings_widget): added hints to settings
	  widgets.

2019-11-16  Michal Babik  <michalb1981@o2.pl>

	* wchanger.c: Functions to handle removing duplicates from list.
	* treev.c (treeview_remove_duplicates): New function to remove
	  duplicates in treeview.
	* New functions for saving width and height of configuration window
	* dlgs.c (message_dialog_error): Corrected string passing.

2019-11-14  Michal Babik  <michalb1981@o2.pl>

	* wchanger.c (get_wallpaper_change_interval): New function to get
	  change interval based on spin value and combobox.
	  (set_wallpaper_change_interval): New function to set change interval.
	  (create_settings_widget): New combobox to set change interval minutes
	  or hours.
	  (get_directory_content): Function removed, changed to other one.
	* iminfo.c (imageinfo_set_full_name, imageinfo_get_full_name,
	  imageinfo_set_file_name, imageinfo_get_file_name,
	  imageinfo_set_file_path, imageinfo_get_file_path,
	  imageinfo_set_width, imageinfo_get_width, imageinfo_set_height,
	  imageinfo_get_height, imageinfo_get_wxh): New functions to set
	  and get values in ImageInfo structure.
	* miscfun.c (get_directory_content_append_to_flist): Function
	  to get directory content and add to FList.

2019-11-14  Michal Babik  <michalb1981@o2.pl>

	* randomm.c: New file with functions for random wallpaper select.
	* randomm.h: New file with Functions for random wallpaper select.

2019-11-08  Michal Babik  <michalb1981@o2.pl>

	* jsfun.c (js_settings_to_json_buff): Couple updates in putting data
	  to json objects.
	  (js_settings_read): Corrected freeing buffer.
	* setts.c (settings_set_command): Comparing strings changed.
	* settstr.c (free_wall_sett): Moved function to free WallSett here.

2019-11-07  Michal Babik  <michalb1981@o2.pl>

	* wchanger.c: Changed wallpaper preview.
	* treev.c:    Moved treeview related functions.

2019-11-04  Michal Babik  <michalb1981@o2.pl>

	* wchanger.c (create_preview): corrected making "empty" preview.

2019-11-03  Michal Babik  <michalb1981@o2.pl>

	* First relase

