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

workbench: import Geany project data #634

Merged
merged 1 commit into from Oct 22, 2017
Merged

workbench: import Geany project data #634

merged 1 commit into from Oct 22, 2017

Conversation

lpaulsen93
Copy link
Contributor

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.

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 \
Copy link
Member

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

Copy link
Contributor Author

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???

Copy link
Contributor Author

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.

Copy link
Member

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).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frlan
Copy link
Member

frlan commented Oct 19, 2017

I was thinking about something like https://www.geany.org/manual/gtk/gtk/gtk-Stock-Items.html

@frlan
Copy link
Member

frlan commented Oct 19, 2017

There is some upstream Gtk-docu also but this one was nearer ;)

@lpaulsen93
Copy link
Contributor Author

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.

@frlan
Copy link
Member

frlan commented Oct 20, 2017

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.

@elextr
Copy link
Member

elextr commented Oct 20, 2017

shipped ones might not

See for example the fallen over bookcase icon in the geany toolbar :)

@codebrainz
Copy link
Member

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.

s/stock items/theme icons/

Stock items are deprecated (sadly).

@lpaulsen93
Copy link
Contributor Author

@ALL:
Could we merge this anyway? I would like to have this change separated from icon changes.

Later if the discussion is sorted out I can make a PR for the icon changes.

@codebrainz:

Stock items are deprecated (sadly).

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.

@codebrainz
Copy link
Member

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.

@frlan frlan merged commit 350f6fb into geany:master Oct 22, 2017
@lpaulsen93 lpaulsen93 deleted the wb-base-path branch December 20, 2017 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants