diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2001-02-21 06:06:34 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2001-02-21 06:06:34 +0000 |
commit | 9677e335fc28a304a07cfd13c8e85058b4cd240c (patch) | |
tree | 3321ce75e6578f8a8d43e8d06b07439c300077ca | |
parent | 690b999e959a47aea3bb16e934bed5e7095895f3 (diff) | |
download | nautilus-9677e335fc28a304a07cfd13c8e85058b4cd240c.tar.gz |
fixed bug 6804, resizing sidebar crashes summary view. Fixed by adding a
* libnautilus-extensions/nautilus-tabs.c: (draw_tab_label):
fixed bug 6804, resizing sidebar crashes summary view. Fixed by
adding a check to not draw the label when it's position is past
the right edge of the pixbuf.
* src/nautilus-first-time-druid.c:
had to add an include of signal.h to get this to build for me.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-tabs.c | 27 | ||||
-rw-r--r-- | libnautilus-private/nautilus-tabs.c | 27 | ||||
-rw-r--r-- | src/nautilus-first-time-druid.c | 1 |
4 files changed, 41 insertions, 24 deletions
@@ -1,3 +1,13 @@ +2001-02-20 Andy Hertzfeld <andy@eazel.com> + + * libnautilus-extensions/nautilus-tabs.c: (draw_tab_label): + fixed bug 6804, resizing sidebar crashes summary view. Fixed by + adding a check to not draw the label when it's position is past + the right edge of the pixbuf. + + * src/nautilus-first-time-druid.c: + had to add an include of signal.h to get this to build for me. + 2001-02-20 Eskil Heyn Olsen <eskil@eazel.com> reviewed in part by: Robey Pointer <robey@eazel.com> diff --git a/libnautilus-extensions/nautilus-tabs.c b/libnautilus-extensions/nautilus-tabs.c index 4cbefc11d..451569b02 100644 --- a/libnautilus-extensions/nautilus-tabs.c +++ b/libnautilus-extensions/nautilus-tabs.c @@ -496,33 +496,36 @@ draw_tab_label (NautilusTabs *tabs, GdkPixbuf *tab_pixbuf, int x_pos, const char text_x = x_pos + 1; text_y = 7; /* calculate this to center font in label? */ - - nautilus_scalable_font_draw_text (tabs->details->tab_font, tab_pixbuf, + + /* make sure we can draw at least some of it */ + if (text_x < gdk_pixbuf_get_width (tab_pixbuf)) { + nautilus_scalable_font_draw_text (tabs->details->tab_font, tab_pixbuf, text_x, text_y, NULL, tabs->details->font_size, label, strlen (label), NAUTILUS_RGB_COLOR_BLACK, NAUTILUS_OPACITY_FULLY_OPAQUE); - text_x -= 1; - text_y -= 1; + text_x -= 1; + text_y -= 1; - if (is_active) { - text_color = NAUTILUS_RGB_COLOR_WHITE; - } else { - if (is_prelit) { - text_color = NAUTILUS_RGBA_COLOR_PACK (241, 241, 241, 255); + if (is_active) { + text_color = NAUTILUS_RGB_COLOR_WHITE; } else { - text_color = NAUTILUS_RGBA_COLOR_PACK (223, 223, 223, 255); + if (is_prelit) { + text_color = NAUTILUS_RGBA_COLOR_PACK (241, 241, 241, 255); + } else { + text_color = NAUTILUS_RGBA_COLOR_PACK (223, 223, 223, 255); + } } - } - nautilus_scalable_font_draw_text (tabs->details->tab_font, tab_pixbuf, + nautilus_scalable_font_draw_text (tabs->details->tab_font, tab_pixbuf, text_x, text_y, NULL, tabs->details->font_size, label, strlen (label), text_color, NAUTILUS_OPACITY_FULLY_OPAQUE); + } } /* draw or layout all of the tabs. diff --git a/libnautilus-private/nautilus-tabs.c b/libnautilus-private/nautilus-tabs.c index 4cbefc11d..451569b02 100644 --- a/libnautilus-private/nautilus-tabs.c +++ b/libnautilus-private/nautilus-tabs.c @@ -496,33 +496,36 @@ draw_tab_label (NautilusTabs *tabs, GdkPixbuf *tab_pixbuf, int x_pos, const char text_x = x_pos + 1; text_y = 7; /* calculate this to center font in label? */ - - nautilus_scalable_font_draw_text (tabs->details->tab_font, tab_pixbuf, + + /* make sure we can draw at least some of it */ + if (text_x < gdk_pixbuf_get_width (tab_pixbuf)) { + nautilus_scalable_font_draw_text (tabs->details->tab_font, tab_pixbuf, text_x, text_y, NULL, tabs->details->font_size, label, strlen (label), NAUTILUS_RGB_COLOR_BLACK, NAUTILUS_OPACITY_FULLY_OPAQUE); - text_x -= 1; - text_y -= 1; + text_x -= 1; + text_y -= 1; - if (is_active) { - text_color = NAUTILUS_RGB_COLOR_WHITE; - } else { - if (is_prelit) { - text_color = NAUTILUS_RGBA_COLOR_PACK (241, 241, 241, 255); + if (is_active) { + text_color = NAUTILUS_RGB_COLOR_WHITE; } else { - text_color = NAUTILUS_RGBA_COLOR_PACK (223, 223, 223, 255); + if (is_prelit) { + text_color = NAUTILUS_RGBA_COLOR_PACK (241, 241, 241, 255); + } else { + text_color = NAUTILUS_RGBA_COLOR_PACK (223, 223, 223, 255); + } } - } - nautilus_scalable_font_draw_text (tabs->details->tab_font, tab_pixbuf, + nautilus_scalable_font_draw_text (tabs->details->tab_font, tab_pixbuf, text_x, text_y, NULL, tabs->details->font_size, label, strlen (label), text_color, NAUTILUS_OPACITY_FULLY_OPAQUE); + } } /* draw or layout all of the tabs. diff --git a/src/nautilus-first-time-druid.c b/src/nautilus-first-time-druid.c index 6a4dbae55..84978235e 100644 --- a/src/nautilus-first-time-druid.c +++ b/src/nautilus-first-time-druid.c @@ -49,6 +49,7 @@ #include <libnautilus-extensions/nautilus-stock-dialogs.h> #include <nautilus-main.h> #include <netdb.h> +#include <signal.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> |