Inicio renombrado de archivos.

* Elimino los gsettings de los perfiles.
master-1.22
Félix Arreola Rodríguez 2021-07-17 01:06:31 -05:00
parent ab56ecda0f
commit ca9ac7fd9e
15 changed files with 186 additions and 395 deletions

View File

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

View File

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

View File

@ -11,7 +11,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
@INTLTOOL_XML_RULE@
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)
desktopdir = $(datadir)/applications
@ -19,21 +19,21 @@ desktop_in_files = @PACKAGE@.desktop.in.in
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
@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 = \
autogen.sh \
xmldocs.make \
omf.make \
mate-terminal.wrapper \
gatuno-terminal.wrapper \
$(appdata_in_files) \
$(man_MANS) \
$(NULL)
# autogen.sh \
CLEANFILES = \
mate-terminal.appdata.xml \
gatuno-terminal.appdata.xml \
$(desktop_DATA) \
$(NULL)

3
README
View File

@ -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
in the middle") comes from the VTE widget. Remember this when you
report a bug. ;-)
Gatuno Terminal is a fork of Mate terminal.
MATE terminal is a fork of GNOME terminal.
How it works

View File

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

View File

@ -6,7 +6,7 @@ m4_define([gt_version],[gt_version_major().gt_version_minor().gt_version_micro()
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_HEADERS([config.h])
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])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
GETTEXT_PACKAGE=mate-terminal
GETTEXT_PACKAGE=gatuno-terminal
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
@ -31,18 +31,12 @@ AC_HEADER_STDC
AM_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.50.1])
MATE_COMMON_INIT
MATE_DEBUG_CHECK
MATE_COMPILE_WARNINGS([maximum])
#MATE_MAINTAINER_MODE_DEFINES
AM_GLIB_GNU_GETTEXT
GLIB_REQUIRED=2.50.0
GIO_REQUIRED=2.50.0
GTK_REQUIRED=3.22.0
VTE_REQUIRED=0.48
DCONF_REQUIRED=0.13.4
PKG_CHECK_MODULES([TERM],
[vte-2.91 >= $VTE_REQUIRED
@ -50,22 +44,8 @@ PKG_CHECK_MODULES([TERM],
gthread-2.0
gio-2.0 >= $GIO_REQUIRED
gtk+-3.0 >= $GTK_REQUIRED
dconf >= $DCONF_REQUIRED
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)"
AC_SUBST([GLIB_GENMARSHAL])
@ -123,9 +103,8 @@ AC_SUBST([TERMINAL_API_VERSION],[gt_api_version])
AC_CONFIG_FILES([
Makefile
mate-terminal.desktop.in
gatuno-terminal.desktop.in
src/Makefile
src/org.mate.terminal.gschema.xml
src/terminal-version.h
src/skey/Makefile
help/Makefile
@ -136,7 +115,7 @@ AC_OUTPUT
# ****************************
echo "
mate-terminal-$VERSION:
gatuno-terminal-$VERSION:
prefix: ${prefix}
source code location: ${srcdir}

View File

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

View File

@ -78,4 +78,4 @@ if ($login == 1)
{
@args = ('--login', @args);
}
exec('mate-terminal',@args);
exec('gatuno-terminal',@args);

View File

@ -1,6 +1,6 @@
#! /bin/sh
PACKAGE=mate-terminal;
PACKAGE=gatuno-terminal;
# normal translations for the package
make -C po $PACKAGE.pot && mv po/$PACKAGE.pot .

View File

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

View File

@ -165,15 +165,16 @@ enum
#define DEFAULT_VISIBLE_NAME (N_("Unnamed"))
#define DEFAULT_WORD_CHARS ("-A-Za-z0-9,./?%&#:_=+@~")
#define PROFILE_GROUP_NAME "profile"
struct _TerminalProfilePrivate
{
GValueArray *properties;
gboolean *locked;
GSettings *settings;
GKeyFile *settings;
char *profile_dir;
GSList *dirty_pspecs;
guint save_idle_id;
GParamSpec *gsettings_notification_pspec;
@ -547,14 +548,14 @@ terminal_profile_reset_property_internal (TerminalProfile *profile,
}
static void
terminal_profile_gsettings_notify_cb (GSettings *settings,
terminal_profile_ini_read (GKeyFile *settings,
gchar *key,
gpointer user_data)
{
TerminalProfile *profile = TERMINAL_PROFILE (user_data);
TerminalProfilePrivate *priv = profile->priv;
TerminalProfileClass *klass;
GVariant *settings_value;
GError *gerror = NULL;
GParamSpec *pspec;
GValue value = { 0, };
gboolean equal;
@ -562,80 +563,105 @@ terminal_profile_gsettings_notify_cb (GSettings *settings,
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);
pspec = g_hash_table_lookup (klass->gsettings_keys, key);
if (!pspec)
return; /* ignore unknown keys, for future extensibility */
priv->locked[pspec->param_id] = !g_settings_is_writable (settings, key);
settings_value = g_settings_get_value (settings, key);
if (!settings_value)
return;
priv->locked[pspec->param_id] = FALSE;
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (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;
}
g_value_set_boolean (&value, g_variant_get_boolean (settings_value));
}
else if (G_IS_PARAM_SPEC_STRING (pspec))
{
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
goto out;
gchar *cadena;
cadena = g_key_file_get_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), NULL);
g_value_set_string (&value, g_variant_get_string (settings_value, NULL));
if (cadena == NULL) {
goto out;
}
g_value_set_string (&value, cadena);
g_free (cadena);
}
else if (G_IS_PARAM_SPEC_ENUM (pspec))
{
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
gint entero;
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;
}
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)
{
GdkRGBA color;
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
goto out;
gchar *cadena;
cadena = g_key_file_get_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), NULL);
if (!gdk_rgba_parse (&color, g_variant_get_string (settings_value, NULL)))
if (cadena == NULL) {
goto out;
}
if (!gdk_rgba_parse (&color, cadena)) {
g_free (cadena);
goto out;
}
g_free (cadena);
g_value_set_boxed (&value, &color);
}
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == PANGO_TYPE_FONT_DESCRIPTION)
{
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
goto out;
gchar *cadena;
cadena = g_key_file_get_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), NULL);
g_value_take_boxed (&value, pango_font_description_from_string (g_variant_get_string (settings_value, NULL)));
if (cadena == NULL) {
goto out;
}
g_value_take_boxed (&value, pango_font_description_from_string (cadena));
g_free (cadena);
}
else if (G_IS_PARAM_SPEC_DOUBLE (pspec))
{
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_DOUBLE))
goto out;
gdouble doble;
doble = g_key_file_get_double (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), &gerror);
g_value_set_double (&value, g_variant_get_double (settings_value));
if (gerror != NULL) {
g_error_free (gerror);
goto out;
}
g_value_set_double (&value, doble);
}
else if (G_IS_PARAM_SPEC_INT (pspec))
{
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_INT16) &&
!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_INT32) &&
!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_INT64))
goto out;
gint entero;
entero = g_key_file_get_integer (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), &gerror);
g_value_set_int (&value, g_settings_get_int(settings, key));
if (gerror != NULL) {
/* No es un entero, mal */
g_error_free (gerror);
goto out;
}
g_value_set_int (&value, entero);
}
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)
@ -644,12 +670,10 @@ terminal_profile_gsettings_notify_cb (GSettings *settings,
GdkRGBA *colors;
int n_colors, i;
if (!g_variant_is_of_type (settings_value, G_VARIANT_TYPE_STRING))
goto out;
color_strings = g_strsplit (g_variant_get_string (settings_value, NULL), ":", -1);
if (!color_strings)
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;
}
n_colors = g_strv_length (color_strings);
colors = g_new0 (GdkRGBA, n_colors);
@ -713,53 +737,33 @@ out:
*/
g_value_unset (&value);
g_variant_unref (settings_value);
}
static void
terminal_profile_gsettings_changeset_add (TerminalProfile *profile,
GSettings *changeset,
GParamSpec *pspec)
{
terminal_profile_ini_write (TerminalProfile *profile, GKeyFile *settings, GParamSpec *pspec) {
TerminalProfilePrivate *priv = profile->priv;
char *key;
const GValue *value;
TerminalProfileClass *klass;
GValue *value;
/* FIXME: do this? */
#if 0
if (priv->locked[pspec->param_id])
return;
if (settings == NULL) 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;
klass = TERMINAL_PROFILE_GET_CLASS (profile);
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))
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))
{
const char *str;
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))
{
const GEnumValue *eval;
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);
g_key_file_set_integer (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), g_value_get_enum (value));
}
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA)
{
@ -770,13 +774,12 @@ terminal_profile_gsettings_changeset_add (TerminalProfile *profile,
if (!color)
goto cleanup;
g_snprintf (str, sizeof (str),
"#%04X%04X%04X",
(guint) (color->red * 65535),
(guint) (color->green * 65535),
(guint) (color->blue * 65535));
g_settings_set_string (changeset, key, str);
cadena = g_snprintf (str, sizeof (str),
"#%04X%04X%04X",
(guint) (color->red * 65535),
(guint) (color->green * 65535),
(guint) (color->blue * 65535));
g_key_file_set_string (settings, PROFILE_GROUP_NAME, g_param_spec_get_name (pspec), str);
}
else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == PANGO_TYPE_FONT_DESCRIPTION)
{
@ -788,54 +791,59 @@ terminal_profile_gsettings_changeset_add (TerminalProfile *profile,
goto cleanup;
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);
}
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))
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) &&
G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_RGBA)
{
GValueArray *array;
GString *string;
guint n_colors, i;
GStrvBuilder *builder_str;
char **color_strings;
GdkRGBA color;
int n_colors, i;
gchar *cadena;
/* We need to do this ourselves, because the gtk_color_selection_palette_to_string
* does not carry all the bytes, and xterm's palette is messed up...
*/
array = (GValueArray *) g_value_get_boxed (value);
array = g_value_get_boxed (value);
if (!array)
goto cleanup;
builder_str = g_strv_builder_new ();
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)
{
GdkRGBA *color;
if (i > 0)
g_string_append_c (string, ':');
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;
}
g_string_append_printf (string,
"#%04X%04X%04X",
(guint) (color->red * 65535),
(guint) (color->green * 65535),
(guint) (color->blue * 65535));
cadena = g_strdup_printf ("#%04X%04X%04X",
(guint) (color->red * 65535),
(guint) (color->green * 65535),
(guint) (color->blue * 65535));
g_strv_builder_add (builder_str, cadena);
}
g_settings_set_string (changeset, key, string->str);
g_string_free (string, TRUE);
color_strings = g_strv_builder_end (builder_str);
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
{
g_printerr ("Unhandled value type %s of pspec %s\n", g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), pspec->name);
}
cleanup:
return;
}
@ -844,18 +852,15 @@ static void
terminal_profile_save (TerminalProfile *profile)
{
TerminalProfilePrivate *priv = profile->priv;
GSettings *changeset;
GSList *l;
gchar *concat;
GError *gerror = NULL;
gboolean was_saved;
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;
if (pspec->owner_type != TERMINAL_TYPE_PROFILE)
@ -864,14 +869,22 @@ terminal_profile_save (TerminalProfile *profile)
if ((pspec->flags & G_PARAM_WRITABLE) == 0)
continue;
terminal_profile_gsettings_changeset_add (profile, changeset, pspec);
terminal_profile_ini_write (profile, priv->settings, pspec);
}
g_slist_free (priv->dirty_pspecs);
priv->dirty_pspecs = NULL;
#endif
g_settings_apply (changeset);
g_object_unref (changeset);
concat = g_strconcat ("~/.gatuno-terminal/", priv->profile_dir, NULL);
was_saved = g_key_file_save_to_file (priv->settings, concat, &gerror);
if (gerror != NULL) {
g_error_free (gerror);
}
g_free (concat);
}
static gboolean
@ -891,8 +904,7 @@ terminal_profile_schedule_save (TerminalProfile *profile,
g_assert (pspec != NULL);
if (!g_slist_find (priv->dirty_pspecs, pspec))
priv->dirty_pspecs = g_slist_prepend (priv->dirty_pspecs, pspec);
terminal_profile_ini_write (profile, priv->settings, pspec);
if (priv->save_idle_id != 0)
return;
@ -965,16 +977,9 @@ terminal_profile_constructor (GType type,
name = g_value_get_string (g_value_array_get_nth (priv->properties, PROP_NAME));
g_assert (name != NULL);
concat = g_strconcat (CONF_PROFILE_PREFIX, name, "/", NULL);
priv->settings = g_settings_new_with_path (CONF_PROFILE_SCHEMA, concat);
g_assert (priv->settings != 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);
priv->settings = g_key_file_new ();
concat = g_strconcat ("~/.gatuno-terminal/", priv->profile_dir, NULL);
g_key_file_load_from_file (priv->settings, concat, G_KEY_FILE_KEEP_COMMENTS, NULL);
g_free (concat);
/* Now load those properties from GSettings that were not set as construction params */
@ -1007,7 +1012,8 @@ terminal_profile_constructor (GType type,
if (!key)
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);
@ -1021,10 +1027,6 @@ terminal_profile_finalize (GObject *object)
TerminalProfile *profile = TERMINAL_PROFILE (object);
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)
{
g_source_remove (priv->save_idle_id);
@ -1035,8 +1037,7 @@ terminal_profile_finalize (GObject *object)
_terminal_profile_forget (profile);
g_object_unref (priv->settings);
g_key_file_free (priv->settings);
g_free (priv->profile_dir);
g_free (priv->locked);
g_value_array_free (priv->properties);
@ -1123,23 +1124,18 @@ terminal_profile_set_property (GObject *object,
case PROP_NAME:
{
const char *name = g_value_get_string (value);
/* TODO: Cuando un profile cambia de nombre, "vigilar" el nuevo archivo */
g_assert (name != NULL);
priv->profile_dir = g_strdup (name);
if (priv->settings != NULL) {
gchar *concat;
g_signal_handlers_disconnect_by_func (priv->settings,
G_CALLBACK(terminal_profile_gsettings_notify_cb),
profile);
g_object_unref (priv->settings);
concat= g_strconcat (CONF_PROFILE_PREFIX, priv->profile_dir, "/", 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_key_file_free (priv->settings);
concat = g_strconcat ("~/.gatuno-terminal/", priv->profile_dir, NULL);
priv->settings = g_key_file_new ();
g_key_file_load_from_file (priv->settings, concat, G_KEY_FILE_KEEP_COMMENTS, NULL);
g_free (concat);
}
break;
@ -1551,21 +1547,6 @@ terminal_profile_get_property_string (TerminalProfile *profile,
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
terminal_profile_reset_property (TerminalProfile *profile,
const char *prop_name)

View File

@ -1,20 +1,20 @@
#!/usr/bin/perl
=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
the Free Software Foundation, either version 2 of the License, or
(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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MATE Terminal. If not, see <http://www.gnu.org/licenses/>.
along with Gatuno Terminal. If not, see <http://www.gnu.org/licenses/>.
=cut
use strict;