Skip to content

Commit

Permalink
applets: Do not build the path to the menu files
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuj authored and raveit65 committed Feb 23, 2021
1 parent 21f2416 commit 39dd68c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions applets/brightness/brightness-applet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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);
Expand Down
7 changes: 3 additions & 4 deletions applets/inhibit/inhibit-applet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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;
Expand Down

0 comments on commit 39dd68c

Please sign in to comment.