mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
To be multihead safe, each new window or menu needs to be associated with
2003-11-08 Michael Natterer <mitch@gimp.org> To be multihead safe, each new window or menu needs to be associated with a GdkScreen or it will pop up on the default screen. * libgimpwidgets/gimpquerybox.[ch] * app/display/gimpdisplayshell-layer-select.[ch] * app/widgets/widgets-types.h * app/widgets/gimpitemfactory.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooldialog.[ch] * app/widgets/gimpviewabledialog.[ch] * app/gui/channels-commands.[ch] * app/gui/color-notebook.[ch] * app/gui/convert-dialog.[ch] * app/gui/edit-commands.[ch] * app/gui/grid-dialog.[ch] * app/gui/image-commands.[ch] * app/gui/info-dialog.[ch] * app/gui/layers-commands.[ch] * app/gui/offset-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/stroke-dialog.[ch] * app/gui/templates-commands.[ch] * app/gui/vectors-commands.[ch]: added "GtkWidget *parent" paramaters to all functions which create menus, popups or windows and pass "parent" to gimp_dialog_new() or one of the various wrappers around it. As a side effect, this fixes bug #61092. * app/widgets/gimpdialogfactory.[ch]: added "GdkScreen *screen" instead of "parent" here since there are no possible parent windows on startup. * app/display/gimpdisplayshell-callbacks.c (gimp_display_shell_origin_button_press): added a quick hack to send a display to another screen: click the origin button with the middle mouse button. * app/display/gimpdisplayshell.c (gimp_display_shell_screen_changed): don't chain up undonditionally (don't crash). * libgimpwidgets/gimpdialog.c (gimp_dialog_new_valist): set the dialog's screen from a non-GtkWidget parent widget. The rest of non-window parent widget handling is still unimplemented. * libgimpwidgets/gimpcolorbutton.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcolorpanel.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainerpopup.c * app/widgets/gimpcontainertreeview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpdevicestatus.c * app/widgets/gimpdockable.c * app/widgets/gimpdrawabletreeview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpgradienteditor.c * app/widgets/gimphelp.c * app/widgets/gimppaletteeditor.c * app/widgets/gimppreview-popup.c * app/widgets/gimpselectioneditor.c * app/widgets/gimpsessioninfo.c * app/widgets/gimptoolbox-color-area.c * app/widgets/gimptoolbox-indicator-area.c * app/widgets/gimptoolbox.c * app/widgets/gimptooloptionseditor.c * app/widgets/gimpvectorstreeview.c * app/widgets/gimpwidgets-utils.c * app/display/gimpdisplayshell-scale.c * app/display/gimpnavigationview.c * app/gui/module-browser.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/drawable-commands.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gui-vtable.c * app/gui/gui.c * app/gui/info-window.c * app/gui/palette-import-dialog.c * app/gui/palettes-commands.c * app/gui/qmask-commands.c * app/gui/select-commands.c * app/gui/tool-options-commands.c * app/gui/view-commands.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpmeasuretool.c * app/tools/gimptransformtool.c * plug-ins/FractalExplorer/FractalExplorer.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c: changed accordingly. Changed all menu_position funcs to place the menu on the right screen.
This commit is contained in:
parent
bcd9794a99
commit
b62f8e9a75
50 changed files with 230 additions and 103 deletions
|
@ -311,6 +311,7 @@ gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool)
|
||||||
g_return_if_fail (tool->drawable != NULL);
|
g_return_if_fail (tool->drawable != NULL);
|
||||||
|
|
||||||
picker_tool->dialog = gimp_tool_dialog_new (tool->tool_info,
|
picker_tool->dialog = gimp_tool_dialog_new (tool->tool_info,
|
||||||
|
GIMP_TOOL (picker_tool)->gdisp->shell,
|
||||||
_("Color Picker Information"),
|
_("Color Picker Information"),
|
||||||
|
|
||||||
GTK_STOCK_CLOSE,
|
GTK_STOCK_CLOSE,
|
||||||
|
|
|
@ -957,6 +957,7 @@ crop_info_create (GimpCropTool *crop)
|
||||||
GIMP_OBJECT (tool->tool_info)->name,
|
GIMP_OBJECT (tool->tool_info)->name,
|
||||||
stock_id,
|
stock_id,
|
||||||
_("Crop & Resize Information"),
|
_("Crop & Resize Information"),
|
||||||
|
GTK_WIDGET (shell),
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
tool->tool_info->help_id);
|
tool->tool_info->help_id);
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,9 @@ gimp_image_map_tool_initialize (GimpTool *tool,
|
||||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
||||||
|
|
||||||
image_map_tool->shell = shell =
|
image_map_tool->shell = shell =
|
||||||
gimp_tool_dialog_new (tool_info, image_map_tool->shell_desc,
|
gimp_tool_dialog_new (tool_info,
|
||||||
|
gdisp->shell,
|
||||||
|
image_map_tool->shell_desc,
|
||||||
|
|
||||||
GIMP_STOCK_RESET, RESPONSE_RESET,
|
GIMP_STOCK_RESET, RESPONSE_RESET,
|
||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
|
|
|
@ -833,6 +833,7 @@ gimp_measure_tool_dialog_new (GimpMeasureTool *mtool)
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
|
||||||
dialog = gimp_tool_dialog_new (GIMP_TOOL (mtool)->tool_info,
|
dialog = gimp_tool_dialog_new (GIMP_TOOL (mtool)->tool_info,
|
||||||
|
GIMP_TOOL (mtool)->gdisp->shell,
|
||||||
_("Measure Distances and Angles"),
|
_("Measure Distances and Angles"),
|
||||||
|
|
||||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||||
|
|
|
@ -1275,6 +1275,7 @@ gimp_transform_tool_dialog (GimpTransformTool *tr_tool)
|
||||||
GIMP_OBJECT (tool_info)->name,
|
GIMP_OBJECT (tool_info)->name,
|
||||||
stock_id,
|
stock_id,
|
||||||
tr_tool->shell_desc,
|
tr_tool->shell_desc,
|
||||||
|
GIMP_TOOL (tr_tool)->gdisp->shell,
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
tool_info->help_id);
|
tool_info->help_id);
|
||||||
|
|
||||||
|
|
|
@ -770,6 +770,7 @@ gimp_colormap_preview_button_press (GtkWidget *widget,
|
||||||
gimp_colormap_editor_set_index (editor, col);
|
gimp_colormap_editor_set_index (editor, col);
|
||||||
gimp_item_factory_popup_with_data (GIMP_EDITOR (editor)->item_factory,
|
gimp_item_factory_popup_with_data (GIMP_EDITOR (editor)->item_factory,
|
||||||
GIMP_EDITOR (editor)->item_factory_data,
|
GIMP_EDITOR (editor)->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
@ -928,6 +929,7 @@ gimp_colormap_edit_clicked (GtkWidget *widget,
|
||||||
_("Edit Indexed Color"),
|
_("Edit Indexed Color"),
|
||||||
GIMP_STOCK_CONVERT_INDEXED,
|
GIMP_STOCK_CONVERT_INDEXED,
|
||||||
_("Edit Indexed Image Palette Color"),
|
_("Edit Indexed Image Palette Color"),
|
||||||
|
GTK_WIDGET (editor),
|
||||||
toplevel_factory,
|
toplevel_factory,
|
||||||
"gimp-colormap-editor-color-dialog",
|
"gimp-colormap-editor-color-dialog",
|
||||||
(const GimpRGB *) &color,
|
(const GimpRGB *) &color,
|
||||||
|
|
|
@ -258,6 +258,7 @@ gimp_color_panel_clicked (GtkButton *button)
|
||||||
{
|
{
|
||||||
panel->color_notebook =
|
panel->color_notebook =
|
||||||
color_notebook_new (GIMP_COLOR_BUTTON (button)->title,
|
color_notebook_new (GIMP_COLOR_BUTTON (button)->title,
|
||||||
|
GTK_WIDGET (button),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
(const GimpRGB *) &color,
|
(const GimpRGB *) &color,
|
||||||
gimp_color_panel_select_callback,
|
gimp_color_panel_select_callback,
|
||||||
|
|
|
@ -492,6 +492,7 @@ gimp_component_editor_button_press (GtkWidget *widget,
|
||||||
case 3:
|
case 3:
|
||||||
gimp_item_factory_popup_with_data (GIMP_EDITOR (editor)->item_factory,
|
gimp_item_factory_popup_with_data (GIMP_EDITOR (editor)->item_factory,
|
||||||
GIMP_EDITOR (editor)->item_factory_data,
|
GIMP_EDITOR (editor)->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -264,6 +264,7 @@ gimp_container_editor_real_context_item (GimpContainerEditor *editor,
|
||||||
if (gimp_editor->item_factory)
|
if (gimp_editor->item_factory)
|
||||||
gimp_item_factory_popup_with_data (gimp_editor->item_factory,
|
gimp_item_factory_popup_with_data (gimp_editor->item_factory,
|
||||||
gimp_editor->item_factory_data,
|
gimp_editor->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,7 +373,9 @@ gimp_container_grid_view_menu_position (GtkMenu *menu,
|
||||||
|
|
||||||
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
|
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
|
||||||
|
|
||||||
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
|
screen = gtk_widget_get_screen (widget);
|
||||||
|
|
||||||
|
gtk_menu_set_screen (menu, screen);
|
||||||
|
|
||||||
if (*x + requisition.width > gdk_screen_get_width (screen))
|
if (*x + requisition.width > gdk_screen_get_width (screen))
|
||||||
*x -= requisition.width;
|
*x -= requisition.width;
|
||||||
|
@ -401,6 +403,7 @@ gimp_container_grid_view_popup_menu (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
gimp_item_factory_popup_with_data (editor->item_factory,
|
gimp_item_factory_popup_with_data (editor->item_factory,
|
||||||
editor->item_factory_data,
|
editor->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
gimp_container_grid_view_menu_position,
|
gimp_container_grid_view_menu_position,
|
||||||
grid_view->selected_item,
|
grid_view->selected_item,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -591,6 +591,7 @@ gimp_container_popup_dialog_clicked (GtkWidget *button,
|
||||||
GimpContainerPopup *popup)
|
GimpContainerPopup *popup)
|
||||||
{
|
{
|
||||||
gimp_dialog_factory_dialog_raise (popup->dialog_factory,
|
gimp_dialog_factory_dialog_raise (popup->dialog_factory,
|
||||||
|
gtk_widget_get_screen (button),
|
||||||
popup->dialog_identifier, -1);
|
popup->dialog_identifier, -1);
|
||||||
g_signal_emit (popup, popup_signals[CONFIRM], 0);
|
g_signal_emit (popup, popup_signals[CONFIRM], 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,7 +317,9 @@ gimp_container_tree_view_menu_position (GtkMenu *menu,
|
||||||
|
|
||||||
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
|
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
|
||||||
|
|
||||||
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
|
screen = gtk_widget_get_screen (widget);
|
||||||
|
|
||||||
|
gtk_menu_set_screen (menu, screen);
|
||||||
|
|
||||||
if (*x + requisition.width > gdk_screen_get_width (screen))
|
if (*x + requisition.width > gdk_screen_get_width (screen))
|
||||||
*x -= requisition.width;
|
*x -= requisition.width;
|
||||||
|
@ -346,6 +348,7 @@ gimp_container_tree_view_popup_menu (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
gimp_item_factory_popup_with_data (editor->item_factory,
|
gimp_item_factory_popup_with_data (editor->item_factory,
|
||||||
editor->item_factory_data,
|
editor->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
gimp_container_tree_view_menu_position,
|
gimp_container_tree_view_menu_position,
|
||||||
editor,
|
editor,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -403,6 +403,7 @@ gimp_data_factory_view_delete_clicked (GtkWidget *widget,
|
||||||
GIMP_OBJECT (data)->name);
|
GIMP_OBJECT (data)->name);
|
||||||
|
|
||||||
dialog = gimp_query_boolean_box (_("Delete Data Object"),
|
dialog = gimp_query_boolean_box (_("Delete Data Object"),
|
||||||
|
GTK_WIDGET (view),
|
||||||
gimp_standard_help_func, NULL,
|
gimp_standard_help_func, NULL,
|
||||||
GIMP_STOCK_QUESTION,
|
GIMP_STOCK_QUESTION,
|
||||||
str,
|
str,
|
||||||
|
|
|
@ -433,5 +433,7 @@ gimp_device_status_preview_clicked (GtkWidget *widget,
|
||||||
|
|
||||||
dialog_factory = gimp_dialog_factory_from_name ("dock");
|
dialog_factory = gimp_dialog_factory_from_name ("dock");
|
||||||
|
|
||||||
gimp_dialog_factory_dialog_raise (dialog_factory, identifier, -1);
|
gimp_dialog_factory_dialog_raise (dialog_factory,
|
||||||
|
gtk_widget_get_screen (widget),
|
||||||
|
identifier, -1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,6 +374,7 @@ gimp_dialog_factory_find_session_info (GimpDialogFactory *factory,
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
||||||
|
GdkScreen *screen,
|
||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
const gchar *identifier,
|
const gchar *identifier,
|
||||||
gint preview_size,
|
gint preview_size,
|
||||||
|
@ -427,7 +428,7 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
||||||
{
|
{
|
||||||
GtkWidget *dockbook;
|
GtkWidget *dockbook;
|
||||||
|
|
||||||
dock = gimp_dialog_factory_dock_new (factory);
|
dock = gimp_dialog_factory_dock_new (factory, screen);
|
||||||
dockbook = gimp_dockbook_new (factory->menu_factory);
|
dockbook = gimp_dockbook_new (factory->menu_factory);
|
||||||
|
|
||||||
gimp_dock_add_book (GIMP_DOCK (dock),
|
gimp_dock_add_book (GIMP_DOCK (dock),
|
||||||
|
@ -509,6 +510,7 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
||||||
{
|
{
|
||||||
if (GTK_WIDGET_TOPLEVEL (dialog))
|
if (GTK_WIDGET_TOPLEVEL (dialog))
|
||||||
{
|
{
|
||||||
|
gtk_window_set_screen (GTK_WINDOW (dialog), screen);
|
||||||
gtk_window_present (GTK_WINDOW (dialog));
|
gtk_window_present (GTK_WINDOW (dialog));
|
||||||
}
|
}
|
||||||
else if (GIMP_IS_DOCKABLE (dialog))
|
else if (GIMP_IS_DOCKABLE (dialog))
|
||||||
|
@ -559,13 +561,16 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
||||||
|
GdkScreen *screen,
|
||||||
const gchar *identifier,
|
const gchar *identifier,
|
||||||
gint preview_size)
|
gint preview_size)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||||
|
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||||
g_return_val_if_fail (identifier != NULL, NULL);
|
g_return_val_if_fail (identifier != NULL, NULL);
|
||||||
|
|
||||||
return gimp_dialog_factory_dialog_new_internal (factory,
|
return gimp_dialog_factory_dialog_new_internal (factory,
|
||||||
|
screen,
|
||||||
factory->context,
|
factory->context,
|
||||||
identifier,
|
identifier,
|
||||||
preview_size,
|
preview_size,
|
||||||
|
@ -588,13 +593,16 @@ gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
||||||
|
GdkScreen *screen,
|
||||||
const gchar *identifier,
|
const gchar *identifier,
|
||||||
gint preview_size)
|
gint preview_size)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||||
|
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||||
g_return_val_if_fail (identifier != NULL, NULL);
|
g_return_val_if_fail (identifier != NULL, NULL);
|
||||||
|
|
||||||
return gimp_dialog_factory_dialog_new_internal (factory,
|
return gimp_dialog_factory_dialog_new_internal (factory,
|
||||||
|
screen,
|
||||||
NULL,
|
NULL,
|
||||||
identifier,
|
identifier,
|
||||||
preview_size,
|
preview_size,
|
||||||
|
@ -630,6 +638,7 @@ gimp_dialog_factory_dockable_new (GimpDialogFactory *factory,
|
||||||
g_return_val_if_fail (identifier != NULL, NULL);
|
g_return_val_if_fail (identifier != NULL, NULL);
|
||||||
|
|
||||||
return gimp_dialog_factory_dialog_new_internal (factory,
|
return gimp_dialog_factory_dialog_new_internal (factory,
|
||||||
|
gtk_widget_get_screen (GTK_WIDGET (dock)),
|
||||||
dock->context,
|
dock->context,
|
||||||
identifier,
|
identifier,
|
||||||
preview_size,
|
preview_size,
|
||||||
|
@ -648,17 +657,21 @@ gimp_dialog_factory_dockable_new (GimpDialogFactory *factory,
|
||||||
* Return value: the newly created #GimpDock.
|
* Return value: the newly created #GimpDock.
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_dialog_factory_dock_new (GimpDialogFactory *factory)
|
gimp_dialog_factory_dock_new (GimpDialogFactory *factory,
|
||||||
|
GdkScreen *screen)
|
||||||
{
|
{
|
||||||
GtkWidget *dock;
|
GtkWidget *dock;
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||||
|
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||||
g_return_val_if_fail (factory->new_dock_func != NULL, NULL);
|
g_return_val_if_fail (factory->new_dock_func != NULL, NULL);
|
||||||
|
|
||||||
dock = factory->new_dock_func (factory, factory->context, 0);
|
dock = factory->new_dock_func (factory, factory->context, 0);
|
||||||
|
|
||||||
if (dock)
|
if (dock)
|
||||||
{
|
{
|
||||||
|
gtk_window_set_screen (GTK_WINDOW (dock), screen);
|
||||||
|
|
||||||
gimp_dialog_factory_set_widget_data (dock, factory, NULL);
|
gimp_dialog_factory_set_widget_data (dock, factory, NULL);
|
||||||
|
|
||||||
gimp_dialog_factory_add_dialog (factory, dock);
|
gimp_dialog_factory_add_dialog (factory, dock);
|
||||||
|
|
|
@ -103,16 +103,19 @@ GimpSessionInfo * gimp_dialog_factory_find_session_info
|
||||||
const gchar *identifier);
|
const gchar *identifier);
|
||||||
|
|
||||||
GtkWidget * gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
GtkWidget * gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
||||||
|
GdkScreen *screen,
|
||||||
const gchar *identifier,
|
const gchar *identifier,
|
||||||
gint preview_size);
|
gint preview_size);
|
||||||
GtkWidget * gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
GtkWidget * gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
||||||
|
GdkScreen *screen,
|
||||||
const gchar *identifier,
|
const gchar *identifier,
|
||||||
gint preview_size);
|
gint preview_size);
|
||||||
GtkWidget * gimp_dialog_factory_dockable_new (GimpDialogFactory *factory,
|
GtkWidget * gimp_dialog_factory_dockable_new (GimpDialogFactory *factory,
|
||||||
GimpDock *dock,
|
GimpDock *dock,
|
||||||
const gchar *identifier,
|
const gchar *identifier,
|
||||||
gint preview_size);
|
gint preview_size);
|
||||||
GtkWidget * gimp_dialog_factory_dock_new (GimpDialogFactory *factory);
|
GtkWidget * gimp_dialog_factory_dock_new (GimpDialogFactory *factory,
|
||||||
|
GdkScreen *screen);
|
||||||
|
|
||||||
void gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
|
void gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
|
||||||
GtkWidget *dialog);
|
GtkWidget *dialog);
|
||||||
|
|
|
@ -809,7 +809,8 @@ gimp_dockable_detach (GimpDockable *dockable)
|
||||||
|
|
||||||
src_dock = dockable->dockbook->dock;
|
src_dock = dockable->dockbook->dock;
|
||||||
|
|
||||||
dock = gimp_dialog_factory_dock_new (src_dock->dialog_factory);
|
dock = gimp_dialog_factory_dock_new (src_dock->dialog_factory,
|
||||||
|
gtk_widget_get_screen (GTK_WIDGET (dockable)));
|
||||||
gimp_dock_setup (GIMP_DOCK (dock), src_dock);
|
gimp_dock_setup (GIMP_DOCK (dock), src_dock);
|
||||||
|
|
||||||
gtk_window_set_position (GTK_WINDOW (dock), GTK_WIN_POS_MOUSE);
|
gtk_window_set_position (GTK_WINDOW (dock), GTK_WIN_POS_MOUSE);
|
||||||
|
@ -954,6 +955,7 @@ gimp_dockable_show_menu (GimpDockable *dockable)
|
||||||
|
|
||||||
gimp_item_factory_popup_with_data (dockbook_item_factory,
|
gimp_item_factory_popup_with_data (dockbook_item_factory,
|
||||||
dockable,
|
dockable,
|
||||||
|
GTK_WIDGET (dockable),
|
||||||
gimp_dockable_menu_position,
|
gimp_dockable_menu_position,
|
||||||
dockable,
|
dockable,
|
||||||
(GtkDestroyNotify) gimp_dockable_menu_end);
|
(GtkDestroyNotify) gimp_dockable_menu_end);
|
||||||
|
|
|
@ -218,7 +218,7 @@ gimp_drawable_tree_view_new_dropped (GimpItemTreeView *view,
|
||||||
gimp_image_undo_group_start (view->gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
|
gimp_image_undo_group_start (view->gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
|
||||||
_("New Layer"));
|
_("New Layer"));
|
||||||
|
|
||||||
view->new_item_func (view->gimage, NULL, FALSE);
|
view->new_item_func (view->gimage, NULL, FALSE, GTK_WIDGET (view));
|
||||||
|
|
||||||
drawable = gimp_image_active_drawable (view->gimage);
|
drawable = gimp_image_active_drawable (view->gimage);
|
||||||
|
|
||||||
|
|
|
@ -303,6 +303,7 @@ gimp_error_console_button_press (GtkWidget *widget,
|
||||||
|
|
||||||
gimp_item_factory_popup_with_data (editor->item_factory,
|
gimp_item_factory_popup_with_data (editor->item_factory,
|
||||||
editor->item_factory_data,
|
editor->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -713,6 +713,7 @@ preview_events (GtkWidget *widget,
|
||||||
|
|
||||||
gimp_item_factory_popup_with_data (gimp_editor->item_factory,
|
gimp_item_factory_popup_with_data (gimp_editor->item_factory,
|
||||||
gimp_editor->item_factory_data,
|
gimp_editor->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1152,6 +1153,7 @@ control_button_press (GimpGradientEditor *editor,
|
||||||
|
|
||||||
gimp_item_factory_popup_with_data (gimp_editor->item_factory,
|
gimp_item_factory_popup_with_data (gimp_editor->item_factory,
|
||||||
gimp_editor->item_factory_data,
|
gimp_editor->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,7 @@ gimp_help_internal (Gimp *gimp,
|
||||||
{
|
{
|
||||||
GtkWidget *not_found =
|
GtkWidget *not_found =
|
||||||
gimp_query_boolean_box (_("Could not find GIMP Help Browser"),
|
gimp_query_boolean_box (_("Could not find GIMP Help Browser"),
|
||||||
NULL, NULL, FALSE,
|
NULL, NULL, NULL, FALSE,
|
||||||
_("Could not find the GIMP Help Browser procedure.\n"
|
_("Could not find the GIMP Help Browser procedure.\n"
|
||||||
"It probably was not compiled because\n"
|
"It probably was not compiled because\n"
|
||||||
"you don't have GtkXmHTML installed."),
|
"you don't have GtkXmHTML installed."),
|
||||||
|
@ -251,7 +251,7 @@ gimp_help_internal (Gimp *gimp,
|
||||||
{
|
{
|
||||||
GtkWidget *not_found =
|
GtkWidget *not_found =
|
||||||
gimp_query_boolean_box (_("Could not start GIMP Help Browser"),
|
gimp_query_boolean_box (_("Could not start GIMP Help Browser"),
|
||||||
NULL, NULL, FALSE,
|
NULL, NULL, NULL, FALSE,
|
||||||
_("Could not start the GIMP Help Browser."),
|
_("Could not start the GIMP Help Browser."),
|
||||||
_("Use web browser instead"),
|
_("Use web browser instead"),
|
||||||
GTK_STOCK_CANCEL,
|
GTK_STOCK_CANCEL,
|
||||||
|
|
|
@ -417,6 +417,7 @@ gimp_item_factory_update (GimpItemFactory *item_factory,
|
||||||
void
|
void
|
||||||
gimp_item_factory_popup_with_data (GimpItemFactory *item_factory,
|
gimp_item_factory_popup_with_data (GimpItemFactory *item_factory,
|
||||||
gpointer popup_data,
|
gpointer popup_data,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpMenuPositionFunc position_func,
|
GimpMenuPositionFunc position_func,
|
||||||
gpointer position_data,
|
gpointer position_data,
|
||||||
GtkDestroyNotify popdown_func)
|
GtkDestroyNotify popdown_func)
|
||||||
|
@ -427,6 +428,7 @@ gimp_item_factory_popup_with_data (GimpItemFactory *item_factory,
|
||||||
guint32 activate_time;
|
guint32 activate_time;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_ITEM_FACTORY (item_factory));
|
g_return_if_fail (GIMP_IS_ITEM_FACTORY (item_factory));
|
||||||
|
g_return_if_fail (GTK_IS_WIDGET (parent));
|
||||||
|
|
||||||
if (item_factory->update_on_popup)
|
if (item_factory->update_on_popup)
|
||||||
gimp_item_factory_update (item_factory, popup_data);
|
gimp_item_factory_update (item_factory, popup_data);
|
||||||
|
@ -434,7 +436,7 @@ gimp_item_factory_popup_with_data (GimpItemFactory *item_factory,
|
||||||
if (! position_func)
|
if (! position_func)
|
||||||
{
|
{
|
||||||
position_func = gimp_menu_position;
|
position_func = gimp_menu_position;
|
||||||
position_data = NULL;
|
position_data = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
(* position_func) (GTK_MENU (GTK_ITEM_FACTORY (item_factory)->widget),
|
(* position_func) (GTK_MENU (GTK_ITEM_FACTORY (item_factory)->widget),
|
||||||
|
|
|
@ -100,6 +100,7 @@ void gimp_item_factory_update (GimpItemFactory *item_factory,
|
||||||
gpointer popup_data);
|
gpointer popup_data);
|
||||||
void gimp_item_factory_popup_with_data (GimpItemFactory *factory,
|
void gimp_item_factory_popup_with_data (GimpItemFactory *factory,
|
||||||
gpointer popup_data,
|
gpointer popup_data,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpMenuPositionFunc position_func,
|
GimpMenuPositionFunc position_func,
|
||||||
gpointer position_data,
|
gpointer position_data,
|
||||||
GtkDestroyNotify popdown_func);
|
GtkDestroyNotify popdown_func);
|
||||||
|
|
|
@ -776,7 +776,7 @@ gimp_item_tree_view_activate_item (GimpContainerView *view,
|
||||||
item,
|
item,
|
||||||
insert_data);
|
insert_data);
|
||||||
|
|
||||||
item_view->activate_item_func (GIMP_ITEM (item));
|
item_view->activate_item_func (GIMP_ITEM (item), GTK_WIDGET (view));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -796,6 +796,7 @@ gimp_item_tree_view_context_item (GimpContainerView *view,
|
||||||
if (editor->item_factory)
|
if (editor->item_factory)
|
||||||
gimp_item_factory_popup_with_data (editor->item_factory,
|
gimp_item_factory_popup_with_data (editor->item_factory,
|
||||||
editor->item_factory_data,
|
editor->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -902,7 +903,7 @@ gimp_item_tree_view_edit_clicked (GtkWidget *widget,
|
||||||
item = GIMP_ITEM_TREE_VIEW_GET_CLASS (view)->get_active_item (view->gimage);
|
item = GIMP_ITEM_TREE_VIEW_GET_CLASS (view)->get_active_item (view->gimage);
|
||||||
|
|
||||||
if (item)
|
if (item)
|
||||||
view->edit_item_func (item);
|
view->edit_item_func (item, GTK_WIDGET (view));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -912,7 +913,7 @@ static void
|
||||||
gimp_item_tree_view_new_clicked (GtkWidget *widget,
|
gimp_item_tree_view_new_clicked (GtkWidget *widget,
|
||||||
GimpItemTreeView *view)
|
GimpItemTreeView *view)
|
||||||
{
|
{
|
||||||
view->new_item_func (view->gimage, NULL, TRUE);
|
view->new_item_func (view->gimage, NULL, TRUE, GTK_WIDGET (view));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -927,7 +928,8 @@ gimp_item_tree_view_new_dropped (GtkWidget *widget,
|
||||||
if (viewable && gimp_container_have (GIMP_CONTAINER_VIEW (view)->container,
|
if (viewable && gimp_container_have (GIMP_CONTAINER_VIEW (view)->container,
|
||||||
GIMP_OBJECT (viewable)))
|
GIMP_OBJECT (viewable)))
|
||||||
{
|
{
|
||||||
view->new_item_func (view->gimage, GIMP_ITEM (viewable), FALSE);
|
view->new_item_func (view->gimage, GIMP_ITEM (viewable), FALSE,
|
||||||
|
GTK_WIDGET (view));
|
||||||
|
|
||||||
gimp_image_flush (view->gimage);
|
gimp_image_flush (view->gimage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,11 +41,14 @@ typedef void (* GimpAddItemFunc) (GimpImage *gimage,
|
||||||
typedef void (* GimpRemoveItemFunc) (GimpImage *gimage,
|
typedef void (* GimpRemoveItemFunc) (GimpImage *gimage,
|
||||||
GimpItem *item);
|
GimpItem *item);
|
||||||
|
|
||||||
typedef void (* GimpEditItemFunc) (GimpItem *item);
|
typedef void (* GimpEditItemFunc) (GimpItem *item,
|
||||||
|
GtkWidget *parent);
|
||||||
typedef void (* GimpNewItemFunc) (GimpImage *gimage,
|
typedef void (* GimpNewItemFunc) (GimpImage *gimage,
|
||||||
GimpItem *template,
|
GimpItem *template,
|
||||||
gboolean interactive);
|
gboolean interactive,
|
||||||
typedef void (* GimpActivateItemFunc) (GimpItem *item);
|
GtkWidget *parent);
|
||||||
|
typedef void (* GimpActivateItemFunc) (GimpItem *item,
|
||||||
|
GtkWidget *parent);
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_ITEM_TREE_VIEW (gimp_item_tree_view_get_type ())
|
#define GIMP_TYPE_ITEM_TREE_VIEW (gimp_item_tree_view_get_type ())
|
||||||
|
|
|
@ -600,6 +600,7 @@ palette_editor_eventbox_button_press (GtkWidget *widget,
|
||||||
|
|
||||||
gimp_item_factory_popup_with_data (gimp_editor->item_factory,
|
gimp_item_factory_popup_with_data (gimp_editor->item_factory,
|
||||||
gimp_editor->item_factory_data,
|
gimp_editor->item_factory_data,
|
||||||
|
GTK_WIDGET (editor),
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1091,6 +1092,7 @@ palette_editor_edit_clicked (GtkWidget *widget,
|
||||||
_("Edit Palette Color"),
|
_("Edit Palette Color"),
|
||||||
GTK_STOCK_SELECT_COLOR,
|
GTK_STOCK_SELECT_COLOR,
|
||||||
_("Edit Color Palette Entry"),
|
_("Edit Color Palette Entry"),
|
||||||
|
GTK_WIDGET (editor),
|
||||||
toplevel_factory,
|
toplevel_factory,
|
||||||
"gimp-palette-editor-color-dialog",
|
"gimp-palette-editor-color-dialog",
|
||||||
(const GimpRGB *) &editor->color->color,
|
(const GimpRGB *) &editor->color->color,
|
||||||
|
|
|
@ -181,9 +181,13 @@ gimp_preview_popup_timeout (GimpPreviewPopup *popup)
|
||||||
|
|
||||||
popup->timeout_id = 0;
|
popup->timeout_id = 0;
|
||||||
|
|
||||||
|
screen = gtk_widget_get_screen (popup->widget);
|
||||||
|
|
||||||
window = gtk_window_new (GTK_WINDOW_POPUP);
|
window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
gtk_window_set_screen (GTK_WINDOW (window), screen);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
||||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||||
|
@ -200,7 +204,6 @@ gimp_preview_popup_timeout (GimpPreviewPopup *popup)
|
||||||
|
|
||||||
gdk_window_get_origin (popup->widget->window, &orig_x, &orig_y);
|
gdk_window_get_origin (popup->widget->window, &orig_x, &orig_y);
|
||||||
|
|
||||||
screen = gtk_widget_get_screen (popup->widget);
|
|
||||||
scr_width = gdk_screen_get_width (screen);
|
scr_width = gdk_screen_get_width (screen);
|
||||||
scr_height = gdk_screen_get_height (screen);
|
scr_height = gdk_screen_get_height (screen);
|
||||||
|
|
||||||
|
|
|
@ -354,7 +354,8 @@ gimp_selection_editor_stroke_clicked (GtkWidget *widget,
|
||||||
GimpSelectionEditor *sel_editor = GIMP_SELECTION_EDITOR (editor);
|
GimpSelectionEditor *sel_editor = GIMP_SELECTION_EDITOR (editor);
|
||||||
|
|
||||||
if (sel_editor->stroke_item_func)
|
if (sel_editor->stroke_item_func)
|
||||||
sel_editor->stroke_item_func (GIMP_ITEM (gimp_image_get_mask (editor->gimage)));
|
sel_editor->stroke_item_func (GIMP_ITEM (gimp_image_get_mask (editor->gimage)),
|
||||||
|
GTK_WIDGET (editor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -541,6 +541,7 @@ gimp_session_info_restore (GimpSessionInfo *info,
|
||||||
|
|
||||||
dialog =
|
dialog =
|
||||||
gimp_dialog_factory_dialog_new (factory,
|
gimp_dialog_factory_dialog_new (factory,
|
||||||
|
gdk_screen_get_default (),
|
||||||
info->toplevel_entry->identifier,
|
info->toplevel_entry->identifier,
|
||||||
info->toplevel_entry->preview_size);
|
info->toplevel_entry->preview_size);
|
||||||
|
|
||||||
|
@ -552,7 +553,8 @@ gimp_session_info_restore (GimpSessionInfo *info,
|
||||||
GimpDock *dock;
|
GimpDock *dock;
|
||||||
GList *books;
|
GList *books;
|
||||||
|
|
||||||
dock = GIMP_DOCK (gimp_dialog_factory_dock_new (factory));
|
dock = GIMP_DOCK (gimp_dialog_factory_dock_new (factory,
|
||||||
|
gdk_screen_get_default ()));
|
||||||
|
|
||||||
if (dock && info->aux_info)
|
if (dock && info->aux_info)
|
||||||
session_info_set_aux_info (GTK_WIDGET (dock), info->aux_info);
|
session_info_set_aux_info (GTK_WIDGET (dock), info->aux_info);
|
||||||
|
|
|
@ -254,7 +254,8 @@ gimp_template_view_create_clicked (GtkWidget *widget,
|
||||||
GIMP_OBJECT (template)))
|
GIMP_OBJECT (template)))
|
||||||
{
|
{
|
||||||
if (view->create_image_func)
|
if (view->create_image_func)
|
||||||
view->create_image_func (editor->view->context->gimp, template);
|
view->create_image_func (editor->view->context->gimp, template,
|
||||||
|
GTK_WIDGET (view));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +276,8 @@ gimp_template_view_new_clicked (GtkWidget *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (view->new_template_func)
|
if (view->new_template_func)
|
||||||
view->new_template_func (editor->view->context->gimp, NULL);
|
view->new_template_func (editor->view->context->gimp, NULL,
|
||||||
|
GTK_WIDGET (view));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -305,7 +307,8 @@ gimp_template_view_duplicate_clicked (GtkWidget *widget,
|
||||||
GIMP_OBJECT (new_template));
|
GIMP_OBJECT (new_template));
|
||||||
|
|
||||||
if (view->edit_template_func)
|
if (view->edit_template_func)
|
||||||
view->edit_template_func (editor->view->context->gimp, new_template);
|
view->edit_template_func (editor->view->context->gimp, new_template,
|
||||||
|
GTK_WIDGET (view));
|
||||||
|
|
||||||
g_object_unref (new_template);
|
g_object_unref (new_template);
|
||||||
}
|
}
|
||||||
|
@ -326,7 +329,8 @@ gimp_template_view_edit_clicked (GtkWidget *widget,
|
||||||
GIMP_OBJECT (template)))
|
GIMP_OBJECT (template)))
|
||||||
{
|
{
|
||||||
if (view->edit_template_func)
|
if (view->edit_template_func)
|
||||||
view->edit_template_func (editor->view->context->gimp, template);
|
view->edit_template_func (editor->view->context->gimp, template,
|
||||||
|
GTK_WIDGET (view));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,6 +390,7 @@ gimp_template_view_delete_clicked (GtkWidget *widget,
|
||||||
GIMP_OBJECT (template)->name);
|
GIMP_OBJECT (template)->name);
|
||||||
|
|
||||||
dialog = gimp_query_boolean_box (_("Delete Template"),
|
dialog = gimp_query_boolean_box (_("Delete Template"),
|
||||||
|
GTK_WIDGET (view),
|
||||||
gimp_standard_help_func, NULL,
|
gimp_standard_help_func, NULL,
|
||||||
GIMP_STOCK_QUESTION,
|
GIMP_STOCK_QUESTION,
|
||||||
str,
|
str,
|
||||||
|
@ -443,7 +448,8 @@ gimp_template_view_activate_item (GimpContainerEditor *editor,
|
||||||
{
|
{
|
||||||
if (view->create_image_func)
|
if (view->create_image_func)
|
||||||
view->create_image_func (editor->view->context->gimp,
|
view->create_image_func (editor->view->context->gimp,
|
||||||
GIMP_TEMPLATE (viewable));
|
GIMP_TEMPLATE (viewable),
|
||||||
|
GTK_WIDGET (editor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
|
|
||||||
|
|
||||||
typedef void (* GimpTemplateActionFunc) (Gimp *gimp,
|
typedef void (* GimpTemplateActionFunc) (Gimp *gimp,
|
||||||
GimpTemplate *template);
|
GimpTemplate *template,
|
||||||
|
GtkWidget *parent);
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_TEMPLATE_VIEW (gimp_template_view_get_type ())
|
#define GIMP_TYPE_TEMPLATE_VIEW (gimp_template_view_get_type ())
|
||||||
|
|
|
@ -78,7 +78,8 @@ static void color_area_select_callback (ColorNotebook *color_notebook,
|
||||||
const GimpRGB *color,
|
const GimpRGB *color,
|
||||||
ColorNotebookState state,
|
ColorNotebookState state,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void color_area_edit (GimpContext *context);
|
static void color_area_edit (GimpContext *context,
|
||||||
|
GtkWidget *widget);
|
||||||
static void color_area_drop_color (GtkWidget *widget,
|
static void color_area_drop_color (GtkWidget *widget,
|
||||||
const GimpRGB *color,
|
const GimpRGB *color,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
@ -349,7 +350,8 @@ color_area_select_callback (ColorNotebook *color_notebook,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
color_area_edit (GimpContext *context)
|
color_area_edit (GimpContext *context,
|
||||||
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GimpRGB color;
|
GimpRGB color;
|
||||||
const gchar *title;
|
const gchar *title;
|
||||||
|
@ -379,6 +381,7 @@ color_area_edit (GimpContext *context)
|
||||||
toplevel_factory = gimp_dialog_factory_from_name ("toplevel");
|
toplevel_factory = gimp_dialog_factory_from_name ("toplevel");
|
||||||
|
|
||||||
color_notebook = color_notebook_new (title,
|
color_notebook = color_notebook_new (title,
|
||||||
|
widget,
|
||||||
toplevel_factory,
|
toplevel_factory,
|
||||||
"gimp-toolbox-color-dialog",
|
"gimp-toolbox-color-dialog",
|
||||||
(const GimpRGB *) &color,
|
(const GimpRGB *) &color,
|
||||||
|
@ -461,7 +464,7 @@ color_area_events (GtkWidget *widget,
|
||||||
{
|
{
|
||||||
case FORE_AREA:
|
case FORE_AREA:
|
||||||
case BACK_AREA:
|
case BACK_AREA:
|
||||||
color_area_edit (context);
|
color_area_edit (context, widget);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -53,6 +53,7 @@ brush_preview_clicked (GtkWidget *widget,
|
||||||
GimpToolbox *toolbox)
|
GimpToolbox *toolbox)
|
||||||
{
|
{
|
||||||
gimp_dialog_factory_dialog_raise (GIMP_DOCK (toolbox)->dialog_factory,
|
gimp_dialog_factory_dialog_raise (GIMP_DOCK (toolbox)->dialog_factory,
|
||||||
|
gtk_widget_get_screen (widget),
|
||||||
"gimp-brush-grid", -1);
|
"gimp-brush-grid", -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +75,7 @@ pattern_preview_clicked (GtkWidget *widget,
|
||||||
GimpToolbox *toolbox)
|
GimpToolbox *toolbox)
|
||||||
{
|
{
|
||||||
gimp_dialog_factory_dialog_raise (GIMP_DOCK (toolbox)->dialog_factory,
|
gimp_dialog_factory_dialog_raise (GIMP_DOCK (toolbox)->dialog_factory,
|
||||||
|
gtk_widget_get_screen (widget),
|
||||||
"gimp-pattern-grid", -1);
|
"gimp-pattern-grid", -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +97,7 @@ gradient_preview_clicked (GtkWidget *widget,
|
||||||
GimpToolbox *toolbox)
|
GimpToolbox *toolbox)
|
||||||
{
|
{
|
||||||
gimp_dialog_factory_dialog_raise (GIMP_DOCK (toolbox)->dialog_factory,
|
gimp_dialog_factory_dialog_raise (GIMP_DOCK (toolbox)->dialog_factory,
|
||||||
|
gtk_widget_get_screen (widget),
|
||||||
"gimp-gradient-list", -1);
|
"gimp-gradient-list", -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -814,6 +814,7 @@ toolbox_tool_button_press (GtkWidget *widget,
|
||||||
if ((event->type == GDK_2BUTTON_PRESS) && (event->button == 1))
|
if ((event->type == GDK_2BUTTON_PRESS) && (event->button == 1))
|
||||||
{
|
{
|
||||||
gimp_dialog_factory_dialog_raise (GIMP_DOCK (toolbox)->dialog_factory,
|
gimp_dialog_factory_dialog_raise (GIMP_DOCK (toolbox)->dialog_factory,
|
||||||
|
gtk_widget_get_screen (widget),
|
||||||
"gimp-tool-options",
|
"gimp-tool-options",
|
||||||
-1);
|
-1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_tool_dialog_new (GimpToolInfo *tool_info,
|
gimp_tool_dialog_new (GimpToolInfo *tool_info,
|
||||||
|
GtkWidget *parent,
|
||||||
const gchar *desc,
|
const gchar *desc,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
|
@ -60,6 +61,7 @@ gimp_tool_dialog_new (GimpToolInfo *tool_info,
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_TOOL_INFO (tool_info), NULL);
|
g_return_val_if_fail (GIMP_IS_TOOL_INFO (tool_info), NULL);
|
||||||
|
g_return_val_if_fail (GTK_IS_WIDGET (parent), NULL);
|
||||||
|
|
||||||
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
|
||||||
|
|
||||||
|
@ -68,6 +70,7 @@ gimp_tool_dialog_new (GimpToolInfo *tool_info,
|
||||||
GIMP_OBJECT (tool_info)->name,
|
GIMP_OBJECT (tool_info)->name,
|
||||||
stock_id,
|
stock_id,
|
||||||
desc ? desc : tool_info->help,
|
desc ? desc : tool_info->help,
|
||||||
|
parent,
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
tool_info->help_id,
|
tool_info->help_id,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
|
|
||||||
GtkWidget * gimp_tool_dialog_new (GimpToolInfo *tool_info,
|
GtkWidget * gimp_tool_dialog_new (GimpToolInfo *tool_info,
|
||||||
|
GtkWidget *parent,
|
||||||
const gchar *desc,
|
const gchar *desc,
|
||||||
...);
|
...);
|
||||||
|
|
||||||
|
|
|
@ -409,6 +409,7 @@ gimp_tool_options_editor_reset_ext_clicked (GtkWidget *widget,
|
||||||
GtkWidget *qbox;
|
GtkWidget *qbox;
|
||||||
|
|
||||||
qbox = gimp_query_boolean_box (_("Reset Tool Options"),
|
qbox = gimp_query_boolean_box (_("Reset Tool Options"),
|
||||||
|
GTK_WIDGET (editor),
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
GIMP_HELP_TOOL_OPTIONS_RESET,
|
GIMP_HELP_TOOL_OPTIONS_RESET,
|
||||||
GTK_STOCK_DIALOG_QUESTION,
|
GTK_STOCK_DIALOG_QUESTION,
|
||||||
|
|
|
@ -320,5 +320,5 @@ gimp_vectors_tree_view_stroke_clicked (GtkWidget *widget,
|
||||||
item = GIMP_ITEM_TREE_VIEW_GET_CLASS (view)->get_active_item (gimage);
|
item = GIMP_ITEM_TREE_VIEW_GET_CLASS (view)->get_active_item (gimage);
|
||||||
|
|
||||||
if (item && view->stroke_item_func)
|
if (item && view->stroke_item_func)
|
||||||
view->stroke_item_func (item);
|
view->stroke_item_func (item, GTK_WIDGET (view));
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,9 +181,13 @@ gimp_preview_popup_timeout (GimpPreviewPopup *popup)
|
||||||
|
|
||||||
popup->timeout_id = 0;
|
popup->timeout_id = 0;
|
||||||
|
|
||||||
|
screen = gtk_widget_get_screen (popup->widget);
|
||||||
|
|
||||||
window = gtk_window_new (GTK_WINDOW_POPUP);
|
window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
gtk_window_set_screen (GTK_WINDOW (window), screen);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
||||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||||
|
@ -200,7 +204,6 @@ gimp_preview_popup_timeout (GimpPreviewPopup *popup)
|
||||||
|
|
||||||
gdk_window_get_origin (popup->widget->window, &orig_x, &orig_y);
|
gdk_window_get_origin (popup->widget->window, &orig_x, &orig_y);
|
||||||
|
|
||||||
screen = gtk_widget_get_screen (popup->widget);
|
|
||||||
scr_width = gdk_screen_get_width (screen);
|
scr_width = gdk_screen_get_width (screen);
|
||||||
scr_height = gdk_screen_get_height (screen);
|
scr_height = gdk_screen_get_height (screen);
|
||||||
|
|
||||||
|
|
|
@ -157,6 +157,7 @@ gimp_viewable_dialog_new (GimpViewable *viewable,
|
||||||
const gchar *role,
|
const gchar *role,
|
||||||
const gchar *stock_id,
|
const gchar *stock_id,
|
||||||
const gchar *desc,
|
const gchar *desc,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_id,
|
const gchar *help_id,
|
||||||
...)
|
...)
|
||||||
|
@ -169,6 +170,7 @@ gimp_viewable_dialog_new (GimpViewable *viewable,
|
||||||
g_return_val_if_fail (! viewable || GIMP_IS_VIEWABLE (viewable), NULL);
|
g_return_val_if_fail (! viewable || GIMP_IS_VIEWABLE (viewable), NULL);
|
||||||
g_return_val_if_fail (title != NULL, NULL);
|
g_return_val_if_fail (title != NULL, NULL);
|
||||||
g_return_val_if_fail (role != NULL, NULL);
|
g_return_val_if_fail (role != NULL, NULL);
|
||||||
|
g_return_val_if_fail (parent == NULL || GTK_IS_WIDGET (parent), NULL);
|
||||||
|
|
||||||
dialog = g_object_new (GIMP_TYPE_VIEWABLE_DIALOG,
|
dialog = g_object_new (GIMP_TYPE_VIEWABLE_DIALOG,
|
||||||
"title", title,
|
"title", title,
|
||||||
|
@ -176,6 +178,16 @@ gimp_viewable_dialog_new (GimpViewable *viewable,
|
||||||
|
|
||||||
gtk_window_set_role (GTK_WINDOW (dialog), role);
|
gtk_window_set_role (GTK_WINDOW (dialog), role);
|
||||||
|
|
||||||
|
if (parent)
|
||||||
|
{
|
||||||
|
if (GTK_IS_WINDOW (parent))
|
||||||
|
gtk_window_set_transient_for (GTK_WINDOW (dialog),
|
||||||
|
GTK_WINDOW (parent));
|
||||||
|
else
|
||||||
|
gtk_window_set_screen (GTK_WINDOW (dialog),
|
||||||
|
gtk_widget_get_screen (parent));
|
||||||
|
}
|
||||||
|
|
||||||
if (help_func)
|
if (help_func)
|
||||||
gimp_help_connect (GTK_WIDGET (dialog), help_func, help_id, dialog);
|
gimp_help_connect (GTK_WIDGET (dialog), help_func, help_id, dialog);
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ GtkWidget * gimp_viewable_dialog_new (GimpViewable *viewable,
|
||||||
const gchar *role,
|
const gchar *role,
|
||||||
const gchar *stock_id,
|
const gchar *stock_id,
|
||||||
const gchar *desc,
|
const gchar *desc,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_id,
|
const gchar *help_id,
|
||||||
...);
|
...);
|
||||||
|
|
|
@ -257,13 +257,15 @@ gimp_menu_position (GtkMenu *menu,
|
||||||
g_return_if_fail (GTK_IS_MENU (menu));
|
g_return_if_fail (GTK_IS_MENU (menu));
|
||||||
g_return_if_fail (x != NULL);
|
g_return_if_fail (x != NULL);
|
||||||
g_return_if_fail (y != NULL);
|
g_return_if_fail (y != NULL);
|
||||||
|
g_return_if_fail (GTK_IS_WIDGET (data));
|
||||||
|
|
||||||
gdk_window_get_pointer (NULL, &pointer_x, &pointer_y, NULL);
|
gdk_display_get_pointer (gtk_widget_get_display (GTK_WIDGET (data)),
|
||||||
|
&screen, &pointer_x, &pointer_y, NULL);
|
||||||
|
|
||||||
|
gtk_menu_set_screen (menu, screen);
|
||||||
|
|
||||||
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
|
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
|
||||||
|
|
||||||
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
|
|
||||||
|
|
||||||
screen_width = gdk_screen_get_width (screen);
|
screen_width = gdk_screen_get_width (screen);
|
||||||
screen_height = gdk_screen_get_height (screen);
|
screen_height = gdk_screen_get_height (screen);
|
||||||
|
|
||||||
|
@ -327,7 +329,9 @@ gimp_button_menu_position (GtkWidget *button,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
|
screen = gtk_widget_get_screen (GTK_WIDGET (button));
|
||||||
|
|
||||||
|
gtk_menu_set_screen (menu, screen);
|
||||||
|
|
||||||
gdk_window_get_origin (button->window, x, y);
|
gdk_window_get_origin (button->window, x, y);
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,8 @@ typedef void (* GimpMenuPositionFunc) (GtkMenu *menu,
|
||||||
gint *y,
|
gint *y,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
typedef void (* GimpStrokeItemFunc) (GimpItem *item);
|
typedef void (* GimpStrokeItemFunc) (GimpItem *item,
|
||||||
|
GtkWidget *parent);
|
||||||
typedef void (* GimpSelectionToVectorsFunc) (GimpImage *gimage,
|
typedef void (* GimpSelectionToVectorsFunc) (GimpImage *gimage,
|
||||||
gboolean advanced);
|
gboolean advanced);
|
||||||
|
|
||||||
|
|
|
@ -227,6 +227,9 @@ gimp_color_button_button_press (GtkWidget *widget,
|
||||||
x += widget->allocation.x;
|
x += widget->allocation.x;
|
||||||
y += widget->allocation.y;
|
y += widget->allocation.y;
|
||||||
|
|
||||||
|
gtk_menu_set_screen (GTK_MENU (button->item_factory->widget),
|
||||||
|
gtk_widget_get_screen (widget));
|
||||||
|
|
||||||
gtk_item_factory_popup (button->item_factory,
|
gtk_item_factory_popup (button->item_factory,
|
||||||
x + bevent->x, y + bevent->y,
|
x + bevent->x, y + bevent->y,
|
||||||
bevent->button, bevent->time);
|
bevent->button, bevent->time);
|
||||||
|
|
|
@ -219,6 +219,8 @@ gimp_dialog_new_valist (const gchar *title,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
gtk_window_set_screen (GTK_WINDOW (dialog),
|
||||||
|
gtk_widget_get_screen (parent));
|
||||||
/* TODO */
|
/* TODO */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@ struct _QueryBox
|
||||||
|
|
||||||
|
|
||||||
static QueryBox * create_query_box (const gchar *title,
|
static QueryBox * create_query_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
GCallback response_callback,
|
GCallback response_callback,
|
||||||
|
@ -93,6 +94,7 @@ static void query_box_cancel_callback (QueryBox *query_box);
|
||||||
*/
|
*/
|
||||||
static QueryBox *
|
static QueryBox *
|
||||||
create_query_box (const gchar *title,
|
create_query_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
GCallback response_callback,
|
GCallback response_callback,
|
||||||
|
@ -111,13 +113,14 @@ create_query_box (const gchar *title,
|
||||||
|
|
||||||
/* make sure the object / signal passed are valid
|
/* make sure the object / signal passed are valid
|
||||||
*/
|
*/
|
||||||
|
g_return_val_if_fail (parent == NULL || GTK_IS_WIDGET (parent), NULL);
|
||||||
g_return_val_if_fail (object == NULL || G_IS_OBJECT (object), NULL);
|
g_return_val_if_fail (object == NULL || G_IS_OBJECT (object), NULL);
|
||||||
g_return_val_if_fail (object == NULL || signal != NULL, NULL);
|
g_return_val_if_fail (object == NULL || signal != NULL, NULL);
|
||||||
|
|
||||||
query_box = g_new0 (QueryBox, 1);
|
query_box = g_new0 (QueryBox, 1);
|
||||||
|
|
||||||
query_box->qbox = gimp_dialog_new (title, "gimp-query-box",
|
query_box->qbox = gimp_dialog_new (title, "gimp-query-box",
|
||||||
NULL, 0,
|
parent, 0,
|
||||||
help_func, help_data,
|
help_func, help_data,
|
||||||
|
|
||||||
cancel_button, GTK_RESPONSE_CANCEL,
|
cancel_button, GTK_RESPONSE_CANCEL,
|
||||||
|
@ -201,6 +204,7 @@ create_query_box (const gchar *title,
|
||||||
/**
|
/**
|
||||||
* gimp_query_string_box:
|
* gimp_query_string_box:
|
||||||
* @title: The query box dialog's title.
|
* @title: The query box dialog's title.
|
||||||
|
* @parent: The dialog's parent widget.
|
||||||
* @help_func: The help function to show this dialog's help page.
|
* @help_func: The help function to show this dialog's help page.
|
||||||
* @help_data: A string pointing to this dialog's html help page.
|
* @help_data: A string pointing to this dialog's html help page.
|
||||||
* @message: A string which will be shown above the dialog's entry widget.
|
* @message: A string which will be shown above the dialog's entry widget.
|
||||||
|
@ -216,6 +220,7 @@ create_query_box (const gchar *title,
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_query_string_box (const gchar *title,
|
gimp_query_string_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
|
@ -228,7 +233,7 @@ gimp_query_string_box (const gchar *title,
|
||||||
QueryBox *query_box;
|
QueryBox *query_box;
|
||||||
GtkWidget *entry;
|
GtkWidget *entry;
|
||||||
|
|
||||||
query_box = create_query_box (title, help_func, help_data,
|
query_box = create_query_box (title, parent, help_func, help_data,
|
||||||
G_CALLBACK (string_query_box_response),
|
G_CALLBACK (string_query_box_response),
|
||||||
GTK_STOCK_DIALOG_QUESTION,
|
GTK_STOCK_DIALOG_QUESTION,
|
||||||
message,
|
message,
|
||||||
|
@ -254,6 +259,7 @@ gimp_query_string_box (const gchar *title,
|
||||||
/**
|
/**
|
||||||
* gimp_query_int_box:
|
* gimp_query_int_box:
|
||||||
* @title: The query box dialog's title.
|
* @title: The query box dialog's title.
|
||||||
|
* @parent: The dialog's parent widget.
|
||||||
* @help_func: The help function to show this dialog's help page.
|
* @help_func: The help function to show this dialog's help page.
|
||||||
* @help_data: A string pointing to this dialog's html help page.
|
* @help_data: A string pointing to this dialog's html help page.
|
||||||
* @message: A string which will be shown above the dialog's entry widget.
|
* @message: A string which will be shown above the dialog's entry widget.
|
||||||
|
@ -271,6 +277,7 @@ gimp_query_string_box (const gchar *title,
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_query_int_box (const gchar *title,
|
gimp_query_int_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
|
@ -286,7 +293,7 @@ gimp_query_int_box (const gchar *title,
|
||||||
GtkWidget *spinbutton;
|
GtkWidget *spinbutton;
|
||||||
GtkObject *adjustment;
|
GtkObject *adjustment;
|
||||||
|
|
||||||
query_box = create_query_box (title, help_func, help_data,
|
query_box = create_query_box (title, parent, help_func, help_data,
|
||||||
G_CALLBACK (int_query_box_response),
|
G_CALLBACK (int_query_box_response),
|
||||||
GTK_STOCK_DIALOG_QUESTION,
|
GTK_STOCK_DIALOG_QUESTION,
|
||||||
message,
|
message,
|
||||||
|
@ -312,6 +319,7 @@ gimp_query_int_box (const gchar *title,
|
||||||
/**
|
/**
|
||||||
* gimp_query_double_box:
|
* gimp_query_double_box:
|
||||||
* @title: The query box dialog's title.
|
* @title: The query box dialog's title.
|
||||||
|
* @parent: The dialog's parent widget.
|
||||||
* @help_func: The help function to show this dialog's help page.
|
* @help_func: The help function to show this dialog's help page.
|
||||||
* @help_data: A string pointing to this dialog's html help page.
|
* @help_data: A string pointing to this dialog's html help page.
|
||||||
* @message: A string which will be shown above the dialog's entry widget.
|
* @message: A string which will be shown above the dialog's entry widget.
|
||||||
|
@ -330,6 +338,7 @@ gimp_query_int_box (const gchar *title,
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_query_double_box (const gchar *title,
|
gimp_query_double_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
|
@ -346,7 +355,7 @@ gimp_query_double_box (const gchar *title,
|
||||||
GtkWidget *spinbutton;
|
GtkWidget *spinbutton;
|
||||||
GtkObject *adjustment;
|
GtkObject *adjustment;
|
||||||
|
|
||||||
query_box = create_query_box (title, help_func, help_data,
|
query_box = create_query_box (title, parent, help_func, help_data,
|
||||||
G_CALLBACK (double_query_box_response),
|
G_CALLBACK (double_query_box_response),
|
||||||
GTK_STOCK_DIALOG_QUESTION,
|
GTK_STOCK_DIALOG_QUESTION,
|
||||||
message,
|
message,
|
||||||
|
@ -372,6 +381,7 @@ gimp_query_double_box (const gchar *title,
|
||||||
/**
|
/**
|
||||||
* gimp_query_size_box:
|
* gimp_query_size_box:
|
||||||
* @title: The query box dialog's title.
|
* @title: The query box dialog's title.
|
||||||
|
* @parent: The dialog's parent widget.
|
||||||
* @help_func: The help function to show this dialog's help page.
|
* @help_func: The help function to show this dialog's help page.
|
||||||
* @help_data: A string pointing to this dialog's html help page.
|
* @help_data: A string pointing to this dialog's html help page.
|
||||||
* @message: A string which will be shown above the dialog's entry widget.
|
* @message: A string which will be shown above the dialog's entry widget.
|
||||||
|
@ -397,6 +407,7 @@ gimp_query_double_box (const gchar *title,
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_query_size_box (const gchar *title,
|
gimp_query_size_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
|
@ -415,7 +426,7 @@ gimp_query_size_box (const gchar *title,
|
||||||
QueryBox *query_box;
|
QueryBox *query_box;
|
||||||
GtkWidget *sizeentry;
|
GtkWidget *sizeentry;
|
||||||
|
|
||||||
query_box = create_query_box (title, help_func, help_data,
|
query_box = create_query_box (title, parent, help_func, help_data,
|
||||||
G_CALLBACK (size_query_box_response),
|
G_CALLBACK (size_query_box_response),
|
||||||
GTK_STOCK_DIALOG_QUESTION,
|
GTK_STOCK_DIALOG_QUESTION,
|
||||||
message,
|
message,
|
||||||
|
@ -449,6 +460,7 @@ gimp_query_size_box (const gchar *title,
|
||||||
/**
|
/**
|
||||||
* gimp_query_boolean_box:
|
* gimp_query_boolean_box:
|
||||||
* @title: The query box dialog's title.
|
* @title: The query box dialog's title.
|
||||||
|
* @parent: The dialog's parent widget.
|
||||||
* @help_func: The help function to show this dialog's help page.
|
* @help_func: The help function to show this dialog's help page.
|
||||||
* @help_data: A string pointing to this dialog's html help page.
|
* @help_data: A string pointing to this dialog's html help page.
|
||||||
* @stock_id: A stock_id to specify an icon to appear on the left
|
* @stock_id: A stock_id to specify an icon to appear on the left
|
||||||
|
@ -469,6 +481,7 @@ gimp_query_size_box (const gchar *title,
|
||||||
**/
|
**/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gimp_query_boolean_box (const gchar *title,
|
gimp_query_boolean_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *stock_id,
|
const gchar *stock_id,
|
||||||
|
@ -482,7 +495,7 @@ gimp_query_boolean_box (const gchar *title,
|
||||||
{
|
{
|
||||||
QueryBox *query_box;
|
QueryBox *query_box;
|
||||||
|
|
||||||
query_box = create_query_box (title, help_func, help_data,
|
query_box = create_query_box (title, parent, help_func, help_data,
|
||||||
G_CALLBACK (boolean_query_box_response),
|
G_CALLBACK (boolean_query_box_response),
|
||||||
stock_id,
|
stock_id,
|
||||||
message,
|
message,
|
||||||
|
|
|
@ -57,6 +57,7 @@ typedef void (* GimpQueryBooleanCallback) (GtkWidget *query_box,
|
||||||
|
|
||||||
/* some simple query dialogs */
|
/* some simple query dialogs */
|
||||||
GtkWidget * gimp_query_string_box (const gchar *title,
|
GtkWidget * gimp_query_string_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
|
@ -67,6 +68,7 @@ GtkWidget * gimp_query_string_box (const gchar *title,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
GtkWidget * gimp_query_int_box (const gchar *title,
|
GtkWidget * gimp_query_int_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
|
@ -79,6 +81,7 @@ GtkWidget * gimp_query_int_box (const gchar *title,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
GtkWidget * gimp_query_double_box (const gchar *title,
|
GtkWidget * gimp_query_double_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
|
@ -92,6 +95,7 @@ GtkWidget * gimp_query_double_box (const gchar *title,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
GtkWidget * gimp_query_size_box (const gchar *title,
|
GtkWidget * gimp_query_size_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *message,
|
const gchar *message,
|
||||||
|
@ -108,6 +112,7 @@ GtkWidget * gimp_query_size_box (const gchar *title,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
GtkWidget * gimp_query_boolean_box (const gchar *title,
|
GtkWidget * gimp_query_boolean_box (const gchar *title,
|
||||||
|
GtkWidget *parent,
|
||||||
GimpHelpFunc help_func,
|
GimpHelpFunc help_func,
|
||||||
const gchar *help_data,
|
const gchar *help_data,
|
||||||
const gchar *stock_id,
|
const gchar *stock_id,
|
||||||
|
|
|
@ -765,6 +765,7 @@ delete_fractal_callback (GtkWidget *widget,
|
||||||
sel_obj->draw_name);
|
sel_obj->draw_name);
|
||||||
|
|
||||||
delete_dialog = gimp_query_boolean_box (_("Delete Fractal"),
|
delete_dialog = gimp_query_boolean_box (_("Delete Fractal"),
|
||||||
|
gtk_widget_get_toplevel (list),
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
"filters/fractalexplorer.html",
|
"filters/fractalexplorer.html",
|
||||||
GTK_STOCK_DIALOG_QUESTION,
|
GTK_STOCK_DIALOG_QUESTION,
|
||||||
|
|
|
@ -3472,6 +3472,7 @@ gfig_response (GtkWidget *widget,
|
||||||
"Continue with exiting?"), count);
|
"Continue with exiting?"), count);
|
||||||
|
|
||||||
dialog = gimp_query_boolean_box (_("Warning"),
|
dialog = gimp_query_boolean_box (_("Warning"),
|
||||||
|
widget,
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
"filters/gfig.html",
|
"filters/gfig.html",
|
||||||
GTK_STOCK_DIALOG_WARNING,
|
GTK_STOCK_DIALOG_WARNING,
|
||||||
|
@ -4374,6 +4375,7 @@ gfig_delete_gfig_callback (GtkWidget *widget,
|
||||||
sel_obj->draw_name);
|
sel_obj->draw_name);
|
||||||
|
|
||||||
delete_dialog = gimp_query_boolean_box (_("Delete Gfig Drawing"),
|
delete_dialog = gimp_query_boolean_box (_("Delete Gfig Drawing"),
|
||||||
|
gtk_widget_get_toplevel (list),
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
"filters/gfig.html",
|
"filters/gfig.html",
|
||||||
FALSE,
|
FALSE,
|
||||||
|
|
|
@ -2952,6 +2952,7 @@ dlg_selector_new_callback (GtkWidget *widget,
|
||||||
GtkWidget *query_box;
|
GtkWidget *query_box;
|
||||||
|
|
||||||
query_box = gimp_query_string_box (_("New GFlare"),
|
query_box = gimp_query_string_box (_("New GFlare"),
|
||||||
|
gtk_widget_get_toplevel (widget),
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
"filters/gflare.html",
|
"filters/gflare.html",
|
||||||
_("Enter a Name for the New GFlare:"),
|
_("Enter a Name for the New GFlare:"),
|
||||||
|
@ -3024,6 +3025,7 @@ dlg_selector_copy_callback (GtkWidget *widget,
|
||||||
name = g_strdup_printf ("%s copy", dlg->gflare->name);
|
name = g_strdup_printf ("%s copy", dlg->gflare->name);
|
||||||
|
|
||||||
query_box = gimp_query_string_box (_("Copy GFlare"),
|
query_box = gimp_query_string_box (_("Copy GFlare"),
|
||||||
|
gtk_widget_get_toplevel (widget),
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
"filters/gflare.html",
|
"filters/gflare.html",
|
||||||
_("Enter a Name for the Copied GFlare:"),
|
_("Enter a Name for the Copied GFlare:"),
|
||||||
|
@ -3084,6 +3086,7 @@ dlg_selector_delete_callback (GtkWidget *widget,
|
||||||
dlg->gflare->name);
|
dlg->gflare->name);
|
||||||
|
|
||||||
dialog = gimp_query_boolean_box (_("Delete GFlare"),
|
dialog = gimp_query_boolean_box (_("Delete GFlare"),
|
||||||
|
dlg->shell,
|
||||||
gimp_standard_help_func,
|
gimp_standard_help_func,
|
||||||
"filters/gflare.html",
|
"filters/gflare.html",
|
||||||
GTK_STOCK_DIALOG_QUESTION,
|
GTK_STOCK_DIALOG_QUESTION,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue