Linux Lite 8.0 RC1 has been released - Click here


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Control Center Ideas
#11

(09-05-2015, 04:56 AM)Jerry link Wrote:  what py file is that for?
Oh, forgot to write that down, sorry  :P

/usr/share/litecc/litecc-tray-icon.py
Reply
#12

Thanks Milos, but I'm still able to spawn multiple instances from the tray using the new code.

[Image: 1JYpzcL.png]

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#13

We need to add this function to the beginning of the control center:
Code:
fh=0
def run_once():
    global fh
    fh=open(os.path.realpath(__file__),'r')
    try:
        fcntl.flock(fh,fcntl.LOCK_EX|fcntl.LOCK_NB)
    except:
        sys.exit (0)

run_once()
It will lock the file untill it is closed.
Will do that later. Have things to do today. :)
Reply
#14

Cool :)

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#15

Pushed to the master branch. Now only one instance of litecc will be opened.
How is the tray icon working?
[Image: CWaI0xT.png]
Reply
#16

I thought we agreed this would stay off the main branch for now??

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#17

(09-08-2015, 02:37 AM)Jerry link Wrote:  I thought we agreed this would stay off the main branch for now??
Tray icon is not in the master branch. Just added the function to prevent opening multiple instances of lite control panel.
Reply
#18

Ah I see, thanks Milos :)

It won't launch:

Code:
jerry@z800:/usr/share/litecc$ lite-controlcenter
  File "/usr/share/litecc/litecenter.py", line 341
    main()
         ^
TabError: inconsistent use of tabs and spaces in indentation
jerry@z800:/usr/share/litecc$

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply
#19

Fixed :) Sorry bro. It was wrong indent. I've pressed tab instead of adding spaces in front of previous line. Indentation mismatch.
It's working now.

I should open a testing branch definitelly.  ;D
Reply
#20

Working nicely, I'll package a new ver today :) Thank you.

Download your free copy of Linux Lite today.

Jerry Bezencon
Linux Lite Creator

"Do not correct a fool, or he will hate you; correct a wise man and he will appreciate you."

[Image: X5qGkCg.png]

[Image: 0op1GNe.png] [Image: LgJ2mtP.png] [Image: vLZcFUE.png] [Image: lrUHro3.jpg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)