summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-02-03 12:58:10 +0100
committerraveit65 <[email protected]>2021-02-23 20:49:19 +0100
commit39dd68c577930ea397ff80477b4ad50b7989a8d3 (patch)
tree91178e12e1da0c7f3922832c2031a430ecee1378 /applets
parent21f2416d93ab4da2f4eb85370d88c58f896400bc (diff)
downloadmate-power-manager-39dd68c577930ea397ff80477b4ad50b7989a8d3.tar.bz2
mate-power-manager-39dd68c577930ea397ff80477b4ad50b7989a8d3.tar.xz
applets: Do not build the path to the menu files
Diffstat (limited to 'applets')
-rw-r--r--applets/brightness/brightness-applet.c7
-rw-r--r--applets/inhibit/inhibit-applet.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/applets/brightness/brightness-applet.c b/applets/brightness/brightness-applet.c
index e603d31..e2891da 100644
--- a/applets/brightness/brightness-applet.c
+++ b/applets/brightness/brightness-applet.c
@@ -1075,7 +1075,6 @@ gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
{
GpmBrightnessApplet *applet = GPM_BRIGHTNESS_APPLET(_applet);
GtkActionGroup *action_group;
- gchar *ui_path;
static const GtkActionEntry menu_actions [] = {
{ "About", "help-about", N_("_About"),
@@ -1096,9 +1095,9 @@ gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
menu_actions,
G_N_ELEMENTS (menu_actions),
applet);
- ui_path = g_build_filename (BRIGHTNESS_MENU_UI_DIR, "brightness-applet-menu.xml", NULL);
- mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (applet), ui_path, action_group);
- g_free (ui_path);
+ mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (applet),
+ BRIGHTNESS_MENU_UI_DIR "/brightness-applet-menu.xml",
+ action_group);
g_object_unref (action_group);
gpm_applet_draw_cb (applet);
diff --git a/applets/inhibit/inhibit-applet.c b/applets/inhibit/inhibit-applet.c
index 849ff7c..8daf645 100644
--- a/applets/inhibit/inhibit-applet.c
+++ b/applets/inhibit/inhibit-applet.c
@@ -497,7 +497,6 @@ gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
{
GpmInhibitApplet *applet = GPM_INHIBIT_APPLET(_applet);
GtkActionGroup *action_group;
- gchar *ui_path;
static const GtkActionEntry menu_actions [] = {
{ "About", "help-about", N_("_About"),
@@ -518,9 +517,9 @@ gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
menu_actions,
G_N_ELEMENTS (menu_actions),
applet);
- ui_path = g_build_filename (INHIBIT_MENU_UI_DIR, "inhibit-applet-menu.xml", NULL);
- mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (applet), ui_path, action_group);
- g_free (ui_path);
+ mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (applet),
+ INHIBIT_MENU_UI_DIR "/inhibit-applet-menu.xml",
+ action_group);
g_object_unref (action_group);
return TRUE;