Commit c448cf9d authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

added GimpMenuFactory parameter and removed inclusion on "menus/menus.h".

2004-09-20  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/dialogs.[ch] (dialogs_init): added GimpMenuFactory
	parameter and removed inclusion on "menus/menus.h".

	* app/menus/menus.[ch] (menus_init): added GimpActionFactory
	parameter and removed inclusion of "actions/actions.h".

	* app/gui/gui.c (gui_restore_callback): pass the factories to the
	above functions.
parent b61f161e
2004-09-20 Michael Natterer <mitch@gimp.org>
* app/dialogs/dialogs.[ch] (dialogs_init): added GimpMenuFactory
parameter and removed inclusion on "menus/menus.h".
* app/menus/menus.[ch] (menus_init): added GimpActionFactory
parameter and removed inclusion of "actions/actions.h".
* app/gui/gui.c (gui_restore_callback): pass the factories to the
above functions.
2004-09-20 Sven Neumann <sven@gimp.org>
* configure.in: bumped version number to 2.1.6.
......
......@@ -26,8 +26,7 @@
#include "core/gimpcontext.h"
#include "widgets/gimpdialogfactory.h"
#include "menus/menus.h"
#include "widgets/gimpmenufactory.h"
#include "dialogs.h"
#include "dialogs-constructors.h"
......@@ -198,11 +197,13 @@ static const GimpDialogFactoryEntry dock_entries[] =
/* public functions */
void
dialogs_init (Gimp *gimp)
dialogs_init (Gimp *gimp,
GimpMenuFactory *menu_factory)
{
gint i;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_MENU_FACTORY (menu_factory));
global_dialog_factory = gimp_dialog_factory_new ("toplevel",
gimp_get_user_context (gimp),
......@@ -211,12 +212,12 @@ dialogs_init (Gimp *gimp)
global_toolbox_factory = gimp_dialog_factory_new ("toolbox",
gimp_get_user_context (gimp),
global_menu_factory,
menu_factory,
dialogs_toolbox_get);
global_dock_factory = gimp_dialog_factory_new ("dock",
gimp_get_user_context (gimp),
global_menu_factory,
menu_factory,
dialogs_dock_new);
for (i = 0; i < G_N_ELEMENTS (toplevel_entries); i++)
......
......@@ -25,8 +25,9 @@ extern GimpDialogFactory *global_dock_factory;
extern GimpDialogFactory *global_toolbox_factory;
void dialogs_init (Gimp *gimp);
void dialogs_exit (Gimp *gimp);
void dialogs_init (Gimp *gimp,
GimpMenuFactory *menu_factory);
void dialogs_exit (Gimp *gimp);
GtkWidget * dialogs_get_toolbox (void);
......
......@@ -383,10 +383,10 @@ gui_restore_callback (Gimp *gimp,
}
actions_init (gimp);
menus_init (gimp);
menus_init (gimp, global_action_factory);
render_init (gimp);
dialogs_init (gimp);
dialogs_init (gimp, global_menu_factory);
gimp_clipboard_init (gimp);
gimp_devices_init (gimp, gui_device_change_notify);
......
......@@ -37,10 +37,9 @@
#include "core/gimp.h"
#include "widgets/gimpactionfactory.h"
#include "widgets/gimpmenufactory.h"
#include "actions/actions.h"
#include "image-menu.h"
#include "menus.h"
#include "tool-options-menu.h"
......@@ -67,9 +66,11 @@ static gboolean menurc_deleted = FALSE;
/* public functions */
void
menus_init (Gimp *gimp)
menus_init (Gimp *gimp,
GimpActionFactory *action_factory)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_ACTION_FACTORY (action_factory));
g_return_if_fail (global_menu_factory == NULL);
/* We need to make sure the property is installed before using it */
......@@ -80,7 +81,7 @@ menus_init (Gimp *gimp)
g_signal_connect (gimp->config, "notify::can-change-accels",
G_CALLBACK (menu_can_change_accels), NULL);
global_menu_factory = gimp_menu_factory_new (gimp, global_action_factory);
global_menu_factory = gimp_menu_factory_new (gimp, action_factory);
gimp_menu_factory_manager_register (global_menu_factory, "<Image>",
"file",
......
......@@ -23,15 +23,16 @@
extern GimpMenuFactory *global_menu_factory;
void menus_init (Gimp *gimp);
void menus_exit (Gimp *gimp);
void menus_init (Gimp *gimp,
GimpActionFactory *action_factory);
void menus_exit (Gimp *gimp);
void menus_restore (Gimp *gimp);
void menus_save (Gimp *gimp,
gboolean always_save);
void menus_restore (Gimp *gimp);
void menus_save (Gimp *gimp,
gboolean always_save);
gboolean menus_clear (Gimp *gimp,
GError **error);
gboolean menus_clear (Gimp *gimp,
GError **error);
#endif /* __MENUS_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment