aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/shortcut-bar
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-02-07 23:21:45 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-02-07 23:21:45 +0800
commitf42a342f8762fb016b842919e9bf322bda6494b3 (patch)
tree1098bf80af49cabe0c3d450d604dc3381361f587 /widgets/shortcut-bar
parent99d71d11328fa1f6d2f0156de63a44142cf99d9c (diff)
downloadgsoc2013-evolution-f42a342f8762fb016b842919e9bf322bda6494b3.tar
gsoc2013-evolution-f42a342f8762fb016b842919e9bf322bda6494b3.tar.gz
gsoc2013-evolution-f42a342f8762fb016b842919e9bf322bda6494b3.tar.bz2
gsoc2013-evolution-f42a342f8762fb016b842919e9bf322bda6494b3.tar.lz
gsoc2013-evolution-f42a342f8762fb016b842919e9bf322bda6494b3.tar.xz
gsoc2013-evolution-f42a342f8762fb016b842919e9bf322bda6494b3.tar.zst
gsoc2013-evolution-f42a342f8762fb016b842919e9bf322bda6494b3.zip
finished.
2000-02-07 Damon Chaplin <damon@helixcode.com> * widgets/shortcut-bar/e-group-bar.c (e_group_bar_draw): finished. * widgets/shortcut-bar/e-icon-bar.c (e_icon_bar_item_released): check that an item was pressed. svn path=/trunk/; revision=1684
Diffstat (limited to 'widgets/shortcut-bar')
-rw-r--r--widgets/shortcut-bar/e-group-bar.c20
-rw-r--r--widgets/shortcut-bar/e-icon-bar.c3
2 files changed, 11 insertions, 12 deletions
diff --git a/widgets/shortcut-bar/e-group-bar.c b/widgets/shortcut-bar/e-group-bar.c
index 603aa6f78f..ac3a8d62ab 100644
--- a/widgets/shortcut-bar/e-group-bar.c
+++ b/widgets/shortcut-bar/e-group-bar.c
@@ -582,15 +582,11 @@ e_group_bar_draw (GtkWidget *widget,
EGroupBar *group_bar;
EGroupBarChild *group;
gint group_num;
-#if 0
GdkRectangle child_area;
-#endif
+
g_return_if_fail (widget != NULL);
g_return_if_fail (E_IS_GROUP_BAR (widget));
- g_print ("In e_group_bar_draw %i,%i %ix%i\n", area->x, area->y,
- area->width, area->height);
-
if (GTK_WIDGET_DRAWABLE (widget)) {
group_bar = E_GROUP_BAR (widget);
@@ -599,12 +595,14 @@ e_group_bar_draw (GtkWidget *widget,
group_num++) {
group = &g_array_index (group_bar->children,
EGroupBarChild, group_num);
- /* FIXME */
-#if 0
- if (GTK_WIDGET_DRAWABLE (child->widget) &&
- gtk_widget_intersect (child->widget, area, &child_area))
- gtk_widget_draw (child->widget, &child_area);
-#endif
+
+ if (GTK_WIDGET_DRAWABLE (group->button)
+ && gtk_widget_intersect (group->button, area, &child_area))
+ gtk_widget_draw (group->button, &child_area);
+
+ if (GTK_WIDGET_DRAWABLE (group->child)
+ && gtk_widget_intersect (group->child, area, &child_area))
+ gtk_widget_draw (group->child, &child_area);
}
}
}
diff --git a/widgets/shortcut-bar/e-icon-bar.c b/widgets/shortcut-bar/e-icon-bar.c
index e9643dc451..04c0c83e6f 100644
--- a/widgets/shortcut-bar/e-icon-bar.c
+++ b/widgets/shortcut-bar/e-icon-bar.c
@@ -962,7 +962,8 @@ e_icon_bar_item_released (EIconBar *icon_bar,
button = event->button.button;
if (button == 1) {
- if (icon_bar->pressed_item_num == icon_bar->mouse_over_item_num) {
+ if (icon_bar->pressed_item_num != -1
+ && icon_bar->pressed_item_num == icon_bar->mouse_over_item_num) {
gtk_signal_emit (GTK_OBJECT (icon_bar),
e_icon_bar_signals[ITEM_SELECTED],
event, item_num);