seeking HOWTO -- write simple desktop app

Forum rules
Before you post please read how to get help

seeking HOWTO -- write simple desktop app

Postby SaintDanBert on Thu Jun 21, 2012 3:05 pm

The last time I wrote "desktop" applications was with pure X11 and the Athena Widgets in the 1980's.
Needless to say, my desktop app skills have a lot of dust and rust. That, and the tools and techniques
have evolved and become more complex in terms of developer choices. So I ask my question among
friends at Mint forums...

If I want to write a simple desktop utility application to run with Mint and her desktop(s), where do I start?
With Gnome and variants, MATE, LMDE, Cinnamon, KDE, GTK, and friends, it seems there is a lot of
heavy lifting involved just to get started.

I have no grief writing a command line app to do what I want. Let's call this the "gears and motors" for
what my application wants to do. Next I want to put desktop app clothes onto these gears and motors.
I can't help wondering if there are tools to help me sculpt the windows and dialog boxes and get a working
user interface all ready for connection to the "gears and motors" part of the application.

Maybe a python wrapper for my command line "gears and motors" is good enough, but I must believe
there paths to a simple desktop utility in addition to scripted wrappers.

Thanks in advance,
~~~ 0;-Dan
All government spending, regardless of the motives, uses YOUR money!
Any government extensive enough to give you anything that you want is also
powerful enough to take everything that you have.
User avatar
SaintDanBert
Level 3
Level 3
 
Posts: 155
Joined: Sat Feb 20, 2010 4:04 pm
Location: Austin, TX USA

Linux Mint is funded by ads and donations.
 

Re: seeking HOWTO -- write simple desktop app

Postby xenopeek on Fri Jun 22, 2012 3:48 am

Moving it here, as I think any programmers also visit this section of the forums.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15452
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: seeking HOWTO -- write simple desktop app

Postby SaintDanBert on Fri Jun 22, 2012 3:11 pm

Thanks for noticing and doing all that you do as a moderator.
~~~ 0;-Dan
All government spending, regardless of the motives, uses YOUR money!
Any government extensive enough to give you anything that you want is also
powerful enough to take everything that you have.
User avatar
SaintDanBert
Level 3
Level 3
 
Posts: 155
Joined: Sat Feb 20, 2010 4:04 pm
Location: Austin, TX USA

Re: seeking HOWTO -- write simple desktop app

Postby SaintDanBert on Sat Jun 23, 2012 6:32 pm

I found a page of "frameworks" for writing Python apps at http://wiki.python.org/moin/GuiProgramming.
That led me to look on my workstation for the various 'mumble.py' executable files -- thinking that one might be
a useful utility application that I might use as a pattern.

Sadly, most of the files that I find have few if any comment statements so they are very awkward to study for programming details.
Q1. I know that comment statements slow down interpreter execution, but is there some other reason
why there are no comments in "production python"?

Q2. Are there any tools that let me drag and drop application widgets onto a canvas to make the user interface
for a desktop application? (I'd prefer something that is agnostic of the implementation language if that is possible.)
NOTE -- Back in those dark days of X11 work, there were tools that listed the various widgets in a dialog as a text file
that was read and processed at run time. Maybe something similar exists that uses XML or similar these days.


Q3. Does anyone know of an application or utility, written in python or similar, that would make a good
and useful program to study and learn from?

Thanks in advance,
~~~ 0;-Dan
All government spending, regardless of the motives, uses YOUR money!
Any government extensive enough to give you anything that you want is also
powerful enough to take everything that you have.
User avatar
SaintDanBert
Level 3
Level 3
 
Posts: 155
Joined: Sat Feb 20, 2010 4:04 pm
Location: Austin, TX USA

Re: seeking HOWTO -- write simple desktop app

Postby xenopeek on Sun Jun 24, 2012 1:04 am

A2: If you want to write Gtk+ applications, have a look at Glade. Glade is a graphical user interface builder for Gtk+ applications.

Gtk+ is used natively on Gnome2/MATE, Gnome3/Cinnamon, Xfce, Lxde and others. Gtk+ applications also run on KDE (KDE uses Qt instead of Gtk), and though they may integrate it little less seamlessly, they will work fine. Note that Gnome3/Cinnamon is using Gtk+ version 3, the others are using version 2.

An example with Gtk+ 2: http://mo.morsi.org/blog/node/362

A tutorial with Gtk+ 3: http://www.micahcarrick.com/gtk-glade-t ... art-1.html

If you Google "Python Gtk" you will find more examples.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15452
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 3 guests