X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=gtk%2Fgtkseparatormenuitem.c;h=da721297067eac0f0572bc7c821fdedf2e9c58d2;hb=32bd10bf74cd2b7f2d16432d4198dca82c386133;hp=e160cc01d17b484be312e7433cfdd887fcfde898;hpb=6eb2fe94cb939f18322ef32a9b2f12414fa699d6;p=~andy%2Fgtk diff --git a/gtk/gtkseparatormenuitem.c b/gtk/gtkseparatormenuitem.c index e160cc01d..da7212970 100644 --- a/gtk/gtkseparatormenuitem.c +++ b/gtk/gtkseparatormenuitem.c @@ -12,9 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ /* @@ -24,21 +22,48 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#include "config.h" + #include "gtkseparatormenuitem.h" -G_DEFINE_TYPE(GtkSeparatorMenuItem, gtk_separator_menu_item, GTK_TYPE_MENU_ITEM); +#include "gtkstylecontext.h" + +/** + * SECTION:gtkseparatormenuitem + * @Short_description: A separator used in menus + * @Title: GtkSeparatorMenuItem + * + * The #GtkSeparatorMenuItem is a separator used to group + * items within a menu. It displays a horizontal line with a shadow to + * make it appear sunken into the interface. + */ + +G_DEFINE_TYPE (GtkSeparatorMenuItem, gtk_separator_menu_item, GTK_TYPE_MENU_ITEM) static void gtk_separator_menu_item_class_init (GtkSeparatorMenuItemClass *class) { GTK_CONTAINER_CLASS (class)->child_type = NULL; + + gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (class), ATK_ROLE_SEPARATOR); } static void gtk_separator_menu_item_init (GtkSeparatorMenuItem *item) { + GtkStyleContext *context; + + context = gtk_widget_get_style_context (GTK_WIDGET (item)); + gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR); } +/** + * gtk_separator_menu_item_new: + * + * Creates a new #GtkSeparatorMenuItem. + * + * Returns: a new #GtkSeparatorMenuItem. + */ GtkWidget * gtk_separator_menu_item_new (void) {