1998-05-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtrans.c (set_window_text): Made it use the new GnomeIconTextInfo functions. 1998-05-18 Federico Mena Quintero <federico@nuclecu.unam.mx> * gscreen.c (panel_create_icon_display): Set some good separator characters for the file icon list.
Этот коммит содержится в:
родитель
fced018e54
Коммит
9c120a91b0
@ -1,3 +1,13 @@
|
|||||||
|
1998-05-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtrans.c (set_window_text): Made it use the new
|
||||||
|
GnomeIconTextInfo functions.
|
||||||
|
|
||||||
|
1998-05-18 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gscreen.c (panel_create_icon_display): Set some good separator
|
||||||
|
characters for the file icon list.
|
||||||
|
|
||||||
1998-05-20 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
1998-05-20 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gprop.c (perm_owner_new): Forget about history for now.
|
* gprop.c (perm_owner_new): Forget about history for now.
|
||||||
|
@ -1245,6 +1245,7 @@ panel_create_icon_display (WPanel *panel)
|
|||||||
GnomeIconList *icon_field;
|
GnomeIconList *icon_field;
|
||||||
|
|
||||||
icon_field = GNOME_ICON_LIST (gnome_icon_list_new ());
|
icon_field = GNOME_ICON_LIST (gnome_icon_list_new ());
|
||||||
|
gnome_icon_list_set_separators (icon_field, " /-_.");
|
||||||
|
|
||||||
gnome_icon_list_set_selection_mode (icon_field, GTK_SELECTION_MULTIPLE);
|
gnome_icon_list_set_selection_mode (icon_field, GTK_SELECTION_MULTIPLE);
|
||||||
|
|
||||||
|
@ -18,12 +18,6 @@ int want_transparent_icons = 1;
|
|||||||
int want_transparent_text = 0;
|
int want_transparent_text = 0;
|
||||||
|
|
||||||
|
|
||||||
/* Most of the word-wrapping code was yanked from the gtktooltips
|
|
||||||
* module in Gtk+. I have tweaked it a bit for MC's purposes
|
|
||||||
* - Federico
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_window_text (GtkWidget *window, GdkImlibImage *im, char *text)
|
set_window_text (GtkWidget *window, GdkImlibImage *im, char *text)
|
||||||
{
|
{
|
||||||
@ -31,12 +25,12 @@ set_window_text (GtkWidget *window, GdkImlibImage *im, char *text)
|
|||||||
GdkPixmap *im_pixmap;
|
GdkPixmap *im_pixmap;
|
||||||
GdkBitmap *mask;
|
GdkBitmap *mask;
|
||||||
GdkBitmap *im_mask;
|
GdkBitmap *im_mask;
|
||||||
struct gnome_icon_text_info *ti;
|
GnomeIconTextInfo *ti;
|
||||||
GdkColor color;
|
GdkColor color;
|
||||||
GdkGC *p_gc, *m_gc;
|
GdkGC *p_gc, *m_gc;
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
ti = gnome_icon_layout_text (window->style->font, text, " /-_.", SNAP_X, FALSE);
|
ti = gnome_icon_layout_text (window->style->font, text, " /.-_", SNAP_X, FALSE);
|
||||||
|
|
||||||
width = MAX (ti->width, im->rgb_width);
|
width = MAX (ti->width, im->rgb_width);
|
||||||
height = im->rgb_height + SPACING + ti->height;
|
height = im->rgb_height + SPACING + ti->height;
|
||||||
@ -150,16 +144,14 @@ set_window_text (GtkWidget *window, GdkImlibImage *im, char *text)
|
|||||||
gdk_gc_set_foreground (m_gc, &color);
|
gdk_gc_set_foreground (m_gc, &color);
|
||||||
gnome_icon_paint_text (ti, mask, m_gc,
|
gnome_icon_paint_text (ti, mask, m_gc,
|
||||||
(width - ti->width) / 2,
|
(width - ti->width) / 2,
|
||||||
im->rgb_height + SPACING,
|
im->rgb_height + SPACING);
|
||||||
ti->width);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_color_white (gdk_imlib_get_colormap (), &color);
|
gdk_color_white (gdk_imlib_get_colormap (), &color);
|
||||||
gdk_gc_set_foreground (p_gc, &color);
|
gdk_gc_set_foreground (p_gc, &color);
|
||||||
gnome_icon_paint_text (ti, pixmap, p_gc,
|
gnome_icon_paint_text (ti, pixmap, p_gc,
|
||||||
(width - ti->width) / 2,
|
(width - ti->width) / 2,
|
||||||
im->rgb_height + SPACING,
|
im->rgb_height + SPACING);
|
||||||
ti->width);
|
|
||||||
|
|
||||||
/* Set contents of window */
|
/* Set contents of window */
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user