using ./config/ instead of ./mate2/
This commit is contained in:
@@ -18,13 +18,13 @@ INCLUDES = \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS) \
|
||||
-DDATADIR=\""$(datadir)"\" \
|
||||
-DLIBDIR=\""$(libdir)"\"
|
||||
-DLIBDIR=\""$(libdir)"\"
|
||||
|
||||
pluma_SOURCES = \
|
||||
pluma.c
|
||||
|
||||
pluma_LDADD = libpluma.la $(PLUMA_LIBS) $(IGE_MAC_LIBS) $(EGG_SMCLIENT_LIBS)
|
||||
|
||||
|
||||
if PLATFORM_WIN32
|
||||
pluma_LDFLAGS = -Wl,--export-all-symbols -Wl,--out-implib,libpluma-$(PLUMA_API_VERSION).a
|
||||
if OS_WIN32
|
||||
@@ -189,7 +189,7 @@ libpluma_la_SOURCES = \
|
||||
$(INST_H_FILES)
|
||||
|
||||
if !ENABLE_GVFS_METADATA
|
||||
libpluma_la_SOURCES += pluma-metadata-manager.c
|
||||
libpluma_la_SOURCES += pluma-metadata-manager.c
|
||||
endif
|
||||
|
||||
pluma-enum-types.h: pluma-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
|
||||
@@ -205,7 +205,7 @@ pluma-marshal.c: pluma-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) echo "#include \"pluma-marshal.h\"" > $@ && \
|
||||
$(GLIB_GENMARSHAL) $< --body --prefix=pluma_marshal >> $@
|
||||
|
||||
uidir = $(datadir)/pluma-2/ui/
|
||||
uidir = $(datadir)/pluma/ui/
|
||||
ui_DATA = \
|
||||
pluma-ui.xml \
|
||||
pluma-print-preferences.ui
|
||||
|
@@ -1,4 +1,4 @@
|
||||
uidir = $(datadir)/pluma-2/ui/
|
||||
uidir = $(datadir)/pluma/ui/
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
@@ -26,6 +26,6 @@ ui_DATA = \
|
||||
pluma-preferences-dialog.ui \
|
||||
pluma-search-dialog.ui
|
||||
|
||||
EXTRA_DIST = $(ui_DATA)
|
||||
EXTRA_DIST = $(ui_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
|
||||
* Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi
|
||||
* Copyright (C) 2002-2005 Paolo Maggi
|
||||
* Copyright (C) 2011 Perberos
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -23,7 +24,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the pluma Team, 1998-2005. See the AUTHORS file for a
|
||||
* Modified by the gedit Team, 1998-2005. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
*
|
||||
@@ -31,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
@@ -42,20 +43,16 @@
|
||||
#include "pluma-help.h"
|
||||
#include "pluma-dirs.h"
|
||||
|
||||
void
|
||||
_pluma_cmd_help_contents (GtkAction *action,
|
||||
PlumaWindow *window)
|
||||
void _pluma_cmd_help_contents(GtkAction* action, PlumaWindow* window)
|
||||
{
|
||||
pluma_debug (DEBUG_COMMANDS);
|
||||
pluma_debug(DEBUG_COMMANDS);
|
||||
|
||||
pluma_help_display (GTK_WINDOW (window), NULL, NULL);
|
||||
pluma_help_display(GTK_WINDOW(window), NULL, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
_pluma_cmd_help_about (GtkAction *action,
|
||||
PlumaWindow *window)
|
||||
void _pluma_cmd_help_about(GtkAction* action, PlumaWindow* window)
|
||||
{
|
||||
static const gchar * const authors[] = {
|
||||
static const gchar* const authors[] = {
|
||||
"Paolo Maggi <paolo@gnome.org>",
|
||||
"Paolo Borelli <pborelli@katamail.com>",
|
||||
"Steve Fr\303\251cinaux <steve@istique.net>",
|
||||
@@ -64,11 +61,12 @@ _pluma_cmd_help_about (GtkAction *action,
|
||||
"James Willcox <jwillcox@gnome.org>",
|
||||
"Chema Celorio",
|
||||
"Federico Mena Quintero <federico@novell.com>",
|
||||
"Perberos <perberos@gmail.com>",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const gchar * const documenters[] = {
|
||||
"Sun MATE Documentation Team <gdocteam@sun.com>",
|
||||
static const gchar* const documenters[] = {
|
||||
"Sun GNOME Documentation Team <gdocteam@sun.com>",
|
||||
"Eric Baudais <baudais@okstate.edu>",
|
||||
NULL
|
||||
};
|
||||
@@ -81,23 +79,17 @@ _pluma_cmd_help_about (GtkAction *action,
|
||||
"Copyright \xc2\xa9 2011 Perberos";
|
||||
|
||||
static const gchar comments[] = \
|
||||
N_("pluma is a small and lightweight text editor for the "
|
||||
"MATE Desktop");
|
||||
|
||||
GdkPixbuf *logo;
|
||||
gchar *data_dir;
|
||||
gchar *logo_file;
|
||||
N_("pluma is a small and lightweight text editor for the MATE Desktop");
|
||||
|
||||
pluma_debug (DEBUG_COMMANDS);
|
||||
|
||||
data_dir = pluma_dirs_get_pluma_data_dir ();
|
||||
logo_file = g_build_filename (data_dir,
|
||||
"logo",
|
||||
"pluma.png",
|
||||
NULL);
|
||||
g_free (data_dir);
|
||||
logo = gdk_pixbuf_new_from_file (logo_file, NULL);
|
||||
g_free (logo_file);
|
||||
GdkPixbuf* logo = NULL;
|
||||
GtkIconTheme* icon_theme = gtk_icon_theme_get_default();
|
||||
|
||||
if (gtk_icon_theme_has_icon(icon_theme, "accessories-text-editor"))
|
||||
{
|
||||
logo = gtk_icon_theme_load_icon(icon_theme, "accessories-text-editor", 64, 0, NULL);
|
||||
}
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"program-name", "Pluma",
|
||||
@@ -112,5 +104,7 @@ _pluma_cmd_help_about (GtkAction *action,
|
||||
NULL);
|
||||
|
||||
if (logo)
|
||||
g_object_unref (logo);
|
||||
{
|
||||
g_object_unref(logo);
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
* This file is part of pluma
|
||||
*
|
||||
* Copyright (C) 2008 Ignacio Casal Quinteiro
|
||||
* Copyright (C) 2011 Perberos
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -16,305 +17,251 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "pluma-dirs.h"
|
||||
|
||||
#ifdef OS_OSX
|
||||
#include <ige-mac-bundle.h>
|
||||
#include <ige-mac-bundle.h>
|
||||
#endif
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_user_config_dir (void)
|
||||
gchar* pluma_dirs_get_user_config_dir(void)
|
||||
{
|
||||
gchar *config_dir = NULL;
|
||||
gchar* config_dir = NULL;
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
const gchar *envvar;
|
||||
const gchar *home;
|
||||
#ifndef G_OS_WIN32
|
||||
const gchar* envvar;
|
||||
const gchar* home;
|
||||
|
||||
/* Support old libmate env var */
|
||||
envvar = g_getenv ("MATE22_USER_DIR");
|
||||
if (envvar != NULL)
|
||||
{
|
||||
config_dir = g_build_filename (envvar,
|
||||
"pluma",
|
||||
NULL);
|
||||
/* Support old libmate env var */
|
||||
envvar = g_getenv("MATE22_USER_DIR");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
home = g_get_home_dir ();
|
||||
|
||||
if (home != NULL)
|
||||
if (envvar != NULL)
|
||||
{
|
||||
config_dir = g_build_filename (home,
|
||||
".mate2",
|
||||
"pluma",
|
||||
NULL);
|
||||
config_dir = g_build_filename(envvar, "pluma", NULL);
|
||||
}
|
||||
}
|
||||
#else
|
||||
config_dir = g_build_filename (g_get_user_config_dir (),
|
||||
"pluma",
|
||||
NULL);
|
||||
#endif
|
||||
else
|
||||
{
|
||||
home = g_get_home_dir();
|
||||
|
||||
if (home != NULL)
|
||||
{
|
||||
config_dir = g_build_filename(home, ".config", "pluma", NULL);
|
||||
}
|
||||
}
|
||||
#else
|
||||
config_dir = g_build_filename(g_get_user_config_dir(), "pluma", NULL);
|
||||
#endif
|
||||
|
||||
return config_dir;
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_user_cache_dir (void)
|
||||
gchar* pluma_dirs_get_user_cache_dir(void)
|
||||
{
|
||||
const gchar *cache_dir;
|
||||
const gchar* cache_dir;
|
||||
|
||||
cache_dir = g_get_user_cache_dir ();
|
||||
cache_dir = g_get_user_cache_dir();
|
||||
|
||||
return g_build_filename (cache_dir,
|
||||
"pluma",
|
||||
NULL);
|
||||
return g_build_filename(cache_dir, "pluma", NULL);
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_user_plugins_dir (void)
|
||||
gchar* pluma_dirs_get_user_plugins_dir(void)
|
||||
{
|
||||
gchar *config_dir;
|
||||
gchar *plugin_dir;
|
||||
gchar* config_dir;
|
||||
gchar* plugin_dir;
|
||||
|
||||
config_dir = pluma_dirs_get_user_config_dir ();
|
||||
config_dir = pluma_dirs_get_user_config_dir();
|
||||
|
||||
plugin_dir = g_build_filename(config_dir, "plugins", NULL);
|
||||
g_free(config_dir);
|
||||
|
||||
plugin_dir = g_build_filename (config_dir,
|
||||
"plugins",
|
||||
NULL);
|
||||
g_free (config_dir);
|
||||
|
||||
return plugin_dir;
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_user_accels_file (void)
|
||||
gchar* pluma_dirs_get_user_accels_file(void)
|
||||
{
|
||||
gchar *accels = NULL;
|
||||
gchar* accels = NULL;
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
const gchar *envvar;
|
||||
const gchar *home;
|
||||
#ifndef G_OS_WIN32
|
||||
const gchar* envvar;
|
||||
const gchar* home;
|
||||
|
||||
/* on linux accels are stored in .mate2/accels
|
||||
* for historic reasons (backward compat with the
|
||||
* old libmate that took care of saving them */
|
||||
/* on linux accels are stored in .config/accels
|
||||
* for historic reasons (backward compat with the
|
||||
* old libmate that took care of saving them */
|
||||
|
||||
/* Support old libmate env var */
|
||||
envvar = g_getenv ("MATE22_USER_DIR");
|
||||
if (envvar != NULL)
|
||||
{
|
||||
accels = g_build_filename (envvar,
|
||||
"accels",
|
||||
"pluma",
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
home = g_get_home_dir ();
|
||||
/* Support old libmate env var */
|
||||
envvar = g_getenv("MATE22_USER_DIR");
|
||||
|
||||
if (home != NULL)
|
||||
if (envvar != NULL)
|
||||
{
|
||||
accels = g_build_filename (home,
|
||||
".mate2",
|
||||
"accels",
|
||||
"pluma",
|
||||
NULL);
|
||||
accels = g_build_filename(envvar, "accels", "pluma", NULL);
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
else
|
||||
{
|
||||
home = g_get_home_dir();
|
||||
|
||||
if (home != NULL)
|
||||
{
|
||||
accels = g_build_filename(home, ".config", "accels", "pluma", NULL);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
gchar *config_dir = NULL;
|
||||
|
||||
config_dir = pluma_dirs_get_user_config_dir ();
|
||||
accels = g_build_filename (config_dir,
|
||||
"accels",
|
||||
"pluma",
|
||||
NULL);
|
||||
config_dir = pluma_dirs_get_user_config_dir();
|
||||
accels = g_build_filename(config_dir, "accels", "pluma", NULL);
|
||||
|
||||
g_free (config_dir);
|
||||
}
|
||||
#endif
|
||||
g_free(config_dir);
|
||||
|
||||
#endif
|
||||
|
||||
return accels;
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_pluma_data_dir (void)
|
||||
gchar* pluma_dirs_get_pluma_data_dir(void)
|
||||
{
|
||||
gchar *data_dir;
|
||||
gchar* data_dir;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *win32_dir;
|
||||
|
||||
win32_dir = g_win32_get_package_installation_directory_of_module (NULL);
|
||||
#ifdef G_OS_WIN32
|
||||
gchar* win32_dir;
|
||||
|
||||
data_dir = g_build_filename (win32_dir,
|
||||
"share",
|
||||
"pluma-2",
|
||||
NULL);
|
||||
|
||||
g_free (win32_dir);
|
||||
#elif defined (OS_OSX)
|
||||
IgeMacBundle *bundle = ige_mac_bundle_get_default ();
|
||||
win32_dir = g_win32_get_package_installation_directory_of_module(NULL);
|
||||
|
||||
if (ige_mac_bundle_get_is_app_bundle (bundle))
|
||||
{
|
||||
const gchar *bundle_data_dir = ige_mac_bundle_get_datadir (bundle);
|
||||
data_dir = g_build_filename(win32_dir, "share", "pluma", NULL);
|
||||
|
||||
data_dir = g_build_filename (bundle_data_dir,
|
||||
"pluma-2",
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
data_dir = g_build_filename (DATADIR, "pluma-2", NULL);
|
||||
}
|
||||
#else
|
||||
data_dir = g_build_filename (DATADIR,
|
||||
"pluma-2",
|
||||
NULL);
|
||||
#endif
|
||||
g_free(win32_dir);
|
||||
|
||||
#elif defined(OS_OSX)
|
||||
|
||||
IgeMacBundle* bundle = ige_mac_bundle_get_default();
|
||||
|
||||
if (ige_mac_bundle_get_is_app_bundle(bundle))
|
||||
{
|
||||
const gchar* bundle_data_dir = ige_mac_bundle_get_datadir(bundle);
|
||||
|
||||
data_dir = g_build_filename(bundle_data_dir, "pluma", NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
data_dir = g_build_filename(DATADIR, "pluma", NULL);
|
||||
}
|
||||
#else
|
||||
data_dir = g_build_filename(DATADIR, "pluma", NULL);
|
||||
#endif
|
||||
|
||||
return data_dir;
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_pluma_locale_dir (void)
|
||||
gchar* pluma_dirs_get_pluma_locale_dir(void)
|
||||
{
|
||||
gchar *locale_dir;
|
||||
gchar* locale_dir;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *win32_dir;
|
||||
|
||||
win32_dir = g_win32_get_package_installation_directory_of_module (NULL);
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
locale_dir = g_build_filename (win32_dir,
|
||||
"share",
|
||||
"locale",
|
||||
NULL);
|
||||
|
||||
g_free (win32_dir);
|
||||
#elif defined (OS_OSX)
|
||||
IgeMacBundle *bundle = ige_mac_bundle_get_default ();
|
||||
gchar* win32_dir;
|
||||
|
||||
if (ige_mac_bundle_get_is_app_bundle (bundle))
|
||||
{
|
||||
locale_dir = g_strdup (ige_mac_bundle_get_localedir (bundle));
|
||||
}
|
||||
else
|
||||
{
|
||||
locale_dir = g_build_filename (DATADIR,
|
||||
"locale",
|
||||
NULL);
|
||||
}
|
||||
#else
|
||||
locale_dir = g_build_filename (DATADIR,
|
||||
"locale",
|
||||
NULL);
|
||||
#endif
|
||||
win32_dir = g_win32_get_package_installation_directory_of_module(NULL);
|
||||
|
||||
locale_dir = g_build_filename(win32_dir, "share", "locale", NULL);
|
||||
|
||||
g_free(win32_dir);
|
||||
|
||||
#elif defined(OS_OSX)
|
||||
|
||||
IgeMacBundle *bundle = ige_mac_bundle_get_default();
|
||||
|
||||
if (ige_mac_bundle_get_is_app_bundle(bundle))
|
||||
{
|
||||
locale_dir = g_strdup(ige_mac_bundle_get_localedir(bundle));
|
||||
}
|
||||
else
|
||||
{
|
||||
locale_dir = g_build_filename(DATADIR, "locale", NULL);
|
||||
}
|
||||
#else
|
||||
locale_dir = g_build_filename(DATADIR, "locale", NULL);
|
||||
#endif
|
||||
|
||||
return locale_dir;
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_pluma_lib_dir (void)
|
||||
gchar* pluma_dirs_get_pluma_lib_dir(void)
|
||||
{
|
||||
gchar *lib_dir;
|
||||
gchar* lib_dir;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *win32_dir;
|
||||
|
||||
win32_dir = g_win32_get_package_installation_directory_of_module (NULL);
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
lib_dir = g_build_filename (win32_dir,
|
||||
"lib",
|
||||
"pluma-2",
|
||||
NULL);
|
||||
|
||||
g_free (win32_dir);
|
||||
#elif defined (OS_OSX)
|
||||
IgeMacBundle *bundle = ige_mac_bundle_get_default ();
|
||||
gchar* win32_dir;
|
||||
|
||||
if (ige_mac_bundle_get_is_app_bundle (bundle))
|
||||
{
|
||||
const gchar *path = ige_mac_bundle_get_resourcesdir (bundle);
|
||||
lib_dir = g_build_filename (path,
|
||||
"lib",
|
||||
"pluma-2",
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
lib_dir = g_build_filename (LIBDIR,
|
||||
"pluma-2",
|
||||
NULL);
|
||||
}
|
||||
#else
|
||||
lib_dir = g_build_filename (LIBDIR,
|
||||
"pluma-2",
|
||||
NULL);
|
||||
#endif
|
||||
win32_dir = g_win32_get_package_installation_directory_of_module(NULL);
|
||||
|
||||
lib_dir = g_build_filename(win32_dir, "lib", "pluma", NULL);
|
||||
|
||||
g_free(win32_dir);
|
||||
|
||||
#elif defined(OS_OSX)
|
||||
IgeMacBundle* bundle = ige_mac_bundle_get_default();
|
||||
|
||||
if (ige_mac_bundle_get_is_app_bundle(bundle))
|
||||
{
|
||||
const gchar* path = ige_mac_bundle_get_resourcesdir(bundle);
|
||||
lib_dir = g_build_filename(path, "lib", "pluma", NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
lib_dir = g_build_filename(LIBDIR, "pluma", NULL);
|
||||
}
|
||||
#else
|
||||
lib_dir = g_build_filename(LIBDIR, "pluma", NULL);
|
||||
#endif
|
||||
|
||||
return lib_dir;
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_pluma_plugins_dir (void)
|
||||
gchar* pluma_dirs_get_pluma_plugins_dir(void)
|
||||
{
|
||||
gchar *lib_dir;
|
||||
gchar *plugin_dir;
|
||||
|
||||
lib_dir = pluma_dirs_get_pluma_lib_dir ();
|
||||
|
||||
plugin_dir = g_build_filename (lib_dir,
|
||||
"plugins",
|
||||
NULL);
|
||||
g_free (lib_dir);
|
||||
|
||||
gchar* lib_dir;
|
||||
gchar* plugin_dir;
|
||||
|
||||
lib_dir = pluma_dirs_get_pluma_lib_dir();
|
||||
|
||||
plugin_dir = g_build_filename(lib_dir, "plugins", NULL);
|
||||
g_free(lib_dir);
|
||||
|
||||
return plugin_dir;
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_pluma_plugin_loaders_dir (void)
|
||||
gchar* pluma_dirs_get_pluma_plugin_loaders_dir(void)
|
||||
{
|
||||
gchar *lib_dir;
|
||||
gchar *loader_dir;
|
||||
|
||||
lib_dir = pluma_dirs_get_pluma_lib_dir ();
|
||||
|
||||
loader_dir = g_build_filename (lib_dir,
|
||||
"plugin-loaders",
|
||||
NULL);
|
||||
g_free (lib_dir);
|
||||
|
||||
gchar* lib_dir;
|
||||
gchar* loader_dir;
|
||||
|
||||
lib_dir = pluma_dirs_get_pluma_lib_dir();
|
||||
|
||||
loader_dir = g_build_filename(lib_dir, "plugin-loaders", NULL);
|
||||
g_free(lib_dir);
|
||||
|
||||
return loader_dir;
|
||||
}
|
||||
|
||||
gchar *
|
||||
pluma_dirs_get_ui_file (const gchar *file)
|
||||
gchar* pluma_dirs_get_ui_file(const gchar* file)
|
||||
{
|
||||
gchar *datadir;
|
||||
gchar *ui_file;
|
||||
gchar* datadir;
|
||||
gchar* ui_file;
|
||||
|
||||
g_return_val_if_fail(file != NULL, NULL);
|
||||
|
||||
datadir = pluma_dirs_get_pluma_data_dir();
|
||||
ui_file = g_build_filename(datadir, "ui", file, NULL);
|
||||
g_free(datadir);
|
||||
|
||||
g_return_val_if_fail (file != NULL, NULL);
|
||||
|
||||
datadir = pluma_dirs_get_pluma_data_dir ();
|
||||
ui_file = g_build_filename (datadir,
|
||||
"ui",
|
||||
file,
|
||||
NULL);
|
||||
g_free (datadir);
|
||||
|
||||
return ui_file;
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* pluma-plugin.h
|
||||
* This file is part of pluma
|
||||
*
|
||||
* Copyright (C) 2002-2005 Paolo Maggi
|
||||
* Copyright (C) 2002-2005 Paolo Maggi
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -16,14 +16,14 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Modified by the pluma Team, 2002-2005. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
* Modified by the pluma Team, 2002-2005. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
@@ -125,7 +125,7 @@ pluma_plugin_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (pluma_plugin_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_plugin_class_init (PlumaPluginClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
@@ -133,7 +133,7 @@ pluma_plugin_class_init (PlumaPluginClass *klass)
|
||||
klass->activate = dummy;
|
||||
klass->deactivate = dummy;
|
||||
klass->update_ui = dummy;
|
||||
|
||||
|
||||
klass->create_configure_dialog = create_configure_dialog;
|
||||
klass->is_configurable = is_configurable;
|
||||
|
||||
@@ -217,7 +217,7 @@ pluma_plugin_get_data_dir (PlumaPlugin *plugin)
|
||||
/* If it's a "user" plugin the data dir is
|
||||
* install_dir/data_dir_name if instead it's a
|
||||
* "system" plugin the data dir is under pluma_data_dir,
|
||||
* so it's under $prefix/share/pluma-2/plugins/data_dir_name
|
||||
* so it's under $prefix/share/pluma/plugins/data_dir_name
|
||||
* where data_dir_name usually it's the name of the plugin
|
||||
*/
|
||||
pluma_lib_dir = pluma_dirs_get_pluma_lib_dir ();
|
||||
@@ -253,7 +253,7 @@ pluma_plugin_get_data_dir (PlumaPlugin *plugin)
|
||||
* pluma_plugin_activate:
|
||||
* @plugin: a #PlumaPlugin
|
||||
* @window: a #PlumaWindow
|
||||
*
|
||||
*
|
||||
* Activates the plugin.
|
||||
*/
|
||||
void
|
||||
@@ -262,7 +262,7 @@ pluma_plugin_activate (PlumaPlugin *plugin,
|
||||
{
|
||||
g_return_if_fail (PLUMA_IS_PLUGIN (plugin));
|
||||
g_return_if_fail (PLUMA_IS_WINDOW (window));
|
||||
|
||||
|
||||
PLUMA_PLUGIN_GET_CLASS (plugin)->activate (plugin, window);
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ pluma_plugin_activate (PlumaPlugin *plugin,
|
||||
* pluma_plugin_deactivate:
|
||||
* @plugin: a #PlumaPlugin
|
||||
* @window: a #PlumaWindow
|
||||
*
|
||||
*
|
||||
* Deactivates the plugin.
|
||||
*/
|
||||
void
|
||||
@@ -290,7 +290,7 @@ pluma_plugin_deactivate (PlumaPlugin *plugin,
|
||||
*
|
||||
* Triggers an update of the user interface to take into account state changes
|
||||
* caused by the plugin.
|
||||
*/
|
||||
*/
|
||||
void
|
||||
pluma_plugin_update_ui (PlumaPlugin *plugin,
|
||||
PlumaWindow *window)
|
||||
@@ -329,6 +329,6 @@ GtkWidget *
|
||||
pluma_plugin_create_configure_dialog (PlumaPlugin *plugin)
|
||||
{
|
||||
g_return_val_if_fail (PLUMA_IS_PLUGIN (plugin), NULL);
|
||||
|
||||
|
||||
return PLUMA_PLUGIN_GET_CLASS (plugin)->create_configure_dialog (plugin);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* pluma-plugins-engine.c
|
||||
* This file is part of pluma
|
||||
*
|
||||
* Copyright (C) 2002-2005 Paolo Maggi
|
||||
* Copyright (C) 2002-2005 Paolo Maggi
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -16,14 +16,14 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the pluma Team, 2002-2005. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
* Modified by the pluma Team, 2002-2005. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "pluma-object-module.h"
|
||||
#include "pluma-dirs.h"
|
||||
|
||||
#define PLUMA_PLUGINS_ENGINE_BASE_KEY "/apps/pluma-2/plugins"
|
||||
#define PLUMA_PLUGINS_ENGINE_BASE_KEY "/apps/pluma/plugins"
|
||||
#define PLUMA_PLUGINS_ENGINE_KEY PLUMA_PLUGINS_ENGINE_BASE_KEY "/active-plugins"
|
||||
|
||||
#define PLUGIN_EXT ".pluma-plugin"
|
||||
@@ -110,7 +110,7 @@ load_dir_real (PlumaPluginsEngine *engine,
|
||||
g_error_free (error);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
while ((dirent = g_dir_read_name (d)))
|
||||
{
|
||||
gchar *filename;
|
||||
@@ -138,7 +138,7 @@ load_plugin_info (PlumaPluginsEngine *engine,
|
||||
gpointer userdata)
|
||||
{
|
||||
PlumaPluginInfo *info;
|
||||
|
||||
|
||||
info = _pluma_plugin_info_new (filename);
|
||||
|
||||
if (info == NULL)
|
||||
@@ -227,11 +227,11 @@ hash_lowercase (gconstpointer data)
|
||||
{
|
||||
gchar *lowercase;
|
||||
guint ret;
|
||||
|
||||
|
||||
lowercase = g_ascii_strdown ((const gchar *)data, -1);
|
||||
ret = g_str_hash (lowercase);
|
||||
g_free (lowercase);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -246,10 +246,10 @@ loader_destroy (LoaderInfo *info)
|
||||
{
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
|
||||
if (info->loader)
|
||||
g_object_unref (info->loader);
|
||||
|
||||
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
@@ -315,19 +315,19 @@ pluma_plugins_engine_finalize (GObject *object)
|
||||
{
|
||||
PlumaPluginsEngine *engine = PLUMA_PLUGINS_ENGINE (object);
|
||||
GList *item;
|
||||
|
||||
|
||||
pluma_debug (DEBUG_PLUGINS);
|
||||
|
||||
/* Firs deactivate all plugins */
|
||||
for (item = engine->priv->plugin_list; item; item = item->next)
|
||||
{
|
||||
PlumaPluginInfo *info = PLUMA_PLUGIN_INFO (item->data);
|
||||
|
||||
|
||||
if (pluma_plugin_info_is_active (info))
|
||||
pluma_plugins_engine_deactivate_plugin_real (engine, info);
|
||||
}
|
||||
|
||||
/* unref the loaders */
|
||||
|
||||
/* unref the loaders */
|
||||
g_hash_table_destroy (engine->priv->loaders);
|
||||
|
||||
/* and finally free the infos */
|
||||
@@ -388,7 +388,7 @@ load_loader (PlumaPluginsEngine *engine,
|
||||
gchar *path;
|
||||
const gchar *id;
|
||||
GType type;
|
||||
|
||||
|
||||
/* try to load in the module */
|
||||
path = g_path_get_dirname (filename);
|
||||
base = g_path_get_basename (filename);
|
||||
@@ -411,12 +411,12 @@ load_loader (PlumaPluginsEngine *engine,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* get the exported type and check the name as exported by the
|
||||
/* get the exported type and check the name as exported by the
|
||||
* loader interface */
|
||||
type = pluma_object_module_get_object_type (module);
|
||||
id = pluma_plugin_loader_type_get_id (type);
|
||||
|
||||
add_loader (engine, id, module);
|
||||
|
||||
add_loader (engine, id, module);
|
||||
g_type_module_unuse (G_TYPE_MODULE (module));
|
||||
|
||||
return TRUE;
|
||||
@@ -430,11 +430,11 @@ ensure_loader (LoaderInfo *info)
|
||||
/* create a new loader object */
|
||||
PlumaPluginLoader *loader;
|
||||
loader = (PlumaPluginLoader *)pluma_object_module_new_object (info->module, NULL);
|
||||
|
||||
|
||||
if (loader == NULL || !PLUMA_IS_PLUGIN_LOADER (loader))
|
||||
{
|
||||
g_warning ("Loader object is not a valid PlumaPluginLoader instance");
|
||||
|
||||
|
||||
if (loader != NULL && G_IS_OBJECT (loader))
|
||||
g_object_unref (loader);
|
||||
}
|
||||
@@ -454,7 +454,7 @@ get_plugin_loader (PlumaPluginsEngine *engine, PlumaPluginInfo *info)
|
||||
loader_id = info->loader;
|
||||
|
||||
loader_info = (LoaderInfo *)g_hash_table_lookup (
|
||||
engine->priv->loaders,
|
||||
engine->priv->loaders,
|
||||
loader_id);
|
||||
|
||||
if (loader_info == NULL)
|
||||
@@ -463,17 +463,17 @@ get_plugin_loader (PlumaPluginsEngine *engine, PlumaPluginInfo *info)
|
||||
|
||||
loader_dir = pluma_dirs_get_pluma_plugin_loaders_dir ();
|
||||
|
||||
/* loader could not be found in the hash, try to find it by
|
||||
/* loader could not be found in the hash, try to find it by
|
||||
scanning */
|
||||
load_dir_real (engine,
|
||||
load_dir_real (engine,
|
||||
loader_dir,
|
||||
LOADER_EXT,
|
||||
(LoadDirCallback)load_loader,
|
||||
NULL);
|
||||
g_free (loader_dir);
|
||||
|
||||
|
||||
loader_info = (LoaderInfo *)g_hash_table_lookup (
|
||||
engine->priv->loaders,
|
||||
engine->priv->loaders,
|
||||
loader_id);
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ get_plugin_loader (PlumaPluginsEngine *engine, PlumaPluginInfo *info)
|
||||
add_loader (engine, loader_id, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
ensure_loader (loader_info);
|
||||
return loader_info->loader;
|
||||
}
|
||||
@@ -557,33 +557,33 @@ load_plugin (PlumaPluginsEngine *engine,
|
||||
|
||||
if (pluma_plugin_info_is_active (info))
|
||||
return TRUE;
|
||||
|
||||
|
||||
if (!pluma_plugin_info_is_available (info))
|
||||
return FALSE;
|
||||
|
||||
loader = get_plugin_loader (engine, info);
|
||||
|
||||
|
||||
if (loader == NULL)
|
||||
{
|
||||
g_warning ("Could not find loader `%s' for plugin `%s'", info->loader, info->name);
|
||||
info->available = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
path = g_path_get_dirname (info->file);
|
||||
g_return_val_if_fail (path != NULL, FALSE);
|
||||
|
||||
info->plugin = pluma_plugin_loader_load (loader, info, path);
|
||||
|
||||
|
||||
g_free (path);
|
||||
|
||||
|
||||
if (info->plugin == NULL)
|
||||
{
|
||||
g_warning ("Error loading plugin '%s'", info->name);
|
||||
info->available = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ pluma_plugins_engine_activate_plugin (PlumaPluginsEngine *engine,
|
||||
|
||||
if (!pluma_plugin_info_is_available (info))
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (pluma_plugin_info_is_active (info))
|
||||
return TRUE;
|
||||
|
||||
@@ -627,7 +627,7 @@ pluma_plugins_engine_activate_plugin (PlumaPluginsEngine *engine,
|
||||
}
|
||||
|
||||
static void
|
||||
call_plugin_deactivate (PlumaPlugin *plugin,
|
||||
call_plugin_deactivate (PlumaPlugin *plugin,
|
||||
PlumaWindow *window)
|
||||
{
|
||||
pluma_plugin_deactivate (plugin, window);
|
||||
@@ -646,7 +646,7 @@ pluma_plugins_engine_deactivate_plugin_real (PlumaPluginsEngine *engine,
|
||||
const GList *wins;
|
||||
PlumaPluginLoader *loader;
|
||||
|
||||
if (!pluma_plugin_info_is_active (info) ||
|
||||
if (!pluma_plugin_info_is_active (info) ||
|
||||
!pluma_plugin_info_is_available (info))
|
||||
return;
|
||||
|
||||
@@ -659,13 +659,13 @@ pluma_plugins_engine_deactivate_plugin_real (PlumaPluginsEngine *engine,
|
||||
|
||||
/* first unref the plugin (the loader still has one) */
|
||||
g_object_unref (info->plugin);
|
||||
|
||||
|
||||
/* find the loader and tell it to gc and unload the plugin */
|
||||
loader = get_plugin_loader (engine, info);
|
||||
|
||||
|
||||
pluma_plugin_loader_garbage_collect (loader);
|
||||
pluma_plugin_loader_unload (loader, info);
|
||||
|
||||
|
||||
info->plugin = NULL;
|
||||
}
|
||||
|
||||
@@ -708,15 +708,15 @@ pluma_plugins_engine_activate_plugins (PlumaPluginsEngine *engine,
|
||||
for (pl = engine->priv->plugin_list; pl; pl = pl->next)
|
||||
{
|
||||
PlumaPluginInfo *info = (PlumaPluginInfo*)pl->data;
|
||||
|
||||
if (engine->priv->activate_from_prefs &&
|
||||
|
||||
if (engine->priv->activate_from_prefs &&
|
||||
g_slist_find_custom (active_plugins,
|
||||
pluma_plugin_info_get_module_name (info),
|
||||
(GCompareFunc)strcmp) == NULL)
|
||||
continue;
|
||||
|
||||
|
||||
/* If plugin is not active, don't try to activate/load it */
|
||||
if (!engine->priv->activate_from_prefs &&
|
||||
if (!engine->priv->activate_from_prefs &&
|
||||
!pluma_plugin_info_is_active (info))
|
||||
continue;
|
||||
|
||||
@@ -724,14 +724,14 @@ pluma_plugins_engine_activate_plugins (PlumaPluginsEngine *engine,
|
||||
pluma_plugin_activate (info->plugin,
|
||||
window);
|
||||
}
|
||||
|
||||
|
||||
if (engine->priv->activate_from_prefs)
|
||||
{
|
||||
g_slist_foreach (active_plugins, (GFunc) g_free, NULL);
|
||||
g_slist_free (active_plugins);
|
||||
engine->priv->activate_from_prefs = FALSE;
|
||||
}
|
||||
|
||||
|
||||
pluma_debug_message (DEBUG_PLUGINS, "End");
|
||||
|
||||
/* also call update_ui after activation */
|
||||
@@ -743,24 +743,24 @@ pluma_plugins_engine_deactivate_plugins (PlumaPluginsEngine *engine,
|
||||
PlumaWindow *window)
|
||||
{
|
||||
GList *pl;
|
||||
|
||||
|
||||
pluma_debug (DEBUG_PLUGINS);
|
||||
|
||||
g_return_if_fail (PLUMA_IS_PLUGINS_ENGINE (engine));
|
||||
g_return_if_fail (PLUMA_IS_WINDOW (window));
|
||||
|
||||
|
||||
for (pl = engine->priv->plugin_list; pl; pl = pl->next)
|
||||
{
|
||||
PlumaPluginInfo *info = (PlumaPluginInfo*)pl->data;
|
||||
|
||||
|
||||
/* check if the plugin is actually active */
|
||||
if (!pluma_plugin_info_is_active (info))
|
||||
continue;
|
||||
|
||||
|
||||
/* call deactivate for the plugin for this window */
|
||||
pluma_plugin_deactivate (info->plugin, window);
|
||||
}
|
||||
|
||||
|
||||
pluma_debug_message (DEBUG_PLUGINS, "End");
|
||||
}
|
||||
|
||||
@@ -782,21 +782,21 @@ pluma_plugins_engine_update_plugins_ui (PlumaPluginsEngine *engine,
|
||||
|
||||
if (!pluma_plugin_info_is_active (info))
|
||||
continue;
|
||||
|
||||
|
||||
pluma_debug_message (DEBUG_PLUGINS, "Updating UI of %s", info->name);
|
||||
pluma_plugin_update_ui (info->plugin, window);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
pluma_plugins_engine_configure_plugin (PlumaPluginsEngine *engine,
|
||||
PlumaPluginInfo *info,
|
||||
GtkWindow *parent)
|
||||
{
|
||||
GtkWidget *conf_dlg;
|
||||
|
||||
|
||||
GtkWindowGroup *wg;
|
||||
|
||||
|
||||
pluma_debug (DEBUG_PLUGINS);
|
||||
|
||||
g_return_if_fail (info != NULL);
|
||||
@@ -812,15 +812,15 @@ pluma_plugins_engine_configure_plugin (PlumaPluginsEngine *engine,
|
||||
wg = gtk_window_group_new ();
|
||||
gtk_window_group_add_window (wg, parent);
|
||||
}
|
||||
|
||||
|
||||
gtk_window_group_add_window (wg,
|
||||
GTK_WINDOW (conf_dlg));
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (conf_dlg), TRUE);
|
||||
|
||||
gtk_window_set_modal (GTK_WINDOW (conf_dlg), TRUE);
|
||||
gtk_widget_show (conf_dlg);
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
pluma_plugins_engine_active_plugins_changed (PlumaPluginsEngine *engine)
|
||||
{
|
||||
gboolean to_activate;
|
||||
@@ -856,6 +856,6 @@ void
|
||||
pluma_plugins_engine_rescan_plugins (PlumaPluginsEngine *engine)
|
||||
{
|
||||
pluma_debug (DEBUG_PLUGINS);
|
||||
|
||||
|
||||
load_all_plugins (engine);
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* pluma-prefs-manager.c
|
||||
* This file is part of pluma
|
||||
*
|
||||
* Copyright (C) 2002-2005 Paolo Maggi
|
||||
* Copyright (C) 2002-2005 Paolo Maggi
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -17,13 +17,13 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Modified by the pluma Team, 2002-2003. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* Modified by the pluma Team, 2002-2003. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
*
|
||||
* $Id$
|
||||
@@ -58,69 +58,69 @@ static void pluma_prefs_manager_system_font_changed (MateConfClient *client,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_wrap_mode_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_auto_indent_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_undo_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_right_margin_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_smart_home_end_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
static void pluma_prefs_manager_bracket_matching_changed(MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_syntax_hl_enable_changed(MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_search_hl_enable_changed(MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_source_style_scheme_changed
|
||||
(MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_max_recents_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_auto_save_changed (MateConfClient *client,
|
||||
@@ -129,8 +129,8 @@ static void pluma_prefs_manager_auto_save_changed (MateConfClient *client,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_active_plugins_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data);
|
||||
|
||||
static void pluma_prefs_manager_lockdown_changed (MateConfClient *client,
|
||||
@@ -146,7 +146,7 @@ static void pluma_prefs_manager_lockdown_changed (MateConfClient *client,
|
||||
#define PLUMA_STATE_DEFAULT_SIDE_PANEL_SIZE 200
|
||||
#define PLUMA_STATE_DEFAULT_BOTTOM_PANEL_SIZE 140
|
||||
|
||||
#define PLUMA_STATE_FILE_LOCATION "pluma-2"
|
||||
#define PLUMA_STATE_FILE_LOCATION "pluma.ini"
|
||||
|
||||
#define PLUMA_STATE_WINDOW_GROUP "window"
|
||||
#define PLUMA_STATE_WINDOW_STATE "state"
|
||||
@@ -356,12 +356,12 @@ pluma_prefs_manager_get_window_state (void)
|
||||
|
||||
return window_state;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
pluma_prefs_manager_set_window_state (gint ws)
|
||||
{
|
||||
g_return_if_fail (ws > -1);
|
||||
|
||||
|
||||
window_state = ws;
|
||||
|
||||
pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP,
|
||||
@@ -426,7 +426,7 @@ pluma_prefs_manager_set_window_size (gint width, gint height)
|
||||
height);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gboolean
|
||||
pluma_prefs_manager_window_size_can_set (void)
|
||||
{
|
||||
return TRUE;
|
||||
@@ -447,27 +447,27 @@ pluma_prefs_manager_get_side_panel_size (void)
|
||||
return side_panel_size;
|
||||
}
|
||||
|
||||
gint
|
||||
gint
|
||||
pluma_prefs_manager_get_default_side_panel_size (void)
|
||||
{
|
||||
return PLUMA_STATE_DEFAULT_SIDE_PANEL_SIZE;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
pluma_prefs_manager_set_side_panel_size (gint ps)
|
||||
{
|
||||
g_return_if_fail (ps > -1);
|
||||
|
||||
|
||||
if (side_panel_size == ps)
|
||||
return;
|
||||
|
||||
|
||||
side_panel_size = ps;
|
||||
pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP,
|
||||
PLUMA_STATE_SIDE_PANEL_SIZE,
|
||||
ps);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gboolean
|
||||
pluma_prefs_manager_side_panel_size_can_set (void)
|
||||
{
|
||||
return TRUE;
|
||||
@@ -499,7 +499,7 @@ pluma_prefs_manager_set_side_panel_active_page (gint id)
|
||||
id);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gboolean
|
||||
pluma_prefs_manager_side_panel_active_page_can_set (void)
|
||||
{
|
||||
return TRUE;
|
||||
@@ -520,27 +520,27 @@ pluma_prefs_manager_get_bottom_panel_size (void)
|
||||
return bottom_panel_size;
|
||||
}
|
||||
|
||||
gint
|
||||
gint
|
||||
pluma_prefs_manager_get_default_bottom_panel_size (void)
|
||||
{
|
||||
return PLUMA_STATE_DEFAULT_BOTTOM_PANEL_SIZE;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
pluma_prefs_manager_set_bottom_panel_size (gint ps)
|
||||
{
|
||||
g_return_if_fail (ps > -1);
|
||||
|
||||
if (bottom_panel_size == ps)
|
||||
return;
|
||||
|
||||
|
||||
bottom_panel_size = ps;
|
||||
pluma_state_set_int (PLUMA_STATE_WINDOW_GROUP,
|
||||
PLUMA_STATE_BOTTOM_PANEL_SIZE,
|
||||
ps);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gboolean
|
||||
pluma_prefs_manager_bottom_panel_size_can_set (void)
|
||||
{
|
||||
return TRUE;
|
||||
@@ -572,7 +572,7 @@ pluma_prefs_manager_set_bottom_panel_active_page (gint id)
|
||||
id);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gboolean
|
||||
pluma_prefs_manager_bottom_panel_active_page_can_set (void)
|
||||
{
|
||||
return TRUE;
|
||||
@@ -597,7 +597,7 @@ void
|
||||
pluma_prefs_manager_set_active_file_filter (gint id)
|
||||
{
|
||||
g_return_if_fail (id >= 0);
|
||||
|
||||
|
||||
if (active_file_filter == id)
|
||||
return;
|
||||
|
||||
@@ -607,7 +607,7 @@ pluma_prefs_manager_set_active_file_filter (gint id)
|
||||
id);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gboolean
|
||||
pluma_prefs_manager_active_file_filter_can_set (void)
|
||||
{
|
||||
return TRUE;
|
||||
@@ -636,12 +636,12 @@ pluma_prefs_manager_app_init (void)
|
||||
GPM_PLUGINS_DIR,
|
||||
MATECONF_CLIENT_PRELOAD_RECURSIVE,
|
||||
NULL);
|
||||
|
||||
|
||||
mateconf_client_add_dir (pluma_prefs_manager->mateconf_client,
|
||||
GPM_LOCKDOWN_DIR,
|
||||
MATECONF_CLIENT_PRELOAD_RECURSIVE,
|
||||
NULL);
|
||||
|
||||
|
||||
mateconf_client_notify_add (pluma_prefs_manager->mateconf_client,
|
||||
GPM_FONT_DIR,
|
||||
pluma_prefs_manager_editor_font_changed,
|
||||
@@ -661,7 +661,7 @@ pluma_prefs_manager_app_init (void)
|
||||
GPM_WRAP_MODE_DIR,
|
||||
pluma_prefs_manager_wrap_mode_changed,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
|
||||
mateconf_client_notify_add (pluma_prefs_manager->mateconf_client,
|
||||
GPM_LINE_NUMBERS_DIR,
|
||||
pluma_prefs_manager_line_numbers_changed,
|
||||
@@ -733,7 +733,7 @@ pluma_prefs_manager_app_init (void)
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
return pluma_prefs_manager != NULL;
|
||||
return pluma_prefs_manager != NULL;
|
||||
}
|
||||
|
||||
/* This function must be called before exiting pluma */
|
||||
@@ -748,10 +748,10 @@ pluma_prefs_manager_app_shutdown (void)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_editor_font_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
GList *views;
|
||||
@@ -771,7 +771,7 @@ pluma_prefs_manager_editor_font_changed (MateConfClient *client,
|
||||
def = mateconf_value_get_bool (entry->value);
|
||||
else
|
||||
def = GPM_DEFAULT_USE_DEFAULT_FONT;
|
||||
|
||||
|
||||
if (def)
|
||||
font = pluma_prefs_manager_get_system_font ();
|
||||
else
|
||||
@@ -783,14 +783,14 @@ pluma_prefs_manager_editor_font_changed (MateConfClient *client,
|
||||
font = g_strdup (mateconf_value_get_string (entry->value));
|
||||
else
|
||||
font = g_strdup (GPM_DEFAULT_EDITOR_FONT);
|
||||
|
||||
|
||||
def = pluma_prefs_manager_get_use_default_font ();
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
g_return_if_fail (font != NULL);
|
||||
|
||||
|
||||
ts = pluma_prefs_manager_get_tabs_size ();
|
||||
|
||||
views = pluma_app_get_views (pluma_app_get_default ());
|
||||
@@ -809,10 +809,10 @@ pluma_prefs_manager_editor_font_changed (MateConfClient *client,
|
||||
g_free (font);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_system_font_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
GList *views;
|
||||
@@ -854,10 +854,10 @@ pluma_prefs_manager_system_font_changed (MateConfClient *client,
|
||||
g_free (font);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
pluma_debug (DEBUG_PREFS);
|
||||
@@ -875,7 +875,7 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
|
||||
tab_width = mateconf_value_get_int (entry->value);
|
||||
else
|
||||
tab_width = GPM_DEFAULT_TABS_SIZE;
|
||||
|
||||
|
||||
tab_width = CLAMP (tab_width, 1, 24);
|
||||
|
||||
views = pluma_app_get_views (pluma_app_get_default ());
|
||||
@@ -883,7 +883,7 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
|
||||
|
||||
while (l != NULL)
|
||||
{
|
||||
gtk_source_view_set_tab_width (GTK_SOURCE_VIEW (l->data),
|
||||
gtk_source_view_set_tab_width (GTK_SOURCE_VIEW (l->data),
|
||||
tab_width);
|
||||
|
||||
l = l->next;
|
||||
@@ -898,7 +898,7 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
|
||||
GList *l;
|
||||
|
||||
if (entry->value->type == MATECONF_VALUE_BOOL)
|
||||
enable = mateconf_value_get_bool (entry->value);
|
||||
enable = mateconf_value_get_bool (entry->value);
|
||||
else
|
||||
enable = GPM_DEFAULT_INSERT_SPACES;
|
||||
|
||||
@@ -908,7 +908,7 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
|
||||
while (l != NULL)
|
||||
{
|
||||
gtk_source_view_set_insert_spaces_instead_of_tabs (
|
||||
GTK_SOURCE_VIEW (l->data),
|
||||
GTK_SOURCE_VIEW (l->data),
|
||||
enable);
|
||||
|
||||
l = l->next;
|
||||
@@ -918,13 +918,13 @@ pluma_prefs_manager_tabs_size_changed (MateConfClient *client,
|
||||
}
|
||||
}
|
||||
|
||||
static GtkWrapMode
|
||||
static GtkWrapMode
|
||||
get_wrap_mode_from_string (const gchar* str)
|
||||
{
|
||||
GtkWrapMode res;
|
||||
|
||||
g_return_val_if_fail (str != NULL, GTK_WRAP_WORD);
|
||||
|
||||
|
||||
if (strcmp (str, "GTK_WRAP_NONE") == 0)
|
||||
res = GTK_WRAP_NONE;
|
||||
else
|
||||
@@ -938,10 +938,10 @@ get_wrap_mode_from_string (const gchar* str)
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_wrap_mode_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
pluma_debug (DEBUG_PREFS);
|
||||
@@ -956,8 +956,8 @@ pluma_prefs_manager_wrap_mode_changed (MateConfClient *client,
|
||||
GList *l;
|
||||
|
||||
if (entry->value->type == MATECONF_VALUE_STRING)
|
||||
wrap_mode =
|
||||
get_wrap_mode_from_string (mateconf_value_get_string (entry->value));
|
||||
wrap_mode =
|
||||
get_wrap_mode_from_string (mateconf_value_get_string (entry->value));
|
||||
else
|
||||
wrap_mode = get_wrap_mode_from_string (GPM_DEFAULT_WRAP_MODE);
|
||||
|
||||
@@ -976,10 +976,10 @@ pluma_prefs_manager_wrap_mode_changed (MateConfClient *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
pluma_debug (DEBUG_PREFS);
|
||||
@@ -994,7 +994,7 @@ pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
|
||||
GList *l;
|
||||
|
||||
if (entry->value->type == MATECONF_VALUE_BOOL)
|
||||
dln = mateconf_value_get_bool (entry->value);
|
||||
dln = mateconf_value_get_bool (entry->value);
|
||||
else
|
||||
dln = GPM_DEFAULT_DISPLAY_LINE_NUMBERS;
|
||||
|
||||
@@ -1003,7 +1003,7 @@ pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
|
||||
|
||||
while (l != NULL)
|
||||
{
|
||||
gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW (l->data),
|
||||
gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW (l->data),
|
||||
dln);
|
||||
|
||||
l = l->next;
|
||||
@@ -1013,10 +1013,10 @@ pluma_prefs_manager_line_numbers_changed (MateConfClient *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
pluma_debug (DEBUG_PREFS);
|
||||
@@ -1031,7 +1031,7 @@ pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
|
||||
GList *l;
|
||||
|
||||
if (entry->value->type == MATECONF_VALUE_BOOL)
|
||||
hl = mateconf_value_get_bool (entry->value);
|
||||
hl = mateconf_value_get_bool (entry->value);
|
||||
else
|
||||
hl = GPM_DEFAULT_HIGHLIGHT_CURRENT_LINE;
|
||||
|
||||
@@ -1040,7 +1040,7 @@ pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
|
||||
|
||||
while (l != NULL)
|
||||
{
|
||||
gtk_source_view_set_highlight_current_line (GTK_SOURCE_VIEW (l->data),
|
||||
gtk_source_view_set_highlight_current_line (GTK_SOURCE_VIEW (l->data),
|
||||
hl);
|
||||
|
||||
l = l->next;
|
||||
@@ -1050,10 +1050,10 @@ pluma_prefs_manager_hl_current_line_changed (MateConfClient *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_bracket_matching_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
pluma_debug (DEBUG_PREFS);
|
||||
@@ -1087,10 +1087,10 @@ pluma_prefs_manager_bracket_matching_changed (MateConfClient *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_auto_indent_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
pluma_debug (DEBUG_PREFS);
|
||||
@@ -1105,18 +1105,18 @@ pluma_prefs_manager_auto_indent_changed (MateConfClient *client,
|
||||
GList *l;
|
||||
|
||||
if (entry->value->type == MATECONF_VALUE_BOOL)
|
||||
enable = mateconf_value_get_bool (entry->value);
|
||||
enable = mateconf_value_get_bool (entry->value);
|
||||
else
|
||||
enable = GPM_DEFAULT_AUTO_INDENT;
|
||||
|
||||
|
||||
views = pluma_app_get_views (pluma_app_get_default ());
|
||||
l = views;
|
||||
|
||||
while (l != NULL)
|
||||
{
|
||||
gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (l->data),
|
||||
{
|
||||
gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (l->data),
|
||||
enable);
|
||||
|
||||
|
||||
l = l->next;
|
||||
}
|
||||
|
||||
@@ -1124,10 +1124,10 @@ pluma_prefs_manager_auto_indent_changed (MateConfClient *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_undo_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
pluma_debug (DEBUG_PREFS);
|
||||
@@ -1145,15 +1145,15 @@ pluma_prefs_manager_undo_changed (MateConfClient *client,
|
||||
ul = mateconf_value_get_int (entry->value);
|
||||
else
|
||||
ul = GPM_DEFAULT_UNDO_ACTIONS_LIMIT;
|
||||
|
||||
|
||||
ul = CLAMP (ul, -1, 250);
|
||||
|
||||
docs = pluma_app_get_documents (pluma_app_get_default ());
|
||||
l = docs;
|
||||
|
||||
|
||||
while (l != NULL)
|
||||
{
|
||||
gtk_source_buffer_set_max_undo_levels (GTK_SOURCE_BUFFER (l->data),
|
||||
gtk_source_buffer_set_max_undo_levels (GTK_SOURCE_BUFFER (l->data),
|
||||
ul);
|
||||
|
||||
l = l->next;
|
||||
@@ -1163,7 +1163,7 @@ pluma_prefs_manager_undo_changed (MateConfClient *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_right_margin_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
@@ -1207,7 +1207,7 @@ pluma_prefs_manager_right_margin_changed (MateConfClient *client,
|
||||
GList *l;
|
||||
|
||||
if (entry->value->type == MATECONF_VALUE_BOOL)
|
||||
display = mateconf_value_get_bool (entry->value);
|
||||
display = mateconf_value_get_bool (entry->value);
|
||||
else
|
||||
display = GPM_DEFAULT_DISPLAY_RIGHT_MARGIN;
|
||||
|
||||
@@ -1263,8 +1263,8 @@ pluma_prefs_manager_smart_home_end_changed (MateConfClient *client,
|
||||
GList *l;
|
||||
|
||||
if (entry->value->type == MATECONF_VALUE_STRING)
|
||||
smart_he =
|
||||
get_smart_home_end_from_string (mateconf_value_get_string (entry->value));
|
||||
smart_he =
|
||||
get_smart_home_end_from_string (mateconf_value_get_string (entry->value));
|
||||
else
|
||||
smart_he = get_smart_home_end_from_string (GPM_DEFAULT_SMART_HOME_END);
|
||||
|
||||
@@ -1416,12 +1416,12 @@ pluma_prefs_manager_source_style_scheme_changed (MateConfClient *client,
|
||||
if (style == NULL)
|
||||
{
|
||||
g_warning ("Default style scheme '%s' not found, falling back to 'classic'", scheme);
|
||||
|
||||
|
||||
style = gtk_source_style_scheme_manager_get_scheme (
|
||||
pluma_get_style_scheme_manager (),
|
||||
"classic");
|
||||
|
||||
if (style == NULL)
|
||||
if (style == NULL)
|
||||
{
|
||||
g_warning ("Style scheme 'classic' cannot be found, check your GtkSourceView installation.");
|
||||
return;
|
||||
@@ -1552,7 +1552,7 @@ pluma_prefs_manager_auto_save_changed (MateConfClient *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
pluma_prefs_manager_active_plugins_changed (MateConfClient *client,
|
||||
guint cnxn_id,
|
||||
MateConfEntry *entry,
|
||||
@@ -1565,7 +1565,7 @@ pluma_prefs_manager_active_plugins_changed (MateConfClient *client,
|
||||
|
||||
if (strcmp (entry->key, GPM_ACTIVE_PLUGINS) == 0)
|
||||
{
|
||||
if ((entry->value->type == MATECONF_VALUE_LIST) &&
|
||||
if ((entry->value->type == MATECONF_VALUE_LIST) &&
|
||||
(mateconf_value_get_list_type (entry->value) == MATECONF_VALUE_STRING))
|
||||
{
|
||||
PlumaPluginsEngine *engine;
|
||||
@@ -1599,22 +1599,22 @@ pluma_prefs_manager_lockdown_changed (MateConfClient *client,
|
||||
app = pluma_app_get_default ();
|
||||
|
||||
if (strcmp (entry->key, GPM_LOCKDOWN_COMMAND_LINE) == 0)
|
||||
_pluma_app_set_lockdown_bit (app,
|
||||
_pluma_app_set_lockdown_bit (app,
|
||||
PLUMA_LOCKDOWN_COMMAND_LINE,
|
||||
locked);
|
||||
|
||||
else if (strcmp (entry->key, GPM_LOCKDOWN_PRINTING) == 0)
|
||||
_pluma_app_set_lockdown_bit (app,
|
||||
_pluma_app_set_lockdown_bit (app,
|
||||
PLUMA_LOCKDOWN_PRINTING,
|
||||
locked);
|
||||
|
||||
else if (strcmp (entry->key, GPM_LOCKDOWN_PRINT_SETUP) == 0)
|
||||
_pluma_app_set_lockdown_bit (app,
|
||||
_pluma_app_set_lockdown_bit (app,
|
||||
PLUMA_LOCKDOWN_PRINT_SETUP,
|
||||
locked);
|
||||
|
||||
else if (strcmp (entry->key, GPM_LOCKDOWN_SAVE_TO_DISK) == 0)
|
||||
_pluma_app_set_lockdown_bit (app,
|
||||
_pluma_app_set_lockdown_bit (app,
|
||||
PLUMA_LOCKDOWN_SAVE_TO_DISK,
|
||||
locked);
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* pluma-prefs-manager.h
|
||||
* This file is part of pluma
|
||||
*
|
||||
* Copyright (C) 2002 Paolo Maggi
|
||||
* Copyright (C) 2002 Paolo Maggi
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -17,14 +17,14 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Modified by the pluma Team, 2002. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
* Modified by the pluma Team, 2002. See the AUTHORS file for a
|
||||
* list of people on the pluma Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
*/
|
||||
|
||||
#ifndef __PLUMA_PREFS_MANAGER_H__
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <gtksourceview/gtksourceview.h>
|
||||
#include "pluma-app.h"
|
||||
|
||||
#define PLUMA_BASE_KEY "/apps/pluma-2"
|
||||
#define PLUMA_BASE_KEY "/apps/pluma"
|
||||
|
||||
#define GPM_PREFS_DIR PLUMA_BASE_KEY "/preferences"
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
#define GPM_DEFAULT_DISPLAY_LINE_NUMBERS 0 /* FALSE */
|
||||
|
||||
#define GPM_DEFAULT_AUTO_DETECTED_ENCODINGS {"UTF-8", "CURRENT", "ISO-8859-15", NULL}
|
||||
|
||||
|
||||
#define GPM_DEFAULT_TOOLBAR_VISIBLE 1 /* TRUE */
|
||||
#define GPM_DEFAULT_TOOLBAR_BUTTONS_STYLE "PLUMA_TOOLBAR_SYSTEM"
|
||||
#define GPM_DEFAULT_TOOLBAR_SHOW_TOOLTIPS 1 /* TRUE */
|
||||
@@ -295,8 +295,8 @@ void pluma_prefs_manager_set_toolbar_visible (gboolean tv);
|
||||
gboolean pluma_prefs_manager_toolbar_visible_can_set (void);
|
||||
|
||||
/* Toolbar buttons style */
|
||||
PlumaToolbarSetting pluma_prefs_manager_get_toolbar_buttons_style (void);
|
||||
void pluma_prefs_manager_set_toolbar_buttons_style (PlumaToolbarSetting tbs);
|
||||
PlumaToolbarSetting pluma_prefs_manager_get_toolbar_buttons_style (void);
|
||||
void pluma_prefs_manager_set_toolbar_buttons_style (PlumaToolbarSetting tbs);
|
||||
gboolean pluma_prefs_manager_toolbar_buttons_style_can_set (void);
|
||||
|
||||
/* Statusbar visible */
|
||||
@@ -322,13 +322,13 @@ gboolean pluma_prefs_manager_print_syntax_hl_can_set (void);
|
||||
gboolean pluma_prefs_manager_get_print_header (void);
|
||||
void pluma_prefs_manager_set_print_header (gboolean ph);
|
||||
gboolean pluma_prefs_manager_print_header_can_set (void);
|
||||
|
||||
|
||||
/* Wrap mode while printing */
|
||||
GtkWrapMode pluma_prefs_manager_get_print_wrap_mode (void);
|
||||
void pluma_prefs_manager_set_print_wrap_mode (GtkWrapMode pwm);
|
||||
gboolean pluma_prefs_manager_print_wrap_mode_can_set (void);
|
||||
|
||||
/* Print line numbers */
|
||||
/* Print line numbers */
|
||||
gint pluma_prefs_manager_get_print_line_numbers (void);
|
||||
void pluma_prefs_manager_set_print_line_numbers (gint pln);
|
||||
gboolean pluma_prefs_manager_print_line_numbers_can_set (void);
|
||||
@@ -351,8 +351,8 @@ void pluma_prefs_manager_set_print_font_numbers (const gchar *font);
|
||||
gboolean pluma_prefs_manager_print_font_numbers_can_set (void);
|
||||
const gchar *pluma_prefs_manager_get_default_print_font_numbers (void);
|
||||
|
||||
/* Max number of files in "Recent Files" menu.
|
||||
* This is configurable only using mateconftool or mateconf-editor
|
||||
/* Max number of files in "Recent Files" menu.
|
||||
* This is configurable only using mateconftool or mateconf-editor
|
||||
*/
|
||||
gint pluma_prefs_manager_get_max_recents (void);
|
||||
|
||||
|
Reference in New Issue
Block a user