From 613453b1095e325149b8d37e5731d415e1d5f9bd Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 31 Oct 2002 21:30:57 +0000 Subject: merging the gal-2 branch back to the trunk. merging the gal-2 branch back to the trunk. svn path=/trunk/; revision=18471 --- widgets/misc/e-popup-menu.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'widgets/misc/e-popup-menu.c') diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c index 1ce38c4d02..1cfae2da63 100644 --- a/widgets/misc/e-popup-menu.c +++ b/widgets/misc/e-popup-menu.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-popup-menu.c * Copyright 2000, 2001, Ximian, Inc. * @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -32,13 +33,12 @@ #include #include #include -#include -#include +#include #include "e-popup-menu.h" #include "e-gui-utils.h" -#include +#include /* * Creates an item with an optional icon @@ -47,30 +47,22 @@ static void make_item (GtkMenu *menu, GtkMenuItem *item, const char *name, GtkWidget *pixmap) { GtkWidget *label; - guint label_accel; + + if (*name == '\0') + return; /* * Ugh. This needs to go into Gtk+ */ - label = gtk_accel_label_new (""); - label_accel = gtk_label_parse_uline (GTK_LABEL (label), name); + label = gtk_label_new_with_mnemonic (name); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_widget_show (label); gtk_container_add (GTK_CONTAINER (item), label); - if (label_accel != GDK_VoidSymbol){ - gtk_widget_add_accelerator ( - GTK_WIDGET (item), - "activate_item", - gtk_menu_ensure_uline_accel_group (GTK_MENU (menu)), - label_accel, 0, - GTK_ACCEL_LOCKED); - } - - if (pixmap && GTK_IS_PIXMAP_MENU_ITEM (item)){ + if (pixmap && GTK_IS_IMAGE_MENU_ITEM (item)){ gtk_widget_show (pixmap); - gtk_pixmap_menu_item_set_pixmap (GTK_PIXMAP_MENU_ITEM (item), pixmap); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), pixmap); } } @@ -121,7 +113,7 @@ e_popup_menu_create_with_domain (EPopupMenu *menu_list, else if (menu_list[i].is_radio) item = gtk_radio_menu_item_new (group); else - item = menu_list[i].pixmap_widget ? gtk_pixmap_menu_item_new () : gtk_menu_item_new (); + item = menu_list[i].pixmap_widget ? gtk_image_menu_item_new () : gtk_menu_item_new (); if (menu_list[i].is_toggle || menu_list[i].is_radio) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), menu_list[i].is_active); if (menu_list[i].is_radio) -- cgit v1.2.3