Skip to content

Commit 2631577

Browse files
yetistraveit65
authored andcommitted
Support new mate-menus api
1 parent 10b2021 commit 2631577

File tree

7 files changed

+306
-249
lines changed

7 files changed

+306
-249
lines changed

‎mate-panel/drawer-private.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void load_drawer_applet (char *toplevel_id,
133133
const char *id);
134134

135135
static void panel_drawer_prepare (const char *drawer_id,
136-
const char *custom_icon,
136+
GIcon *custom_icon,
137137
gboolean use_custom_icon,
138138
const char *tooltip,
139139
char **attached_toplevel_id);

‎mate-panel/drawer.c‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ load_drawer_applet (char *toplevel_id,
568568

569569
static void
570570
panel_drawer_prepare (const char *drawer_id,
571-
const char *custom_icon,
571+
GIcon *custom_icon,
572572
gboolean use_custom_icon,
573573
const char *tooltip,
574574
char **attached_toplevel_id)
@@ -587,7 +587,10 @@ panel_drawer_prepare (const char *drawer_id,
587587
g_settings_set_boolean (settings, PANEL_OBJECT_USE_CUSTOM_ICON_KEY, use_custom_icon);
588588

589589
if (custom_icon) {
590-
g_settings_set_string (settings, PANEL_OBJECT_CUSTOM_ICON_KEY, custom_icon);
590+
gchar *icon_name;
591+
icon_name = g_icon_to_string(custom_icon);
592+
g_settings_set_string (settings, PANEL_OBJECT_CUSTOM_ICON_KEY, icon_name);
593+
g_free(icon_name);
591594
}
592595

593596
if (attached_toplevel_id) {
@@ -618,7 +621,7 @@ panel_drawer_prepare (const char *drawer_id,
618621
void
619622
panel_drawer_create (PanelToplevel *toplevel,
620623
int position,
621-
const char *custom_icon,
624+
GIcon *custom_icon,
622625
gboolean use_custom_icon,
623626
const char *tooltip)
624627
{
@@ -636,7 +639,7 @@ panel_drawer_create (PanelToplevel *toplevel,
636639
char *
637640
panel_drawer_create_with_id (const char *toplevel_id,
638641
int position,
639-
const char *custom_icon,
642+
GIcon *custom_icon,
640643
gboolean use_custom_icon,
641644
const char *tooltip)
642645
{

‎mate-panel/drawer.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ typedef struct {
2525

2626
void panel_drawer_create (PanelToplevel *toplevel,
2727
int position,
28-
const char *custom_icon,
28+
GIcon *custom_icon,
2929
gboolean use_custom_icon,
3030
const char *tooltip);
3131

3232
char *panel_drawer_create_with_id (const char *toplevel_id,
3333
int position,
34-
const char *custom_icon,
34+
GIcon *custom_icon,
3535
gboolean use_custom_icon,
3636
const char *tooltip);
3737

0 commit comments

Comments
 (0)