Commit b792d4ad authored by David Odin's avatar David Odin
Browse files

Don't call gimp_plug_in_get_path(), since it doesn't really help, call

	* plug-ins/FractalExplorer/Dialogs.c:
	* plug-ins/gfig/gfig.c:
	* plug-ins/gflare/gflare.c: Don't call gimp_plug_in_get_path(), since
	it doesn't really help, call gimp_gimprc_query() instead and display
	an error message in case of problem. Aka move the code from
	gimpmiscui back to these plug-ins.

	* libgimp/gimpmiscui.[ch]: removed these file.
	* libgimp/Makefile.am: changed accordlingly.

	* plug-ins/libgimpoldpreview/gimpoldpreview.c: removed
	gimp_plug_in_get_path() from here also, since I forgot to do this in
	my previous commits (ouch! bad DindinX!).

  All this partly close #125141.
parent 0c8d8e13
2003-12-14 DindinX <david@dindinx.org>
* plug-ins/FractalExplorer/Dialogs.c:
* plug-ins/gfig/gfig.c:
* plug-ins/gflare/gflare.c: Don't call gimp_plug_in_get_path(), since
it doesn't really help, call gimp_gimprc_query() instead and display
an error message in case of problem. Aka move the code from
gimpmiscui back to these plug-ins.
* libgimp/gimpmiscui.[ch]: removed these file.
* libgimp/Makefile.am: changed accordlingly.
* plug-ins/libgimpoldpreview/gimpoldpreview.c: removed
gimp_plug_in_get_path() from here also, since I forgot to do this in
my previous commits (ouch! bad DindinX!).
All this partly close #125141.
2003-12-13 Michael Natterer <mitch@gimp.org>
 
* tools/pdbgen/pdb/procedural_db.pdb: added a hack that allows to
......@@ -198,8 +198,6 @@ libgimpui_1_3_la_SOURCES = \
gimpuitypes.h \
gimpmenu.c \
gimpmenu.h \
gimpmiscui.c \
gimpmiscui.h \
gimpbrushmenu.c \
gimpbrushmenu.h \
gimpfontmenu.c \
......@@ -232,7 +230,6 @@ gimpinclude_HEADERS = \
gimptile.h \
\
gimpexport.h \
gimpmiscui.h \
gimpui.h \
gimpuitypes.h \
gimpmenu.h \
......
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpmiscui.c
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <string.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "gimp.h"
#include "gimpmiscui.h"
#include "libgimp-intl.h"
gchar *
gimp_plug_in_get_path (const gchar *path_name,
const gchar *dir_name)
{
gchar *path;
g_return_val_if_fail (path_name != NULL, NULL);
g_return_val_if_fail (dir_name != NULL, NULL);
path = gimp_gimprc_query (path_name);
if (! path)
{
gchar *gimprc = gimp_personal_rc_file ("gimprc");
gchar *full_path;
gchar *esc_path;
full_path =
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, dir_name,
G_SEARCHPATH_SEPARATOR_S,
"${gimp_data_dir}", G_DIR_SEPARATOR_S, dir_name,
NULL);
esc_path = g_strescape (full_path, NULL);
g_free (full_path);
g_message (_("No %s in gimprc:\n"
"You need to add an entry like\n"
"(%s \"%s\")\n"
"to your %s file."),
path_name, path_name, esc_path, gimprc);
g_free (gimprc);
g_free (esc_path);
}
return path;
}
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpmiscui.h
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_MISCUI_H__
#define __GIMP_MISCUI_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
gchar * gimp_plug_in_get_path (const gchar *path_name,
const gchar *dir_name);
G_END_DECLS
#endif /* __GIMP_MISCUI_H__ */
This diff is collapsed.
This diff is collapsed.
......@@ -876,7 +876,31 @@ plugin_run (const gchar *name,
* Parse gflare path from gimprc and load gflares
*/
gflare_path = gimp_plug_in_get_path ("gflare-path", "gflare");
gflare_path = gimp_gimprc_query ("gflare-path");
if (! gflare_path)
{
gchar *gimprc = gimp_personal_rc_file ("gimprc");
gchar *full_path;
gchar *esc_path;
full_path =
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, "gflare",
G_SEARCHPATH_SEPARATOR_S,
"${gimp_data_dir}", G_DIR_SEPARATOR_S, "gflare",
NULL);
esc_path = g_strescape (full_path, NULL);
g_free (full_path);
g_message (_("No %s in gimprc:\n"
"You need to add an entry like\n"
"(%s \"%s\")\n"
"to your %s file."),
"gflare-path", "gflare-path", esc_path, gimprc);
g_free (gimprc);
g_free (esc_path);
}
gflares_list_load_all ();
gimp_tile_cache_ntiles (drawable->width / gimp_tile_width () + 2);
......
......@@ -508,41 +508,3 @@ gimp_old_preview_fill_scaled (GimpOldPreview *preview,
preview->height = GTK_PREVIEW (preview->widget)->buffer_height;
}
gchar *
gimp_plug_in_get_path (const gchar *path_name,
const gchar *dir_name)
{
gchar *path;
g_return_val_if_fail (path_name != NULL, NULL);
g_return_val_if_fail (dir_name != NULL, NULL);
path = gimp_gimprc_query (path_name);
if (! path)
{
gchar *gimprc = gimp_personal_rc_file ("gimprc");
gchar *full_path;
gchar *esc_path;
full_path =
g_strconcat ("${gimp_dir}", G_DIR_SEPARATOR_S, dir_name,
G_SEARCHPATH_SEPARATOR_S,
"${gimp_data_dir}", G_DIR_SEPARATOR_S, dir_name,
NULL);
esc_path = g_strescape (full_path, NULL);
g_free (full_path);
g_message (_("No %s in gimprc:\n"
"You need to add an entry like\n"
"(%s \"%s\")\n"
"to your %s file."),
path_name, path_name, esc_path, gimprc);
g_free (gimprc);
g_free (esc_path);
}
return path;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment