Notices


Reply
Thread Tools
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#251
Huh... So that's how you did it. No need for using the Matrix thing at all.

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
 

The Following User Says Thank You to Mentalist Traceur For This Useful Post:
NightShift79's Avatar
Posts: 417 | Thanked: 200 times | Joined on Apr 2010 @ Germany
#252
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 NightShift79 For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#253
Originally Posted by NightShift79 View Post
If I set "noclock" the alarm indicator is not visible either.
I hope you could implement show alarm indicator without clock.



thx in advance
Shouldn't be too hard... I'll see if I can make you a clock style that does that soon. (Though ideally you can patch the "noclock" clock to use the "Show Alarm Indicator" settings like the rest of the clocks.)

I'm fiddling with my own clock style right now... I'll get back to you though.
 

The Following User Says Thank You to Mentalist Traceur For This Useful Post:
Posts: 456 | Thanked: 1,580 times | Joined on Dec 2009
#254
Originally Posted by NightShift79 View Post
If I set "noclock" the alarm indicator is not visible either.
I hope you could implement show alarm indicator without clock.
Fixed in 0.12.1.
__________________
 

The Following 2 Users Say Thank You to Wonko For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#255
Originally Posted by Wonko View Post
Fixed in 0.12.1.
Cool. One less thing for me to do.
 
CasTTeLLo's Avatar
Posts: 335 | Thanked: 51 times | Joined on May 2010
#256
thanks wonko for the update.....here my alarm indicator png

Attached Images
   
__________________
Best Regard,

CasTTeLLo

Last edited by CasTTeLLo; 2011-01-10 at 00:28.
 

The Following User Says Thank You to CasTTeLLo For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#257
I gotta ask, is there a reason you have two cpu/mem bars? I'm guessing you have both CPUMEM Applet and Load applet installed? If you have load applet, you don't need cpumem applet - cpumem is just a copy of Load Applet, but without the status menu screenshot/screencap icons.
 

The Following User Says Thank You to Mentalist Traceur For This Useful Post:
Posts: 270 | Thanked: 37 times | Joined on Sep 2010
#258
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 iscio For This Useful Post:
Posts: 456 | Thanked: 1,580 times | Joined on Dec 2009
#259
Originally Posted by iscio View Post
I have a problem, I set an alarm png but after restart the program doesn't found it and it uses the red circle
Fixed in 0.12.3.
Though, the icon might not be visible instantaneously.
When the clock is redrawn the next time the icon should be properly loaded and displayed.
So, there is no need for any manual interference.
__________________
 

The Following User Says Thank You to Wonko For This Useful Post:
NightShift79's Avatar
Posts: 417 | Thanked: 200 times | Joined on Apr 2010 @ Germany
#260
Originally Posted by Wonko View Post
Fixed in 0.12.1.
Great!
Thank you

...I love it!


I really hope some of you guys can focus on an operator logo plugin next
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:41.