Dev - looking for small C+GTK+ application example

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Petermint
Level 4
Level 4
Posts: 283
Joined: Tue Feb 16, 2016 3:12 am

Dev - looking for small C+GTK+ application example

Postby Petermint » Tue Oct 17, 2017 7:31 pm

LM 18.2. Cinnamon. About to develop a small application using C + GTK. Need to accept parameters, read and create settings files, plus optionally switch into sudo mode. Eventually the application might be used on other operating systems. I like Gimp and use Gimp across several operating systems. Gimp is too big as a first example to learn C + GTK. Which open source applications running on LM are small, C + GTK, simple examples I can look at?

I wrote something in C + Gnome stuff then Vala + Gnome stuff. I am looking to trim the code back to the minimum and to keep open the option to compile the the code for other operating systems without requiring the user to install other code.

I looked at a few applications and they used Python. Still looking for good example.

Petermint
Level 4
Level 4
Posts: 283
Joined: Tue Feb 16, 2016 3:12 am

Re: Dev - looking for small C+GTK+ application example

Postby Petermint » Tue Oct 17, 2017 7:40 pm

Xreader (Document Viewer) looks like a good source for GTK+ usage in C. They have some nice documentation links at https://github.com/linuxmint/xreader/. I might start with that.

Xreader has a settings bit and an About display. There is a file open. There is no switch to sudo mode.

Petermint
Level 4
Level 4
Posts: 283
Joined: Tue Feb 16, 2016 3:12 am

Re: Dev - looking for small C + GTK+ application example

Postby Petermint » Wed Oct 18, 2017 3:29 am

I attempted to compile the following example using Netbeans.
https://developer.gnome.org/gtk3/stable/gtk-getting-started.html
Fail, fail, fail. I worked through close to a hundred Web pages explaining what might be wrong. Still no success. Will try the command line.

Success first time with the command line.


Return to “Other topics”