-
Notifications
You must be signed in to change notification settings - Fork 264
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
workbench: import Geany project data #634
Conversation
The workbench plugin now imports the "base_path" and "file_patterns" from Geany's project settings as an workbench project directory. That directory is then treated as the project's base dir. In the config file all settings related to the project's base dir are prefixed with "Prj-" instead of e.g. "Dir1-". On loading of a workbench's project, the plugin checks if there is a "base_path" in the "project" section but no "Prj-BaseDir" in the "Workbench" section. In that case the data from the Geany project is imported. That means, the import happens only once. On import, the project is marked as changed (a '*' is displayed after the project's name). The project's base dir is always labeled "Base dir" and has a specific icon to show that it differ's from the other directories. Also, it is always listed first/on top of the tree.
@@ -2,6 +2,7 @@ iconsdir = $(datadir)/icons/hicolor/48x48 | |||
icons_appsdir = $(iconsdir)/apps | |||
|
|||
dist_icons_apps_DATA = \ | |||
workbench-basedir.png \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to ship these? Aren't there any good stock ones? Just wondering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I just searched through my installed gnome icons and picked the ones I liked. I did not do any research. Do you now any link to a comfortable gallery of stock icons? I only found C code/a list of defines/names. But no gallery???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found one at http://www.pygtk.org/pygtk2reference/gtk-stock-items.html. But I a, not sure if that is a complete reference and if pygtk has got the same icon set as the gtk C lib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also just use the user's icon theme instead of foisting your aesthetics on them :) This icon would be named user-home
, although I'm not sure that's semantically correct either (it's meant for user's home directory just like this icon).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about something like https://www.geany.org/manual/gtk/gtk/gtk-Stock-Items.html |
There is some upstream Gtk-docu also but this one was nearer ;) |
Thanks. Some of the icons are actually icons I used but not all. Maybe I am going to change them later but not in this PR. Suggestions are always welcome of course. |
Please use stock items when possible instead of shipping own icons. Stock icons are part of the theme and fit to user's environment, shipped ones might not. |
See for example the fallen over bookcase icon in the geany toolbar :) |
Stock items are deprecated (sadly). |
@ALL: Later if the discussion is sorted out I can make a PR for the icon changes.
Well, isn't the concept of named icons quite the same? A set of different functions and common names instead of #defined names but gtk still ships the icons and makes them usuable by a common name. |
For icons it's similar, except I don't believe there are any actual fallback icons built-in to GTK+ anymore. Stock items also provided standard translated labels (and tooltips?) for each item and a cleaner/simpler API. |
The workbench plugin now imports the "base_path" and "file_patterns" from Geany's project settings
as an workbench project directory. That directory is then treated as the project's base dir.
In the config file all settings related to the project's base dir are prefixed with "Prj-"
instead of e.g. "Dir1-". On loading of a workbench's project, the plugin checks if there
is a "base_path" in the "project" section but no "Prj-BaseDir" in the "Workbench" section.
In that case the data from the Geany project is imported. That means, the import happens only once.
On import, the project is marked as changed (a '*' is displayed after the project's name).
The project's base dir is always labeled "Base dir" and has a specific icon to show that it differ's
from the other directories. Also, it is always listed first/on top of the tree.