Commit 36f87b5b authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

app: clean up the new action search a bit

- order some stuff alphabetically and consistently
- move action from help-actions to dialogs-actions
- fix OS/X menu item fiddling (untested)
parent d73057ed
......@@ -267,7 +267,13 @@ static const GimpStringActionEntry dialogs_toplevel_actions[] =
NULL,
NC_("dialogs-action", "About GIMP"),
"gimp-about-dialog",
GIMP_HELP_ABOUT_DIALOG }
GIMP_HELP_ABOUT_DIALOG },
{ "help-action-search", GTK_STOCK_FIND,
NC_("help-action", "_Search and Run a Command"), "slash",
NC_("help-action", "Search commands by keyword, and run them"),
"gimp-action-search-dialog",
GIMP_HELP_ACTION_SEARCH_DIALOG }
};
......
......@@ -47,13 +47,7 @@ static const GimpActionEntry help_actions[] =
NC_("help-action", "_Context Help"), "<shift>F1",
NC_("help-action", "Show the help for a specific user interface item"),
G_CALLBACK (help_context_help_cmd_callback),
GIMP_HELP_HELP_CONTEXT },
{ "help-action-search", GTK_STOCK_FIND,
NC_("help-action", "_Search and Run a Command"), "slash",
NC_("help-action", "Search commands by keyword, and run them"),
G_CALLBACK (help_search_actions_cmd_callback),
GIMP_HELP_ACTION_SEARCH_DIALOG }
GIMP_HELP_HELP_CONTEXT }
};
......
......@@ -26,7 +26,6 @@
#include "core/gimpprogress.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimphelp.h"
#include "actions.h"
......@@ -54,17 +53,3 @@ help_context_help_cmd_callback (GtkAction *action,
gimp_context_help (widget);
}
void
help_search_actions_cmd_callback (GtkAction *action,
gpointer data)
{
Gimp *gimp;
GtkWidget *widget;
return_if_no_widget (widget, data);
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
NULL,
"gimp-action-search-dialog", -1, TRUE);
}
......@@ -19,12 +19,10 @@
#define __HELP_COMMANDS_H__
void help_help_cmd_callback (GtkAction *action,
gpointer data);
void help_context_help_cmd_callback (GtkAction *action,
gpointer data);
void help_search_actions_cmd_callback (GtkAction *action,
gpointer data);
void help_help_cmd_callback (GtkAction *action,
gpointer data);
void help_context_help_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __HELP_COMMANDS_H__ */
......@@ -13,8 +13,6 @@ AM_CPPFLAGS = \
noinst_LIBRARIES = libappdialogs.a
libappdialogs_a_sources = \
action-search-dialog.c \
action-search-dialog.h \
dialogs-types.h \
dialogs.c \
dialogs.h \
......@@ -23,6 +21,8 @@ libappdialogs_a_sources = \
\
about-dialog.c \
about-dialog.h \
action-search-dialog.c \
action-search-dialog.h \
channel-options-dialog.c \
channel-options-dialog.h \
convert-precision-dialog.c \
......
......@@ -65,6 +65,7 @@
#include "display/gimpnavigationeditor.h"
#include "about-dialog.h"
#include "action-search-dialog.h"
#include "dialogs.h"
#include "dialogs-constructors.h"
#include "file-open-dialog.h"
......@@ -78,7 +79,6 @@
#include "preferences-dialog.h"
#include "quit-dialog.h"
#include "tips-dialog.h"
#include "action-search-dialog.h"
#include "gimp-intl.h"
......@@ -132,15 +132,6 @@ dialogs_file_export_new (GimpDialogFactory *factory,
return file_save_dialog_new (context->gimp, TRUE);
}
GtkWidget *
dialogs_action_search_get (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
gint view_size)
{
return action_search_dialog_create (context->gimp);
}
GtkWidget *
dialogs_preferences_get (GimpDialogFactory *factory,
GimpContext *context,
......@@ -204,6 +195,15 @@ dialogs_about_get (GimpDialogFactory *factory,
return about_dialog_create (context);
}
GtkWidget *
dialogs_action_search_get (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
gint view_size)
{
return action_search_dialog_create (context->gimp);
}
GtkWidget *
dialogs_error_get (GimpDialogFactory *factory,
GimpContext *context,
......
......@@ -41,10 +41,6 @@ GtkWidget * dialogs_file_export_new (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
gint view_size);
GtkWidget * dialogs_action_search_get (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
gint view_size);
GtkWidget * dialogs_preferences_get (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
......@@ -73,6 +69,10 @@ GtkWidget * dialogs_about_get (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
gint view_size);
GtkWidget * dialogs_action_search_get (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
gint view_size);
GtkWidget * dialogs_error_get (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager,
......
......@@ -264,8 +264,6 @@ static const GimpDialogFactoryEntry entries[] =
dialogs_file_export_new, FALSE, TRUE, TRUE),
/* singleton toplevels */
TOPLEVEL ("gimp-action-search-dialog",
dialogs_action_search_get, TRUE, TRUE, TRUE),
TOPLEVEL ("gimp-preferences-dialog",
dialogs_preferences_get, TRUE, TRUE, FALSE),
TOPLEVEL ("gimp-input-devices-dialog",
......@@ -280,6 +278,8 @@ static const GimpDialogFactoryEntry entries[] =
dialogs_tips_get, TRUE, FALSE, FALSE),
TOPLEVEL ("gimp-about-dialog",
dialogs_about_get, TRUE, FALSE, FALSE),
TOPLEVEL ("gimp-action-search-dialog",
dialogs_action_search_get, TRUE, TRUE, TRUE),
TOPLEVEL ("gimp-error-dialog",
dialogs_error_get, TRUE, FALSE, FALSE),
TOPLEVEL ("gimp-close-all-dialog",
......
......@@ -35,6 +35,7 @@
#include "core/gimplist.h"
#include "core/gimptemplate.h"
#include "widgets/gimpaction-history.h"
#include "widgets/gimpcolorpanel.h"
#include "widgets/gimpcontainercombobox.h"
#include "widgets/gimpcontainerview.h"
......@@ -53,7 +54,6 @@
#include "widgets/gimptooleditor.h"
#include "widgets/gimpwidgets-constructors.h"
#include "widgets/gimpwidgets-utils.h"
#include "widgets/gimpaction-history.h"
#include "menus/menus.h"
......@@ -1701,6 +1701,7 @@ prefs_dialog_new (Gimp *gimp,
g_object_unref (size_group);
size_group = NULL;
/******************/
/* Tool Options */
/******************/
......
......@@ -46,6 +46,7 @@
#include "tools/gimp-tools.h"
#include "widgets/gimpaction-history.h"
#include "widgets/gimpclipboard.h"
#include "widgets/gimpcolorselectorpalette.h"
#include "widgets/gimpcontrollers.h"
......@@ -61,7 +62,6 @@
#include "widgets/gimpuimanager.h"
#include "widgets/gimpwidgets-utils.h"
#include "widgets/gimplanguagestore-parser.h"
#include "widgets/gimpaction-history.h"
#include "actions/actions.h"
#include "actions/windows-commands.h"
......@@ -513,31 +513,29 @@ gui_restore_after_callback (Gimp *gimp,
gui_add_to_app_menu (image_ui_manager, osx_app,
"/image-menubar/Help/dialogs-about", 0);
gui_add_to_app_menu (image_ui_manager, osx_app,
"/image-menubar/Help/dialogs-search-action", 1);
#define PREFERENCES "/image-menubar/Edit/Preferences/"
gui_add_to_app_menu (image_ui_manager, osx_app,
PREFERENCES "dialogs-preferences", 2);
PREFERENCES "dialogs-preferences", 3);
gui_add_to_app_menu (image_ui_manager, osx_app,
PREFERENCES "dialogs-input-devices", 3);
PREFERENCES "dialogs-input-devices", 4);
gui_add_to_app_menu (image_ui_manager, osx_app,
PREFERENCES "dialogs-keyboard-shortcuts", 4);
PREFERENCES "dialogs-keyboard-shortcuts", 5);
gui_add_to_app_menu (image_ui_manager, osx_app,
PREFERENCES "dialogs-module-dialog", 5);
PREFERENCES "dialogs-module-dialog", 6);
gui_add_to_app_menu (image_ui_manager, osx_app,
PREFERENCES "plug-in-unit-editor", 6);
PREFERENCES "plug-in-unit-editor", 7);
#undef PREFERENCES
gui_add_to_app_menu (image_ui_manager, group,
"/dummy-menubar/image-popup/Help/dialogs-search-action",
_("Search and Run a Command"));
/* the preferences group */
group = ige_mac_menu_add_app_menu_group ();
item = gtk_separator_menu_item_new ();
gtkosx_application_insert_app_menu_item (osx_app, item, 7);
gtkosx_application_insert_app_menu_item (osx_app, item, 8);
item = gtk_ui_manager_get_widget (GTK_UI_MANAGER (image_ui_manager),
"/image-menubar/File/file-quit");
......@@ -663,6 +661,7 @@ gui_exit_after_callback (Gimp *gimp,
gimp);
gimp_action_history_exit (GIMP_GUI_CONFIG (gimp->config));
g_object_unref (image_ui_manager);
image_ui_manager = NULL;
......
......@@ -19,6 +19,8 @@ libappwidgets_a_sources = \
widgets-types.h \
gimpaction.c \
gimpaction.h \
gimpaction-history.c \
gimpaction-history.h \
gimpactioneditor.c \
gimpactioneditor.h \
gimpactionfactory.c \
......@@ -223,8 +225,6 @@ libappwidgets_a_sources = \
gimplanguagestore.h \
gimplanguagestore-parser.c \
gimplanguagestore-parser.h \
gimpaction-history.c \
gimpaction-history.h \
gimplayertreeview.c \
gimplayertreeview.h \
gimpmenudock.c \
......
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