SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-02-24 17:08:31

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Hello everyone,

Here I am, accouncing any of my projects publicly for the first time! I am trying to switch to as much GTK3 applications as possible (and, ultimately, try ditch as many GTK2). It has always bothered me that there is no GTK3 alternative to something as simple as Gcolor2. Today, I just quickly whipped it up myself, after having gained some experience in GTK3 from my previous (yet unnanounced) project.

It's very, very simple (93 SLOC, of which most are the About dialog tongue) and for now, it consists of a color wheel and number of sliders and entry boxes for color parameters. You can also pick a color on the desktop. I never used the color-saving feature of Gcolor2, so for now I have not implemented it. Anything is possible though, upon request wink

Screenshot

Feedback - on everything; the application itself and the Makefile - would be appreciated. My experience with Makefiles is limited, so if anything could be improved (in general, or to help compatibility with other distributions for example) please let me know!

You can find the project here!

I think that's it! smile

Last edited by Unia (2013-06-21 14:40:07)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

Be excellent to each other!

#2 2013-02-24 19:54:08

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

It builds cleanly and your AUR package works. The application looks completely native, I tested it in various GTK3 themes. One thing, I'm not sure you're allowed to claim copyright, as you don't own the code. Bette rcheck up on that, I wouldn't want you stepping on people's toes.

Good work.

Offline

#3 2013-02-24 20:02:21

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

el_koraco wrote:

It builds cleanly and your AUR package works. The application looks completely native, I tested it in various GTK3 themes. One thing, I'm not sure you're allowed to claim copyright, as you don't own the code. Bette rcheck up on that, I wouldn't want you stepping on people's toes.

Good work.

I own the code; I wrote it from scratch. Or actually, I took it from that other project of mine. It's not a port or something; just the idea is what I borrowed wink

Thanks for the feedback!

Last edited by Unia (2013-02-24 20:02:57)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#4 2013-02-24 20:39:10

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

My bad, brother. Very nice work then, it's a high quality application.

Offline

#5 2013-02-24 20:51:07

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Thanks! If you care for translations, pull the new Git; I went with stock buttons that are automatically translated to your locale. Now everything is translated, except for the About Dialog which will remain English.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#6 2013-02-26 12:36:39

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 3,207

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Congrats on going public, Unia. What markets does your stock trade at?

I don't employ GTK3 yet, since I don't use anything that requires it (will if xxxterm/xombrero decides to make it a dependency one day), so I can't really test it out. Looks very nice, though. Needs the ability to measure luminance to bring it into the 21st century, imho.

Last edited by gutterslob (2013-02-26 12:40:15)


Point & Squirt

Offline

#7 2013-02-26 14:53:56

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

gutterslob wrote:

Congrats on going public, Unia. What markets does your stock trade at?

Que?

gutterslob wrote:

I don't employ GTK3 yet, since I don't use anything that requires it (will if xxxterm/xombrero decides to make it a dependency one day), so I can't really test it out. Looks very nice, though. Needs the ability to measure luminance to bring it into the 21st century, imho.

I don't think this would be easy to add, since I'm just using the gtk_color_selection_new() function which has all the buttons and color chooser inside of it. However, if you could tell me any (preferably GTK{2,3}) application that has it I would be willing to see how they have implemented it.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#8 2013-03-03 18:46:35

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Update: Gcolor3 now has a treeview inside an expander (just as Gcolor2, of course) which lists your saved colors. These colors are also exported to a file ($HOME/.rgb.txt), just like - of course - Gcolor2.

I am currently aware of one bug, but I have not yet discovered why. A quick example: save three colors:

#FF0000 RED
#00FF00 GREEN
#0000FF BLUE

Then, delete GREEN. As expected, the green color is removed from the treeview and the rgb.txt file. However, also the blue color is removed from the rgb.txt file. If you could help me decipher a pattern, I would appreciate this smile


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#9 2013-03-03 19:48:56

dura
Bloated Gimp
From: interzone
Registered: 2012-09-15
Posts: 2,108

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Nice this. Shame if I was to "upgrade" to Gnome or something using gtk3 then I wouldn't have much use for it.

Offline

#10 2013-03-03 21:09:05

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

dura wrote:

Nice this. Shame if I was to "upgrade" to Gnome or something using gtk3 then I wouldn't have much use for it.

Actually, I have no much use for it either big_smile I barely theme anything anymore, but I just wanted a GTK3 port and I always keep a simple color picker around should I need one.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#11 2013-03-04 11:40:19

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Sujoy over at the Arch boards came up with a fix for deleting multiple colors, as described above. Just pull the new Git and everything should (note: should tongue) work!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#12 2013-03-31 21:26:52

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Just pushed a big update to GitHub: the source is now split across multiple files for easier editing and I cleaned it up a tad. No features were removed or added, but I thought I'd give you a heads up in case you rebuilt it and notice new bugs  ]:D


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#13 2013-06-08 19:35:35

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

I've just imported Gcolor3 into Anjuta for easier project management and to be (more easily) compatible with other distributions. I'm still exploring things (I still have to figure out how to install the .desktop file, for example) but I thought I'd give you a heads up. There's no actual changes to the code, but a big advantage from this switch is the enabling of translations.

Yes, that's right, you can now translate Gcolor3 in your own language. Since it's a small application, the translating should not take more than five minutes. I would highly appreciate your efforts if you could translate! Instructions can be found in the GitHub repository's README.md.

Last edited by Unia (2013-06-09 19:51:30)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#14 2013-06-10 12:52:06

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

As we're nearing a stable 1.0 release (I finally solved the bug that was there since I added the treeview and that I've been looking into for a month big_smile), I thought it would be time to have a Page on GitHub. Perhaps this will help spread the word on Gcolor3!

http://unia.github.io/gcolor3/

Last edited by Unia (2013-06-10 12:52:20)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#15 2013-06-11 17:59:03

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

I've released version 1.0! From now on, I will only add bug fixes and add new or update existing translations.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#16 2013-06-11 19:51:55

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Awesome icon ! (I kid, I still can't test it, as I'm not on GNOME 3.)


bunsenlabs     8)     forum mod squad

Offline

#17 2013-06-11 19:54:51

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

hhh wrote:

Awesome icon ! (I kid, I still can't test it, as I'm not on GNOME 3.)

Indeed, the icon is the best thing of the whole application  {)

Last edited by Unia (2013-06-11 19:55:04)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#18 2013-10-20 14:45:43

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Gcolor3 just got updated to version 1.2! It now uses GTK 3.10's GtkHeaderbar and a GtkStack to switch between the color chooser and the saved colors. I know Debian and derivatives are far from using 3.10, but perhaps there are some people on other distributions here (including myself) that do have it available! Functionally, it's completely the same wink

Let me know what you think!

PS: version 1.0 is still available and should be used if your distro does not use GTK 3.10 yet.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#19 2013-10-21 21:43:02

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Someone at the Arch boards mentioned that the headerbar was a bit too cluttered with the new release. He suggested to remove the title and subtitle and to use images in the buttons instead. I had some time to work on this tonight and here is how it looks now:

22-10-2013.png

I'd like to hear some opinions on whether or not this is an improvement to Gcolor3!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#20 2013-10-25 11:29:49

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Pushed version 1.2.1 with the new UI.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#21 2015-07-19 21:12:48

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Just finished the rewrite that spanned a few months and caused a few headaches by having a broken master for a while tongue

Before I officially release version 2.0, can some of you please give it a test run? I think I got all the bugs out, but some of you are really good at breaking stuff big_smile

Also, feel free to update currently outdated translations - or add new! See the README for an explanation on how to do this.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#22 2015-07-21 15:32:01

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Unia wrote:

...some of you are really good at breaking stuff big_smile

You rang?  tongue

I tried this on jessie with a minimal GNOME setup (no at-spi2, no GOA, a few other things left out). I had to install gnome-common, I used --no-install-recommends. I also had to install libglib2.0-dev which I did normally. autogen.sh still failed, missing gtk+-3.0. I installed libgtk-3-dev normally, this pulled in some dependencies...

  libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev
  libcairo-script-interpreter2 libcairo2-dev libdbus-1-dev libdbus-glib-1-dev
  libexpat1-dev libfontconfig1-dev libfreetype6-dev libgdk-pixbuf2.0-dev
  libgtk-3-dev libharfbuzz-dev libharfbuzz-gobject0 libice-dev libpango1.0-dev
  libpixman-1-dev libpng12-dev libpthread-stubs0-dev libsm-dev libwayland-dev
  libx11-dev libxau-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev
  libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev
  libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev
  libxrandr-dev libxrender-dev libxtst-dev x11proto-composite-dev
  x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev
  x11proto-kb-dev x11proto-randr-dev x11proto-record-dev x11proto-render-dev
  x11proto-xext-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev

Now ./autogen.sh, make, sudo make clean install worked, but running gcolor3 resulted in the following...

hhh@base:~/Downloads/gcolor3-master$ gcolor3

** (gcolor3:12838): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

** (gcolor3:12838): WARNING **: Error opening file: No such file or directory. Exiting...

Segmentation fault

The first warning is due to at-spi2 packages missing, but that shouldn't kill the program. Hope this helps.


bunsenlabs     8)     forum mod squad

Offline

#23 2015-07-21 17:59:06

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Your new version works perfectly for me smile

Have you worked some magic on it?

I ask because when I set dwm to floating mode, I can move the window about by dragging it around from the title bar without using the mod key yikes
EDIT: Never mind, evince does this as well -- perhaps GTK3 applications work better with dwm than I had previously supposed...


Anyway, scrot time:
2015_07_21_185713_1920x1080_scrot.jpg
This is in Arch (updated this morning).

Last edited by Head_on_a_Stick (2015-07-21 18:01:35)

Offline

#24 2015-07-21 18:38:58

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

The segfault hhh and one other person (to my knowledge) experience is due to a missing ~/.rgb.ini which gcolor3 uses to save colors. I'm working on a fix. EDIT: Should be fixed now.

@HoaS, are you sure you have the latest git master? You should not be seeing the "about" button anymore. At least, not there big_smile

Last edited by Unia (2015-07-21 18:58:20)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

Help fund CrunchBang, donate to the project!

#25 2015-07-21 19:10:41

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Gcolor3 - a simple color chooser dialog in GTK3, much alike gcolor2.

Unia wrote:

@HoaS, are you sure you have the latest git master? You should not be seeing the "about" button anymore. At least, not there big_smile

Ooops! I didn't use the git master, I just downloaded the tarball from your site  :8

Give me a minute...

EDIT: It built fine but:

empty@Arch ~/git/gcolor3 (git)-[master] % gcolor3

** (gcolor3:6311): WARNING **: Error opening file: No such file or directory. Exiting...


(gcolor3:6311): GLib-GObject-WARNING **: The property GtkSettings:gtk-color-palette is deprecated and shouldn't be used anymore. It will be removed in a future version.

It doesn't start sad

Last edited by Head_on_a_Stick (2015-07-21 19:15:14)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo