mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Added license to GtkAboutDialog
It is read from the COPYING file that is now copied in glade/ folder.
This commit is contained in:
@@ -8,7 +8,8 @@ glade_DATA = \
|
|||||||
gmdb-schema.glade \
|
gmdb-schema.glade \
|
||||||
gmdb-prefs.glade \
|
gmdb-prefs.glade \
|
||||||
gmdb-props.glade \
|
gmdb-props.glade \
|
||||||
gmdb-tabledef.glade
|
gmdb-tabledef.glade \
|
||||||
|
../../../COPYING
|
||||||
|
|
||||||
EXTRA_DIST = $(glade_DATA)
|
EXTRA_DIST = $(glade_DATA)
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ const gchar *documenters[] = {
|
|||||||
};
|
};
|
||||||
GtkWidget *parent;
|
GtkWidget *parent;
|
||||||
GdkPixbuf *pixbuf=NULL;
|
GdkPixbuf *pixbuf=NULL;
|
||||||
|
FILE *flicense;
|
||||||
|
guint32 licenselen;
|
||||||
|
char *license;
|
||||||
|
|
||||||
parent = gtk_widget_get_toplevel (button);
|
parent = gtk_widget_get_toplevel (button);
|
||||||
if (!GTK_WIDGET_TOPLEVEL (parent))
|
if (!GTK_WIDGET_TOPLEVEL (parent))
|
||||||
@@ -63,6 +66,21 @@ GdkPixbuf *pixbuf=NULL;
|
|||||||
if (!pixbuf)
|
if (!pixbuf)
|
||||||
pixbuf = gdk_pixbuf_new_from_file (GMDB_ICONDIR "logo.xpm", NULL);
|
pixbuf = gdk_pixbuf_new_from_file (GMDB_ICONDIR "logo.xpm", NULL);
|
||||||
|
|
||||||
|
flicense = fopen(GMDB_ICONDIR "COPYING", "r");
|
||||||
|
if (flicense)
|
||||||
|
{
|
||||||
|
fseek(flicense, 0, SEEK_END);
|
||||||
|
licenselen = ftell(flicense);
|
||||||
|
fseek(flicense, 0, SEEK_SET);
|
||||||
|
license = g_malloc(licenselen+1);
|
||||||
|
fread(license, 1, licenselen, flicense);
|
||||||
|
license[licenselen] = 0;
|
||||||
|
fclose(flicense);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "Can't open " GMDB_ICONDIR "COPYING\n");
|
||||||
|
license = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
gtk_show_about_dialog ((GtkWindow*)parent,
|
gtk_show_about_dialog ((GtkWindow*)parent,
|
||||||
"authors", authors,
|
"authors", authors,
|
||||||
"comments", _("GNOME MDB Viewer is a grapical interface to "
|
"comments", _("GNOME MDB Viewer is a grapical interface to "
|
||||||
@@ -74,7 +92,9 @@ GdkPixbuf *pixbuf=NULL;
|
|||||||
"program-name", _("GNOME MDB Viewer"),
|
"program-name", _("GNOME MDB Viewer"),
|
||||||
"version", MDB_VERSION_NO,
|
"version", MDB_VERSION_NO,
|
||||||
"website", "http://mdbtools.sourceforge.net/",
|
"website", "http://mdbtools.sourceforge.net/",
|
||||||
|
"license", license,
|
||||||
NULL);
|
NULL);
|
||||||
|
g_free(license);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user