summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2024-04-22 15:44:57 -0400
committerVictor Kareh <[email protected]>2024-05-08 06:53:36 -0400
commitfa1319314ffc81307d8dd80469d8012fec343472 (patch)
tree3b16693b10ee6c7007f3722e4aeafb73b14b79de
parentd45586734d1f60a4f280ac810556f2aa3c48910d (diff)
downloadmate-panel-fa1319314ffc81307d8dd80469d8012fec343472.tar.bz2
mate-panel-fa1319314ffc81307d8dd80469d8012fec343472.tar.xz
wncklet: Remove icon loader function from window list applet
This function only loads the icon during the startup-notification, at which point it gets replaced by the actual icon read in libwnck. Moving forward the loading function should become part of libwnck.
-rw-r--r--applets/wncklet/window-list.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index a87649b1..bc52b1a6 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -781,55 +781,6 @@ static void applet_size_allocate(GtkWidget *widget, GtkAllocation *allocation, T
mate_panel_applet_set_size_hints(MATE_PANEL_APPLET(tasklist->applet), size_hints, len, 0);
}
-#ifdef HAVE_X11
-/* Currently only used on X11, but should work on Wayland as well when needed */
-static GdkPixbuf* icon_loader_func(const char* icon, int size, unsigned int flags, void* data)
-{
- TasklistData* tasklist;
- GdkPixbuf* retval;
- char* icon_no_extension;
- char* p;
-
- tasklist = data;
-
- if (icon == NULL || strcmp(icon, "") == 0)
- return NULL;
-
- if (g_path_is_absolute(icon))
- {
- if (g_file_test(icon, G_FILE_TEST_EXISTS))
- {
- return gdk_pixbuf_new_from_file_at_size(icon, size, size, NULL);
- }
- else
- {
- char* basename;
-
- basename = g_path_get_basename(icon);
- retval = icon_loader_func(basename, size, flags, data);
- g_free(basename);
-
- return retval;
- }
- }
-
- /* This is needed because some .desktop files have an icon name *and*
- * an extension as icon */
- icon_no_extension = g_strdup(icon);
- p = strrchr(icon_no_extension, '.');
-
- if (p && (strcmp(p, ".png") == 0 || strcmp(p, ".xpm") == 0 || strcmp(p, ".svg") == 0))
- {
- *p = 0;
- }
-
- retval = gtk_icon_theme_load_icon(tasklist->icon_theme, icon_no_extension, size, 0, NULL);
- g_free(icon_no_extension);
-
- return retval;
-}
-#endif /* HAVE_X11 */
-
gboolean window_list_applet_fill(MatePanelApplet* applet)
{
TasklistData* tasklist;
@@ -898,8 +849,6 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
{
tasklist->tasklist = wnck_tasklist_new();
- wnck_tasklist_set_icon_loader(WNCK_TASKLIST(tasklist->tasklist), icon_loader_func, tasklist, NULL);
-
#ifdef HAVE_WINDOW_PREVIEWS
g_signal_connect (tasklist->tasklist, "task-enter-notify",
G_CALLBACK (applet_enter_notify_event),