parent
ab56ecda0f
commit
ca9ac7fd9e
|
@ -1,19 +0,0 @@
|
||||||
#### Expected behaviour
|
|
||||||
|
|
||||||
|
|
||||||
#### Actual behaviour
|
|
||||||
|
|
||||||
|
|
||||||
#### Steps to reproduce the behaviour
|
|
||||||
|
|
||||||
|
|
||||||
#### MATE general version
|
|
||||||
|
|
||||||
|
|
||||||
#### Package version
|
|
||||||
|
|
||||||
|
|
||||||
#### Linux Distribution
|
|
||||||
|
|
||||||
|
|
||||||
#### Link to downstream report of your Distribution
|
|
116
.travis.yml
116
.travis.yml
|
@ -1,116 +0,0 @@
|
||||||
# vim: set ts=2 sts=2 sw=2 expandtab :
|
|
||||||
dist: xenial
|
|
||||||
sudo: required
|
|
||||||
language: bash
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- curl -Ls -o docker-build https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/docker-build
|
|
||||||
- chmod +x docker-build
|
|
||||||
|
|
||||||
install:
|
|
||||||
- sudo apt-get install -y python3-pip python3-setuptools
|
|
||||||
- sudo pip3 install --upgrade pip
|
|
||||||
- sudo pip install PyGithub
|
|
||||||
- ./docker-build --name ${DISTRO} --config .travis.yml --install
|
|
||||||
|
|
||||||
script:
|
|
||||||
- ./docker-build --name ${DISTRO} --verbose --config .travis.yml --build autotools
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
- provider: script
|
|
||||||
script: ./docker-build --verbose --config .travis.yml --release github
|
|
||||||
skip_cleanup: true
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$"
|
|
||||||
|
|
||||||
env:
|
|
||||||
- DISTRO="archlinux/base"
|
|
||||||
- DISTRO="debian:sid"
|
|
||||||
- DISTRO="fedora:29"
|
|
||||||
- DISTRO="ubuntu:18.10"
|
|
||||||
|
|
||||||
##########################################################
|
|
||||||
# THE FOLLOWING LINES IS USED BY docker-build
|
|
||||||
##########################################################
|
|
||||||
requires:
|
|
||||||
archlinux:
|
|
||||||
# Useful URL: https://git.archlinux.org/svntogit/community.git/tree/mate-terminal
|
|
||||||
- gcc
|
|
||||||
- git
|
|
||||||
- intltool
|
|
||||||
- libsm
|
|
||||||
- make
|
|
||||||
- mate-common
|
|
||||||
- mate-desktop
|
|
||||||
- vte3
|
|
||||||
- which
|
|
||||||
- yelp-tools
|
|
||||||
|
|
||||||
debian:
|
|
||||||
# Useful URL: https://github.com/mate-desktop/debian-packages
|
|
||||||
# Useful URL: https://salsa.debian.org/debian-mate-team/mate-terminal
|
|
||||||
- git
|
|
||||||
- intltool
|
|
||||||
- intltool
|
|
||||||
- libdconf-dev
|
|
||||||
- libglib2.0-dev
|
|
||||||
- libgtk-3-dev
|
|
||||||
- libsm-dev
|
|
||||||
- libvte-2.91-dev
|
|
||||||
- libx11-dev
|
|
||||||
- make
|
|
||||||
- mate-common
|
|
||||||
- yelp-tools
|
|
||||||
|
|
||||||
fedora:
|
|
||||||
# Useful URL: https://src.fedoraproject.org/cgit/rpms/mate-terminal.git
|
|
||||||
- gcc
|
|
||||||
- dconf-devel
|
|
||||||
- desktop-file-utils
|
|
||||||
- git
|
|
||||||
- gtk3-devel
|
|
||||||
- libSM-devel
|
|
||||||
- make
|
|
||||||
- mate-common
|
|
||||||
- redhat-rpm-config
|
|
||||||
- vte291-devel
|
|
||||||
|
|
||||||
ubuntu:
|
|
||||||
- git
|
|
||||||
- intltool
|
|
||||||
- intltool
|
|
||||||
- libdconf-dev
|
|
||||||
- libglib2.0-dev
|
|
||||||
- libgtk-3-dev
|
|
||||||
- libsm-dev
|
|
||||||
- libvte-2.91-dev
|
|
||||||
- libx11-dev
|
|
||||||
- make
|
|
||||||
- mate-common
|
|
||||||
- yelp-tools
|
|
||||||
|
|
||||||
variables:
|
|
||||||
- CFLAGS="-Wall -Werror=format-security"
|
|
||||||
|
|
||||||
before_scripts:
|
|
||||||
- if [ ${DISTRO_NAME} == "debian" ];then
|
|
||||||
- curl -Ls -o debian.sh https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/debian.sh
|
|
||||||
- bash ./debian.sh
|
|
||||||
- fi
|
|
||||||
|
|
||||||
after_scripts:
|
|
||||||
- make distcheck
|
|
||||||
|
|
||||||
releases:
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
checksum: true
|
|
||||||
file_glob: true
|
|
||||||
files: mate-terminal-*.tar.xz
|
|
||||||
github_release:
|
|
||||||
tags: true
|
|
||||||
overwrite: true
|
|
||||||
base_version: 1.20.0
|
|
12
Makefile.am
12
Makefile.am
|
@ -11,7 +11,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
|
||||||
|
|
||||||
@INTLTOOL_XML_RULE@
|
@INTLTOOL_XML_RULE@
|
||||||
appdatadir = $(datadir)/metainfo
|
appdatadir = $(datadir)/metainfo
|
||||||
appdata_in_files = mate-terminal.appdata.xml.in
|
appdata_in_files = gatuno-terminal.appdata.xml.in
|
||||||
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
|
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
|
||||||
|
|
||||||
desktopdir = $(datadir)/applications
|
desktopdir = $(datadir)/applications
|
||||||
|
@ -19,21 +19,21 @@ desktop_in_files = @PACKAGE@.desktop.in.in
|
||||||
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
|
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
|
||||||
@INTLTOOL_DESKTOP_RULE@
|
@INTLTOOL_DESKTOP_RULE@
|
||||||
|
|
||||||
man_MANS = mate-terminal.1
|
man_MANS = gatuno-terminal.1
|
||||||
|
|
||||||
bin_SCRIPTS = mate-terminal.wrapper
|
bin_SCRIPTS = gatuno-terminal.wrapper
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
autogen.sh \
|
|
||||||
xmldocs.make \
|
xmldocs.make \
|
||||||
omf.make \
|
omf.make \
|
||||||
mate-terminal.wrapper \
|
gatuno-terminal.wrapper \
|
||||||
$(appdata_in_files) \
|
$(appdata_in_files) \
|
||||||
$(man_MANS) \
|
$(man_MANS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
# autogen.sh \
|
||||||
|
|
||||||
CLEANFILES = \
|
CLEANFILES = \
|
||||||
mate-terminal.appdata.xml \
|
gatuno-terminal.appdata.xml \
|
||||||
$(desktop_DATA) \
|
$(desktop_DATA) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
3
README
3
README
|
@ -1,9 +1,10 @@
|
||||||
|
|
||||||
This is the MATE terminal emulator application. mate-terminal is
|
This is the Gatuno terminal emulator application. gatuno-terminal is
|
||||||
only the shell (menubar, prefs dialog); the terminal emulation ("stuff
|
only the shell (menubar, prefs dialog); the terminal emulation ("stuff
|
||||||
in the middle") comes from the VTE widget. Remember this when you
|
in the middle") comes from the VTE widget. Remember this when you
|
||||||
report a bug. ;-)
|
report a bug. ;-)
|
||||||
|
|
||||||
|
Gatuno Terminal is a fork of Mate terminal.
|
||||||
MATE terminal is a fork of GNOME terminal.
|
MATE terminal is a fork of GNOME terminal.
|
||||||
|
|
||||||
How it works
|
How it works
|
||||||
|
|
30
autogen.sh
30
autogen.sh
|
@ -1,30 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Run this to generate all the initial makefiles, etc.
|
|
||||||
|
|
||||||
srcdir=`dirname $0`
|
|
||||||
test -z "$srcdir" && srcdir=.
|
|
||||||
|
|
||||||
PKG_NAME="mate-terminal"
|
|
||||||
|
|
||||||
(test -f $srcdir/configure.ac) || {
|
|
||||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
|
||||||
echo " top-level $PKG_NAME directory"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
which mate-autogen || {
|
|
||||||
echo "You need to install mate-common"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
which yelp-build || {
|
|
||||||
echo "You need to install yelp-tools"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
REQUIRED_AUTOMAKE_VERSION=1.9
|
|
||||||
MATE_DATADIR="$mate_datadir"
|
|
||||||
USE_COMMON_DOC_BUILD=yes
|
|
||||||
|
|
||||||
. mate-autogen
|
|
||||||
|
|
29
configure.ac
29
configure.ac
|
@ -6,7 +6,7 @@ m4_define([gt_version],[gt_version_major().gt_version_minor().gt_version_micro()
|
||||||
|
|
||||||
m4_define([gt_api_version],[0])
|
m4_define([gt_api_version],[0])
|
||||||
|
|
||||||
AC_INIT([MATE Terminal],[gt_version],[http://www.mate-desktop.org],[mate-terminal])
|
AC_INIT([Gatuno Terminal],[gt_version],[http://git.gatuno.mx/gatuno/gatuno-terminal],[gatuno-terminal])
|
||||||
AC_CONFIG_SRCDIR([src/terminal.c])
|
AC_CONFIG_SRCDIR([src/terminal.c])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||||
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz check-news])
|
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz check-news])
|
||||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
GETTEXT_PACKAGE=mate-terminal
|
GETTEXT_PACKAGE=gatuno-terminal
|
||||||
AC_SUBST([GETTEXT_PACKAGE])
|
AC_SUBST([GETTEXT_PACKAGE])
|
||||||
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
|
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
|
||||||
|
|
||||||
|
@ -31,18 +31,12 @@ AC_HEADER_STDC
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
IT_PROG_INTLTOOL([0.50.1])
|
IT_PROG_INTLTOOL([0.50.1])
|
||||||
|
|
||||||
MATE_COMMON_INIT
|
|
||||||
MATE_DEBUG_CHECK
|
|
||||||
MATE_COMPILE_WARNINGS([maximum])
|
|
||||||
#MATE_MAINTAINER_MODE_DEFINES
|
|
||||||
|
|
||||||
AM_GLIB_GNU_GETTEXT
|
AM_GLIB_GNU_GETTEXT
|
||||||
|
|
||||||
GLIB_REQUIRED=2.50.0
|
GLIB_REQUIRED=2.50.0
|
||||||
GIO_REQUIRED=2.50.0
|
GIO_REQUIRED=2.50.0
|
||||||
GTK_REQUIRED=3.22.0
|
GTK_REQUIRED=3.22.0
|
||||||
VTE_REQUIRED=0.48
|
VTE_REQUIRED=0.48
|
||||||
DCONF_REQUIRED=0.13.4
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([TERM],
|
PKG_CHECK_MODULES([TERM],
|
||||||
[vte-2.91 >= $VTE_REQUIRED
|
[vte-2.91 >= $VTE_REQUIRED
|
||||||
|
@ -50,22 +44,8 @@ PKG_CHECK_MODULES([TERM],
|
||||||
gthread-2.0
|
gthread-2.0
|
||||||
gio-2.0 >= $GIO_REQUIRED
|
gio-2.0 >= $GIO_REQUIRED
|
||||||
gtk+-3.0 >= $GTK_REQUIRED
|
gtk+-3.0 >= $GTK_REQUIRED
|
||||||
dconf >= $DCONF_REQUIRED
|
|
||||||
x11])
|
x11])
|
||||||
|
|
||||||
# ********
|
|
||||||
# smclient
|
|
||||||
# ********
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(SMCLIENT, sm >= 1.0.0)
|
|
||||||
AC_SUBST([SMCLIENT_CFLAGS])
|
|
||||||
AC_SUBST([SMCLIENT_LIBS])
|
|
||||||
|
|
||||||
# *****
|
|
||||||
# GSettings
|
|
||||||
# *****
|
|
||||||
|
|
||||||
GLIB_GSETTINGS
|
|
||||||
|
|
||||||
GLIB_GENMARSHAL="$($PKG_CONFIG --variable=glib_genmarshal glib-2.0)"
|
GLIB_GENMARSHAL="$($PKG_CONFIG --variable=glib_genmarshal glib-2.0)"
|
||||||
AC_SUBST([GLIB_GENMARSHAL])
|
AC_SUBST([GLIB_GENMARSHAL])
|
||||||
|
@ -123,9 +103,8 @@ AC_SUBST([TERMINAL_API_VERSION],[gt_api_version])
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
mate-terminal.desktop.in
|
gatuno-terminal.desktop.in
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/org.mate.terminal.gschema.xml
|
|
||||||
src/terminal-version.h
|
src/terminal-version.h
|
||||||
src/skey/Makefile
|
src/skey/Makefile
|
||||||
help/Makefile
|
help/Makefile
|
||||||
|
@ -136,7 +115,7 @@ AC_OUTPUT
|
||||||
# ****************************
|
# ****************************
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
mate-terminal-$VERSION:
|
gatuno-terminal-$VERSION:
|
||||||
|
|
||||||
prefix: ${prefix}
|
prefix: ${prefix}
|
||||||
source code location: ${srcdir}
|
source code location: ${srcdir}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
_Name=Gatuno Terminal
|
||||||
|
_GenericName=Terminal
|
||||||
|
_Comment=Use the command line
|
||||||
|
TryExec=gatuno-terminal
|
||||||
|
Exec=gatuno-terminal
|
||||||
|
Icon=utilities-terminal
|
||||||
|
Type=Application
|
||||||
|
Categories=System;GTK;Utility;TerminalEmulator;
|
||||||
|
StartupNotify=true
|
||||||
|
|
|
@ -78,4 +78,4 @@ if ($login == 1)
|
||||||
{
|
{
|
||||||
@args = ('--login', @args);
|
@args = ('--login', @args);
|
||||||
}
|
}
|
||||||
exec('mate-terminal',@args);
|
exec('gatuno-terminal',@args);
|
2
makepot
2
makepot
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
PACKAGE=mate-terminal;
|
PACKAGE=gatuno-terminal;
|
||||||
|
|
||||||
# normal translations for the package
|
# normal translations for the package
|
||||||
make -C po $PACKAGE.pot && mv po/$PACKAGE.pot .
|
make -C po $PACKAGE.pot && mv po/$PACKAGE.pot .
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
_Name=MATE Terminal
|
|
||||||
_GenericName=Terminal
|
|
||||||
_Comment=Use the command line
|
|
||||||
TryExec=mate-terminal
|
|
||||||
Exec=mate-terminal
|
|
||||||
Icon=utilities-terminal
|
|
||||||
Type=Application
|
|
||||||
X-MATE-DocPath=mate-terminal/index.html
|
|
||||||
X-MATE-Bugzilla-Bugzilla=MATE
|
|
||||||
X-MATE-Bugzilla-Product=mate-terminal
|
|
||||||
X-MATE-Bugzilla-Component=BugBuddyBugs
|
|
||||||
X-MATE-Bugzilla-Version=@VERSION@
|
|
||||||
Categories=System;GTK;Utility;TerminalEmulator;
|
|
||||||
StartupNotify=true
|
|
||||||
|
|
|
@ -165,15 +165,16 @@ enum
|
||||||
#define DEFAULT_VISIBLE_NAME (N_("Unnamed"))
|
#define DEFAULT_VISIBLE_NAME (N_("Unnamed"))
|
||||||
#define DEFAULT_WORD_CHARS ("-A-Za-z0-9,./?%&#:_=+@~")
|
#define DEFAULT_WORD_CHARS ("-A-Za-z0-9,./?%&#:_=+@~")
|
||||||
|
|
||||||
|
#define PROFILE_GROUP_NAME "profile"
|
||||||
|
|
||||||
struct _TerminalProfilePrivate
|
struct _TerminalProfilePrivate
|
||||||
{
|
{
|
||||||
GValueArray *properties;
|
GValueArray *properties;
|
||||||
gboolean *locked;
|
gboolean *locked;
|
||||||
|
|
||||||
GSettings *settings;
|
GKeyFile *settings;
|
||||||
char *profile_dir;
|
char *profile_dir;
|
||||||
|
|
||||||
GSList *dirty_pspecs;
|
|
||||||
guint save_idle_id;
|
guint save_idle_id;
|
||||||
|
|
||||||
GParamSpec *gsettings_notification_pspec;
|
GParamSpec *gsettings_notification_pspec;
|
||||||
|
@ -547,14 +548,14 @@ terminal_profile_reset_property_internal (TerminalProfile *profile,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
terminal_profile_gsettings_notify_cb (GSettings *settings,
|
terminal_profile_ini_read (GKeyFile *settings,
|
||||||
gchar *key,
|
gchar *key,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
TerminalProfile *profile = TERMINAL_PROFILE (user_data);
|
TerminalProfile *profile = TERMINAL_PROFILE (user_data);
|
||||||
TerminalProfilePrivate *priv = profile->priv;
|
TerminalProfilePrivate *priv = profile->priv;
|
||||||
TerminalProfileClass *klass;
|
TerminalProfileClass *klass;
|
||||||
GVariant *settings_value;
|
GError *gerror = NULL;
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
GValue value = { 0, };
|
GValue value = { 0, };
|
||||||
gboolean equal;
|
gboolean equal;
|
||||||
|
@ -562,80 +563,105 @@ terminal_profile_gsettings_notify_cb (GSettings *settings,
|
||||||
|
|
||||||
if (!key) return;
|
if (!key) return;
|
||||||
|
|
||||||
_terminal_debug_print (TERMINAL_DEBUG_PROFILE,
|
|
||||||
"GSettings notification for key %s [%s]\n",
|
|
||||||
key,
|
|
||||||
g_settings_is_writable (settings, key) ? "writable" : "LOCKED");
|
|
||||||
|
|
||||||
klass = TERMINAL_PROFILE_GET_CLASS (profile);
|
klass = TERMINAL_PROFILE_GET_CLASS (profile);
|
||||||
pspec = g_hash_table_lookup (klass->gsettings_keys, key);
|
pspec = g_hash_table_lookup (klass->gsettings_keys, key);
|
||||||
if (!pspec)
|
if (!pspec)
|
||||||
return; /* ignore unknown keys, for future extensibility */
|
return; /* ignore unknown keys, for future extensibility */
|
||||||
|
|
||||||
priv->locked[pspec->param_id] = !g_settings_is_writable (settings, key);
|
priv->locked[pspec->param_id] = FALSE;
|
||||||
|
|
||||||
settings_value = g_settings_get_value (settings, key);
|
|
||||||
if (!settings_value)
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||||
|
|
||||||
if (G_IS_PARAM_SPEC_BOOLEAN (pspec))
|
if (G_IS_PARAM_SPEC_BOOLEAN (pspec))
|
||||||
{
|
{
|
||||||
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_BOOLEAN))
|
gboolean res;
|
||||||
|
res = g_key_file_get_boolean (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), &gerror);
|
||||||
|
if (gerror != NULL) {
|
||||||
|
/* No es un boolean, triste caso */
|
||||||
|
g_error_free (gerror);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
g_value_set_boolean (&value, g_variant_get_boolean (settings_value));
|
g_value_set_boolean (&value, g_variant_get_boolean (settings_value));
|
||||||
}
|
}
|
||||||
else if (G_IS_PARAM_SPEC_STRING (pspec))
|
else if (G_IS_PARAM_SPEC_STRING (pspec))
|
||||||
{
|
{
|
||||||
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
|
gchar *cadena;
|
||||||
|
cadena = g_key_file_get_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), NULL);
|
||||||
|
|
||||||
|
if (cadena == NULL) {
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
g_value_set_string (&value, g_variant_get_string (settings_value, NULL));
|
g_value_set_string (&value, cadena);
|
||||||
|
g_free (cadena);
|
||||||
}
|
}
|
||||||
else if (G_IS_PARAM_SPEC_ENUM (pspec))
|
else if (G_IS_PARAM_SPEC_ENUM (pspec))
|
||||||
{
|
{
|
||||||
|
gint entero;
|
||||||
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
|
entero = g_key_file_get_integer (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), &gerror);
|
||||||
|
if (gerror != NULL) {
|
||||||
|
/* No es un entero, mal */
|
||||||
|
g_error_free (gerror);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
g_value_set_enum (&value, g_settings_get_enum (settings, key));
|
|
||||||
|
g_value_set_enum (&value, entero);
|
||||||
}
|
}
|
||||||
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA)
|
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA)
|
||||||
{
|
{
|
||||||
GdkRGBA color;
|
GdkRGBA color;
|
||||||
|
|
||||||
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
|
gchar *cadena;
|
||||||
|
cadena = g_key_file_get_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), NULL);
|
||||||
|
|
||||||
|
if (cadena == NULL) {
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gdk_rgba_parse (&color, g_variant_get_string (settings_value, NULL)))
|
if (!gdk_rgba_parse (&color, cadena)) {
|
||||||
|
g_free (cadena);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
g_free (cadena);
|
||||||
|
|
||||||
g_value_set_boxed (&value, &color);
|
g_value_set_boxed (&value, &color);
|
||||||
}
|
}
|
||||||
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == PANGO_TYPE_FONT_DESCRIPTION)
|
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == PANGO_TYPE_FONT_DESCRIPTION)
|
||||||
{
|
{
|
||||||
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
|
gchar *cadena;
|
||||||
|
cadena = g_key_file_get_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), NULL);
|
||||||
|
|
||||||
|
if (cadena == NULL) {
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
g_value_take_boxed (&value, pango_font_description_from_string (g_variant_get_string (settings_value, NULL)));
|
g_value_take_boxed (&value, pango_font_description_from_string (cadena));
|
||||||
|
g_free (cadena);
|
||||||
}
|
}
|
||||||
else if (G_IS_PARAM_SPEC_DOUBLE (pspec))
|
else if (G_IS_PARAM_SPEC_DOUBLE (pspec))
|
||||||
{
|
{
|
||||||
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_DOUBLE))
|
gdouble doble;
|
||||||
|
doble = g_key_file_get_double (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), &gerror);
|
||||||
|
|
||||||
|
if (gerror != NULL) {
|
||||||
|
g_error_free (gerror);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
g_value_set_double (&value, g_variant_get_double (settings_value));
|
g_value_set_double (&value, doble);
|
||||||
}
|
}
|
||||||
else if (G_IS_PARAM_SPEC_INT (pspec))
|
else if (G_IS_PARAM_SPEC_INT (pspec))
|
||||||
{
|
{
|
||||||
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_INT16) &&
|
gint entero;
|
||||||
!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_INT32) &&
|
entero = g_key_file_get_integer (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), &gerror);
|
||||||
!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_INT64))
|
|
||||||
|
if (gerror != NULL) {
|
||||||
|
/* No es un entero, mal */
|
||||||
|
g_error_free (gerror);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
g_value_set_int (&value, g_settings_get_int(settings, key));
|
|
||||||
|
g_value_set_int (&value, entero);
|
||||||
}
|
}
|
||||||
else if (G_IS_PARAM_SPEC_VALUE_ARRAY (pspec) &&
|
else if (G_IS_PARAM_SPEC_VALUE_ARRAY (pspec) &&
|
||||||
G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_RGBA)
|
G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_RGBA)
|
||||||
|
@ -643,14 +669,12 @@ terminal_profile_gsettings_notify_cb (GSettings *settings,
|
||||||
char **color_strings;
|
char **color_strings;
|
||||||
GdkRGBA *colors;
|
GdkRGBA *colors;
|
||||||
int n_colors, i;
|
int n_colors, i;
|
||||||
|
|
||||||
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
|
color_strings = g_key_file_get_string_list (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), NULL);
|
||||||
|
if (color_strings == NULL) {
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
color_strings = g_strsplit (g_variant_get_string (settings_value, NULL), ":", -1);
|
|
||||||
if (!color_strings)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
n_colors = g_strv_length (color_strings);
|
n_colors = g_strv_length (color_strings);
|
||||||
colors = g_new0 (GdkRGBA, n_colors);
|
colors = g_new0 (GdkRGBA, n_colors);
|
||||||
for (i = 0; i < n_colors; ++i)
|
for (i = 0; i < n_colors; ++i)
|
||||||
|
@ -713,53 +737,33 @@ out:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
g_value_unset (&value);
|
g_value_unset (&value);
|
||||||
g_variant_unref (settings_value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
terminal_profile_gsettings_changeset_add (TerminalProfile *profile,
|
terminal_profile_ini_write (TerminalProfile *profile, GKeyFile *settings, GParamSpec *pspec) {
|
||||||
GSettings *changeset,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
TerminalProfilePrivate *priv = profile->priv;
|
TerminalProfilePrivate *priv = profile->priv;
|
||||||
char *key;
|
TerminalProfileClass *klass;
|
||||||
const GValue *value;
|
GValue *value;
|
||||||
|
|
||||||
/* FIXME: do this? */
|
if (settings == NULL) return;
|
||||||
#if 0
|
|
||||||
if (priv->locked[pspec->param_id])
|
klass = TERMINAL_PROFILE_GET_CLASS (profile);
|
||||||
return;
|
|
||||||
|
|
||||||
if (!g_settings_is_writable (priv->settings, gsettings_key, NULL))
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
key = g_param_spec_get_qdata (pspec, gsettings_key_quark);
|
|
||||||
if (!key)
|
|
||||||
return;
|
|
||||||
|
|
||||||
value = g_value_array_get_nth (priv->properties, pspec->param_id);
|
value = g_value_array_get_nth (priv->properties, pspec->param_id);
|
||||||
|
|
||||||
_terminal_debug_print (TERMINAL_DEBUG_PROFILE,
|
|
||||||
"Adding pspec %s with value %s to the GSettings changeset\n",
|
|
||||||
pspec->name, g_strdup_value_contents (value));
|
|
||||||
|
|
||||||
if (G_IS_PARAM_SPEC_BOOLEAN (pspec))
|
if (G_IS_PARAM_SPEC_BOOLEAN (pspec))
|
||||||
g_settings_set_boolean (changeset, key, g_value_get_boolean (value));
|
{
|
||||||
|
g_key_file_set_boolean (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), g_value_get_boolean (value));
|
||||||
|
}
|
||||||
else if (G_IS_PARAM_SPEC_STRING (pspec))
|
else if (G_IS_PARAM_SPEC_STRING (pspec))
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
str = g_value_get_string (value);
|
str = g_value_get_string (value);
|
||||||
g_settings_set_string (changeset, key, str ? str : "");
|
g_key_file_set_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), str ? str : "");
|
||||||
}
|
}
|
||||||
else if (G_IS_PARAM_SPEC_ENUM (pspec))
|
else if (G_IS_PARAM_SPEC_ENUM (pspec))
|
||||||
{
|
{
|
||||||
const GEnumValue *eval;
|
g_key_file_set_integer (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), g_value_get_enum (value));
|
||||||
|
|
||||||
eval = g_enum_get_value (G_PARAM_SPEC_ENUM (pspec)->enum_class, g_value_get_enum (value));
|
|
||||||
|
|
||||||
g_settings_set_enum (changeset, key, eval->value);
|
|
||||||
}
|
}
|
||||||
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA)
|
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA)
|
||||||
{
|
{
|
||||||
|
@ -769,73 +773,77 @@ terminal_profile_gsettings_changeset_add (TerminalProfile *profile,
|
||||||
color = g_value_get_boxed (value);
|
color = g_value_get_boxed (value);
|
||||||
if (!color)
|
if (!color)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
g_snprintf (str, sizeof (str),
|
cadena = g_snprintf (str, sizeof (str),
|
||||||
"#%04X%04X%04X",
|
"#%04X%04X%04X",
|
||||||
(guint) (color->red * 65535),
|
(guint) (color->red * 65535),
|
||||||
(guint) (color->green * 65535),
|
(guint) (color->green * 65535),
|
||||||
(guint) (color->blue * 65535));
|
(guint) (color->blue * 65535));
|
||||||
|
g_key_file_set_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), str);
|
||||||
g_settings_set_string (changeset, key, str);
|
|
||||||
}
|
}
|
||||||
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == PANGO_TYPE_FONT_DESCRIPTION)
|
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == PANGO_TYPE_FONT_DESCRIPTION)
|
||||||
{
|
{
|
||||||
PangoFontDescription *font_desc;
|
PangoFontDescription *font_desc;
|
||||||
char *font;
|
char *font;
|
||||||
|
|
||||||
font_desc = g_value_get_boxed (value);
|
font_desc = g_value_get_boxed (value);
|
||||||
if (!font_desc)
|
if (!font_desc)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
font = pango_font_description_to_string (font_desc);
|
font = pango_font_description_to_string (font_desc);
|
||||||
g_settings_set_string (changeset, key, font);
|
g_key_file_set_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), font);
|
||||||
g_free (font);
|
g_free (font);
|
||||||
}
|
}
|
||||||
else if (G_IS_PARAM_SPEC_DOUBLE (pspec))
|
else if (G_IS_PARAM_SPEC_DOUBLE (pspec))
|
||||||
g_settings_set_double (changeset, key, g_value_get_double (value));
|
{
|
||||||
|
g_key_file_set_double (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), g_value_get_double (value));
|
||||||
|
}
|
||||||
else if (G_IS_PARAM_SPEC_INT (pspec))
|
else if (G_IS_PARAM_SPEC_INT (pspec))
|
||||||
g_settings_set_int (changeset, key, g_value_get_int (value));
|
{
|
||||||
|
g_key_file_set_integer (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), g_value_get_integer (value));
|
||||||
|
}
|
||||||
else if (G_IS_PARAM_SPEC_VALUE_ARRAY (pspec) &&
|
else if (G_IS_PARAM_SPEC_VALUE_ARRAY (pspec) &&
|
||||||
G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_RGBA)
|
G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_RGBA)
|
||||||
{
|
{
|
||||||
GValueArray *array;
|
GValueArray *array;
|
||||||
GString *string;
|
GStrvBuilder *builder_str;
|
||||||
guint n_colors, i;
|
char **color_strings;
|
||||||
|
GdkRGBA color;
|
||||||
/* We need to do this ourselves, because the gtk_color_selection_palette_to_string
|
int n_colors, i;
|
||||||
* does not carry all the bytes, and xterm's palette is messed up...
|
gchar *cadena;
|
||||||
*/
|
|
||||||
|
array = (GValueArray *) g_value_get_boxed (value);
|
||||||
array = g_value_get_boxed (value);
|
|
||||||
if (!array)
|
builder_str = g_strv_builder_new ();
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
n_colors = array->n_values;
|
n_colors = array->n_values;
|
||||||
string = g_string_sized_new (n_colors * (1 /* # */ + 3 * 4) + n_colors /* : separators and terminating \0 */);
|
|
||||||
for (i = 0; i < n_colors; ++i)
|
for (i = 0; i < n_colors; ++i)
|
||||||
{
|
{
|
||||||
GdkRGBA *color;
|
GdkRGBA *color;
|
||||||
|
|
||||||
if (i > 0)
|
|
||||||
g_string_append_c (string, ':');
|
|
||||||
|
|
||||||
color = g_value_get_boxed (g_value_array_get_nth (array, i));
|
color = g_value_get_boxed (g_value_array_get_nth (array, i));
|
||||||
if (!color)
|
if (!color) {
|
||||||
|
g_strv_builder_add (builder_str, g_strdup (""));
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
g_string_append_printf (string,
|
cadena = g_strdup_printf ("#%04X%04X%04X",
|
||||||
"#%04X%04X%04X",
|
(guint) (color->red * 65535),
|
||||||
(guint) (color->red * 65535),
|
(guint) (color->green * 65535),
|
||||||
(guint) (color->green * 65535),
|
(guint) (color->blue * 65535));
|
||||||
(guint) (color->blue * 65535));
|
|
||||||
|
g_strv_builder_add (builder_str, cadena);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_settings_set_string (changeset, key, string->str);
|
color_strings = g_strv_builder_end (builder_str);
|
||||||
g_string_free (string, TRUE);
|
g_key_file_set_string_list (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), color_strings, n_colors);
|
||||||
|
g_strfreev (color_strings);
|
||||||
|
g_strv_builder_unref (builder_str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
g_printerr ("Unhandled value type %s of pspec %s\n", g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), pspec->name);
|
g_printerr ("Unhandled value type %s of pspec %s\n", g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), pspec->name);
|
||||||
|
}
|
||||||
cleanup:
|
cleanup:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -844,18 +852,15 @@ static void
|
||||||
terminal_profile_save (TerminalProfile *profile)
|
terminal_profile_save (TerminalProfile *profile)
|
||||||
{
|
{
|
||||||
TerminalProfilePrivate *priv = profile->priv;
|
TerminalProfilePrivate *priv = profile->priv;
|
||||||
GSettings *changeset;
|
|
||||||
GSList *l;
|
GSList *l;
|
||||||
gchar *concat;
|
gchar *concat;
|
||||||
|
GError *gerror = NULL;
|
||||||
|
gboolean was_saved;
|
||||||
|
|
||||||
priv->save_idle_id = 0;
|
priv->save_idle_id = 0;
|
||||||
concat = g_strconcat (CONF_PROFILE_PREFIX, priv->profile_dir,"/", NULL);
|
|
||||||
changeset = g_settings_new_with_path (CONF_PROFILE_SCHEMA, concat);
|
|
||||||
g_free (concat);
|
|
||||||
g_settings_delay (changeset);
|
|
||||||
|
|
||||||
for (l = priv->dirty_pspecs; l != NULL; l = l->next)
|
#if 0
|
||||||
{
|
for (l = priv->dirty_pspecs; l != NULL; l = l->next) {
|
||||||
GParamSpec *pspec = (GParamSpec *) l->data;
|
GParamSpec *pspec = (GParamSpec *) l->data;
|
||||||
|
|
||||||
if (pspec->owner_type != TERMINAL_TYPE_PROFILE)
|
if (pspec->owner_type != TERMINAL_TYPE_PROFILE)
|
||||||
|
@ -864,14 +869,22 @@ terminal_profile_save (TerminalProfile *profile)
|
||||||
if ((pspec->flags & G_PARAM_WRITABLE) == 0)
|
if ((pspec->flags & G_PARAM_WRITABLE) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
terminal_profile_gsettings_changeset_add (profile, changeset, pspec);
|
terminal_profile_ini_write (profile, priv->settings, pspec);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slist_free (priv->dirty_pspecs);
|
g_slist_free (priv->dirty_pspecs);
|
||||||
priv->dirty_pspecs = NULL;
|
priv->dirty_pspecs = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_settings_apply (changeset);
|
concat = g_strconcat ("~/.gatuno-terminal/", priv->profile_dir, NULL);
|
||||||
g_object_unref (changeset);
|
|
||||||
|
was_saved = g_key_file_save_to_file (priv->settings, concat, &gerror);
|
||||||
|
|
||||||
|
if (gerror != NULL) {
|
||||||
|
g_error_free (gerror);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free (concat);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -890,9 +903,8 @@ terminal_profile_schedule_save (TerminalProfile *profile,
|
||||||
TerminalProfilePrivate *priv = profile->priv;
|
TerminalProfilePrivate *priv = profile->priv;
|
||||||
|
|
||||||
g_assert (pspec != NULL);
|
g_assert (pspec != NULL);
|
||||||
|
|
||||||
if (!g_slist_find (priv->dirty_pspecs, pspec))
|
terminal_profile_ini_write (profile, priv->settings, pspec);
|
||||||
priv->dirty_pspecs = g_slist_prepend (priv->dirty_pspecs, pspec);
|
|
||||||
|
|
||||||
if (priv->save_idle_id != 0)
|
if (priv->save_idle_id != 0)
|
||||||
return;
|
return;
|
||||||
|
@ -964,17 +976,10 @@ terminal_profile_constructor (GType type,
|
||||||
|
|
||||||
name = g_value_get_string (g_value_array_get_nth (priv->properties, PROP_NAME));
|
name = g_value_get_string (g_value_array_get_nth (priv->properties, PROP_NAME));
|
||||||
g_assert (name != NULL);
|
g_assert (name != NULL);
|
||||||
|
|
||||||
concat = g_strconcat (CONF_PROFILE_PREFIX, name, "/", NULL);
|
priv->settings = g_key_file_new ();
|
||||||
priv->settings = g_settings_new_with_path (CONF_PROFILE_SCHEMA, concat);
|
concat = g_strconcat ("~/.gatuno-terminal/", priv->profile_dir, NULL);
|
||||||
g_assert (priv->settings != NULL);
|
g_key_file_load_from_file (priv->settings, concat, G_KEY_FILE_KEEP_COMMENTS, NULL);
|
||||||
g_free (concat);
|
|
||||||
concat = g_strconcat("changed::", priv->profile_dir, "/", NULL);
|
|
||||||
g_signal_connect (priv->settings,
|
|
||||||
concat,
|
|
||||||
G_CALLBACK(terminal_profile_gsettings_notify_cb),
|
|
||||||
profile);
|
|
||||||
|
|
||||||
g_free (concat);
|
g_free (concat);
|
||||||
|
|
||||||
/* Now load those properties from GSettings that were not set as construction params */
|
/* Now load those properties from GSettings that were not set as construction params */
|
||||||
|
@ -1006,8 +1011,9 @@ terminal_profile_constructor (GType type,
|
||||||
key = g_param_spec_get_qdata (pspec, gsettings_key_quark);
|
key = g_param_spec_get_qdata (pspec, gsettings_key_quark);
|
||||||
if (!key)
|
if (!key)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
terminal_profile_gsettings_notify_cb (priv->settings, key, profile);
|
/* Tomar esta propiedad desde el archivo */
|
||||||
|
terminal_profile_ini_read (priv->settings, key, profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (pspecs);
|
g_free (pspecs);
|
||||||
|
@ -1021,10 +1027,6 @@ terminal_profile_finalize (GObject *object)
|
||||||
TerminalProfile *profile = TERMINAL_PROFILE (object);
|
TerminalProfile *profile = TERMINAL_PROFILE (object);
|
||||||
TerminalProfilePrivate *priv = profile->priv;
|
TerminalProfilePrivate *priv = profile->priv;
|
||||||
|
|
||||||
g_signal_handlers_disconnect_by_func (priv->settings,
|
|
||||||
G_CALLBACK(terminal_profile_gsettings_notify_cb),
|
|
||||||
profile);
|
|
||||||
|
|
||||||
if (priv->save_idle_id)
|
if (priv->save_idle_id)
|
||||||
{
|
{
|
||||||
g_source_remove (priv->save_idle_id);
|
g_source_remove (priv->save_idle_id);
|
||||||
|
@ -1034,9 +1036,8 @@ terminal_profile_finalize (GObject *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
_terminal_profile_forget (profile);
|
_terminal_profile_forget (profile);
|
||||||
|
|
||||||
g_object_unref (priv->settings);
|
g_key_file_free (priv->settings);
|
||||||
|
|
||||||
g_free (priv->profile_dir);
|
g_free (priv->profile_dir);
|
||||||
g_free (priv->locked);
|
g_free (priv->locked);
|
||||||
g_value_array_free (priv->properties);
|
g_value_array_free (priv->properties);
|
||||||
|
@ -1123,23 +1124,18 @@ terminal_profile_set_property (GObject *object,
|
||||||
case PROP_NAME:
|
case PROP_NAME:
|
||||||
{
|
{
|
||||||
const char *name = g_value_get_string (value);
|
const char *name = g_value_get_string (value);
|
||||||
|
/* TODO: Cuando un profile cambia de nombre, "vigilar" el nuevo archivo */
|
||||||
|
|
||||||
g_assert (name != NULL);
|
g_assert (name != NULL);
|
||||||
priv->profile_dir = g_strdup (name);
|
priv->profile_dir = g_strdup (name);
|
||||||
|
|
||||||
if (priv->settings != NULL) {
|
if (priv->settings != NULL) {
|
||||||
gchar *concat;
|
gchar *concat;
|
||||||
g_signal_handlers_disconnect_by_func (priv->settings,
|
g_key_file_free (priv->settings);
|
||||||
G_CALLBACK(terminal_profile_gsettings_notify_cb),
|
|
||||||
profile);
|
concat = g_strconcat ("~/.gatuno-terminal/", priv->profile_dir, NULL);
|
||||||
g_object_unref (priv->settings);
|
priv->settings = g_key_file_new ();
|
||||||
concat= g_strconcat (CONF_PROFILE_PREFIX, priv->profile_dir, "/", NULL);
|
g_key_file_load_from_file (priv->settings, concat, G_KEY_FILE_KEEP_COMMENTS, NULL);
|
||||||
priv->settings = g_settings_new_with_path (CONF_PROFILE_SCHEMA, concat);
|
|
||||||
g_free (concat);
|
|
||||||
concat = g_strconcat("changed::", priv->profile_dir, "/", NULL);
|
|
||||||
g_signal_connect (priv->settings,
|
|
||||||
concat,
|
|
||||||
G_CALLBACK(terminal_profile_gsettings_notify_cb),
|
|
||||||
profile);
|
|
||||||
g_free (concat);
|
g_free (concat);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1551,21 +1547,6 @@ terminal_profile_get_property_string (TerminalProfile *profile,
|
||||||
return g_value_get_string (value);
|
return g_value_get_string (value);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
terminal_profile_property_locked (TerminalProfile *profile,
|
|
||||||
const char *prop_name)
|
|
||||||
{
|
|
||||||
TerminalProfilePrivate *priv = profile->priv;
|
|
||||||
GParamSpec *pspec;
|
|
||||||
|
|
||||||
pspec = get_pspec_from_name (profile, prop_name);
|
|
||||||
g_return_val_if_fail (pspec != NULL, FALSE);
|
|
||||||
if (!pspec)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return priv->locked[pspec->param_id];
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
terminal_profile_reset_property (TerminalProfile *profile,
|
terminal_profile_reset_property (TerminalProfile *profile,
|
||||||
const char *prop_name)
|
const char *prop_name)
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
=pod
|
=pod
|
||||||
|
|
||||||
update-authors.pl is part of MATE Terminal.
|
update-authors.pl is part of Gatuno Terminal.
|
||||||
|
|
||||||
MATE Terminal is free software: you can redistribute it and/or modify
|
Gatuno Terminal is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
MATE Terminal is distributed in the hope that it will be useful,
|
Gatuno Terminal is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with MATE Terminal. If not, see <http://www.gnu.org/licenses/>.
|
along with Gatuno Terminal. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
use strict;
|
use strict;
|
||||||
|
|
Loading…
Reference in New Issue