Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
xfce4-whiskermenu-plugin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Custom Issue Tracker
Custom Issue Tracker
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Panel Plugins
xfce4-whiskermenu-plugin
Commits
02903f3a
Commit
02903f3a
authored
Feb 21, 2020
by
Graeme Gott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loading incorrect icons for some applications.
parent
f074d786
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
panel-plugin/category.cpp
panel-plugin/category.cpp
+1
-1
panel-plugin/element.cpp
panel-plugin/element.cpp
+6
-4
panel-plugin/element.h
panel-plugin/element.h
+1
-1
No files found.
panel-plugin/category.cpp
View file @
02903f3a
...
...
@@ -49,7 +49,7 @@ Category::Category(GarconMenu* menu) :
{
text
=
_
(
"All Applications"
);
}
set_icon
(
!
exo_str_is_empty
(
icon
)
?
icon
:
"applications-other"
);
set_icon
(
!
exo_str_is_empty
(
icon
)
?
icon
:
"applications-other"
,
true
);
set_text
(
text
?
text
:
""
);
set_tooltip
(
tooltip
?
tooltip
:
""
);
}
...
...
panel-plugin/element.cpp
View file @
02903f3a
...
...
@@ -21,7 +21,7 @@ using namespace WhiskerMenu;
//-----------------------------------------------------------------------------
void
Element
::
set_icon
(
const
gchar
*
icon
)
void
Element
::
set_icon
(
const
gchar
*
icon
,
bool
use_fallbacks
)
{
if
(
m_icon
)
{
...
...
@@ -34,12 +34,14 @@ void Element::set_icon(const gchar* icon)
return
;
}
auto
themed_icon_new
=
use_fallbacks
?
&
g_themed_icon_new_with_default_fallbacks
:
&
g_themed_icon_new
;
if
(
!
g_path_is_absolute
(
icon
))
{
const
gchar
*
pos
=
g_strrstr
(
icon
,
"."
);
if
(
!
pos
)
{
m_icon
=
g_themed_icon_new_with_default_fallbacks
(
icon
);
m_icon
=
themed_icon_new
(
icon
);
}
else
{
...
...
@@ -50,12 +52,12 @@ void Element::set_icon(const gchar* icon)
||
(
g_strcmp0
(
suffix
,
".svgz"
)
==
0
))
{
gchar
*
name
=
g_strndup
(
icon
,
pos
-
icon
);
m_icon
=
g_themed_icon_new_with_default_fallbacks
(
name
);
m_icon
=
themed_icon_new
(
name
);
g_free
(
name
);
}
else
{
m_icon
=
g_themed_icon_new_with_default_fallbacks
(
icon
);
m_icon
=
themed_icon_new
(
icon
);
}
g_free
(
suffix
);
}
...
...
panel-plugin/element.h
View file @
02903f3a
...
...
@@ -79,7 +79,7 @@ public:
protected:
Element
()
=
default
;
void
set_icon
(
const
gchar
*
icon
);
void
set_icon
(
const
gchar
*
icon
,
bool
use_fallbacks
=
false
);
void
set_text
(
const
gchar
*
text
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment