Beginner's question: About dialog
- From: Peter Robinson t-online de (Peter Robinson)
- To: gtk-app-devel-list gnome org
- Subject: Beginner's question: About dialog
- Date: Sun, 7 May 2006 09:00:59 +0200
Hi guys and gals,
I have recently started to learn GTK and haven't been able to find answers to some simple questions in the
online docs or by Googling, I hope someone has the patience to bear with me...
I am trying to create an 'about' dialog, but there seems to be some problem with my code. For instance, I
cannot set the size of the dialog and I cannot get the information such as version name to appear (when I try
to set the property "version" as in the online docs
http://developer.gnome.org/doc/API/2.0/gtk/GtkAboutDialog.html#gtk-show-about-dialog
the GUI shows the word "version" instead of "0.1". I also get the warning
(bspc:4891): GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GtkAboutDialog' has no property
named `\x81\xc3Zh\u0001'
I would greatly appreciate it if someone could point me to some example code to help me along my learning
curve :-}
Thanks a lot Peter
my code (this gets called when the user clicks on the help/about menu):
gint create_about_box (void) {
GtkWidget *aboutdialog;
const gchar *title ="BSPC";
const gchar *version = "0.1";
const char *website ="http://www.charite.de/ch/medgen/bspc";
gint height = 300;
gint width = 400;
aboutdialog = gtk_about_dialog_new();
gtk_about_dialog_set_name(aboutdialog,title);
gtk_about_dialog_set_version(aboutdialog,version);
gtk_about_dialog_set_copyright(aboutdialog,copyright);
gtk_about_dialog_set_comments(aboutdialog,comments);
gtk_about_dialog_set_authors (aboutdialog, authors);
gtk_window_set_default_size(aboutdialog,width,height);
gtk_show_about_dialog (aboutdialog,"version");
return 1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]