1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
4
* Copyright (C) Álvaro Peña 2011 <alvaropg@gmail.com>
6
* Almanah is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* Almanah is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with Almanah. If not, see <http://www.gnu.org/licenses/>.
22
#include "font-style-menu-action.h"
24
G_DEFINE_TYPE (AlmanahFontStyleMenuAction, almanah_font_style_menu_action, GTK_TYPE_ACTION)
27
almanah_font_style_menu_action_class_init (AlmanahFontStyleMenuActionClass *klass)
29
GtkActionClass *action_class = GTK_ACTION_CLASS (klass);
31
/* This class only has been created to allow a menu into a toolitem
32
* in the data/almanah.ui file (see the unique toolbar) in the way
33
* described in the GtkUIManager documentation ("Note that toolitem
34
* elements may contain a menu element, but only if their associated
35
* action specifies a GtkMenuToolButton as proxy")
37
* See: https://bugzilla.gnome.org/show_bug.cgi?id=590335
39
action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
43
almanah_font_style_menu_action_init (AlmanahFontStyleMenuAction *self)
48
almanah_font_style_menu_action_new (const gchar *name, const gchar *label, const gchar *tooltip, const gchar *stock_id)
50
g_return_val_if_fail (name != NULL, NULL);
52
return g_object_new (ALMANAH_TYPE_FONT_STYLE_MENU_ACTION,