Permalink
Browse files

Added --highlight-dirs option.

--file-idle-time 0 sets actual file-idle-time to 86400, as 0 broke removing files.

--highlight-all-users shortened to --highlight-users.
  • Loading branch information...
1 parent 2d2a344 commit 60392f0c64e2ba4365e9a26a20e2c6828218d402 @acaudwell committed Jul 2, 2010
Showing with 22 additions and 3 deletions.
  1. +1 −0 ChangeLog
  2. +4 −1 README
  3. +4 −1 data/gource.1
  4. +12 −1 src/gource_settings.cpp
  5. +1 −0 src/gource_settings.h
View
@@ -12,6 +12,7 @@
* Added --dont-stop option for manual exiting when recording videos.
* Added --stop-at-time option to stop Gource after a number of seconds.
* Added --hide 'mouse' option.
+ * Added --highlight-dirs option.
* Allow --file-idle-time 0 (files will never expire).
* Allow --start-position 'random' to set a random start position.
* --log-command VCS replaces multiple --log-command-VCS options.
View
5 README
@@ -127,9 +127,12 @@ options:
--highlight-user USER
Highlight the names of a particular user.
- --highlight-all-users
+ --highlight-users
Highlight the names of all users.
+ --highlight-dirs
+ Highlight the names of all directories.
+
--file-filter REGEX
Filter out any files matching a specified regular expression.
View
@@ -100,9 +100,12 @@ Have the camera automatically follow a particular user.
\fB\-\-highlight\-user USER\fR
Highlight the names of a particular user.
.TP
-\fB\-\-highlight\-all\-users\fR
+\fB\-\-highlight\-users\fR
Highlight the names of all users.
.TP
+\fB\-\-highlight\-dirs\fR
+Highlight the names of all directories.
+.TP
\fB\-\-file\-filter REGEX\fR
Filter out any files matching a specified regular expression.
.TP
View
@@ -69,7 +69,8 @@ void GourceSettings::help(bool extended_help) {
printf(" --follow-user USER Camera will automatically follow this user\n");
printf(" --highlight-user USER Highlight the names of a particular user\n");
- printf(" --highlight-all-users Highlight the names of all users\n\n");
+ printf(" --highlight-users Highlight the names of all users\n\n");
+ printf(" --highlight-dirs Highlight the names of all directories\n\n");
printf(" --load-config CONF_FILE Load a config file\n");
printf(" --save-config CONF_FILE Save a config file with the current options\n\n");
@@ -149,6 +150,7 @@ GourceSettings::GourceSettings() {
arg_aliases["background"] = "background-colour";
arg_aliases["disable-bloom"] = "hide-bloom";
arg_aliases["disable-progress"] = "hide-progress";
+ arg_types["highlight-users"] = "highlight-all-users";
//command line only options
conf_sections["help"] = "command-line";
@@ -181,6 +183,7 @@ GourceSettings::GourceSettings() {
arg_types["hide-bloom"] = "bool";
arg_types["hide-mouse"] = "bool";
arg_types["highlight-all-users"] = "bool";
+ arg_types["highlight-dirs"] = "bool";
arg_types["disable-auto-rotate"] = "bool";
arg_types["disable-auto-skip"] = "bool";
@@ -304,6 +307,7 @@ void GourceSettings::setGourceDefaults() {
follow_users.clear();
highlight_users.clear();
highlight_all_users = false;
+ highlight_dirs = false;
//delete file filters
for(std::vector<Regex*>::iterator it = file_filters.begin(); it != file_filters.end(); it++) {
@@ -719,6 +723,9 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc
if(file_idle_time<0.0f || file_idle_time == 0.0f && file_idle_str[0] != '0' ) {
conffile.invalidValueException(entry);
}
+ if(file_idle_time==0.0f) {
+ file_idle_time = 86400.0f;
+ }
}
if((entry = gource_settings->getEntry("user-idle-time")) != 0) {
@@ -848,6 +855,10 @@ void GourceSettings::importGourceSettings(ConfFile& conffile, ConfSection* gourc
highlight_all_users = true;
}
+ if(gource_settings->getBool("highlight-dirs")) {
+ highlight_dirs = true;
+ }
+
if((entry = gource_settings->getEntry("camera-mode")) != 0) {
if(!entry->hasValue()) conffile.entryException(entry, "specify camera-mode (overview,track)");
View
@@ -106,6 +106,7 @@ class GourceSettings : public SDLAppSettings {
float user_friction;
float user_scale;
+ bool highlight_dirs;
bool highlight_all_users;
std::vector<std::string> highlight_users;
std::vector<std::string> follow_users;

0 comments on commit 60392f0

Please sign in to comment.