[Anjuta-list] braindead user question
- From: dim owner <rtpc comcast net>
- To: anjuta-list lists sourceforge net
- Subject: [Anjuta-list] braindead user question
- Date: Thu Nov 6 09:15:05 2003
I'm starting a new project; I've got this bug that I can't seem to figure out.
This is just supposed to create an about box. I'ts almost line for line like
a function in my 'hello-world' project, which worked just fine.
What is happening is, gnome_app_new is failing because the internal handle
that I generate is not getting generated. This is very odd because the about
message _is_ getting generated, and it uses the exact same method.
In callbacks.c:
...
#include <gtk/gtk.h>
#include <gnome.h>
...
double window_index = 0;
double version = 0.1;
...
void on_about1_activate (GtkMenuItem * menuitem, gpointer user_data)
{
gchar * aboutName;
gchar * message;
window_index++;
// Create the message
message = g_strdup_printf("perlView v%.1f\n\nAuthor:Rob Collins\nCopyright:
2003\n\nLicensed under the GPL. A copy\nof the Gnu Public License is
included\nwith the source, and should not be\nremoved in the creation of
packages\nof this software.\n\nperlView provides a GUI access to\nperl
documents (perldoc) and perl\'s\nmodules.\n\nIn the future, perlView will be
a more\ncomplete document management\nsystem for perl, complete
with\ngeneration of PDFs.\nI am not a very skilled programmer,\nif you would
like to contribute,\nPLEASE do so. :)", version);
// Construct the message box internal handle
aboutName = g_strdup_printf ("About%.2f", window_index);
GtkWidget * msgBox = gnome_app_new (aboutName, "About");
gnome_app_message (GNOME_APP(msgBox), message);
// Clean up
g_free (message);
g_free (aboutName);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]