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

@ -541,6 +541,9 @@ _gp_config_read (GIOChannel *channel,
(guint32 *) &config->monitor_number, 1,
user_data))
goto cleanup;
if (! _gimp_wire_read_int32 (channel,
&config->timestamp, 1, user_data))
goto cleanup;
msg->data = config;
return;
@ -633,6 +636,10 @@ _gp_config_write (GIOChannel *channel,
(const guint32 *) &config->monitor_number, 1,
user_data))
return;
if (! _gimp_wire_write_int32 (channel,
(const guint32 *) &config->timestamp, 1,
user_data))
return;
}
static void

View File

@ -27,7 +27,7 @@ G_BEGIN_DECLS
/* Increment every time the protocol changes
*/
#define GIMP_PROTOCOL_VERSION 0x0011
#define GIMP_PROTOCOL_VERSION 0x0012
enum
@ -82,6 +82,7 @@ struct _GPConfig
gchar *wm_class;
gchar *display_name;
gint32 monitor_number;
guint32 timestamp;
};
struct _GPTileReq