[geany/geany-plugins] fcc730: New plugin 'workbench': initial commit.

LarsDW223 git-noreply at xxxxx
Wed Sep 27 17:31:52 UTC 2017


Branch:      refs/heads/master
Author:      LarsDW223 <lars_paulsen at web.de>
Committer:   LarsDW223 <lars_paulsen at web.de>
Date:        Sat, 02 Sep 2017 09:09:40 UTC
Commit:      fcc730087c947a003a8b0b21ed8f99404ab48b44
             https://github.com/geany/geany-plugins/commit/fcc730087c947a003a8b0b21ed8f99404ab48b44

Log Message:
-----------
New plugin 'workbench': initial commit.


Modified Paths:
--------------
    Makefile.am
    build/workbench.m4
    configure.ac
    po/de.po
    workbench/AUTHORS
    workbench/COPYING
    workbench/ChangeLog
    workbench/Makefile.am
    workbench/NEWS
    workbench/README
    workbench/THANKS
    workbench/icons/16x16/Makefile.am
    workbench/icons/16x16/workbench-bookmark.png
    workbench/icons/16x16/workbench-dir.png
    workbench/icons/16x16/workbench-nodirs.png
    workbench/icons/16x16/workbench-project-error.png
    workbench/icons/16x16/workbench-project.png
    workbench/icons/24x24/Makefile.am
    workbench/icons/24x24/workbench-bookmark.png
    workbench/icons/24x24/workbench-dir.png
    workbench/icons/24x24/workbench-nodirs.png
    workbench/icons/24x24/workbench-project-error.png
    workbench/icons/24x24/workbench-project.png
    workbench/icons/32x32/Makefile.am
    workbench/icons/32x32/workbench-bookmark.png
    workbench/icons/32x32/workbench-dir.png
    workbench/icons/32x32/workbench-nodirs.png
    workbench/icons/32x32/workbench-project-error.png
    workbench/icons/32x32/workbench-project.png
    workbench/icons/48x48/Makefile.am
    workbench/icons/48x48/workbench-bookmark.png
    workbench/icons/48x48/workbench-dir.png
    workbench/icons/48x48/workbench-nodirs.png
    workbench/icons/48x48/workbench-project-error.png
    workbench/icons/48x48/workbench-project.png
    workbench/icons/Makefile.am
    workbench/icons/scalable/Makefile.am
    workbench/icons/scalable/workbench-bookmark.svg
    workbench/icons/scalable/workbench-dir.svg
    workbench/icons/scalable/workbench-nodirs.svg
    workbench/icons/scalable/workbench-project-error.svg
    workbench/icons/scalable/workbench-project.svg
    workbench/src/Makefile.am
    workbench/src/dialogs.c
    workbench/src/dialogs.h
    workbench/src/menu.c
    workbench/src/menu.h
    workbench/src/plugin_main.c
    workbench/src/popup_menu.c
    workbench/src/popup_menu.h
    workbench/src/sidebar.c
    workbench/src/sidebar.h
    workbench/src/utils.c
    workbench/src/utils.h
    workbench/src/wb_globals.c
    workbench/src/wb_globals.h
    workbench/src/wb_project.c
    workbench/src/wb_project.h
    workbench/src/workbench.c
    workbench/src/workbench.h

Modified: Makefile.am
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -172,6 +172,10 @@ if ENABLE_WEBHELPER
 SUBDIRS += webhelper
 endif
 
+if ENABLE_WORKBENCH
+SUBDIRS += workbench
+endif
+
 if ENABLE_XMLSNIPPETS
 SUBDIRS += xmlsnippets
 endif


Modified: build/workbench.m4
15 lines changed, 15 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,15 @@
+AC_DEFUN([GP_CHECK_WORKBENCH],
+[
+    GP_ARG_DISABLE([Workbench], [auto])
+    GP_COMMIT_PLUGIN_STATUS([Workbench])
+    AC_CONFIG_FILES([
+        workbench/Makefile
+        workbench/src/Makefile
+        workbench/icons/Makefile
+        workbench/icons/16x16/Makefile
+        workbench/icons/24x24/Makefile
+        workbench/icons/32x32/Makefile
+        workbench/icons/48x48/Makefile
+        workbench/icons/scalable/Makefile
+    ])
+])


Modified: configure.ac
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -71,6 +71,7 @@ GP_CHECK_TREEBROWSER
 GP_CHECK_TABLECONVERT
 GP_CHECK_UPDATECHECKER
 GP_CHECK_WEBHELPER
+GP_CHECK_WORKBENCH
 GP_CHECK_XMLSNIPPETS
 
 AC_CONFIG_FILES([


Modified: po/de.po
345 lines changed, 339 insertions(+), 6 deletions(-)
===================================================================
@@ -16,7 +16,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Geany-Plugins 1.30\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-06-24 16:57+0200\n"
+"POT-Creation-Date: 2017-08-20 13:13+0200\n"
 "PO-Revision-Date: 2016-08-08 22:38+0200\n"
 "Last-Translator: Dominic Hopf <dmaphy at googlemail.com>\n"
 "Language-Team: German <geany-i18n at uvena.de>\n"
@@ -3828,7 +3828,10 @@ msgstr "_OK"
 
 #: ../geanymacro/src/geanymacro.c:1394 ../geanymacro/src/geanymacro.c:1537
 #: ../geanymacro/src/geanymacro.c:1827
-#: ../projectorganizer/src/prjorg-sidebar.c:306
+#: ../projectorganizer/src/prjorg-sidebar.c:306 ../workbench/src/dialogs.c:45
+#: ../workbench/src/dialogs.c:76 ../workbench/src/dialogs.c:115
+#: ../workbench/src/dialogs.c:152 ../workbench/src/dialogs.c:221
+#: ../workbench/src/dialogs.c:350
 msgid "_Cancel"
 msgstr "_Abbrechen"
 
@@ -4523,7 +4526,7 @@ msgstr "Projekteigenschaften"
 msgid "New Project"
 msgstr "Neues Projekt"
 
-#: ../geanyprj/src/menu.c:110
+#: ../geanyprj/src/menu.c:110 ../workbench/src/dialogs.c:46
 msgid "C_reate"
 msgstr "_Erstellen"
 
@@ -5425,7 +5428,8 @@ msgstr "Datei als HTML speichern"
 msgid "HTML Files"
 msgstr "HTML-Dateien"
 
-#: ../markdown/src/plugin.c:311
+#: ../markdown/src/plugin.c:311 ../workbench/src/dialogs.c:84
+#: ../workbench/src/dialogs.c:123
 msgid "All Files"
 msgstr "Alle Dateien"
 
@@ -6034,7 +6038,7 @@ msgstr ""
 "identifizieren. Wird hauptsächlich für das Umschalten zwischen Quellen und "
 "Header verwendet."
 
-#: ../projectorganizer/src/prjorg-project.c:597
+#: ../projectorganizer/src/prjorg-project.c:597 ../workbench/src/dialogs.c:243
 msgid "Ignored file patterns:"
 msgstr "Muster für zu ignorierende Dateien:"
 
@@ -6047,7 +6051,7 @@ msgstr ""
 "erkennen, die nicht im projektspezifischen Dateibaum angezeigt werden "
 "sollen. "
 
-#: ../projectorganizer/src/prjorg-project.c:609
+#: ../projectorganizer/src/prjorg-project.c:609 ../workbench/src/dialogs.c:254
 msgid "Ignored directory patterns:"
 msgstr "Muster für zu ignorierende Verzeichnisse:"
 
@@ -6146,6 +6150,7 @@ msgid "Add external directory"
 msgstr "Externes Verzeichnis hinzufügen"
 
 #: ../projectorganizer/src/prjorg-sidebar.c:1374
+#: ../workbench/src/popup_menu.c:435
 msgid "Expand all"
 msgstr "Alle ausklappen"
 
@@ -7977,6 +7982,326 @@ msgstr "Browser"
 msgid "Windows"
 msgstr "Fenster"
 
+#: ../workbench/src/dialogs.c:43
+#, fuzzy
+msgid "Create new workbench"
+msgstr "Neue Werkbank anlegen"
+
+#: ../workbench/src/dialogs.c:74
+#, fuzzy
+msgid "Open workbench"
+msgstr "Öffne Werkbank"
+
+#. Create new menu item "Open Workbench"
+#: ../workbench/src/dialogs.c:77 ../workbench/src/menu.c:188
+#, fuzzy
+msgid "_Open"
+msgstr "Öffnen"
+
+#: ../workbench/src/dialogs.c:80
+msgid "Workbench files (.geanywb)"
+msgstr "Werkbank Dateien (.geanywb)"
+
+#: ../workbench/src/dialogs.c:113 ../workbench/src/popup_menu.c:373
+#, fuzzy
+msgid "Add project"
+msgstr "Projekt hinzufügen"
+
+#: ../workbench/src/dialogs.c:116 ../workbench/src/dialogs.c:153
+#, fuzzy
+msgid "_Add"
+msgstr "_Beides hinzufügen"
+
+#: ../workbench/src/dialogs.c:119
+#, fuzzy
+msgid "Project files (.geany)"
+msgstr "Projektdateien (.geany)"
+
+#: ../workbench/src/dialogs.c:150 ../workbench/src/popup_menu.c:401
+#, fuzzy
+msgid "Add directory"
+msgstr "Verzeichnis hinzufügen"
+
+#: ../workbench/src/dialogs.c:218 ../workbench/src/popup_menu.c:419
+#, fuzzy
+msgid "Directory settings"
+msgstr "Verzeichnis Einstellungen"
+
+#: ../workbench/src/dialogs.c:222 ../workbench/src/dialogs.c:351
+#, fuzzy
+msgid "_OK"
+msgstr "OK"
+
+#: ../workbench/src/dialogs.c:232
+#, fuzzy
+msgid "File patterns:"
+msgstr "Dateimuster:"
+
+#: ../workbench/src/dialogs.c:238
+#, fuzzy
+msgid ""
+"Space separated list of patterns that are used to identify files that shall "
+"be displayed in the directory tree."
+msgstr ""
+"Leerzeichengetrennte Liste mit Mustern, die genutzt werden, um Dateien zu "
+"erkennen, die im Verzeichnisbaum angezeigt werden sollen."
+
+#: ../workbench/src/dialogs.c:249
+#, fuzzy
+msgid ""
+"Space separated list of patterns that are used to identify files that shall "
+"not be displayed in the directory tree."
+msgstr ""
+"Leerzeichengetrennte Liste mit Mustern, die genutzt werden, um Dateien zu "
+"erkennen, die im Verzeichnisbaum nicht angezeigt werden sollen."
+
+#: ../workbench/src/dialogs.c:260
+#, fuzzy
+msgid ""
+"Space separated list of patterns that are used to identify directories that "
+"shall not be scanned for source files."
+msgstr ""
+"Leerzeichengetrennte Liste mit Mustern, die genutzt werden, um Verzeichnisse "
+"zu erkennen, die nicht nach Quelldateien durchsucht werden sollen. "
+
+#: ../workbench/src/dialogs.c:268
+msgid ""
+"Note: the patterns above affect only the workbench directory and are not "
+"used in the Find in Files\n"
+"dialog."
+msgstr ""
+"Anmerkung: die Muser oben beeinflußen nur das Werkbank-Verzeichnis und "
+"werden nicht in In Dateien suchen verwendet."
+
+#: ../workbench/src/dialogs.c:347
+msgid "Workbench settings"
+msgstr "Werkbank Einstellungen"
+
+#: ../workbench/src/dialogs.c:361
+#, fuzzy
+msgid "Rescan all projects on open:"
+msgstr "Beim Öffnen alle Projekte durchsuchen:"
+
+#: ../workbench/src/dialogs.c:366
+msgid ""
+"If the option is activated (default), then all projects will be re-scanned "
+"on opening of the workbench."
+msgstr ""
+"Wenn die Option aktiviert ist (Standard), dann werden beim Öffnen einer "
+"Werkbank alle Projekte durchsucht."
+
+#: ../workbench/src/menu.c:95
+#, fuzzy, c-format
+msgid "Could not create new workbench file: %s"
+msgstr "Konnte die Werkbank Datei nicht anlegen: %s"
+
+#: ../workbench/src/menu.c:122
+#, fuzzy, c-format
+msgid "Could not open workbench file: %s"
+msgstr "Konnte die Werkbank Datei nicht öffnen: %s"
+
+#: ../workbench/src/menu.c:139
+#, fuzzy, c-format
+msgid "Could not save workbench file: %s"
+msgstr "Konnte die Werkbank Datei nicht speichern: %s"
+
+#. Set metadata
+#: ../workbench/src/menu.c:177 ../workbench/src/plugin_main.c:129
+#: ../workbench/src/sidebar.c:992
+msgid "Workbench"
+msgstr "Werkbank"
+
+#. Create new menu item "New Workbench"
+#: ../workbench/src/menu.c:181
+msgid "_New"
+msgstr ""
+
+#. Create new menu item "Save Workbench"
+#: ../workbench/src/menu.c:195
+#, fuzzy
+msgid "_Save"
+msgstr "Datei speichern"
+
+#. Create new menu item "Workbench Settings"
+#: ../workbench/src/menu.c:202
+#, fuzzy
+msgid "S_ettings"
+msgstr "Einstellungen"
+
+#. Create new menu item "Close Workbench"
+#: ../workbench/src/menu.c:209
+#, fuzzy
+msgid "_Close"
+msgstr "Schließen"
+
+#: ../workbench/src/plugin_main.c:93 ../workbench/src/sidebar.c:564
+msgid ""
+"Create or open a workbench\n"
+"using the workbench menu."
+msgstr ""
+"Erstellen oder Öffen Sie eine Werkbank\n"
+"mit dem Werkbank Menü."
+
+#: ../workbench/src/plugin_main.c:130
+msgid "Manage and customize multiple projects."
+msgstr "Verwalten und anpassen mehrere Projekte."
+
+#: ../workbench/src/popup_menu.c:171
+#, fuzzy, c-format
+msgid "Could not add project file: %s"
+msgstr "Konnte die Projektdatei nicht hinzufügen: %s"
+
+#: ../workbench/src/popup_menu.c:379
+#, fuzzy
+msgid "Save project"
+msgstr "Projekt speichern"
+
+#: ../workbench/src/popup_menu.c:385
+#, fuzzy
+msgid "Remove project"
+msgstr "Projekt entfernen"
+
+#: ../workbench/src/popup_menu.c:391
+#, fuzzy
+msgid "Fold/unfold project"
+msgstr "Projekt falten/ausklappen"
+
+#: ../workbench/src/popup_menu.c:407
+#, fuzzy
+msgid "Remove directory"
+msgstr "Verzeichnis entfernen"
+
+#: ../workbench/src/popup_menu.c:413
+#, fuzzy
+msgid "Rescan directory"
+msgstr "Verzeichnis durchsuchen"
+
+#: ../workbench/src/popup_menu.c:425
+#, fuzzy
+msgid "Fold/unfold directory"
+msgstr "Verzeichnis falten/ausklappen"
+
+#: ../workbench/src/popup_menu.c:441
+#, fuzzy
+msgid "Collapse all"
+msgstr "Alle e_inklappen"
+
+#: ../workbench/src/popup_menu.c:451
+msgid "Add to Workbench Bookmarks"
+msgstr "Zu Werkbank Lesezeichen hinzufügen"
+
+#: ../workbench/src/popup_menu.c:457
+msgid "Add to Project Bookmarks"
+msgstr "Zu Projekt Lesezeichen hinzufügen"
+
+#: ../workbench/src/popup_menu.c:463
+#, fuzzy
+msgid "Remove from Bookmarks"
+msgstr "Von _Lesezeichen entfernen"
+
+#: ../workbench/src/sidebar.c:300
+#, fuzzy
+msgid "No directories"
+msgstr "Keine Verzeichnisse"
+
+#. *** label ***
+#: ../workbench/src/sidebar.c:562 ../workbench/src/sidebar.c:943
+msgid "No workbench opened."
+msgstr "Keine Werkbank geöffnet."
+
+#: ../workbench/src/sidebar.c:574
+#, fuzzy
+msgid "Projects"
+msgstr "Projekte"
+
+#: ../workbench/src/sidebar.c:584
+msgid ""
+"Add a project\n"
+"using the context menu."
+msgstr ""
+"Fügen Sie ein Projekt\n"
+"über das Kontextmenü hinzu."
+
+#: ../workbench/src/sidebar.c:696
+#, c-format
+msgid ""
+"%s\n"
+"Project file not found!"
+msgstr ""
+"%s\n"
+"Projekt Datei nicht gefunden!"
+
+#: ../workbench/src/sidebar.c:710
+msgid ""
+"This project has no directories. Directories can be added to a project using "
+"the context menu."
+msgstr ""
+"Dieses Projekt hat keine Verzeichnisse. Verzeichnisse können über "
+"dasKontextmenü zum Projekt hinzugefügt werden."
+
+#: ../workbench/src/wb_project.c:997
+#, fuzzy, c-format
+msgid "Directory-Name: %s\n"
+msgstr "Verzeichnis-Name: %s\n"
+
+#: ../workbench/src/wb_project.c:998
+#, fuzzy, c-format
+msgid "Base-Directory: %s\n"
+msgstr "Basis-Verzeichnis: %s\n"
+
+#: ../workbench/src/wb_project.c:1000
+#, fuzzy
+msgid "File Patterns:"
+msgstr "Datei Muster:"
+
+#: ../workbench/src/wb_project.c:1012
+#, fuzzy
+msgid "Ignored Dir. Patterns:"
+msgstr "Muster für zu ignorierende Dateien:"
+
+#: ../workbench/src/wb_project.c:1024
+#, fuzzy
+msgid "Ignored File Patterns:"
+msgstr "Muster für zu ignorierende Dateien:"
+
+#: ../workbench/src/wb_project.c:1036
+#, c-format
+msgid "Number of Sub-Folders: %u\n"
+msgstr "Anzahl der Unter-Verzeichnisse: %u\n"
+
+#: ../workbench/src/wb_project.c:1037
+#, fuzzy, c-format
+msgid "Number of Files: %u\n"
+msgstr "Anzahl von Dateien: %u\n"
+
+#: ../workbench/src/wb_project.c:1061
+#, fuzzy, c-format
+msgid "Project: %s\n"
+msgstr "Projekt: %s\n"
+
+#: ../workbench/src/wb_project.c:1062
+#, fuzzy, c-format
+msgid "File: %s\n"
+msgstr "Datei: %s\n"
+
+#: ../workbench/src/wb_project.c:1063
+#, fuzzy, c-format
+msgid "Number of Directories: %u\n"
+msgstr "Anzahl der Verzeichnisse: %u\n"
+
+#: ../workbench/src/wb_project.c:1066
+msgid ""
+"\n"
+"The project contains unsafed changes!\n"
+msgstr ""
+"\n"
+"Das Projekt enthält nicht gesicherte Änderungen!\n"
+
+#: ../workbench/src/workbench.c:710
+#, fuzzy, c-format
+msgid "File %s is not a valid workbench file!"
+msgstr "Die Datei %s ist keine gültige Workbench-Datei!"
+
 #: ../xmlsnippets/src/plugin.c:44
 msgid "XML Snippets"
 msgstr "XML-Schnipsel"
@@ -7985,6 +8310,14 @@ msgstr "XML-Schnipsel"
 msgid "Autocompletes XML/HTML tags using snippets."
 msgstr "Autovervollständigt XML/HTML-Tags unter Verwendung von Schnipseln."
 
+#, fuzzy
+#~ msgid "Create"
+#~ msgstr "_Erstellen"
+
+#, fuzzy
+#~ msgid "New"
+#~ msgstr "Neu"
+
 #~ msgid "Call documentation viewer on current symbol."
 #~ msgstr "Dokumentation für das aktuelle Wort anzeigen."
 


Modified: workbench/AUTHORS
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1 @@
+LarsGit223


Modified: workbench/COPYING
340 lines changed, 340 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+	51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.


Modified: workbench/ChangeLog
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/Makefile.am
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,4 @@
+include $(top_srcdir)/build/vars.auxfiles.mk
+
+SUBDIRS = src icons
+plugin = workbench


Modified: workbench/NEWS
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,2 @@
+Juli 2017
+* Created plugin, initial commit (work in progress)


Modified: workbench/README
151 lines changed, 151 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,151 @@
+=========
+Workbench
+=========
+
+.. contents::
+
+About
+=====
+
+The Workbench plugin is an extension that makes it possible to manage
+multiple projects in geany. You can add geany projects to a workbench.
+From there you can add directories to the project to manage the files
+belonging to the project.
+
+Usage
+=====
+
+Enabling the plugin
+-------------------
+The plugin can be enabled in the plugin manager. After enabling the plugin
+a new tab will be displayed in the Sidebar. There will also be a new entry
+in the menubar. Both are labeled "Workbench".
+
+The Workbench menu
+------------------
+The Workbench menu is the starting point for creating your first workbench.
+Choose "New" from the menu to create your workbench file. Workbench files
+use the prefix ".geanywb". Just like Geany project files they are also
+simple text files containing key-value pairs.
+
+The complete managment of the Workbench file is done using the Workbench
+menu:
+- Item "New": as explained above, creates a new Workbench
+- Item "Open": open a Workbench
+- Item "Save": save the opened Workbench. This "only" saves any changes
+  in the Workbench file. It does not save any changes of the projects
+  belonging to the Workbench.
+- Item "Settings": open the Workbench settings dialog.
+- Item "Close": closes the opened Workbench.
+
+The new Workbench
+-----------------
+A newly created Workbench is completely empty. In the Workbench tab of
+the sidebar you should see the hint "Add a project using the context
+menu". Anything which is dealing with projects and their Workbench
+related settings is done using the context menu on the sidebar. Some
+items in the context menu will only be active if you right click inside
+a project, directory or bookmark.
+
+The Workbench context menu:
+---------------------------
+
+These are the available items:
+
+- "Add project":
+  Add an existing Geany project to the Workbench. Create your projects
+  with Geany. The Workbench plugin does not help you with that. After
+  adding a project you need to save the workbench settings by selecting
+  "Workbench / Save" in the menubar.
+- "Save project":
+  Selecting this item will save the Workbench related project settings in
+  the Geany project file. It is only available if you right clicked inside
+  of a project. It will only save the settings of the project that you
+  clicked on.
+- "Remove project":
+  Remove the project from the Workbench. It is only available if you
+  right clicked inside of a project.  After removing a project you need
+  to save the workbench settings by selecting "Workbench / Save" in the
+  menubar.
+- "Fold/unfold project":
+  Fold or unfold the items belonging to the project. It is only available
+  if you right clicked inside of a project.
+
+- "Add directory":
+  Add a directory to the project. It is only available
+  if you right clicked inside of a project. After selecting it a dialog
+  will be opened. Chosse the directory which shall be added. After that
+  the directory will be shown inside the project folder. After adding a
+  new directory, all files and folders beneath the directory will be
+  displayed. See "Directory settings" for more information.
+- "Remove directory":
+  Remove the directory from the project. It is only available if you
+  right clicked inside of a project directory.
+- "Rescan directory":
+  Rescan the directory for files and update the sidebar accordingly.
+  It is only available if you right clicked inside of a project directory.
+  If the content of a directory changes, e.g. a new file is added, then
+  the new file will only be visible in the sidebar after a rescan.
+- "Directory settings":
+  Select this item to change the directory settings. It is only available
+  if you right clicked inside of a project directory. In the directory
+  settings you can set a filter which controls the files and folders
+  that shall be displayed or not.
+- "Fold/unfold directory":
+  Fold or unfold the items belonging to the directory. It is only available
+  if you right clicked inside of a directory.
+
+- "Unfold All":
+  Select this item to unfold all projects, directories and folders.
+- "Collapse All":
+  Select this item to collpase/fold all projects, directories and folders.
+
+- "Add to Workbench Bookmarks":
+  Add the file to the Workbench Bookmarks. It is only available
+  if you right clicked on a file. After adding a file to the Workbench
+  bookmarks a ribbon will be shown for the file in the Workbench sidebar
+  tab in front of the first project. Clicking on it will open the file.
+  Workbench bookmarks give you quick access to files which you often need.
+- "Add to Project Bookmarks":
+  Add the file to the Project Bookmarks. It is only available
+  if you right clicked on a file. After adding a file to the Project
+  bookmarks a ribbon will be shown for the file in the Workbench sidebar
+  tab in front of the first directory of the project. Clicking on it will
+  open the file. Project bookmarks give you quick access to files which
+  you often need in that project.
+- "Remove from Bookmarks":
+  Remove file from the Workbench or project bookmarks. It is only available
+  if you right clicked on a bookmark.
+
+Known issues
+============
+
+None.
+
+License
+=======
+
+The Workbench plugin is distributed under the terms of the GNU General
+Public License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.  A copy
+of this license can be found in the file COPYING included with the source
+code of this program.
+
+Downloads
+=========
+
+The Workbench plugin is not (yet) part of the combined Geany Plugins release.
+So please download it from the github page, see below.
+
+Development Code
+================
+
+Get the code from::
+
+    git clone https://github.com/LarsGit223/geany-plugins
+
+Ideas, questions, patches and bug reports
+=========================================
+
+Please post any ideas, feature requests, questions and bugs in the
+github issue tracker.


Modified: workbench/THANKS
13 lines changed, 13 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,13 @@
+What's this file about?
+-----------------------
+This file lists all external people that have contributed to this project.
+
+Project Organizer Plugin:
+-------------------------
+This plugin is heavily based on code from the Project Organizer plugin.
+So big thanks go to the author Jiří Techet.
+
+Geany and Geany plugins:
+------------------------
+Thanks to all Geany developers for support and writing an simple, lightweight,
+open and extensible IDE.


Modified: workbench/icons/16x16/Makefile.am
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,9 @@
+iconsdir = $(datadir)/icons/hicolor/16x16
+icons_appsdir = $(iconsdir)/apps
+
+dist_icons_apps_DATA =							\
+	workbench-bookmark.png						\
+	workbench-dir.png							\
+	workbench-nodirs.png						\
+	workbench-project.png						\
+	workbench-project-error.png


Modified: workbench/icons/16x16/workbench-bookmark.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/16x16/workbench-dir.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/16x16/workbench-nodirs.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/16x16/workbench-project-error.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/16x16/workbench-project.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/24x24/Makefile.am
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,9 @@
+iconsdir = $(datadir)/icons/hicolor/24x24
+icons_appsdir = $(iconsdir)/apps
+
+dist_icons_apps_DATA =							\
+	workbench-bookmark.png						\
+	workbench-dir.png							\
+	workbench-nodirs.png						\
+	workbench-project.png						\
+	workbench-project-error.png


Modified: workbench/icons/24x24/workbench-bookmark.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/24x24/workbench-dir.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/24x24/workbench-nodirs.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/24x24/workbench-project-error.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/24x24/workbench-project.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/32x32/Makefile.am
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,9 @@
+iconsdir = $(datadir)/icons/hicolor/32x32
+icons_appsdir = $(iconsdir)/apps
+
+dist_icons_apps_DATA =							\
+	workbench-bookmark.png						\
+	workbench-dir.png							\
+	workbench-nodirs.png						\
+	workbench-project.png						\
+	workbench-project-error.png


Modified: workbench/icons/32x32/workbench-bookmark.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/32x32/workbench-dir.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/32x32/workbench-nodirs.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/32x32/workbench-project-error.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/32x32/workbench-project.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/48x48/Makefile.am
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,9 @@
+iconsdir = $(datadir)/icons/hicolor/48x48
+icons_appsdir = $(iconsdir)/apps
+
+dist_icons_apps_DATA =							\
+	workbench-bookmark.png						\
+	workbench-dir.png							\
+	workbench-nodirs.png						\
+	workbench-project.png						\
+	workbench-project-error.png


Modified: workbench/icons/48x48/workbench-bookmark.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/48x48/workbench-dir.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/48x48/workbench-nodirs.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/48x48/workbench-project-error.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/48x48/workbench-project.png
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online


Modified: workbench/icons/Makefile.am
20 lines changed, 20 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,20 @@
+SUBDIRS = 16x16 24x24 32x32 48x48 scalable
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t
+
+install-data-hook:
+	@-if test -z "$(DESTDIR)"; then					\
+		echo "Updating Gtk icon cache.";			\
+		$(gtk_update_icon_cache) "$(datadir)/icons/hicolor";	\
+		$(gtk_update_icon_cache) "$(datadir)/icons/Tango"; \
+	else								\
+		echo "*** Icon cache not updated. Remember to run:";	\
+		echo "***";						\
+		echo "***   $(gtk_update_icon_cache) '$(datadir)/icons/hicolor'";\
+		echo "***   $(gtk_update_icon_cache) '$(datadir)/icons/Tango'";\
+		echo "***";						\
+	fi
+
+uninstall-local:
+	rm -f $(DESTDIR)$(datadir)/icons/hicolor/icon-theme.cache
+	rm -f $(DESTDIR)$(datadir)/icons/Tango/icon-theme.cache


Modified: workbench/icons/scalable/Makefile.am
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,9 @@
+iconsdir = $(datadir)/icons/hicolor/scalable
+icons_appsdir = $(iconsdir)/apps
+
+dist_icons_apps_DATA =							\
+	workbench-bookmark.svg						\
+	workbench-dir.svg							\
+	workbench-nodirs.svg						\
+	workbench-project.svg						\
+	workbench-project-error.svg


Modified: workbench/icons/scalable/workbench-bookmark.svg
17 lines changed, 17 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg7384" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <metadata id="metadata90">
+  <rdf:RDF>
+   <cc:Work rdf:about="">
+    <dc:format>image/svg+xml</dc:format>
+    <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+    <dc:title>Gnome Symbolic Icon Theme</dc:title>
+   </cc:Work>
+  </rdf:RDF>
+ </metadata>
+ <title id="title9167">Gnome Symbolic Icon Theme</title>
+ <g id="layer12" transform="translate(-261 -647)">
+  <path id="path11922-4" style="color:#000000;fill:#bebebe" d="m269 647.69c-1.0005-0.004-1.5631 3.5402-2.375 4.125-0.81155 0.58452-4.3435-0.0125-4.6562 0.9375-0.31286 0.95036 2.8822 2.5784 3.1875 3.5312 0.30513 0.95245-1.3381 4.1278-0.53125 4.7188 0.80717 0.59122 3.3432-1.9416 4.3438-1.9375 1.0001 0.004 3.5011 2.5847 4.3125 2 0.81172-0.58496-0.81311-3.7997-0.5-4.75 0.31298-0.9499 3.5241-2.5476 3.2188-3.5-0.3055-0.95275-3.8492-0.37732-4.6562-0.96875-0.8067-0.5912-1.3436-4.1524-2.3438-4.1562zm-1 4.3125h2v2h2v2h-2v2h-2v-2h-2v-2h2z"/>
+ </g>
+</svg>


Modified: workbench/icons/scalable/workbench-dir.svg
18 lines changed, 18 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg7384" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <metadata id="metadata90">
+  <rdf:RDF>
+   <cc:Work rdf:about="">
+    <dc:format>image/svg+xml</dc:format>
+    <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+    <dc:title>Gnome Symbolic Icon Theme</dc:title>
+   </cc:Work>
+  </rdf:RDF>
+ </metadata>
+ <title id="title9167">Gnome Symbolic Icon Theme</title>
+ <g id="layer13" transform="translate(-441 -195)">
+  <path id="path5079" style="block-progression:tb;text-indent:0;color:#000000;enable-background:new;text-transform:none;fill:#bebebe" d="m447.51 196c-3.0289 0-5.5107 2.479-5.5107 5.5045 0 3.0254 2.4819 5.5045 5.5107 5.5045s5.5107-2.479 5.5107-5.5045c0-3.0254-2.4819-5.5045-5.5107-5.5045zm0 2.0089c1.9474 0 3.4995 1.5504 3.4995 3.4955s-1.5522 3.4955-3.4995 3.4955c-1.9474 0-3.4995-1.5504-3.4995-3.4955 0-1.9452 1.5522-3.4955 3.4995-3.4955z"/>
+  <path id="path5081" style="block-progression:tb;text-indent:0;color:#000000;enable-background:new;text-transform:none;fill:#bebebe" d="m450.81 204a1.0001 1.0001 0 0 0 -0.5 1.7188l4 4a1.0055 1.0055 0 1 0 1.4062 -1.4375l-4-4a1.0001 1.0001 0 0 0 -0.91 -0.28z"/>
+ </g>
+</svg>


Modified: workbench/icons/scalable/workbench-nodirs.svg
20 lines changed, 20 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg7384" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <metadata id="metadata90">
+  <rdf:RDF>
+   <cc:Work rdf:about="">
+    <dc:format>image/svg+xml</dc:format>
+    <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+    <dc:title>Gnome Symbolic Icon Theme</dc:title>
+   </cc:Work>
+  </rdf:RDF>
+ </metadata>
+ <title id="title9167">Gnome Symbolic Icon Theme</title>
+ <g id="layer9" transform="translate(-261 -257)">
+  <path id="path4561" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none;fill:#bebebe" d="m269 257c-2.7496 0-5 2.2504-5 5 0 1.5862 0.84459 2.9034 2 3.8125v2.1875 1h1 4 1v-1-2.1875c1.1554-0.90914 2-2.2263 2-3.8125 0-2.7496-2.2504-5-5-5zm0 2c1.6687 0 3 1.3313 3 3 0 1.1158-0.59507 2.0379-1.5 2.5625l-0.5 0.3125v0.5625 1.5625h-2v-1.5625-0.5625l-0.5-0.3125c-0.9-0.52-1.5-1.44-1.5-2.56 0-1.6687 1.3313-3 3-3z"/>
+  <path id="path4488-4" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none;fill:#bebebe" d="m267 272v1h4v-1h-4z"/>
+  <path id="path4488-4-7" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none;fill:#bebebe" d="m266 270v1h6v-1h-6z"/>
+  <path id="path4488-4-4" style="opacity:.35;block-progression:tb;text-indent:0;color:#000000;text-transform:none;fill:#bebebe" d="m268 262v1h2v-1h-2z"/>
+ </g>
+</svg>


Modified: workbench/icons/scalable/workbench-project-error.svg
17 lines changed, 17 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg7384" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <metadata id="metadata90">
+  <rdf:RDF>
+   <cc:Work rdf:about="">
+    <dc:format>image/svg+xml</dc:format>
+    <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+    <dc:title>Gnome Symbolic Icon Theme</dc:title>
+   </cc:Work>
+  </rdf:RDF>
+ </metadata>
+ <title id="title9167">Gnome Symbolic Icon Theme</title>
+ <g id="layer9" transform="translate(-341,-257)">
+  <path id="path10839-3" style="block-progression:tb;text-indent:0;color:#bebebe;enable-background:new;text-transform:none;fill:#bebebe" d="m349 258c-3.8706 0-7 3.1294-7 7s3.1294 7 7 7 7-3.1294 7-7-3.1294-7-7-7zm-4 6h8v2h-8z"/>
+ </g>
+</svg>


Modified: workbench/icons/scalable/workbench-project.svg
19 lines changed, 19 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg7384" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <metadata id="metadata90">
+  <rdf:RDF>
+   <cc:Work rdf:about="">
+    <dc:format>image/svg+xml</dc:format>
+    <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+    <dc:title>Gnome Symbolic Icon Theme</dc:title>
+   </cc:Work>
+  </rdf:RDF>
+ </metadata>
+ <title id="title9167">Gnome Symbolic Icon Theme</title>
+ <g id="layer14" transform="translate(-482,-300)">
+  <path id="rect7268" style="color:#bebebe;fill:#bebebe" d="m485 308h10v7.059c0 0.4922-0.47266 0.9375-0.99609 0.9375h-8.0039c-0.53906 0-1-0.42964-1-1z"/>
+  <path id="path7270" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none;fill:#bebebe" d="m488.69 302.97a1.0001 1.0001 0 0 0 -0.65625 0.375l-2.8125 3.4688a1.0001 1.0001 0 0 0 -0.22 0.63v1a1.0001 1.0001 0 1 0 2 0v-0.65625l2.5938-3.1562a1.0001 1.0001 0 0 0 -0.90625 -1.6562z"/>
+  <path id="path7272" style="block-progression:tb;text-indent:0;color:#000000;text-transform:none;fill:#bebebe" d="m490.91 305.97a1.0001 1.0001 0 1 0 -0.0312 2l2.1562 0.375v0.15625a1.0001 1.0001 0 1 0 2 0v-1a1.0001 1.0001 0 0 0 -0.8125 -1l-3-0.5a1.0001 1.0001 0 0 0 -0.3125 -0.0312z"/>
+ </g>
+</svg>


Modified: workbench/src/Makefile.am
31 lines changed, 31 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,31 @@
+include $(top_srcdir)/build/vars.build.mk
+plugin = workbench
+
+geanyplugins_LTLIBRARIES = workbench.la
+
+workbench_la_SOURCES = \
+	plugin_main.c \
+	wb_globals.h \
+	wb_globals.c \
+	workbench.h \
+	workbench.c \
+	wb_project.h \
+	wb_project.c \
+	dialogs.h \
+	dialogs.c \
+	menu.h \
+	menu.c \
+	popup_menu.h \
+	popup_menu.c \
+	sidebar.h \
+	sidebar.c \
+	utils.h \
+	utils.c
+
+workbench_la_CPPFLAGS = $(AM_CPPFLAGS) \
+	-DG_LOG_DOMAIN=\"Workbench\"
+workbench_la_CFLAGS = $(AM_CFLAGS)
+workbench_la_LIBADD = $(COMMONLIBS)
+
+include $(top_srcdir)/build/cppcheck.mk
+


Modified: workbench/src/dialogs.c
395 lines changed, 395 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,395 @@
+/*
+ * Copyright 2017 LarsGit223
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * This file contains all the code for the dialogs.
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "wb_globals.h"
+#include "dialogs.h"
+
+extern GeanyPlugin *geany_plugin;
+
+/** Shows the dialog "Create new workbench".
+ *
+ * The dialog lets the user create a new workbench file (filter *.geanywb).
+ *
+ * @return The filename
+ *
+ **/
+gchar *dialogs_create_new_workbench(void)
+{
+	gchar *filename = NULL;
+	GtkWidget *dialog;
+
+	dialog = gtk_file_chooser_dialog_new(_("Create new workbench"),
+		GTK_WINDOW(wb_globals.geany_plugin->geany_data->main_widgets->window), GTK_FILE_CHOOSER_ACTION_SAVE,
+		_("_Cancel"), GTK_RESPONSE_CANCEL,
+		_("C_reate"), GTK_RESPONSE_ACCEPT, NULL);
+	gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), "new.geanywb");
+	gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);
+
+	if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
+	{
+		filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+	}
+
+	gtk_widget_destroy(dialog);
+
+	return filename;
+}
+
+
+/** Shows the dialog "Open workbench".
+ *
+ * The dialog lets the user choose an existing workbench file (filter *.geanywb).
+ *
+ * @return The filename
+ *
+ **/
+gchar *dialogs_open_workbench(void)
+{
+	gchar *filename = NULL;
+	GtkWidget *dialog;
+	GtkFileFilter *filter;
+
+	dialog = gtk_file_chooser_dialog_new(_("Open workbench"),
+		GTK_WINDOW(wb_globals.geany_plugin->geany_data->main_widgets->window), GTK_FILE_CHOOSER_ACTION_OPEN,
+		_("_Cancel"), GTK_RESPONSE_CANCEL,
+		_("_Open"), GTK_RESPONSE_ACCEPT, NULL);
+
+	filter = gtk_file_filter_new();
+	gtk_file_filter_set_name(filter, _("Workbench files (.geanywb)"));
+	gtk_file_filter_add_pattern(filter, "*.geanywb");
+	gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
+	filter = gtk_file_filter_new();
+	gtk_file_filter_set_name(filter, _("All Files"));
+	gtk_file_filter_add_pattern(filter, "*");
+	gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
+
+	if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
+	{
+		filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+	}
+
+	gtk_widget_destroy(dialog);
+
+	return filename;
+}
+
+
+/** Shows the dialog "Add project".
+ *
+ * The dialog lets the user choose an existing project file
+ * (filter *.geany or *).
+ *
+ * @return The filename
+ *
+ **/
+gchar *dialogs_add_project(void)
+{
+	gchar *filename = NULL;
+	GtkWidget *dialog;
+	GtkFileFilter *filter;
+
+	dialog = gtk_file_chooser_dialog_new(_("Add project"),
+		GTK_WINDOW(wb_globals.geany_plugin->geany_data->main_widgets->window), GTK_FILE_CHOOSER_ACTION_OPEN,
+		_("_Cancel"), GTK_RESPONSE_CANCEL,
+		_("_Add"), GTK_RESPONSE_ACCEPT, NULL);
+
+	filter = gtk_file_filter_new();
+	gtk_file_filter_set_name(filter, _("Project files (.geany)"));
+	gtk_file_filter_add_pattern(filter, "*.geany");
+	gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
+	filter = gtk_file_filter_new();
+	gtk_file_filter_set_name(filter, _("All Files"));
+	gtk_file_filter_add_pattern(filter, "*");
+	gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter);
+
+	if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
+	{
+		filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+	}
+
+	gtk_widget_destroy(dialog);
+
+	return filename;
+}
+
+
+/** Shows the dialog "Add directory".
+ *
+ * The dialog lets the user choose an existing folder.
+ *
+ * @return The filename
+ *
+ **/
+gchar *dialogs_add_directory(WB_PROJECT *project)
+{
+	gchar *filename = NULL;
+	GtkWidget *dialog;
+
+	dialog = gtk_file_chooser_dialog_new(_("Add directory"),
+		GTK_WINDOW(wb_globals.geany_plugin->geany_data->main_widgets->window), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+		_("_Cancel"), GTK_RESPONSE_CANCEL,
+		_("_Add"), GTK_RESPONSE_ACCEPT, NULL);
+	if (project != NULL)
+	{
+		const gchar *path;
+
+		/* Set the current folder to the location of the project file */
+		path = wb_project_get_filename(project);
+		if (path != NULL)
+		{
+			gchar *dirname = g_path_get_dirname(path);
+			gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), dirname);
+			g_free(dirname);
+		}
+	}
+
+	if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
+	{
+		filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+	}
+
+	gtk_widget_destroy(dialog);
+
+	return filename;
+}
+
+
+/* Split patterns in str into gchar** */
+static gchar **split_patterns(const gchar *str)
+{
+	GString *tmp;
+	gchar **ret;
+	gchar *input;
+
+	input = g_strdup(str);
+
+	g_strstrip(input);
+	tmp = g_string_new(input);
+	g_free(input);
+	do {} while (utils_string_replace_all(tmp, "  ", " "));
+	ret = g_strsplit(tmp->str, " ", -1);
+	g_string_free(tmp, TRUE);
+	return ret;
+}
+
+
+/** Shows the directory settings dialog.
+ *
+ * The dialog lets the user edit the settings for file patterns, irnored file patterns and
+ * ignored directories patterns. On accept the result is directly stored in @a directory.
+ *
+ * @param  directory Location of WB_PROJECT_DIR to store the settings into
+ * @return TRUE if the settings have changed, FALSE otherwise
+ *
+ **/
+gboolean dialogs_directory_settings(WB_PROJECT_DIR *directory)
+{
+	GtkWidget *w_file_patterns, *w_ignored_dirs_patterns, *w_ignored_file_patterns;
+	GtkWidget *dialog, *label, *content_area;
+	GtkWidget *vbox, *hbox, *hbox1, *table;
+	GtkDialogFlags flags;
+	gchar *file_patterns_old, *ignored_file_patterns_old, *ignored_dirs_patterns_old;
+	gboolean changed;
+
+	/* Create the widgets */
+	flags = GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT;
+	dialog = gtk_dialog_new_with_buttons(_("Directory settings"),
+										 GTK_WINDOW(wb_globals.geany_plugin->geany_data->main_widgets->window),
+										 flags,
+										 _("_Cancel"), GTK_RESPONSE_CANCEL,
+										 _("_OK"), GTK_RESPONSE_ACCEPT,
+										 NULL);
+	content_area = gtk_dialog_get_content_area(GTK_DIALOG (dialog));
+
+	vbox = gtk_vbox_new(FALSE, 0);
+
+	table = gtk_table_new(5, 2, FALSE);
+	gtk_table_set_row_spacings(GTK_TABLE(table), 5);
+	gtk_table_set_col_spacings(GTK_TABLE(table), 10);
+
+	label = gtk_label_new(_("File patterns:"));
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	w_file_patterns = gtk_entry_new();
+	ui_table_add_row(GTK_TABLE(table), 0, label, w_file_patterns, NULL);
+	ui_entry_add_clear_icon(GTK_ENTRY(w_file_patterns));
+	gtk_widget_set_tooltip_text(w_file_patterns,
+		_("Space separated list of patterns that are used to identify files "
+		  "that shall be displayed in the directory tree."));
+	file_patterns_old = g_strjoinv(" ", wb_project_dir_get_file_patterns(directory));
+	gtk_entry_set_text(GTK_ENTRY(w_file_patterns), file_patterns_old);
+
+	label = gtk_label_new(_("Ignored file patterns:"));
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	w_ignored_file_patterns = gtk_entry_new();
+	ui_entry_add_clear_icon(GTK_ENTRY(w_ignored_file_patterns));
+	ui_table_add_row(GTK_TABLE(table), 2, label, w_ignored_file_patterns, NULL);
+	gtk_widget_set_tooltip_text(w_ignored_file_patterns,
+		_("Space separated list of patterns that are used to identify files "
+		  "that shall not be displayed in the directory tree."));
+	ignored_file_patterns_old = g_strjoinv(" ", wb_project_dir_get_ignored_file_patterns(directory));
+	gtk_entry_set_text(GTK_ENTRY(w_ignored_file_patterns), ignored_file_patterns_old);
+
+	label = gtk_label_new(_("Ignored directory patterns:"));
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	w_ignored_dirs_patterns = gtk_entry_new();
+	ui_entry_add_clear_icon(GTK_ENTRY(w_ignored_dirs_patterns));
+	ui_table_add_row(GTK_TABLE(table), 3, label, w_ignored_dirs_patterns, NULL);
+	gtk_widget_set_tooltip_text(w_ignored_dirs_patterns,
+		_("Space separated list of patterns that are used to identify directories "
+		  "that shall not be scanned for source files."));
+	ignored_dirs_patterns_old = g_strjoinv(" ", wb_project_dir_get_ignored_dirs_patterns(directory));
+	gtk_entry_set_text(GTK_ENTRY(w_ignored_dirs_patterns), ignored_dirs_patterns_old);
+
+	gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 6);
+
+	hbox1 = gtk_hbox_new(FALSE, 0);
+	label = gtk_label_new(_("Note: the patterns above affect only the workbench directory and are not used in the Find in Files\n"
+	"dialog."));
+	gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 6);
+
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 6);
+
+	/* Add the label, and show everything we’ve added */
+	gtk_container_add(GTK_CONTAINER (content_area), label);
+	gtk_container_add(GTK_CONTAINER (content_area), hbox);
+
+	gtk_widget_show_all(dialog);
+	gint result = gtk_dialog_run(GTK_DIALOG(dialog));
+	changed = FALSE;
+	if (result == GTK_RESPONSE_ACCEPT)
+	{
+		const gchar *str;
+		gchar **file_patterns, **ignored_dirs_patterns, **ignored_file_patterns;
+
+		str = gtk_entry_get_text(GTK_ENTRY(w_file_patterns));
+		if (g_strcmp0(str, file_patterns_old) != 0)
+		{
+			changed = TRUE;
+		}
+		file_patterns = split_patterns(str);
+
+		str = gtk_entry_get_text(GTK_ENTRY(w_ignored_dirs_patterns));
+		if (g_strcmp0(str, ignored_dirs_patterns_old) != 0)
+		{
+			changed = TRUE;
+		}
+		ignored_dirs_patterns = split_patterns(str);
+
+		str = gtk_entry_get_text(GTK_ENTRY(w_ignored_file_patterns));
+		if (g_strcmp0(str, ignored_file_patterns_old) != 0)
+		{
+			changed = TRUE;
+		}
+		ignored_file_patterns = split_patterns(str);
+
+		wb_project_dir_set_file_patterns(directory, file_patterns);
+		wb_project_dir_set_ignored_dirs_patterns(directory, ignored_dirs_patterns);
+		wb_project_dir_set_ignored_file_patterns(directory, ignored_file_patterns);
+
+		g_strfreev(file_patterns);
+		g_strfreev(ignored_dirs_patterns);
+		g_strfreev(ignored_file_patterns);
+	}
+
+	g_free(file_patterns_old);
+	g_free(ignored_file_patterns_old);
+	g_free(ignored_dirs_patterns_old);
+	gtk_widget_destroy(dialog);
+
+	return changed;
+}
+
+
+/** Shows the workbench settings dialog.
+ *
+ * The dialog lets the user edit the settings for option "Rescan all projects on open".
+ * On accept the result is directly stored in @a workbench.
+ *
+ * @param  workbench Location of WORKBENCH to store the settings into
+ * @return TRUE if the settings have changed, FALSE otherwise
+ *
+ **/
+gboolean dialogs_workbench_settings(WORKBENCH *workbench)
+{
+	gint result;
+	GtkWidget *w_rescan_projects_on_open;
+	GtkWidget *dialog, *label, *content_area;
+	GtkWidget *vbox, *hbox, *table;
+	GtkDialogFlags flags;
+	gboolean changed, rescan_projects_on_open, rescan_projects_on_open_old;
+
+	/* Create the widgets */
+	flags = GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT;
+	dialog = gtk_dialog_new_with_buttons(_("Workbench settings"),
+										 GTK_WINDOW(wb_globals.geany_plugin->geany_data->main_widgets->window),
+										 flags,
+										 _("_Cancel"), GTK_RESPONSE_CANCEL,
+										 _("_OK"), GTK_RESPONSE_ACCEPT,
+										 NULL);
+	content_area = gtk_dialog_get_content_area(GTK_DIALOG (dialog));
+
+	vbox = gtk_vbox_new(FALSE, 0);
+
+	table = gtk_table_new(5, 2, FALSE);
+	gtk_table_set_row_spacings(GTK_TABLE(table), 5);
+	gtk_table_set_col_spacings(GTK_TABLE(table), 10);
+
+	label = gtk_label_new(_("Rescan all projects on open:"));
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	w_rescan_projects_on_open = gtk_check_button_new();
+	ui_table_add_row(GTK_TABLE(table), 0, label, w_rescan_projects_on_open, NULL);
+	gtk_widget_set_tooltip_text(w_rescan_projects_on_open,
+		_("If the option is activated (default), then all projects will be re-scanned"
+		  " on opening of the workbench."));
+	rescan_projects_on_open_old = workbench_get_rescan_projects_on_open(workbench);
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w_rescan_projects_on_open), rescan_projects_on_open_old);
+
+	gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 6);
+
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 6);
+
+	/* Show everything we’ve added, run dialog */
+	gtk_container_add(GTK_CONTAINER (content_area), hbox);
+	gtk_widget_show_all(dialog);
+	result = gtk_dialog_run(GTK_DIALOG(dialog));
+
+	changed = FALSE;
+	if (result == GTK_RESPONSE_ACCEPT)
+	{
+		rescan_projects_on_open = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w_rescan_projects_on_open));
+		if (rescan_projects_on_open != rescan_projects_on_open_old)
+		{
+			changed = TRUE;
+			workbench_set_rescan_projects_on_open(workbench, rescan_projects_on_open);
+		}
+	}
+
+	gtk_widget_destroy(dialog);
+
+	return changed;
+}


Modified: workbench/src/dialogs.h
29 lines changed, 29 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2017 LarsGit223
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __WB_DIALOGS_H__
+#define __WB_DIALOGS_H__
+
+gchar *dialogs_create_new_workbench(void);
+gchar *dialogs_open_workbench(void);
+gchar *dialogs_add_project(void);
+gchar *dialogs_add_directory(WB_PROJECT *project);
+gboolean dialogs_directory_settings(WB_PROJECT_DIR *directory);
+gboolean dialogs_workbench_settings(WORKBENCH *workbench);
+
+#endif


Modified: workbench/src/menu.c
229 lines changed, 229 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,229 @@
+/*
+ * Copyright 2017 LarsGit223
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * Code for the "Workbench" menu.
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "wb_globals.h"
+#include "dialogs.h"
+#include "menu.h"
+#include "sidebar.h"
+
+extern GeanyPlugin *geany_plugin;
+
+typedef struct
+{
+	GtkWidget *menu;
+	GtkWidget *root_item;
+	GtkWidget *item_new;
+	GtkWidget *item_open;
+	GtkWidget *item_save;
+	GtkWidget *item_settings;
+	GtkWidget *item_close;
+}WB_MENU_DATA;
+static WB_MENU_DATA menu_data;
+
+/** Set the context of the workbench menu.
+ *
+ * The context set controls which items in the menu will be active and 
+ * which will be deactive.
+ *
+ * @param context The context/situation in which the menu is/shall be
+ *
+ **/
+void menu_set_context(MENU_CONTEXT context)
+{
+	switch (context)
+	{
+		case MENU_CONTEXT_WB_CREATED:
+		case MENU_CONTEXT_WB_OPENED:
+			gtk_widget_set_sensitive(menu_data.item_new, FALSE);
+			gtk_widget_set_sensitive(menu_data.item_open, FALSE);
+			gtk_widget_set_sensitive(menu_data.item_save, TRUE);
+			gtk_widget_set_sensitive(menu_data.item_settings, TRUE);
+			gtk_widget_set_sensitive(menu_data.item_close, TRUE);
+		break;
+		case MENU_CONTEXT_WB_CLOSED:
+			gtk_widget_set_sensitive(menu_data.item_new, TRUE);
+			gtk_widget_set_sensitive(menu_data.item_open, TRUE);
+			gtk_widget_set_sensitive(menu_data.item_save, FALSE);
+			gtk_widget_set_sensitive(menu_data.item_settings, FALSE);
+			gtk_widget_set_sensitive(menu_data.item_close, FALSE);
+		break;
+	}
+}
+
+/* The function handles the menu item "New workbench" */
+static void item_new_workbench_activate_cb(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	gchar *filename;
+	GError *error = NULL;
+
+	filename = dialogs_create_new_workbench();
+	if (filename == NULL)
+	{
+		return;
+	}
+	wb_globals.opened_wb = workbench_new();
+	workbench_set_filename(wb_globals.opened_wb, filename);
+	if (workbench_save(wb_globals.opened_wb, &error))
+	{
+		menu_set_context(MENU_CONTEXT_WB_CREATED);
+		sidebar_update(SIDEBAR_CONTEXT_WB_CREATED, NULL);
+	}
+	else
+	{
+		dialogs_show_msgbox(GTK_MESSAGE_INFO, _("Could not create new workbench file: %s"), error->message);
+		workbench_free(wb_globals.opened_wb);
+		wb_globals.opened_wb = NULL;
+	}
+	g_free(filename);
+}
+
+
+/* The function handles the menu item "Open workbench" */
+static void item_open_workbench_activate_cb(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	gchar *filename;
+	GError *error = NULL;
+
+	filename = dialogs_open_workbench();
+	if (filename == NULL)
+	{
+		return;
+	}
+	wb_globals.opened_wb = workbench_new();
+	if (workbench_load(wb_globals.opened_wb, filename, &error))
+	{
+		menu_set_context(MENU_CONTEXT_WB_OPENED);
+		sidebar_update(SIDEBAR_CONTEXT_WB_OPENED, NULL);
+	}
+	else
+	{
+		dialogs_show_msgbox(GTK_MESSAGE_INFO, _("Could not open workbench file: %s"), error->message);
+		workbench_free(wb_globals.opened_wb);
+		wb_globals.opened_wb = NULL;
+	}
+	g_free(filename);
+}
+
+
+/* The function handles the menu item "Save workbench" */
+static void item_save_workbench_activate_cb(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	GError *error = NULL;
+
+	if (wb_globals.opened_wb != NULL)
+	{
+		if (!workbench_save(wb_globals.opened_wb, &error))
+		{
+			dialogs_show_msgbox(GTK_MESSAGE_INFO, _("Could not save workbench file: %s"), error->message);
+		}
+		sidebar_update(SIDEBAR_CONTEXT_WB_SAVED, NULL);
+	}
+}
+
+
+/* The function handles the menu item "Settings" */
+static void item_workbench_settings_activate_cb(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	if (wb_globals.opened_wb != NULL)
+	{
+		if (dialogs_workbench_settings(wb_globals.opened_wb))
+		{
+			sidebar_update(SIDEBAR_CONTEXT_WB_SETTINGS_CHANGED, NULL);
+		}
+	}
+}
+
+
+/* The function handles the menu item "Close workbench" */
+static void item_close_workbench_activate_cb(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	workbench_free(wb_globals.opened_wb);
+	wb_globals.opened_wb = NULL;
+
+	menu_set_context(MENU_CONTEXT_WB_CLOSED);
+	sidebar_update(SIDEBAR_CONTEXT_WB_CLOSED, NULL);
+}
+
+
+/** Setup the workbench menu.
+ *
+ **/
+gboolean menu_init(void)
+{
+	/* Create menu and root item/label */
+	menu_data.menu = gtk_menu_new();
+	menu_data.root_item = gtk_menu_item_new_with_label(_("Workbench"));
+	gtk_widget_show(menu_data.root_item);
+
+	/* Create new menu item "New Workbench" */
+	menu_data.item_new = gtk_menu_item_new_with_mnemonic(_("_New..."));
+	gtk_widget_show(menu_data.item_new);
+	gtk_menu_shell_append(GTK_MENU_SHELL (menu_data.menu), menu_data.item_new);
+	g_signal_connect(menu_data.item_new, "activate",
+					 G_CALLBACK(item_new_workbench_activate_cb), NULL);
+
+	/* Create new menu item "Open Workbench" */
+	menu_data.item_open = gtk_menu_item_new_with_mnemonic(_("_Open..."));
+	gtk_widget_show(menu_data.item_open);
+	gtk_menu_shell_append(GTK_MENU_SHELL (menu_data.menu), menu_data.item_open);
+	g_signal_connect(menu_data.item_open, "activate",
+					 G_CALLBACK(item_open_workbench_activate_cb), NULL);
+
+	/* Create new menu item "Save Workbench" */
+	menu_data.item_save = gtk_menu_item_new_with_mnemonic(_("_Save"));
+	gtk_widget_show(menu_data.item_save);
+	gtk_menu_shell_append(GTK_MENU_SHELL (menu_data.menu), menu_data.item_save);
+	g_signal_connect(menu_data.item_save, "activate",
+					 G_CALLBACK(item_save_workbench_activate_cb), NULL);
+
+	/* Create new menu item "Workbench Settings" */
+	menu_data.item_settings = gtk_menu_item_new_with_mnemonic(_("S_ettings"));
+	gtk_widget_show(menu_data.item_settings);
+	gtk_menu_shell_append(GTK_MENU_SHELL (menu_data.menu), menu_data.item_settings);
+	g_signal_connect(menu_data.item_settings, "activate",
+					 G_CALLBACK(item_workbench_settings_activate_cb), NULL);
+
+	/* Create new menu item "Close Workbench" */
+	menu_data.item_close = gtk_menu_item_new_with_mnemonic(_("_Close"));
+	gtk_widget_show(menu_data.item_close);
+	gtk_menu_shell_append(GTK_MENU_SHELL (menu_data.menu), menu_data.item_close);
+	g_signal_connect(menu_data.item_close, "activate",
+					 G_CALLBACK(item_close_workbench_activate_cb), NULL);
+
+	/* Add our menu to the main window (left of the help menu) */
+	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_data.root_item), menu_data.menu);
+	gtk_container_add(GTK_CONTAINER(wb_globals.geany_plugin->geany_data->main_widgets->tools_menu), menu_data.root_item);
+
+	return TRUE;
+}
+
+
+/** Cleanup menu data/mem.
+ *
+ **/
+void menu_cleanup (void)
+{
+	gtk_widget_destroy(menu_data.root_item);
+}


Modified: workbench/src/menu.h
33 lines changed, 33 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2017 LarsGit223
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __WB_MENU_H__
+#define __WB_MENU_H__
+
+typedef enum
+{
+	MENU_CONTEXT_WB_CREATED,
+	MENU_CONTEXT_WB_OPENED,
+	MENU_CONTEXT_WB_CLOSED,
+}MENU_CONTEXT;
+
+void menu_set_context(MENU_CONTEXT context);
+gboolean menu_init(void);
+void menu_cleanup (void);
+
+#endif


Modified: workbench/src/plugin_main.c
142 lines changed, 142 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2017 LarsGit223
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * Code for plugin setup/registration.
+ */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <sys/time.h>
+#include <string.h>
+
+#include <wb_globals.h>
+
+#include "sidebar.h"
+#include "menu.h"
+#include "popup_menu.h"
+
+GeanyPlugin *geany_plugin;
+GeanyData *geany_data;
+
+/* Callback function for document open */
+static void plugin_workbench_on_doc_open(G_GNUC_UNUSED GObject * obj, G_GNUC_UNUSED GeanyDocument * doc,
+										 G_GNUC_UNUSED gpointer user_data)
+{
+	WB_PROJECT *project;
+
+	g_return_if_fail(doc != NULL && doc->file_name != NULL);
+
+	project = workbench_file_is_included(wb_globals.opened_wb, doc->file_name);
+	if (project != NULL)
+	{
+		wb_project_remove_single_tm_file(project, doc->file_name);
+	}
+}
+
+
+/* Callback function for document close */
+static void plugin_workbench_on_doc_close(G_GNUC_UNUSED GObject * obj, GeanyDocument * doc,
+										  G_GNUC_UNUSED gpointer user_data)
+{
+	WB_PROJECT *project;
+
+	g_return_if_fail(doc != NULL);
+
+	if (doc->file_name == NULL)
+	{
+		return;
+	}
+
+	/* tags of open files managed by geany - when the file gets closed,
+	 * we should take care of it */
+	project = workbench_file_is_included(wb_globals.opened_wb, doc->file_name);
+	if (project != NULL)
+	{
+		wb_project_add_single_tm_file(project, doc->file_name);
+	}
+}
+
+
+/* Initialize plugin */
+static gboolean plugin_workbench_init(GeanyPlugin *plugin, G_GNUC_UNUSED gpointer pdata)
+{
+	/* Init/Update globals */
+	workbench_globals_init();
+	wb_globals.geany_plugin = plugin;
+	geany_plugin = plugin;
+	geany_data = plugin->geany_data;
+
+	menu_init();
+	sidebar_init();
+	popup_menu_init();
+
+	/* At start there is no workbench open:
+	   deactive save and close menu item and sidebar */
+	menu_set_context(MENU_CONTEXT_WB_CLOSED);
+	sidebar_show_intro_message(_("Create or open a workbench\nusing the workbench menu."), FALSE);
+
+	return TRUE;
+}
+
+
+/* Cleanup plugin */
+static void plugin_workbench_cleanup(G_GNUC_UNUSED GeanyPlugin *plugin, G_GNUC_UNUSED gpointer pdata)
+{
+	menu_cleanup();
+	sidebar_cleanup();
+}
+
+
+/* Show help */
+static void plugin_workbench_help (G_GNUC_UNUSED GeanyPlugin *plugin, G_GNUC_UNUSED gpointer pdata)
+{
+	utils_open_browser("http://plugins.geany.org/workbench.html");
+}
+
+
+static PluginCallback plugin_workbench_callbacks[] = {
+	{"document-open", (GCallback) &plugin_workbench_on_doc_open, TRUE, NULL},
+	{"document-close", (GCallback) &plugin_workbench_on_doc_close, TRUE, NULL},
+	{NULL, NULL, FALSE, NULL}
+};
+
+
+/* Load module */
+G_MODULE_EXPORT
+void geany_load_module(GeanyPlugin *plugin)
+{
+	/* Setup translation */
+	main_locale_init(LOCALEDIR, GETTEXT_PACKAGE);
+
+	/* Set metadata */
+	plugin->info->name = _("Workbench");
+	plugin->info->description = _("Manage and customize multiple projects.");
+	plugin->info->version = "1.0";
+	plugin->info->author = "LarsGit223";
+
+	/* Set functions */
+	plugin->funcs->init = plugin_workbench_init;
+	plugin->funcs->cleanup = plugin_workbench_cleanup;
+	plugin->funcs->help = plugin_workbench_help;
+	plugin->funcs->callbacks = plugin_workbench_callbacks;
+
+	/* Register! */
+	GEANY_PLUGIN_REGISTER(plugin, 225);
+}


Modified: workbench/src/popup_menu.c
468 lines changed, 468 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,468 @@
+/*
+ * Copyright 2017 LarsGit223
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * Code for the popup menu.
+ */
+#include <sys/time.h>
+#include <gdk/gdkkeysyms.h>
+#include <string.h>
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#endif
+
+#include "wb_globals.h"
+#include "dialogs.h"
+#include "sidebar.h"
+#include "popup_menu.h"
+
+static struct
+{
+	GtkWidget *widget;
+
+	GtkWidget *add_project;
+	GtkWidget *save_project;
+	GtkWidget *remove_project;
+	GtkWidget *fold_unfold_project;
+	GtkWidget *add_directory;
+	GtkWidget *remove_directory;
+	GtkWidget *rescan_directory;
+	GtkWidget *directory_settings;
+	GtkWidget *fold_unfold_directory;
+	GtkWidget *expand_all;
+	GtkWidget *collapse_all;
+	GtkWidget *add_wb_bookmark;
+	GtkWidget *add_prj_bookmark;
+	GtkWidget *remove_bookmark;
+} s_popup_menu;
+
+
+/** Show the popup menu.
+ *
+ * The function shows the popup menu. The value of context decides which popup menu items
+ * are enabled and which are disabled.
+ *
+ * @param context The context/situation in which the popup menu was called
+ * @param event   Button event.
+ *
+ **/
+void popup_menu_show(POPUP_CONTEXT context, GdkEventButton *event)
+{
+	switch (context)
+	{
+		case POPUP_CONTEXT_PROJECT:
+			gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.add_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.rescan_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.directory_settings, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE);
+		break;
+		case POPUP_CONTEXT_DIRECTORY:
+		case POPUP_CONTEXT_FOLDER:
+			gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.add_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.rescan_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.directory_settings, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE);
+		break;
+		case POPUP_CONTEXT_FILE:
+			gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.add_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.rescan_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.directory_settings, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE);
+		break;
+		case POPUP_CONTEXT_BACKGROUND:
+			gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_project, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_project, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.rescan_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.directory_settings, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, FALSE);
+		break;
+		case POPUP_CONTEXT_WB_BOOKMARK:
+			gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_project, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_project, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.rescan_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.directory_settings, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, TRUE);
+		break;
+		case POPUP_CONTEXT_PRJ_BOOKMARK:
+			gtk_widget_set_sensitive (s_popup_menu.add_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_project, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.add_directory, TRUE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.rescan_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.directory_settings, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.fold_unfold_directory, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_wb_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.add_prj_bookmark, FALSE);
+			gtk_widget_set_sensitive (s_popup_menu.remove_bookmark, TRUE);
+		break;
+	}
+	gtk_menu_popup(GTK_MENU(s_popup_menu.widget), NULL, NULL, NULL, NULL,
+				   event->button, event->time);
+}
+
+
+/* Handle popup menu item "Add project" */
+static void popup_menu_on_add_project(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	gchar *filename;
+
+	filename = dialogs_add_project();
+	if (filename == NULL || wb_globals.opened_wb == NULL)
+	{
+		return;
+	}
+
+	if (workbench_add_project(wb_globals.opened_wb, filename))
+	{
+		sidebar_update(SIDEBAR_CONTEXT_PROJECT_ADDED, NULL);
+	}
+	else
+	{
+		dialogs_show_msgbox(GTK_MESSAGE_INFO, _("Could not add project file: %s"), filename);
+	}
+	g_free(filename);
+}
+
+
+/* Handle popup menu item "Save project" */
+static void popup_menu_on_save_project(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	GError *error = NULL;
+	WB_PROJECT *project;
+
+	project = sidebar_file_view_get_selected_project(NULL);
+	if (project != NULL && wb_globals.opened_wb != NULL)
+	{
+		if (wb_project_save(project, &error))
+		{
+			SIDEBAR_CONTEXT context;
+
+			memset(&context, 0, sizeof(context));
+			context.project = project;
+			sidebar_update(SIDEBAR_CONTEXT_PROJECT_SAVED, &context);
+		}
+	}
+}
+
+
+/* Handle popup menu item "Remove project" */
+static void popup_menu_on_remove_project(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	WB_PROJECT *project;
+
+	project = sidebar_file_view_get_selected_project(NULL);
+	if (project != NULL && wb_globals.opened_wb != NULL)
+	{
+		if (workbench_remove_project_with_address(wb_globals.opened_wb, project))
+		{
+			SIDEBAR_CONTEXT context;
+
+			memset(&context, 0, sizeof(context));
+			context.project = project;
+			sidebar_update(SIDEBAR_CONTEXT_PROJECT_REMOVED, &context);
+		}
+	}
+}
+
+
+/* Handle popup menu item "Expand all" */
+static void popup_menu_on_expand_all(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	sidebar_expand_all();
+}
+
+
+/* Handle popup menu item "Collapse all" */
+static void popup_menu_on_collapse_all(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	sidebar_collapse_all();
+}
+
+
+/* Handle popup menu item "Fold/unfold project" */
+static void popup_menu_on_fold_unfold_project(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	sidebar_toggle_selected_project_expansion();
+}
+
+
+/* Handle popup menu item "Add directory" */
+static void popup_menu_on_add_directory(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	gchar *dirname;
+	WB_PROJECT *project;
+
+	project = sidebar_file_view_get_selected_project(NULL);
+	if (project != NULL)
+	{
+		dirname = dialogs_add_directory(project);
+		if (dirname != NULL)
+		{
+			SIDEBAR_CONTEXT context;
+
+			memset(&context, 0, sizeof(context));
+			context.project = project;
+			wb_project_add_directory(project, dirname);
+			sidebar_update(SIDEBAR_CONTEXT_DIRECTORY_ADDED, &context);
+			g_free(dirname);
+		}
+	}
+}
+
+
+/* Handle popup menu item "Remove directory" */
+static void popup_menu_on_remove_directory(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	SIDEBAR_CONTEXT context;
+
+	if (sidebar_file_view_get_selected_context(&context)
+		&& context.project != NULL && context.directory != NULL)
+	{
+		wb_project_remove_directory(context.project, context.directory);
+		sidebar_update(SIDEBAR_CONTEXT_DIRECTORY_REMOVED, &context);
+	}
+}
+
+
+/* Handle popup menu item "Rescan directory" */
+static void popup_menu_on_rescan_directory(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	SIDEBAR_CONTEXT context;
+
+	if (sidebar_file_view_get_selected_context(&context)
+		&& context.project != NULL && context.directory != NULL)
+	{
+		wb_project_dir_rescan(context.project, context.directory);
+		sidebar_update(SIDEBAR_CONTEXT_DIRECTORY_RESCANNED, &context);
+	}
+}
+
+
+/* Handle popup menu item "Directory settings" */
+static void popup_menu_on_directory_settings(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	SIDEBAR_CONTEXT context;
+
+	if (sidebar_file_view_get_selected_context(&context)
+		&& context.project != NULL && context.directory != NULL)
+	{
+		if (dialogs_directory_settings(context.directory))
+		{
+			wb_project_set_modified(context.project, TRUE);
+			wb_project_dir_rescan(context.project, context.directory);
+			sidebar_update(SIDEBAR_CONTEXT_DIRECTORY_SETTINGS_CHANGED, &context);
+		}
+	}
+}
+
+
+/* Handle popup menu item "Directory settings" */
+static void popup_menu_on_fold_unfold_directory(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	sidebar_toggle_selected_project_dir_expansion();
+}
+
+
+/* Handle popup menu item "Add to workbench bookmarks" */
+static void popup_menu_on_add_to_workbench_bookmarks(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	SIDEBAR_CONTEXT context;
+
+	if (sidebar_file_view_get_selected_context(&context)
+		&& context.file != NULL)
+	{
+		workbench_add_bookmark(wb_globals.opened_wb, context.file);
+		sidebar_update(SIDEBAR_CONTEXT_WB_BOOKMARK_ADDED, &context);
+	}
+}
+
+
+/* Handle popup menu item "Add to project bookmarks" */
+static void popup_menu_on_add_to_project_bookmarks(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	SIDEBAR_CONTEXT context;
+
+	if (sidebar_file_view_get_selected_context(&context)
+		&& context.project != NULL && context.file != NULL)
+	{
+		wb_project_add_bookmark(context.project, context.file);
+		sidebar_update(SIDEBAR_CONTEXT_PRJ_BOOKMARK_ADDED, &context);
+	}
+}
+
+
+/* Handle popup menu item "Remove from bookmarks" */
+static void popup_menu_on_remove_from_bookmarks(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer user_data)
+{
+	SIDEBAR_CONTEXT context;
+
+	if (sidebar_file_view_get_selected_context(&context)
+		&& context.wb_bookmark != NULL)
+	{
+		workbench_remove_bookmark(wb_globals.opened_wb, context.wb_bookmark);
+		sidebar_update(SIDEBAR_CONTEXT_WB_BOOKMARK_REMOVED, &context);
+	}
+	if (sidebar_file_view_get_selected_context(&context)
+		&& context.project != NULL && context.prj_bookmark != NULL)
+	{
+		wb_project_remove_bookmark(context.project, context.prj_bookmark);
+		sidebar_update(SIDEBAR_CONTEXT_PRJ_BOOKMARK_REMOVED, &context);
+	}
+}
+
+
+/** Setup/Initialize the popup menu.
+ *
+ **/
+void popup_menu_init(void)
+{
+	GtkWidget *item;
+
+	s_popup_menu.widget = gtk_menu_new();
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Add project..."));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_add_project), NULL);
+	s_popup_menu.add_project = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Save project"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_save_project), NULL);
+	s_popup_menu.save_project = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Remove project"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_remove_project), NULL);
+	s_popup_menu.remove_project = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Fold/unfold project"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_fold_unfold_project), NULL);
+	s_popup_menu.fold_unfold_project = item;
+
+	item = gtk_separator_menu_item_new();
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Add directory..."));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_add_directory), NULL);
+	s_popup_menu.add_directory = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Remove directory"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_remove_directory), NULL);
+	s_popup_menu.remove_directory = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Rescan directory"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_rescan_directory), NULL);
+	s_popup_menu.rescan_directory = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Directory settings"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_directory_settings), NULL);
+	s_popup_menu.directory_settings = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Fold/unfold directory"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_fold_unfold_directory), NULL);
+	s_popup_menu.fold_unfold_directory = item;
+
+	item = gtk_separator_menu_item_new();
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Expand all"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_expand_all), NULL);
+	s_popup_menu.expand_all = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Collapse all"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_collapse_all), NULL);
+	s_popup_menu.collapse_all = item;
+
+	item = gtk_separator_menu_item_new();
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Add to Workbench Bookmarks"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_add_to_workbench_bookmarks), NULL);
+	s_popup_menu.add_wb_bookmark = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Add to Project Bookmarks"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_add_to_project_bookmarks), NULL);
+	s_popup_menu.add_prj_bookmark = item;
+
+	item = gtk_menu_item_new_with_mnemonic(_("_Remove from Bookmarks"));
+	gtk_widget_show(item);
+	gtk_container_add(GTK_CONTAINER(s_popup_menu.widget), item);
+	g_signal_connect(item, "activate", G_CALLBACK(popup_menu_on_remove_from_bookmarks), NULL@@ Diff output truncated at 100000 characters. @@

--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list