mirror of https://github.com/GNOME/gimp.git
remember the "create_tearoff" passed to gimp_item_factory_new() in the
2003-11-08 Michael Natterer <mitch@gimp.org> * app/widgets/gimpitemfactory.[ch]: remember the "create_tearoff" passed to gimp_item_factory_new() in the GimpItemFactory struct and removed "create_tearoff" from the create_item functions (it makes no sense to pass this per create_item). * app/gui/file-open-menu.c * app/gui/file-save-menu.c * app/gui/image-menu.c * app/gui/menus.c * app/gui/plug-in-menus.c * app/gui/tool-options-menu.c: changed accordingly. * app/display/gimpdisplayshell.c (gimp_display_shell_new): create the menu bar without tearoff entries. It is very confusing to have both the popup menu (which is global and works on the active display) and the menu bar submenus (which are specific to this display) be torn off at the same time.
This commit is contained in:
parent
216ed2f772
commit
c947f0b297
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
2003-11-08 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/widgets/gimpitemfactory.[ch]: remember the "create_tearoff"
|
||||
passed to gimp_item_factory_new() in the GimpItemFactory struct
|
||||
and removed "create_tearoff" from the create_item functions
|
||||
(it makes no sense to pass this per create_item).
|
||||
|
||||
* app/gui/file-open-menu.c
|
||||
* app/gui/file-save-menu.c
|
||||
* app/gui/image-menu.c
|
||||
* app/gui/menus.c
|
||||
* app/gui/plug-in-menus.c
|
||||
* app/gui/tool-options-menu.c: changed accordingly.
|
||||
|
||||
* app/display/gimpdisplayshell.c (gimp_display_shell_new): create
|
||||
the menu bar without tearoff entries. It is very confusing to have
|
||||
both the popup menu (which is global and works on the active
|
||||
display) and the menu bar submenus (which are specific to this
|
||||
display) be torn off at the same time.
|
||||
|
||||
2003-11-08 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in: renamed version.xml.in to version.in in all API
|
||||
|
|
|
@ -588,7 +588,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
"<Image>",
|
||||
GTK_TYPE_MENU_BAR,
|
||||
gdisp,
|
||||
TRUE);
|
||||
FALSE);
|
||||
|
||||
shell->popup_factory = popup_factory;
|
||||
|
||||
|
|
|
@ -588,7 +588,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
|
|||
"<Image>",
|
||||
GTK_TYPE_MENU_BAR,
|
||||
gdisp,
|
||||
TRUE);
|
||||
FALSE);
|
||||
|
||||
shell->popup_factory = popup_factory;
|
||||
|
||||
|
|
|
@ -105,8 +105,7 @@ file_open_menu_setup (GimpItemFactory *factory)
|
|||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
locale_domain,
|
||||
file_proc, 2,
|
||||
TRUE, FALSE);
|
||||
file_proc, 2, TRUE);
|
||||
|
||||
if (is_xcf)
|
||||
{
|
||||
|
|
|
@ -106,8 +106,7 @@ file_save_menu_setup (GimpItemFactory *factory)
|
|||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
locale_domain,
|
||||
file_proc, 2,
|
||||
TRUE, FALSE);
|
||||
file_proc, 2, TRUE);
|
||||
|
||||
if (is_xcf)
|
||||
{
|
||||
|
|
|
@ -1104,12 +1104,6 @@ image_menu_setup (GimpItemFactory *factory)
|
|||
{
|
||||
if (GTK_IS_MENU_BAR (GTK_ITEM_FACTORY (factory)->widget))
|
||||
{
|
||||
if (GIMP_GUI_CONFIG (factory->gimp->config)->tearoff_menus)
|
||||
{
|
||||
gimp_item_factory_set_visible (GTK_ITEM_FACTORY (factory),
|
||||
"/tearoff", FALSE);
|
||||
}
|
||||
|
||||
gimp_item_factory_set_visible (GTK_ITEM_FACTORY (factory),
|
||||
"/filters-separator", FALSE);
|
||||
}
|
||||
|
@ -1149,8 +1143,7 @@ image_menu_setup (GimpItemFactory *factory)
|
|||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
NULL,
|
||||
factory->gimp, 2,
|
||||
TRUE, FALSE);
|
||||
factory->gimp, 2, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@ menus_last_opened_add (GimpItemFactory *item_factory)
|
|||
|
||||
gimp_item_factory_create_items (item_factory,
|
||||
n_last_opened_entries, last_opened_entries,
|
||||
item_factory->gimp, 2, TRUE, FALSE);
|
||||
item_factory->gimp, 2, TRUE);
|
||||
|
||||
gimp_item_factory_set_sensitive (GTK_ITEM_FACTORY (item_factory),
|
||||
"/File/Open Recent/(None)",
|
||||
|
|
|
@ -198,7 +198,7 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
&entry,
|
||||
locale_domain,
|
||||
&proc_def->db_info, 2,
|
||||
TRUE, FALSE);
|
||||
TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -214,8 +214,7 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
gimp_item_factory_create_item (item_factory,
|
||||
&entry,
|
||||
locale_domain,
|
||||
&proc_def->db_info, 2,
|
||||
TRUE, FALSE);
|
||||
&proc_def->db_info, 2, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ tool_options_menu_update_presets (GtkItemFactory *factory,
|
|||
GIMP_OBJECT (options)->name);
|
||||
gimp_item_factory_create_item (GIMP_ITEM_FACTORY (factory),
|
||||
&entry, NULL,
|
||||
options, 2, FALSE, FALSE);
|
||||
options, 2, FALSE);
|
||||
g_free (entry.entry.path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,8 +105,7 @@ file_open_menu_setup (GimpItemFactory *factory)
|
|||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
locale_domain,
|
||||
file_proc, 2,
|
||||
TRUE, FALSE);
|
||||
file_proc, 2, TRUE);
|
||||
|
||||
if (is_xcf)
|
||||
{
|
||||
|
|
|
@ -106,8 +106,7 @@ file_save_menu_setup (GimpItemFactory *factory)
|
|||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
locale_domain,
|
||||
file_proc, 2,
|
||||
TRUE, FALSE);
|
||||
file_proc, 2, TRUE);
|
||||
|
||||
if (is_xcf)
|
||||
{
|
||||
|
|
|
@ -1104,12 +1104,6 @@ image_menu_setup (GimpItemFactory *factory)
|
|||
{
|
||||
if (GTK_IS_MENU_BAR (GTK_ITEM_FACTORY (factory)->widget))
|
||||
{
|
||||
if (GIMP_GUI_CONFIG (factory->gimp->config)->tearoff_menus)
|
||||
{
|
||||
gimp_item_factory_set_visible (GTK_ITEM_FACTORY (factory),
|
||||
"/tearoff", FALSE);
|
||||
}
|
||||
|
||||
gimp_item_factory_set_visible (GTK_ITEM_FACTORY (factory),
|
||||
"/filters-separator", FALSE);
|
||||
}
|
||||
|
@ -1149,8 +1143,7 @@ image_menu_setup (GimpItemFactory *factory)
|
|||
gimp_item_factory_create_item (factory,
|
||||
&entry,
|
||||
NULL,
|
||||
factory->gimp, 2,
|
||||
TRUE, FALSE);
|
||||
factory->gimp, 2, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@ menus_last_opened_add (GimpItemFactory *item_factory)
|
|||
|
||||
gimp_item_factory_create_items (item_factory,
|
||||
n_last_opened_entries, last_opened_entries,
|
||||
item_factory->gimp, 2, TRUE, FALSE);
|
||||
item_factory->gimp, 2, TRUE);
|
||||
|
||||
gimp_item_factory_set_sensitive (GTK_ITEM_FACTORY (item_factory),
|
||||
"/File/Open Recent/(None)",
|
||||
|
|
|
@ -198,7 +198,7 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
&entry,
|
||||
locale_domain,
|
||||
&proc_def->db_info, 2,
|
||||
TRUE, FALSE);
|
||||
TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -214,8 +214,7 @@ plug_in_menus_create_entry (GimpItemFactory *item_factory,
|
|||
gimp_item_factory_create_item (item_factory,
|
||||
&entry,
|
||||
locale_domain,
|
||||
&proc_def->db_info, 2,
|
||||
TRUE, FALSE);
|
||||
&proc_def->db_info, 2, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ tool_options_menu_update_presets (GtkItemFactory *factory,
|
|||
GIMP_OBJECT (options)->name);
|
||||
gimp_item_factory_create_item (GIMP_ITEM_FACTORY (factory),
|
||||
&entry, NULL,
|
||||
options, 2, FALSE, FALSE);
|
||||
options, 2, FALSE);
|
||||
g_free (entry.entry.path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -226,6 +226,7 @@ gimp_item_factory_new (Gimp *gimp,
|
|||
factory->gimp = gimp;
|
||||
factory->update_func = update_func;
|
||||
factory->update_on_popup = update_on_popup;
|
||||
factory->create_tearoff = create_tearoff;
|
||||
factory->title = g_strdup (title);
|
||||
factory->help_id = g_strdup (help_id);
|
||||
|
||||
|
@ -240,10 +241,7 @@ gimp_item_factory_new (Gimp *gimp,
|
|||
gimp_item_factory_create_items (factory,
|
||||
n_entries,
|
||||
entries,
|
||||
callback_data,
|
||||
2,
|
||||
create_tearoff,
|
||||
TRUE);
|
||||
callback_data, 2, TRUE);
|
||||
|
||||
g_type_class_unref (factory_class);
|
||||
|
||||
|
@ -300,7 +298,6 @@ gimp_item_factory_create_item (GimpItemFactory *item_factory,
|
|||
const gchar *textdomain,
|
||||
gpointer callback_data,
|
||||
guint callback_type,
|
||||
gboolean create_tearoff,
|
||||
gboolean static_entry)
|
||||
{
|
||||
GtkWidget *menu_item;
|
||||
|
@ -314,12 +311,12 @@ gimp_item_factory_create_item (GimpItemFactory *item_factory,
|
|||
|
||||
if (! (strstr (entry->entry.path, "tearoff")))
|
||||
{
|
||||
if (tearoffs && create_tearoff)
|
||||
if (tearoffs && item_factory->create_tearoff)
|
||||
{
|
||||
gimp_item_factory_create_branches (item_factory, entry, textdomain);
|
||||
}
|
||||
}
|
||||
else if (! tearoffs || ! create_tearoff)
|
||||
else if (! tearoffs || ! item_factory->create_tearoff)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -387,7 +384,6 @@ gimp_item_factory_create_items (GimpItemFactory *item_factory,
|
|||
GimpItemFactoryEntry *entries,
|
||||
gpointer callback_data,
|
||||
guint callback_type,
|
||||
gboolean create_tearoff,
|
||||
gboolean static_entries)
|
||||
{
|
||||
gint i;
|
||||
|
@ -399,7 +395,6 @@ gimp_item_factory_create_items (GimpItemFactory *item_factory,
|
|||
NULL,
|
||||
callback_data,
|
||||
callback_type,
|
||||
create_tearoff,
|
||||
static_entries);
|
||||
}
|
||||
}
|
||||
|
@ -864,7 +859,7 @@ gimp_item_factory_create_branches (GimpItemFactory *factory,
|
|||
gimp_item_factory_create_item (factory,
|
||||
&branch_entry,
|
||||
textdomain,
|
||||
NULL, 2, TRUE, FALSE);
|
||||
NULL, 2, TRUE);
|
||||
|
||||
g_object_set_data (G_OBJECT (factory), "complete", NULL);
|
||||
}
|
||||
|
@ -887,7 +882,7 @@ gimp_item_factory_create_branches (GimpItemFactory *factory,
|
|||
gimp_item_factory_create_item (factory,
|
||||
&tearoff_entry,
|
||||
textdomain,
|
||||
NULL, 2, TRUE, FALSE);
|
||||
NULL, 2, TRUE);
|
||||
}
|
||||
|
||||
p = strchr (p + 1, '/');
|
||||
|
|
|
@ -50,6 +50,7 @@ struct _GimpItemFactory
|
|||
Gimp *gimp;
|
||||
GimpItemFactoryUpdateFunc update_func;
|
||||
gboolean update_on_popup;
|
||||
gboolean create_tearoff;
|
||||
gchar *title;
|
||||
gchar *help_id;
|
||||
|
||||
|
@ -86,14 +87,12 @@ void gimp_item_factory_create_item (GimpItemFactory *factory,
|
|||
const gchar *textdomain,
|
||||
gpointer callback_data,
|
||||
guint callback_type,
|
||||
gboolean create_tearoff,
|
||||
gboolean static_entry);
|
||||
void gimp_item_factory_create_items (GimpItemFactory *factory,
|
||||
guint n_entries,
|
||||
GimpItemFactoryEntry *entries,
|
||||
gpointer callback_data,
|
||||
guint callback_type,
|
||||
gboolean create_tearoff,
|
||||
gboolean static_entries);
|
||||
|
||||
void gimp_item_factory_update (GimpItemFactory *item_factory,
|
||||
|
|
Loading…
Reference in New Issue