Re: Beginner's question: About dialog





Hi, my guess is that the gtk_show_about_dialog(),
you're missing the value for "verions", and also
argument list is ended with a NULL. In your case, it
does not. So that could the problem.

Cheers,

--- Peter Robinson <Peter Robinson t-online de> wrote:

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;
}
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



=======================
Tran Van Hoang
                        
Mobile#: 0915084988
#####0401 343 344#####
=======================



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]