mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
1999-01-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (reload_desktop_icons): Reload the icon image for a file that already exists in the desktop, because it may have changed. * gdesktop-icon.c (desktop_icon_reshape): Center the text correctly if the user is using huge icons.
This commit is contained in:
parent
3bc60d00b2
commit
4ef71a33c2
@ -1,3 +1,12 @@
|
||||
1999-01-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdesktop.c (reload_desktop_icons): Reload the icon image for a
|
||||
file that already exists in the desktop, because it may have
|
||||
changed.
|
||||
|
||||
* gdesktop-icon.c (desktop_icon_reshape): Center the text
|
||||
correctly if the user is using huge icons.
|
||||
|
||||
Mon Feb 1 00:49:18 1999 Timur Bakeyev <mc@bat.ru>
|
||||
|
||||
* gscreen.c (panel_configure_file_list): Add central justification,
|
||||
|
@ -401,7 +401,14 @@ desktop_icon_reshape (DesktopIcon *dicon)
|
||||
"y2", (double) icon_height,
|
||||
NULL);
|
||||
|
||||
gnome_icon_text_item_setxy (GNOME_ICON_TEXT_ITEM (dicon->text), 0, icon_height + SPACING);
|
||||
if (dicon->width <= DESKTOP_SNAP_X)
|
||||
gnome_icon_text_item_setxy (GNOME_ICON_TEXT_ITEM (dicon->text),
|
||||
0,
|
||||
icon_height + SPACING);
|
||||
else
|
||||
gnome_icon_text_item_setxy (GNOME_ICON_TEXT_ITEM (dicon->text),
|
||||
(dicon->width - DESKTOP_SNAP_X) / 2,
|
||||
icon_height + SPACING);
|
||||
|
||||
/* Create and set the window shape */
|
||||
|
||||
|
@ -348,12 +348,12 @@ reload_desktop_icons (int xpos, int ypos)
|
||||
GSList *need_position_list, *sl;
|
||||
GList *all_icons, *l;
|
||||
char *desktop_url;
|
||||
|
||||
|
||||
dir = mc_opendir (desktop_directory);
|
||||
if (!dir) {
|
||||
message (FALSE,
|
||||
_("Warning"),
|
||||
_("Could not open %s; will not have initial desktop icons"),
|
||||
_("Could not open %s; will not have desktop icons"),
|
||||
desktop_directory);
|
||||
return;
|
||||
}
|
||||
@ -379,7 +379,23 @@ reload_desktop_icons (int xpos, int ypos)
|
||||
|
||||
l = icon_exists_in_list (all_icons, dirent->d_name);
|
||||
if (l) {
|
||||
all_icons = g_list_remove_link (all_icons, l);
|
||||
GdkImlibImage *im;
|
||||
file_entry *fe;
|
||||
|
||||
/* Reload the icon for this file, as it may have changed */
|
||||
|
||||
full_name = g_concat_dir_and_file (desktop_directory, dirent->d_name);
|
||||
fe = file_entry_from_file (full_name);
|
||||
im = gicon_get_icon_for_file_speed (desktop_directory, fe, FALSE);
|
||||
file_entry_free (fe);
|
||||
g_free (full_name);
|
||||
|
||||
dii = l->data;
|
||||
desktop_icon_set_icon (dii->dicon, im);
|
||||
|
||||
/* Leave the icon in the desktop by removing it from the list */
|
||||
|
||||
all_icons = g_list_remove_link (all_icons, l);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -388,7 +404,7 @@ reload_desktop_icons (int xpos, int ypos)
|
||||
|
||||
if (!gnome_metadata_get (full_name, "desktop-url", &size, &desktop_url))
|
||||
desktop_url = NULL;
|
||||
|
||||
|
||||
if (have_pos) {
|
||||
dii = desktop_icon_info_new (dirent->d_name, desktop_url, FALSE, x, y);
|
||||
gtk_widget_show (dii->dicon);
|
||||
@ -400,7 +416,7 @@ reload_desktop_icons (int xpos, int ypos)
|
||||
fau = g_new (file_and_url_t, 1);
|
||||
fau->filename = g_strdup (dirent->d_name);
|
||||
fau->url = g_strdup (desktop_url);
|
||||
|
||||
|
||||
need_position_list = g_slist_prepend (need_position_list, fau);
|
||||
}
|
||||
|
||||
@ -435,7 +451,7 @@ reload_desktop_icons (int xpos, int ypos)
|
||||
|
||||
for (sl = need_position_list; sl; sl = sl->next) {
|
||||
file_and_url_t *fau = sl->data;
|
||||
|
||||
|
||||
dii = desktop_icon_info_new (fau->filename, fau->url, TRUE, xpos, ypos);
|
||||
gtk_widget_show (dii->dicon);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user