diff options
-rw-r--r-- | util/fluxbox-update_configs.cc | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc index 047b0bc..2d53021 100644 --- a/util/fluxbox-update_configs.cc +++ b/util/fluxbox-update_configs.cc | |||
@@ -521,6 +521,9 @@ void update_limit_nextwindow_to_current_workspace(std::auto_ptr<FbTk::ResourceMa | |||
521 | write_file(keyfilename, new_keyfile); | 521 | write_file(keyfilename, new_keyfile); |
522 | } | 522 | } |
523 | 523 | ||
524 | typedef FbTk::VectorTraits<FbTk::StringTraits> StringVectorTraits; | ||
525 | typedef FbTk::Resource<std::vector<std::string>, StringVectorTraits> StringVectorResource; | ||
526 | |||
524 | struct ScreenResource { | 527 | struct ScreenResource { |
525 | typedef FbTk::VectorTraits<FbTk::EnumTraits<WinButtonType> > WinButtonsTraits; | 528 | typedef FbTk::VectorTraits<FbTk::EnumTraits<WinButtonType> > WinButtonsTraits; |
526 | static WinButtonType titlebar_left_[]; | 529 | static WinButtonType titlebar_left_[]; |
@@ -529,9 +532,7 @@ struct ScreenResource { | |||
529 | ScreenResource(FbTk::ResourceManager_base &rm, | 532 | ScreenResource(FbTk::ResourceManager_base &rm, |
530 | const std::string &name, const std::string &altname); | 533 | const std::string &name, const std::string &altname); |
531 | 534 | ||
532 | FbTk::Resource< | 535 | StringVectorResource workspace_names; |
533 | std::vector<std::string>, FbTk::VectorTraits<FbTk::StringTraits> | ||
534 | > workspace_names; | ||
535 | 536 | ||
536 | FbTk::BoolResource opaque_move, full_max, | 537 | FbTk::BoolResource opaque_move, full_max, |
537 | max_ignore_inc, max_disable_move, max_disable_resize, | 538 | max_ignore_inc, max_disable_move, max_disable_resize, |
@@ -590,7 +591,7 @@ WinButtonType ScreenResource::titlebar_right_[] = { | |||
590 | ScreenResource::ScreenResource(FbTk::ResourceManager_base &rm, | 591 | ScreenResource::ScreenResource(FbTk::ResourceManager_base &rm, |
591 | const std::string &name, const std::string &altname) : | 592 | const std::string &name, const std::string &altname) : |
592 | workspace_names(rm, std::vector<std::string>(), name + ".workspaceNames", | 593 | workspace_names(rm, std::vector<std::string>(), name + ".workspaceNames", |
593 | altname + ".WorkspaceNames", FbTk::VectorTraits<FbTk::StringTraits>(",") ), | 594 | altname + ".WorkspaceNames", StringVectorTraits(",") ), |
594 | opaque_move(rm, true, name + ".opaqueMove", altname + ".OpaqueMove"), | 595 | opaque_move(rm, true, name + ".opaqueMove", altname + ".OpaqueMove"), |
595 | full_max(rm, false, name + ".fullMaximization", altname + ".FullMaximization"), | 596 | full_max(rm, false, name + ".fullMaximization", altname + ".FullMaximization"), |
596 | max_ignore_inc(rm, true, name + ".maxIgnoreIncrement", altname + ".MaxIgnoreIncrement"), | 597 | max_ignore_inc(rm, true, name + ".maxIgnoreIncrement", altname + ".MaxIgnoreIncrement"), |
@@ -714,6 +715,19 @@ void update_lua_resource_manager(std::auto_ptr<FbTk::ResourceManager_base>& rm, | |||
714 | rm.reset(new FbTk::LResourceManager(dynamic_cast<FbTk::ResourceManager &>(*rm), l)); | 715 | rm.reset(new FbTk::LResourceManager(dynamic_cast<FbTk::ResourceManager &>(*rm), l)); |
715 | } | 716 | } |
716 | 717 | ||
718 | void | ||
719 | update_move_slitlist_to_init_file(std::auto_ptr<FbTk::ResourceManager_base>& rm, FbTk::Lua &l) { | ||
720 | FbTk::StringResource rc_slitlistfile(*rm, "~/.fluxbox/slitlist", | ||
721 | "slitlistFile"); | ||
722 | StringVectorResource rc_slitlist(*rm, std::vector<std::string>(), "screen0.slit.clientList", | ||
723 | StringVectorTraits(",")); | ||
724 | |||
725 | std::istringstream f(read_file(FbTk::StringUtil::expandFilename(*rc_slitlistfile))); | ||
726 | std::string line; | ||
727 | while(getline(f, line)) | ||
728 | rc_slitlist->push_back(line); | ||
729 | } | ||
730 | |||
717 | /*------------------------------------------------------------------*\ | 731 | /*------------------------------------------------------------------*\ |
718 | \*------------------------------------------------------------------*/ | 732 | \*------------------------------------------------------------------*/ |
719 | 733 | ||
@@ -736,7 +750,8 @@ const Update UPDATES[] = { | |||
736 | { 11, update_keys_for_ongrip_onwindowborder }, | 750 | { 11, update_keys_for_ongrip_onwindowborder }, |
737 | { 12, update_keys_for_activetab }, | 751 | { 12, update_keys_for_activetab }, |
738 | { 13, update_limit_nextwindow_to_current_workspace }, | 752 | { 13, update_limit_nextwindow_to_current_workspace }, |
739 | { 14, update_lua_resource_manager } | 753 | { 14, update_lua_resource_manager }, |
754 | { 15, update_move_slitlist_to_init_file } | ||
740 | }; | 755 | }; |
741 | 756 | ||
742 | /*------------------------------------------------------------------*\ | 757 | /*------------------------------------------------------------------*\ |