Re: Possible bug in menubar creation?
- From: Pawel Salek <pawsa TheoChem kth se>
- To: fritz jetzek i-dmedia com
- Cc: gnome-devel-list gnome org
- Subject: Re: Possible bug in menubar creation?
- Date: Sat, 28 Apr 2001 18:10:47 +0200
On 2001-04-28 18:52 fritz jetzek i-dmedia com wrote:
> I observed the following behaviour: when generating a menubar with
> gnome_app_create_menus(), and *not* filling the contents of the main
You have forgotten to attach gnome_aphasia.h to your post. Howerever,
the attached mutation of your program compiles and works fine, menu
dragging as well.
Linux beta 2.2.19-6.2.1 i686 unknown
gnome-libs-1.2.11-0_helix_3
gtk+-1.2.8-0_helix_1
/pawel
--
Pawel Salek (pawsa theochem kth se) http://www.theochem.kth.se/~pawsa/
Theoretical Chemistry Division, KTH voice: +46 8 790-8202
//#include <gnome_aphasia.h>
#include <gnome.h>
#define PACKAGE "plum"
#define PROGRAM "aphasia"
#define VERSION "1.1"
static GnomeUIInfo file_menu[] = {
GNOMEUIINFO_MENU_NEW_WINDOW_ITEM(NULL, NULL),
GNOMEUIINFO_MENU_OPEN_ITEM(NULL, NULL),
GNOMEUIINFO_MENU_SAVE_ITEM(NULL, NULL),
GNOMEUIINFO_MENU_SAVE_AS_ITEM(NULL, NULL),
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_MENU_CLOSE_ITEM(NULL, NULL),
GNOMEUIINFO_MENU_EXIT_ITEM(NULL, NULL),
GNOMEUIINFO_END
};
static GnomeUIInfo edit_menu[] = {
GNOMEUIINFO_MENU_PROPERTIES_ITEM(NULL, NULL),
GNOMEUIINFO_END
};
static GnomeUIInfo help_menu[] = { GNOMEUIINFO_MENU_ABOUT_ITEM(NULL, NULL),
GNOMEUIINFO_END };
static GnomeUIInfo menu[] = { GNOMEUIINFO_MENU_FILE_TREE(file_menu),
GNOMEUIINFO_MENU_EDIT_TREE(edit_menu),
GNOMEUIINFO_MENU_HELP_TREE(help_menu),
GNOMEUIINFO_END };
static void gnome_aphasia( void )
/* Assemble the main window */
{
GtkWidget *app, *button;
app = gnome_app_new(PACKAGE, PROGRAM);
gtk_widget_show(app);
button = gtk_button_new_with_label("moo");
gtk_widget_show(button);
/* Comment next line; then rebuild and try to drag menubar out of window */
gnome_app_set_contents(GNOME_APP(app), button);
gnome_app_create_menus(GNOME_APP(app), menu);
}
int main ( gint argc,
gchar **argv )
/* Main. */
{
bindtextdomain(PACKAGE, GNOMELOCALEDIR);
textdomain(PACKAGE);
//erty_init(PROGRAM);
gnome_init(PACKAGE, VERSION, argc, argv);
gnome_aphasia();
gtk_main();
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]