Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xfce4-power-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xfce
xfce4-power-manager
Commits
6e9c6ef3
Commit
6e9c6ef3
authored
5 years ago
by
Simon Steinbeiss
Browse files
Options
Downloads
Patches
Plain Diff
Disable trayicon when panel plugin is present (Bug #15682)
parent
b08b7b3a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
panel-plugins/power-manager-plugin/xfce/xfce-power-manager-plugin.c
+9
-1
9 additions, 1 deletion
...ins/power-manager-plugin/xfce/xfce-power-manager-plugin.c
with
9 additions
and
1 deletion
panel-plugins/power-manager-plugin/xfce/xfce-power-manager-plugin.c
+
9
−
1
View file @
6e9c6ef3
...
...
@@ -223,6 +223,7 @@ static PowerManagerPlugin *
power_manager_plugin_new
(
XfcePanelPlugin
*
plugin
)
{
PowerManagerPlugin
*
power_manager_plugin
;
XfconfChannel
*
channel
;
/* allocate memory for the plugin structure */
power_manager_plugin
=
panel_slice_new0
(
PowerManagerPlugin
);
...
...
@@ -237,7 +238,14 @@ power_manager_plugin_new (XfcePanelPlugin *plugin)
power_manager_plugin
->
power_manager_button
=
power_manager_button_new
(
plugin
);
gtk_container_add
(
GTK_CONTAINER
(
power_manager_plugin
->
ebox
),
power_manager_plugin
->
power_manager_button
);
power_manager_button_show
(
POWER_MANAGER_BUTTON
(
power_manager_plugin
->
power_manager_button
));
power_manager_button_show
(
POWER_MANAGER_BUTTON
(
power_manager_plugin
->
power_manager_button
));
/* disable the systray item when the plugin is started, allowing the user to
later manually enable it, e.g. for testing purposes. */
channel
=
xfconf_channel_get
(
XFPM_CHANNEL
);
if
(
xfconf_channel_get_bool
(
channel
,
"/xfce4-power-manager/show-tray-icon"
,
TRUE
))
g_warning
(
"Xfce4-power-manager: The panel plugin is present, so the tray icon gets disabled."
);
xfconf_channel_set_bool
(
channel
,
"/xfce4-power-manager/show-tray-icon"
,
FALSE
);
return
power_manager_plugin
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment