[Xfce4-commits] [apps/xfdashboard] 01/03: Rename scoring functions in XfdashboardCssSelector (the function names were kept when splitting selector function from XfdashboardThemeCss into XfdashboardCssSelector class)
noreply at xfce.org
noreply at xfce.org
Fri Apr 28 10:40:26 CEST 2017
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit a1303f2f21723140b4a038108731b07489f4561d
Author: Stephan Haller <nomad at froevel.de>
Date: Fri Apr 28 08:20:34 2017 +0200
Rename scoring functions in XfdashboardCssSelector (the function names were kept when splitting selector function from XfdashboardThemeCss into XfdashboardCssSelector class)
---
libxfdashboard/css-selector.c | 10 +++++-----
libxfdashboard/css-selector.h | 2 +-
libxfdashboard/theme-css.c | 2 +-
libxfdashboard/utils.c | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libxfdashboard/css-selector.c b/libxfdashboard/css-selector.c
index ac6791e..e0beec5 100644
--- a/libxfdashboard/css-selector.c
+++ b/libxfdashboard/css-selector.c
@@ -234,7 +234,7 @@ static gboolean _xfdashboard_css_selector_list_contains(const gchar *inNeedle,
/* Check and score this selector against stylable node.
* A score below 0 means that they did not match.
*/
-static gint _xfdashboard_css_selector_score_matching_node(XfdashboardCssSelectorRule *inRule,
+static gint _xfdashboard_css_selector_score_node(XfdashboardCssSelectorRule *inRule,
XfdashboardStylable *inStylable)
{
gint score;
@@ -406,7 +406,7 @@ static gint _xfdashboard_css_selector_score_matching_node(XfdashboardCssSelector
if(!parent || !XFDASHBOARD_IS_STYLABLE(parent)) return(-1);
/* Check if there are matching parents. If not return immediately. */
- parentScore=_xfdashboard_css_selector_score_matching_node(inRule->parentRule, parent);
+ parentScore=_xfdashboard_css_selector_score_node(inRule->parentRule, parent);
if(parentScore<0) return(-1);
/* Score matching parents */
@@ -437,7 +437,7 @@ static gint _xfdashboard_css_selector_score_matching_node(XfdashboardCssSelector
/* Get number of matches for ancestor and if at least one matches,
* stop search and score
*/
- ancestorScore=_xfdashboard_css_selector_score_matching_node(inRule->parentRule, ancestor);
+ ancestorScore=_xfdashboard_css_selector_score_node(inRule->parentRule, ancestor);
if(ancestorScore>=0)
{
c+=ancestorScore;
@@ -1055,13 +1055,13 @@ gchar* xfdashboard_css_selector_to_string(XfdashboardCssSelector *self)
/* Check and score this selector against a stylable node.
* A score below 0 means that they did not match.
*/
-gint xfdashboard_css_selector_score_matching_stylable_node(XfdashboardCssSelector *self, XfdashboardStylable *inStylable)
+gint xfdashboard_css_selector_score(XfdashboardCssSelector *self, XfdashboardStylable *inStylable)
{
g_return_val_if_fail(XFDASHBOARD_IS_CSS_SELECTOR(self), -1);
g_return_val_if_fail(XFDASHBOARD_IS_STYLABLE(inStylable), -1);
/* Check and score rules */
- return(_xfdashboard_css_selector_score_matching_node(self->priv->rule, inStylable));
+ return(_xfdashboard_css_selector_score_node(self->priv->rule, inStylable));
}
/* Adjust source line and position of this selector to an offset */
diff --git a/libxfdashboard/css-selector.h b/libxfdashboard/css-selector.h
index 78296d4..45779eb 100644
--- a/libxfdashboard/css-selector.h
+++ b/libxfdashboard/css-selector.h
@@ -92,7 +92,7 @@ XfdashboardCssSelector* xfdashboard_css_selector_new_from_scanner_with_priority(
gchar* xfdashboard_css_selector_to_string(XfdashboardCssSelector *self);
-gint xfdashboard_css_selector_score_matching_stylable_node(XfdashboardCssSelector *self, XfdashboardStylable *inStylable);
+gint xfdashboard_css_selector_score(XfdashboardCssSelector *self, XfdashboardStylable *inStylable);
void xfdashboard_css_selector_adjust_to_offset(XfdashboardCssSelector *self, gint inLine, gint inPosition);
diff --git a/libxfdashboard/theme-css.c b/libxfdashboard/theme-css.c
index 2613388..64f758a 100644
--- a/libxfdashboard/theme-css.c
+++ b/libxfdashboard/theme-css.c
@@ -2796,7 +2796,7 @@ GHashTable* xfdashboard_theme_css_get_properties(XfdashboardThemeCSS *self,
selector=(XfdashboardThemeCSSSelector*)entry->data;
if(selector->type==XFDASHBOARD_THEME_CSS_SELECTOR_TYPE_SELECTOR)
{
- score=xfdashboard_css_selector_score_matching_stylable_node(selector->selector, inStylable);
+ score=xfdashboard_css_selector_score(selector->selector, inStylable);
if(score>=0)
{
match=g_slice_new(XfdashboardThemeCSSSelectorMatch);
diff --git a/libxfdashboard/utils.c b/libxfdashboard/utils.c
index cc79b2a..c1b8e85 100644
--- a/libxfdashboard/utils.c
+++ b/libxfdashboard/utils.c
@@ -423,7 +423,7 @@ static gboolean _xfdashboard_traverse_actor_internal(ClutterActor *inActor,
*/
if(XFDASHBOARD_IS_STYLABLE(inActor))
{
- score=xfdashboard_css_selector_score_matching_stylable_node(inSelector, XFDASHBOARD_STYLABLE(inActor));
+ score=xfdashboard_css_selector_score(inSelector, XFDASHBOARD_STYLABLE(inActor));
if(score>=0)
{
doContinueTraversal=(inCallback)(inActor, inUserData);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list