mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
Update meta_show_dialog for gtk's removal of --screen
gtk3 no longer has the --screen command-line argument, which mutter was passing to zenity. Use --display (with an explicitly-specified screen number) instead. https://bugzilla.gnome.org/show_bug.cgi?id=643683
This commit is contained in:
parent
ab2de9dccd
commit
9f39a18fc5
@ -103,8 +103,8 @@ delete_ping_timeout_func (MetaDisplay *display,
|
|||||||
|
|
||||||
dialog_pid =
|
dialog_pid =
|
||||||
meta_show_dialog ("--question",
|
meta_show_dialog ("--question",
|
||||||
window_content, 0,
|
window_content, NULL,
|
||||||
window->screen->number,
|
window->screen->screen_name,
|
||||||
_("_Wait"), _("_Force Quit"), window->xwindow,
|
_("_Wait"), _("_Force Quit"), window->xwindow,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
|
@ -2444,7 +2444,7 @@ static void
|
|||||||
error_on_command (int command_index,
|
error_on_command (int command_index,
|
||||||
const char *command,
|
const char *command,
|
||||||
const char *message,
|
const char *message,
|
||||||
int screen_number,
|
MetaScreen *screen,
|
||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
{
|
{
|
||||||
if (command_index < 0)
|
if (command_index < 0)
|
||||||
@ -2473,7 +2473,7 @@ error_on_command (int command_index,
|
|||||||
meta_show_dialog ("--error",
|
meta_show_dialog ("--error",
|
||||||
text,
|
text,
|
||||||
NULL,
|
NULL,
|
||||||
screen_number,
|
screen->screen_name,
|
||||||
NULL, NULL, 0,
|
NULL, NULL, 0,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
@ -2485,7 +2485,7 @@ error_on_command (int command_index,
|
|||||||
meta_show_dialog ("--error",
|
meta_show_dialog ("--error",
|
||||||
message,
|
message,
|
||||||
NULL,
|
NULL,
|
||||||
screen_number,
|
screen->screen_name,
|
||||||
NULL, NULL, 0,
|
NULL, NULL, 0,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -2557,7 +2557,7 @@ handle_run_command (MetaDisplay *display,
|
|||||||
|
|
||||||
s = g_strdup_printf (_("No command %d has been defined.\n"),
|
s = g_strdup_printf (_("No command %d has been defined.\n"),
|
||||||
which + 1);
|
which + 1);
|
||||||
error_on_command (which, NULL, s, screen->number, event->xkey.time);
|
error_on_command (which, NULL, s, screen, event->xkey.time);
|
||||||
g_free (s);
|
g_free (s);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -2566,7 +2566,7 @@ handle_run_command (MetaDisplay *display,
|
|||||||
err = NULL;
|
err = NULL;
|
||||||
if (!meta_spawn_command_line_async_on_screen (command, screen, &err))
|
if (!meta_spawn_command_line_async_on_screen (command, screen, &err))
|
||||||
{
|
{
|
||||||
error_on_command (which, command, err->message, screen->number, event->xkey.time);
|
error_on_command (which, command, err->message, screen, event->xkey.time);
|
||||||
|
|
||||||
g_error_free (err);
|
g_error_free (err);
|
||||||
}
|
}
|
||||||
@ -3568,7 +3568,7 @@ handle_run_terminal (MetaDisplay *display,
|
|||||||
"keybinding press\n");
|
"keybinding press\n");
|
||||||
|
|
||||||
s = g_strdup_printf (_("No terminal command has been defined.\n"));
|
s = g_strdup_printf (_("No terminal command has been defined.\n"));
|
||||||
error_on_command (-1, NULL, s, screen->number, event->xkey.time);
|
error_on_command (-1, NULL, s, screen, event->xkey.time);
|
||||||
g_free (s);
|
g_free (s);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -3577,7 +3577,7 @@ handle_run_terminal (MetaDisplay *display,
|
|||||||
err = NULL;
|
err = NULL;
|
||||||
if (!meta_spawn_command_line_async_on_screen (command, screen, &err))
|
if (!meta_spawn_command_line_async_on_screen (command, screen, &err))
|
||||||
{
|
{
|
||||||
error_on_command (-1, command, err->message, screen->number,
|
error_on_command (-1, command, err->message, screen,
|
||||||
event->xkey.time);
|
event->xkey.time);
|
||||||
|
|
||||||
g_error_free (err);
|
g_error_free (err);
|
||||||
|
@ -1804,7 +1804,7 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
|
|||||||
"and will have to be restarted manually next time "
|
"and will have to be restarted manually next time "
|
||||||
"you log in."),
|
"you log in."),
|
||||||
"240",
|
"240",
|
||||||
meta_screen_get_screen_number (meta_get_display()->active_screen),
|
meta_get_display()->active_screen->screen_name,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
None,
|
None,
|
||||||
columns,
|
columns,
|
||||||
|
@ -588,7 +588,7 @@ GPid
|
|||||||
meta_show_dialog (const char *type,
|
meta_show_dialog (const char *type,
|
||||||
const char *message,
|
const char *message,
|
||||||
const char *timeout,
|
const char *timeout,
|
||||||
const gint screen_number,
|
const char *display,
|
||||||
const char *ok_text,
|
const char *ok_text,
|
||||||
const char *cancel_text,
|
const char *cancel_text,
|
||||||
const int transient_for,
|
const int transient_for,
|
||||||
@ -596,7 +596,6 @@ meta_show_dialog (const char *type,
|
|||||||
GSList *entries)
|
GSList *entries)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
char *screen_number_text = g_strdup_printf("%d", screen_number);
|
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
int i=0;
|
int i=0;
|
||||||
GPid child_pid;
|
GPid child_pid;
|
||||||
@ -607,8 +606,8 @@ meta_show_dialog (const char *type,
|
|||||||
|
|
||||||
argvl[i++] = "zenity";
|
argvl[i++] = "zenity";
|
||||||
argvl[i++] = type;
|
argvl[i++] = type;
|
||||||
argvl[i++] = "--screen";
|
argvl[i++] = "--display";
|
||||||
argvl[i++] = screen_number_text;
|
argvl[i++] = display;
|
||||||
argvl[i++] = "--class";
|
argvl[i++] = "--class";
|
||||||
argvl[i++] = "mutter-dialog";
|
argvl[i++] = "mutter-dialog";
|
||||||
argvl[i++] = "--title";
|
argvl[i++] = "--title";
|
||||||
@ -673,7 +672,6 @@ meta_show_dialog (const char *type,
|
|||||||
unsetenv ("WINDOWID");
|
unsetenv ("WINDOWID");
|
||||||
|
|
||||||
g_free (argvl);
|
g_free (argvl);
|
||||||
g_free (screen_number_text);
|
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
|
@ -105,9 +105,9 @@ char* meta_g_utf8_strndup (const gchar *src, gsize n);
|
|||||||
void meta_free_gslist_and_elements (GSList *list_to_deep_free);
|
void meta_free_gslist_and_elements (GSList *list_to_deep_free);
|
||||||
|
|
||||||
GPid meta_show_dialog (const char *type,
|
GPid meta_show_dialog (const char *type,
|
||||||
const char *title,
|
|
||||||
const char *message,
|
const char *message,
|
||||||
gint timeout,
|
const char *timeout,
|
||||||
|
const char *display,
|
||||||
const char *ok_text,
|
const char *ok_text,
|
||||||
const char *cancel_text,
|
const char *cancel_text,
|
||||||
const int transient_for,
|
const int transient_for,
|
||||||
|
Loading…
Reference in New Issue
Block a user