Commit 16ab778b authored by Jannis Pohlmann's avatar Jannis Pohlmann

Move away from using a hard-coded size for window icons (bug #8626).

The previous commit wasn't actually related to this bug. The problem
here was that the xfwm4 tab window now allows themes to change the size
of the displayed window icons but Thunar still hard-coded its own window
icons to 48px.

From this commit Thunar on uses thunar_file_get_icon_name(current_dir)
to get an icon name for the current directory and and then calls
gtk_window_set_icon_name() rather than asking ThunarIconFactory for a
48px GdkPixbuf that cannot be scaled up nicely. This is ok because we
only ever set icons for directories and for those ThunarIconFactory
never returns anything but a GdkPixbuf based on an icon name anyway. It
never returns a GdkPixbuf loaded from an absolute path or anything.
parent 096f3b6e
- Add a 64x64 and 128x128 icon for Thunar (bug #8626).
- Add a 64x64 and 128x128 icon for Thunar.
- Move away from the hard-coded size of window icons (bug #8626).
......@@ -2399,9 +2399,10 @@ static void
thunar_window_current_directory_changed (ThunarFile *current_directory,
ThunarWindow *window)
GtkAction *action;
GdkPixbuf *icon;
gchar *title;
GtkIconTheme *icon_theme;
GtkAction *action;
gchar *icon_name;
gchar *title;
_thunar_return_if_fail (THUNAR_IS_WINDOW (window));
_thunar_return_if_fail (THUNAR_IS_FILE (current_directory));
......@@ -2418,12 +2419,12 @@ thunar_window_current_directory_changed (ThunarFile *current_directory,
g_free (title);
/* set window icon */
icon = thunar_icon_factory_load_file_icon (window->icon_factory, current_directory, THUNAR_FILE_ICON_STATE_DEFAULT, 48);
if (G_LIKELY (icon != NULL))
gtk_window_set_icon (GTK_WINDOW (window), icon);
g_object_unref (G_OBJECT (icon));
icon_theme = gtk_icon_theme_get_default ();
icon_name = thunar_file_get_icon_name (current_directory,
gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
g_free (icon_name);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment