diff options
author | Victor Kareh <[email protected]> | 2018-07-25 12:39:14 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-07-28 11:28:21 +0200 |
commit | 19bfc3da12cf08c50b738c9d37b046b305aed142 (patch) | |
tree | a35277beacd1fe5ffc31e574869f558b4a53ddca | |
parent | ae885fb09c175a26a1a8abcb29df79b7d2134807 (diff) | |
download | mate-panel-19bfc3da12cf08c50b738c9d37b046b305aed142.tar.bz2 mate-panel-19bfc3da12cf08c50b738c9d37b046b305aed142.tar.xz |
applets: Fix runtime error messages
-rw-r--r-- | applets/notification_area/status-notifier/sn-item-v0.c | 2 | ||||
-rw-r--r-- | applets/wncklet/workspace-switcher.c | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c index 46a4c064..509b153e 100644 --- a/applets/notification_area/status-notifier/sn-item-v0.c +++ b/applets/notification_area/status-notifier/sn-item-v0.c @@ -256,7 +256,7 @@ update (SnItemV0 *v0) if (!pixbuf){ /*try to find icons specified by path and filename*/ pixbuf = gdk_pixbuf_new_from_file(v0->icon_name, NULL); - if (pixbuf){ + if (pixbuf && icon_size > 1) { /*An icon specified by path and filename may be the wrong size for the tray */ pixbuf=gdk_pixbuf_scale_simple(pixbuf, icon_size-2, icon_size-2,GDK_INTERP_BILINEAR); } diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c index 2a13cebe..35664db5 100644 --- a/applets/wncklet/workspace-switcher.c +++ b/applets/wncklet/workspace-switcher.c @@ -120,7 +120,8 @@ static void update_properties_for_wm(PagerData* pager) gtk_widget_show(pager->workspace_names_scroll); if (pager->display_workspaces_toggle) gtk_widget_show(pager->display_workspaces_toggle); - g_object_set (pager->cell, "editable", TRUE, NULL); + if (pager->cell) + g_object_set (pager->cell, "editable", TRUE, NULL); break; case PAGER_WM_METACITY: if (pager->workspaces_frame) @@ -131,7 +132,8 @@ static void update_properties_for_wm(PagerData* pager) gtk_widget_show(pager->workspace_names_scroll); if (pager->display_workspaces_toggle) gtk_widget_show(pager->display_workspaces_toggle); - g_object_set (pager->cell, "editable", TRUE, NULL); + if (pager->cell) + g_object_set (pager->cell, "editable", TRUE, NULL); break; case PAGER_WM_I3: if (pager->workspaces_frame) @@ -144,7 +146,8 @@ static void update_properties_for_wm(PagerData* pager) gtk_widget_hide(pager->workspace_names_scroll); if (pager->display_workspaces_toggle) gtk_widget_show(pager->display_workspaces_toggle); - g_object_set (pager->cell, "editable", FALSE, NULL); + if (pager->cell) + g_object_set (pager->cell, "editable", FALSE, NULL); break; case PAGER_WM_COMPIZ: if (pager->workspaces_frame) @@ -155,7 +158,8 @@ static void update_properties_for_wm(PagerData* pager) gtk_widget_hide(pager->workspace_names_scroll); if (pager->display_workspaces_toggle) gtk_widget_hide(pager->display_workspaces_toggle); - g_object_set (pager->cell, "editable", FALSE, NULL); + if (pager->cell) + g_object_set (pager->cell, "editable", FALSE, NULL); break; case PAGER_WM_UNKNOWN: if (pager->workspaces_frame) |