Skip to content

Required components default fallback#326

Open
2387skju wants to merge 2 commits into
mate-desktop:masterfrom
2387skju:required_components_default_fallback
Open

Required components default fallback#326
2387skju wants to merge 2 commits into
mate-desktop:masterfrom
2387skju:required_components_default_fallback

Conversation

@2387skju
Copy link
Copy Markdown

@2387skju 2387skju commented Jan 1, 2026

Reset the required components to default, if not found.
After uninstall a component, a fallback is need: will fix #324
(( Required components are: dock, filemanager, panel, window manager. ))


Changes in file mate-session/main.c :
Reset will be done, in this case:

  • the executable was not found
  • and the current value is not empty
    • => this still allows the user to disable a component manual (= by set empty value)
  • and the default value is not empty

Additional just for the Windowmanager:
Changes in file data/mate-wm :

  • checks if the value from gsettings is usable (command) ,
  • otherwise just ignore that value and continue the script normal (= will search for another window manager)

(both shortly tested with older Mate Version 1.26 on Debian 13. ; I'm new in C-Language)

@vkareh vkareh force-pushed the required_components_default_fallback branch from 9a19da8 to 8f312ab Compare March 17, 2026 16:41
Comment thread mate-session/main.c Outdated
Comment thread mate-session/main.c Outdated
Comment thread data/mate-wm Outdated
Comment thread mate-session/main.c Outdated
Comment thread mate-session/main.c Outdated
@2387skju 2387skju force-pushed the required_components_default_fallback branch from 8f312ab to da50b2e Compare March 19, 2026 11:39
Copy link
Copy Markdown
Member

@vkareh vkareh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some memory management issues, but this is moving in the right direction, thanks.

Comment thread mate-session/main.c Outdated
Comment thread mate-session/main.c Outdated
@2387skju 2387skju force-pushed the required_components_default_fallback branch from da50b2e to d728bd9 Compare March 21, 2026 19:09
@2387skju
Copy link
Copy Markdown
Author

2387skju commented Mar 23, 2026

Thanks for helping :-)

Changes:

  • variable name swapped each other:
    • g_settings_default_default <=> default_default_provider
    • This is more consistent to the origin code (the lines before).
  • replaced:
  • replaced:

Split code in a new function ? :

A suggestion:
Just an Idea. I'm not sure about it. The benefit is not very deep, in total just a few lines less.
In this structure:

append_required_apps_add_component (...,  gboolean is_recursive_call)
{

  [...] // code do add component
  
  if  // if failed && ! is_recursive_call
  {
    // code do reset
    ...
    append_required_apps_add_component (..., TRUE);
  }
}

append_required_apps ()
{
  for  // for each required_components
  {
    append_required_apps_add_component (..., FALSE);
  }
}

This function implemented in Code:

@2387skju 2387skju force-pushed the required_components_default_fallback branch from d728bd9 to 643bd6f Compare March 30, 2026 11:30
@vkareh
Copy link
Copy Markdown
Member

vkareh commented Mar 30, 2026

@2387skju this looks a lot better, thanks! I think you have a good suggestion there with the function, it will make things easier to understand for sure.

@vkareh vkareh force-pushed the required_components_default_fallback branch from 643bd6f to 4105b10 Compare March 30, 2026 21:13
@2387skju 2387skju force-pushed the required_components_default_fallback branch 3 times, most recently from 496df6f to f9f03f8 Compare April 3, 2026 11:23
@2387skju 2387skju requested a review from vkareh April 14, 2026 20:09
Copy link
Copy Markdown
Member

@vkareh vkareh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great! Just some minor nitpicks before this is ready

Comment thread mate-session/main.c Outdated
Comment thread mate-session/main.c Outdated
@2387skju 2387skju force-pushed the required_components_default_fallback branch 8 times, most recently from feb8397 to f9f03f8 Compare May 11, 2026 06:56
2387skju added 2 commits May 11, 2026 09:16
Empty values are still possible, to disable a component.
Required components are currently: windowmanager , filemanager , panel and dock.
Code refactor: move code to new function append_required_apps_add_component().
Fixes: mate-desktop#324
@2387skju 2387skju force-pushed the required_components_default_fallback branch from f9f03f8 to 98da258 Compare May 11, 2026 07:17
@2387skju
Copy link
Copy Markdown
Author

Sorry, I messed up a commit and tried to clean it. Please just take a look at the last Diff-Compare in GitHub: This one is from before last review f9f03f8 to the current state 98da258.

@2387skju 2387skju requested a review from vkareh May 13, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fallback to default required components ( window manager, filemanager, ...) if not found

2 participants