├── src ├── terminal-marshal.list ├── skey │ ├── btoe.h │ ├── skeyutil.h │ ├── md5.h │ ├── sha1.h │ ├── skey.h │ ├── skeyutil.c │ ├── md4.h │ ├── skey.c │ ├── Makefile.am │ ├── md5.c │ ├── sha1.c │ ├── test.c │ └── md4.c ├── terminal-type-builtins.h.template ├── terminal-intl.h ├── terminal-type-builtins.c.template ├── terminal-accels.h ├── skey-popup.h ├── profile-editor.h ├── eggshell.h ├── eggsmclient-private.h ├── terminal-version.h.in ├── terminal-debug.c ├── terminal.gresource.xml ├── terminal.about ├── terminal-search-dialog.h ├── terminal-encoding.h ├── terminal-tabs-menu.h ├── terminal-tab-label.h ├── terminal-debug.h ├── terminal-info-bar.h ├── terminal-close-button.h ├── terminal-close-button.c ├── eggshell.c ├── terminal-screen-container.h ├── extra-strings.c ├── terminal-info-bar.c ├── terminal-options.h ├── terminal-util.h ├── terminal.xml ├── terminal-window.h ├── eggsmclient.h ├── Makefile.am ├── skey-popup.c ├── terminal-screen.h ├── eggdesktopfile.h ├── terminal-app.h ├── keybinding-editor.ui ├── terminal-profile.h ├── skey-challenge.ui └── terminal-tab-label.c ├── ChangeLog ├── help ├── C │ ├── figures │ │ ├── mate-terminal-default.png │ │ └── mate-terminal-tabbed.png │ └── legal.xml ├── bg │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── ca │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── cs │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── de │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── el │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── es │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── fr │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── it │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── ja │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── ko │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── ro │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── sv │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── uk │ └── figures │ │ ├── mate-terminal-tabbed.png │ │ └── mate-terminal-default.png ├── pt_BR │ └── figures │ │ ├── mate-terminal-default.png │ │ └── mate-terminal-tabbed.png ├── zh_TW │ └── figures │ │ ├── mate-terminal-default.png │ │ └── mate-terminal-tabbed.png ├── mate-terminal.omf.in └── Makefile.am ├── AUTHORS ├── makepot ├── .github ├── issue_template.md └── FUNDING.yml ├── po ├── POTFILES.skip ├── POTFILES.in ├── LINGUAS └── Makevars ├── .tx └── config ├── autogen.sh ├── mate-terminal.desktop.in.in ├── README ├── mate-terminal.appdata.xml.in ├── Makefile.am ├── mate-terminal.wrapper ├── .travis.yml ├── update-authors.pl ├── configure.ac ├── mate-terminal.1 ├── .build.yml └── NEWS /src/terminal-marshal.list: -------------------------------------------------------------------------------- 1 | BOOLEAN:STRING,INT,UINT 2 | -------------------------------------------------------------------------------- /src/skey/btoe.h: -------------------------------------------------------------------------------- 1 | char *btoe(unsigned char *md); 2 | 3 | -------------------------------------------------------------------------------- /src/skey/skeyutil.h: -------------------------------------------------------------------------------- 1 | void skey_sevenbit(char *s); 2 | void skey_lowcase(char *s); 3 | 4 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | The ChangeLog is auto-generated when releasing. If you are seeing this, use 2 | 'git log' for a detailed list of changes. 3 | -------------------------------------------------------------------------------- /help/C/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/C/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/C/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/C/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/bg/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/bg/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/ca/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/ca/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/cs/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/cs/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/de/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/de/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/el/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/el/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/es/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/es/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/fr/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/fr/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/it/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/it/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/ja/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/ja/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/ko/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/ko/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/ro/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/ro/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/sv/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/sv/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/uk/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/uk/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/bg/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/bg/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/ca/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/ca/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/cs/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/cs/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/de/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/de/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/el/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/el/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/es/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/es/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/fr/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/fr/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/it/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/it/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/ja/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/ja/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/ko/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/ko/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/ro/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/ro/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/sv/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/sv/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/uk/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/uk/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/pt_BR/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/pt_BR/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/pt_BR/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/pt_BR/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /help/zh_TW/figures/mate-terminal-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/zh_TW/figures/mate-terminal-default.png -------------------------------------------------------------------------------- /help/zh_TW/figures/mate-terminal-tabbed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/norbusan/mate-terminal/HEAD/help/zh_TW/figures/mate-terminal-tabbed.png -------------------------------------------------------------------------------- /src/skey/md5.h: -------------------------------------------------------------------------------- 1 | #ifndef MD5_H 2 | #define MD5_H 3 | 4 | #include 5 | 6 | int MD5Keycrunch(char *result, const char *seed, const char *passhrase); 7 | void MD5SKey(char *x); 8 | 9 | #endif /* !MD5_H */ 10 | -------------------------------------------------------------------------------- /src/skey/sha1.h: -------------------------------------------------------------------------------- 1 | #ifndef _SHA1_H 2 | #define _SHA1_H 3 | 4 | #include 5 | 6 | int SHA1Keycrunch(char *result, const char *seed, const char *passphrase); 7 | void SHA1SKey(char *x); 8 | 9 | #endif /* _SHA1_H */ 10 | -------------------------------------------------------------------------------- /src/skey/skey.h: -------------------------------------------------------------------------------- 1 | typedef enum 2 | { 3 | MD4, 4 | MD5, 5 | SHA1 6 | } SKeyAlgorithm; 7 | 8 | #define SKEY_SIZE 8 9 | 10 | char *skey(SKeyAlgorithm algorithm, int seq, const char *seed, const char *passhrase); 11 | 12 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Guilherme de S. Pastore 2 | Havoc Pennington 3 | Mariano Suárez-Alvarez 4 | Perberos 5 | Steve Zesch 6 | Stefano Karapetsas 7 | -------------------------------------------------------------------------------- /makepot: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | PACKAGE=mate-terminal; 4 | 5 | # normal translations for the package 6 | make -C po $PACKAGE.pot && mv po/$PACKAGE.pot . 7 | sed -i "/#, fuzzy/d" $PACKAGE.pot 8 | 9 | # translations for user-quide 10 | rm -f help/$PACKAGE.pot && 11 | make -C help $PACKAGE.pot 12 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | #### Expected behaviour 2 | 3 | 4 | #### Actual behaviour 5 | 6 | 7 | #### Steps to reproduce the behaviour 8 | 9 | 10 | #### MATE general version 11 | 12 | 13 | #### Package version 14 | 15 | 16 | #### Linux Distribution 17 | 18 | 19 | #### Link to downstream report of your Distribution 20 | -------------------------------------------------------------------------------- /help/mate-terminal.omf.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | user's guide 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | # List of source files that should *not* be translated. 2 | # Please keep this file sorted alphabetically. 3 | mate-terminal.desktop.in 4 | src/eggdesktopfile.c 5 | src/encodings-dialog.ui 6 | src/find-dialog.ui 7 | src/keybinding-editor.ui 8 | src/profile-manager.ui 9 | src/profile-new-dialog.ui 10 | src/profile-preferences.ui 11 | src/skey-challenge.ui 12 | src/terminal-find.ui 13 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | 4 | [MATE.master--mate-terminal] 5 | file_filter = po/.po 6 | source_file = mate-terminal.pot 7 | source_lang = en 8 | type = PO 9 | minimum_perc = 2 10 | 11 | [MATE.master--mate-terminal-user-guide] 12 | file_filter = help//.po 13 | source_file = help/mate-terminal.pot 14 | source_lang = en 15 | type = PO 16 | minimum_perc = 2 17 | -------------------------------------------------------------------------------- /src/skey/skeyutil.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include "skeyutil.h" 8 | 9 | void skey_sevenbit(char *s) 10 | { 11 | char *p; 12 | 13 | for (p = s; *p; p++) 14 | *p &= 0x7f; 15 | } 16 | 17 | void skey_lowcase(char *s) 18 | { 19 | char *p; 20 | 21 | for (p = s; *p; p++) 22 | if (g_ascii_isupper(*p)) 23 | *p = g_ascii_tolower(*p); 24 | } 25 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | custom: https://mate-desktop.org/donate/ 10 | -------------------------------------------------------------------------------- /src/skey/md4.h: -------------------------------------------------------------------------------- 1 | #ifndef MD4_H 2 | #define MD4_H 3 | 4 | #include 5 | 6 | typedef struct 7 | { 8 | guint32 buf[4]; 9 | guint32 bits[2]; 10 | unsigned char in[64]; 11 | } MD4_CTX; 12 | 13 | void MD4Transform(guint32 buf[4], guint32 const in[16]); 14 | void MD4Init(MD4_CTX *context); 15 | void MD4Update(MD4_CTX *context, unsigned char const *buf, unsigned len); 16 | void MD4Final(unsigned char *digest, MD4_CTX *context); 17 | int MD4Keycrunch(char *result, const char *seed, const char *passphrase); 18 | void MD4SKey(char *x); 19 | 20 | #endif /* !MD4_H */ 21 | -------------------------------------------------------------------------------- /help/Makefile.am: -------------------------------------------------------------------------------- 1 | @YELP_HELP_RULES@ 2 | 3 | HELP_ID = mate-terminal 4 | HELP_FILES = index.docbook legal.xml 5 | HELP_MEDIA = figures/mate-terminal-default.png \ 6 | figures/mate-terminal-tabbed.png 7 | # figures/terminal-window.png This image is not used. 8 | 9 | # Add linguas to be ignored, e.g. IGNORE_HELP_LINGUAS = ca de es fr 10 | IGNORE_HELP_LINGUAS = 11 | HELP_LINGUAS = $(if $(IGNORE_HELP_LINGUAS), \ 12 | $(filter-out $(IGNORE_HELP_LINGUAS),$(subst /,,$(dir $(wildcard */*.po)))), \ 13 | $(subst /,,$(dir $(wildcard */*.po))) ) 14 | 15 | -include $(top_srcdir)/git.mk 16 | -------------------------------------------------------------------------------- /src/terminal-type-builtins.h.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #ifndef TERMINAL_TYPE_BUILTINS_H 3 | #define TERMINAL_TYPE_BUILTINS_H 4 | 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | /*** END file-header ***/ 9 | 10 | /*** BEGIN file-production ***/ 11 | 12 | /* enumerations from "@filename@" */ 13 | /*** END file-production ***/ 14 | 15 | /*** BEGIN value-header ***/ 16 | GType @enum_name@_get_type (void); 17 | #define TERMINAL_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) 18 | /*** END value-header ***/ 19 | 20 | /*** BEGIN file-tail ***/ 21 | 22 | G_END_DECLS 23 | 24 | #endif /* !TERMINAL_TYPE_BUILTINS_H */ 25 | /*** END file-tail ***/ 26 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | 4 | srcdir=`dirname $0` 5 | test -z "$srcdir" && srcdir=. 6 | 7 | PKG_NAME="mate-terminal" 8 | 9 | (test -f $srcdir/configure.ac) || { 10 | echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" 11 | echo " top-level $PKG_NAME directory" 12 | exit 1 13 | } 14 | 15 | which mate-autogen || { 16 | echo "You need to install mate-common" 17 | exit 1 18 | } 19 | 20 | which yelp-build || { 21 | echo "You need to install yelp-tools" 22 | exit 1 23 | } 24 | 25 | REQUIRED_AUTOMAKE_VERSION=1.9 26 | MATE_DATADIR="$mate_datadir" 27 | USE_COMMON_DOC_BUILD=yes 28 | 29 | . mate-autogen 30 | 31 | -------------------------------------------------------------------------------- /mate-terminal.desktop.in.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=MATE Terminal 3 | GenericName=Terminal 4 | Comment=Use the command line 5 | TryExec=mate-terminal 6 | Exec=mate-terminal 7 | # Translators: Do NOT translate or transliterate this text (this is an icon file name)! 8 | Icon=utilities-terminal 9 | Type=Application 10 | X-MATE-DocPath=mate-terminal/index.html 11 | X-MATE-Bugzilla-Bugzilla=MATE 12 | X-MATE-Bugzilla-Product=mate-terminal 13 | X-MATE-Bugzilla-Component=BugBuddyBugs 14 | X-MATE-Bugzilla-Version=@VERSION@ 15 | # Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! 16 | Categories=System;GTK;Utility;TerminalEmulator; 17 | StartupNotify=true 18 | 19 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | 2 | This is the MATE terminal emulator application. mate-terminal is 3 | only the shell (menubar, prefs dialog); the terminal emulation ("stuff 4 | in the middle") comes from the VTE widget. Remember this when you 5 | report a bug. ;-) 6 | 7 | MATE terminal is a fork of GNOME terminal. 8 | 9 | How it works 10 | === 11 | 12 | Profiles - 13 | all settings are stored in profiles. prefs dialog edits the current 14 | profile 15 | 16 | Session - 17 | just the number of open windows/tabs and their profile is stored 18 | per-session 19 | 20 | Command line options - 21 | do not overlap things that are preferences 22 | 23 | 24 | == Install == 25 | 26 | Example: 27 | ./autogen.sh --prefix=/usr --sysconfdir=/etc \ 28 | --disable-static --localstatedir=/var --with-gnu-ld 29 | make 30 | sudo make install 31 | 32 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Please keep this file sorted alphabetically. 3 | mate-terminal.appdata.xml.in 4 | mate-terminal.desktop.in.in 5 | src/eggsmclient.c 6 | src/org.mate.terminal.gschema.xml.in 7 | src/profile-editor.c 8 | src/encodings-dialog.ui 9 | src/find-dialog.ui 10 | src/keybinding-editor.ui 11 | src/profile-manager.ui 12 | src/profile-new-dialog.ui 13 | src/profile-preferences.ui 14 | src/skey-challenge.ui 15 | src/skey-popup.c 16 | src/terminal-accels.c 17 | src/terminal-app.c 18 | src/terminal.c 19 | src/terminal-encoding.c 20 | src/terminal-options.c 21 | src/terminal-profile.c 22 | src/terminal-screen.c 23 | src/terminal-search-dialog.c 24 | src/terminal-tab-label.c 25 | src/terminal-tabs-menu.c 26 | src/terminal-util.c 27 | src/terminal-window.c 28 | src/extra-strings.c 29 | -------------------------------------------------------------------------------- /src/skey/skey.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "md4.h" 9 | #include "md5.h" 10 | #include "sha1.h" 11 | #include "skey.h" 12 | #include "btoe.h" 13 | 14 | struct skey_hash 15 | { 16 | int (*Keycrunch) (char *, const char *, const char *); 17 | void (*Skey) (char *); 18 | }; 19 | static struct skey_hash hash_table[] = 20 | { 21 | { MD4Keycrunch, MD4SKey }, 22 | { MD5Keycrunch, MD5SKey }, 23 | { SHA1Keycrunch, SHA1SKey } 24 | }; 25 | 26 | 27 | char *skey(SKeyAlgorithm algorithm, int seq, const char *seed, const char *passphrase) 28 | { 29 | char key[SKEY_SIZE]; 30 | int i; 31 | g_assert (algorithm < G_N_ELEMENTS (hash_table)); 32 | if (hash_table[algorithm].Keycrunch(key, seed, passphrase) == -1) 33 | return NULL; 34 | 35 | for (i = 0; i < seq; i++) 36 | hash_table[algorithm].Skey(key); 37 | 38 | return strdup(btoe((unsigned char *)key)); 39 | } 40 | -------------------------------------------------------------------------------- /src/skey/Makefile.am: -------------------------------------------------------------------------------- 1 | NULL = 2 | 3 | noinst_LTLIBRARIES = libskey.la 4 | 5 | libskey_la_SOURCES = \ 6 | btoe.c \ 7 | btoe.h \ 8 | skey.h \ 9 | skey.c \ 10 | skeyutil.h\ 11 | skeyutil.c\ 12 | md4.c \ 13 | md4.h \ 14 | md5.c \ 15 | md5.h \ 16 | sha1.h \ 17 | sha1.c \ 18 | $(NULL) 19 | 20 | libskey_la_CPPFLAGS = \ 21 | -I$(srcdir)/.. \ 22 | -DG_DISABLE_SINGLE_INCLUDES \ 23 | $(DISABLE_DEPRECATED) \ 24 | $(AM_CPPFLAGS) 25 | 26 | libskey_la_CFLAGS = \ 27 | $(TERM_CFLAGS) \ 28 | $(WARN_CFLAGS) \ 29 | $(AM_CFLASG) 30 | 31 | libskey_la_LDFLAGS = 32 | 33 | libskey_la_LIBADD = \ 34 | $(TERM_LIBS) 35 | 36 | check_PROGRAMS = testskey 37 | 38 | testskey_SOURCES = \ 39 | test.c \ 40 | $(NULL) 41 | 42 | testskey_CPPFLAGS = \ 43 | -I$(srcdir)/.. \ 44 | $(DISABLE_DEPRECATED) \ 45 | $(AM_CPPFLAGS) 46 | 47 | testskey_CFLAGS = \ 48 | $(TERM_CFLAGS) \ 49 | $(WARN_CFLAGS) \ 50 | $(AM_CFLAGS) 51 | 52 | testskey_LDFLAGS = 53 | 54 | testskey_LDADD = \ 55 | libskey.la \ 56 | $(TERM_LIBS) 57 | 58 | TESTS = testskey 59 | 60 | -include $(top_srcdir)/git.mk 61 | -------------------------------------------------------------------------------- /src/terminal-intl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2002 Havoc Pennington 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef TERMINAL_INTL_H 21 | #define TERMINAL_INTL_H 22 | 23 | #include 24 | 25 | #define I_(string) g_intern_static_string (string) 26 | 27 | #endif /* TERMINAL_INTL_H */ 28 | -------------------------------------------------------------------------------- /src/terminal-type-builtins.c.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #include 3 | 4 | #include "terminal-type-builtins.h" 5 | 6 | /*** END file-header ***/ 7 | 8 | /*** BEGIN file-production ***/ 9 | /* enumerations from "@filename@" */ 10 | 11 | #include "@filename@" 12 | 13 | /*** END file-production ***/ 14 | 15 | /*** BEGIN value-header ***/ 16 | GType 17 | @enum_name@_get_type (void) 18 | { 19 | static volatile gsize g_define_type_id__volatile = 0; 20 | 21 | if (g_once_init_enter (&g_define_type_id__volatile)) { 22 | static const G@Type@Value values[] = { 23 | /*** END value-header ***/ 24 | 25 | /*** BEGIN value-production ***/ 26 | { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, 27 | /*** END value-production ***/ 28 | 29 | /*** BEGIN value-tail ***/ 30 | { 0, NULL, NULL } 31 | }; 32 | GType g_define_type_id = \ 33 | g_@type@_register_static (/* g_intern_static_string */ ("@EnumName@"), values); 34 | 35 | g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); 36 | } 37 | 38 | return g_define_type_id__volatile; 39 | } 40 | 41 | /*** END value-tail ***/ 42 | 43 | /*** BEGIN file-tail ***/ 44 | 45 | /*** END file-tail ***/ 46 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # please keep this list sorted alphabetically 2 | # 3 | af 4 | crh 5 | es_AR 6 | es_CL 7 | es_ES 8 | es_PR 9 | fy 10 | ha 11 | ia 12 | ig 13 | ks 14 | li 15 | mi 16 | nqo 17 | nso 18 | sc 19 | tk 20 | tt 21 | yi 22 | yo 23 | zu 24 | am 25 | ar 26 | as 27 | ast 28 | az 29 | be 30 | bg 31 | bn 32 | bn_IN 33 | br 34 | bs 35 | ca 36 | ca@valencia 37 | cmn 38 | cs 39 | cy 40 | da 41 | de 42 | dz 43 | el 44 | en_AU 45 | en_CA 46 | en_GB 47 | eo 48 | es 49 | es_CO 50 | es_MX 51 | et 52 | eu 53 | fa 54 | fi 55 | fr 56 | fr_CA 57 | frp 58 | fur 59 | ga 60 | gl 61 | gu 62 | he 63 | hi 64 | hr 65 | hu 66 | hy 67 | id 68 | ie 69 | is 70 | it 71 | ja 72 | jv 73 | ka 74 | kk 75 | kn 76 | ko 77 | ku 78 | ku_IQ 79 | ky 80 | la 81 | lt 82 | lv 83 | mai 84 | mg 85 | mk 86 | ml 87 | mn 88 | mr 89 | ms 90 | nb 91 | nds 92 | ne 93 | nl 94 | nn 95 | oc 96 | or 97 | pa 98 | pl 99 | pms 100 | ps 101 | pt 102 | pt_BR 103 | ro 104 | ru 105 | rw 106 | si 107 | sk 108 | sl 109 | sq 110 | sr 111 | sr@latin 112 | sv 113 | ta 114 | te 115 | th 116 | tr 117 | ug 118 | uk 119 | ur 120 | uz 121 | vi 122 | wa 123 | xh 124 | zh_CN 125 | zh_HK 126 | zh_TW 127 | -------------------------------------------------------------------------------- /src/terminal-accels.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001 Havoc Pennington 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef TERMINAL_ACCELS_H 21 | #define TERMINAL_ACCELS_H 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | void terminal_accels_init (void); 28 | 29 | void terminal_accels_shutdown (void); 30 | 31 | void terminal_edit_keys_dialog_show (GtkWindow *transient_parent); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* TERMINAL_ACCELS_H */ 36 | -------------------------------------------------------------------------------- /src/skey-popup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2002 Jonathan Blandford 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef SKEY_POPUP_H 21 | #define SKEY_POPUP_H 22 | 23 | #include 24 | 25 | #include "terminal-screen.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | void terminal_skey_do_popup (GtkWindow *window, 30 | TerminalScreen *screen, 31 | const gchar *skey_match); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* SKEY_POPUP_H */ 36 | -------------------------------------------------------------------------------- /src/profile-editor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2002 Havoc Pennington 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef TERMINAL_PROFILE_EDITOR_H 21 | #define TERMINAL_PROFILE_EDITOR_H 22 | 23 | #include "terminal-profile.h" 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | void terminal_profile_edit (TerminalProfile *profile, 29 | GtkWindow *transient_parent, 30 | const char *widget_name); 31 | 32 | G_END_DECLS 33 | 34 | #endif /* TERMINAL_PROFILE_EDITOR_H */ 35 | -------------------------------------------------------------------------------- /src/eggshell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation 3 | * Copyright (C) 1999, 2000 Red Hat, Inc. 4 | * All rights reserved. 5 | * 6 | * This file is part of the Mate Library. 7 | * 8 | * The Mate Library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public License as 10 | * published by the Free Software Foundation; either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * The Mate Library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with the Mate Library; see the file COPYING.LIB. If not, 20 | * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | /* 24 | @NOTATION@ 25 | */ 26 | 27 | #ifndef __EGG_USER_SHELL_H__ 28 | #define __EGG_USER_SHELL_H__ 29 | 30 | #include 31 | #include 32 | 33 | G_BEGIN_DECLS 34 | 35 | /* Find the name of the user's shell. */ 36 | char *egg_shell (const char *shell); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/eggsmclient-private.h: -------------------------------------------------------------------------------- 1 | /* eggsmclient-private.h 2 | * Copyright (C) 2007 Novell, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef __EGG_SM_CLIENT_PRIVATE_H__ 21 | #define __EGG_SM_CLIENT_PRIVATE_H__ 22 | 23 | #include "eggsmclient.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | GKeyFile *egg_sm_client_save_state (EggSMClient *client); 28 | void egg_sm_client_quit_requested (EggSMClient *client); 29 | void egg_sm_client_quit_cancelled (EggSMClient *client); 30 | void egg_sm_client_quit (EggSMClient *client); 31 | 32 | GType egg_sm_client_xsmp_get_type (void); 33 | EggSMClient *egg_sm_client_xsmp_new (void); 34 | 35 | G_END_DECLS 36 | 37 | 38 | #endif /* __EGG_SM_CLIENT_PRIVATE_H__ */ 39 | -------------------------------------------------------------------------------- /src/terminal-version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Christian Persch 3 | * 4 | * This library is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU Lesser General Public License as published by the 6 | * Free Software Foundation; either version 2.1 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public License along 15 | * with this library; if not, write to the Free Software Foundation, Inc., 16 | * 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #if !defined (__TERMINAL_TERMINAL_H_INSIDE__) && !defined (TERMINAL_COMPILATION) 20 | #error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef TERMINAL_VERSION_H 24 | #define TERMINAL_VERSION_H 25 | 26 | #define TERMINAL_MAJOR_VERSION (@TERMINAL_MAJOR_VERSION@) 27 | #define TERMINAL_MINOR_VERSION (@TERMINAL_MINOR_VERSION@) 28 | #define TERMINAL_MICRO_VERSION (@TERMINAL_MICRO_VERSION@) 29 | 30 | #define TERMINAL_CHECK_VERSION(major,minor,micro) \ 31 | (TERMINAL_MAJOR_VERSION > (major) || \ 32 | (TERMINAL_MAJOR_VERSION == (major) && TERMINAL_MINOR_VERSION > (minor)) || \ 33 | (TERMINAL_MAJOR_VERSION == (major) && TERMINAL_MINOR_VERSION == (minor) && TERMINAL_MICRO_VERSION >= (micro))) 34 | 35 | #endif /* !TERMINAL_VERSION_H */ 36 | -------------------------------------------------------------------------------- /src/terminal-debug.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2002,2003 Red Hat, Inc. 3 | * 4 | * This is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU Library General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #include 20 | 21 | #include 22 | 23 | #include "terminal-debug.h" 24 | 25 | TerminalDebugFlags _terminal_debug_flags; 26 | 27 | void 28 | _terminal_debug_init(void) 29 | { 30 | #ifdef MATE_ENABLE_DEBUG 31 | const GDebugKey keys[] = 32 | { 33 | { "accels", TERMINAL_DEBUG_ACCELS }, 34 | { "encodings", TERMINAL_DEBUG_ENCODINGS }, 35 | { "factory", TERMINAL_DEBUG_FACTORY }, 36 | { "geometry", TERMINAL_DEBUG_GEOMETRY }, 37 | { "mdi", TERMINAL_DEBUG_MDI }, 38 | { "processes", TERMINAL_DEBUG_PROCESSES }, 39 | { "profile", TERMINAL_DEBUG_PROFILE } 40 | }; 41 | 42 | _terminal_debug_flags = g_parse_debug_string (g_getenv ("MATE_TERMINAL_DEBUG"), 43 | keys, G_N_ELEMENTS (keys)); 44 | #endif /* MATE_ENABLE_DEBUG */ 45 | } 46 | 47 | -------------------------------------------------------------------------------- /src/terminal.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | encodings-dialog.ui 21 | find-dialog.ui 22 | keybinding-editor.ui 23 | profile-manager.ui 24 | profile-new-dialog.ui 25 | profile-preferences.ui 26 | skey-challenge.ui 27 | terminal.xml 28 | terminal.about 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/skey/md5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | #include "skey.h" 8 | #include "skeyutil.h" 9 | #include "md5.h" 10 | 11 | int MD5Keycrunch(char *result, const char *seed, const char *passhrase) 12 | { 13 | char *buf; 14 | gsize len; 15 | GChecksum *checksum; 16 | guint8 digest[16]; 17 | gsize digest_len = sizeof (digest); 18 | guint32 *results; 19 | 20 | len = strlen(seed) + strlen(passhrase); 21 | buf = (char *)g_try_malloc(len+1); 22 | if (buf == NULL) 23 | return -1; 24 | 25 | strcpy(buf, seed); 26 | skey_lowcase(buf); 27 | strcat(buf, passhrase); 28 | skey_sevenbit(buf); 29 | 30 | checksum = g_checksum_new (G_CHECKSUM_MD5); 31 | g_checksum_update (checksum, (const guchar *) buf, len); 32 | g_free(buf); 33 | 34 | g_checksum_get_digest (checksum, digest, &digest_len); 35 | g_assert (digest_len == 16); 36 | 37 | results = (guint32 *) digest; 38 | results[0] ^= results[2]; 39 | results[1] ^= results[3]; 40 | 41 | memcpy((void *)result, (void *)results, SKEY_SIZE); 42 | 43 | g_checksum_free (checksum); 44 | 45 | return 0; 46 | } 47 | 48 | void MD5SKey(char *x) 49 | { 50 | GChecksum *checksum; 51 | guint8 digest[16]; 52 | gsize digest_len = sizeof (digest); 53 | guint32 *results; 54 | 55 | checksum = g_checksum_new (G_CHECKSUM_MD5); 56 | g_checksum_update (checksum, (const guchar *) x, SKEY_SIZE); 57 | g_checksum_get_digest (checksum, digest, &digest_len); 58 | g_assert (digest_len == 16); 59 | 60 | results = (guint32 *) digest; 61 | results[0] ^= results[2]; 62 | results[1] ^= results[3]; 63 | 64 | memcpy((void *)x, (void *)results, SKEY_SIZE); 65 | 66 | g_checksum_free (checksum); 67 | } 68 | -------------------------------------------------------------------------------- /src/terminal.about: -------------------------------------------------------------------------------- 1 | [About] 2 | Authors=Abel McClendon ;Adam Erdman ;Alexander von Gluck IV ;Alexei Sorokin ;Allan Nordhøy ;Behdad Esfahbod ;Christian Persch ;Christopher Fujino ;Clement Lefebvre ;Friedel Wolff ;Guilherme de S. Pastore ;Havoc Pennington ;JP Cimalando ;Laszlo Boros ;Laurent Napias ;Madars Vitolins ;Marcel Dijkstra ;Mariano Suárez-Alvarez ;Mark Thomas ;Martin Wimpress ;Michael Terry ;Mike Gabriel ;Nikolay Martynov ;Pablo Barciela ;Perberos ;Piotr Drąg ;Robert Buj ;Sander Sweers ;Scott Balneaves ;Sorokin Alexei ;Stefan Tauner ;Stefano Karapetsas ;Stephen Krauth ;Steve Zesch ;Victor Kareh ;Vlad Orlov ;Wolfgang Ulbrich ;Wu Xiaotian ;acampbell ;alxpl https://github.com/alxpl;liuyi92 ;micheal65536 https://github.com/micheal65536;noone3 ;osch ;rezso ; 3 | Contributors= 4 | ;Artists= 5 | Documenters=MATE Documentation Team;GNOME Documentation Team; 6 | -------------------------------------------------------------------------------- /src/terminal-search-dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2005 Paolo Maggi 3 | * Copyright © 2010 Red Hat (Red Hat author: Behdad Esfahbod) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef TERMINAL_SEARCH_DIALOG_H 22 | #define TERMINAL_SEARCH_DIALOG_H 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef enum _TerminalSearchFlags 29 | { 30 | TERMINAL_SEARCH_FLAG_BACKWARDS = 1 << 0, 31 | TERMINAL_SEARCH_FLAG_WRAP_AROUND = 1 << 1 32 | } TerminalSearchFlags; 33 | 34 | 35 | GtkWidget *terminal_search_dialog_new (GtkWindow *parent); 36 | 37 | void terminal_search_dialog_present (GtkWidget *dialog); 38 | 39 | void terminal_search_dialog_set_search_text (GtkWidget *dialog, 40 | const gchar *text); 41 | 42 | const gchar *terminal_search_dialog_get_search_text (GtkWidget *dialog); 43 | 44 | TerminalSearchFlags 45 | terminal_search_dialog_get_search_flags(GtkWidget *dialog); 46 | GRegex *terminal_search_dialog_get_regex (GtkWidget *dialog); 47 | 48 | G_END_DECLS 49 | 50 | #endif /* TERMINAL_SEARCH_DIALOG_H */ 51 | -------------------------------------------------------------------------------- /mate-terminal.appdata.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mate-terminal.desktop 5 | CC0-1.0 6 | GPL-3.0+ 7 | MATE Terminal 8 | A terminal emulator for the MATE desktop environment 9 | 10 |

11 | MATE Terminal is a terminal emulation application that you can use 12 | to access a UNIX shell in the MATE environment. MATE Terminal emulates 13 | the xterm program developed by the X Consortium. It supports translucent 14 | backgrounds, opening multiple terminals in a single window (tabs) and 15 | clickable URLs. 16 |

17 |

18 | MATE Terminal is a fork of GNOME Terminal and part of the MATE Desktop Environment. 19 | If you would like to know more about MATE and MATE Terminal, please visit the 20 | project's home page. 21 |

22 |
23 | 24 | 25 | 26 | https://alexpl.fedorapeople.org/AppData/mate-terminal/screens/mate-terminal_01.png 27 | 28 | 29 | 30 | 31 | https://alexpl.fedorapeople.org/AppData/mate-terminal/screens/mate-terminal_02.png 32 | 33 | 34 | 35 | 36 | https://alexpl.fedorapeople.org/AppData/mate-terminal/screens/mate-terminal_03.png 37 | 38 | 39 | 40 | https://mate-desktop.org 41 | mate-dev@ml.mate-desktop.org 42 | MATE 43 |
44 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = po src help 2 | 3 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} 4 | 5 | NULL = 6 | 7 | DISTCHECK_CONFIGURE_FLAGS = \ 8 | --disable-schemas-install \ 9 | --disable-silent-rules \ 10 | CFLAGS='-Wno-deprecated-declarations' 11 | 12 | appdatadir = $(datadir)/metainfo 13 | appdata_in_files = mate-terminal.appdata.xml.in 14 | appdata_DATA = $(appdata_in_files:.xml.in=.xml) 15 | $(appdata_DATA): $(appdata_in_files) 16 | $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ 17 | 18 | desktopdir = $(datadir)/applications 19 | desktop_in_files = mate-terminal.desktop.in.in 20 | desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop) 21 | $(desktop_DATA): $(desktop_in_files) 22 | $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ 23 | 24 | man_MANS = mate-terminal.1 25 | 26 | bin_SCRIPTS = mate-terminal.wrapper 27 | 28 | EXTRA_DIST = \ 29 | autogen.sh \ 30 | xmldocs.make \ 31 | omf.make \ 32 | mate-terminal.wrapper \ 33 | $(appdata_in_files) \ 34 | $(man_MANS) \ 35 | $(NULL) 36 | 37 | CLEANFILES = \ 38 | mate-terminal.appdata.xml \ 39 | $(desktop_DATA) \ 40 | $(NULL) 41 | 42 | MAINTAINERCLEANFILES = \ 43 | $(srcdir)/INSTALL \ 44 | $(srcdir)/aclocal.m4 \ 45 | $(srcdir)/autoscan.log \ 46 | $(srcdir)/compile \ 47 | $(srcdir)/config.guess \ 48 | $(srcdir)/config.h.in \ 49 | $(srcdir)/config.sub \ 50 | $(srcdir)/configure.scan \ 51 | $(srcdir)/depcomp \ 52 | $(srcdir)/install-sh \ 53 | $(srcdir)/ltmain.sh \ 54 | $(srcdir)/missing \ 55 | $(srcdir)/mkinstalldirs \ 56 | $(srcdir)/omf.make \ 57 | $(srcdir)/xmldocs.make \ 58 | `find "$(srcdir)" -type f -name Makefile.in -print` \ 59 | $(NULL) 60 | 61 | # Build ChangeLog from GIT history 62 | ChangeLog: 63 | $(AM_V_GEN) if test -d $(top_srcdir)/.git; then \ 64 | GIT_DIR="$(top_srcdir)/.git" git log --stat > $@; \ 65 | fi 66 | 67 | dist: ChangeLog 68 | 69 | .PHONY: ChangeLog 70 | 71 | -include $(top_srcdir)/git.mk 72 | -------------------------------------------------------------------------------- /mate-terminal.wrapper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | my $login=0; 4 | 5 | while ($opt = shift(@ARGV)) 6 | { 7 | if ($opt eq '-display') 8 | { 9 | $ENV{'DISPLAY'} = shift(@ARGV); 10 | } 11 | elsif ($opt eq '-name') 12 | { 13 | $arg = shift(@ARGV); 14 | push(@args, "--window-with-profile=$arg"); 15 | } 16 | elsif ($opt eq '-n') 17 | { 18 | # Accept but ignore 19 | print STDERR "$0: to set an icon, please use -name and set a profile icon\n" 20 | } 21 | elsif ($opt eq '-T' || $opt eq '-title') 22 | { 23 | push(@args, '-t', shift(@ARGV)); 24 | } 25 | elsif ($opt eq '-ls') 26 | { 27 | $login = 1; 28 | } 29 | elsif ($opt eq '+ls') 30 | { 31 | $login = 0; 32 | } 33 | elsif ($opt eq '-geometry') 34 | { 35 | $arg = shift(@ARGV); 36 | push(@args, "--geometry=$arg"); 37 | } 38 | elsif ($opt eq '-fn') 39 | { 40 | $arg = shift(@ARGV); 41 | push(@args, "--font=$arg"); 42 | } 43 | elsif ($opt eq '-fg') 44 | { 45 | $arg = shift(@ARGV); 46 | push(@args, "--foreground=$arg"); 47 | } 48 | elsif ($opt eq '-bg') 49 | { 50 | $arg = shift(@ARGV); 51 | push(@args, "--background=$arg"); 52 | } 53 | elsif ($opt eq '-tn') 54 | { 55 | $arg = shift(@ARGV); 56 | push(@args, "--termname=$arg"); 57 | } 58 | elsif ($opt eq '-e') 59 | { 60 | $arg = shift(@ARGV); 61 | if (@ARGV) 62 | { 63 | push(@args, '-x', $arg, @ARGV); 64 | last; 65 | } 66 | else 67 | { 68 | push(@args, '-e', $arg); 69 | } 70 | last; 71 | } 72 | elsif ($opt eq '-h' || $opt eq '--help') 73 | { 74 | push(@args, '--help'); 75 | } 76 | } 77 | if ($login == 1) 78 | { 79 | @args = ('--login', @args); 80 | } 81 | exec('mate-terminal',@args); 82 | -------------------------------------------------------------------------------- /src/terminal-encoding.h: -------------------------------------------------------------------------------- 1 | /* Encoding stuff */ 2 | 3 | /* 4 | * Copyright © 2002 Red Hat, Inc. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 3 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef TERMINAL_ENCODING_H 23 | #define TERMINAL_ENCODING_H 24 | 25 | #include 26 | 27 | #define TERMINAL_TYPE_ENCODING (terminal_encoding_get_type ()) 28 | 29 | typedef struct 30 | { 31 | int refcount; 32 | char *id; 33 | char *name; 34 | guint valid : 1; 35 | guint validity_checked : 1; 36 | guint is_custom : 1; 37 | guint is_active : 1; 38 | } TerminalEncoding; 39 | 40 | GType terminal_encoding_get_type (void); 41 | 42 | TerminalEncoding *terminal_encoding_new (const char *charset, 43 | const char *display_name, 44 | gboolean is_custom, 45 | gboolean force_valid); 46 | 47 | TerminalEncoding *terminal_encoding_ref (TerminalEncoding *encoding); 48 | 49 | void terminal_encoding_unref (TerminalEncoding *encoding); 50 | 51 | gboolean terminal_encoding_is_valid (TerminalEncoding *encoding); 52 | 53 | const char *terminal_encoding_get_id (TerminalEncoding *encoding); 54 | 55 | const char *terminal_encoding_get_charset (TerminalEncoding *encoding); 56 | 57 | GHashTable *terminal_encodings_get_builtins (void); 58 | 59 | void terminal_encoding_dialog_show (GtkWindow *transient_parent); 60 | 61 | #endif /* TERMINAL_ENCODING_H */ 62 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # vim: set ts=2 sts=2 sw=2 expandtab : 2 | dist: xenial 3 | sudo: required 4 | language: bash 5 | services: 6 | - docker 7 | 8 | branches: 9 | except: 10 | - gh-pages 11 | 12 | before_install: 13 | - curl -Ls -o docker-build https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/docker-build 14 | - curl -Ls -o gen-index https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/gen-index.sh 15 | - chmod +x docker-build gen-index 16 | 17 | install: 18 | - sudo apt-get install -y python3-pip python3-setuptools 19 | - sudo pip3 install --upgrade pip 20 | - sudo pip install PyGithub 21 | - ./docker-build --name ${DISTRO} --config .build.yml --install 22 | 23 | script: 24 | - ./docker-build --name ${DISTRO} --verbose --config .build.yml --build scripts 25 | 26 | deploy: 27 | - provider: pages 28 | github-token: $GITHUB_TOKEN 29 | #keep-history: true 30 | skip_cleanup: true 31 | committer-from-gh: true 32 | target-branch: gh-pages 33 | local-dir: html-report 34 | on: 35 | all_branches: true 36 | condition: ${DISTRO} =~ ^fedora.*$ 37 | - provider: script 38 | script: ./docker-build --verbose --config .build.yml --release github 39 | skip_cleanup: true 40 | on: 41 | tags: true 42 | condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$" 43 | 44 | after_success: 45 | - 'if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then 46 | REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//\// }); 47 | REPO_NAME=${REPO_SLUG_ARRAY[1]}; 48 | URL="https://${REPO_NAME}.mate-desktop.dev"; 49 | COMMENT="Code analysis completed"; 50 | curl -H "Authorization: token $GITHUB_TOKEN" -X POST 51 | -d "{\"state\": \"success\", \"description\": \"$COMMENT\", \"context\":\"scan-build\", \"target_url\": \"$URL\"}" 52 | https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA}; 53 | fi' 54 | 55 | env: 56 | - DISTRO="archlinux/base" 57 | - DISTRO="debian:testing" 58 | - DISTRO="fedora:latest" 59 | - DISTRO="ubuntu:19.10" 60 | -------------------------------------------------------------------------------- /src/terminal-tabs-menu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2003 David Bordoley 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef TERMINAL_TABS_MENU_H 20 | #define TERMINAL_TABS_MENU_H 21 | 22 | #include "terminal-window.h" 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define TERMINAL_TYPE_TABS_MENU (terminal_tabs_menu_get_type ()) 27 | #define TERMINAL_TABS_MENU(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TERMINAL_TYPE_TABS_MENU, TerminalTabsMenu)) 28 | #define TERMINAL_TABS_MENU_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TERMINAL_TYPE_TABS_MENU, TerminalTabsMenuClass)) 29 | #define TERMINAL_IS_TABS_MENU(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TERMINAL_TYPE_TABS_MENU)) 30 | #define TERMINAL_IS_TABS_MENU_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TERMINAL_TYPE_TABS_MENU)) 31 | #define TERMINAL_TABS_MENU_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TERMINAL_TYPE_TABS_MENU, TerminalTabsMenuClass)) 32 | 33 | typedef struct _TerminalTabsMenu TerminalTabsMenu; 34 | typedef struct _TerminalTabsMenuClass TerminalTabsMenuClass; 35 | typedef struct _TerminalTabsMenuPrivate TerminalTabsMenuPrivate; 36 | 37 | struct _TerminalTabsMenuClass 38 | { 39 | GObjectClass parent_class; 40 | }; 41 | 42 | struct _TerminalTabsMenu 43 | { 44 | GObject parent_object; 45 | 46 | /*< private >*/ 47 | TerminalTabsMenuPrivate *priv; 48 | }; 49 | 50 | GType terminal_tabs_menu_get_type (void); 51 | 52 | TerminalTabsMenu *terminal_tabs_menu_new (TerminalWindow *window); 53 | 54 | G_END_DECLS 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/terminal-tab-label.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2008 Christian Persch 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope tab_label it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef TERMINAL_TAB_LABEL_H 20 | #define TERMINAL_TAB_LABEL_H 21 | 22 | #include 23 | 24 | #include "terminal-screen.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define TERMINAL_TYPE_TAB_LABEL (terminal_tab_label_get_type ()) 29 | #define TERMINAL_TAB_LABEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TERMINAL_TYPE_TAB_LABEL, TerminalTabLabel)) 30 | #define TERMINAL_TAB_LABEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TERMINAL_TYPE_TAB_LABEL, TerminalTabLabelClass)) 31 | #define TERMINAL_IS_TAB_LABEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TERMINAL_TYPE_TAB_LABEL)) 32 | #define TERMINAL_IS_TAB_LABEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TERMINAL_TYPE_TAB_LABEL)) 33 | #define TERMINAL_TAB_LABEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TERMINAL_TYPE_TAB_LABEL, TerminalTabLabelClass)) 34 | 35 | typedef struct _TerminalTabLabel TerminalTabLabel; 36 | typedef struct _TerminalTabLabelClass TerminalTabLabelClass; 37 | typedef struct _TerminalTabLabelPrivate TerminalTabLabelPrivate; 38 | 39 | struct _TerminalTabLabel 40 | { 41 | GtkBox parent_instance; 42 | 43 | /*< private >*/ 44 | TerminalTabLabelPrivate *priv; 45 | }; 46 | 47 | struct _TerminalTabLabelClass 48 | { 49 | GtkBoxClass parent_class; 50 | 51 | /* Signals */ 52 | void (* close_button_clicked) (TerminalTabLabel *tab_label); 53 | }; 54 | 55 | GType terminal_tab_label_get_type (void); 56 | 57 | GtkWidget *terminal_tab_label_new (TerminalScreen *screen); 58 | 59 | void terminal_tab_label_set_bold (TerminalTabLabel *tab_label, 60 | gboolean bold); 61 | 62 | G_END_DECLS 63 | 64 | #endif /* !TERMINAL_TAB_LABEL_H */ 65 | -------------------------------------------------------------------------------- /src/terminal-debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2002 Red Hat, Inc. 3 | * 4 | * This is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU Library General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* The interfaces in this file are subject to change at any time. */ 20 | 21 | #ifndef MATE_ENABLE_DEBUG_H 22 | #define MATE_ENABLE_DEBUG_H 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef enum 29 | { 30 | TERMINAL_DEBUG_ACCELS = 1 << 0, 31 | TERMINAL_DEBUG_ENCODINGS = 1 << 1, 32 | TERMINAL_DEBUG_FACTORY = 1 << 2, 33 | TERMINAL_DEBUG_GEOMETRY = 1 << 3, 34 | TERMINAL_DEBUG_MDI = 1 << 4, 35 | TERMINAL_DEBUG_PROCESSES = 1 << 5, 36 | TERMINAL_DEBUG_PROFILE = 1 << 6 37 | } TerminalDebugFlags; 38 | 39 | void _terminal_debug_init(void); 40 | 41 | extern TerminalDebugFlags _terminal_debug_flags; 42 | static inline gboolean _terminal_debug_on (TerminalDebugFlags flags) G_GNUC_CONST G_GNUC_UNUSED; 43 | 44 | static inline gboolean 45 | _terminal_debug_on (TerminalDebugFlags flags) 46 | { 47 | return (_terminal_debug_flags & flags) == flags; 48 | } 49 | 50 | #ifdef MATE_ENABLE_DEBUG 51 | #define _TERMINAL_DEBUG_IF(flags) if (G_UNLIKELY (_terminal_debug_on (flags))) 52 | #else 53 | #define _TERMINAL_DEBUG_IF(flags) if (0) 54 | #endif 55 | 56 | #if defined(__GNUC__) && G_HAVE_GNUC_VARARGS 57 | #define _terminal_debug_print(flags, fmt, ...) \ 58 | G_STMT_START { _TERMINAL_DEBUG_IF(flags) g_printerr(fmt, ##__VA_ARGS__); } G_STMT_END 59 | #else 60 | #include 61 | #include 62 | static void _terminal_debug_print (guint flags, const char *fmt, ...) 63 | { 64 | if (_terminal_debug_on (flags)) 65 | { 66 | va_list ap; 67 | va_start (ap, fmt); 68 | g_vfprintf (stderr, fmt, ap); 69 | va_end (ap); 70 | } 71 | } 72 | #endif 73 | 74 | G_END_DECLS 75 | 76 | #endif /* !MATE_ENABLE_DEBUG_H */ 77 | -------------------------------------------------------------------------------- /src/terminal-info-bar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2010 Christian Persch 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope info_bar it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef TERMINAL_INFO_BAR_H 20 | #define TERMINAL_INFO_BAR_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define TERMINAL_TYPE_INFO_BAR (terminal_info_bar_get_type ()) 27 | #define TERMINAL_INFO_BAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TERMINAL_TYPE_INFO_BAR, TerminalInfoBar)) 28 | #define TERMINAL_INFO_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TERMINAL_TYPE_INFO_BAR, TerminalInfoBarClass)) 29 | #define TERMINAL_IS_INFO_BAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TERMINAL_TYPE_INFO_BAR)) 30 | #define TERMINAL_IS_INFO_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TERMINAL_TYPE_INFO_BAR)) 31 | #define TERMINAL_INFO_BAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TERMINAL_TYPE_INFO_BAR, TerminalInfoBarClass)) 32 | 33 | typedef struct _TerminalInfoBar TerminalInfoBar; 34 | typedef struct _TerminalInfoBarClass TerminalInfoBarClass; 35 | typedef struct _TerminalInfoBarPrivate TerminalInfoBarPrivate; 36 | 37 | struct _TerminalInfoBar 38 | { 39 | GtkInfoBar parent_instance; 40 | 41 | /*< private >*/ 42 | TerminalInfoBarPrivate *priv; 43 | }; 44 | 45 | struct _TerminalInfoBarClass 46 | { 47 | GtkInfoBarClass parent_class; 48 | }; 49 | 50 | GType terminal_info_bar_get_type (void); 51 | 52 | GtkWidget *terminal_info_bar_new (GtkMessageType type, 53 | const char *first_button_text, 54 | ...) G_GNUC_NULL_TERMINATED; 55 | 56 | void terminal_info_bar_format_text (TerminalInfoBar *bar, 57 | const char *format, 58 | ...) G_GNUC_PRINTF (2, 3); 59 | 60 | G_END_DECLS 61 | 62 | #endif /* !TERMINAL_INFO_BAR_H */ 63 | -------------------------------------------------------------------------------- /src/terminal-close-button.h: -------------------------------------------------------------------------------- 1 | /* 2 | * terminal-close-button.h 3 | * 4 | * Copyright © 2010 - Paolo Borelli 5 | * Copyright © 2016 - Wolfgang Ulbrich 6 | * 7 | * Mate-terminal is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Mate-terminal is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | #ifndef __TERMINAL_CLOSE_BUTTON_H__ 22 | #define __TERMINAL_CLOSE_BUTTON_H__ 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define TERMINAL_TYPE_CLOSE_BUTTON (terminal_close_button_get_type ()) 29 | #define TERMINAL_CLOSE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButton)) 30 | #define TERMINAL_CLOSE_BUTTON_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButton const)) 31 | #define TERMINAL_CLOSE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButtonClass)) 32 | #define TERMINAL_IS_CLOSE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TERMINAL_TYPE_CLOSE_BUTTON)) 33 | #define TERMINAL_IS_CLOSE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_CLOSE_BUTTON)) 34 | #define TERMINAL_CLOSE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButtonClass)) 35 | 36 | typedef struct _TerminalCloseButton TerminalCloseButton; 37 | typedef struct _TerminalCloseButtonPrivate TerminalCloseButtonPrivate; 38 | typedef struct _TerminalCloseButtonClass TerminalCloseButtonClass; 39 | typedef struct _TerminalCloseButtonClassPrivate TerminalCloseButtonClassPrivate; 40 | 41 | struct _TerminalCloseButton 42 | { 43 | GtkButton parent; 44 | }; 45 | 46 | struct _TerminalCloseButtonClass 47 | { 48 | GtkButtonClass parent_class; 49 | 50 | TerminalCloseButtonClassPrivate *priv; 51 | }; 52 | 53 | GType terminal_close_button_get_type (void) G_GNUC_CONST; 54 | 55 | GtkWidget *terminal_close_button_new (void); 56 | 57 | G_END_DECLS 58 | 59 | #endif /* __TERMINAL_CLOSE_BUTTON_H__ */ 60 | -------------------------------------------------------------------------------- /src/terminal-close-button.c: -------------------------------------------------------------------------------- 1 | /* 2 | * terminal-close-button.c 3 | * 4 | * Copyright © 2010 - Paolo Borelli 5 | * Copyright © 2011 - Ignacio Casal Quinteiro 6 | * Copyright © 2016 - Wolfgang Ulbrich 7 | * 8 | * Mate-terminal is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mate-terminal is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | #include 23 | 24 | #include "terminal-close-button.h" 25 | 26 | struct _TerminalCloseButtonClassPrivate { 27 | GtkCssProvider *css; 28 | }; 29 | 30 | G_DEFINE_TYPE_WITH_CODE (TerminalCloseButton, terminal_close_button, GTK_TYPE_BUTTON, 31 | g_type_add_class_private (g_define_type_id, sizeof (TerminalCloseButtonClassPrivate))) 32 | 33 | static void 34 | terminal_close_button_class_init (TerminalCloseButtonClass *klass) 35 | { 36 | static const gchar button_style[] = 37 | "* {\n" 38 | "padding: 0;\n" 39 | "}"; 40 | 41 | klass->priv = G_TYPE_CLASS_GET_PRIVATE (klass, TERMINAL_TYPE_CLOSE_BUTTON, TerminalCloseButtonClassPrivate); 42 | 43 | klass->priv->css = gtk_css_provider_new (); 44 | gtk_css_provider_load_from_data (klass->priv->css, button_style, -1, NULL); 45 | } 46 | 47 | static void 48 | terminal_close_button_init (TerminalCloseButton *button) 49 | { 50 | GtkWidget *image; 51 | GtkStyleContext *context; 52 | 53 | gtk_widget_set_name (GTK_WIDGET (button), "mate-terminal-tab-close-button"); 54 | 55 | image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU); 56 | gtk_widget_show (image); 57 | 58 | gtk_container_add (GTK_CONTAINER (button), image); 59 | 60 | context = gtk_widget_get_style_context (GTK_WIDGET (button)); 61 | gtk_style_context_add_provider (context, 62 | GTK_STYLE_PROVIDER (TERMINAL_CLOSE_BUTTON_GET_CLASS (button)->priv->css), 63 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); 64 | } 65 | 66 | GtkWidget * 67 | terminal_close_button_new () 68 | { 69 | return GTK_WIDGET (g_object_new (TERMINAL_TYPE_CLOSE_BUTTON, 70 | "relief", GTK_RELIEF_NONE, 71 | "focus-on-click", FALSE, 72 | NULL)); 73 | } 74 | 75 | -------------------------------------------------------------------------------- /src/skey/sha1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "skey.h" 10 | #include "skeyutil.h" 11 | #include "sha1.h" 12 | 13 | 14 | #define SHA1_DIGESTSIZE 20 15 | #define SHA1_BLOCKSIZE 64 16 | 17 | #define HTONDIGEST(x) { \ 18 | x[0] = htonl(x[0]); \ 19 | x[1] = htonl(x[1]); \ 20 | x[2] = htonl(x[2]); \ 21 | x[3] = htonl(x[3]); \ 22 | x[4] = htonl(x[4]); } 23 | 24 | #ifdef WORDS_BIGENDIAN 25 | /* 26 | * Note: this code is harmless on little-endian machines. 27 | */ 28 | static void byteReverse(unsigned char *buf, unsigned longs) 29 | { 30 | guint32 t; 31 | do 32 | { 33 | t = (guint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | 34 | ((unsigned) buf[1] << 8 | buf[0]); 35 | *(guint32 *) buf = t; 36 | buf += 4; 37 | } 38 | while (--longs); 39 | } 40 | #endif 41 | 42 | 43 | int SHA1Keycrunch(char *result, const char *seed, const char *passphrase) 44 | { 45 | char *buf; 46 | gsize len; 47 | GChecksum *checksum; 48 | guint8 digest[20]; 49 | gsize digest_len = sizeof (digest); 50 | guint32 *results; 51 | 52 | len = strlen(seed) + strlen(passphrase); 53 | if ((buf = (char *)g_try_malloc(len+1)) == NULL) 54 | return -1; 55 | 56 | strcpy(buf, seed); 57 | skey_lowcase(buf); 58 | strcat(buf, passphrase); 59 | skey_sevenbit(buf); 60 | 61 | checksum = g_checksum_new (G_CHECKSUM_SHA1); 62 | g_checksum_update (checksum, (const guchar *) buf, len); 63 | g_free(buf); 64 | 65 | g_checksum_get_digest (checksum, digest, &digest_len); 66 | g_assert (digest_len == 20); 67 | 68 | results = (guint32 *) digest; 69 | 70 | #ifndef WORDS_BIGENDIAN 71 | HTONDIGEST(results); 72 | #else 73 | byteReverse((unsigned char *)digest, 5); 74 | #endif 75 | 76 | results = (guint32 *) digest; 77 | results[0] ^= results[2]; 78 | results[1] ^= results[3]; 79 | results[0] ^= results[4]; 80 | 81 | memcpy((void *)result, (void *)results, SKEY_SIZE); 82 | 83 | g_checksum_free (checksum); 84 | 85 | return 0; 86 | } 87 | 88 | void SHA1SKey(char *x) 89 | { 90 | GChecksum *checksum; 91 | guint8 digest[20]; 92 | gsize digest_len = sizeof (digest); 93 | guint32 *results; 94 | 95 | checksum = g_checksum_new (G_CHECKSUM_SHA1); 96 | g_checksum_update (checksum, (const guchar *) x, SKEY_SIZE); 97 | g_checksum_get_digest (checksum, digest, &digest_len); 98 | g_assert (digest_len == 20); 99 | 100 | results = (guint32 *) digest; 101 | #ifndef WORDS_BIGENDIAN 102 | HTONDIGEST(results); 103 | #else 104 | byteReverse((unsigned char *)digest, 5); 105 | #endif 106 | 107 | results[0] ^= results[2]; 108 | results[1] ^= results[3]; 109 | results[0] ^= results[4]; 110 | 111 | memcpy((void *)x, (void *)results, SKEY_SIZE); 112 | 113 | g_checksum_free (checksum); 114 | } 115 | -------------------------------------------------------------------------------- /src/eggshell.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation 3 | * Copyright (C) 1999, 2000 Red Hat, Inc. 4 | * All rights reserved. 5 | * 6 | * This file is part of the Mate Library. 7 | * 8 | * The Mate Library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public License as 10 | * published by the Free Software Foundation; either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * The Mate Library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with the Mate Library; see the file COPYING.LIB. If not, 20 | * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | /* 24 | @NOTATION@ 25 | */ 26 | 27 | /* 28 | * 29 | * Mate utility routines. 30 | * (C) 1997, 1998, 1999 the Free Software Foundation. 31 | * 32 | * Author: Miguel de Icaza, 33 | */ 34 | 35 | #include 36 | 37 | #include "eggshell.h" 38 | 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #include 46 | 47 | /** 48 | * egg_shell: 49 | * @shell: the value of the SHELL env variable 50 | * 51 | * Retrieves the user's preferred shell. 52 | * 53 | * Returns: A newly allocated string that is the path to the shell. 54 | */ 55 | char * 56 | egg_shell (const char *shell) 57 | { 58 | struct passwd *pw; 59 | int i; 60 | static const char shells [][14] = 61 | { 62 | /* Note that on some systems shells can also 63 | * be installed in /usr/bin */ 64 | "/bin/bash", "/usr/bin/bash", 65 | "/bin/zsh", "/usr/bin/zsh", 66 | "/bin/tcsh", "/usr/bin/tcsh", 67 | "/bin/ksh", "/usr/bin/ksh", 68 | "/bin/csh", "/bin/sh" 69 | }; 70 | 71 | if (geteuid () == getuid () && 72 | getegid () == getgid ()) 73 | { 74 | /* only in non-setuid */ 75 | if (shell != NULL) 76 | { 77 | if (access (shell, X_OK) == 0) 78 | { 79 | return g_strdup (shell); 80 | } 81 | } 82 | } 83 | pw = getpwuid(getuid()); 84 | if (pw && pw->pw_shell) 85 | { 86 | if (access (pw->pw_shell, X_OK) == 0) 87 | { 88 | return g_strdup (pw->pw_shell); 89 | } 90 | } 91 | 92 | for (i = 0; i != G_N_ELEMENTS (shells); i++) 93 | { 94 | if (access (shells [i], X_OK) == 0) 95 | { 96 | return g_strdup (shells[i]); 97 | } 98 | } 99 | 100 | /* If /bin/sh doesn't exist, your system is truly broken. */ 101 | g_assert_not_reached (); 102 | 103 | /* Placate compiler. */ 104 | return NULL; 105 | } 106 | -------------------------------------------------------------------------------- /src/terminal-screen-container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2008, 2010 Christian Persch 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef TERMINAL_SCREEN_CONTAINER_H 21 | #define TERMINAL_SCREEN_CONTAINER_H 22 | 23 | #include 24 | #include "terminal-screen.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define TERMINAL_TYPE_SCREEN_CONTAINER (terminal_screen_container_get_type ()) 29 | #define TERMINAL_SCREEN_CONTAINER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TERMINAL_TYPE_SCREEN_CONTAINER, TerminalScreenContainer)) 30 | #define TERMINAL_SCREEN_CONTAINER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TERMINAL_TYPE_SCREEN_CONTAINER, TerminalScreenContainerClass)) 31 | #define TERMINAL_IS_SCREEN_CONTAINER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TERMINAL_TYPE_SCREEN_CONTAINER)) 32 | #define TERMINAL_IS_SCREEN_CONTAINER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TERMINAL_TYPE_SCREEN_CONTAINER)) 33 | #define TERMINAL_SCREEN_CONTAINER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TERMINAL_TYPE_SCREEN_CONTAINER, TerminalScreenContainerClass)) 34 | 35 | typedef struct _TerminalScreenContainer TerminalScreenContainer; 36 | typedef struct _TerminalScreenContainerClass TerminalScreenContainerClass; 37 | typedef struct _TerminalScreenContainerPrivate TerminalScreenContainerPrivate; 38 | 39 | struct _TerminalScreenContainer 40 | { 41 | GtkBox parent_instance; 42 | 43 | /*< private >*/ 44 | TerminalScreenContainerPrivate *priv; 45 | }; 46 | 47 | struct _TerminalScreenContainerClass 48 | { 49 | GtkBoxClass parent_class; 50 | }; 51 | 52 | GType terminal_screen_container_get_type (void); 53 | 54 | GtkWidget *terminal_screen_container_new (TerminalScreen *screen); 55 | 56 | TerminalScreen *terminal_screen_container_get_screen (TerminalScreenContainer *container); 57 | 58 | TerminalScreenContainer *terminal_screen_container_get_from_screen (TerminalScreen *screen); 59 | 60 | void terminal_screen_container_set_policy (TerminalScreenContainer *container, 61 | GtkPolicyType hpolicy, 62 | GtkPolicyType vpolicy); 63 | 64 | void terminal_screen_container_set_placement (TerminalScreenContainer *container, 65 | GtkCornerType corner); 66 | 67 | G_END_DECLS 68 | 69 | #endif /* TERMINAL_SCREEN_CONTAINER_H */ 70 | -------------------------------------------------------------------------------- /src/extra-strings.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2009 Christian Persch 3 | * 4 | * Mate-terminal is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Mate-terminal is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | /* This file contains extra strings that need to be translated, but 19 | * can't be extracted by intltool since the ui files aren't in git, and 20 | * the glade files don't contain them in the right form. See bug #553357. 21 | */ 22 | 23 | /* Translators: This refers to the Delete keybinding option */ 24 | N_("Automatic") 25 | /* Translators: This refers to the Delete keybinding option */ 26 | N_("Control-H") 27 | /* Translators: This refers to the Delete keybinding option */ 28 | N_("ASCII DEL") 29 | /* Translators: This refers to the Delete keybinding option */ 30 | N_("Escape sequence") 31 | /* Translators: This refers to the Delete keybinding option */ 32 | N_("TTY Erase") 33 | 34 | /* Translators: Cursor shape: ... */ 35 | N_("Block") 36 | /* Translators: Cursor shape: ... */ 37 | N_("I-Beam") 38 | /* Translators: Cursor shape: ... */ 39 | N_("Underline") 40 | 41 | /* Translators: Cursor blink: ... */ 42 | N_("Use system settings") 43 | /* Translators: Cursor blink: ... */ 44 | N_("Always blink") 45 | /* Translators: Cursor blink: ... */ 46 | N_("Never blink") 47 | 48 | /* Translators: When command exits: ... */ 49 | N_("Exit the terminal") 50 | /* Translators: When command exits: ... */ 51 | N_("Restart the command") 52 | /* Translators: When command exits: ... */ 53 | N_("Hold the terminal open") 54 | 55 | /* Translators: Scrollbar is: ... */ 56 | N_("On the left side") 57 | /* Translators: Scrollbar is: ... */ 58 | N_("On the right side") 59 | /* Translators: Scrollbar is: ... */ 60 | N_("Disabled") 61 | 62 | /* Translators: When terminal commands set their own titles: ... */ 63 | N_("Replace initial title") 64 | /* Translators: When terminal commands set their own titles: ... */ 65 | N_("Append initial title") 66 | /* Translators: When terminal commands set their own titles: ... */ 67 | N_("Prepend initial title") 68 | /* Translators: When terminal commands set their own titles: ... */ 69 | N_("Keep initial title") 70 | 71 | /* Translators: This is the name of a colour scheme */ 72 | N_("Tango") 73 | /* Translators: This is the name of a colour scheme */ 74 | N_("Linux console") 75 | /* Translators: This is the name of a colour scheme */ 76 | N_("XTerm") 77 | /* Translators: This is the name of a colour scheme */ 78 | N_("Rxvt") 79 | /* Translators: This is the name of a colour scheme */ 80 | N_("Solarized") 81 | /* Translators: This is the name of a colour scheme */ 82 | N_("Custom") 83 | -------------------------------------------------------------------------------- /update-authors.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | =pod 3 | 4 | update-authors.pl is part of MATE Terminal. 5 | 6 | MATE Terminal is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | MATE Terminal is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with MATE Terminal. If not, see . 18 | 19 | =cut 20 | use strict; 21 | use warnings; 22 | 23 | sub ReplaceAuthors { 24 | my @authors = @_; 25 | $_ eq 'bl0ckeduser ' and $_ = 'Gabriel Cormier-Affleck ' for @authors; 26 | $_ eq 'hekel ' and $_ = 'Adam Erdman ' for @authors; 27 | $_ eq 'infirit ' and $_ = 'Sander Sweers ' for @authors; 28 | $_ eq 'leigh123linux ' and $_ = 'Leigh Scott ' for @authors; 29 | $_ eq 'lyokha ' and $_ = 'Alexey Radkov ' for @authors; 30 | $_ eq 'Martin Wimpress ' and $_ = 'Martin Wimpress ' for @authors; 31 | $_ eq 'monsta ' and $_ = 'Vlad Orlov ' for @authors; 32 | $_ eq 'Monsta ' and $_ = 'Vlad Orlov ' for @authors; 33 | $_ eq 'osch ' and $_ = 'osch ' for @authors; 34 | $_ eq 'raveit65 ' and $_ = 'Wolfgang Ulbrich ' for @authors; 35 | $_ eq 'raveit65 ' and $_ = 'Wolfgang Ulbrich ' for @authors; 36 | $_ eq 'rbuj ' and $_ = 'Robert Buj ' for @authors; 37 | $_ eq 'Scott Balneaves ' and $_ = 'Scott Balneaves ' for @authors; 38 | $_ eq 'spuhpointer ' and $_ = 'Madars Vitolins ' for @authors; 39 | $_ eq 'Wolfgang Ulbrich ' and $_ = 'Wolfgang Ulbrich ' for @authors; 40 | return @authors; 41 | } 42 | 43 | sub GetCurrentAuthors { 44 | my @authors; 45 | open(FILE,"src/terminal.about") or die "Can't open src/terminal.about"; 46 | while () { 47 | if (/^Authors=*(.+)$/) { 48 | @authors=split(";",$1); 49 | } 50 | } 51 | close FILE; 52 | return ReplaceAuthors(@authors); 53 | } 54 | 55 | sub GetNewAuthors { 56 | my @authors = `git log --pretty="%an <%ae>" --since "2012-01-01" -- . "_.h" "_.c" | sort | uniq | sed 's/@/%/g' | sed '/^mate-i18n.*/d'`; 57 | chomp @authors; 58 | return ReplaceAuthors(@authors); 59 | } 60 | 61 | my @A = GetCurrentAuthors; 62 | my @B = GetNewAuthors; 63 | for (@B) { 64 | s/<\d+\+(.+?)%users\.noreply\.github\.com>/<$1%users\.noreply\.github\.com>/; 65 | s/<(.+?)%users\.noreply\.github\.com>/https:\/\/github.com\/$1/; 66 | } 67 | my @merged = sort { $a cmp $b } keys %{{map {($_ => 1)} (@A, @B)}}; 68 | print join(';',@merged) . ';'; 69 | -------------------------------------------------------------------------------- /src/terminal-info-bar.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2010 Christian Persch 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope info_bar it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #include 20 | 21 | #include "terminal-info-bar.h" 22 | 23 | #include 24 | 25 | struct _TerminalInfoBarPrivate 26 | { 27 | GtkWidget *content_box; 28 | }; 29 | 30 | G_DEFINE_TYPE_WITH_PRIVATE (TerminalInfoBar, terminal_info_bar, GTK_TYPE_INFO_BAR) 31 | 32 | /* helper functions */ 33 | 34 | static void 35 | terminal_info_bar_init (TerminalInfoBar *bar) 36 | { 37 | GtkInfoBar *info_bar = GTK_INFO_BAR (bar); 38 | TerminalInfoBarPrivate *priv; 39 | 40 | priv = bar->priv = terminal_info_bar_get_instance_private (bar); 41 | 42 | priv->content_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); 43 | gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (info_bar)), 44 | priv->content_box, TRUE, TRUE, 0); 45 | } 46 | 47 | static void 48 | terminal_info_bar_class_init (TerminalInfoBarClass *klass) 49 | { 50 | } 51 | 52 | /* public API */ 53 | 54 | /** 55 | * terminal_info_bar_new: 56 | * @type: a #GtkMessageType 57 | * 58 | * Returns: a new #TerminalInfoBar for @screen 59 | */ 60 | GtkWidget * 61 | terminal_info_bar_new (GtkMessageType type, 62 | const char *first_button_text, 63 | ...) 64 | { 65 | GtkWidget *info_bar; 66 | va_list args; 67 | 68 | info_bar = g_object_new (TERMINAL_TYPE_INFO_BAR, 69 | "message-type", type, 70 | NULL); 71 | 72 | va_start (args, first_button_text); 73 | while (first_button_text != NULL) 74 | { 75 | int response_id; 76 | 77 | response_id = va_arg (args, int); 78 | gtk_info_bar_add_button (GTK_INFO_BAR (info_bar), 79 | first_button_text, response_id); 80 | 81 | first_button_text = va_arg (args, const char *); 82 | } 83 | va_end (args); 84 | 85 | return info_bar; 86 | } 87 | 88 | void 89 | terminal_info_bar_format_text (TerminalInfoBar *bar, 90 | const char *format, 91 | ...) 92 | { 93 | TerminalInfoBarPrivate *priv; 94 | char *text; 95 | GtkWidget *label; 96 | va_list args; 97 | 98 | g_return_if_fail (TERMINAL_IS_INFO_BAR (bar)); 99 | 100 | priv = bar->priv; 101 | 102 | va_start (args, format); 103 | text = g_strdup_vprintf (format, args); 104 | va_end (args); 105 | 106 | label = gtk_label_new (text); 107 | g_free (text); 108 | 109 | gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); 110 | gtk_label_set_selectable (GTK_LABEL (label), TRUE); 111 | gtk_label_set_xalign (GTK_LABEL (label), 0.0); 112 | gtk_label_set_yalign (GTK_LABEL (label), 0.0); 113 | 114 | gtk_box_pack_start (GTK_BOX (priv->content_box), label, FALSE, FALSE, 0); 115 | gtk_widget_show_all (priv->content_box); 116 | } 117 | -------------------------------------------------------------------------------- /src/terminal-options.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001, 2002 Havoc Pennington 3 | * Copyright © 2002 Red Hat, Inc. 4 | * Copyright © 2002 Sun Microsystems 5 | * Copyright © 2003 Mariano Suarez-Alvarez 6 | * Copyright © 2008 Christian Persch 7 | * 8 | * Mate-terminal is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Mate-terminal is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program. If not, see . 20 | */ 21 | 22 | #ifndef TERMINAL_OPTIONS_H 23 | #define TERMINAL_OPTIONS_H 24 | 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | typedef struct 30 | { 31 | gboolean remote_arguments; 32 | char **env; 33 | char *startup_id; 34 | char *display_name; 35 | GList *initial_windows; 36 | gboolean default_window_menubar_forced; 37 | gboolean default_window_menubar_state; 38 | gboolean default_fullscreen; 39 | gboolean default_maximize; 40 | char *default_role; 41 | char *default_geometry; 42 | char *default_working_dir; 43 | char *default_title; 44 | char **exec_argv; 45 | char *default_profile; 46 | gboolean default_profile_is_id; 47 | 48 | gboolean execute; 49 | gboolean use_factory; 50 | double zoom; 51 | 52 | char *config_file; 53 | gboolean load_config; 54 | gboolean save_config; 55 | int initial_workspace; 56 | } TerminalOptions; 57 | 58 | typedef struct 59 | { 60 | char *profile; 61 | gboolean profile_is_id; 62 | char **exec_argv; 63 | char *title; 64 | char *working_dir; 65 | double zoom; 66 | guint zoom_set : 1; 67 | guint active : 1; 68 | guint attach_window : 1; 69 | } InitialTab; 70 | 71 | typedef struct 72 | { 73 | guint source_tag; 74 | 75 | GList *tabs; /* list of InitialTab */ 76 | 77 | gboolean force_menubar_state; 78 | gboolean menubar_state; 79 | 80 | gboolean start_fullscreen; 81 | gboolean start_maximized; 82 | 83 | char *geometry; 84 | char *role; 85 | 86 | } InitialWindow; 87 | 88 | #define TERMINAL_OPTION_ERROR (g_quark_from_static_string ("terminal-option-error")) 89 | 90 | typedef enum 91 | { 92 | TERMINAL_OPTION_ERROR_NOT_IN_FACTORY, 93 | TERMINAL_OPTION_ERROR_EXCLUSIVE_OPTIONS, 94 | TERMINAL_OPTION_ERROR_INVALID_CONFIG_FILE, 95 | TERMINAL_OPTION_ERROR_INCOMPATIBLE_CONFIG_FILE 96 | } TerminalOptionError; 97 | 98 | TerminalOptions *terminal_options_parse (const char *working_directory, 99 | const char *display_name, 100 | const char *startup_id, 101 | char **env, 102 | gboolean remote_arguments, 103 | gboolean ignore_unknown_options, 104 | int *argcp, 105 | char ***argvp, 106 | GError **error, 107 | ...) G_GNUC_NULL_TERMINATED; 108 | 109 | gboolean terminal_options_merge_config (TerminalOptions *options, 110 | GKeyFile *key_file, 111 | guint source_tag, 112 | GError **error); 113 | 114 | void terminal_options_ensure_window (TerminalOptions *options); 115 | 116 | void terminal_options_free (TerminalOptions *options); 117 | 118 | G_END_DECLS 119 | 120 | #endif /* !TERMINAL_OPTIONS_H */ 121 | -------------------------------------------------------------------------------- /po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: 12 | 13 | # This is the copyright holder that gets inserted into the header of the 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 15 | # package. (Note that the msgstr strings, extracted from the package's 16 | # sources, belong to the copyright holder of the package.) Translators are 17 | # expected to transfer the copyright for their translations to this person 18 | # or entity, or to disclaim their copyright. The empty string stands for 19 | # the public domain; in this case the translators are expected to disclaim 20 | # their copyright. 21 | COPYRIGHT_HOLDER = MATE Desktop Environment team 22 | 23 | # This tells whether or not to prepend "GNU " prefix to the package 24 | # name that gets inserted into the header of the $(DOMAIN).pot file. 25 | # Possible values are "yes", "no", or empty. If it is empty, try to 26 | # detect it automatically by scanning the files in $(top_srcdir) for 27 | # "GNU packagename" string. 28 | PACKAGE_GNU = 29 | 30 | # This is the email address or URL to which the translators shall report 31 | # bugs in the untranslated strings: 32 | # - Strings which are not entire sentences, see the maintainer guidelines 33 | # in the GNU gettext documentation, section 'Preparing Strings'. 34 | # - Strings which use unclear terms or require additional context to be 35 | # understood. 36 | # - Strings which make invalid assumptions about notation of date, time or 37 | # money. 38 | # - Pluralisation problems. 39 | # - Incorrect English spelling. 40 | # - Incorrect formatting. 41 | # It can be your email address, or a mailing list address where translators 42 | # can write to without being subscribed, or the URL of a web page through 43 | # which the translators can contact you. 44 | MSGID_BUGS_ADDRESS = 45 | 46 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 47 | # message catalogs shall be used. It is usually empty. 48 | EXTRA_LOCALE_CATEGORIES = 49 | 50 | # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' 51 | # context. Possible values are "yes" and "no". Set this to yes if the 52 | # package uses functions taking also a message context, like pgettext(), or 53 | # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. 54 | USE_MSGCTXT = no 55 | 56 | # These options get passed to msgmerge. 57 | # Useful options are in particular: 58 | # --previous to keep previous msgids of translated messages, 59 | # --quiet to reduce the verbosity. 60 | MSGMERGE_OPTIONS = 61 | 62 | # These options get passed to msginit. 63 | # If you want to disable line wrapping when writing PO files, add 64 | # --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and 65 | # MSGINIT_OPTIONS. 66 | MSGINIT_OPTIONS = 67 | 68 | # This tells whether or not to regenerate a PO file when $(DOMAIN).pot 69 | # has changed. Possible values are "yes" and "no". Set this to no if 70 | # the POT file is checked in the repository and the version control 71 | # program ignores timestamps. 72 | PO_DEPENDS_ON_POT = yes 73 | 74 | # This tells whether or not to forcibly update $(DOMAIN).pot and 75 | # regenerate PO files on "make dist". Possible values are "yes" and 76 | # "no". Set this to no if the POT file and PO files are maintained 77 | # externally. 78 | DIST_DEPENDS_ON_UPDATE_PO = yes 79 | -------------------------------------------------------------------------------- /src/terminal-util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001 Havoc Pennington 3 | * Copyright © 2008 Christian Persch 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 3 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef TERMINAL_UTIL_H 22 | #define TERMINAL_UTIL_H 23 | 24 | #include 25 | 26 | #include "terminal-screen.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define CONF_PROXY_SCHEMA "org.gnome.system.proxy" 31 | #define CONF_HTTP_PROXY_SCHEMA "org.gnome.system.proxy.http" 32 | #define CONF_HTTPS_PROXY_SCHEMA "org.gnome.system.proxy.https" 33 | #define CONF_FTP_PROXY_SCHEMA "org.gnome.system.proxy.ftp" 34 | #define CONF_SOCKS_PROXY_SCHEMA "org.gnome.system.proxy.socks" 35 | 36 | void terminal_util_set_unique_role (GtkWindow *window, const char *prefix); 37 | 38 | void terminal_util_show_error_dialog (GtkWindow *transient_parent, 39 | GtkWidget **weap_ptr, 40 | GError *error, 41 | const char *message_format, ...) G_GNUC_PRINTF(4, 5); 42 | 43 | void terminal_util_show_help (const char *topic, GtkWindow *transient_parent); 44 | 45 | void terminal_util_set_labelled_by (GtkWidget *widget, 46 | GtkLabel *label); 47 | void terminal_util_set_atk_name_description (GtkWidget *widget, 48 | const char *name, 49 | const char *desc); 50 | 51 | void terminal_util_open_url (GtkWidget *parent, 52 | const char *orig_url, 53 | TerminalURLFlavour flavor, 54 | guint32 user_time); 55 | 56 | char *terminal_util_resolve_relative_path (const char *path, 57 | const char *relative_path); 58 | 59 | void terminal_util_transform_uris_to_quoted_fuse_paths (char **uris); 60 | 61 | char *terminal_util_concat_uris (char **uris, 62 | gsize *length); 63 | 64 | char *terminal_util_get_licence_text (void); 65 | 66 | gboolean terminal_util_load_builder_resource (const char *path, 67 | const char *object_name, 68 | ...); 69 | 70 | gboolean terminal_util_dialog_response_on_delete (GtkWindow *widget); 71 | 72 | void terminal_util_key_file_set_string_escape (GKeyFile *key_file, 73 | const char *group, 74 | const char *key, 75 | const char *string); 76 | char *terminal_util_key_file_get_string_unescape (GKeyFile *key_file, 77 | const char *group, 78 | const char *key, 79 | GError **error); 80 | 81 | void terminal_util_key_file_set_argv (GKeyFile *key_file, 82 | const char *group, 83 | const char *key, 84 | int argc, 85 | char **argv); 86 | char **terminal_util_key_file_get_argv (GKeyFile *key_file, 87 | const char *group, 88 | const char *key, 89 | int *argc, 90 | GError **error); 91 | 92 | void terminal_util_add_proxy_env (GHashTable *env_table); 93 | 94 | typedef enum 95 | { 96 | FLAG_INVERT_BOOL = 1 << 0, 97 | } PropertyChangeFlags; 98 | 99 | void terminal_util_bind_object_property_to_widget (GObject *object, 100 | const char *object_prop, 101 | GtkWidget *widget, 102 | PropertyChangeFlags flags); 103 | 104 | void terminal_util_x11_clear_demands_attention (GdkWindow *window); 105 | 106 | G_END_DECLS 107 | 108 | #endif /* TERMINAL_UTIL_H */ 109 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | m4_define(mt_major_version, 1) 2 | m4_define(mt_minor_version, 24) 3 | m4_define(mt_micro_version, 0) 4 | m4_define(mt_version, mt_major_version.mt_minor_version.mt_micro_version) 5 | 6 | m4_define(mt_api_version, 0) 7 | 8 | AC_INIT([mate-terminal],[mt_version], 9 | [https://github.com/mate-desktop/mate-terminal/issues], 10 | [mate-terminal], [https://mate-desktop.org]) 11 | AC_CONFIG_SRCDIR([src/terminal.c]) 12 | AC_CONFIG_HEADERS([config.h]) 13 | AC_CONFIG_MACRO_DIR([m4]) 14 | 15 | AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz check-news]) 16 | 17 | AC_SUBST(TERMINAL_MAJOR_VERSION, mt_major_version) 18 | AC_SUBST(TERMINAL_MINOR_VERSION, mt_minor_version) 19 | AC_SUBST(TERMINAL_MICRO_VERSION, mt_micro_version) 20 | AC_SUBST(TERMINAL_API_VERSION, mt_api_version) 21 | 22 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) 23 | 24 | if test -z "$enable_maintainer_mode"; then 25 | enable_maintainer_mode=yes 26 | fi 27 | AM_MAINTAINER_MODE([enable]) 28 | 29 | MATE_COMMON_INIT 30 | MATE_DEBUG_CHECK([no]) 31 | MATE_COMPILE_WARNINGS([yes]) 32 | #MATE_MAINTAINER_MODE_DEFINES 33 | 34 | AC_C_BIGENDIAN 35 | 36 | PKG_PROG_PKG_CONFIG 37 | AC_PROG_CC 38 | AC_HEADER_STDC 39 | AM_PROG_LIBTOOL 40 | 41 | GLIB_REQUIRED=2.50.0 42 | GIO_REQUIRED=2.50.0 43 | GTK_REQUIRED=3.22.0 44 | VTE_REQUIRED=0.48 45 | DCONF_REQUIRED=0.13.4 46 | 47 | PKG_CHECK_MODULES([TERM], 48 | [vte-2.91 >= $VTE_REQUIRED 49 | glib-2.0 >= $GLIB_REQUIRED 50 | gthread-2.0 51 | gio-2.0 >= $GIO_REQUIRED 52 | gtk+-3.0 >= $GTK_REQUIRED 53 | dconf >= $DCONF_REQUIRED 54 | x11]) 55 | 56 | # ******** 57 | # smclient 58 | # ******** 59 | 60 | PKG_CHECK_MODULES(SMCLIENT, sm >= 1.0.0) 61 | AC_SUBST([SMCLIENT_CFLAGS]) 62 | AC_SUBST([SMCLIENT_LIBS]) 63 | 64 | # ***** 65 | # GSettings 66 | # ***** 67 | 68 | GLIB_GSETTINGS 69 | 70 | GLIB_GENMARSHAL="$($PKG_CONFIG --variable=glib_genmarshal glib-2.0)" 71 | AC_SUBST([GLIB_GENMARSHAL]) 72 | GLIB_MKENUMS="$($PKG_CONFIG --variable=glib_mkenums glib-2.0)" 73 | AC_SUBST([GLIB_MKENUMS]) 74 | 75 | # ********************** 76 | # GLIB_COMPILE_RESOURCES 77 | # ********************** 78 | AC_ARG_VAR([GLIB_COMPILE_RESOURCES],[glib-compile-resources bin]) 79 | AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources],[]) 80 | if test -z "$GLIB_COMPILE_RESOURCES"; then 81 | AC_MSG_ERROR([glib-compile-resources not found]) 82 | fi 83 | 84 | # ******* 85 | # XMLLINT 86 | # ******* 87 | AC_ARG_VAR([XMLLINT],[xmllint bin]) 88 | AC_PATH_PROG([XMLLINT],[xmllint],[]) 89 | if test -z "$XMLLINT"; then 90 | AC_MSG_ERROR([xmllint not found]) 91 | fi 92 | 93 | # ***** 94 | # S/Key 95 | # ***** 96 | 97 | AC_MSG_CHECKING([whether to enable s/key support]) 98 | AC_ARG_ENABLE([skey], 99 | [AS_HELP_STRING([--disable-skey],[disable s/key support (default: enabled)])], 100 | [],[enable_skey=yes]) 101 | AC_MSG_RESULT([$enable_skey]) 102 | 103 | if test "$enable_skey" = "yes"; then 104 | AC_DEFINE([ENABLE_SKEY],[1],[Define if s/key support is enabled]) 105 | fi 106 | 107 | AM_CONDITIONAL([ENABLE_SKEY],[test "$enable_skey" = "yes"]) 108 | 109 | # ************* 110 | # Documentation 111 | # ************* 112 | 113 | YELP_HELP_INIT 114 | 115 | # **************************** 116 | 117 | # **************************** 118 | AM_GNU_GETTEXT_VERSION([0.19.8]) 119 | AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8]) 120 | AM_GNU_GETTEXT([external]) 121 | 122 | GETTEXT_PACKAGE=mate-terminal 123 | AC_SUBST([GETTEXT_PACKAGE]) 124 | AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) 125 | 126 | AC_CONFIG_FILES([ 127 | Makefile 128 | mate-terminal.desktop.in 129 | src/Makefile 130 | src/org.mate.terminal.gschema.xml 131 | src/terminal-version.h 132 | help/Makefile 133 | po/Makefile.in 134 | ]) 135 | 136 | AM_COND_IF([ENABLE_SKEY], 137 | [AC_CONFIG_FILES([src/skey/Makefile])]) 138 | 139 | AC_OUTPUT 140 | 141 | # **************************** 142 | 143 | echo " 144 | mate-terminal-$VERSION: 145 | 146 | prefix: ${prefix} 147 | source code location: ${srcdir} 148 | compiler: ${CC} 149 | cflags: ${CFLAGS} 150 | warning flags: ${WARN_CFLAGS} 151 | linker flags: ${LDFLAGS} 152 | 153 | s/key support: ${enable_skey} 154 | " 155 | -------------------------------------------------------------------------------- /src/terminal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /mate-terminal.1: -------------------------------------------------------------------------------- 1 | .TH MATE-TERMINAL "1" "11 December 2014" "MATE Desktop Environment" "User Commands" 2 | .\" Please adjust this date whenever revising the manpage. 3 | .\" 4 | .SH NAME 5 | mate-terminal \- manual page for MATE Terminal Emulator 6 | .SH DESCRIPTION 7 | .SS "Usage:" 8 | .IP 9 | mate\-terminal [OPTION...] 10 | .SS "Help Options:" 11 | .TP 12 | \fB\-h\fR, \fB\-\-help\fR 13 | Show help options 14 | .TP 15 | \fB\-\-help\-all\fR 16 | Show all help options 17 | .TP 18 | \fB\-\-help\-terminal\fR 19 | Show terminal options 20 | .TP 21 | \fB\-\-help\-window\-options\fR 22 | Show per\-window options 23 | .TP 24 | \fB\-\-help\-terminal\-options\fR 25 | Show per\-terminal options 26 | .TP 27 | \fB\-\-help\-gtk\fR 28 | Show GTK+ Options 29 | .TP 30 | \fB\-\-help\-sm\-client\fR 31 | Show session management options 32 | .SS "Options to open new windows or terminal tabs; more than one of these may be specified:" 33 | .TP 34 | \fB\-\-window\fR 35 | Open a new window containing a tab with the default profile 36 | .TP 37 | \fB\-\-tab\fR 38 | Open a new tab in the last\-opened window with the default profile 39 | .SS "Window options; if used before the first --window or --tab argument, sets the default for all windows:" 40 | .TP 41 | \fB\-\-show\-menubar\fR 42 | Turn on the menubar 43 | .TP 44 | \fB\-\-hide\-menubar\fR 45 | Turn off the menubar 46 | .TP 47 | \fB\-\-maximize\fR 48 | Maximize the window 49 | .TP 50 | \fB\-\-full\-screen\fR 51 | Full\-screen the window 52 | .TP 53 | \fB\-\-geometry\fR=\fIGEOMETRY\fR 54 | Set the window size; for example: 80x24, or 80x24+200+200 (COLSxROWS+X+Y) 55 | .TP 56 | \fB\-\-role\fR=\fIROLE\fR 57 | Set the window role 58 | .TP 59 | \fB\-\-active\fR 60 | Set the last specified tab as the active one in its window 61 | .SS "Terminal options; if used before the first --window or --tab argument, sets the default for all terminals:" 62 | .TP 63 | \fB\-e\fR, \fB\-\-command\fR 64 | Execute the argument to this option inside the terminal 65 | .TP 66 | \fB\-x\fR, \fB\-\-execute\fR 67 | Execute the remainder of the command line inside the terminal 68 | .TP 69 | \fB\-\-profile\fR=\fIPROFILE\-NAME\fR 70 | Use the given profile instead of the default profile 71 | .TP 72 | \fB\-t\fR, \fB\-\-title\fR=\fITITLE\fR 73 | Set the terminal title 74 | .TP 75 | \fB\-\-working\-directory\fR=\fIDIRNAME\fR 76 | Set the working directory 77 | .TP 78 | \fB\-\-zoom\fR=\fIZOOM\fR 79 | Set the terminal's zoom factor (1.0 = normal size) 80 | .PP 81 | GTK+ Options 82 | .TP 83 | \fB\-\-class\fR=\fICLASS\fR 84 | Program class as used by the window manager 85 | .TP 86 | \fB\-\-name\fR=\fINAME\fR 87 | Program name as used by the window manager 88 | .TP 89 | \fB\-\-screen\fR=\fISCREEN\fR 90 | X screen to use 91 | .TP 92 | \fB\-\-sync\fR 93 | Make X calls synchronous 94 | .TP 95 | \fB\-\-gtk\-module\fR=\fIMODULES\fR 96 | Load additional GTK+ modules 97 | .TP 98 | \fB\-\-g\-fatal\-warnings\fR 99 | Make all warnings fatal 100 | .SS "Session management options:" 101 | .TP 102 | \fB\-\-sm\-client\-disable\fR 103 | Disable connection to session manager 104 | .TP 105 | \fB\-\-sm\-client\-state\-file\fR=\fIFILE\fR 106 | Specify file containing saved configuration 107 | .TP 108 | \fB\-\-sm\-client\-id\fR=\fIID\fR 109 | Specify session management ID 110 | .SS "Application Options:" 111 | .TP 112 | \fB\-\-disable\-factory\fR 113 | Do not register with the activation nameserver, do not re\-use an active terminal 114 | .TP 115 | \fB\-\-load\-config\fR=\fIFILE\fR 116 | Load a terminal configuration file 117 | .TP 118 | \fB\-\-save\-config\fR=\fIFILE\fR 119 | Save the terminal configuration to a file 120 | .TP 121 | \fB\-\-display\fR=\fIDISPLAY\fR 122 | X display to use 123 | .PP 124 | .SH "Author" 125 | Adam Erdman (2014) and Abel McClendon (2014) 126 | .P 127 | for the 128 | .B Mate Documentation Team. 129 | .SH "See Also" 130 | The full documentation for 131 | .B mate-terminal 132 | is maintained as a Texinfo manual. 133 | .PP 134 | If the 135 | .B info 136 | and 137 | .B mate-terminal 138 | programs are properly installed at your site, the command 139 | .IP 140 | .B info mate-terminal 141 | .PP 142 | should give you access to the complete manual. 143 | .PP 144 | More 145 | .B MATE Terminal 146 | documentation can be found from the 147 | .B "Help" 148 | menu, or by pressing the 149 | .B F1 150 | key. 151 | .PP 152 | Further information may also be available at: 153 | .B http://wiki.mate-desktop.org/docs 154 | -------------------------------------------------------------------------------- /help/C/legal.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | Permission is granted to copy, distribute and/or modify this 6 | document under the terms of the GNU Free Documentation 7 | License (GFDL), Version 1.1 or any later version published 8 | by the Free Software Foundation with no Invariant Sections, 9 | no Front-Cover Texts, and no Back-Cover Texts. You can find 10 | a copy of the GFDL at this link or in the file COPYING-DOCS 11 | distributed with this manual. 12 | 13 | This manual is part of a collection of MATE manuals 14 | distributed under the GFDL. If you want to distribute this 15 | manual separately from the collection, you can do so by 16 | adding a copy of the license to the manual, as described in 17 | section 6 of the license. 18 | 19 | 20 | 21 | Many of the names used by companies to distinguish their 22 | products and services are claimed as trademarks. Where those 23 | names appear in any MATE documentation, and the members of 24 | the MATE Documentation Project are made aware of those 25 | trademarks, then the names are in capital letters or initial 26 | capital letters. 27 | 28 | 29 | 30 | DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED 31 | UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE 32 | WITH THE FURTHER UNDERSTANDING THAT: 33 | 34 | 35 | 36 | DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, 37 | WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR 38 | IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES 39 | THAT THE DOCUMENT OR MODIFIED VERSION OF THE 40 | DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR 41 | A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE 42 | RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE 43 | OF THE DOCUMENT OR MODIFIED VERSION OF THE 44 | DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR 45 | MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, 46 | YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY 47 | CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY 48 | SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER 49 | OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS 50 | LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED 51 | VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER 52 | EXCEPT UNDER THIS DISCLAIMER; AND 53 | 54 | 55 | 56 | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL 57 | THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), 58 | CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, 59 | INITIAL WRITER, ANY CONTRIBUTOR, OR ANY 60 | DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION 61 | OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH 62 | PARTIES, BE LIABLE TO ANY PERSON FOR ANY 63 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR 64 | CONSEQUENTIAL DAMAGES OF ANY CHARACTER 65 | INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS 66 | OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR 67 | MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR 68 | LOSSES ARISING OUT OF OR RELATING TO USE OF THE 69 | DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, 70 | EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF 71 | THE POSSIBILITY OF SUCH DAMAGES. 72 | 73 | 74 | 75 | 76 | 77 | Feedback 78 | To report a bug or make a suggestion regarding the MATE Terminal application or this manual, follow the directions in the MATE Feedback Page. 79 | 80 | -------------------------------------------------------------------------------- /src/skey/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "skey.h" 10 | 11 | typedef struct 12 | { 13 | SKeyAlgorithm algorithm; 14 | const char *passphrase; 15 | const char *seed; 16 | int count; 17 | const char *hex; 18 | const char *btoe; 19 | } TestEntry; 20 | 21 | static const TestEntry tests[] = 22 | { 23 | { MD4, "This is a test.", "TeSt", 0, "D185 4218 EBBB 0B51", "ROME MUG FRED SCAN LIVE LACE" }, 24 | { MD4, "This is a test.", "TeSt", 1, "6347 3EF0 1CD0 B444", "CARD SAD MINI RYE COL KIN" }, 25 | { MD4, "This is a test.", "TeSt", 99, "C5E6 1277 6E6C 237A", "NOTE OUT IBIS SINK NAVE MODE" }, 26 | { MD4, "AbCdEfGhIjK", "alpha1", 0, "5007 6F47 EB1A DE4E", "AWAY SEN ROOK SALT LICE MAP" }, 27 | { MD4, "AbCdEfGhIjK", "alpha1", 1, "65D2 0D19 49B5 F7AB", "CHEW GRIM WU HANG BUCK SAID" }, 28 | { MD4, "AbCdEfGhIjK", "alpha1", 99, "D150 C82C CE6F 62D1", "ROIL FREE COG HUNK WAIT COCA" }, 29 | { MD4, "OTP's are good", "correct", 0, "849C 79D4 F6F5 5388", "FOOL STEM DONE TOOL BECK NILE" }, 30 | { MD4, "OTP's are good", "correct", 1, "8C09 92FB 2508 47B1", "GIST AMOS MOOT AIDS FOOD SEEM" }, 31 | { MD4, "OTP's are good", "correct", 99, "3F3B F4B4 145F D74B", "TAG SLOW NOV MIN WOOL KENO" }, 32 | { MD5, "This is a test.", "TeSt", 0, "9E87 6134 D904 99DD", "INCH SEA ANNE LONG AHEM TOUR" }, 33 | { MD5, "This is a test.", "TeSt", 1, "7965 E054 36F5 029F", "EASE OIL FUM CURE AWRY AVIS" }, 34 | { MD5, "This is a test.", "TeSt", 99, "50FE 1962 C496 5880", "BAIL TUFT BITS GANG CHEF THY" }, 35 | { MD5, "AbCdEfGhIjK", "alpha1", 0, "8706 6DD9 644B F206", "FULL PEW DOWN ONCE MORT ARC" }, 36 | { MD5, "AbCdEfGhIjK", "alpha1", 1, "7CD3 4C10 40AD D14B", "FACT HOOF AT FIST SITE KENT" }, 37 | { MD5, "AbCdEfGhIjK", "alpha1", 99, "5AA3 7A81 F212 146C", "BODE HOP JAKE STOW JUT RAP" }, 38 | { MD5, "OTP's are good", "correct", 0, "F205 7539 43DE 4CF9", "ULAN NEW ARMY FUSE SUIT EYED" }, 39 | { MD5, "OTP's are good", "correct", 1, "DDCD AC95 6F23 4937", "SKIM CULT LOB SLAM POE HOWL" }, 40 | { MD5, "OTP's are good", "correct", 99, "B203 E28F A525 BE47", "LONG IVY JULY AJAR BOND LEE" }, 41 | { SHA1, "This is a test.", "TeSt", 0, "BB9E 6AE1 979D 8FF4", "MILT VARY MAST OK SEES WENT" }, 42 | { SHA1, "This is a test.", "TeSt", 1, "63D9 3663 9734 385B", "CART OTTO HIVE ODE VAT NUT" }, 43 | { SHA1, "This is a test.", "TeSt", 99, "87FE C776 8B73 CCF9", "GAFF WAIT SKID GIG SKY EYED" }, 44 | { SHA1, "AbCdEfGhIjK", "alpha1", 0, "AD85 F658 EBE3 83C9", "LEST OR HEEL SCOT ROB SUIT" }, 45 | { SHA1, "AbCdEfGhIjK", "alpha1", 1, "D07C E229 B5CF 119B", "RITE TAKE GELD COST TUNE RECK" }, 46 | { SHA1, "AbCdEfGhIjK", "alpha1", 99, "27BC 7103 5AAF 3DC6", "MAY STAR TIN LYON VEDA STAN" }, 47 | { SHA1, "OTP's are good", "correct", 0, "D51F 3E99 BF8E 6F0B", "RUST WELT KICK FELL TAIL FRAU" }, 48 | { SHA1, "OTP's are good", "correct", 1, "82AE B52D 9437 74E4", "FLIT DOSE ALSO MEW DRUM DEFY" }, 49 | { SHA1, "OTP's are good", "correct", 99, "4F29 6A74 FE15 67EC", "AURA ALOE HURL WING BERG WAIT" }, 50 | 51 | { SHA1, "Passphrase", "IiIi", 100, "27F4 01CC 0AC8 5112", "MEG JACK DIET GAD FORK GARY" } 52 | }; 53 | 54 | static const char *algos[] = 55 | { 56 | "MD4", 57 | "MD5", 58 | "SHA1" 59 | }; 60 | 61 | static void 62 | skey_test (gconstpointer data) 63 | { 64 | const TestEntry *test = (const TestEntry *) data; 65 | char *key; 66 | 67 | key = skey (test->algorithm, 68 | test->count, 69 | test->seed, 70 | test->passphrase); 71 | g_assert (key != NULL); 72 | g_assert (strcmp (key, test->btoe) == 0); 73 | free (key); 74 | } 75 | 76 | int main(int argc, char *argv[]) 77 | { 78 | guint i; 79 | 80 | if (!setlocale (LC_ALL, "")) 81 | g_error ("Locale not supported by C library!\n"); 82 | 83 | g_test_init (&argc, &argv, NULL); 84 | g_test_bug_base ("http://bugzilla.mate.org/enter_bug.cgi?product=mate-terminal"); 85 | 86 | for (i = 0; i < G_N_ELEMENTS (tests); ++i) 87 | { 88 | const TestEntry *test = &tests[i]; 89 | char *name; 90 | 91 | name = g_strdup_printf ("/%s/%s/%s/%d/%s/%s", 92 | algos[test->algorithm], 93 | test->passphrase, 94 | test->seed, 95 | test->count, 96 | test->hex, 97 | test->btoe); 98 | g_test_add_data_func (name, test, skey_test); 99 | g_free (name); 100 | } 101 | 102 | return g_test_run (); 103 | } 104 | -------------------------------------------------------------------------------- /src/terminal-window.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001 Havoc Pennington 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef TERMINAL_WINDOW_H 21 | #define TERMINAL_WINDOW_H 22 | 23 | #include 24 | 25 | #include "terminal-screen.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define TERMINAL_TYPE_WINDOW (terminal_window_get_type ()) 30 | #define TERMINAL_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TERMINAL_TYPE_WINDOW, TerminalWindow)) 31 | #define TERMINAL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_WINDOW, TerminalWindowClass)) 32 | #define TERMINAL_IS_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TERMINAL_TYPE_WINDOW)) 33 | #define TERMINAL_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_WINDOW)) 34 | #define TERMINAL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_WINDOW, TerminalWindowClass)) 35 | 36 | typedef struct _TerminalWindowClass TerminalWindowClass; 37 | typedef struct _TerminalWindowPrivate TerminalWindowPrivate; 38 | 39 | struct _TerminalWindow 40 | { 41 | GtkWindow parent_instance; 42 | 43 | TerminalWindowPrivate *priv; 44 | }; 45 | 46 | struct _TerminalWindowClass 47 | { 48 | GtkWindowClass parent_class; 49 | 50 | }; 51 | 52 | GType terminal_window_get_type (void) G_GNUC_CONST; 53 | 54 | TerminalWindow* terminal_window_new (void); 55 | 56 | void terminal_window_set_is_restored (TerminalWindow *window); 57 | 58 | GtkUIManager *terminal_window_get_ui_manager (TerminalWindow *window); 59 | 60 | void terminal_window_add_screen (TerminalWindow *window, 61 | TerminalScreen *screen, 62 | int position); 63 | 64 | void terminal_window_remove_screen (TerminalWindow *window, 65 | TerminalScreen *screen); 66 | 67 | void terminal_window_move_screen (TerminalWindow *source_window, 68 | TerminalWindow *dest_window, 69 | TerminalScreen *screen, 70 | int dest_position); 71 | 72 | /* Menubar visibility is part of session state, except that 73 | * if it isn't restored from session, the window gets the setting 74 | * from the profile of the first screen added to the window 75 | */ 76 | void terminal_window_set_menubar_visible (TerminalWindow *window, 77 | gboolean setting); 78 | gboolean terminal_window_get_menubar_visible (TerminalWindow *window); 79 | 80 | void terminal_window_switch_screen (TerminalWindow *window, 81 | TerminalScreen *screen); 82 | TerminalScreen* terminal_window_get_active (TerminalWindow *window); 83 | 84 | GList* terminal_window_list_screen_containers (TerminalWindow *window); 85 | 86 | void terminal_window_update_geometry (TerminalWindow *window); 87 | void 88 | terminal_window_update_size (TerminalWindow *window, 89 | TerminalScreen *screen, 90 | gboolean even_if_mapped); 91 | gboolean 92 | terminal_window_update_size_set_geometry (TerminalWindow *window, 93 | TerminalScreen *screen, 94 | gboolean even_if_mapped, 95 | gchar *geometry_string); 96 | 97 | GtkWidget* terminal_window_get_notebook (TerminalWindow *window); 98 | 99 | void terminal_window_save_state (TerminalWindow *window, 100 | GKeyFile *key_file, 101 | const char *group); 102 | void 103 | terminal_window_update_copy_selection (TerminalScreen *screen, 104 | TerminalWindow *window); 105 | 106 | TerminalWindow *terminal_window_get_latest_focused (TerminalWindow *window1, 107 | TerminalWindow *window2); 108 | 109 | G_END_DECLS 110 | 111 | #endif /* TERMINAL_WINDOW_H */ 112 | -------------------------------------------------------------------------------- /.build.yml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # THE FOLLOWING LINES IS USED BY docker-build 3 | ########################################################## 4 | requires: 5 | archlinux: 6 | # Useful URL: https://git.archlinux.org/svntogit/community.git/tree/mate-terminal 7 | - autoconf-archive 8 | - clang 9 | - gcc 10 | - git 11 | - libsm 12 | - make 13 | - mate-common 14 | - mate-desktop 15 | - vte3 16 | - which 17 | - yelp-tools 18 | 19 | debian: 20 | # Useful URL: https://github.com/mate-desktop/debian-packages 21 | # Useful URL: https://salsa.debian.org/debian-mate-team/mate-terminal 22 | - autoconf-archive 23 | - autopoint 24 | - clang 25 | - clang-tools 26 | - cppcheck 27 | - gcc 28 | - git 29 | - libdconf-dev 30 | - libglib2.0-dev 31 | - libgtk-3-dev 32 | - libsm-dev 33 | - libvte-2.91-dev 34 | - libx11-dev 35 | - make 36 | - mate-common 37 | - yelp-tools 38 | 39 | fedora: 40 | # Useful URL: https://src.fedoraproject.org/cgit/rpms/mate-terminal.git 41 | - autoconf-archive 42 | - clang 43 | - clang-analyzer 44 | - cppcheck-htmlreport 45 | - gcc 46 | - dconf-devel 47 | - desktop-file-utils 48 | - git 49 | - gtk3-devel 50 | - libSM-devel 51 | - make 52 | - mate-common 53 | - redhat-rpm-config 54 | - vte291-devel 55 | 56 | ubuntu: 57 | - autoconf-archive 58 | - autopoint 59 | - clang 60 | - clang-tools 61 | - git 62 | - libdconf-dev 63 | - libglib2.0-dev 64 | - libgtk-3-dev 65 | - libsm-dev 66 | - libvte-2.91-dev 67 | - libx11-dev 68 | - make 69 | - mate-common 70 | - yelp-tools 71 | 72 | variables: 73 | - CFLAGS="-Wall -Werror=format-security -Wredundant-decls" 74 | - 'CHECKERS=" 75 | -enable-checker deadcode.DeadStores 76 | -enable-checker alpha.deadcode.UnreachableCode 77 | -enable-checker alpha.core.CastSize 78 | -enable-checker alpha.core.CastToStruct 79 | -enable-checker alpha.core.IdenticalExpr 80 | -enable-checker alpha.core.SizeofPtr 81 | -enable-checker alpha.security.ArrayBoundV2 82 | -enable-checker alpha.security.MallocOverflow 83 | -enable-checker alpha.security.ReturnPtrRange 84 | -enable-checker alpha.unix.SimpleStream 85 | -enable-checker alpha.unix.cstring.BufferOverlap 86 | -enable-checker alpha.unix.cstring.NotNullTerminated 87 | -enable-checker alpha.unix.cstring.OutOfBounds 88 | -enable-checker alpha.core.FixedAddr 89 | -enable-checker security.insecureAPI.strcpy"' 90 | 91 | before_scripts: 92 | - if [ ${DISTRO_NAME} == "debian" ];then 93 | - egrep -lRZ 'G_GNUC_BEGIN_IGNORE_DEPRECATIONS' . | xargs -0 -l sed -i -e 's/G_GNUC_BEGIN_IGNORE_DEPRECATIONS/ /g' 94 | - egrep -lRZ 'G_GNUC_END_IGNORE_DEPRECATIONS' . | xargs -0 -l sed -i -e 's/G_GNUC_END_IGNORE_DEPRECATIONS/ /g' 95 | - fi 96 | # Install mate-common from tarball 97 | - cd ${START_DIR} 98 | - '[ -f mate-common-1.23.3.tar.xz ] || curl -Ls -o mate-common-1.23.3.tar.xz http://pub.mate-desktop.org/releases/1.23/mate-common-1.23.3.tar.xz' 99 | - tar xf mate-common-1.23.3.tar.xz 100 | - cd mate-common-1.23.3 101 | - if [ ${DISTRO_NAME} == "debian" -o ${DISTRO_NAME} == "ubuntu" ];then 102 | - ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu 103 | - else 104 | - ./configure --prefix=/usr 105 | - fi 106 | - make 107 | - make install 108 | 109 | build_scripts: 110 | - ./autogen.sh --enable-compile-warnings=maximum 111 | - scan-build $CHECKERS ./configure --enable-compile-warnings=maximum 112 | - if [ $CPU_COUNT -gt 1 ]; then 113 | - scan-build $CHECKERS --keep-cc -o html-report make -j $CPU_COUNT 114 | - else 115 | - scan-build $CHECKERS --keep-cc -o html-report make 116 | - fi 117 | - if [ ${DISTRO_NAME} == "debian" ];then 118 | - cppcheck --enable=warning,style,performance,portability,information,missingInclude . 119 | - fi 120 | 121 | after_scripts: 122 | - if [ ${DISTRO_NAME} == "fedora" ];then 123 | - cppcheck --xml --output-file=cppcheck.xml --enable=warning,style,performance,portability,information,missingInclude . 124 | - cppcheck-htmlreport --title=${REPO_NAME} --file=cppcheck.xml --report-dir=cppcheck-htmlreport 125 | - ./gen-index -l 20 -i https://github.com/${OWNER_NAME}/mate-icon-theme/raw/master/mate/16x16/apps/utilities-terminal.png 126 | - fi 127 | - make distcheck 128 | 129 | releases: 130 | draft: false 131 | prerelease: false 132 | checksum: true 133 | file_glob: true 134 | files: mate-terminal-*.tar.xz 135 | github_release: 136 | tags: true 137 | overwrite: true 138 | base_version: 1.20.0 139 | notify_servers: 140 | - https://release.mate-desktop.org/release 141 | -------------------------------------------------------------------------------- /src/eggsmclient.h: -------------------------------------------------------------------------------- 1 | /* eggsmclient.h 2 | * Copyright (C) 2007 Novell, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef __EGG_SM_CLIENT_H__ 21 | #define __EGG_SM_CLIENT_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define EGG_TYPE_SM_CLIENT (egg_sm_client_get_type ()) 28 | #define EGG_SM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT, EggSMClient)) 29 | #define EGG_SM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_SM_CLIENT, EggSMClientClass)) 30 | #define EGG_IS_SM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_SM_CLIENT)) 31 | #define EGG_IS_SM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_SM_CLIENT)) 32 | #define EGG_SM_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_SM_CLIENT, EggSMClientClass)) 33 | 34 | typedef struct _EggSMClient EggSMClient; 35 | typedef struct _EggSMClientClass EggSMClientClass; 36 | typedef struct _EggSMClientPrivate EggSMClientPrivate; 37 | 38 | typedef enum 39 | { 40 | EGG_SM_CLIENT_END_SESSION_DEFAULT, 41 | EGG_SM_CLIENT_LOGOUT, 42 | EGG_SM_CLIENT_REBOOT, 43 | EGG_SM_CLIENT_SHUTDOWN 44 | } EggSMClientEndStyle; 45 | 46 | typedef enum 47 | { 48 | EGG_SM_CLIENT_MODE_DISABLED, 49 | EGG_SM_CLIENT_MODE_NO_RESTART, 50 | EGG_SM_CLIENT_MODE_NORMAL 51 | } EggSMClientMode; 52 | 53 | struct _EggSMClient 54 | { 55 | GObject parent; 56 | 57 | }; 58 | 59 | struct _EggSMClientClass 60 | { 61 | GObjectClass parent_class; 62 | 63 | /* signals */ 64 | void (*save_state) (EggSMClient *client, 65 | GKeyFile *state_file); 66 | 67 | void (*quit_requested) (EggSMClient *client); 68 | void (*quit_cancelled) (EggSMClient *client); 69 | void (*quit) (EggSMClient *client); 70 | 71 | /* virtual methods */ 72 | void (*startup) (EggSMClient *client, 73 | const char *client_id); 74 | void (*set_restart_command) (EggSMClient *client, 75 | int argc, 76 | const char **argv); 77 | void (*set_discard_command) (EggSMClient *client, 78 | int argc, 79 | const char **argv); 80 | void (*will_quit) (EggSMClient *client, 81 | gboolean will_quit); 82 | gboolean (*end_session) (EggSMClient *client, 83 | EggSMClientEndStyle style, 84 | gboolean request_confirmation); 85 | 86 | /* Padding for future expansion */ 87 | void (*_egg_reserved1) (void); 88 | void (*_egg_reserved2) (void); 89 | void (*_egg_reserved3) (void); 90 | void (*_egg_reserved4) (void); 91 | }; 92 | 93 | GType egg_sm_client_get_type (void) G_GNUC_CONST; 94 | 95 | GOptionGroup *egg_sm_client_get_option_group (void); 96 | 97 | /* Initialization */ 98 | void egg_sm_client_set_mode (EggSMClientMode mode); 99 | EggSMClientMode egg_sm_client_get_mode (void); 100 | EggSMClient *egg_sm_client_get (void); 101 | 102 | /* Resuming a saved session */ 103 | gboolean egg_sm_client_is_resumed (EggSMClient *client); 104 | GKeyFile *egg_sm_client_get_state_file (EggSMClient *client); 105 | 106 | /* Alternate means of saving state */ 107 | void egg_sm_client_set_restart_command (EggSMClient *client, 108 | int argc, 109 | const char **argv); 110 | void egg_sm_client_set_discard_command (EggSMClient *client, 111 | int argc, 112 | const char **argv); 113 | 114 | /* Handling "quit_requested" signal */ 115 | void egg_sm_client_will_quit (EggSMClient *client, 116 | gboolean will_quit); 117 | 118 | /* Initiate a logout/reboot/shutdown */ 119 | gboolean egg_sm_client_end_session (EggSMClientEndStyle style, 120 | gboolean request_confirmation); 121 | 122 | G_END_DECLS 123 | 124 | 125 | #endif /* __EGG_SM_CLIENT_H__ */ 126 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | NULL = 2 | 3 | if ENABLE_SKEY 4 | SUBDIRS = skey 5 | endif 6 | 7 | bin_PROGRAMS = mate-terminal 8 | 9 | BUILT_SOURCES = \ 10 | terminal-marshal.c \ 11 | terminal-marshal.h \ 12 | terminal-resources.c \ 13 | terminal-resources.h \ 14 | terminal-type-builtins.c \ 15 | terminal-type-builtins.h \ 16 | $(NULL) 17 | 18 | mate_terminal_SOURCES= \ 19 | eggshell.c \ 20 | eggshell.h \ 21 | profile-editor.c \ 22 | profile-editor.h \ 23 | terminal.c \ 24 | terminal-accels.c \ 25 | terminal-accels.h \ 26 | terminal-app.c \ 27 | terminal-app.h \ 28 | terminal-close-button.h \ 29 | terminal-close-button.c \ 30 | terminal-debug.c \ 31 | terminal-debug.h \ 32 | terminal-encoding.c \ 33 | terminal-encoding.h \ 34 | terminal-info-bar.c \ 35 | terminal-info-bar.h \ 36 | terminal-intl.h \ 37 | terminal-options.c \ 38 | terminal-options.h \ 39 | terminal-profile.c \ 40 | terminal-profile.h \ 41 | terminal-screen.c \ 42 | terminal-screen.h \ 43 | terminal-screen-container.c \ 44 | terminal-screen-container.h \ 45 | terminal-search-dialog.c \ 46 | terminal-search-dialog.h \ 47 | terminal-tab-label.c \ 48 | terminal-tab-label.h \ 49 | terminal-tabs-menu.c \ 50 | terminal-tabs-menu.h \ 51 | terminal-util.c \ 52 | terminal-util.h \ 53 | terminal-version.h \ 54 | terminal-window.c \ 55 | terminal-window.h \ 56 | $(NULL) 57 | 58 | if ENABLE_SKEY 59 | mate_terminal_SOURCES += \ 60 | skey-popup.c \ 61 | skey-popup.h \ 62 | $(NULL) 63 | endif 64 | 65 | nodist_mate_terminal_SOURCES= $(BUILT_SOURCES) 66 | 67 | mate_terminal_CPPFLAGS = \ 68 | -DTERMINAL_COMPILATION \ 69 | -DTERMINAL_RESOURCES_PATH_PREFIX="\"/org/mate/terminal\"" \ 70 | -DTERM_DATADIR="\"$(datadir)\"" \ 71 | -DTERM_LOCALEDIR="\"$(datadir)/locale\"" \ 72 | -DTERM_PKGDATADIR="\"$(pkgdatadir)\"" \ 73 | -DTERM_HELPDIR="\"$(HELP_DIR)\"" \ 74 | -DSN_API_NOT_YET_FROZEN \ 75 | -DGDK_MULTIHEAD_SAFE \ 76 | -DG_DISABLE_SINGLE_INCLUDES \ 77 | -DPANGO_DISABLE_SINGLE_INCLUDES \ 78 | -DATK_DISABLE_SINGLE_INCLUDES \ 79 | -DGDK_DISABLE_SINGLE_INCLUDES \ 80 | -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES \ 81 | -DGTK_DISABLE_SINGLE_INCLUDES \ 82 | $(DISABLE_DEPRECATED) \ 83 | $(AM_CPPFLAGS) 84 | 85 | mate_terminal_CFLAGS = \ 86 | $(TERM_CFLAGS) \ 87 | $(WARN_CFLAGS) \ 88 | $(AM_CFLAGS) 89 | 90 | mate_terminal_LDFLAGS = -lICE 91 | 92 | mate_terminal_LDADD = \ 93 | $(TERM_LIBS) 94 | 95 | if ENABLE_SKEY 96 | mate_terminal_LDADD += \ 97 | skey/libskey.la 98 | endif 99 | 100 | mate_terminal_SOURCES += \ 101 | eggdesktopfile.c \ 102 | eggdesktopfile.h \ 103 | eggsmclient.c \ 104 | eggsmclient.h \ 105 | eggsmclient-private.h \ 106 | eggsmclient-xsmp.c \ 107 | $(NULL) 108 | 109 | mate_terminal_CFLAGS += $(SMCLIENT_CFLAGS) 110 | mate_terminal_CPPFLAGS += -DEGG_SM_CLIENT_BACKEND_XSMP 111 | mate_terminal_LDADD += $(SMCLIENT_LIBS) 112 | 113 | TYPES_H_FILES = \ 114 | terminal-profile.h \ 115 | $(NULL) 116 | 117 | terminal-type-builtins.h: stamp-terminal-type-builtins.h 118 | @true 119 | 120 | stamp-terminal-type-builtins.h: terminal-type-builtins.h.template $(TYPES_H_FILES) 121 | $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-ttbh \ 122 | && (cmp -s xgen-ttbh terminal-type-builtins.h || cp xgen-ttbh terminal-type-builtins.h ) \ 123 | && rm -f xgen-ttbh \ 124 | && echo timestamp > $(@F) 125 | 126 | terminal-type-builtins.c: terminal-type-builtins.c.template $(TYPES_H_FILES) 127 | $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-ttbc \ 128 | && (cmp -s xgen-ttbc terminal-type-builtins.c || cp xgen-ttbc terminal-type-builtins.c ) \ 129 | && rm -f xgen-ttbc 130 | 131 | terminal-marshal.h: $(srcdir)/terminal-marshal.list 132 | $(AM_V_GEN) ( $(GLIB_GENMARSHAL) --prefix=_terminal_marshal $(srcdir)/terminal-marshal.list \ 133 | --header \ 134 | --internal > terminal-marshal.h.tmp \ 135 | && mv terminal-marshal.h.tmp terminal-marshal.h ) \ 136 | || ( rm -f terminal-marshal.h.tmp && exit 1 ) 137 | 138 | terminal-marshal.c: $(srcdir)/terminal-marshal.list 139 | $(AM_V_GEN) ( $(GLIB_GENMARSHAL) --prefix=_terminal_marshal $(srcdir)/terminal-marshal.list \ 140 | --header \ 141 | --body \ 142 | --internal > terminal-marshal.c.tmp \ 143 | && mv terminal-marshal.c.tmp terminal-marshal.c ) \ 144 | || ( rm -f terminal-marshal.c.tmp && exit 1 ) 145 | 146 | terminal-resources.h terminal-resources.c: terminal.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/terminal.gresource.xml) 147 | $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name terminal $< 148 | 149 | gsettingsschema_in_files = org.mate.terminal.gschema.xml.in 150 | gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml) 151 | .PRECIOUS: $(gsettings_SCHEMAS) 152 | 153 | CLEANFILES = \ 154 | stamp-terminal-type-builtins.h \ 155 | mate-terminal.schemas \ 156 | $(gsettings_SCHEMAS) \ 157 | stamp-terminal-type-builtins.h \ 158 | $(BUILT_SOURCES) 159 | 160 | EXTRA_DIST = \ 161 | encodings-dialog.ui \ 162 | find-dialog.ui \ 163 | keybinding-editor.ui \ 164 | profile-manager.ui \ 165 | profile-new-dialog.ui \ 166 | profile-preferences.ui \ 167 | skey-challenge.ui \ 168 | terminal.about \ 169 | terminal.xml \ 170 | terminal.gresource.xml \ 171 | terminal-marshal.list \ 172 | terminal-type-builtins.c.template \ 173 | terminal-type-builtins.h.template \ 174 | extra-strings.c \ 175 | $(about_DATA) \ 176 | $(schema_in_files) \ 177 | $(gsettingsschema_in_files) \ 178 | $(uimanager_DATA) \ 179 | $(builder_DATA) \ 180 | $(NULL) 181 | 182 | @GSETTINGS_RULES@ 183 | 184 | -include $(top_srcdir)/git.mk 185 | -------------------------------------------------------------------------------- /src/skey-popup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2002 Jonathan Blandford 3 | * Copyright © 2008 Christian Persch 4 | * 5 | * Mate-terminal is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * Mate-terminal is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | 21 | #include "terminal-intl.h" 22 | 23 | #include "terminal-util.h" 24 | #include "terminal-screen.h" 25 | #include "skey-popup.h" 26 | #include "skey/skey.h" 27 | #include 28 | #include 29 | 30 | #define SKEY_PREFIX "s/key " 31 | #define OTP_PREFIX "otp-" 32 | 33 | typedef struct 34 | { 35 | TerminalScreen *screen; 36 | char *seed; 37 | int seq; 38 | int hash; 39 | } SkeyData; 40 | 41 | static void 42 | skey_data_free (SkeyData *data) 43 | { 44 | g_free (data->seed); 45 | g_free (data); 46 | } 47 | 48 | static gboolean 49 | extract_seq_and_seed (const gchar *skey_match, 50 | gint *seq, 51 | gchar **seed) 52 | { 53 | gchar *end_ptr = NULL; 54 | 55 | /* FIXME: use g_ascii_strtoll */ 56 | *seq = strtol (skey_match + strlen (SKEY_PREFIX), &end_ptr, 0); 57 | 58 | if (end_ptr == NULL || *end_ptr == '\000') 59 | return FALSE; 60 | 61 | *seed = g_strdup (end_ptr + 1); 62 | 63 | return TRUE; 64 | } 65 | 66 | static gboolean 67 | extract_hash_seq_and_seed (const gchar *otp_match, 68 | gint *hash, 69 | gint *seq, 70 | gchar **seed) 71 | { 72 | gchar *end_ptr = NULL; 73 | const gchar *p = otp_match + strlen (OTP_PREFIX); 74 | gint len = 3; 75 | 76 | if (strncmp (p, "md4", 3) == 0) 77 | *hash = MD4; 78 | else if (strncmp (p, "md5", 3) == 0) 79 | *hash = MD5; 80 | else if (strncmp (p, "sha1", 4) == 0) 81 | { 82 | *hash = SHA1; 83 | len++; 84 | } 85 | else 86 | return FALSE; 87 | 88 | p += len; 89 | 90 | /* RFC mandates the following skipping */ 91 | while (*p == ' ' || *p == '\t') 92 | { 93 | if (*p == '\0') 94 | return FALSE; 95 | 96 | p++; 97 | } 98 | 99 | /* FIXME: use g_ascii_strtoll */ 100 | *seq = strtol (p, &end_ptr, 0); 101 | 102 | if (end_ptr == NULL || *end_ptr == '\000') 103 | return FALSE; 104 | 105 | p = end_ptr; 106 | 107 | while (*p == ' ' || *p == '\t') 108 | { 109 | if (*p == '\0') 110 | return FALSE; 111 | p++; 112 | } 113 | 114 | *seed = g_strdup (p); 115 | return TRUE; 116 | } 117 | 118 | static void 119 | skey_challenge_response_cb (GtkWidget *dialog, 120 | int response_id, 121 | SkeyData *data) 122 | { 123 | if (response_id == GTK_RESPONSE_OK) 124 | { 125 | GtkWidget *entry; 126 | const char *password; 127 | char *response; 128 | 129 | entry = g_object_get_data (G_OBJECT (dialog), "skey-entry"); 130 | password = gtk_entry_get_text (GTK_ENTRY (entry)); 131 | 132 | /* FIXME: fix skey to use g_malloc */ 133 | response = skey (data->hash, data->seq, data->seed, password); 134 | if (response) 135 | { 136 | VteTerminal *vte_terminal = VTE_TERMINAL (data->screen); 137 | static const char newline[2] = "\n"; 138 | 139 | vte_terminal_feed_child (vte_terminal, response, strlen (response)); 140 | vte_terminal_feed_child (vte_terminal, newline, strlen (newline)); 141 | free (response); 142 | } 143 | } 144 | 145 | gtk_widget_destroy (dialog); 146 | } 147 | 148 | void 149 | terminal_skey_do_popup (GtkWindow *window, 150 | TerminalScreen *screen, 151 | const gchar *skey_match) 152 | { 153 | GtkWidget *dialog, *label, *entry, *ok_button; 154 | char *title_text; 155 | char *seed; 156 | int seq; 157 | int hash = MD5; 158 | SkeyData *data; 159 | 160 | if (strncmp (SKEY_PREFIX, skey_match, strlen (SKEY_PREFIX)) == 0) 161 | { 162 | if (!extract_seq_and_seed (skey_match, &seq, &seed)) 163 | { 164 | terminal_util_show_error_dialog (window, NULL, NULL, 165 | _("The text you clicked on doesn't " 166 | "seem to be a valid S/Key " 167 | "challenge.")); 168 | return; 169 | } 170 | } 171 | else 172 | { 173 | if (!extract_hash_seq_and_seed (skey_match, &hash, &seq, &seed)) 174 | { 175 | terminal_util_show_error_dialog (window, NULL, NULL, 176 | _("The text you clicked on doesn't " 177 | "seem to be a valid OTP " 178 | "challenge.")); 179 | return; 180 | } 181 | } 182 | 183 | if (!terminal_util_load_builder_resource (TERMINAL_RESOURCES_PATH_PREFIX G_DIR_SEPARATOR_S "ui/skey-challenge.ui", 184 | "skey-dialog", &dialog, 185 | "skey-entry", &entry, 186 | "text-label", &label, 187 | "skey-ok-button", &ok_button, 188 | NULL)) 189 | { 190 | g_free (seed); 191 | return; 192 | } 193 | 194 | title_text = g_strdup_printf ("%s", 195 | gtk_label_get_text (GTK_LABEL (label))); 196 | gtk_label_set_label (GTK_LABEL (label), title_text); 197 | g_free (title_text); 198 | 199 | g_object_set_data (G_OBJECT (dialog), "skey-entry", entry); 200 | 201 | gtk_widget_grab_focus (entry); 202 | gtk_widget_grab_default (ok_button); 203 | gtk_entry_set_text (GTK_ENTRY (entry), ""); 204 | 205 | gtk_window_set_transient_for (GTK_WINDOW (dialog), window); 206 | gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); 207 | gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); 208 | 209 | /* FIXME: make this dialogue close if the screen closes! */ 210 | 211 | data = g_new (SkeyData, 1); 212 | data->hash = hash; 213 | data->seq = seq; 214 | data->seed = seed; 215 | data->screen = screen; 216 | 217 | g_signal_connect_data (dialog, "response", 218 | G_CALLBACK (skey_challenge_response_cb), 219 | data, (GClosureNotify) skey_data_free, 0); 220 | g_signal_connect (dialog, "delete-event", 221 | G_CALLBACK (terminal_util_dialog_response_on_delete), NULL); 222 | 223 | gtk_window_present (GTK_WINDOW (dialog)); 224 | } 225 | -------------------------------------------------------------------------------- /src/terminal-screen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001 Havoc Pennington 3 | * Copyright © 2008 Christian Persch 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 3 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef TERMINAL_SCREEN_H 22 | #define TERMINAL_SCREEN_H 23 | 24 | #include 25 | 26 | #include "terminal-profile.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | typedef enum 31 | { 32 | FLAVOR_AS_IS, 33 | FLAVOR_DEFAULT_TO_HTTP, 34 | FLAVOR_VOIP_CALL, 35 | FLAVOR_EMAIL, 36 | FLAVOR_SKEY 37 | } TerminalURLFlavour; 38 | 39 | /* Forward decls */ 40 | typedef struct _TerminalScreenPopupInfo TerminalScreenPopupInfo; 41 | typedef struct _TerminalWindow TerminalWindow; 42 | 43 | #define TERMINAL_TYPE_SCREEN (terminal_screen_get_type ()) 44 | #define TERMINAL_SCREEN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TERMINAL_TYPE_SCREEN, TerminalScreen)) 45 | #define TERMINAL_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_SCREEN, TerminalScreenClass)) 46 | #define TERMINAL_IS_SCREEN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TERMINAL_TYPE_SCREEN)) 47 | #define TERMINAL_IS_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_SCREEN)) 48 | #define TERMINAL_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_SCREEN, TerminalScreenClass)) 49 | 50 | typedef struct _TerminalScreen TerminalScreen; 51 | typedef struct _TerminalScreenClass TerminalScreenClass; 52 | typedef struct _TerminalScreenPrivate TerminalScreenPrivate; 53 | 54 | struct _TerminalScreen 55 | { 56 | VteTerminal parent_instance; 57 | 58 | TerminalScreenPrivate *priv; 59 | }; 60 | 61 | struct _TerminalScreenClass 62 | { 63 | VteTerminalClass parent_class; 64 | 65 | void (* profile_set) (TerminalScreen *screen, 66 | TerminalProfile *old_profile); 67 | void (* show_popup_menu) (TerminalScreen *screen, 68 | TerminalScreenPopupInfo *info); 69 | gboolean (* match_clicked) (TerminalScreen *screen, 70 | const char *url, 71 | int flavour, 72 | guint state); 73 | void (* close_screen) (TerminalScreen *screen); 74 | }; 75 | 76 | GType terminal_screen_get_type (void) G_GNUC_CONST; 77 | 78 | TerminalScreen *terminal_screen_new (TerminalProfile *profile, 79 | char **override_command, 80 | const char *title, 81 | const char *working_dir, 82 | char **child_env, 83 | double zoom); 84 | 85 | void terminal_screen_set_profile (TerminalScreen *screen, 86 | TerminalProfile *profile); 87 | TerminalProfile* terminal_screen_get_profile (TerminalScreen *screen); 88 | 89 | void terminal_screen_set_override_command (TerminalScreen *screen, 90 | char **argv); 91 | const char** terminal_screen_get_override_command (TerminalScreen *screen); 92 | 93 | void terminal_screen_set_initial_environment (TerminalScreen *screen, 94 | char **argv); 95 | char ** terminal_screen_get_initial_environment (TerminalScreen *screen); 96 | 97 | const char* terminal_screen_get_raw_title (TerminalScreen *screen); 98 | const char* terminal_screen_get_title (TerminalScreen *screen); 99 | const char* terminal_screen_get_icon_title (TerminalScreen *screen); 100 | gboolean terminal_screen_get_icon_title_set (TerminalScreen *screen); 101 | 102 | void terminal_screen_set_user_title (TerminalScreen *screen, 103 | const char *text); 104 | 105 | void terminal_screen_set_override_title (TerminalScreen *screen, 106 | const char *title); 107 | 108 | const char *terminal_screen_get_dynamic_title (TerminalScreen *screen); 109 | const char *terminal_screen_get_dynamic_icon_title (TerminalScreen *screen); 110 | 111 | char *terminal_screen_get_current_dir (TerminalScreen *screen); 112 | char *terminal_screen_get_current_dir_with_fallback (TerminalScreen *screen); 113 | 114 | void terminal_screen_set_font (TerminalScreen *screen); 115 | void terminal_screen_set_font_scale (TerminalScreen *screen, 116 | double factor); 117 | double terminal_screen_get_font_scale (TerminalScreen *screen); 118 | 119 | void terminal_screen_get_size (TerminalScreen *screen, 120 | int *width_chars, 121 | int *height_chars); 122 | void terminal_screen_get_cell_size (TerminalScreen *screen, 123 | int *width_chars, 124 | int *height_chars); 125 | 126 | void _terminal_screen_update_scrollbar (TerminalScreen *screen); 127 | 128 | void terminal_screen_save_config (TerminalScreen *screen, 129 | GKeyFile *key_file, 130 | const char *group); 131 | 132 | gboolean terminal_screen_has_foreground_process (TerminalScreen *screen); 133 | 134 | /* Allow scales a bit smaller and a bit larger than the usual pango ranges */ 135 | #define TERMINAL_SCALE_XXX_SMALL (PANGO_SCALE_XX_SMALL/1.2) 136 | #define TERMINAL_SCALE_XXXX_SMALL (TERMINAL_SCALE_XXX_SMALL/1.2) 137 | #define TERMINAL_SCALE_XXXXX_SMALL (TERMINAL_SCALE_XXXX_SMALL/1.2) 138 | #define TERMINAL_SCALE_XXX_LARGE (PANGO_SCALE_XX_LARGE*1.2) 139 | #define TERMINAL_SCALE_XXXX_LARGE (TERMINAL_SCALE_XXX_LARGE*1.2) 140 | #define TERMINAL_SCALE_XXXXX_LARGE (TERMINAL_SCALE_XXXX_LARGE*1.2) 141 | #define TERMINAL_SCALE_MINIMUM (TERMINAL_SCALE_XXXXX_SMALL/1.2) 142 | #define TERMINAL_SCALE_MAXIMUM (TERMINAL_SCALE_XXXXX_LARGE*1.2) 143 | 144 | struct _TerminalScreenPopupInfo 145 | { 146 | int ref_count; 147 | TerminalWindow *window; 148 | TerminalScreen *screen; 149 | char *string; 150 | TerminalURLFlavour flavour; 151 | guint button; 152 | guint state; 153 | guint32 timestamp; 154 | }; 155 | 156 | TerminalScreenPopupInfo *terminal_screen_popup_info_ref (TerminalScreenPopupInfo *info); 157 | 158 | void terminal_screen_popup_info_unref (TerminalScreenPopupInfo *info); 159 | 160 | G_END_DECLS 161 | 162 | #endif /* TERMINAL_SCREEN_H */ 163 | -------------------------------------------------------------------------------- /src/eggdesktopfile.h: -------------------------------------------------------------------------------- 1 | /* eggdesktopfile.h - Freedesktop.Org Desktop Files 2 | * Copyright (C) 2007 Novell, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public License 6 | * as published by the Free Software Foundation; either version 3 of 7 | * the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; see the file COPYING.LIB. If not, 16 | * write to the Free Software Foundation, Inc., 51 Franklin St - 17 | * Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef __EGG_DESKTOP_FILE_H__ 21 | #define __EGG_DESKTOP_FILE_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | typedef struct EggDesktopFile EggDesktopFile; 28 | 29 | typedef enum 30 | { 31 | EGG_DESKTOP_FILE_TYPE_UNRECOGNIZED, 32 | 33 | EGG_DESKTOP_FILE_TYPE_APPLICATION, 34 | EGG_DESKTOP_FILE_TYPE_LINK, 35 | EGG_DESKTOP_FILE_TYPE_DIRECTORY 36 | } EggDesktopFileType; 37 | 38 | EggDesktopFile *egg_desktop_file_new (const char *desktop_file_path, 39 | GError **error); 40 | 41 | EggDesktopFile *egg_desktop_file_new_from_data_dirs (const char *desktop_file_path, 42 | GError **error); 43 | EggDesktopFile *egg_desktop_file_new_from_dirs (const char *desktop_file_path, 44 | const char **search_dirs, 45 | GError **error); 46 | EggDesktopFile *egg_desktop_file_new_from_key_file (GKeyFile *key_file, 47 | const char *source, 48 | GError **error); 49 | 50 | void egg_desktop_file_free (EggDesktopFile *desktop_file); 51 | 52 | const char *egg_desktop_file_get_source (EggDesktopFile *desktop_file); 53 | 54 | EggDesktopFileType egg_desktop_file_get_desktop_file_type (EggDesktopFile *desktop_file); 55 | 56 | const char *egg_desktop_file_get_name (EggDesktopFile *desktop_file); 57 | const char *egg_desktop_file_get_icon (EggDesktopFile *desktop_file); 58 | 59 | gboolean egg_desktop_file_can_launch (EggDesktopFile *desktop_file, 60 | const char *desktop_environment); 61 | 62 | gboolean egg_desktop_file_accepts_documents (EggDesktopFile *desktop_file); 63 | gboolean egg_desktop_file_accepts_multiple (EggDesktopFile *desktop_file); 64 | gboolean egg_desktop_file_accepts_uris (EggDesktopFile *desktop_file); 65 | 66 | char *egg_desktop_file_parse_exec (EggDesktopFile *desktop_file, 67 | GSList *documents, 68 | GError **error); 69 | 70 | gboolean egg_desktop_file_launch (EggDesktopFile *desktop_file, 71 | GSList *documents, 72 | GError **error, 73 | ...) G_GNUC_NULL_TERMINATED; 74 | 75 | typedef enum 76 | { 77 | EGG_DESKTOP_FILE_LAUNCH_CLEARENV = 1, 78 | EGG_DESKTOP_FILE_LAUNCH_PUTENV, 79 | EGG_DESKTOP_FILE_LAUNCH_SCREEN, 80 | EGG_DESKTOP_FILE_LAUNCH_WORKSPACE, 81 | EGG_DESKTOP_FILE_LAUNCH_DIRECTORY, 82 | EGG_DESKTOP_FILE_LAUNCH_TIME, 83 | EGG_DESKTOP_FILE_LAUNCH_FLAGS, 84 | EGG_DESKTOP_FILE_LAUNCH_SETUP_FUNC, 85 | EGG_DESKTOP_FILE_LAUNCH_RETURN_PID, 86 | EGG_DESKTOP_FILE_LAUNCH_RETURN_STDIN_PIPE, 87 | EGG_DESKTOP_FILE_LAUNCH_RETURN_STDOUT_PIPE, 88 | EGG_DESKTOP_FILE_LAUNCH_RETURN_STDERR_PIPE, 89 | EGG_DESKTOP_FILE_LAUNCH_RETURN_STARTUP_ID 90 | } EggDesktopFileLaunchOption; 91 | 92 | /* Standard Keys */ 93 | #define EGG_DESKTOP_FILE_GROUP "Desktop Entry" 94 | 95 | #define EGG_DESKTOP_FILE_KEY_TYPE "Type" 96 | #define EGG_DESKTOP_FILE_KEY_VERSION "Version" 97 | #define EGG_DESKTOP_FILE_KEY_NAME "Name" 98 | #define EGG_DESKTOP_FILE_KEY_GENERIC_NAME "GenericName" 99 | #define EGG_DESKTOP_FILE_KEY_NO_DISPLAY "NoDisplay" 100 | #define EGG_DESKTOP_FILE_KEY_COMMENT "Comment" 101 | #define EGG_DESKTOP_FILE_KEY_ICON "Icon" 102 | #define EGG_DESKTOP_FILE_KEY_HIDDEN "Hidden" 103 | #define EGG_DESKTOP_FILE_KEY_ONLY_SHOW_IN "OnlyShowIn" 104 | #define EGG_DESKTOP_FILE_KEY_NOT_SHOW_IN "NotShowIn" 105 | #define EGG_DESKTOP_FILE_KEY_TRY_EXEC "TryExec" 106 | #define EGG_DESKTOP_FILE_KEY_EXEC "Exec" 107 | #define EGG_DESKTOP_FILE_KEY_PATH "Path" 108 | #define EGG_DESKTOP_FILE_KEY_TERMINAL "Terminal" 109 | #define EGG_DESKTOP_FILE_KEY_MIME_TYPE "MimeType" 110 | #define EGG_DESKTOP_FILE_KEY_CATEGORIES "Categories" 111 | #define EGG_DESKTOP_FILE_KEY_STARTUP_NOTIFY "StartupNotify" 112 | #define EGG_DESKTOP_FILE_KEY_STARTUP_WM_CLASS "StartupWMClass" 113 | #define EGG_DESKTOP_FILE_KEY_URL "URL" 114 | 115 | /* Accessors */ 116 | gboolean egg_desktop_file_has_key (EggDesktopFile *desktop_file, 117 | const char *key, 118 | GError **error); 119 | char *egg_desktop_file_get_string (EggDesktopFile *desktop_file, 120 | const char *key, 121 | GError **error) G_GNUC_MALLOC; 122 | char *egg_desktop_file_get_locale_string (EggDesktopFile *desktop_file, 123 | const char *key, 124 | const char *locale, 125 | GError **error) G_GNUC_MALLOC; 126 | gboolean egg_desktop_file_get_boolean (EggDesktopFile *desktop_file, 127 | const char *key, 128 | GError **error); 129 | double egg_desktop_file_get_numeric (EggDesktopFile *desktop_file, 130 | const char *key, 131 | GError **error); 132 | char **egg_desktop_file_get_string_list (EggDesktopFile *desktop_file, 133 | const char *key, 134 | gsize *length, 135 | GError **error) G_GNUC_MALLOC; 136 | char **egg_desktop_file_get_locale_string_list (EggDesktopFile *desktop_file, 137 | const char *key, 138 | const char *locale, 139 | gsize *length, 140 | GError **error) G_GNUC_MALLOC; 141 | 142 | 143 | /* Errors */ 144 | #define EGG_DESKTOP_FILE_ERROR egg_desktop_file_error_quark() 145 | 146 | GQuark egg_desktop_file_error_quark (void); 147 | 148 | typedef enum 149 | { 150 | EGG_DESKTOP_FILE_ERROR_INVALID, 151 | EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE, 152 | EGG_DESKTOP_FILE_ERROR_UNRECOGNIZED_OPTION 153 | } EggDesktopFileError; 154 | 155 | /* Global application desktop file */ 156 | void egg_set_desktop_file (const char *desktop_file_path); 157 | void egg_set_desktop_file_without_defaults (const char *desktop_file_path); 158 | EggDesktopFile *egg_get_desktop_file (void); 159 | 160 | 161 | G_END_DECLS 162 | 163 | #endif /* __EGG_DESKTOP_FILE_H__ */ 164 | -------------------------------------------------------------------------------- /src/terminal-app.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001 Havoc Pennington 3 | * Copyright © 2008 Christian Persch 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 3 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef TERMINAL_APP_H 22 | #define TERMINAL_APP_H 23 | 24 | #include 25 | 26 | #include "terminal-encoding.h" 27 | #include "terminal-screen.h" 28 | #include "terminal-options.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | /* Terminal conf files */ 33 | 34 | #define TERMINAL_CONFIG_VERSION (1) /* Bump this for any changes */ 35 | #define TERMINAL_CONFIG_COMPAT_VERSION (1) /* Bump this for incompatible changes */ 36 | 37 | #define TERMINAL_CONFIG_GROUP "MATE Terminal Configuration" 38 | #define TERMINAL_CONFIG_PROP_VERSION "Version" 39 | #define TERMINAL_CONFIG_PROP_COMPAT_VERSION "CompatVersion" 40 | #define TERMINAL_CONFIG_PROP_WINDOWS "Windows" 41 | 42 | #define TERMINAL_CONFIG_WINDOW_PROP_ACTIVE_TAB "ActiveTerminal" 43 | #define TERMINAL_CONFIG_WINDOW_PROP_FULLSCREEN "Fullscreen" 44 | #define TERMINAL_CONFIG_WINDOW_PROP_GEOMETRY "Geometry" 45 | #define TERMINAL_CONFIG_WINDOW_PROP_MAXIMIZED "Maximized" 46 | #define TERMINAL_CONFIG_WINDOW_PROP_MENUBAR_VISIBLE "MenubarVisible" 47 | #define TERMINAL_CONFIG_WINDOW_PROP_ROLE "Role" 48 | #define TERMINAL_CONFIG_WINDOW_PROP_TABS "Terminals" 49 | 50 | #define TERMINAL_CONFIG_TERMINAL_PROP_HEIGHT "Height" 51 | #define TERMINAL_CONFIG_TERMINAL_PROP_COMMAND "Command" 52 | #define TERMINAL_CONFIG_TERMINAL_PROP_PROFILE_ID "ProfileID" 53 | #define TERMINAL_CONFIG_TERMINAL_PROP_TITLE "Title" 54 | #define TERMINAL_CONFIG_TERMINAL_PROP_WIDTH "Width" 55 | #define TERMINAL_CONFIG_TERMINAL_PROP_WORKING_DIRECTORY "WorkingDirectory" 56 | #define TERMINAL_CONFIG_TERMINAL_PROP_ZOOM "Zoom" 57 | 58 | /* Configuration */ 59 | 60 | #define CONF_PREFIX "org.mate.terminal" 61 | #define CONF_GLOBAL_SCHEMA CONF_PREFIX ".global" 62 | #define CONF_PROFILES_SCHEMA CONF_PREFIX ".profiles" 63 | #define CONF_PROFILE_SCHEMA CONF_PREFIX ".profile" 64 | #define CONF_KEYS_SCHEMA CONF_PREFIX ".keybindings" 65 | #define CONF_PROFILE_PREFIX "/org/mate/terminal/profiles/" 66 | 67 | #define MATE_TERMINAL_ICON_NAME "utilities-terminal" 68 | 69 | #define TERMINAL_APP_DEFAULT_PROFILE "default-profile" 70 | #define TERMINAL_APP_ENABLE_MENU_BAR_ACCEL "enable-menu-accels" 71 | #define TERMINAL_APP_ENABLE_MNEMONICS "enable-mnemonics" 72 | #define TERMINAL_APP_SYSTEM_FONT "system-font" 73 | 74 | /* TerminalApp */ 75 | 76 | #define TERMINAL_TYPE_APP (terminal_app_get_type ()) 77 | #define TERMINAL_APP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TERMINAL_TYPE_APP, TerminalApp)) 78 | #define TERMINAL_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_APP, TerminalAppClass)) 79 | #define TERMINAL_IS_APP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TERMINAL_TYPE_APP)) 80 | #define TERMINAL_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_APP)) 81 | #define TERMINAL_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_APP, TerminalAppClass)) 82 | 83 | typedef struct _TerminalAppClass TerminalAppClass; 84 | typedef struct _TerminalApp TerminalApp; 85 | 86 | extern GSettings *settings_global; 87 | 88 | GType terminal_app_get_type (void); 89 | 90 | TerminalApp* terminal_app_get (void); 91 | 92 | void terminal_app_shutdown (void); 93 | 94 | gboolean terminal_app_handle_options (TerminalApp *app, 95 | TerminalOptions *options, 96 | gboolean allow_resume, 97 | GError **error); 98 | 99 | void terminal_app_edit_profile (TerminalApp *app, 100 | TerminalProfile *profile, 101 | GtkWindow *transient_parent, 102 | const char *widget_name); 103 | 104 | void terminal_app_new_profile (TerminalApp *app, 105 | TerminalProfile *default_base_profile, 106 | GtkWindow *transient_parent); 107 | 108 | TerminalWindow * terminal_app_new_window (TerminalApp *app, 109 | GdkScreen *screen); 110 | 111 | TerminalScreen *terminal_app_new_terminal (TerminalApp *app, 112 | TerminalWindow *window, 113 | TerminalProfile *profile, 114 | char **override_command, 115 | const char *title, 116 | const char *working_dir, 117 | char **child_env, 118 | double zoom); 119 | 120 | TerminalWindow *terminal_app_get_current_window (TerminalApp *app, 121 | GdkScreen *screen, 122 | int curr_workspace); 123 | 124 | void terminal_app_manage_profiles (TerminalApp *app, 125 | GtkWindow *transient_parent); 126 | 127 | void terminal_app_edit_keybindings (TerminalApp *app, 128 | GtkWindow *transient_parent); 129 | void terminal_app_edit_encodings (TerminalApp *app, 130 | GtkWindow *transient_parent); 131 | 132 | 133 | GList* terminal_app_get_profile_list (TerminalApp *app); 134 | 135 | TerminalProfile* terminal_app_ensure_profile_fallback (TerminalApp *app); 136 | 137 | TerminalProfile* terminal_app_get_profile_by_name (TerminalApp *app, 138 | const char *name); 139 | 140 | TerminalProfile* terminal_app_get_profile_by_visible_name (TerminalApp *app, 141 | const char *name); 142 | 143 | /* may return NULL */ 144 | TerminalProfile* terminal_app_get_default_profile (TerminalApp *app); 145 | 146 | /* never returns NULL if any profiles exist, one is always supposed to */ 147 | TerminalProfile* terminal_app_get_profile_for_new_term (TerminalApp *app); 148 | 149 | TerminalEncoding *terminal_app_ensure_encoding (TerminalApp *app, 150 | const char *charset); 151 | 152 | GHashTable *terminal_app_get_encodings (TerminalApp *app); 153 | 154 | GSList* terminal_app_get_active_encodings (TerminalApp *app); 155 | 156 | void terminal_app_save_config (TerminalApp *app, 157 | GKeyFile *key_file); 158 | 159 | gboolean terminal_app_save_config_file (TerminalApp *app, 160 | const char *file_name, 161 | GError **error); 162 | 163 | G_END_DECLS 164 | 165 | #endif /* !TERMINAL_APP_H */ 166 | -------------------------------------------------------------------------------- /src/keybinding-editor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | False 13 | 5 14 | Keyboard Shortcuts 15 | mate-terminal-accels 16 | dialog 17 | 18 | 19 | True 20 | False 21 | vertical 22 | 2 23 | 24 | 25 | True 26 | False 27 | True 28 | end 29 | 30 | 31 | gtk-help 32 | True 33 | True 34 | True 35 | False 36 | True 37 | 38 | 39 | True 40 | True 41 | 0 42 | True 43 | 44 | 45 | 46 | 47 | gtk-close 48 | True 49 | True 50 | True 51 | True 52 | False 53 | True 54 | 55 | 56 | True 57 | True 58 | 1 59 | 60 | 61 | 62 | 63 | False 64 | True 65 | end 66 | 0 67 | 68 | 69 | 70 | 71 | True 72 | False 73 | 5 74 | 6 75 | 12 76 | 77 | 78 | _Enable menu access keys (such as Alt+F to open the File menu) 79 | True 80 | True 81 | False 82 | start 83 | True 84 | True 85 | 86 | 87 | 0 88 | 0 89 | 90 | 91 | 92 | 93 | True 94 | True 95 | True 96 | True 97 | never 98 | in 99 | 100 | 101 | True 102 | True 103 | True 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 0 112 | 3 113 | 114 | 115 | 116 | 117 | Enable the _menu shortcut key (F10 by default) 118 | True 119 | True 120 | False 121 | start 122 | True 123 | True 124 | 125 | 126 | 0 127 | 1 128 | 129 | 130 | 131 | 132 | True 133 | False 134 | start 135 | center 136 | _Shortcut keys: 137 | True 138 | accelerators-treeview 139 | 140 | 141 | 0 142 | 2 143 | 144 | 145 | 146 | 147 | True 148 | True 149 | 1 150 | 151 | 152 | 153 | 154 | 155 | button1 156 | close_button1 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /src/terminal-profile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001 Havoc Pennington 3 | * Copyright © 2002 Mathias Hasselmann 4 | * Copyright © 2008 Christian Persch 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 3 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef TERMINAL_PROFILE_H 23 | #define TERMINAL_PROFILE_H 24 | 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | typedef enum 30 | { 31 | /* this has to be kept in sync with the option menu in the profile editor UI file */ 32 | TERMINAL_TITLE_REPLACE, 33 | TERMINAL_TITLE_BEFORE, 34 | TERMINAL_TITLE_AFTER, 35 | TERMINAL_TITLE_IGNORE 36 | } TerminalTitleMode; 37 | 38 | typedef enum 39 | { 40 | TERMINAL_SCROLLBAR_LEFT, 41 | TERMINAL_SCROLLBAR_RIGHT, 42 | TERMINAL_SCROLLBAR_HIDDEN 43 | } TerminalScrollbarPosition; 44 | 45 | typedef enum 46 | { 47 | TERMINAL_EXIT_CLOSE, 48 | TERMINAL_EXIT_RESTART, 49 | TERMINAL_EXIT_HOLD 50 | } TerminalExitAction; 51 | 52 | typedef enum 53 | { 54 | TERMINAL_BACKGROUND_SOLID, 55 | TERMINAL_BACKGROUND_IMAGE, 56 | TERMINAL_BACKGROUND_TRANSPARENT 57 | } TerminalBackgroundType; 58 | 59 | #define TERMINAL_PALETTE_SIZE 16 60 | 61 | #define TERMINAL_PALETTE_TANGO 0 62 | #define TERMINAL_PALETTE_LINUX 1 63 | #define TERMINAL_PALETTE_XTERM 2 64 | #define TERMINAL_PALETTE_RXVT 3 65 | #define TERMINAL_PALETTE_SOLARIZED 4 66 | #define TERMINAL_PALETTE_N_BUILTINS 5 67 | 68 | /* Property names */ 69 | #define TERMINAL_PROFILE_ALLOW_BOLD "allow-bold" 70 | #define TERMINAL_PROFILE_BACKGROUND_COLOR "background-color" 71 | #define TERMINAL_PROFILE_BACKGROUND_DARKNESS "background-darkness" 72 | #define TERMINAL_PROFILE_BACKGROUND_IMAGE "background-image" 73 | #define TERMINAL_PROFILE_BACKGROUND_IMAGE_FILE "background-image-file" 74 | #define TERMINAL_PROFILE_BACKGROUND_TYPE "background-type" 75 | #define TERMINAL_PROFILE_BACKSPACE_BINDING "backspace-binding" 76 | #define TERMINAL_PROFILE_BOLD_COLOR "bold-color" 77 | #define TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG "bold-color-same-as-fg" 78 | #define TERMINAL_PROFILE_CURSOR_BLINK_MODE "cursor-blink-mode" 79 | #define TERMINAL_PROFILE_CURSOR_SHAPE "cursor-shape" 80 | #define TERMINAL_PROFILE_CUSTOM_COMMAND "custom-command" 81 | #define TERMINAL_PROFILE_DEFAULT_SHOW_MENUBAR "default-show-menubar" 82 | #define TERMINAL_PROFILE_DEFAULT_SIZE_COLUMNS "default-size-columns" 83 | #define TERMINAL_PROFILE_DEFAULT_SIZE_ROWS "default-size-rows" 84 | #define TERMINAL_PROFILE_DELETE_BINDING "delete-binding" 85 | #define TERMINAL_PROFILE_EXIT_ACTION "exit-action" 86 | #define TERMINAL_PROFILE_FONT "font" 87 | #define TERMINAL_PROFILE_FOREGROUND_COLOR "foreground-color" 88 | #define TERMINAL_PROFILE_LOGIN_SHELL "login-shell" 89 | #define TERMINAL_PROFILE_NAME "name" 90 | #define TERMINAL_PROFILE_PALETTE "palette" 91 | #define TERMINAL_PROFILE_SCROLL_BACKGROUND "scroll-background" 92 | #define TERMINAL_PROFILE_SCROLLBACK_LINES "scrollback-lines" 93 | #define TERMINAL_PROFILE_SCROLLBACK_UNLIMITED "scrollback-unlimited" 94 | #define TERMINAL_PROFILE_SCROLLBAR_POSITION "scrollbar-position" 95 | #define TERMINAL_PROFILE_SCROLL_ON_KEYSTROKE "scroll-on-keystroke" 96 | #define TERMINAL_PROFILE_SCROLL_ON_OUTPUT "scroll-on-output" 97 | #define TERMINAL_PROFILE_SILENT_BELL "silent-bell" 98 | #define TERMINAL_PROFILE_COPY_SELECTION "copy-selection" 99 | #define TERMINAL_PROFILE_TITLE_MODE "title-mode" 100 | #define TERMINAL_PROFILE_TITLE "title" 101 | #define TERMINAL_PROFILE_USE_CUSTOM_COMMAND "use-custom-command" 102 | #define TERMINAL_PROFILE_USE_CUSTOM_DEFAULT_SIZE "use-custom-default-size" 103 | #define TERMINAL_PROFILE_USE_SKEY "use-skey" 104 | #define TERMINAL_PROFILE_USE_URLS "use-urls" 105 | #define TERMINAL_PROFILE_USE_SYSTEM_FONT "use-system-font" 106 | #define TERMINAL_PROFILE_USE_THEME_COLORS "use-theme-colors" 107 | #define TERMINAL_PROFILE_VISIBLE_NAME "visible-name" 108 | #define TERMINAL_PROFILE_WORD_CHARS "word-chars" 109 | 110 | /* TerminalProfile object */ 111 | 112 | #define TERMINAL_TYPE_PROFILE (terminal_profile_get_type ()) 113 | #define TERMINAL_PROFILE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TERMINAL_TYPE_PROFILE, TerminalProfile)) 114 | #define TERMINAL_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_PROFILE, TerminalProfileClass)) 115 | #define TERMINAL_IS_PROFILE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TERMINAL_TYPE_PROFILE)) 116 | #define TERMINAL_IS_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_PROFILE)) 117 | #define TERMINAL_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_PROFILE, TerminalProfileClass)) 118 | 119 | typedef struct _TerminalProfile TerminalProfile; 120 | typedef struct _TerminalProfileClass TerminalProfileClass; 121 | typedef struct _TerminalProfilePrivate TerminalProfilePrivate; 122 | 123 | struct _TerminalProfile 124 | { 125 | GObject parent_instance; 126 | 127 | TerminalProfilePrivate *priv; 128 | }; 129 | 130 | struct _TerminalProfileClass 131 | { 132 | GObjectClass parent_class; 133 | 134 | void (* forgotten) (TerminalProfile *profile); 135 | 136 | GHashTable *gsettings_keys; 137 | }; 138 | 139 | GType terminal_profile_get_type (void); 140 | 141 | TerminalProfile* _terminal_profile_new (const char *name); 142 | 143 | void _terminal_profile_forget (TerminalProfile *profile); 144 | 145 | gboolean _terminal_profile_get_forgotten (TerminalProfile *profile); 146 | 147 | TerminalProfile* _terminal_profile_clone (TerminalProfile *base_profile, 148 | const char *visible_name); 149 | 150 | gboolean terminal_profile_property_locked (TerminalProfile *profile, 151 | const char *prop_name); 152 | 153 | void terminal_profile_reset_property (TerminalProfile *profile, 154 | const char *prop_name); 155 | 156 | gboolean terminal_profile_get_property_boolean (TerminalProfile *profile, 157 | const char *prop_name); 158 | 159 | gconstpointer terminal_profile_get_property_boxed (TerminalProfile *profile, 160 | const char *prop_name); 161 | 162 | double terminal_profile_get_property_double (TerminalProfile *profile, 163 | const char *prop_name); 164 | 165 | int terminal_profile_get_property_enum (TerminalProfile *profile, 166 | const char *prop_name); 167 | 168 | int terminal_profile_get_property_int (TerminalProfile *profile, 169 | const char *prop_name); 170 | 171 | gpointer terminal_profile_get_property_object (TerminalProfile *profile, 172 | const char *prop_name); 173 | 174 | const char* terminal_profile_get_property_string (TerminalProfile *profile, 175 | const char *prop_name); 176 | 177 | gboolean terminal_profile_get_palette (TerminalProfile *profile, 178 | GdkRGBA *colors, 179 | guint *n_colors); 180 | 181 | gboolean terminal_profile_get_palette_is_builtin (TerminalProfile *profile, 182 | guint *n); 183 | 184 | void terminal_profile_set_palette_builtin (TerminalProfile *profile, 185 | guint n); 186 | 187 | gboolean terminal_profile_modify_palette_entry (TerminalProfile *profile, 188 | guint i, 189 | const GdkRGBA *color); 190 | 191 | G_END_DECLS 192 | 193 | #endif /* TERMINAL_PROFILE_H */ 194 | -------------------------------------------------------------------------------- /src/skey-challenge.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | False 13 | 5 14 | False 15 | True 16 | dialog 17 | 18 | 19 | True 20 | False 21 | vertical 22 | 2 23 | 24 | 25 | True 26 | False 27 | end 28 | 29 | 30 | gtk-cancel 31 | True 32 | True 33 | True 34 | False 35 | True 36 | 37 | 38 | True 39 | True 40 | 0 41 | 42 | 43 | 44 | 45 | gtk-ok 46 | True 47 | True 48 | True 49 | True 50 | False 51 | True 52 | 53 | 54 | True 55 | True 56 | 1 57 | 58 | 59 | 60 | 61 | False 62 | True 63 | end 64 | 0 65 | 66 | 67 | 68 | 69 | True 70 | False 71 | 5 72 | 12 73 | 74 | 75 | True 76 | False 77 | center 78 | start 79 | gtk-dialog-authentication 80 | 6 81 | 82 | 83 | False 84 | True 85 | 0 86 | 87 | 88 | 89 | 90 | True 91 | False 92 | vertical 93 | 12 94 | 95 | 96 | True 97 | False 98 | start 99 | center 100 | S/Key Challenge Response 101 | True 102 | 103 | 104 | False 105 | False 106 | 0 107 | 108 | 109 | 110 | 111 | True 112 | False 113 | 12 114 | 115 | 116 | True 117 | False 118 | start 119 | center 120 | _Password: 121 | True 122 | skey-entry 123 | 124 | 125 | False 126 | False 127 | 0 128 | 129 | 130 | 131 | 132 | True 133 | True 134 | False 135 | True 136 | 137 | 138 | True 139 | True 140 | 1 141 | 142 | 143 | 144 | 145 | False 146 | True 147 | 1 148 | 149 | 150 | 151 | 152 | True 153 | True 154 | 1 155 | 156 | 157 | 158 | 159 | True 160 | True 161 | 1 162 | 163 | 164 | 165 | 166 | 167 | cancelbutton1 168 | skey-ok-button 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | ### mate-terminal 1.24.0 2 | 3 | * Translations update 4 | * terminal-encoding: use settings_global variable 5 | * Fix build using gcc 10 -fno-common flag 6 | 7 | ### mate-terminal 1.23.1 8 | 9 | * tx: fix merge issue with italian translation 10 | * configure: fix typo in versioning 11 | * Translations update 12 | * Update copyright to 2020 13 | * terminal-window: avoid to make new GSettings in every new window 14 | * terminal-window: Fix memory leak 15 | * terminal-screen: Fix warning when closing window 16 | * Avoid NULL pointer dereference in terminal_screen_child_exited 17 | * migrate from intltool to gettext 18 | * Set debug & warning flags using new mate-common macros 19 | * build: Use ENABLE_SKEY for setting AC_CONFIG_FILES and mate_terminal_LDADD 20 | * terminal-app: remove -Wdiscarded-qualifiers warnings 21 | * terminal-window: : suppress GtkAction warnings 22 | * terminal-tabs-menu: suppress GtkAction warnings 23 | * terminal-tabs-menu: avoid 'g_type_class_add_private' 24 | * terminal-profile: avoid 'g_type_class_add_private' 25 | * terminal-window: avoid 'g_type_class_add_private' 26 | * terminal-screen-container: avoid 'g_type_class_add_private' 27 | * terminal-screen: avoid 'g_type_class_add_private' 28 | * terminal-info-bar: avoid 'g_type_class_add_private' 29 | * terminal-tab-label: avoid 'g_type_class_add_private' 30 | * terminal-window: "utilities-terminal" icon with "Open Terminal" 31 | 32 | ### mate-terminal 1.23.0 33 | 34 | * Translations update 35 | * Remove trailing whitespaces 36 | * Change url project's website 37 | * make "highlighting things under mouse pointer" configurable 38 | * [ci] Add cppcheck html report 39 | * [ci] Enable Clang Static Analyzer 40 | * Ensure proper translation of the about dialog title 41 | * Make translatable the copyright info in about dialog 42 | * Show confirmation dialog if there are multiple open tabs on closing 43 | * Upgrade the manual to docbook 5.0 44 | * about: update copyright 45 | * Explicitly enable bright bold to match new VTE versions 46 | * help: update copyright 47 | * warning: Value stored to 'screen_number' is never read 48 | * Use gresources for about_DATA, uimanager_DATA & builder_DATA 49 | * Retain copied selection when changing tabs 50 | 51 | ### mate-terminal 1.22.0 52 | 53 | * Translations update 54 | * Initialize Travis CI support 55 | * Remove unused files in help dir 56 | * Remove generated files 57 | * Add update-authors.pl which helps to update terminal.about 58 | * Update authors 59 | * Update Documenters 60 | * drop umtp suport 61 | * Help - Window title when MATE Terminal is started for first time 62 | * Help - alternative text for tabbed window picture 63 | * Help - TERM=xterm-256color 64 | * eggsmclient: avoid deprecated 'g_type_class_add_private' 65 | * src/terminal-screen.c: Set TERM to 'xterm-256color' (instead of just 'xterm'). 66 | * move appdata to metainfo directory 67 | 68 | ### mate-terminal 1.21.1 69 | 70 | * Translations update 71 | * disable deprecation warnings for distcheck 72 | * terminal-profile: Fix memory leaks 73 | * terminal-screen: avoid deprecated 'g_settings_list_schemas' 74 | * Use make functions for HELP_LINGUAS 75 | * Replace -Dokumentationsprojekt with Documentation Project 76 | * add help to transifex config 77 | * terminal-window: Fix warnings with menu popup 78 | * terminal-window: replace deprecated gtk_menu_popup 79 | 80 | ### mate-terminal 1.21.0 81 | 82 | * Translations update 83 | * term-screen: avoid deprecated 'gtk_style_context_get_background_color' 84 | * terminal-screen: avoid deprecated 'vte_terminal_spawn_sync' 85 | * terminal-window: avoid deprecated 'vte_terminal_copy_clipboard' 86 | * terminal-window: Fix: Session dbus daemon saturated 87 | * terminal-app: avoid gtk_dialog_add_buttons with stock ids 88 | * avoid deprecated GtkStock 89 | 90 | ### mate-terminal 1.20.0 91 | 92 | * Translations update 93 | * require GTK+ 3.22 and GLib 2.50 94 | * require VTE 0.46 95 | * revert parts of previous commit 96 | * screen: stop setting TERM and COLORTERM environment variables 97 | * NEWS: fix typo 98 | * schema: fix summary and description of some keys 99 | * remove "..." from Find keyboard shortcut 100 | * profile-editor: properly initialize the first palette color 101 | * update copyright year to 2018 102 | * terminal-screen.c: drop unused variables 103 | * Fix build warnings: ignoring return value of ‘chdir’, 104 | * middle click on a tab: add the gsettings key to enable the feature 105 | * make indent more uniform in a few files 106 | * fix possible crash when handling DBus method call 107 | 108 | ### mate-terminal 1.19.1 109 | 110 | * sync with transifex 111 | * Spelling: Whitespace removed, in the terminal, Ctrl 112 | * add Solarized themes from gnome-terminal 113 | * WidthOfScreen and HeightOfScreen implementation 114 | * add the ability to switch tabs using [ctrl+tab] and [ctrl+shift+tab] 115 | * allow remapping "search" keyboard shortcuts 116 | * Support background images with VTE3 117 | * find-dialog.ui: fix keyboard selection 118 | * avoid deprecated vte_terminal_search_get_gregex 119 | * add "select all" keyboard shortcut: [control] + [shift] + [A] 120 | 121 | ### mate-terminal 1.19.0 122 | 123 | * Translations update 124 | * gtk 3.22: avoid deprecated gdk_screen_get_monitor... functions: 125 | * avoid deprecated gdk_screen_get_width/height 126 | * avoid deprecated gdk_screen_make_display_name 127 | * terminal-util: avoid deprecated gtk_show_uri 128 | * avoid deprecated gdk_display_get_screen 129 | * avoid deprecated gdk_screen_get_number 130 | * Restore Polish translation credits from GNOME 131 | * update copyright year to 2017 132 | * Fix: Double click with right button causes Xorg to crash 133 | 134 | ### mate-terminal 1.18.0 135 | 136 | * NEWS: use consistent, project wide, markdown-like formatting 137 | to make generating release announcements easier 138 | * Add ability to close tabs with middle mouse button 139 | * Translations update 140 | 141 | ### mate-terminal 1.16.2 142 | 143 | * Bring back exit confirmation when there's a process running 144 | * Fix possible crash on window closing 145 | * Fix various issues with drag-n-drop of tabs 146 | * Encodings and keybindings dialogs: fix expand of content on 147 | window resize 148 | * Find, profile manager, profile prefs dialogs: fix runtime 149 | warnings about transient parent 150 | * Attach popup menus to their parent widgets (useful on Wayland) 151 | * Force X11 backend 152 | 153 | ### mate-terminal 1.16.1 154 | 155 | * Fix crash after detaching tab and then changing its title 156 | * Fix window positioning when using --geometry option 157 | * Translations update 158 | 159 | ### mate-terminal 1.16.0 160 | 161 | * Move to GTK+3, require GTK+ 3.14 and VTE 0.38 (API 2.91) 162 | * Drop GTK+2 code and --with-gtk build option 163 | * Use GtkAboutDialog instead of MateAboutDialog 164 | * Copy dconf and gsettings helpers from libmate-desktop and drop 165 | dependency on libmate-desktop 166 | * React on WM change only on X11 167 | * Fix lots of GTK+ deprecations 168 | * Some more fixes and cleanups 169 | * Translations update 170 | 171 | ### mate-terminal 1.14.1 172 | 173 | * man: add missing description of -x / --execute command line option 174 | * Translations update 175 | 176 | ### mate-terminal 1.14.0 177 | 178 | * Compile dingu regexes with MULTILINE option 179 | * Fix incorrect ordering of COLS and ROWS in command-line option 180 | * description and in the manpage 181 | * GTK+3: add style class mate-terminal 182 | * GTK+3: fix window sizes for 3.20 183 | * GTK+3: fix several deprecations 184 | * Some more fixes and cleanups 185 | * Translations update 186 | * Fix Changelog generation 187 | 188 | ### mate-terminal 1.12.1 189 | 190 | * GTK+3: switch to VTE 2.91 API, require VTE 0.38 for build 191 | 192 | ### mate-terminal 1.12.0 193 | 194 | * Fix --tab option that has been broken in 1.10.0 195 | * Retrieve strings directly from gschema (requires intltool 0.50.1) 196 | * Enable silent rules by default 197 | * Drop support for win32/osx 198 | * Some cleanups 199 | 200 | ### mate-terminal 1.10.1 201 | 202 | * Several help fixes. 203 | * fix size of profile-preferences window in GTK3 version with a default 204 | 205 | ### mate-terminal 1.10.0 206 | 207 | * Add dependency on libmate-desktop to use common functions 208 | 209 | ### mate-terminal 1.8.0 210 | 211 | * Add GTK3 support 212 | * Add previous/next profile keyboard shortcuts and menu items 213 | * Add cursor blink preference 214 | -------------------------------------------------------------------------------- /src/terminal-tab-label.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2001 Havoc Pennington 3 | * Copyright © 2007, 2008 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope tab_label it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #include 21 | 22 | #include 23 | 24 | #include "terminal-intl.h" 25 | #include "terminal-tab-label.h" 26 | #include "terminal-close-button.h" 27 | 28 | #define SPACING (4) 29 | 30 | struct _TerminalTabLabelPrivate 31 | { 32 | TerminalScreen *screen; 33 | GtkWidget *label; 34 | GtkWidget *close_button; 35 | gboolean bold; 36 | }; 37 | 38 | enum 39 | { 40 | PROP_0, 41 | PROP_SCREEN 42 | }; 43 | 44 | enum 45 | { 46 | CLOSE_BUTTON_CLICKED, 47 | LAST_SIGNAL 48 | }; 49 | 50 | static guint signals[LAST_SIGNAL] = { 0 }; 51 | 52 | G_DEFINE_TYPE_WITH_PRIVATE (TerminalTabLabel, terminal_tab_label, GTK_TYPE_BOX); 53 | 54 | /* helper functions */ 55 | 56 | static void 57 | close_button_clicked_cb (GtkWidget *widget, 58 | TerminalTabLabel *tab_label) 59 | { 60 | g_signal_emit (tab_label, signals[CLOSE_BUTTON_CLICKED], 0); 61 | } 62 | 63 | static void 64 | sync_tab_label (TerminalScreen *screen, 65 | GParamSpec *pspec, 66 | GtkWidget *label) 67 | { 68 | GtkWidget *hbox; 69 | const char *title; 70 | 71 | title = terminal_screen_get_title (screen); 72 | hbox = gtk_widget_get_parent (label); 73 | 74 | gtk_label_set_text (GTK_LABEL (label), title); 75 | 76 | gtk_widget_set_tooltip_text (hbox, title); 77 | } 78 | 79 | /* public functions */ 80 | 81 | /* Class implementation */ 82 | 83 | static void 84 | terminal_tab_label_parent_set (GtkWidget *widget, 85 | GtkWidget *old_parent) 86 | { 87 | void (* parent_set) (GtkWidget *, GtkWidget *) = GTK_WIDGET_CLASS (terminal_tab_label_parent_class)->parent_set; 88 | 89 | if (parent_set) 90 | parent_set (widget, old_parent); 91 | } 92 | 93 | static void 94 | terminal_tab_label_init (TerminalTabLabel *tab_label) 95 | { 96 | tab_label->priv = terminal_tab_label_get_instance_private (tab_label); 97 | } 98 | 99 | static GObject * 100 | terminal_tab_label_constructor (GType type, 101 | guint n_construct_properties, 102 | GObjectConstructParam *construct_params) 103 | { 104 | GObject *object; 105 | TerminalTabLabel *tab_label; 106 | TerminalTabLabelPrivate *priv; 107 | GtkWidget *hbox, *label, *close_button; 108 | 109 | object = G_OBJECT_CLASS (terminal_tab_label_parent_class)->constructor 110 | (type, n_construct_properties, construct_params); 111 | 112 | tab_label = TERMINAL_TAB_LABEL (object); 113 | hbox = GTK_WIDGET (tab_label); 114 | priv = tab_label->priv; 115 | 116 | g_assert (priv->screen != NULL); 117 | 118 | gtk_box_set_spacing (GTK_BOX (hbox), SPACING); 119 | 120 | priv->label = label = gtk_label_new (NULL); 121 | 122 | gtk_label_set_xalign (GTK_LABEL (label), 0.0); 123 | gtk_label_set_yalign (GTK_LABEL (label), 0.5); 124 | gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); 125 | gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE); 126 | 127 | gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); 128 | 129 | priv->close_button = close_button = terminal_close_button_new (); 130 | gtk_widget_set_tooltip_text (close_button, _("Close tab")); 131 | 132 | gtk_box_pack_end (GTK_BOX (hbox), close_button, FALSE, FALSE, 0); 133 | 134 | sync_tab_label (priv->screen, NULL, label); 135 | g_signal_connect (priv->screen, "notify::title", 136 | G_CALLBACK (sync_tab_label), label); 137 | 138 | g_signal_connect (close_button, "clicked", 139 | G_CALLBACK (close_button_clicked_cb), tab_label); 140 | 141 | gtk_widget_show_all (hbox); 142 | 143 | return object; 144 | } 145 | 146 | static void 147 | terminal_tab_label_dispose (GObject *object) 148 | { 149 | TerminalTabLabel *tab_label = TERMINAL_TAB_LABEL (object); 150 | TerminalTabLabelPrivate *priv = tab_label->priv; 151 | 152 | if (priv->screen != NULL) { 153 | g_signal_handlers_disconnect_by_func (priv->screen, 154 | G_CALLBACK (sync_tab_label), 155 | priv->label); 156 | g_object_unref (priv->screen); 157 | priv->screen = NULL; 158 | } 159 | 160 | G_OBJECT_CLASS (terminal_tab_label_parent_class)->dispose (object); 161 | } 162 | 163 | static void 164 | terminal_tab_label_finalize (GObject *object) 165 | { 166 | // TerminalTabLabel *tab_label = TERMINAL_TAB_LABEL (object); 167 | 168 | G_OBJECT_CLASS (terminal_tab_label_parent_class)->finalize (object); 169 | } 170 | 171 | static void 172 | terminal_tab_label_set_property (GObject *object, 173 | guint prop_id, 174 | const GValue *value, 175 | GParamSpec *pspec) 176 | { 177 | TerminalTabLabel *tab_label = TERMINAL_TAB_LABEL (object); 178 | TerminalTabLabelPrivate *priv = tab_label->priv; 179 | 180 | switch (prop_id) 181 | { 182 | case PROP_SCREEN: 183 | priv->screen = g_value_dup_object (value); 184 | break; 185 | default: 186 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 187 | break; 188 | } 189 | } 190 | 191 | static void 192 | terminal_tab_label_class_init (TerminalTabLabelClass *klass) 193 | { 194 | GObjectClass *gobject_class = G_OBJECT_CLASS (klass); 195 | GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); 196 | 197 | gobject_class->constructor = terminal_tab_label_constructor; 198 | gobject_class->dispose = terminal_tab_label_dispose; 199 | gobject_class->finalize = terminal_tab_label_finalize; 200 | gobject_class->set_property = terminal_tab_label_set_property; 201 | 202 | widget_class->parent_set = terminal_tab_label_parent_set; 203 | 204 | signals[CLOSE_BUTTON_CLICKED] = 205 | g_signal_new (I_("close-button-clicked"), 206 | G_OBJECT_CLASS_TYPE (gobject_class), 207 | G_SIGNAL_RUN_LAST, 208 | G_STRUCT_OFFSET (TerminalTabLabelClass, close_button_clicked), 209 | NULL, NULL, 210 | g_cclosure_marshal_VOID__VOID, 211 | G_TYPE_NONE, 212 | 0); 213 | 214 | g_object_class_install_property 215 | (gobject_class, 216 | PROP_SCREEN, 217 | g_param_spec_object ("screen", NULL, NULL, 218 | TERMINAL_TYPE_SCREEN, 219 | G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | 220 | G_PARAM_CONSTRUCT_ONLY)); 221 | } 222 | 223 | /* public API */ 224 | 225 | /** 226 | * terminal_tab_label_new: 227 | * @screen: a #TerminalScreen 228 | * 229 | * Returns: a new #TerminalTabLabel for @screen 230 | */ 231 | GtkWidget * 232 | terminal_tab_label_new (TerminalScreen *screen) 233 | { 234 | return g_object_new (TERMINAL_TYPE_TAB_LABEL, 235 | "screen", screen, 236 | NULL); 237 | } 238 | 239 | /** 240 | * terminal_tab_label_set_bold: 241 | * @tab_label: a #TerminalTabLabel 242 | * @bold: whether to enable label bolding 243 | * 244 | * Sets the tab label text bold, or unbolds it. 245 | */ 246 | void 247 | terminal_tab_label_set_bold (TerminalTabLabel *tab_label, 248 | gboolean bold) 249 | { 250 | TerminalTabLabelPrivate *priv = tab_label->priv; 251 | PangoAttrList *attr_list; 252 | PangoAttribute *weight_attr; 253 | gboolean free_list = FALSE; 254 | 255 | bold = bold != FALSE; 256 | if (priv->bold == bold) 257 | return; 258 | 259 | priv->bold = bold; 260 | 261 | attr_list = gtk_label_get_attributes (GTK_LABEL (priv->label)); 262 | if (!attr_list) 263 | { 264 | attr_list = pango_attr_list_new (); 265 | free_list = TRUE; 266 | } 267 | 268 | if (bold) 269 | weight_attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); 270 | else 271 | weight_attr = pango_attr_weight_new (PANGO_WEIGHT_NORMAL); 272 | 273 | /* gtk_label_get_attributes() returns the label's internal list, 274 | * which we're probably not supposed to modify directly. 275 | * It seems to work ok however. 276 | */ 277 | pango_attr_list_change (attr_list, weight_attr); 278 | 279 | gtk_label_set_attributes (GTK_LABEL (priv->label), attr_list); 280 | 281 | if (free_list) 282 | pango_attr_list_unref (attr_list); 283 | } 284 | -------------------------------------------------------------------------------- /src/skey/md4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 Nikos Mavroyanopoulos 3 | * 4 | * This library is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU Library General Public License as published 6 | * by the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | /* 21 | * The algorithm is due to Ron Rivest. This code is based on code 22 | * written by Colin Plumb in 1993. 23 | */ 24 | 25 | 26 | #include 27 | #include 28 | #include "config.h" 29 | #include "skey.h" 30 | #include "skeyutil.h" 31 | #include "md4.h" 32 | 33 | #ifndef WORDS_BIGENDIAN 34 | #define byteReverse(buf, len) /* Nothing */ 35 | #else 36 | static void byteReverse(unsigned char *buf, unsigned longs); 37 | 38 | 39 | /* 40 | * Note: this code is harmless on little-endian machines. 41 | */ 42 | static void byteReverse(unsigned char *buf, unsigned longs) 43 | { 44 | guint32 t; 45 | do 46 | { 47 | t = (guint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | 48 | ((unsigned) buf[1] << 8 | buf[0]); 49 | *(guint32 *) buf = t; 50 | buf += 4; 51 | } 52 | while (--longs); 53 | } 54 | #endif 55 | 56 | #define rotl32(x,n) (((x) << ((guint32)(n))) | ((x) >> (32 - (guint32)(n)))) 57 | 58 | /* 59 | * Start MD4 accumulation. Set bit count to 0 and buffer to mysterious 60 | * initialization constants. 61 | */ 62 | void MD4Init(MD4_CTX *ctx) 63 | { 64 | ctx->buf[0] = 0x67452301; 65 | ctx->buf[1] = 0xefcdab89; 66 | ctx->buf[2] = 0x98badcfe; 67 | ctx->buf[3] = 0x10325476; 68 | 69 | ctx->bits[0] = 0; 70 | ctx->bits[1] = 0; 71 | } 72 | 73 | /* 74 | * Update context to reflect the concatenation of another buffer full 75 | * of bytes. 76 | */ 77 | void MD4Update(MD4_CTX *ctx, unsigned char const *buf, 78 | unsigned len) 79 | { 80 | register guint32 t; 81 | 82 | /* Update bitcount */ 83 | 84 | t = ctx->bits[0]; 85 | if ((ctx->bits[0] = t + ((guint32) len << 3)) < t) 86 | ctx->bits[1]++; /* Carry from low to high */ 87 | ctx->bits[1] += len >> 29; 88 | 89 | t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ 90 | 91 | /* Handle any leading odd-sized chunks */ 92 | 93 | if (t) 94 | { 95 | unsigned char *p = (unsigned char *) ctx->in + t; 96 | 97 | t = 64 - t; 98 | if (len < t) 99 | { 100 | memcpy(p, buf, len); 101 | return; 102 | } 103 | memcpy(p, buf, t); 104 | byteReverse(ctx->in, 16); 105 | MD4Transform(ctx->buf, (guint32 *) ctx->in); 106 | buf += t; 107 | len -= t; 108 | } 109 | /* Process data in 64-byte chunks */ 110 | 111 | while (len >= 64) 112 | { 113 | memcpy(ctx->in, buf, 64); 114 | byteReverse(ctx->in, 16); 115 | MD4Transform(ctx->buf, (guint32 *) ctx->in); 116 | buf += 64; 117 | len -= 64; 118 | } 119 | 120 | /* Handle any remaining bytes of data. */ 121 | 122 | memcpy(ctx->in, buf, len); 123 | } 124 | 125 | /* 126 | * Final wrapup - pad to 64-byte boundary with the bit pattern 127 | * 1 0* (64-bit count of bits processed, MSB-first) 128 | */ 129 | void MD4Final(unsigned char* digest, MD4_CTX *ctx) 130 | { 131 | unsigned int count; 132 | unsigned char *p; 133 | 134 | /* Compute number of bytes mod 64 */ 135 | count = (ctx->bits[0] >> 3) & 0x3F; 136 | 137 | /* Set the first char of padding to 0x80. This is safe since there is 138 | always at least one byte free */ 139 | p = ctx->in + count; 140 | *p++ = 0x80; 141 | 142 | /* Bytes of padding needed to make 64 bytes */ 143 | count = 64 - 1 - count; 144 | 145 | /* Pad out to 56 mod 64 */ 146 | if (count < 8) 147 | { 148 | /* Two lots of padding: Pad the first block to 64 bytes */ 149 | memset(p, 0, count); 150 | byteReverse(ctx->in, 16); 151 | MD4Transform(ctx->buf, (guint32 *) ctx->in); 152 | 153 | /* Now fill the next block with 56 bytes */ 154 | memset(ctx->in, 0, 56); 155 | } 156 | else 157 | { 158 | /* Pad block to 56 bytes */ 159 | memset(p, 0, count - 8); 160 | } 161 | byteReverse(ctx->in, 14); 162 | 163 | /* Append length in bits and transform */ 164 | ((guint32 *) ctx->in)[14] = ctx->bits[0]; 165 | ((guint32 *) ctx->in)[15] = ctx->bits[1]; 166 | 167 | MD4Transform(ctx->buf, (guint32 *) ctx->in); 168 | byteReverse((unsigned char *) ctx->buf, 4); 169 | 170 | if (digest!=NULL) 171 | memcpy(digest, ctx->buf, 16); 172 | memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ 173 | } 174 | 175 | /* The three core functions */ 176 | 177 | #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) 178 | #define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) 179 | #define H(x, y, z) ((x) ^ (y) ^ (z)) 180 | 181 | #define FF(a, b, c, d, x, s) { \ 182 | (a) += F ((b), (c), (d)) + (x); \ 183 | (a) = rotl32 ((a), (s)); \ 184 | } 185 | #define GG(a, b, c, d, x, s) { \ 186 | (a) += G ((b), (c), (d)) + (x) + (guint32)0x5a827999; \ 187 | (a) = rotl32 ((a), (s)); \ 188 | } 189 | #define HH(a, b, c, d, x, s) { \ 190 | (a) += H ((b), (c), (d)) + (x) + (guint32)0x6ed9eba1; \ 191 | (a) = rotl32 ((a), (s)); \ 192 | } 193 | 194 | 195 | /* 196 | * The core of the MD4 algorithm 197 | */ 198 | void MD4Transform(guint32 buf[4], guint32 const in[16]) 199 | { 200 | register guint32 a, b, c, d; 201 | 202 | a = buf[0]; 203 | b = buf[1]; 204 | c = buf[2]; 205 | d = buf[3]; 206 | 207 | FF(a, b, c, d, in[0], 3); /* 1 */ 208 | FF(d, a, b, c, in[1], 7); /* 2 */ 209 | FF(c, d, a, b, in[2], 11); /* 3 */ 210 | FF(b, c, d, a, in[3], 19); /* 4 */ 211 | FF(a, b, c, d, in[4], 3); /* 5 */ 212 | FF(d, a, b, c, in[5], 7); /* 6 */ 213 | FF(c, d, a, b, in[6], 11); /* 7 */ 214 | FF(b, c, d, a, in[7], 19); /* 8 */ 215 | FF(a, b, c, d, in[8], 3); /* 9 */ 216 | FF(d, a, b, c, in[9], 7); /* 10 */ 217 | FF(c, d, a, b, in[10], 11); /* 11 */ 218 | FF(b, c, d, a, in[11], 19); /* 12 */ 219 | FF(a, b, c, d, in[12], 3); /* 13 */ 220 | FF(d, a, b, c, in[13], 7); /* 14 */ 221 | FF(c, d, a, b, in[14], 11); /* 15 */ 222 | FF(b, c, d, a, in[15], 19); /* 16 */ 223 | 224 | GG(a, b, c, d, in[0], 3); /* 17 */ 225 | GG(d, a, b, c, in[4], 5); /* 18 */ 226 | GG(c, d, a, b, in[8], 9); /* 19 */ 227 | GG(b, c, d, a, in[12], 13); /* 20 */ 228 | GG(a, b, c, d, in[1], 3); /* 21 */ 229 | GG(d, a, b, c, in[5], 5); /* 22 */ 230 | GG(c, d, a, b, in[9], 9); /* 23 */ 231 | GG(b, c, d, a, in[13], 13); /* 24 */ 232 | GG(a, b, c, d, in[2], 3); /* 25 */ 233 | GG(d, a, b, c, in[6], 5); /* 26 */ 234 | GG(c, d, a, b, in[10], 9); /* 27 */ 235 | GG(b, c, d, a, in[14], 13); /* 28 */ 236 | GG(a, b, c, d, in[3], 3); /* 29 */ 237 | GG(d, a, b, c, in[7], 5); /* 30 */ 238 | GG(c, d, a, b, in[11], 9); /* 31 */ 239 | GG(b, c, d, a, in[15], 13); /* 32 */ 240 | 241 | HH(a, b, c, d, in[0], 3); /* 33 */ 242 | HH(d, a, b, c, in[8], 9); /* 34 */ 243 | HH(c, d, a, b, in[4], 11); /* 35 */ 244 | HH(b, c, d, a, in[12], 15); /* 36 */ 245 | HH(a, b, c, d, in[2], 3); /* 37 */ 246 | HH(d, a, b, c, in[10], 9); /* 38 */ 247 | HH(c, d, a, b, in[6], 11); /* 39 */ 248 | HH(b, c, d, a, in[14], 15); /* 40 */ 249 | HH(a, b, c, d, in[1], 3); /* 41 */ 250 | HH(d, a, b, c, in[9], 9); /* 42 */ 251 | HH(c, d, a, b, in[5], 11); /* 43 */ 252 | HH(b, c, d, a, in[13], 15); /* 44 */ 253 | HH(a, b, c, d, in[3], 3); /* 45 */ 254 | HH(d, a, b, c, in[11], 9); /* 46 */ 255 | HH(c, d, a, b, in[7], 11); /* 47 */ 256 | HH(b, c, d, a, in[15], 15); /* 48 */ 257 | 258 | 259 | buf[0] += a; 260 | buf[1] += b; 261 | buf[2] += c; 262 | buf[3] += d; 263 | } 264 | 265 | int MD4Keycrunch( char *result, const char *seed, const char *passphrase) 266 | { 267 | int len; 268 | char *buf; 269 | MD4_CTX md; 270 | guint32 results[4]; 271 | 272 | len = strlen(seed) + strlen(passphrase); 273 | buf = (char *)malloc(len+1); 274 | if (buf == NULL) 275 | return -1; 276 | 277 | strcpy(buf, seed); 278 | skey_lowcase(buf); 279 | strcat(buf, passphrase); 280 | skey_sevenbit(buf); 281 | 282 | MD4Init(&md); 283 | MD4Update(&md, (unsigned char *)buf, len); 284 | MD4Final((unsigned char *)results, &md); 285 | free(buf); 286 | 287 | results[0] ^= results[2]; 288 | results[1] ^= results[3]; 289 | memcpy((void *)result, (void *)results, SKEY_SIZE); 290 | 291 | return 0; 292 | } 293 | 294 | 295 | void MD4SKey(char *x) 296 | { 297 | MD4_CTX md; 298 | guint32 results[4]; 299 | 300 | MD4Init(&md); 301 | MD4Update(&md, (unsigned char *)x, SKEY_SIZE); 302 | MD4Final((unsigned char *)results, &md); 303 | 304 | results[0] ^= results[2]; 305 | results[1] ^= results[3]; 306 | 307 | memcpy((void *)x, (void *)results, SKEY_SIZE); 308 | } 309 | 310 | #ifdef MD4_MAIN 311 | 312 | #include 313 | #include 314 | #include 315 | 316 | int main(int argc, char *argv[]) 317 | { 318 | MD4_CTX *md4; 319 | unsigned char digest[16]; 320 | unsigned char data[1024]; 321 | int i, r; 322 | 323 | memset(digest, 0, 16); 324 | printf("MD4 digest algorithm. End with Ctrl-D:\n"); 325 | 326 | md4 = (MD4_CTX *)malloc(sizeof(MD4_CTX)); 327 | MD4Init(md4); 328 | do 329 | { 330 | r = read(0, data, sizeof data); 331 | MD4Update(md4, data, r); 332 | } 333 | while (r); 334 | 335 | MD4Final(digest, md4); 336 | printf("MD4 Digest is: "); 337 | for (i = 0; i < 16; i++) 338 | printf("%02X", digest[i]); 339 | 340 | printf("\n"); 341 | free(md4); 342 | return 0; 343 | } 344 | 345 | #endif 346 | --------------------------------------------------------------------------------