Commit Graph

73 Commits

Author SHA1 Message Date
Birunthan Mohanathas
a92bdd9b18 Cosmetic changes to code. 2011-03-29 19:21:57 +00:00
spx
a2316446ca Switched map/hash_map/set for caching to unordered_map/unordered_set. 2011-02-18 16:26:58 +00:00
spx
1ba57f2adf Fixed some Lua related issues.
Removed some internal functions from exposed functions for Lua.
Code cleanup and optimizing for VC2010.
2011-02-15 13:22:19 +00:00
spx
b0af82a25d Cleaned up header dependencies to avoid unnecessary compiling. 2011-02-07 08:02:12 +00:00
spx
3af4e14a4a Removed duplicate Lua header files.
Code cleanup.
2011-02-03 18:03:29 +00:00
spx
7ea3a762ac - Fixed that r716 (precompiled header) doesn't work on x64.
- Now uses constructor initialization list in each class.
- TintedImage: Code cleanup.
2011-01-29 00:11:01 +00:00
spx
435ab8123a Code cleanup. 2011-01-24 10:43:03 +00:00
spx
3569412464 Code cleanup. 2011-01-23 14:24:34 +00:00
spx
235841e01f Added AutoScale=2 and "k" postfix to Meter=STRING.
----
For instance:
A=2800000000, B=0

- AutoScale=0
AutoScale is disabled. Uses Scale value. (Same as before.)
A="2800000000", B="0"

- AutoScale=1
Scales value by 1024. (Same as before.)
A="2.6 G", B="0.0 "

- AutoScale=2
Scales value by 1000.
A="2.8 G", B="0.0 "

- AutoScale=1k
Scales value by 1024, and uses kilo as the lowest unit.
A="2.6 G", B="0.0 k"

- AutoScale=2k
Scales value by 1000, and uses kilo as the lowest unit.
A="2.8 G", B="0.0 k"
----
2011-01-19 15:31:45 +00:00
spx
f0e2084c42 - Added skin related variables.
#CURRENTCONFIGX#
#CURRENTCONFIGY#
#CURRENTCONFIGWIDTH#
#CURRENTCONFIGHEIGHT#

- Code cleanup.
2011-01-16 15:51:23 +00:00
spx
f4bfe8f4fc - Added #CURRENTSECTION# variable.
For instance:
-----
[Variables]
Var=#CURRENTSECTION#

[StyleString]
Text=#CURRENTSECTION#

[MeterString]
Meter=String
MeterStyle=StyleString
Prefix="#CURRENTSECTION# / "
Postfix=" / #Var#"
-----
Displays:
MeterString / MeterString / Variables

- Additional changes for r677.
* Obsoleted DebugLog(). Use LogWithArgs() with LOG_DEBUG instead.
* Added Log().
2010-12-20 08:57:37 +00:00
JamesAC
c50f1c27f2 - Replace DebugLog() with LogWithArgs(int nLevel, const WCHAR* format, ... ), so that variable strings can be logged but the log level can be set to those other than LOG_DEBUG
- Note: DebugLog() is still in the code as I was not sure whether it is required to maintain Litestep interoperability
- Replaced instances of LOG_DEBUG where other log levels would be more appropriate
2010-12-19 23:06:13 +00:00
spx
d1a7b604df Core dll:
- Replace swprintf/wsprintf/wcscpy/wcscat to _snwprintf_s/wcsncpy_s/wcsncat_s.
- Changed printf format parameter strictly for supporting both 32bit and 64bit.
- Fixed an issue that !RainmeterWriteKeyValue doesn't accept %APPDATA%\Rainmeter path.
- Code cleanup.
2010-12-16 20:35:44 +00:00
spx
13e9f54d2a - MeasureScript: Added files that uses pre-compile header.
- Code cleanup.
2010-12-13 09:00:02 +00:00
spx
fe22cfdf3d Quick fix for http://rainmeter.net/forum/viewtopic.php?f=5&t=4059&p=39475#p39461 2010-12-11 05:27:01 +00:00
Birunthan Mohanathas
6efbd23314 Adding ImageCrop and MeasureName/ImageName changes by spx. 2010-12-05 15:34:37 +00:00
spx
96c81ac516 - Added BackgroundMode=4 for tiling background image.
- Added tinting functions for Background.
- Added "ImageCrop" option to Meter=IMAGE/BAR/HISTOGRAM/ROTATOR and Background.
- Added "Tile" option to Meter=IMAGE.
- Some code cleanups.
2010-12-04 15:07:28 +00:00
spx
999ab0bd18 Code optimization. 2010-11-25 22:00:34 +00:00
spx
72da30c565 Fixed an issue that the following sections are ignored if ini-file contains null section "[]". 2010-11-24 13:43:20 +00:00
spx
f689bbe6f1 Small code optimization. 2010-11-16 20:12:27 +00:00
spx
25abbc2444 - Added multiple MeterStyle.
- Code cleanup & cosmetics.
2010-11-04 00:17:42 +00:00
spx
1668de5a3b Code cleanup & cosmetics. 2010-10-31 20:13:32 +00:00
spx
15992c2dc3 Cosmetic changes. 2010-09-21 22:47:53 +00:00
Birunthan Mohanathas
e618ad1777 Cosmetic changes here and there. 2010-09-21 11:09:36 +00:00
spx
df146e4eb4 Code cleanup & cosmetic. 2010-09-17 08:47:22 +00:00
jsmorley
6fe8fd0aa7 Fix by spx for the problem where r538 caused some backwards compatibility issues. 2010-09-15 10:05:09 +00:00
spx
2cb88b0733 Shrunk some string buffer size. 2010-09-13 20:06:52 +00:00
spx
877d4a3f4d Fixed some comments. 2010-08-24 01:13:27 +00:00
spx
dbdebfd1f1 Overhauled Variables part. Fixed the issue that all variables are reset when the screen resolution (or work area) is changed. 2010-08-24 01:07:29 +00:00
spx
3d33a16f9f - Additional fix for r502. Functions/Measures/Counter in Formula are now case-insensitive in MeasureCalc.
- "[Measure]" is now case-insensitive in DynamicVariables.
2010-08-10 18:23:10 +00:00
spx
64888434c9 - Added !RainmeterWriteKeyValue. (based on MattKing's code)
!RainmeterWriteKeyValue "Section" "Key" "Value" ("FileSpec"), where "FileSpec" is an optional parameter. If FileSpec is not present, the change is automatically done in the currently running skin file. If the bang is executed from command line, FileSpec is required.

- Some improvements of MouseOver/Leave detection.

- Fixed the issue that window dragging brings on MouseLeave if "Show window contents while dragging" is not set.
- Fixed the issue that window dragging can't be begun by dragging the Button.
- Fixed the issue that a reaction of the upper Button penetrates to the lower Buttons or the other window.
2010-08-03 15:10:42 +00:00
spx
d92f4f939d Added #ROOTCONFIGPATH#. 2010-08-02 14:28:55 +00:00
spx
4965f3859f - Fixed the issue that the check marks of all menu items in configs/root/variants menu are cleared if !RainmeterDeactivateConfig/!RainmeterToggleConfig is used.
- Fixed the issue that %APPDATA% isn't replaced if Rainmeter runs as different user.
- Some stability improvements for activating/deactivating configs.
2010-07-22 00:31:59 +00:00
spx
f2682eaee0 Changed the behavior of DynamicVariables. The fixed value definition of the following settings is handled as the starting value. If the value definition of these settings contains variables or measures, related !bangs are ignored.
[Measure]
Disabled

[Meter]
Hidden
X
Y

In case of "Hidden":
- Hidden not added or Hidden=0/1 (=fixed value specified) and DynamicVariables=1
The specified value is handled as the starting value. After that the value is not re-read on every update. !RainmeterShowMeter etc. are enabled.

- Hidden=#VAR# or Hidden=[Measure] and DynamicVariables=1
The value is re-read on every update. !RainmeterShowMeter etc. are disabled by re-reading value.
2010-06-01 14:55:52 +00:00
spx
b675265606 Fixed incomplete fix in r420 and r422.
Fixed the issue that the result of some bangs is overwritten with the default value if DynamicVariables=1 is added to Measure/Meter. (Issue 125) Note that this fix is effective only when the setting is not defined in skin configuration file. The result of !RainmeterHideMeter(or Show/Toggle) is overwritten if Hidden=0/1 is added.
Some minor changes.
2010-05-31 21:02:04 +00:00
spx
56f1c6a38d Enabled @include to use variables.
Fixed the issue that the window becomes invalid when both window width and height are 0.
2010-05-27 22:03:09 +00:00
spx
d4a1a4fadf Fixed a problem that an UNC path isn't recognized as an absolute path in @include statement. 2010-04-11 14:30:31 +00:00
spx
e2e6ffff86 Formula now can be used with the relative position (r/R) in Meter's X/Y option.
Added built-in variable #PROGRAMDRIVE#

Changed Net measures to gather statistics of the logical interfaces for wireless devices.
2010-04-10 02:29:52 +00:00
jsmorley
c71a4096d1 Alex's change to add #CRLF# as a built in variable to add a carriage return / linefeed to strings.
[MeterOne]
Meter=String
MeasureName=MeasureOne
MeasureName2=MeasureTwo
Text=%1#CRLF%2

[MeterTwo]
Meter=String
Text=This is a long string#CRLF#On two lines

Substitute="<br/>:"#CRLF#"
2010-04-09 13:16:37 +00:00
spx
95bec98c87 Fixed a problem caused by @include statement added in r219. 2010-04-07 16:12:02 +00:00
spx
415c905d0a - Fixed a problem that !RainmeterQuit isn't executed when no meter window is running.
- Fixed a problem that StyleTemplate affects to Meters which have no relation.

- Added a workaround to avoid the "IniFileMapping" function when reading skins.

- Some small code cosmetics.
2010-04-02 01:35:53 +00:00
spx
a6f2f01036 Some code changes for optimization 2010-03-30 22:37:05 +00:00
spx
06ec730bfd - Added the workaround to pin the window to desktop in Vista/7 with Aero.
- Added !RainmeterSetTransparency, !RainmeterShowFade, !RainmeterHideFade, !RainmeterToggleFade.

- Added the function to log the installed font families to the log file when Debug=1 is set.

- Added the workaround for issue 145. The wrong drawing position was fixed when AntiAlias=0 is set.
2010-03-20 19:40:30 +00:00
jsmorley
3166c5d5f2 MattKings Changes:
1) New feature of Meter=String
StringCase= [NONE | LOWER | UPPER | PROPER]
2) Changes to SetVariable to allow mathematical formulas and functions to be used in setting a variable.
2010-03-18 19:48:14 +00:00
spx
f0763c5973 Changed the ConfigParser that it allows some inline comments which start with a semicolon. This change is for backward compatibility. 2010-02-27 09:51:48 +00:00
spx
be3b4114bb - Added the function that measures the CPU usage for multi core/processors.
For instance:

[MeasureCPU]
Measure=CPU

[MeasureCPU1]
Measure=CPU
Processor=1

[MeasureCPU2]
Measure=CPU
Processor=2

MeasureCPU returns the average of the CPU usage across all core/processors. This is same as Processor=0.

MeasureCPU1/2 returns the CPU usage of each core/processor.

-----

- Fixed the problem that the correct value is not returned if the Interface=0 in NetIn/NetOut/NetTotal measure. The cause of this problem is because the value of all filter devices is summed in Vista or newer.

-----

- Added the option (Debug) for debug logging. This must be put under [Rainmeter]-section in Rainmeter.ini.

This option specifies whether extra debugging log from Rainmeter.dll is output to Rainmeter.log.

[Rainmeter]
Debug=1

Default is 0.

-----

- Application: Fixed a wrong return value type from MainWndProc.
2010-02-13 03:07:34 +00:00
spx
6088470157 - CHANGED: ConfigParser now reads value strictly. Note that this change affects the
reading of various skin setting values.

 For instance:
 - OK
  FontSize=10
  FontSize=0
 - NG (uses default value instead)
  FontSize=
  FontSize=ABC
  FontSize=20ABC (has been parsed as "FontSize=20" until now.)

- CHANGED: FontSize=0(invisible) is now able to use in Meter=STRING.

- Fixed the problem that the window doesn't move into the screen correctly when KeepOnScreen is 1.
2010-02-08 14:12:47 +00:00
spx
ee8d4867c2 - FIXED: inconsistent numerical value via DynamicVariables (issue 130)
- FIXED: Problem with WebParser and "local files" with Cyrillic chars in the path. (issue 139)
- The coded character set of the logfile is changed to UTF-8. (ccs=UTF-8)
  http://msdn.microsoft.com/en-us/library/yeby3zcb%28VS.80%29.aspx
- "MS Shell Dlg 2" is now used for the ABOUT dialog box.
  http://support.microsoft.com/kb/282187
2010-02-03 08:01:50 +00:00
spx
cc3ad487a7 * Changed the way to get the information of the multiple display monitors.
This change brings the order of monitors close to the order of "Display Properties" due to using EnumDisplayDevices and EnumDisplaySettings instead of EnumDisplayMonitors. (If EnumDisplayDevices failed, EnumDisplayMonitors is used as before.)

-----

* Added the "Display Monitor" submenu in [Skins Menu]-[Position].

These menus convert the present position to the relative position from the specified monitor.
(But the meter window doesn't move to the specified monitor area immediately. Only converts.)

- "Use default: Primary monitor" removes the @-directive from WindowX/Y.
- @0(@1, @2, ...) adds the specified monitor number to WindowX/Y. @0 means "The Virtual Screen". (http://msdn.microsoft.com/en-us/library/dd145136%28VS.85%29.aspx)
- If "Auto-select based on window position" is checked, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this menu is unchecked. This setting can be manually made in either the [Rainmeter] (all configs) or individual config sections of Rainmeter.ini.

AutoSelectScreen
If set to 1, the WindowX and WindowY "@n" settings are made automatically based on the position of the meter's window. If a monitor is selected directly using "Display Monitor" in the Rainmeter / skin context menu, this setting is reset to 0.

-----

* Added the variables for multiple display monitors and the virtual screen.
All X/Y positions are represented in the virtual screen coordinates.

The following variables are for the virtual screen.

 #VSCREENAREAX# is the X-position of the left-side of the virtual screen.
 #VSCREENAREAY# is the Y-position of the top-side of the virtual screen.
 #VSCREENAREAWIDTH# is the width of the virtual screen.
 #VSCREENAREAHEIGHT# is the height of the virtual screen.

The following variables are for the PRESENT monitor.
Note that these variables automatically change by the WindowX and WindowY "@n" settings. If "@n" is not set, these variables return the value of the primary monitor.

 #WORKAREAX# is the X-position of the left-side of the work area.
 #WORKAREAY# is the Y-position of the top-side of the work area.
 #WORKAREAWIDTH# is the width of the work area.
 #WORKAREAHEIGHT# is the height of the work area.
 #SCREENAREAX# is the X-position of the left-side of the monitor screen.
 #SCREENAREAY# is the Y-position of the top-side of the monitor screen.
 #SCREENAREAWIDTH# is the width of the display resolution.
 #SCREENAREAHEIGHT# is the height of the display resolution.

The following variables are for the PRIMARY monitor.

 #PWORKAREAX# is the X-position of the left-side of the work area.
 #PWORKAREAY# is the Y-position of the top-side of the work area.
 #PWORKAREAWIDTH# is the width of the work area.
 #PWORKAREAHEIGHT# is the height of the work area.
 #PSCREENAREAX# is the X-position of the left-side of the monitor screen. (maybe, always 0)
 #PSCREENAREAY# is the Y-position of the top-side of the monitor screen. (maybe, always 0)
 #PSCREENAREAWIDTH# is the width of the display resolution.
 #PSCREENAREAHEIGHT# is the height of the display resolution.

The following variables are for the SPECIFIED monitor. (@n = @1, @2, ...)

 #WORKAREAX@n# is the X-position of the left-side of the work area.
 #WORKAREAY@n# is the Y-position of the top-side of the work area.
 #WORKAREAWIDTH@n# is the width of the work area.
 #WORKAREAHEIGHT@n# is the height of the work area.
 #SCREENAREAX@n# is the X-position of the left-side of the monitor screen.
 #SCREENAREAY@n# is the Y-position of the top-side of the monitor screen.
 #SCREENAREAWIDTH@n# is the width of the display resolution.
 #SCREENAREAHEIGHT@n# is the height of the display resolution.

-----

* Other related changes:

- Fixed the problem that the primary monitor isn't recognized correctly.

- Fixed the problem that the information of the multiple display monitors is refreshed excessively.

- For DynamicVariables, when display setting or workarea size has been changed, all variables are now updated to apply changed WORKAREA/SCREENAREA variables.

- Fixed the problem that the "On Desktop" window isn't dragged correctly when the top-left corner of the virtual screen has negative coordinates.

- Changed the way to stick the "On Desktop" window. ("SysListView32/FolderView" is used instead of "Progman/Program Manager".)

-----

* Other changes:

- When the meter window is draggable and isn't dragged, LeftMouseUpAction is now executed.

- Added MouseDoubleClickAction (LeftMouseDoubleClickAction, RightMouseDoubleClickAction, MiddleMouseDoubleClickAction). If MouseDoubleClickAction is empty when mouse button is double-clicked, MouseDownAction is executed instead.

- Fixed the problem that the Meter's hit-test code checks outside the area.

- Changed the way to set the #CURRENTCONFIG#. (CMeterWindow::GetSkinName() is now used instead of parsing the path.)
2009-12-18 05:58:37 +00:00
Kimmo Pekkola
0b4ba32924 Added cache for the fonts.
Fixed a memory leak in the string meter.
Changed the library project to use precompiled headers.
2009-10-07 16:45:14 +00:00