mirror of https://github.com/GNOME/gimp.git
app/gui/Makefile.am use GIMP_COMMAND instead of hardcoding "gimp" as the
2007-09-13 Sven Neumann <sven@gimp.org> * app/gui/Makefile.am * app/gui/gui-vtable.c (gui_recent_list_add_uri): use GIMP_COMMAND instead of hardcoding "gimp" as the command line used to launch this resource. Use the translated full application name. svn path=/trunk/; revision=23530
This commit is contained in:
parent
574a6f7524
commit
95f01438a6
|
@ -1,7 +1,8 @@
|
||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-DG_LOG_DOMAIN=\"Gimp-GUI\"
|
-DG_LOG_DOMAIN=\"Gimp-GUI\" \
|
||||||
|
-DGIMP_COMMAND=\"@GIMP_COMMAND@\"
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
|
|
|
@ -545,31 +545,31 @@ gui_pdb_dialog_close (Gimp *gimp,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gui_recent_list_add_uri (Gimp *gimp,
|
gui_recent_list_add_uri (Gimp *gimp,
|
||||||
const gchar *uri,
|
const gchar *uri,
|
||||||
const gchar *mime_type)
|
const gchar *mime_type)
|
||||||
{
|
{
|
||||||
GtkRecentManager *mgr;
|
GtkRecentManager *mgr;
|
||||||
GtkRecentData recent;
|
GtkRecentData recent;
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
|
||||||
g_return_val_if_fail (uri != NULL, FALSE);
|
g_return_val_if_fail (uri != NULL, FALSE);
|
||||||
g_return_val_if_fail (mime_type != NULL, FALSE);
|
g_return_val_if_fail (mime_type != NULL, FALSE);
|
||||||
g_return_val_if_fail (strlen (mime_type) != 0, FALSE);
|
|
||||||
g_return_val_if_fail (g_utf8_validate (mime_type, -1, NULL), FALSE);
|
|
||||||
|
|
||||||
mgr = gtk_recent_manager_get_default ();
|
mgr = gtk_recent_manager_get_default ();
|
||||||
|
|
||||||
g_return_val_if_fail (mgr != NULL, FALSE);
|
g_return_val_if_fail (mgr != NULL, FALSE);
|
||||||
|
|
||||||
/* use last part of the URI */
|
/* use last part of the URI */
|
||||||
recent.display_name = NULL;
|
recent.display_name = NULL;
|
||||||
|
|
||||||
/* no special description */
|
/* no special description */
|
||||||
recent.description = NULL;
|
recent.description = NULL;
|
||||||
recent.mime_type = mime_type;
|
recent.mime_type = (gchar *) mime_type;
|
||||||
recent.app_name = "gimp";
|
recent.app_name = (gchar *) g_get_application_name ();
|
||||||
recent.app_exec = "gimp %u";
|
recent.app_exec = GIMP_COMMAND " %u";
|
||||||
recent.groups = NULL;
|
recent.groups = NULL;
|
||||||
recent.is_private = FALSE;
|
recent.is_private = FALSE;
|
||||||
|
|
||||||
return gtk_recent_manager_add_full (mgr, uri, &recent);
|
return gtk_recent_manager_add_full (mgr, uri, &recent);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue