diff options
author | Damon Chaplin <damon@helixcode.com> | 2000-09-30 23:17:12 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2000-09-30 23:17:12 +0800 |
commit | 3f23fba5e0ed7efd438c57db2e2e6ae30c7cdaa1 (patch) | |
tree | 9d58f7f4ddda2cddf31ae57d9d10c52465891d4c /widgets/shortcut-bar/e-icon-bar-bg-item.c | |
parent | 024c4bee0a0c289ae6f9ad2d5b9370df10ce291b (diff) | |
download | gsoc2013-evolution-3f23fba5e0ed7efd438c57db2e2e6ae30c7cdaa1.tar gsoc2013-evolution-3f23fba5e0ed7efd438c57db2e2e6ae30c7cdaa1.tar.gz gsoc2013-evolution-3f23fba5e0ed7efd438c57db2e2e6ae30c7cdaa1.tar.bz2 gsoc2013-evolution-3f23fba5e0ed7efd438c57db2e2e6ae30c7cdaa1.tar.lz gsoc2013-evolution-3f23fba5e0ed7efd438c57db2e2e6ae30c7cdaa1.tar.xz gsoc2013-evolution-3f23fba5e0ed7efd438c57db2e2e6ae30c7cdaa1.tar.zst gsoc2013-evolution-3f23fba5e0ed7efd438c57db2e2e6ae30c7cdaa1.zip |
updated to use new EShortcutBar signals for DnD.
2000-09-30 Damon Chaplin <damon@helixcode.com>
* test-shortcut-bar.c: updated to use new EShortcutBar signals for DnD.
* e-group-bar.c (e_group_bar_add_group): show the new windows if the
EGroupBar is realized, handle the position argument properly, and
fixed the window z-order code.
* e-shortcut-bar.c (e_shortcut_bar_add_group): pass group_num to the
e_group_bar_add_group() function.
* e-icon-bar-bg-item.c (e_icon_bar_bg_item_draw): fixed SEGV when
trying to drag into a group with no items.
svn path=/trunk/; revision=5643
Diffstat (limited to 'widgets/shortcut-bar/e-icon-bar-bg-item.c')
-rw-r--r-- | widgets/shortcut-bar/e-icon-bar-bg-item.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/widgets/shortcut-bar/e-icon-bar-bg-item.c b/widgets/shortcut-bar/e-icon-bar-bg-item.c index 5154a38267..26da038a6e 100644 --- a/widgets/shortcut-bar/e-icon-bar-bg-item.c +++ b/widgets/shortcut-bar/e-icon-bar-bg-item.c @@ -234,15 +234,23 @@ e_icon_bar_bg_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, bar_y = 0; } else { /* We need to draw the bar after the last item. */ - item = &g_array_index (icon_bar->items, EIconBarItem, - icon_bar->items->len - 1); - bar_y = item->item_height + icon_bar->spacing; + if (icon_bar->items->len != 0) { + item = &g_array_index (icon_bar->items, + EIconBarItem, + icon_bar->items->len - 1); + bar_y = item->item_height + icon_bar->spacing; + } else { + item = NULL; + bar_y = icon_bar->spacing; + } } - if (icon_bar->view_type == E_ICON_BAR_LARGE_ICONS) { - bar_y += item->icon_y; - } else { - bar_y += MIN (item->icon_y, item->text_y); + if (item) { + if (icon_bar->view_type == E_ICON_BAR_LARGE_ICONS) { + bar_y += item->icon_y; + } else { + bar_y += MIN (item->icon_y, item->text_y); + } } bar_y -= y + icon_bar->spacing / 2; |