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:
Dan Winship 2011-03-17 09:54:47 -04:00
parent ab2de9dccd
commit 9f39a18fc5
5 changed files with 15 additions and 17 deletions

View File

@ -103,8 +103,8 @@ delete_ping_timeout_func (MetaDisplay *display,
dialog_pid =
meta_show_dialog ("--question",
window_content, 0,
window->screen->number,
window_content, NULL,
window->screen->screen_name,
_("_Wait"), _("_Force Quit"), window->xwindow,
NULL, NULL);

View File

@ -2444,7 +2444,7 @@ static void
error_on_command (int command_index,
const char *command,
const char *message,
int screen_number,
MetaScreen *screen,
guint32 timestamp)
{
if (command_index < 0)
@ -2473,7 +2473,7 @@ error_on_command (int command_index,
meta_show_dialog ("--error",
text,
NULL,
screen_number,
screen->screen_name,
NULL, NULL, 0,
NULL, NULL);
@ -2485,7 +2485,7 @@ error_on_command (int command_index,
meta_show_dialog ("--error",
message,
NULL,
screen_number,
screen->screen_name,
NULL, NULL, 0,
NULL, NULL);
}
@ -2557,7 +2557,7 @@ handle_run_command (MetaDisplay *display,
s = g_strdup_printf (_("No command %d has been defined.\n"),
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);
return;
@ -2566,7 +2566,7 @@ handle_run_command (MetaDisplay *display,
err = NULL;
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);
}
@ -3568,7 +3568,7 @@ handle_run_terminal (MetaDisplay *display,
"keybinding press\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);
return;
@ -3577,7 +3577,7 @@ handle_run_terminal (MetaDisplay *display,
err = NULL;
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);
g_error_free (err);

View File

@ -1804,7 +1804,7 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
"and will have to be restarted manually next time "
"you log in."),
"240",
meta_screen_get_screen_number (meta_get_display()->active_screen),
meta_get_display()->active_screen->screen_name,
NULL, NULL,
None,
columns,

View File

@ -588,7 +588,7 @@ GPid
meta_show_dialog (const char *type,
const char *message,
const char *timeout,
const gint screen_number,
const char *display,
const char *ok_text,
const char *cancel_text,
const int transient_for,
@ -596,7 +596,6 @@ meta_show_dialog (const char *type,
GSList *entries)
{
GError *error = NULL;
char *screen_number_text = g_strdup_printf("%d", screen_number);
GSList *tmp;
int i=0;
GPid child_pid;
@ -607,8 +606,8 @@ meta_show_dialog (const char *type,
argvl[i++] = "zenity";
argvl[i++] = type;
argvl[i++] = "--screen";
argvl[i++] = screen_number_text;
argvl[i++] = "--display";
argvl[i++] = display;
argvl[i++] = "--class";
argvl[i++] = "mutter-dialog";
argvl[i++] = "--title";
@ -673,7 +672,6 @@ meta_show_dialog (const char *type,
unsetenv ("WINDOWID");
g_free (argvl);
g_free (screen_number_text);
if (error)
{

View File

@ -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);
GPid meta_show_dialog (const char *type,
const char *title,
const char *message,
gint timeout,
const char *timeout,
const char *display,
const char *ok_text,
const char *cancel_text,
const int transient_for,