summaryrefslogtreecommitdiff
path: root/pluma/pluma-prefs-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'pluma/pluma-prefs-manager.c')
-rw-r--r--pluma/pluma-prefs-manager.c128
1 files changed, 64 insertions, 64 deletions
diff --git a/pluma/pluma-prefs-manager.c b/pluma/pluma-prefs-manager.c
index 01434bbd..2bbfbfa2 100644
--- a/pluma/pluma-prefs-manager.c
+++ b/pluma/pluma-prefs-manager.c
@@ -3,7 +3,7 @@
* pluma-prefs-manager.c
* 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., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, 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.
*/
#ifdef HAVE_CONFIG_H
@@ -65,7 +65,7 @@ pluma_prefs_manager_ ## name ## _can_set (void) \
pluma_debug (DEBUG_PREFS); \
\
return pluma_prefs_manager_key_is_writable (key); \
-}
+}
@@ -92,7 +92,7 @@ pluma_prefs_manager_ ## name ## _can_set (void) \
pluma_debug (DEBUG_PREFS); \
\
return pluma_prefs_manager_key_is_writable (key); \
-}
+}
@@ -119,7 +119,7 @@ pluma_prefs_manager_ ## name ## _can_set (void) \
pluma_debug (DEBUG_PREFS); \
\
return pluma_prefs_manager_key_is_writable (key); \
-}
+}
@@ -194,7 +194,7 @@ pluma_prefs_manager_shutdown (void)
pluma_prefs_manager->interface_settings = NULL;
}
-static gboolean
+static gboolean
pluma_prefs_manager_get_bool (const gchar* key)
{
pluma_debug (DEBUG_PREFS);
@@ -202,7 +202,7 @@ pluma_prefs_manager_get_bool (const gchar* key)
return g_settings_get_boolean (pluma_prefs_manager->settings, key);
}
-static gint
+static gint
pluma_prefs_manager_get_int (const gchar* key)
{
pluma_debug (DEBUG_PREFS);
@@ -226,7 +226,7 @@ pluma_prefs_manager_get_enum (const gchar* key)
return g_settings_get_enum (pluma_prefs_manager->settings, key);
}
-static void
+static void
pluma_prefs_manager_set_bool (const gchar* key, gboolean value)
{
pluma_debug (DEBUG_PREFS);
@@ -237,7 +237,7 @@ pluma_prefs_manager_set_bool (const gchar* key, gboolean value)
g_settings_set_boolean (pluma_prefs_manager->settings, key, value);
}
-static void
+static void
pluma_prefs_manager_set_int (const gchar* key, gint value)
{
pluma_debug (DEBUG_PREFS);
@@ -248,13 +248,13 @@ pluma_prefs_manager_set_int (const gchar* key, gint value)
g_settings_set_int (pluma_prefs_manager->settings, key, value);
}
-static void
+static void
pluma_prefs_manager_set_string (const gchar* key, const gchar* value)
{
pluma_debug (DEBUG_PREFS);
g_return_if_fail (value != NULL);
-
+
g_return_if_fail (g_settings_is_writable (
pluma_prefs_manager->settings, key));
@@ -272,7 +272,7 @@ pluma_prefs_manager_set_enum (const gchar* key, gint value)
g_settings_set_enum (pluma_prefs_manager->settings, key, value);
}
-static gboolean
+static gboolean
pluma_prefs_manager_key_is_writable (const gchar* key)
{
pluma_debug (DEBUG_PREFS);
@@ -318,13 +318,13 @@ DEFINE_INT_PREF (auto_save_interval,
DEFINE_INT_PREF (undo_actions_limit,
GPM_UNDO_ACTIONS_LIMIT)
-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
@@ -344,9 +344,9 @@ pluma_prefs_manager_get_wrap_mode (void)
{
gchar *str;
GtkWrapMode res;
-
+
pluma_debug (DEBUG_PREFS);
-
+
str = pluma_prefs_manager_get_string (GPM_WRAP_MODE);
res = get_wrap_mode_from_string (str);
@@ -355,12 +355,12 @@ pluma_prefs_manager_get_wrap_mode (void)
return res;
}
-
+
void
pluma_prefs_manager_set_wrap_mode (GtkWrapMode wp)
{
const gchar * str;
-
+
pluma_debug (DEBUG_PREFS);
switch (wp)
@@ -380,30 +380,30 @@ pluma_prefs_manager_set_wrap_mode (GtkWrapMode wp)
pluma_prefs_manager_set_string (GPM_WRAP_MODE,
str);
}
-
+
gboolean
pluma_prefs_manager_wrap_mode_can_set (void)
{
pluma_debug (DEBUG_PREFS);
-
+
return pluma_prefs_manager_key_is_writable (GPM_WRAP_MODE);
}
/* Tabs size */
-DEFINE_INT_PREF (tabs_size,
+DEFINE_INT_PREF (tabs_size,
GPM_TABS_SIZE)
/* Insert spaces */
-DEFINE_BOOL_PREF (insert_spaces,
+DEFINE_BOOL_PREF (insert_spaces,
GPM_INSERT_SPACES)
/* Auto indent */
-DEFINE_BOOL_PREF (auto_indent,
+DEFINE_BOOL_PREF (auto_indent,
GPM_AUTO_INDENT)
/* Display line numbers */
-DEFINE_BOOL_PREF (display_line_numbers,
+DEFINE_BOOL_PREF (display_line_numbers,
GPM_DISPLAY_LINE_NUMBERS)
/* Toolbar visibility */
@@ -412,14 +412,14 @@ DEFINE_BOOL_PREF (toolbar_visible,
/* Toolbar suttons style */
-PlumaToolbarSetting
-pluma_prefs_manager_get_toolbar_buttons_style (void)
+PlumaToolbarSetting
+pluma_prefs_manager_get_toolbar_buttons_style (void)
{
gchar *str;
PlumaToolbarSetting res;
-
+
pluma_debug (DEBUG_PREFS);
-
+
str = pluma_prefs_manager_get_string (GPM_TOOLBAR_BUTTONS_STYLE);
if (strcmp (str, "PLUMA_TOOLBAR_ICONS") == 0)
@@ -428,7 +428,7 @@ pluma_prefs_manager_get_toolbar_buttons_style (void)
{
if (strcmp (str, "PLUMA_TOOLBAR_ICONS_AND_TEXT") == 0)
res = PLUMA_TOOLBAR_ICONS_AND_TEXT;
- else
+ else
{
if (strcmp (str, "PLUMA_TOOLBAR_ICONS_BOTH_HORIZ") == 0)
res = PLUMA_TOOLBAR_ICONS_BOTH_HORIZ;
@@ -446,7 +446,7 @@ void
pluma_prefs_manager_set_toolbar_buttons_style (PlumaToolbarSetting tbs)
{
const gchar * str;
-
+
pluma_debug (DEBUG_PREFS);
switch (tbs)
@@ -475,7 +475,7 @@ gboolean
pluma_prefs_manager_toolbar_buttons_style_can_set (void)
{
pluma_debug (DEBUG_PREFS);
-
+
return pluma_prefs_manager_key_is_writable (GPM_TOOLBAR_BUTTONS_STYLE);
}
@@ -483,11 +483,11 @@ pluma_prefs_manager_toolbar_buttons_style_can_set (void)
/* Statusbar visiblity */
DEFINE_BOOL_PREF (statusbar_visible,
GPM_STATUSBAR_VISIBLE)
-
+
/* Side Pane visiblity */
DEFINE_BOOL_PREF (side_pane_visible,
GPM_SIDE_PANE_VISIBLE)
-
+
/* Bottom Panel visiblity */
DEFINE_BOOL_PREF (bottom_panel_visible,
GPM_BOTTOM_PANEL_VISIBLE)
@@ -507,9 +507,9 @@ pluma_prefs_manager_get_print_wrap_mode (void)
{
gchar *str;
GtkWrapMode res;
-
+
pluma_debug (DEBUG_PREFS);
-
+
str = pluma_prefs_manager_get_string (GPM_PRINT_WRAP_MODE);
if (strcmp (str, "GTK_WRAP_NONE") == 0)
@@ -526,7 +526,7 @@ pluma_prefs_manager_get_print_wrap_mode (void)
return res;
}
-
+
void
pluma_prefs_manager_set_print_wrap_mode (GtkWrapMode pwp)
{
@@ -555,11 +555,11 @@ gboolean
pluma_prefs_manager_print_wrap_mode_can_set (void)
{
pluma_debug (DEBUG_PREFS);
-
+
return pluma_prefs_manager_key_is_writable (GPM_PRINT_WRAP_MODE);
}
-/* Print line numbers */
+/* Print line numbers */
DEFINE_INT_PREF (print_line_numbers,
GPM_PRINT_LINE_NUMBERS)
@@ -602,8 +602,8 @@ pluma_prefs_manager_get_default_print_font_numbers (void)
return pluma_prefs_manager_get_default_string_value (GPM_PRINT_FONT_NUMBERS);
}
-/* Max number of files in "Recent Files" menu.
- * This is configurable only using gsettings, dconf or dconf-editor
+/* Max number of files in "Recent Files" menu.
+ * This is configurable only using gsettings, dconf or dconf-editor
*/
gint
pluma_prefs_manager_get_max_recents (void)
@@ -677,16 +677,16 @@ pluma_prefs_manager_get_auto_detected_encodings (void)
strings = pluma_prefs_manager_get_gslist (pluma_prefs_manager->settings, GPM_AUTO_DETECTED_ENCODINGS);
if (strings != NULL)
- {
+ {
GSList *tmp;
const PlumaEncoding *enc;
tmp = strings;
-
+
while (tmp)
{
const char *charset = tmp->data;
-
+
if (strcmp (charset, "CURRENT") == 0)
g_get_charset (&charset);
@@ -704,7 +704,7 @@ pluma_prefs_manager_get_auto_detected_encodings (void)
}
g_slist_foreach (strings, (GFunc) g_free, NULL);
- g_slist_free (strings);
+ g_slist_free (strings);
res = g_slist_reverse (res);
}
@@ -728,12 +728,12 @@ pluma_prefs_manager_get_shown_in_menu_encodings (void)
strings = pluma_prefs_manager_get_gslist (pluma_prefs_manager->settings, GPM_SHOWN_IN_MENU_ENCODINGS);
if (strings != NULL)
- {
+ {
GSList *tmp;
const PlumaEncoding *enc;
tmp = strings;
-
+
while (tmp)
{
const char *charset = tmp->data;
@@ -754,7 +754,7 @@ pluma_prefs_manager_get_shown_in_menu_encodings (void)
}
g_slist_foreach (strings, (GFunc) g_free, NULL);
- g_slist_free (strings);
+ g_slist_free (strings);
res = g_slist_reverse (res);
}
@@ -764,9 +764,9 @@ pluma_prefs_manager_get_shown_in_menu_encodings (void)
void
pluma_prefs_manager_set_shown_in_menu_encodings (const GSList *encs)
-{
+{
GSList *list = NULL;
-
+
g_return_if_fail (pluma_prefs_manager != NULL);
g_return_if_fail (pluma_prefs_manager->settings != NULL);
g_return_if_fail (pluma_prefs_manager_shown_in_menu_encodings_can_set ());
@@ -775,7 +775,7 @@ pluma_prefs_manager_set_shown_in_menu_encodings (const GSList *encs)
{
const PlumaEncoding *enc;
const gchar *charset;
-
+
enc = (const PlumaEncoding *)encs->data;
charset = pluma_encoding_get_charset (enc);
@@ -797,7 +797,7 @@ gboolean
pluma_prefs_manager_shown_in_menu_encodings_can_set (void)
{
pluma_debug (DEBUG_PREFS);
-
+
return pluma_prefs_manager_key_is_writable (GPM_SHOWN_IN_MENU_ENCODINGS);
}
@@ -809,12 +809,12 @@ DEFINE_BOOL_PREF (highlight_current_line,
/* Highlight matching bracket */
DEFINE_BOOL_PREF (bracket_matching,
GPM_BRACKET_MATCHING)
-
+
/* Display Right Margin */
DEFINE_BOOL_PREF (display_right_margin,
GPM_DISPLAY_RIGHT_MARGIN)
-/* Right Margin Position */
+/* Right Margin Position */
DEFINE_INT_PREF (right_margin_position,
GPM_RIGHT_MARGIN_POSITION)
@@ -853,7 +853,7 @@ pluma_prefs_manager_get_smart_home_end (void)
return res;
}
-
+
void
pluma_prefs_manager_set_smart_home_end (GtkSourceSmartHomeEndType smart_he)
{
@@ -886,7 +886,7 @@ gboolean
pluma_prefs_manager_smart_home_end_can_set (void)
{
pluma_debug (DEBUG_PREFS);
-
+
return pluma_prefs_manager_key_is_writable (GPM_SMART_HOME_END);
}
@@ -906,7 +906,7 @@ GSList *
pluma_prefs_manager_get_writable_vfs_schemes (void)
{
GSList *strings;
-
+
pluma_debug (DEBUG_PREFS);
g_return_val_if_fail (pluma_prefs_manager != NULL, NULL);
@@ -915,8 +915,8 @@ pluma_prefs_manager_get_writable_vfs_schemes (void)
strings = pluma_prefs_manager_get_gslist (pluma_prefs_manager->settings, GPM_WRITABLE_VFS_SCHEMES);
/* The 'file' scheme is writable by default. */
- strings = g_slist_prepend (strings, g_strdup ("file"));
-
+ strings = g_slist_prepend (strings, g_strdup ("file"));
+
pluma_debug_message (DEBUG_PREFS, "Done");
return strings;
@@ -950,7 +950,7 @@ pluma_prefs_manager_get_active_plugins (void)
void
pluma_prefs_manager_set_active_plugins (const GSList *plugins)
-{
+{
g_return_if_fail (pluma_prefs_manager != NULL);
g_return_if_fail (pluma_prefs_manager->settings != NULL);
g_return_if_fail (pluma_prefs_manager_active_plugins_can_set ());