app/actions/dialogs-actions.c app/dialogs/dialogs-constructors.[ch]
2005-09-30 Sven Neumann <sven@gimp.org> * app/actions/dialogs-actions.c * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/dialogs/keyboard-shortcuts-dialog.[ch]: register the keyboard shortcut dialog with the dialog factory as singleton toplevel dialog. * app/dialogs/preferences-dialog.c: changed accordingly. * menus/image-menu.xml.in: added a "Keyboard Shortcuts" entry to the Edit menu.
This commit is contained in:

committed by
Sven Neumann

parent
b762bed46c
commit
f3bfb29a03
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2005-09-30 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/actions/dialogs-actions.c
|
||||||
|
* app/dialogs/dialogs-constructors.[ch]
|
||||||
|
* app/dialogs/dialogs.c
|
||||||
|
* app/dialogs/keyboard-shortcuts-dialog.[ch]: register the keyboard
|
||||||
|
shortcut dialog with the dialog factory as singleton toplevel dialog.
|
||||||
|
|
||||||
|
* app/dialogs/preferences-dialog.c: changed accordingly.
|
||||||
|
|
||||||
|
* menus/image-menu.xml.in: added a "Keyboard Shortcuts" entry to
|
||||||
|
the Edit menu.
|
||||||
|
|
||||||
2005-09-30 Sven Neumann <sven@gimp.org>
|
2005-09-30 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/dialogs/Makefile.am
|
* app/dialogs/Makefile.am
|
||||||
|
@ -191,6 +191,11 @@ static GimpStringActionEntry dialogs_toplevel_actions[] =
|
|||||||
"gimp-preferences-dialog",
|
"gimp-preferences-dialog",
|
||||||
GIMP_HELP_PREFS_DIALOG },
|
GIMP_HELP_PREFS_DIALOG },
|
||||||
|
|
||||||
|
{ "dialogs-keyboard-shortcuts", NULL,
|
||||||
|
N_("_Keyboard Shortcuts"), NULL, NULL,
|
||||||
|
"gimp-keyboard-shortcuts-dialog",
|
||||||
|
GIMP_HELP_KEYBOARD_SHORTCUTS },
|
||||||
|
|
||||||
{ "dialogs-module-dialog", GTK_STOCK_EXECUTE,
|
{ "dialogs-module-dialog", GTK_STOCK_EXECUTE,
|
||||||
N_("_Module Manager"), NULL, NULL,
|
N_("_Module Manager"), NULL, NULL,
|
||||||
"gimp-module-dialog",
|
"gimp-module-dialog",
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
#include "file-open-location-dialog.h"
|
#include "file-open-location-dialog.h"
|
||||||
#include "file-save-dialog.h"
|
#include "file-save-dialog.h"
|
||||||
#include "image-new-dialog.h"
|
#include "image-new-dialog.h"
|
||||||
|
#include "keyboard-shortcuts-dialog.h"
|
||||||
#include "module-dialog.h"
|
#include "module-dialog.h"
|
||||||
#include "preferences-dialog.h"
|
#include "preferences-dialog.h"
|
||||||
#include "quit-dialog.h"
|
#include "quit-dialog.h"
|
||||||
@ -134,6 +135,14 @@ dialogs_preferences_get (GimpDialogFactory *factory,
|
|||||||
return preferences_dialog_create (context->gimp);
|
return preferences_dialog_create (context->gimp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GtkWidget *
|
||||||
|
dialogs_keyboard_shortcuts_get (GimpDialogFactory *factory,
|
||||||
|
GimpContext *context,
|
||||||
|
gint preview_size)
|
||||||
|
{
|
||||||
|
return keyboard_shortcuts_dialog_new ();
|
||||||
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
dialogs_module_get (GimpDialogFactory *factory,
|
dialogs_module_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
|
@ -37,6 +37,9 @@ GtkWidget * dialogs_file_save_new (GimpDialogFactory *factory,
|
|||||||
GtkWidget * dialogs_preferences_get (GimpDialogFactory *factory,
|
GtkWidget * dialogs_preferences_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size);
|
gint preview_size);
|
||||||
|
GtkWidget * dialogs_keyboard_shortcuts_get (GimpDialogFactory *factory,
|
||||||
|
GimpContext *context,
|
||||||
|
gint preview_size);
|
||||||
GtkWidget * dialogs_module_get (GimpDialogFactory *factory,
|
GtkWidget * dialogs_module_get (GimpDialogFactory *factory,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint preview_size);
|
gint preview_size);
|
||||||
|
@ -94,19 +94,21 @@ static const GimpDialogFactoryEntry toplevel_entries[] =
|
|||||||
|
|
||||||
/* singleton toplevels */
|
/* singleton toplevels */
|
||||||
TOPLEVEL ("gimp-preferences-dialog",
|
TOPLEVEL ("gimp-preferences-dialog",
|
||||||
dialogs_preferences_get, TRUE, TRUE, FALSE),
|
dialogs_preferences_get, TRUE, TRUE, FALSE),
|
||||||
|
TOPLEVEL ("gimp-keyboard-shortcuts-dialog",
|
||||||
|
dialogs_keyboard_shortcuts_get, TRUE, TRUE, TRUE),
|
||||||
TOPLEVEL ("gimp-module-dialog",
|
TOPLEVEL ("gimp-module-dialog",
|
||||||
dialogs_module_get, TRUE, TRUE, TRUE),
|
dialogs_module_get, TRUE, TRUE, TRUE),
|
||||||
TOPLEVEL ("gimp-tips-dialog",
|
TOPLEVEL ("gimp-tips-dialog",
|
||||||
dialogs_tips_get, TRUE, FALSE, FALSE),
|
dialogs_tips_get, TRUE, FALSE, FALSE),
|
||||||
TOPLEVEL ("gimp-about-dialog",
|
TOPLEVEL ("gimp-about-dialog",
|
||||||
dialogs_about_get, TRUE, FALSE, FALSE),
|
dialogs_about_get, TRUE, FALSE, FALSE),
|
||||||
TOPLEVEL ("gimp-error-dialog",
|
TOPLEVEL ("gimp-error-dialog",
|
||||||
dialogs_error_get, TRUE, FALSE, FALSE),
|
dialogs_error_get, TRUE, FALSE, FALSE),
|
||||||
TOPLEVEL ("gimp-close-all-dialog",
|
TOPLEVEL ("gimp-close-all-dialog",
|
||||||
dialogs_close_all_get, TRUE, FALSE, FALSE),
|
dialogs_close_all_get, TRUE, FALSE, FALSE),
|
||||||
TOPLEVEL ("gimp-quit-dialog",
|
TOPLEVEL ("gimp-quit-dialog",
|
||||||
dialogs_quit_get, TRUE, FALSE, FALSE)
|
dialogs_quit_get, TRUE, FALSE, FALSE)
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DOCKABLE(id,name,blurb,stock_id,help_id,\
|
#define DOCKABLE(id,name,blurb,stock_id,help_id,\
|
||||||
|
@ -24,19 +24,17 @@
|
|||||||
|
|
||||||
#include "dialogs-types.h"
|
#include "dialogs-types.h"
|
||||||
|
|
||||||
#include "keyboard-shortcuts-dialog.h"
|
|
||||||
|
|
||||||
#include "widgets/gimpactionview.h"
|
#include "widgets/gimpactionview.h"
|
||||||
#include "widgets/gimpdialogfactory.h"
|
|
||||||
#include "widgets/gimphelp-ids.h"
|
#include "widgets/gimphelp-ids.h"
|
||||||
#include "widgets/gimpuimanager.h"
|
#include "widgets/gimpuimanager.h"
|
||||||
|
|
||||||
|
#include "keyboard-shortcuts-dialog.h"
|
||||||
|
|
||||||
#include "gimp-intl.h"
|
#include "gimp-intl.h"
|
||||||
|
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
keyboard_shortcuts_dialog_new (GtkWidget *parent,
|
keyboard_shortcuts_dialog_new (void)
|
||||||
GtkDialogFlags flags)
|
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@ -46,12 +44,9 @@ keyboard_shortcuts_dialog_new (GtkWidget *parent,
|
|||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
|
||||||
g_return_val_if_fail (parent == NULL || GTK_IS_WIDGET (parent), NULL);
|
|
||||||
|
|
||||||
dialog = gimp_dialog_new (_("Configure Keyboard Shortcuts"),
|
dialog = gimp_dialog_new (_("Configure Keyboard Shortcuts"),
|
||||||
"gimp-keyboard-shortcuts-dialog",
|
"gimp-keyboard-shortcuts-dialog",
|
||||||
gtk_widget_get_toplevel (parent), flags,
|
NULL, 0,
|
||||||
|
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
GIMP_HELP_KEYBOARD_SHORTCUTS,
|
GIMP_HELP_KEYBOARD_SHORTCUTS,
|
||||||
|
|
||||||
@ -59,9 +54,6 @@ keyboard_shortcuts_dialog_new (GtkWidget *parent,
|
|||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gimp_dialog_factory_add_foreign (gimp_dialog_factory_from_name ("toplevel"),
|
|
||||||
"gimp-keyboard-shortcuts-dialog", dialog);
|
|
||||||
|
|
||||||
g_signal_connect (dialog, "response",
|
g_signal_connect (dialog, "response",
|
||||||
G_CALLBACK (gtk_widget_destroy),
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
#define __KEYBOARD_SHORTCUTS_DIALOG_H__
|
#define __KEYBOARD_SHORTCUTS_DIALOG_H__
|
||||||
|
|
||||||
|
|
||||||
GtkWidget * keyboard_shortcuts_dialog_new (GtkWidget *parent,
|
GtkWidget * keyboard_shortcuts_dialog_new (void);
|
||||||
GtkDialogFlags flags);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __KEYBOARD_SHORTCUTS_DIALOG_H__ */
|
#endif /* __KEYBOARD_SHORTCUTS_DIALOG_H__ */
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "widgets/gimpcontrollerlist.h"
|
#include "widgets/gimpcontrollerlist.h"
|
||||||
#include "widgets/gimpdeviceinfo.h"
|
#include "widgets/gimpdeviceinfo.h"
|
||||||
#include "widgets/gimpdevices.h"
|
#include "widgets/gimpdevices.h"
|
||||||
|
#include "widgets/gimpdialogfactory.h"
|
||||||
#include "widgets/gimpgrideditor.h"
|
#include "widgets/gimpgrideditor.h"
|
||||||
#include "widgets/gimphelp-ids.h"
|
#include "widgets/gimphelp-ids.h"
|
||||||
#include "widgets/gimppropwidgets.h"
|
#include "widgets/gimppropwidgets.h"
|
||||||
@ -54,7 +55,6 @@
|
|||||||
#include "gui/session.h"
|
#include "gui/session.h"
|
||||||
#include "gui/themes.h"
|
#include "gui/themes.h"
|
||||||
|
|
||||||
#include "keyboard-shortcuts-dialog.h"
|
|
||||||
#include "resolution-calibrate-dialog.h"
|
#include "resolution-calibrate-dialog.h"
|
||||||
|
|
||||||
#include "gimp-intl.h"
|
#include "gimp-intl.h"
|
||||||
@ -87,8 +87,6 @@ static void prefs_input_devices_dialog (GtkWidget *widget,
|
|||||||
static void prefs_input_dialog_able_callback (GtkWidget *widget,
|
static void prefs_input_dialog_able_callback (GtkWidget *widget,
|
||||||
GdkDevice *device,
|
GdkDevice *device,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
|
|
||||||
Gimp *gimp);
|
|
||||||
static void prefs_menus_save_callback (GtkWidget *widget,
|
static void prefs_menus_save_callback (GtkWidget *widget,
|
||||||
Gimp *gimp);
|
Gimp *gimp);
|
||||||
static void prefs_menus_clear_callback (GtkWidget *widget,
|
static void prefs_menus_clear_callback (GtkWidget *widget,
|
||||||
@ -468,39 +466,13 @@ prefs_input_dialog_able_callback (GtkWidget *widget,
|
|||||||
gimp_device_info_changed_by_device (device);
|
gimp_device_info_changed_by_device (device);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
prefs_keyboard_shortcuts_destroy (GtkWidget *widget,
|
|
||||||
GtkWidget *prefs)
|
|
||||||
{
|
|
||||||
g_object_set_data (G_OBJECT (prefs), "gimp-keyboard-shortcuts-dialog", NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
|
prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
|
||||||
Gimp *gimp)
|
Gimp *gimp)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_from_name ("toplevel"),
|
||||||
|
gtk_widget_get_screen (widget),
|
||||||
dialog = g_object_get_data (G_OBJECT (gtk_widget_get_toplevel (widget)),
|
"gimp-keyboard-shortcuts-dialog", 0);
|
||||||
"gimp-keyboard-shortcuts-dialog");
|
|
||||||
|
|
||||||
if (dialog)
|
|
||||||
{
|
|
||||||
gtk_window_present (GTK_WINDOW (dialog));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog = keyboard_shortcuts_dialog_new (widget,
|
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT);
|
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (gtk_widget_get_toplevel (widget)),
|
|
||||||
"gimp-keyboard-shortcuts-dialog", dialog);
|
|
||||||
|
|
||||||
g_signal_connect_object (dialog, "destroy",
|
|
||||||
G_CALLBACK (prefs_keyboard_shortcuts_destroy),
|
|
||||||
gtk_widget_get_toplevel (widget), 0);
|
|
||||||
|
|
||||||
gtk_widget_show (dialog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -187,6 +187,7 @@
|
|||||||
</placeholder>
|
</placeholder>
|
||||||
<separator />
|
<separator />
|
||||||
<menuitem action="dialogs-preferences" />
|
<menuitem action="dialogs-preferences" />
|
||||||
|
<menuitem action="dialogs-keyboard-shortcuts" />
|
||||||
<separator />
|
<separator />
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user