Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a GUI #102

Closed
6 tasks done
Foggalong opened this issue Jul 23, 2015 · 127 comments
Closed
6 tasks done

Add a GUI #102

Foggalong opened this issue Jul 23, 2015 · 127 comments

Comments

@Foggalong
Copy link
Contributor

A few people have brought up that it would be good to have a GUI for the script. This would especially be useful for the custom folder colours since it would allow people to test things out with the gtk colour chooser. Here's a list of things I'd like to be implemented as part of the GUI:

  • flag which allows the user to run the script in CLI mode
  • drop down menu to pick the base style
  • drop down menu to pick the colour
  • custom item in colour list which will causes 1-3 new variable buttons to appear
  • gtk-color-picker to choose the custom colour buttons
  • preview icon (user-home.svg) which shows what current options will look like
@andia89
Copy link
Contributor

andia89 commented Jul 23, 2015

I started fiddling around a little bit, but it seems that zenity is not powerful enough :( Do you have any preferences for the toolkit? (if we want to do this using bash gtkdialog would be a reasonable choice)

@Foggalong
Copy link
Contributor Author

Yeah, that would be fine with me! :)

@andia89
Copy link
Contributor

andia89 commented Jul 23, 2015

So I get that you're thinking of one big window where you can choose everything, am I right? The other way would be to have first a window for style then a window for colour etc...

@Foggalong
Copy link
Contributor Author

Threw something together very roughly in glade to show what I was rambling on about in the op. Had the further thought that if the 3 custom boxes are always visible then people can first select a default colour (i.e. red) and the move from there if they so wish.

screenshot_2015-07-23_20-43-14

Clicking on any of those 3 hex boxes should launch the GTK colour picker. It'd also be nice to have small 16px previews for each Style and Color entry too but I'm not sure how to go about displaying that in the mockup

@andia89
Copy link
Contributor

andia89 commented Jul 23, 2015

Cool, that should be fairly easy :)

@bilelmoussaoui
Copy link
Contributor

I think that you should show others folders that use a symblo; for example : music...

@andia89
Copy link
Contributor

andia89 commented Jul 23, 2015

I guess user-home is the most appropriate

@Foggalong
Copy link
Contributor Author

Just one is fine for a preview. Ideally it'd be displayed at 64 or 96 px so substantially bigger than in my mockup

@andia89
Copy link
Contributor

andia89 commented Jul 23, 2015

First try:
unbenannt

Now I have to connect all the signals etc...

@andia89
Copy link
Contributor

andia89 commented Jul 29, 2015

I have it almost ready. Just a few quirks I have to polish :) unfortunately gtkdialog is probably the worst documented piece of software i've ever encountered :(

@Foggalong
Copy link
Contributor Author

Worse than the GJS with GNOME Shell? D:

@andia89
Copy link
Contributor

andia89 commented Jul 29, 2015

I've Never used GJS but it can't be worse :P

@Foggalong
Copy link
Contributor Author

There literally isn't any documentation for the GJS GNOME Shell API, that's why development of Atom has been so slow. It's literally a case of trial and error for working out how to do things :'(

@satya164
Copy link
Contributor

Shouldn't you be using GtkApplication instead of GtkDialog?

@andia89
Copy link
Contributor

andia89 commented Jul 29, 2015

with gtkdialog I mean this: https://code.google.com/p/gtkdialog/
is reasonable because it allows bash programming

@andia89
Copy link
Contributor

andia89 commented Jul 30, 2015

Ok. Although it's almost finished there are a few critical bugs I cannot iron out using gtkdialog, be it bcause there are crucial signals missing for a lot of widgets, or there are bugs in the software (as far as I understand).

This means that I cannot give that to you as is it is now, would it be ok to rewrite the whole thing using a different toolkit? (I'd love to do it using pygtk, I can also use something else) That should be fairly easy because I already have the structure and general idea

@bilelmoussaoui
Copy link
Contributor

I guess that using Pygtk is a good idea ;)

@andia89
Copy link
Contributor

andia89 commented Jul 31, 2015

@dirtydancing @bil-elmoussaoui @Foggalong and whoever else it may concern: I've finished the GUI and it's working pretty great, nevertheless there are probably some (presumably small) bugs. Anyone fancy to test it?

https://github.com/wa4557/numix-folders/tree/gui/gui

Just run it (for now until I added it to the the bash script) using: ./gui "5" "red" or ./gui "1" "custom" "#000000" "#000000" "#000000" (or any other combination thereof;the first number is the style, the second one the colour and the rest custom colours if there are any)

Btw: If there's a pro using GTK: I'm still trying to find out how to minimize the width of the entry boxes (that's basically the only thing I kinda dislike about this GUI)

@bilelmoussaoui
Copy link
Contributor

@wa4557 worked for me, just some few things that you can fix easily

  • use except & try for copyfile to handle if a file does not exists
  • in the line 32 and 36 why not using color.lower() in .. instead for what you've done?

@andia89
Copy link
Contributor

andia89 commented Jul 31, 2015

  1. Good point, I am however still trying to think of a way to do this without copying any files on the harddisk, but keeping the svg in the memory somehow...

  2. True, I'll change that

@bilelmoussaoui
Copy link
Contributor

Last thing, i think you can read the config file directly using python ;) I don't know if you're going to only use the GUI or you will keep the bash script file too

@andia89
Copy link
Contributor

andia89 commented Jul 31, 2015

The bash script will definitely stay :) I already have a good plan to implement this script in the bash script

@andia89
Copy link
Contributor

andia89 commented Jul 31, 2015

I added the python script to the bash script. Seems to work. So if you want to test this you may also use this one :) https://github.com/wa4557/numix-folders/tree/guiconfig

@bilelmoussaoui
Copy link
Contributor

Good work!! Just one thing, the icon for style 1 does not change as it should be. And there's no way to chose which style you want to use as base for the colours?
screenshot 31-07-2015 21 42 24

@andia89
Copy link
Contributor

andia89 commented Jul 31, 2015

The symbol in style 1 is actually not a symbol but a hole in the baseplate therefore it cannot be changed. Sure there is: use the combobox and select for example "style 1"

@bilelmoussaoui
Copy link
Contributor

Ah i just didn't saw that :P closing the application will anyway call the bash script :/ and i think you can add this to Gtk.entry self.colorentry2.set_max_length(7) or just make it 6 and remove the # from the Gtk.entry

@bilelmoussaoui
Copy link
Contributor

One last thing, the icons colour should be updated at first start, you can try to change the icons to any custom colour, restart the application, the colours are the default ones and the icons are not..In the first start update, you can add there later a way to check for config file saved configurations.

@Foggalong
Copy link
Contributor Author

👍

@bilelmoussaoui
Copy link
Contributor

Sorry guys i'm a little bit busy, i will try to do it this weekend if possible ;)

@Foggalong
Copy link
Contributor Author

No problem! :)

@andia89
Copy link
Contributor

andia89 commented Sep 15, 2015

@bil-elmoussaoui Do you already have something? If not I might start working on this today. If yes and you have no time to finish/continue work on this you could give me what you have (pastebin) and I'll continue to work on this. Or if you really want to do this on your own I will let you do this and stop working on this

@bilelmoussaoui
Copy link
Contributor

@wa4557 I'm sorry, i started school this week and i'm so busy those days too :/ Just start working on it if you want to, if i got any free time i might help you with it ;)

@andia89
Copy link
Contributor

andia89 commented Sep 16, 2015

No need to apologize :) I'll start on this asap (argh so many things to fix here right now :)

@andia89
Copy link
Contributor

andia89 commented Sep 16, 2015

I have it ready, which means that it works, but I'm not able to center the widgets in the first and second row, help anyone? On a second note, please test it :)
https://github.com/wa4557/numix-folders/tree/gui2

@dirtydancing
Copy link
Contributor

Looking good and working smoothly 👍 , status: andia89@2c7da24

I like the current design. For your consideration, a couple of thoughts:

  1. Maybe left-align the style dropdown and the colour preview boxes? Or is everything centered?

  2. Alternatively, maybe left-align all rows including the folder icon preview, except for cancel/apply?

  3. Maybe use a bigger folder preview icon? Then again, iirc that would be much bigger and too big?

GUI screenshot:
gui_new

@andia89
Copy link
Contributor

andia89 commented Sep 16, 2015

Aligning is extremeley complicated, frankly I have no idea how to do that properly :), but the idea is, that everything is centered. Left aligning somehow looks crooked, I tried that already.

As to 3) The next size is 128px (twice as big) which is arguably too big

@andia89
Copy link
Contributor

andia89 commented Sep 16, 2015

Nevermind I've added a bigger preview (good call) because the next size is not 128px but 96px

@dirtydancing
Copy link
Contributor

Yep, even better now 👍

Screenshot:
gui_new_2

@andia89
Copy link
Contributor

andia89 commented Sep 16, 2015

I guess this is ready to be merged then. What is still buggy is the packaging though, but that's nothing I can contribute...

@palob
Copy link
Member

palob commented Sep 16, 2015

Outstanding work @wa4557 👏 . Maybe include Cancel/Apply into the title bar using a GtkHeaderBar?

For packaging I'd suggest to put a copyright/licence header at the beginning of each source file.

@Foggalong
Copy link
Contributor Author

AFAIK @paolorotolo is the only one with permissions to edit the packaging on Launchpad and he's been busy with school and work on Glucosio. I'll see what I can do though

@andia89
Copy link
Contributor

andia89 commented Sep 17, 2015

@palob Could you elaborate what you mean by that? I'm by no means an expert in gtk :)

@palob
Copy link
Member

palob commented Sep 17, 2015

Something like this or this:
headerbar

Edit: Or like above :)

But on a second thought maybe it's better not to make it look that GNOMEy.

@andia89
Copy link
Contributor

andia89 commented Sep 17, 2015

Looks fancy :) I've never seen something like this before, I guess for now I want to keep it the way it is...

@dirtydancing
Copy link
Contributor

Do we know whether header bars are currently working for all other DE/shells besides GNOME shell?

@palob
Copy link
Member

palob commented Sep 17, 2015

Header bars require GTK+ 3.10 or newer(Ubuntu 14.04 or newer) and may look out of place (or even like crap with the wrong theme) outside GNOME, that's the issue I see.

@dirtydancing
Copy link
Contributor

I see. Well, in that case, I would also suggest to not go for the header bars at the moment, so as to keep things simple and to ensure maximum distro/DE compatibility. They do look sweet though :-)

@Foggalong
Copy link
Contributor Author

Headerbars are sweet when done right, but some distros are only just getting support for them. As I understand it the DE the distro is running needs to a) use gtk 3.10+ & b) have header bar support enabled. Xubuntu only got them a release ago so I'm guessing slower distros like Debian might not have them yet.

@palob
Copy link
Member

palob commented Sep 17, 2015

I don't know of anything like "headerbar support" and Debian Stable is on GTK 3.14 (still supported versions oldstable on 3.4 and oldoldstable on 2.x however) but speaking of which... what's the requirements for the current GUI?

@Foggalong
Copy link
Contributor Author

Yeah, I think it's something the window manager developers need to allow for (i.e. xfwm enabled it with the last release of Xubuntu). I'm not sure on the requirements. @wa4557?

@andia89
Copy link
Contributor

andia89 commented Sep 17, 2015

I guess it should basically work with any 3.* gtk version since I've used only very basic functions. And python of course :)

@Foggalong
Copy link
Contributor Author

With all the features having now been added I think we can close this issue, with the preview feature to be added later as per #118. Great work folks \O/

I'll get onto @paolorotolo about fixing the packaging asap :)

@paolorotolo
Copy link
Contributor

Packaging fixed :)
Have fun!

@palob
Copy link
Member

palob commented Oct 10, 2015

One thing just occured to me: How about extending the scope of the GUI to a general Numix GUI?
It could have buttons for e.g. downloading and installing the latest git versions (in case there isn't a daily build package for your distro) and for applying the hardcode-fixer script.

Is this any close to a good idea?

@Foggalong
Copy link
Contributor Author

@palob In theory a good idea yeah. I'd want that developed independently of the Folders GUI for now though since I'm not exactly sure how popular such an application would be. I'd also like to get the stuff with numix-core down before launching into another big project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants