[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Drop unused kbd config options

noreply at xfce.org noreply at xfce.org
Sun Nov 11 21:27:57 CET 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit d91f349650c606663ab65f324812b9654d5113ef
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Nov 11 15:27:51 2018 -0500

    Drop unused kbd config options
---
 src/xfcekbd-config-private.h   | 31 ---------------
 src/xfcekbd-desktop-config.c   |  6 ---
 src/xfcekbd-indicator-config.c | 86 ------------------------------------------
 3 files changed, 123 deletions(-)

diff --git a/src/xfcekbd-config-private.h b/src/xfcekbd-config-private.h
index 30b61ee..fc1cd02 100644
--- a/src/xfcekbd-config-private.h
+++ b/src/xfcekbd-config-private.h
@@ -45,13 +45,6 @@
 #define DEFAULT_KEY_KBD_HANDLE_INDICATORS FALSE
 
 /**
- * KBD/General: Show layout names instead of group names
- * Only for versions of XFree supporting multiple layouts
- */
-#define KEY_KBD_LAYOUT_NAMES_AS_GROUP_NAMES "/kbd/general/layout-names-as-group-names"
-#define DEFAULT_KEY_KBD_LAYOUT_NAMES_AS_GROUP_NAMES TRUE
-
-/**
  * KBD/General: Load extra configuration items
  * Load exotic, rarely used layouts and options
  */
@@ -71,30 +64,6 @@
 #define DEFAULT_KEY_KBD_INDICATOR_SECONDARIES 0
 
 /**
- * KBD/Indicator: The font
- * The font for the layout indicator. This should be in
- * "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]" format.
- */
-#define KEY_KBD_INDICATOR_FONT_FAMILY "/kbd/indicator/font-family"
-#define DEFAULT_KEY_KBD_INDICATOR_FONT_FAMILY ""
-
-/**
- * KBD/Indicator: The foreground color
- * The foreground color for the layout indicator.
- * This should be in "R G B" format, for example "255 0 0".
- */
-#define KEY_KBD_INDICATOR_FOREGROUND_COLOR "/kbd/indicator/foreground-color"
-#define DEFAULT_KEY_KBD_INDICATOR_FOREGROUND_COLOR ""
-
-/**
- * KBD/Indicator: The background color
- * The background color for the layout indicator.
- * This should be in "R G B" format, for example "255 0 0".
- */
-#define KEY_KBD_INDICATOR_BACKGROUND_COLOR "/kbd/indicator/background-color"
-#define DEFAULT_KEY_KBD_INDICATOR_BACKGROUND_COLOR ""
-
-/**
  * General config functions (private)
  */
 extern void xfcekbd_keyboard_config_model_set   (XfcekbdKeyboardConfig  *kbd_config,
diff --git a/src/xfcekbd-desktop-config.c b/src/xfcekbd-desktop-config.c
index cd90c68..f5a45d1 100644
--- a/src/xfcekbd-desktop-config.c
+++ b/src/xfcekbd-desktop-config.c
@@ -136,12 +136,6 @@ xfcekbd_desktop_config_load_from_xfconf (XfcekbdDesktopConfig *config) {
                                 DEFAULT_KEY_KBD_HANDLE_INDICATORS);
     xkl_debug (150, "handle_indicators: %d\n", config->handle_indicators);
 
-    config->layout_names_as_group_names =
-        xfconf_channel_get_bool(config->channel,
-                                KEY_KBD_LAYOUT_NAMES_AS_GROUP_NAMES,
-                                DEFAULT_KEY_KBD_LAYOUT_NAMES_AS_GROUP_NAMES);
-    xkl_debug (150, "layout_names_as_group_names: %d\n", config->layout_names_as_group_names);
-
     config->load_extra_items =
         xfconf_channel_get_bool(config->channel,
                                 KEY_KBD_LOAD_EXTRA_ITEMS,
diff --git a/src/xfcekbd-indicator-config.c b/src/xfcekbd-indicator-config.c
index 5182d69..1f93b60 100644
--- a/src/xfcekbd-indicator-config.c
+++ b/src/xfcekbd-indicator-config.c
@@ -39,83 +39,6 @@
 /*
  * static applet config functions
  */
-static void
-xfcekbd_indicator_config_load_font (XfcekbdIndicatorConfig *ind_config) {
-    ind_config->font_family =
-        xfconf_channel_get_string(ind_config->channel,
-                                  KEY_KBD_INDICATOR_FONT_FAMILY,
-                                  DEFAULT_KEY_KBD_INDICATOR_FONT_FAMILY);
-
-    if (ind_config->font_family == NULL ||
-            ind_config->font_family[0] == '\0') {
-        PangoFontDescription *fd = NULL;
-        GtkWidgetPath *widget_path = gtk_widget_path_new ();
-        GtkStyleContext *context = gtk_style_context_new ();
-
-        gtk_widget_path_append_type (widget_path, GTK_TYPE_WINDOW);
-        gtk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
-
-        gtk_style_context_set_path (context, widget_path);
-        gtk_style_context_set_screen (context, gdk_screen_get_default ());
-        gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL);
-        gtk_style_context_add_class (context, GTK_STYLE_CLASS_DEFAULT);
-        gtk_style_context_add_class (context, "gnome-panel-menu-bar");
-        gtk_style_context_add_class (context, "xfce-panel-menu-bar");
-
-        gtk_style_context_get (context, GTK_STATE_FLAG_NORMAL,
-                               GTK_STYLE_PROPERTY_FONT, &fd, NULL);
-
-        if (fd != NULL) {
-            ind_config->font_family =
-                g_strdup (pango_font_description_to_string(fd));
-        }
-
-        g_object_unref (G_OBJECT (context));
-        gtk_widget_path_unref (widget_path);
-    }
-    xkl_debug (150, "font: [%s]\n", ind_config->font_family);
-}
-
-static void
-xfcekbd_indicator_config_load_colors (XfcekbdIndicatorConfig *ind_config) {
-    ind_config->foreground_color =
-        xfconf_channel_get_string(ind_config->channel,
-                                  KEY_KBD_INDICATOR_FOREGROUND_COLOR,
-                                  DEFAULT_KEY_KBD_INDICATOR_FOREGROUND_COLOR);
-
-    if (ind_config->foreground_color == NULL ||
-            ind_config->foreground_color[0] == '\0') {
-        GtkWidgetPath *widget_path = gtk_widget_path_new ();
-        GtkStyleContext *context = gtk_style_context_new ();
-        GdkRGBA fg_color;
-
-        gtk_widget_path_append_type (widget_path, GTK_TYPE_WINDOW);
-        gtk_widget_path_iter_set_name (widget_path, -1 , "PanelWidget");
-
-        gtk_style_context_set_path (context, widget_path);
-        gtk_style_context_set_screen (context, gdk_screen_get_default ());
-        gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL);
-        gtk_style_context_add_class (context, GTK_STYLE_CLASS_DEFAULT);
-        gtk_style_context_add_class (context, "gnome-panel-menu-bar");
-        gtk_style_context_add_class (context, "xfce-panel-menu-bar");
-
-        gtk_style_context_get_color (context,
-                                     GTK_STATE_FLAG_NORMAL, &fg_color);
-        ind_config->foreground_color =
-            g_strdup_printf ("%g %g %g",
-                             fg_color.red,
-                             fg_color.green,
-                             fg_color.blue);
-
-        g_object_unref (G_OBJECT (context));
-        gtk_widget_path_unref (widget_path);
-    }
-
-    ind_config->background_color =
-        xfconf_channel_get_string(ind_config->channel,
-                                  KEY_KBD_INDICATOR_BACKGROUND_COLOR,
-                                  DEFAULT_KEY_KBD_INDICATOR_BACKGROUND_COLOR);
-}
 
 static gchar *
 xfcekbd_indicator_config_get_images_file (XfcekbdIndicatorConfig *ind_config,
@@ -236,12 +159,6 @@ xfcekbd_indicator_config_term (XfcekbdIndicatorConfig *ind_config) {
     g_free (ind_config->font_family);
     ind_config->font_family = NULL;
 
-    g_free (ind_config->foreground_color);
-    ind_config->foreground_color = NULL;
-
-    g_free (ind_config->background_color);
-    ind_config->background_color = NULL;
-
     ind_config->icon_theme = NULL;
 
     xfcekbd_indicator_config_free_image_filenames (ind_config);
@@ -261,9 +178,6 @@ xfcekbd_indicator_config_load_from_xfconf (XfcekbdIndicatorConfig * ind_config)
         xfconf_channel_get_bool (ind_config->channel,
                  KEY_KBD_INDICATOR_SHOW_FLAGS,
                  DEFAULT_KEY_KBD_INDICATOR_SHOW_FLAGS);
-
-    xfcekbd_indicator_config_load_font (ind_config);
-    xfcekbd_indicator_config_load_colors (ind_config);
 }
 
 void

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list