prefs: Remove now unused toolbar style prefs

We no longer set a toolbar button style so remove some of the left over code for
handling it.
This commit is contained in:
JosephMcc 2016-10-06 10:33:53 -07:00
parent 46c8d8adc8
commit 2ecb36178a
4 changed files with 0 additions and 89 deletions

View File

@ -111,11 +111,6 @@
<summary>Toolbar is Visible</summary>
<description>Whether the toolbar should be visible in editing windows.</description>
</key>
<key name="toolbar-buttons-style" type="s">
<default>'@TOOLBAR_STYLE@'</default>
<summary>Toolbar Buttons Style</summary>
<description>Style for the toolbar buttons. Possible values are "XED_TOOLBAR_SYSTEM" to use the system's default style, "XED_TOOLBAR_ICONS" to display icons only, "XED_TOOLBAR_ICONS_AND_TEXT" to display both icons and text, and "XED_TOOLBAR_ICONS_BOTH_HORIZ" to display prioritized text beside icons. Note that the values are case-sensitive, so make sure they appear exactly as mentioned here.</description>
</key>
<key name="statusbar-visible" type="b">
<default>true</default>
<summary>Status Bar is Visible</summary>

View File

@ -359,76 +359,6 @@ DEFINE_BOOL_PREF (display_line_numbers,
DEFINE_BOOL_PREF (toolbar_visible,
GPM_TOOLBAR_VISIBLE)
/* Toolbar suttons style */
XedToolbarSetting
xed_prefs_manager_get_toolbar_buttons_style (void)
{
gchar *str;
XedToolbarSetting res;
xed_debug (DEBUG_PREFS);
str = xed_prefs_manager_get_string (GPM_TOOLBAR_BUTTONS_STYLE);
if (strcmp (str, "XED_TOOLBAR_ICONS") == 0)
res = XED_TOOLBAR_ICONS;
else
{
if (strcmp (str, "XED_TOOLBAR_ICONS_AND_TEXT") == 0)
res = XED_TOOLBAR_ICONS_AND_TEXT;
else
{
if (strcmp (str, "XED_TOOLBAR_ICONS_BOTH_HORIZ") == 0)
res = XED_TOOLBAR_ICONS_BOTH_HORIZ;
else
res = XED_TOOLBAR_SYSTEM;
}
}
g_free (str);
return res;
}
void
xed_prefs_manager_set_toolbar_buttons_style (XedToolbarSetting tbs)
{
const gchar * str;
xed_debug (DEBUG_PREFS);
switch (tbs)
{
case XED_TOOLBAR_ICONS:
str = "XED_TOOLBAR_ICONS";
break;
case XED_TOOLBAR_ICONS_AND_TEXT:
str = "XED_TOOLBAR_ICONS_AND_TEXT";
break;
case XED_TOOLBAR_ICONS_BOTH_HORIZ:
str = "XED_TOOLBAR_ICONS_BOTH_HORIZ";
break;
default: /* XED_TOOLBAR_SYSTEM */
str = "XED_TOOLBAR_SYSTEM";
}
xed_prefs_manager_set_string (GPM_TOOLBAR_BUTTONS_STYLE,
str);
}
gboolean
xed_prefs_manager_toolbar_buttons_style_can_set (void)
{
xed_debug (DEBUG_PREFS);
return xed_prefs_manager_key_is_writable (GPM_TOOLBAR_BUTTONS_STYLE);
}
/* Statusbar visiblity */
DEFINE_BOOL_PREF (statusbar_visible,
GPM_STATUSBAR_VISIBLE)

View File

@ -74,7 +74,6 @@
/* UI */
#define GPM_TOOLBAR_VISIBLE "toolbar-visible"
#define GPM_TOOLBAR_BUTTONS_STYLE "toolbar-buttons-style"
#define GPM_STATUSBAR_VISIBLE "statusbar-visible"
@ -115,13 +114,6 @@
#define GPM_DEFAULT_AUTO_SAVE_INTERVAL 10 /* minutes */
#define GPM_DEFAULT_MAX_RECENTS 5
typedef enum {
XED_TOOLBAR_SYSTEM = 0,
XED_TOOLBAR_ICONS,
XED_TOOLBAR_ICONS_AND_TEXT,
XED_TOOLBAR_ICONS_BOTH_HORIZ
} XedToolbarSetting;
/** LIFE CYCLE MANAGEMENT FUNCTIONS **/
gboolean xed_prefs_manager_init (void);
@ -195,11 +187,6 @@ gboolean xed_prefs_manager_get_toolbar_visible (void);
void xed_prefs_manager_set_toolbar_visible (gboolean tv);
gboolean xed_prefs_manager_toolbar_visible_can_set (void);
/* Toolbar buttons style */
XedToolbarSetting xed_prefs_manager_get_toolbar_buttons_style (void);
void xed_prefs_manager_set_toolbar_buttons_style (XedToolbarSetting tbs);
gboolean xed_prefs_manager_toolbar_buttons_style_can_set (void);
/* Statusbar visible */
gboolean xed_prefs_manager_get_statusbar_visible (void);
void xed_prefs_manager_set_statusbar_visible (gboolean sv);

View File

@ -399,7 +399,6 @@ set_toolbar_style (XedWindow *window,
XedWindow *origin)
{
gboolean visible;
XedToolbarSetting style;
GtkAction *action;
if (origin == NULL)