summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-26 10:33:54 +0100
committerraveit65 <[email protected]>2021-01-06 13:32:05 +0100
commit9977c91b407f65ad3f3777b984155a35dc880096 (patch)
treecabe624183f698aacad963c1d9bad3cddf659828
parent06292db3c2b9a4ad81c7063c7bcff7cb6c0f927a (diff)
downloadmate-panel-9977c91b407f65ad3f3777b984155a35dc880096.tar.bz2
mate-panel-9977c91b407f65ad3f3777b984155a35dc880096.tar.xz
Variable is reassigned a value before the old one has been used
-rw-r--r--mate-panel/libpanel-util/panel-xdg.c10
-rw-r--r--mate-panel/panel-toplevel.c2
2 files changed, 2 insertions, 10 deletions
diff --git a/mate-panel/libpanel-util/panel-xdg.c b/mate-panel/libpanel-util/panel-xdg.c
index bcdbb5fa..0b7c4c85 100644
--- a/mate-panel/libpanel-util/panel-xdg.c
+++ b/mate-panel/libpanel-util/panel-xdg.c
@@ -117,18 +117,12 @@ panel_xdg_icon_name_from_icon_path (const char *path,
gboolean current;
theme_dir = g_file_get_child (parent, theme_name);
-
- current = FALSE;
- if (g_file_has_prefix (file, theme_dir)) {
- /* it's the current one */
- current = TRUE;
- } else {
- /* it's the default one */
+ if ((current = g_file_has_prefix (file, theme_dir)) == FALSE) {
+ /* fallback icon theme? */
g_object_unref (theme_dir);
theme_dir = g_file_get_child (parent, DEFAULT_THEME_NAME);
current = g_file_has_prefix (file, theme_dir);
}
-
g_object_unref (theme_dir);
if (current) {
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index 58bcf86a..53330100 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -773,7 +773,6 @@ static void panel_toplevel_move_to(PanelToplevel* toplevel, int new_x, int new_y
y = new_y - panel_multimonitor_y (new_monitor);
if (toplevel->priv->orientation & PANEL_HORIZONTAL_MASK) {
- y_centered = FALSE;
if (new_y <= display_min.y + snap_tolerance ||
new_y + height >= display_max.y - snap_tolerance)
x_centered = abs (x - ((monitor_geom.width - width) / 2))
@@ -781,7 +780,6 @@ static void panel_toplevel_move_to(PanelToplevel* toplevel, int new_x, int new_y
else
x_centered = FALSE;
} else {
- x_centered = FALSE;
if (new_x <= display_min.x + snap_tolerance ||
new_x + width >= display_max.x - snap_tolerance)
y_centered = abs (y - ((monitor_geom.height - height) / 2))