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:

committed by
Michael Natterer

parent
bcd9794a99
commit
b62f8e9a75
@ -55,6 +55,7 @@ struct _QueryBox
|
||||
|
||||
|
||||
static QueryBox * create_query_box (const gchar *title,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
GCallback response_callback,
|
||||
@ -93,6 +94,7 @@ static void query_box_cancel_callback (QueryBox *query_box);
|
||||
*/
|
||||
static QueryBox *
|
||||
create_query_box (const gchar *title,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
GCallback response_callback,
|
||||
@ -111,13 +113,14 @@ create_query_box (const gchar *title,
|
||||
|
||||
/* 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 || signal != NULL, NULL);
|
||||
|
||||
query_box = g_new0 (QueryBox, 1);
|
||||
|
||||
query_box->qbox = gimp_dialog_new (title, "gimp-query-box",
|
||||
NULL, 0,
|
||||
parent, 0,
|
||||
help_func, help_data,
|
||||
|
||||
cancel_button, GTK_RESPONSE_CANCEL,
|
||||
@ -201,6 +204,7 @@ create_query_box (const gchar *title,
|
||||
/**
|
||||
* gimp_query_string_box:
|
||||
* @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_data: A string pointing to this dialog's html help page.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
@ -216,6 +220,7 @@ create_query_box (const gchar *title,
|
||||
**/
|
||||
GtkWidget *
|
||||
gimp_query_string_box (const gchar *title,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *message,
|
||||
@ -228,7 +233,7 @@ gimp_query_string_box (const gchar *title,
|
||||
QueryBox *query_box;
|
||||
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),
|
||||
GTK_STOCK_DIALOG_QUESTION,
|
||||
message,
|
||||
@ -254,6 +259,7 @@ gimp_query_string_box (const gchar *title,
|
||||
/**
|
||||
* gimp_query_int_box:
|
||||
* @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_data: A string pointing to this dialog's html help page.
|
||||
* @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 *
|
||||
gimp_query_int_box (const gchar *title,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *message,
|
||||
@ -286,7 +293,7 @@ gimp_query_int_box (const gchar *title,
|
||||
GtkWidget *spinbutton;
|
||||
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),
|
||||
GTK_STOCK_DIALOG_QUESTION,
|
||||
message,
|
||||
@ -312,6 +319,7 @@ gimp_query_int_box (const gchar *title,
|
||||
/**
|
||||
* gimp_query_double_box:
|
||||
* @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_data: A string pointing to this dialog's html help page.
|
||||
* @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 *
|
||||
gimp_query_double_box (const gchar *title,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *message,
|
||||
@ -346,7 +355,7 @@ gimp_query_double_box (const gchar *title,
|
||||
GtkWidget *spinbutton;
|
||||
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),
|
||||
GTK_STOCK_DIALOG_QUESTION,
|
||||
message,
|
||||
@ -372,6 +381,7 @@ gimp_query_double_box (const gchar *title,
|
||||
/**
|
||||
* gimp_query_size_box:
|
||||
* @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_data: A string pointing to this dialog's html help page.
|
||||
* @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 *
|
||||
gimp_query_size_box (const gchar *title,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *message,
|
||||
@ -415,7 +426,7 @@ gimp_query_size_box (const gchar *title,
|
||||
QueryBox *query_box;
|
||||
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),
|
||||
GTK_STOCK_DIALOG_QUESTION,
|
||||
message,
|
||||
@ -449,6 +460,7 @@ gimp_query_size_box (const gchar *title,
|
||||
/**
|
||||
* gimp_query_boolean_box:
|
||||
* @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_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
|
||||
@ -469,6 +481,7 @@ gimp_query_size_box (const gchar *title,
|
||||
**/
|
||||
GtkWidget *
|
||||
gimp_query_boolean_box (const gchar *title,
|
||||
GtkWidget *parent,
|
||||
GimpHelpFunc help_func,
|
||||
const gchar *help_data,
|
||||
const gchar *stock_id,
|
||||
@ -482,7 +495,7 @@ gimp_query_boolean_box (const gchar *title,
|
||||
{
|
||||
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),
|
||||
stock_id,
|
||||
message,
|
||||
|
Reference in New Issue
Block a user