LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Who wants to write a basic About box for Linux Lite?
#41
(10-22-2018, 12:59 PM)Jerry link Wrote:Shall I remove the centering, and re-add the titlebar to the code so it works for users with multiple monitors too ? - Yes please.

Done this it appears above x3 posts in thread.
Reply
#42
Some thoughts -
  • adding a menu on menubar named "Themes" (or something else), to the About app.
  • contained inside would be titles such as Red, Yellow, Orange, Green, Flags
The graphic designer members would be needed to -
  • make transparent banners of Linux lite, one with each of the Official feather colours , red having a red feather, yellow a yellow feather, as an example of this see the About app current main website banner logo to give an idea.
  • make logos for the menu bar to match each.
  • make feathers wrapped in a flag, every flag of the nations in the community, maybe also feathers with,  a cross , a rainbow one. It wouldn't be complete without a ganja leaf feather on a caduceus.
Programmers would then -
attach a script to each menu title so when for example blue is clicked, it changes the menu bar to blue, the main website banner logo feather to blue and the menubar icon feather to blue .
Clicking Flags would open a Gui window (as there would be too many option for inside a menu), in this window would be the icon of each nations flag and the universal use flags like ganja leaf, rainbow, or cross.
Clicking any of these would change the menu bar to the base colour hex code, eg; such as ganja leaf green menubar, ganja leaf on the menubar icon, and on the main website banner icon.
Clicking the flag would also close the flag selection window at the end of its script.
Or an okay button to confirm, apply and close the flag window.

Furthering on that would be
  • when clicking a colour or flag, this applies the users choice throughout all Lite Software Apps on their system, and the XFCE Main Menu icon, in 1 click of okay, so they match.
  • That would be Lite Themes an internal theme system for Lite Apps, potential new in LL 5.0?
Lite themes once made for the About App could be integrated in to every Lite App, by adding a button that links to and runs it through the About app, code file.
This could also be made to allow it to do things like VLC Player does, such as apply a santa hat, on everyone's feather for Christmas done during a Lite Install Updates, that is removed at the appropriate time during a future/date specific Lite Install Updates, done via install updates as this maintains security, and doesn't slow or present future problems with bandwidth or security of an open port.
It also actively encourages users to update their system in a regular fashion, which is also About Linux Lite.
Reply
#43
#1 - done
#2 - done
#3 - done
#4 - done
#5 - now done* - the code reads the /etc/llver file stores its text and writes this to the gui.

* - it reads version as LL 3.0 on this computer which is what it also says inside the file if browsed to, and it is LL 3.2.

I need to adjust the spacing, of current version and version # lines, til it is a bit better.
Added a space row, a new row, renumbered some rows.
Increased the app size by 8 pixels in height so the copyright line was in the gui.


[Image: about15.png]

Code
Code:
#!/usr/bin/env python
# code by bitsnpcs

from Tkinter import *
import webbrowser

url1 = 'https://www.freecinema2022.gq/development.html#team'
url2 = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html'
url3 = 'https://www.freecinema2022.gq/'
url4 = 'https://www.freecinema2022.gq/manual/'
url5 = 'https://www.freecinema2022.gq/forums/index.php'
url6 = 'https://www.freecinema2022.gq/donate.html'
url7 = 'https://www.freecinema2022.gq/shop.html'
url8 = '/usr/share/doc/litemanual/index.html'

# open browser and display url at line 7 thru 13
def OpenUrl1():
    webbrowser.open(url1)

def OpenUrl2():
    webbrowser.open(url2)

def OpenUrl3():
    webbrowser.open(url3)
   
def OpenUrl4():
    webbrowser.open(url4)
   
def OpenUrl5():
    webbrowser.open(url5)

def OpenUrl6():
    webbrowser.open(url6)
   
def OpenUrl7():
    webbrowser.open(url7)

def close_window():
    window.destroy()
   
def OpenUrl8():
    webbrowser.open(url8)
   
# Make window
window = Tk()
window.title("About Linux Lite")
window.geometry("242x250")
window.resizable(0,0)

# adding a menubar
menubar = Menu(window, bg='#ffe082')
window.config(menu=menubar)

photovar1 = PhotoImage(file='mlogo.png')
llmenu = Menubutton(menubar, image=photovar1)
menubar.add_cascade(image=photovar1, menu=llmenu)

helpmenu = Menu(menubar, bg='#ffe082', tearoff=0)
menubar.add_cascade(label='Help', menu=helpmenu)

supportmenu = Menu(menubar, bg='#ffe082', tearoff=0)
menubar.add_cascade(label='Support', menu=supportmenu)

def doHelp(  ): print 'doHelp'

helpmenu.add_command(label='Help Manual (local)', command=OpenUrl8)
helpmenu.add_command(label='Help Manual (online)', command=OpenUrl4)
helpmenu.add_command(label='Ask Community', command=OpenUrl5)
helpmenu = Menu(menubar)

def doSupport(  ): print 'doSupport'

supportmenu.add_command(label='Donate', command=OpenUrl6)
supportmenu.add_command(label='Shop', command=OpenUrl7)
supportmenu = Menu(menubar)

# uncomment below to add separator in menu, place code where seperator is wanted
# filemenu.add_separator(  )

# adding a logo
photo=PhotoImage(file="logo.png")
l1 = Button(image=photo,width=160, height=59, command=OpenUrl3)
l1.grid(row=4, column=0)
l1.place(x=36.3, y=12)
l1 = Label(window, text="     ")
l1.grid(row=5, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=6, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=7, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=8, column=0, sticky=W)

# adding a frame for ll website button
GUIFrame1=Frame(window)
GUIFrame1.grid(row=11, column=0)

#adding a frame for last row of buttons
GUIFrame2=Frame(window)
GUIFrame2.grid(row=13, column=0)

# define title, nym, year
l2 = Label(window, text=u"\u00a9Copyright 2012-2018 Jerry Bezencon", fg="grey", font="none 8")
l2.grid(row=15, column=0)

l3 = Label(window, text="     ")
l3.grid(row=0, column=0, sticky=W)
l3 = Label(window, text="     ")
l3 = Label(window, text="     ")
l3.grid(row=12, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=14, column=0, sticky=W)

l4 = Label(window, text="  Current Version:")
l4.grid(row=9, column=0)

# r/w file to gui background
file = open("/etc/llver")
data = file.read()
file.close()
Results = Label(window, text = data)
Results.grid(row = 10, column = 0)

# ll website button
l5 = Label(GUIFrame1, text=" ")
l5.grid(row=11, column=0, sticky=W)
Button(GUIFrame1, text="Visit Linux Lite website", width=16, command=OpenUrl3).grid(row=11, column=0)

# last row of buttons
l6 = Label(GUIFrame2, text=" ")
l6.grid(row=13, column=0)
Button(GUIFrame2, text="Credits", width=6, command=OpenUrl1).grid(row=13, column=1)
Button(GUIFrame2, text="License", width=6, command=OpenUrl2).grid(row=13, column=2)
Button(GUIFrame2, text="Close", width=6, command=window.destroy).grid(row=13, column=3)

window.mainloop()
Reply
#44
Spacing done.

[Image: about1.png]

code
Code:
#!/usr/bin/env python
# code by bitsnpcs

from Tkinter import *
import webbrowser

url1 = 'https://www.freecinema2022.gq/development.html#team'
url2 = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html'
url3 = 'https://www.freecinema2022.gq/'
url4 = 'https://www.freecinema2022.gq/manual/'
url5 = 'https://www.freecinema2022.gq/forums/index.php'
url6 = 'https://www.freecinema2022.gq/donate.html'
url7 = 'https://www.freecinema2022.gq/shop.html'
url8 = '/usr/share/doc/litemanual/index.html'

# open browser and display url at line 7 thru 13
def OpenUrl1():
    webbrowser.open(url1)

def OpenUrl2():
    webbrowser.open(url2)

def OpenUrl3():
    webbrowser.open(url3)
   
def OpenUrl4():
    webbrowser.open(url4)
   
def OpenUrl5():
    webbrowser.open(url5)

def OpenUrl6():
    webbrowser.open(url6)
   
def OpenUrl7():
    webbrowser.open(url7)

def close_window():
    window.destroy()
   
def OpenUrl8():
    webbrowser.open(url8)
   
# Make window
window = Tk()
window.title("About Linux Lite")
window.geometry("242x250")
window.resizable(0,0)

# adding a menubar
menubar = Menu(window, bg='#ffe082')
window.config(menu=menubar)

photovar1 = PhotoImage(file='mlogo.png')
llmenu = Menubutton(menubar, image=photovar1)
menubar.add_cascade(image=photovar1, menu=llmenu)

helpmenu = Menu(menubar, bg='#ffe082', tearoff=0)
menubar.add_cascade(label='Help', menu=helpmenu)

supportmenu = Menu(menubar, bg='#ffe082', tearoff=0)
menubar.add_cascade(label='Support', menu=supportmenu)

def doHelp(  ): print 'doHelp'

helpmenu.add_command(label='Help Manual (local)', command=OpenUrl8)
helpmenu.add_command(label='Help Manual (online)', command=OpenUrl4)
helpmenu.add_command(label='Ask Community', command=OpenUrl5)
helpmenu = Menu(menubar)

def doSupport(  ): print 'doSupport'

supportmenu.add_command(label='Donate', command=OpenUrl6)
supportmenu.add_command(label='Shop', command=OpenUrl7)
supportmenu = Menu(menubar)

# uncomment below to add separator in menu, place code where seperator is wanted
# filemenu.add_separator(  )

# adding a logo
photo=PhotoImage(file="logo.png")
l1 = Button(image=photo,width=160, height=59, command=OpenUrl3)
l1.grid(row=4, column=0)
l1.place(x=36.3, y=12)
l1 = Label(window, text="     ")
l1.grid(row=5, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=6, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=7, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=8, column=0, sticky=W)

# adding a frame for ll website button
GUIFrame1=Frame(window)
GUIFrame1.grid(row=11, column=0)

#adding a frame for last row of buttons
GUIFrame2=Frame(window)
GUIFrame2.grid(row=13, column=0)

# define title, nym, year
l2 = Label(window, text=u"\u00a9Copyright 2012-2018 Jerry Bezencon", fg="grey", font="none 8")
l2.grid(row=15, column=0)

l3 = Label(window, text="     ")
l3.grid(row=0, column=0, sticky=W)
l3 = Label(window, text="     ")
l3 = Label(window, text="     ")
l3.grid(row=12, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=14, column=0, sticky=W)

l4 = Label(window, text="Current Version:")
l4.grid(row=9, column=0)

# r/w file to gui background
file = open("/etc/llver")
data = file.read()
file.close()
Results = Label(window, text = data)
Results.grid(row = 10, column = 0)

# ll website button
l5 = Label(GUIFrame1, text=" ")
l5.grid(row=11, column=0, sticky=W)
Button(GUIFrame1, text="Visit Linux Lite website", width=16, command=OpenUrl3).grid(row=11, column=0)

# last row of buttons
l6 = Label(GUIFrame2, text=" ")
l6.grid(row=13, column=0)
Button(GUIFrame2, text="Credits", width=6, command=OpenUrl1).grid(row=13, column=1)
Button(GUIFrame2, text="License", width=6, command=OpenUrl2).grid(row=13, column=2)
Button(GUIFrame2, text="Close", width=6, command=window.destroy).grid(row=13, column=3)

window.mainloop()
Reply
#45
Menu changes:

[Image: c8pfFKq.gif]

Code:
#!/usr/bin/env python
# code by bitsnpcs

from Tkinter import *
import webbrowser

url1 = 'https://www.freecinema2022.gq/development.html#team'
url2 = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html'
url3 = 'https://www.freecinema2022.gq/'
url4 = 'https://www.freecinema2022.gq/manual/'
url5 = 'https://www.freecinema2022.gq/forums/index.php'
url6 = 'https://www.freecinema2022.gq/donate.html'
url7 = 'https://www.freecinema2022.gq/shop.html'
url8 = '/usr/share/doc/litemanual/index.html'

# open browser and display url at line 7 thru 13
def OpenUrl1():
    webbrowser.open(url1)

def OpenUrl2():
    webbrowser.open(url2)

def OpenUrl3():
    webbrowser.open(url3)
   
def OpenUrl4():
    webbrowser.open(url4)
   
def OpenUrl5():
    webbrowser.open(url5)

def OpenUrl6():
    webbrowser.open(url6)
   
def OpenUrl7():
    webbrowser.open(url7)

def close_window():
    window.destroy()
   
def OpenUrl8():
    webbrowser.open(url8)
   
# Make window
window = Tk()
window.title("About Linux Lite")
window.geometry("242x250")
window.resizable(0,0)

# adding a menubar
menubar = Menu(window, bg='#ffe082')
window.config(menu=menubar)

photovar1 = PhotoImage(file='mlogo.png')
llmenu = Menubutton(menubar, image=photovar1)
menubar.add_cascade(image=photovar1, menu=llmenu)

supportmenu = Menu(menubar, bg='#ffe082', tearoff=0)
menubar.add_cascade(label='Support', menu=supportmenu)

contributemenu = Menu(menubar, bg='#ffe082', tearoff=0)
menubar.add_cascade(label='Contribute', menu=contributemenu)

def doSupport(  ): print 'doSupport'

supportmenu.add_command(label='Help Manual (local)', command=OpenUrl8)
supportmenu.add_command(label='Help Manual (online)', command=OpenUrl4)
supportmenu.add_command(label='Forums', command=OpenUrl5)
supportmenu = Menu(menubar)

def doContribute(  ): print 'doContribute'

contributemenu.add_command(label='Donate', command=OpenUrl6)
contributemenu.add_command(label='Shop', command=OpenUrl7)
contributemenu = Menu(menubar)

# uncomment below to add separator in menu, place code where seperator is wanted
# filemenu.add_separator(  )

# adding a logo
photo=PhotoImage(file="logo.png")
l1 = Button(image=photo,width=160, height=59, command=OpenUrl3)
l1.grid(row=4, column=0)
l1.place(x=36.3, y=12)
l1 = Label(window, text="     ")
l1.grid(row=5, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=6, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=7, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=8, column=0, sticky=W)

# adding a frame for ll website button
GUIFrame1=Frame(window)
GUIFrame1.grid(row=11, column=0)

#adding a frame for last row of buttons
GUIFrame2=Frame(window)
GUIFrame2.grid(row=13, column=0)

# define title, nym, year
l2 = Label(window, text=u"\u00a9Copyright 2012-2018 Jerry Bezencon", fg="grey", font="none 8")
l2.grid(row=15, column=0)

l3 = Label(window, text="     ")
l3.grid(row=0, column=0, sticky=W)
l3 = Label(window, text="     ")
l3 = Label(window, text="     ")
l3.grid(row=12, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=14, column=0, sticky=W)

l4 = Label(window, text="Current Version:")
l4.grid(row=9, column=0)

# r/w file to gui background
file = open("/etc/llver")
data = file.read()
file.close()
Results = Label(window, text = data)
Results.grid(row = 10, column = 0)

# ll website button
l5 = Label(GUIFrame1, text=" ")
l5.grid(row=11, column=0, sticky=W)
Button(GUIFrame1, text="Visit Linux Lite website", width=16, command=OpenUrl3).grid(row=11, column=0)

# last row of buttons
l6 = Label(GUIFrame2, text=" ")
l6.grid(row=13, column=0)
Button(GUIFrame2, text="Credits", width=6, command=OpenUrl1).grid(row=13, column=1)
Button(GUIFrame2, text="License", width=6, command=OpenUrl2).grid(row=13, column=2)
Button(GUIFrame2, text="Close", width=6, command=window.destroy).grid(row=13, column=3)

window.mainloop()
Reply
#46
#5 - reads my /etc/llver file perfectly, no matter what I put in it. Nice job Smile
Reply
#47
In regards to Themes - Id like to keep the app as simple as possible for the moment. What I did have an idea about is 'Send Logs' from the Menu.
This would make a tar.gz and upload all relevant logs that devs need to see in order to fix a problem. This is already an About box on steroids, so we may need to just concentrate on refinement for now.
Reply
#48
I have changed the code at my end to match now.Your changes make it clear as to what each menu is for Smile
I have also made code changes -
I duplicated a label "l3" and did not add a grid below it so it was not in use anyhow, but the line needed deleting as if a grid is added at a future check it would change the spacing.Look for two of this line one below another, around line 108
Code:
l3 = Label(window, text="     ")
The other changes were tidying, in the define area, lines 38 and lines 41 are now switched with each others line.So that all the define of the Open Url are together and tidy.Rather than 1-7 of Open Url, then a def close window, then def open url 8.


[Image: Screenshot-2018-10-23-04-18-40.png]


Code with the edits above done, and also with all of your edits done, so I have it all up to date now.

Code:
#!/usr/bin/env python
# code by bitsnpcs

from Tkinter import *
import webbrowser

url1 = 'https://www.freecinema2022.gq/development.html#team'
url2 = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html'
url3 = 'https://www.freecinema2022.gq/'
url4 = 'https://www.freecinema2022.gq/manual/'
url5 = 'https://www.freecinema2022.gq/forums/index.php'
url6 = 'https://www.freecinema2022.gq/donate.html'
url7 = 'https://www.freecinema2022.gq/shop.html'
url8 = '/usr/share/doc/litemanual/index.html'

# open browser and display url at line 7 thru 13
def OpenUrl1():
    webbrowser.open(url1)

def OpenUrl2():
    webbrowser.open(url2)

def OpenUrl3():
    webbrowser.open(url3)
   
def OpenUrl4():
    webbrowser.open(url4)
   
def OpenUrl5():
    webbrowser.open(url5)

def OpenUrl6():
    webbrowser.open(url6)
   
def OpenUrl7():
    webbrowser.open(url7)

def OpenUrl8():
    webbrowser.open(url8)
   
def close_window():
    window.destroy()
   
# Make window
window = Tk()
window.title("About Linux Lite")
window.geometry("242x250")
window.resizable(0,0)

# adding a menubar
menubar = Menu(window, bg='#ffe082')
window.config(menu=menubar)

photovar1 = PhotoImage(file='mlogo.png')
llmenu = Menubutton(menubar, image=photovar1)
menubar.add_cascade(image=photovar1, menu=llmenu)

supportmenu = Menu(menubar, bg='#ffe082', tearoff=0)
menubar.add_cascade(label='Support', menu=supportmenu)

contributemenu = Menu(menubar, bg='#ffe082', tearoff=0)
menubar.add_cascade(label='Contribute', menu=contributemenu)

def doSupport(  ): print 'doSupport'

supportmenu.add_command(label='Help Manual (local)', command=OpenUrl8)
supportmenu.add_command(label='Help Manual (online)', command=OpenUrl4)
supportmenu.add_command(label='Forums', command=OpenUrl5)
supportmenu = Menu(menubar)

def doContribute(  ): print 'doContribute'

contributemenu.add_command(label='Donate', command=OpenUrl6)
contributemenu.add_command(label='Shop', command=OpenUrl7)
contributemenu = Menu(menubar)

# uncomment below to add separator in menu, place code where seperator is wanted
# filemenu.add_separator(  )

# adding a logo
photo=PhotoImage(file="logo.png")
l1 = Button(image=photo,width=160, height=59, command=OpenUrl3)
l1.grid(row=4, column=0)
l1.place(x=36.3, y=12)
l1 = Label(window, text="     ")
l1.grid(row=5, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=6, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=7, column=0, sticky=W)
l1 = Label(window, text="     ")
l1.grid(row=8, column=0, sticky=W)

# adding a frame for ll website button
GUIFrame1=Frame(window)
GUIFrame1.grid(row=11, column=0)

#adding a frame for last row of buttons
GUIFrame2=Frame(window)
GUIFrame2.grid(row=13, column=0)

# define title, nym, year
l2 = Label(window, text=u"\u00a9Copyright 2012-2018 Jerry Bezencon", fg="grey", font="none 8")
l2.grid(row=15, column=0)

l3 = Label(window, text="     ")
l3.grid(row=0, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=12, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=14, column=0, sticky=W)

l4 = Label(window, text="Current Version:")
l4.grid(row=9, column=0)

# r/w file to gui background
file = open("/etc/llver")
data = file.read()
file.close()
Results = Label(window, text = data)
Results.grid(row = 10, column = 0)

# ll website button
l5 = Label(GUIFrame1, text=" ")
l5.grid(row=11, column=0, sticky=W)
Button(GUIFrame1, text="Visit Linux Lite website", width=16, command=OpenUrl3).grid(row=11, column=0)

# last row of buttons
l6 = Label(GUIFrame2, text=" ")
l6.grid(row=13, column=0)
Button(GUIFrame2, text="Credits", width=6, command=OpenUrl1).grid(row=13, column=1)
Button(GUIFrame2, text="License", width=6, command=OpenUrl2).grid(row=13, column=2)
Button(GUIFrame2, text="Close", width=6, command=window.destroy).grid(row=13, column=3)

window.mainloop()
Reply
#49
Awesome Smile
Reply
#50
(10-23-2018, 02:37 AM)Jerry link Wrote:#5 - reads my /etc/llver file perfectly, no matter what I put in it. Nice job Smile

Smile

(10-23-2018, 02:40 AM)Jerry link Wrote:In regards to Themes - Id like to keep the app as simple as possible for the moment. What I did have an idea about is 'Send Logs' from the Menu.
This would make a tar.gz and upload all relevant logs that devs need to see in order to fix a problem. This is already an About box on steroids, so we may need to just concentrate on refinement for now.

The "Send Logs" sounds like it would be a useful app for both members and devs.

Concentrating on refinement sounds good.

When does LL 5.0 get released ?

Do you have a list of apps, or a poll of apps for LL 5.0  and beyond ?
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)