Re: Using pixmap files in Gnome apps
- From: "John R. Sheets" <dusk ravendusk org>
- To: Gnome Devel <gnome-devel-list gnome org>
- Subject: Re: Using pixmap files in Gnome apps
- Date: Sat, 12 Jun 1999 20:30:16 -0500
On Sat, Jun 12, 1999 at 03:39:27PM +0100, Damon Chaplin wrote:
>
> I'm trying to figure out a decent way to use pixmap files in Gnome apps.
>
> If you specify pixmap filenames in GnomeUIInfo structs or in calls like
> gnome_about_new(), then gnome_pixmap_file() in libgnome/gnome-util.c
> is used to try to find the pixmap file.
[...]
> But what do I do for now? Force people to install apps before running them?
> I don't think that's very good.
One solution is to add a command-line option, something like this (sorry for
any lurking bugs):
static gchar *media_path = NULL;
static const struct poptOption my_opts[] =
{
{"media-path", 'm', POPT_ARG_STRING, &media_path, 0,
N_("Path to graphics files"), N_("PATH")},
{NULL, '\0', 0, NULL, 0}
};
int main(int argc, char *argv[])
{
...
gnome_init_with_popt_table("myapp", VERSION, argc, argv, my_opts, 0, NULL);
if (media_path != NULL)
g_message("Using media files at %s", media_path);
...
}
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]