The Following User Says Thank You to Mentalist Traceur For This Useful Post: | ||
![]() |
2011-01-08
, 18:57
|
|
Posts: 417 |
Thanked: 200 times |
Joined on Apr 2010
@ Germany
|
#252
|
The Following User Says Thank You to NightShift79 For This Useful Post: | ||
![]() |
2011-01-08
, 19:07
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#253
|
If I set "noclock" the alarm indicator is not visible either.
I hope you could implement show alarm indicator without clock.
thx in advance
The Following User Says Thank You to Mentalist Traceur For This Useful Post: | ||
![]() |
2011-01-08
, 21:43
|
Posts: 456 |
Thanked: 1,580 times |
Joined on Dec 2009
|
#254
|
If I set "noclock" the alarm indicator is not visible either.
I hope you could implement show alarm indicator without clock.
The Following 2 Users Say Thank You to Wonko For This Useful Post: | ||
![]() |
2011-01-08
, 23:27
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#255
|
![]() |
2011-01-09
, 06:52
|
|
Posts: 335 |
Thanked: 51 times |
Joined on May 2010
|
#256
|
The Following User Says Thank You to CasTTeLLo For This Useful Post: | ||
![]() |
2011-01-09
, 07:29
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#257
|
The Following User Says Thank You to Mentalist Traceur For This Useful Post: | ||
![]() |
2011-01-09
, 09:54
|
Posts: 456 |
Thanked: 1,580 times |
Joined on Dec 2009
|
#259
|
I have a problem, I set an alarm png but after restart the program doesn't found it and it uses the red circle
The Following User Says Thank You to Wonko For This Useful Post: | ||
![]() |
2011-01-09
, 17:12
|
|
Posts: 417 |
Thanked: 200 times |
Joined on Apr 2010
@ Germany
|
#260
|
No wonder I kept messing up. That said, I just got my clock style to display the system icon.... at the cost of wiping out everything else, lol. Gotta work on that. (I'm guessing it's something to do with self.context.save() and self.context.restore()...)
Wonko, much appreciated. (I find it amusing that if it weren't for you, and this applet/plugin, I would've remained an utter python newb. But you provided a nice playground where I could learn basic Python stuff without having to understand all the details of how to make an entire program, in the form of these clock styles.)
I suggest we implement the idea of using either a selected icon, or the 'System' icon, whether that be the stock, theme-included, or theme-overriding. After I figure out how the hell this works, I'll go look up the file paths for each of those respectively, and see if that can be implemented, with a series of "if file, use file, elif file, use file, else use file". Which in itself would be part of an if/elif/else statement determined by the settings, I s'pose.
Anyway, if I can figure out how to do it before you, I'll submit it to you. Most likely, I'll get no-where and your superior coding knowledge will beat me to it again.
- Edit -
Okay, I figured out that for whatever reason, the png image has to be drawn before everything else inside the draw_clock() function. Odd. But okay. I don't need my own PNGs in my clock style anyway, so whatever.
On to figuring out where the normal, theme, and theme-overriding icons go.
- Edit 2 -
Icons that come with the system, as you know, are:
/opt/usr/share/icons/hicolor/...
Icons that override the entire system (including whatever custom icons your theme brings in) are in:
/home/user/.local/share/icons/hicolor/...
I'm thinking the Advanced Clock settings should have a three-possible-options setting field for "Alarm Indicator":
1. Use Plugin Default
2. Use System Alarm Icon
3. Use: (File browse and select option that's currently there)
Code-wise, 1, would lead to using Cairo, 2 would check if file exists in the /home/user/.local/... path. If it does, use that; elif file exists in [path to theme-specific-icon], use that; else use the one in /opt/usr/share/icons/... 3 would then do what it currently does.
Thoughts?
If anyone knows the scheme by which custom themes store their icons, that'd be great.
I'll probably go pester the maker of Theme Customizer, since he's put out countless themes, as well as the original Black Plastic Theme, which was the predecessor to Theme Customizer.
- Edit 3 -
Okay, so the theme-specific icons are at:
/opt/usr/share/icons/[theme name]/...
Which... is not convenient at all. Because the [theme name] directory doesn't necessarily have to match the name of the theme exactly, or the name of the folder in which the theme goes in /opt/usr/share/themes/... So, /opt/usr/share/icons/[theme name] can be the icon set folder for /opt/usr/share/themes/[some other name for the same theme]/ and what determines that is what's in a few files, such as gtkrc, index.theme, and possibly something else in the respective theme's folder... Yeah. Pain in the ***. So I'd say no rush on that one Wonko. Not unless you really want to implement this. We'll live with putting our desired icon inside the MyDocs directory for now.
Last edited by Mentalist Traceur; 2011-01-08 at 18:45. Reason: Figured out how to make an image appear inside clock style. | Icons location list added | list finished