gimp/app/widgets/gimpmenushell.h
Jehan b1f022f144 app, menus: now support the child menu of the GimpDockbook menu.
I only translated the undo menu into GtkBuilder's .ui format for now.
The only missing part is that the icon is now shown.

Note that in various parts, I don't rely anymore on a bogus menu action (i.e.
"undo-popup" action in this case) which does nothing but has an associated label
and icon. I simply add the label and icon as submenu attribute directly in the
.ui file, which is translatable and whose strings should be parsed by gettext.

Eventually I'll just get rid of all the various "*-popup" or "*-menu" bogus
actions.
2023-04-12 22:07:08 +02:00

71 lines
2.9 KiB
C

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpmenushell.h
* Copyright (C) 2023 Jehan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_MENU_SHELL_H__
#define __GIMP_MENU_SHELL_H__
#define GIMP_TYPE_MENU_SHELL (gimp_menu_shell_get_type ())
#define GIMP_MENU_SHELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_MENU_SHELL, GimpMenuShell))
#define GIMP_IS_MENU_SHELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_MENU_SHELL))
#define GIMP_MENU_SHELL_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), GIMP_TYPE_MENU_SHELL, GimpMenuShellInterface))
enum
{
GIMP_MENU_SHELL_PROP_0,
GIMP_MENU_SHELL_PROP_MANAGER,
GIMP_MENU_SHELL_PROP_LAST = GIMP_MENU_SHELL_PROP_MANAGER,
};
typedef struct _GimpMenuShellInterface GimpMenuShellInterface;
struct _GimpMenuShellInterface
{
GTypeInterface base_interface;
};
GType gimp_menu_shell_get_type (void) G_GNUC_CONST;
void gimp_menu_shell_fill (GimpMenuShell *shell,
GMenuModel *model,
const gchar *update_signal);
void gimp_menu_shell_merge (GimpMenuShell *shell,
GimpMenuShell *shell2,
gboolean top);
/* Protected functions. */
void gimp_menu_shell_init (GimpMenuShell *shell);
void gimp_menu_shell_install_properties (GObjectClass *klass);
void gimp_menu_shell_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
void gimp_menu_shell_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
#endif /* __GIMP_MENU_SHELL_H__ */