我使用gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "http://www.opencv.org/" );
。但是当我点击它时,我看到了这个错误:
或
您建议如何解决此错误?或者我可以在互联网上的哪些资源上找到帮助?
这是一个示例代码:
GtkWidget *dialog;
dialog = gtk_about_dialog_new();
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog),"Test Name");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), "1.0");
gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),"(C) 2010-2016 Test");
gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog),"http://www.opencv.org/");
gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(dialog), "Website");
gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(window));
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
我使用gtk_show_about_dialog
,但我有同样的错误:
static void refgtk(GtkButton *button, GtkWindow *win)
{
gchar* authors[] = { "Santhosh Kumar ",
"Sameema ",
"Karthikeyan ", NULL };
gchar* artists[] = { "Gnanasambantham ",
"Sakthivel ",
"Chinnusamy ", NULL };
gchar* comments = { "eccvs is a simple version control system" };
gchar* copyright = { "Copyright (c) Santhosh Kumar, Sameema, Karthikeyan" };
gchar* documenters[] = { "Sameema ",
"Santhosh Kumar ",
NULL };
static GdkPixbuf* logo;
gchar* name = "PACKAGE";
gchar* version = "VERSION";
gchar* website = "http://www.gtk.org/";
gchar* website_label = "eccvs website";
const gchar *license = "somestuff";
if (!logo) {
GError* error = NULL;
logo = gdk_pixbuf_new_from_file("E:/Works for Gov Project/DOC/GUI/logogui1/GTK+.png", &error);
if (error) {
g_warning("Unable to load eccvs logo: %s\n", error->message);
g_error_free(error);
}
}
gtk_show_about_dialog(win,
"authors", authors, "license", license, "license-type", GTK_LICENSE_CUSTOM,
"logo", logo, "logo-icon-name", "Logo Icon",
"program-name", "Chapter 6, Exercise 1",
"version", "1.0",
"comments", "This is just an exercise from Chapter 6 of the book I'm reading.",
"website", "http://www.google.com", "website-label", "Application Homepage",
"copyright", "(C) 2014 Patrick Meyer",
"wrap-license", TRUE, NULL);
}