From 76dc5277a4688a30210d6587164e805ca96074d6 Mon Sep 17 00:00:00 2001 From: xiota Date: Mon, 6 Mar 2023 20:45:49 -0800 Subject: [PATCH] Remove multiterm plugin --- .github/workflows/build.yml | 2 - MAINTAINERS | 7 - Makefile.am | 4 - README | 1 - build/multiterm.m4 | 13 - configure.ac | 1 - multiterm/.gitignore | 2 - multiterm/AUTHORS | 1 - multiterm/COPYING | 339 ----- multiterm/ChangeLog | 0 multiterm/Makefile.am | 6 - multiterm/NEWS | 1 - multiterm/README | 78 -- multiterm/TODO | 10 - multiterm/src/Makefile.am | 34 - multiterm/src/config.vala | 139 -- multiterm/src/context-menu.vala | 155 --- multiterm/src/defconf.vala | 173 --- multiterm/src/notebook.vala | 221 ---- multiterm/src/plugin.vala | 117 -- multiterm/src/shell-config.vala | 351 ----- multiterm/src/tab-label.vala | 93 -- multiterm/src/terminal.vala | 189 --- multiterm/src/vapi/geany.deps | 2 - multiterm/src/vapi/geany.vapi | 2157 ------------------------------- po/POTFILES | 240 ++++ po/POTFILES.in | 9 - po/POTFILES.skip | 8 - po/be.po | 90 -- po/ca.po | 97 -- po/da.po | 87 -- po/de.po | 87 -- po/el.po | 87 -- po/es.po | 89 -- po/fr.po | 88 -- po/gl.po | 97 -- po/it.po | 98 -- po/ja.po | 97 -- po/kk.po | 87 -- po/nl.po | 98 -- po/pt.po | 87 -- po/pt_BR.po | 97 -- po/ru.po | 87 -- po/tr.po | 87 -- po/uk.po | 87 -- po/zh_CN.po | 97 -- 46 files changed, 240 insertions(+), 5757 deletions(-) delete mode 100644 build/multiterm.m4 delete mode 100644 multiterm/.gitignore delete mode 100644 multiterm/AUTHORS delete mode 100644 multiterm/COPYING delete mode 100644 multiterm/ChangeLog delete mode 100644 multiterm/Makefile.am delete mode 100644 multiterm/NEWS delete mode 100644 multiterm/README delete mode 100644 multiterm/TODO delete mode 100644 multiterm/src/Makefile.am delete mode 100644 multiterm/src/config.vala delete mode 100644 multiterm/src/context-menu.vala delete mode 100644 multiterm/src/defconf.vala delete mode 100644 multiterm/src/notebook.vala delete mode 100644 multiterm/src/plugin.vala delete mode 100644 multiterm/src/shell-config.vala delete mode 100644 multiterm/src/tab-label.vala delete mode 100644 multiterm/src/terminal.vala delete mode 100644 multiterm/src/vapi/geany.deps delete mode 100644 multiterm/src/vapi/geany.vapi create mode 100644 po/POTFILES diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1982244d4..ff0aaab1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -128,8 +128,6 @@ jobs: libmarkdown2-dev # markdown/webhelper libwebkit2gtk-4.0-dev - # multiterm - valac # pretty-printer libxml2-dev # spellcheck diff --git a/MAINTAINERS b/MAINTAINERS index 90d8b8bef..cc0a877ba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -216,13 +216,6 @@ M: Matthew Brush W: S: Maintained -multiterm -P: Matthew Brush -g: @codebrainz -M: Matthew Brush -W: http://plugins.geany.org/multiterm.html -S: Maintained - overview P: Matthew Brush g: @codebrainz diff --git a/Makefile.am b/Makefile.am index 2dc37e3a1..6ab47c1dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -122,10 +122,6 @@ if ENABLE_MARKDOWN SUBDIRS += markdown endif -if ENABLE_MULTITERM -SUBDIRS += multiterm -endif - if ENABLE_OVERVIEW SUBDIRS += overview endif diff --git a/README b/README index 3bd6bc8e2..cddb0d8c3 100644 --- a/README +++ b/README @@ -74,7 +74,6 @@ Available plugins are: * ``lineoperations`` -- simple line functions that can be applied to an open file * ``lipsum`` -- the Lipsum plugin * ``markdown`` -- the Markdown plugin -* ``multiterm`` -- the multiterm plugin * ``overview``-- the overview plugin * ``pairtaghighlighter`` -- the PairTagHighlighter plugin * ``peg-markdown`` -- use the Peg-Markdown library in the Markdown plugin diff --git a/build/multiterm.m4 b/build/multiterm.m4 deleted file mode 100644 index 780aca229..000000000 --- a/build/multiterm.m4 +++ /dev/null @@ -1,13 +0,0 @@ -AC_DEFUN([GP_CHECK_MULTITERM], -[ - GP_ARG_DISABLE([multiterm], [auto]) - - GP_CHECK_PLUGIN_VALA([multiterm]) - GP_CHECK_PLUGIN_DEPS([multiterm], [MULTITERM], [gtk+-2.0 vte]) - GP_COMMIT_PLUGIN_STATUS([MultiTerm]) - - AC_CONFIG_FILES([ - multiterm/Makefile - multiterm/src/Makefile - ]) -]) diff --git a/configure.ac b/configure.ac index d9fe4be06..edd8c21f9 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,6 @@ GP_CHECK_KEYRECORD GP_CHECK_LINEOPERATIONS GP_CHECK_LIPSUM GP_CHECK_MARKDOWN -GP_CHECK_MULTITERM GP_CHECK_OVERVIEW GP_CHECK_PAIRTAGHIGHLIGHTER GP_CHECK_POHELPER diff --git a/multiterm/.gitignore b/multiterm/.gitignore deleted file mode 100644 index 539ce1bae..000000000 --- a/multiterm/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*_vala.stamp -/src/*.[ch] diff --git a/multiterm/AUTHORS b/multiterm/AUTHORS deleted file mode 100644 index b32f2df4b..000000000 --- a/multiterm/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Matthew Brush diff --git a/multiterm/COPYING b/multiterm/COPYING deleted file mode 100644 index d159169d1..000000000 --- a/multiterm/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, 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 Lesser 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. - - - Copyright (C) - - 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. - -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. - - , 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 Lesser General -Public License instead of this License. diff --git a/multiterm/ChangeLog b/multiterm/ChangeLog deleted file mode 100644 index e69de29bb..000000000 diff --git a/multiterm/Makefile.am b/multiterm/Makefile.am deleted file mode 100644 index 270963761..000000000 --- a/multiterm/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -include $(top_srcdir)/build/vars.auxfiles.mk - -AUXFILES = TODO - -SUBDIRS = src -plugin = multiterm diff --git a/multiterm/NEWS b/multiterm/NEWS deleted file mode 100644 index db18af68e..000000000 --- a/multiterm/NEWS +++ /dev/null @@ -1 +0,0 @@ -Nothing noteworthy yet diff --git a/multiterm/README b/multiterm/README deleted file mode 100644 index 0cabca939..000000000 --- a/multiterm/README +++ /dev/null @@ -1,78 +0,0 @@ -========= -MultiTerm -========= - - -.. contents:: - - -About -===== - -MultiTerm is similar to Geany's built-in VTE terminal except that it -supports multiple terminals in tabs and supports different shells in -each of the terminal tabs. - - -Requirements -============ - -MultiTerm depends on the very common VTE library (libvte). In order -to compile the MultiTerm plugin you will need the development files for -the VTE library. - -MultiTerm is written in Vala and so requires that you have the Vala -compiler (valac) installed as well as your existing C compiler. - - -Installation -============ - -For detailed instructions, see the INSTALL file of the Geany-Plugins package -this plugin is part of. - - -Usage -===== - -While the user-interface of the plugin will soon be completely revamped, -at present it adds a new tab to the message area which contains the -notebook for the Terminals. You can add terminals by clicking on the -plus button to the right of the tabs and you can close terminals by -clicking the tab's close button. - -The configuration file is also going to change a fair bit soon, but -it is stored at `~/.config/geany/plugins/multiterm/multiterm.conf` and -can be tweaked to change the behaviour of the plugin. Eventually there -will be a GUI to control the preferences, but for now it's just this -file. - -Note that until at least the first release of the MultiTerm plugin the -configuration file will not be backwards-compatible, so you should -transfer your settings to a new default configuration file whenever -rebuilding from source. Moving the old config file out of the way will -cause a new default config file to be written in its place. - - -License -======= - -MultiTerm 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. You should have received a copy -of the GNU General Public License along with MultiTerm. If not, see -. - - -Contact -======= - -You can email me at , and I may also be on the -#geany channel on FreeNode, under the `codebrainz` nickname. - - -Bug reports and feature requests --------------------------------- - -To report a bug or ask for a new feature, please use the Geany-Plugins tracker -on GitHub: https://github.com/geany/geany-plugins/issues diff --git a/multiterm/TODO b/multiterm/TODO deleted file mode 100644 index 680944007..000000000 --- a/multiterm/TODO +++ /dev/null @@ -1,10 +0,0 @@ -TODO: ------ - - - Finish right-click menu to VTE - - Add GUI for preferences - - Add a terminal-specific right-click menu to each tab - - Support sending editor selection to active (or specific) terminal - - Get plugin building with Waf build system - - Fix next/previous tab menu items to work correctly - - Lots of other stuff diff --git a/multiterm/src/Makefile.am b/multiterm/src/Makefile.am deleted file mode 100644 index 400e662df..000000000 --- a/multiterm/src/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -include $(top_srcdir)/build/vars.build.mk -include $(top_srcdir)/build/vars.docs.mk - -plugin = multiterm - -geanyplugins_LTLIBRARIES = multiterm.la - -multiterm_la_VALAFLAGS = \ - --vapidir $(abs_top_srcdir)/multiterm/src/vapi \ - --pkg gtk+-2.0 \ - --pkg geany \ - --pkg vte \ - --header multiterm.h \ - --use-header - -multiterm_la_SOURCES = \ - config.vala \ - context-menu.vala \ - defconf.vala \ - notebook.vala \ - plugin.vala \ - shell-config.vala \ - tab-label.vala \ - terminal.vala - -multiterm_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"MultiTerm\" -multiterm_la_CFLAGS = \ - -DGETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \ - $(AM_CFLAGS) \ - $(MULTITERM_CFLAGS) - -multiterm_la_LIBADD = \ - $(COMMONLIBS) \ - $(MULTITERM_LIBS) diff --git a/multiterm/src/config.vala b/multiterm/src/config.vala deleted file mode 100644 index 91fdd30de..000000000 --- a/multiterm/src/config.vala +++ /dev/null @@ -1,139 +0,0 @@ -/* - * config.vala - This file is part of the Geany MultiTerm plugin - * - * Copyright (c) 2012 Matthew Brush . - * - * 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. - */ - -namespace MultiTerm -{ - - public class Config - { - internal KeyFile kf; - private string _filename; - private List _shell_configs = new List(); - - public Config(string filename) - { - _filename = filename; - reload(); - } - - public bool store() - { - string data = kf.to_data(); - try - { - FileUtils.set_contents(_filename, data); - return false; - } - catch (FileError err) - { - warning(_("Unable to save config file %s: %s"), _filename, err.message); - return true; - } - } - - public void store_eventually() - { - Idle.add(() => store()); - } - - public void reload() - { - try - { - kf = new KeyFile(); - - /* Delete the old keys and groups */ - foreach (string group in kf.get_groups()) - { - foreach (string key in kf.get_keys(group)) - kf.remove_key(group, key); - kf.remove_group(group); - } - - /* Load from file again */ - kf.load_from_file(_filename, - KeyFileFlags.KEEP_COMMENTS | KeyFileFlags.KEEP_TRANSLATIONS); - - /* Reload shell configurations */ - _shell_configs = new List(); - foreach (string section in kf.get_groups()) - { - if (section.has_prefix("shell=")) - _shell_configs.append(new ShellConfig(this, section)); - } - } - catch (KeyFileError err) - { - warning(_("Unable to load config file %s: %s"), _filename, err.message); - } - catch (FileError err) - { - warning(_("Unable to load config file %s: %s"), _filename, err.message); - } - } - - public string filename { get { return _filename; } } - - public bool show_tabs - { - get - { - try { return kf.get_boolean("general", "show_tabs"); } - catch (KeyFileError err) { return true; } - } - set - { - kf.set_boolean("general", "show_tabs", value); - store_eventually(); - } - } - - public string external_terminal - { - owned get - { - try { return kf.get_string("general", "external_terminal"); } - catch (KeyFileError err) { return "xterm"; } - } - set - { - kf.set_string("general", "external_terminal", value); - store_eventually(); - } - } - - public string location - { - owned get - { - try { return kf.get_string("general", "location"); } - catch (KeyFileError err) { return "msgwin"; } - } - set - { - kf.set_string("general", "location", value); - store_eventually(); - } - } - - public List shell_configs { get { return _shell_configs; } } - } -} diff --git a/multiterm/src/context-menu.vala b/multiterm/src/context-menu.vala deleted file mode 100644 index 3937186e1..000000000 --- a/multiterm/src/context-menu.vala +++ /dev/null @@ -1,155 +0,0 @@ -/* - * context-menu.vala - This file is part of the Geany MultiTerm plugin - * - * Copyright (c) 2012 Matthew Brush . - * - * 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. - */ - -using Gtk; - -namespace MultiTerm -{ - public class ContextMenu : Gtk.Menu - { - public signal void new_shell_activate(ShellConfig sh); - public signal void new_window_activate(); - public signal void copy_activate(); - public signal void paste_activate(); - public signal void show_tabs_activate(bool show_tabs); - public signal void preferences_activate(); - public signal bool next_tab_activate(); - public signal bool previous_tab_activate(); - public signal void move_to_location_activate(string location); - - private void on_show_tabs_activate(CheckMenuItem item) - { - show_tabs_activate(item.active); - } - - private void on_next_previous_tab_activate(Gtk.MenuItem item, bool next) - { - item.sensitive = next ? next_tab_activate() : previous_tab_activate(); - } - - private void on_move_to_location(Gtk.MenuItem item) - { - if (item.get_data("location_is_msgwin")) - { - item.set_label(_("Move to message window")); - item.set_data("location_is_msgwin", false); - move_to_location_activate("sidebar"); - } - else - { - item.set_label(_("Move to sidebar")); - item.set_data("location_is_msgwin", true); - move_to_location_activate("msgwin"); - } - } - - private void add_separator() - { - SeparatorMenuItem item = new SeparatorMenuItem(); - this.append(item); - item.show(); - } - - public ContextMenu(Config? cfg) - { - Gtk.Menu menu; - Gtk.MenuItem item; - ImageMenuItem image_item; - CheckMenuItem check_item; - - menu = new Gtk.Menu(); - menu.show(); - - item = new Gtk.MenuItem.with_label(_("Open Tab")); - item.set_submenu(menu); - item.show(); - this.append(item); - - uint len = cfg.shell_configs.length(); - for (uint i = 0; i < len; i++) - { - ShellConfig sh = cfg.shell_configs.nth_data(i); - item = new Gtk.MenuItem.with_label(sh.name); - item.activate.connect(() => new_shell_activate(sh)); - menu.append(item); - item.show(); - } - - item = new Gtk.MenuItem.with_label(_("Open Window")); - item.activate.connect(() => new_window_activate()); - this.append(item); - item.show(); - - add_separator(); - - item = new Gtk.MenuItem.with_label(_("Next tab")); - item.activate.connect(() => on_next_previous_tab_activate(item, true)); - //this.append(item); - //item.show(); - - item = new Gtk.MenuItem.with_label(_("Previous tab")); - item.activate.connect(() => on_next_previous_tab_activate(item, false)); - //this.append(item); - //item.show(); - - //add_separator(); - - image_item = new ImageMenuItem.from_stock(Gtk.Stock.COPY, null); - image_item.activate.connect(() => copy_activate()); - //this.append(image_item); - //image_item.show(); - - image_item = new ImageMenuItem.from_stock(Gtk.Stock.PASTE, null); - image_item.activate.connect(() => paste_activate()); - //this.append(image_item); - //image_item.show(); - - //add_separator(); - - check_item = new CheckMenuItem.with_label(_("Show Tabs")); - check_item.active = cfg.show_tabs; - check_item.activate.connect(() => on_show_tabs_activate(check_item)); - this.append(check_item); - check_item.show(); - - if (cfg.location == "msgwin") - { - item = new Gtk.MenuItem.with_label(_("Move to sidebar")); - item.set_data("location_is_msgwin", true); - } - else - { - item = new Gtk.MenuItem.with_label(_("Move to message window")); - item.set_data("location_is_msgwin", false); - } - item.activate.connect(() => on_move_to_location(item)); - this.append(item); - item.show(); - - //add_separator(); - - image_item = new ImageMenuItem.from_stock(Gtk.Stock.PREFERENCES, null); - image_item.activate.connect(() => preferences_activate()); - //this.append(image_item); - //image_item.show(); - } - } -} diff --git a/multiterm/src/defconf.vala b/multiterm/src/defconf.vala deleted file mode 100644 index 47baf0051..000000000 --- a/multiterm/src/defconf.vala +++ /dev/null @@ -1,173 +0,0 @@ -/* - * defconf.vala - This file is part of the Geany MultiTerm plugin - * - * Copyright (c) 2012 Matthew Brush . - * - * 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 the default configuration which will be written - * to the user's config dir if it doesn't exist. - * - * Try to make all defaults apply from here rather than hardcoded in - * other source files. - */ - -namespace MultiTerm -{ - public const string default_config = -"""######################################################################## -# MultiTerm Configuration File # -#======================================================================# -# # -# You can configure the behaviour of the MultiTerm plugin by adjusting # -# the values in this file. Lines beginning with a # are considered # -# comments and are left as is. Group/section names go in [] and keys # -# and values are separated by an = symbol. Where more than one value # -# can be supplied, as in a list, separate the values with the ; symbol.# -# # -# Groups/section names beginning with 'shell=' denote a type of # -# terminal/shell that can be opened. The name of the shell follows # -# the = symbol. Each shell can have it's own specific VTE # -# configuration and can run it's own child command. As an example, if # -# you wanted to use the Python interpreter shell instead of the # -# default shell, specify 'command=python'. # -# # -# Keys/values commented out or empty values will cause MultiTerm to # -# use default values. # -# # -######################################################################## - -#======================================================================= -# General Settings -#======================================================================= -[general] - -# Where to put the multiterm notebook in the Geany user interface -# one of: sidebar, msgwin -location=msgwin - -# Make tabs take up as much space as is available -full_width_tabs=true - -# Allow reordering of tabs -reorderable_tabs=true - -# When there is only one tab left in the notebook, hide the tabs area -hide_tabs_on_last=true - -# When launching an external terminal from the MultiTerm context menu, -# use this terminal. Good choices include xterm, gnome-terminal, -# xfce4-terminal or konsole. -external_terminal=xterm - -# Save which shells were open when Geany closes and restore their -# tabs when it restarts. -save_tabs=false - -# Whether to show tabs or not -show_tabs=true - -bg_color=#ffffff -fg_color=#000000 -font=Monospace 9 - - -#======================================================================= -# Default Shell -#======================================================================= -[shell=default] - -# This will be the tabs default tab label and won't change unless -# track_title is set to true. -name=Default Shell - -# This is the command to fork in the VTE, leave blank for default shell -command= - -# Make the tab's label track the VTE title -track_title=true - -# Background color, foreground color and font for the VTE -bg_color=#ffffff -fg_color=#000000 -font=Monospace 9 - -# Whether to allow bold fonts in the VTE -#allow_bold=true - -# Whether to beep when the child outputs a bell sequence. -#audible_bell=true - -# Controls whether the cursor blinks or not, one of: -# system (or blank), on, off -#cursor_blink_mode=system - -# Controls the shape of the VTE cursor, one of: -# block, ibeam, underline -#cursor_shape=block - -# Controls how erasing characters is handled, one of: -# auto, ascii_backspace, ascii_delete, delete_sequence, tty -#backspace_binding=auto - -# Whether to hide the mouse pointer on key press if it's in the -# terminal window -#pointer_autohide=false - -# Scroll to the prompt at the bottom of the scrollback buffer on key -# press -#scroll_on_keystroke=true - -# Scroll to the bottom of the scrollback buffer when the child sends -# output -#scroll_on_output=false - -# The number of lines to keep in the scrollback buffer -#scrollback_lines=512 - -# Whether the terminal will present a visible bell when the child -# sends a bell sequence. The terminal will clear itself to the -# default foreground color and then repaint itself. -#visible_bell=false - -# When the user double-clicks to start selection, the terminal will -# extend the selection on word boundaries. It will treat characters -# the word-chars characters as parts of words, and all other -# characters as word separators. Ranges of characters can be -# specified by separating them with a hyphen. -word_chars=-A-Za-z0-9,./\\?%&#:_ - - -#======================================================================= -# Other Shells -#======================================================================= - -# You can define additional shells just like the default shell but -# using other commands and/or settings. - -#[shell=python] -#name=Python Shell -#command=python -#track_title=false - -#[shell=irb] -#name=Ruby Shell -#command=irb -#track_title=false -"""; -} diff --git a/multiterm/src/notebook.vala b/multiterm/src/notebook.vala deleted file mode 100644 index daf90abb5..000000000 --- a/multiterm/src/notebook.vala +++ /dev/null @@ -1,221 +0,0 @@ -/* - * notebook.vala - This file is part of the Geany MultiTerm plugin - * - * Copyright (c) 2012 Matthew Brush . - * - * 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. - */ - -using Gtk; -using Gdk; -using Pango; -using Vte; - -namespace MultiTerm -{ - public class Notebook : Gtk.Notebook - { - private Button add_button; - public Config cfg; - private ContextMenu? context_menu; - - private void on_tab_label_close_clicked(int tab_num) - { - if (this.get_n_pages() > 1) - this.remove_terminal(tab_num); - } - - private void on_show_tabs_activate(bool show_tabs) - { - this.show_tabs = show_tabs; - cfg.show_tabs = show_tabs; - } - - private bool on_next_tab_activate() - { - int n_tabs = this.get_n_pages(); - int current = this.get_current_page(); - - if (current < (n_tabs - 1)) - { - current++; - this.set_current_page(current); - } - - return (current < (n_tabs - 1)) ? true : false; - } - - private bool on_previous_tab_activate() - { - int current = this.get_current_page(); - - if (current > 0) - { - current--; - this.set_current_page(current); - } - - return (current > 0) ? true : false; - } - - private void on_new_shell_activate(ShellConfig cfg) - { - add_terminal(cfg); - } - - private void on_new_window_activate() - { - Pid pid; - string[] args = { cfg.external_terminal, null }; - - try - { - if (Process.spawn_async(null, args, null, SpawnFlags.SEARCH_PATH, null, out pid)) - debug("Started external terminal '%s' with pid of '%d'", args[0], pid); - } - catch (SpawnError err) - { - warning(_("Unable to launch external terminal: %s").printf(err.message)); - } - } - - private void on_move_to_location(string location) - { - Container frame = this.get_parent() as Container; - Container parent = frame.get_parent() as Container; - Gtk.Notebook new_nb; - - parent.remove(frame); - - if (location == "msgwin") - { - new_nb = this.get_data("msgwin_notebook"); - new_nb.append_page(frame, this.get_data