Commits

Herbert Breunung committed d85efc2

move config dir handling in own module

Comments (0)

Files changed (4)

 	#Kephra::Works
 }
 
-sub configdir {
-	#$_[0] and $_[0] eq $NAME and shift;
-	#print File::UserConfig->configdir(@_);
-	#my $configdir = File::UserConfig->configdir;
-	#print $configdir,"\n";
-}
 
-sub debug {
-	#Wx->import( ':everything' );
-}
+
 
 1;
 

lib/Kephra/App.pm

 
 sub OnInit {
 	$_ref = shift;
-	Kephra::Config::File::Location::get();
+	Kephra::Config::File::Location::init();
 
 	my $win = Kephra::App::Window->new(__PACKAGE__);
 	Kephra::File::new();

lib/Kephra/App/Dialog/Config.pm

 	);
 	my %node;
 	my $tree = Wx::Treebook->new($dialog, -1);
-	$tree->AddPage(Wx::Panel->new($dialog, -1), 'General');
+	$tree->AddPage(Wx::Panel->new($dialog, -1), 'App');
 	$tree->AddPage(Wx::Panel->new($dialog, -1), 'File');
 	$tree->AddSubPage(Wx::Panel->new($dialog, -1), 'Open');
 	$tree->AddSubPage(Wx::Panel->new($dialog, -1), 'Close');

lib/Kephra/Config/File/Location.pm

 use strict;
 use warnings;
 use Cwd;
+
+package Kephra::Config::File::Location;
+our $base_path;
+
+use File::Spec;
+use File::HomeDir;
 use File::UserConfig;
 
-package Kephra::Config::File::Location;
 
-sub get {
-	say Cwd::cwd();
-	#File::UserConfig
+sub init {
+	#$base_path
+	#say Cwd::cwd();
+	#say Kephra::configdir();
+	say File::UserConfig->configdir(dist     => 'Kephra', sharedir  => 'config');
+	#say File::UserConfig->configdir('Kephra');
+	#say File::HomeDir->my_home;
 }
 
 
+
 1;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.