Development > Linux Lite Software Development

Who wants to write a basic About box for Linux Lite?

(1/12) > >>

Jerry:
I'm thinking in Series 5.x of having a replacement for llver.

When you type in llver, a simple dialogue box will appear with some basic information about Linux Lite. Think 'winver' in Windows.



A linux example:



The yad box is about perfect as an example of layout, information etc.

Our About box needs to have:

- Latest version of Linux Lite
- License (GPLv2) button
- Close button
- Credits button
- Linux Lite logo
- Linux to our website
- Copyright 2012 - 2018

You can write this in any language you like. I would suggest Python, but it's up to you. The finished product needs to be one, executable file. eg. llver.py

Happy hacking!

bitsnpcs:
Hello,
is there a url for the credits button ?
Edit -Linked to the Team page on main site

bitsnpcs:



I cannot get an image to embed directly in to, as I haven't done that before and not having much luck with it, maybe someone else can do that, if you like it that is.
The image just as an example goes between the LL 5.0 and Simple Fast Free, line of text, it can go above like in the example if you wanted.

The button for Linux Lite website, detects and opens the default browser (tested with Firefox and Opera) and displays the Main LL website.
Credits button opens a browser and loads the #Team page on the Main LL website.
License button opens the GPLv2 license webpage.
Close button kills/closes the window, with zero errors (tested), also the X button will close the window (tested) with no errors.

I wrote this in Python, using Gedit, (on Linux Lite)  it runs from 1 file "llver.py" from the command line.
It can be run from a desktop icon or menu item, and the silent tag used so it displays only the gui and not the terminal.
If you like it I can add the Python code to a reply.

Jerry:
That's excellent bitsnpcs, we are on the right track :)

You can point to an existing logo icon location in your code. If you could embed your code into this thread each time you make a change, that would be great.

bitsnpcs:

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

from Tkinter import *
import webbrowser

url1 = 'https://www.linuxliteos.com/development.html#team'
url2 = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html'
url3 = 'https://www.linuxliteos.com/'

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

def OpenUrl2():
    webbrowser.open(url2)

def OpenUrl3():
    webbrowser.open(url3)
   
def close_window():
    window.destroy()

# Make window
window = Tk()
window.title("About Linux Lite")
window.geometry("242x242")

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

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

# define title, nym, year
l1 = Label(window, text="             Linux Lite 5.0", font="bold")
l1.grid(row=1, column=0, sticky=W)
l2 = Label(window, text=u"\u00a9 Copyright 2012-2018 Jerry Bezencon", fg="grey", font="none 8")
l2.grid(row=13, column=0)

l3 = Label(window, text="     ")
l3.grid(row=4, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=0, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=10, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=6, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=7, column=0, sticky=W)
l3 = Label(window, text="     ")
l3.grid(row=12, column=0, sticky=W)

l4 = Label(window, text="                 Simple Fast Free")
l4.grid(row=8, column=0, sticky=W)
l3 = Label(window, text="      ")
l3.grid(row=9, column=0, sticky=W)

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

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

window.mainloop()
--- End code ---

Here is the code for as it is above.
I will look in to how to link to the icon.

Navigation

[0] Message Index

[#] Next page

Go to full version