Mercurial > gftp.yaz
comparison src/gtk/menu-items.c @ 483:4376ffeab64e
2004-6-13 Brian Masney <masneyb@gftp.org>
* lib/gftp.h lib/misc.c src/gtk/Makefile.am src/gtk/menu-items.c
src/gtk/misc-gtk.c src/text/Makefile.am src/uicommon/Makefile.am
src/uicommon/gftpui.c - added support to override the value of
SHARE_DIR during runtime with the GFTP_SHARE_DIR environment
variable
author | masneyb |
---|---|
date | Sun, 13 Jun 2004 14:25:18 +0000 |
parents | 954ab701fb55 |
children | 39e9945288ea |
comparison
equal
deleted
inserted
replaced
482:18773e9af7f0 | 483:4376ffeab64e |
---|---|
440 | 440 |
441 | 441 |
442 void | 442 void |
443 about_dialog (gpointer data) | 443 about_dialog (gpointer data) |
444 { | 444 { |
445 GtkWidget * tempwid, * notebook, * box, * label, * view, * vscroll, | 445 GtkWidget * tempwid, * notebook, * box, * label, * view, * vscroll, * dialog; |
446 * dialog; | 446 char *tempstr, *temp1str, *no_license_agreement, *str, buf[255], *share_dir; |
447 char *tempstr, *no_license_agreement, *str, buf[255]; | |
448 size_t len; | 447 size_t len; |
449 FILE * fd; | 448 FILE * fd; |
450 #if GTK_MAJOR_VERSION > 1 | 449 #if GTK_MAJOR_VERSION > 1 |
451 GtkTextBuffer * textbuf; | 450 GtkTextBuffer * textbuf; |
452 GtkTextIter iter; | 451 GtkTextIter iter; |
453 guint textlen; | 452 guint textlen; |
454 #endif | 453 #endif |
455 | 454 |
456 no_license_agreement = g_strdup_printf (_("Cannot find the license agreement file COPYING. Please make sure it is in either %s or in %s"), BASE_CONF_DIR, SHARE_DIR); | 455 share_dir = gftp_get_share_dir (); |
456 no_license_agreement = g_strdup_printf (_("Cannot find the license agreement file COPYING. Please make sure it is in either %s or in %s"), BASE_CONF_DIR, share_dir); | |
457 | 457 |
458 #if GTK_MAJOR_VERSION == 1 | 458 #if GTK_MAJOR_VERSION == 1 |
459 dialog = gtk_dialog_new (); | 459 dialog = gtk_dialog_new (); |
460 gtk_window_set_title (GTK_WINDOW (dialog), _("About gFTP")); | 460 gtk_window_set_title (GTK_WINDOW (dialog), _("About gFTP")); |
461 gtk_container_border_width (GTK_CONTAINER | 461 gtk_container_border_width (GTK_CONTAINER |
577 | 577 |
578 tempstr = g_strconcat ("/usr/share/common-licenses/GPL", NULL); | 578 tempstr = g_strconcat ("/usr/share/common-licenses/GPL", NULL); |
579 if (access (tempstr, F_OK) != 0) | 579 if (access (tempstr, F_OK) != 0) |
580 { | 580 { |
581 g_free (tempstr); | 581 g_free (tempstr); |
582 tempstr = expand_path (SHARE_DIR "/COPYING"); | 582 temp1str = g_strconcat (share_dir, "/COPYING", NULL); |
583 tempstr = expand_path (temp1str); | |
584 g_free (temp1str); | |
583 if (access (tempstr, F_OK) != 0) | 585 if (access (tempstr, F_OK) != 0) |
584 { | 586 { |
585 g_free (tempstr); | 587 g_free (tempstr); |
586 tempstr = expand_path (BASE_CONF_DIR "/COPYING"); | 588 tempstr = expand_path (BASE_CONF_DIR "/COPYING"); |
587 if (access (tempstr, F_OK) != 0) | 589 if (access (tempstr, F_OK) != 0) |