Properly pass the focus from the core to plug-in dialogs:

2008-03-27  Sven Neumann  <sven@gimp.org>

	Properly pass the focus from the core to plug-in dialogs:

	* libgimpbase/gimpprotocol.[ch]: added a user_time member to the
	GimpConfig struct. Bumped the protocol version to 0x0012.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: added gimp_get_user_time() to get the
	timestamp of the last user interaction.

	* app/plug-in/gimppluginmanager-call.c
	(gimp_plug_in_manager_call_run): pass the timestamp to in the
	GimpConfig message.

	* libgimp/gimp.[ch]:
	* libgimp/gimp.def: added method to access the timestamp as set
	in the config message.

	* libgimp/gimpui.c (gimp_ui_init): construct a fake startup ID and
	set the DESKTOP_STARTUP_ID environment variable.

svn path=/trunk/; revision=25263
This commit is contained in:
Sven Neumann
2008-03-27 16:30:29 +00:00
committed by Sven Neumann
parent cca470e093
commit 26d1021e77
11 changed files with 101 additions and 2 deletions

View File

@ -65,9 +65,9 @@ void
gimp_ui_init (const gchar *prog_name,
gboolean preview)
{
GdkScreen *screen;
const gchar *display_name;
gchar *themerc;
GdkScreen *screen;
g_return_if_fail (prog_name != NULL);
@ -87,6 +87,17 @@ gimp_ui_init (const gchar *prog_name,
#endif
}
if (gimp_user_time ())
{
/* Construct a fake startup ID as we only want to pass the
* interaction timestamp, see _gdk_windowing_set_default_display().
*/
gchar *startup_id = g_strdup_printf ("_TIME%u", gimp_user_time ());
g_setenv ("DESKTOP_STARTUP_ID", startup_id, TRUE);
g_free (startup_id);
}
gtk_init (NULL, NULL);
themerc = gimp_personal_rc_file ("themerc");