GNOMEUIINFO_MENU_EXIT_ITEM(game_quit_callback, NULL), GNOMEUIINFO_END }; GnomeUIInfo settingsmenu[] = { GNOMEUIINFO_MENU_PREFERENCES_ITEM(game_preferences_callback, NULL), GNOMEUIINFO_END }; GnomeUIInfo helpmenu[] = { GNOMEUIINFO_HELP("samegnome"), GNOMEUIINFO_MENU_ABOUT_ITEM(game_about_callback, NULL), GNOMEUIINFO_END }; GnomeUIInfo mainmenu[] = { GNOMEUIINFO_MENU_GAME_TREE(gamemenu), GNOMEUIINFO_MENU_SETTINGS_TREE(settingsmenu), GNOMEUIINFO_MENU_HELP_TREE(helpmenu), GNOMEUIINFO_END }; #define ELEMENTS(x) (sizeof (x) / sizeof (x [0])) static int
{ GNOMEUIINFO_MENU_NEW_ITEM((gchar *) "_New Sample", (gchar *) "Create a new Gnome Layout Sample", newapp, NULL), GNOMEUIINFO_MENU_OPEN_ITEM(openfile, NULL), GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_CLOSE_ITEM(closeapp, NULL), GNOMEUIINFO_MENU_EXIT_ITEM(shutdown, NULL), GNOMEUIINFO_END }; GnomeUIInfo helpMenu[] = { /* GNOMEUIINFO_HELP("gnomelayout"), */ GNOMEUIINFO_MENU_ABOUT_ITEM(showabout, NULL), GNOMEUIINFO_END }; GnomeUIInfo mainMenu[] = { GNOMEUIINFO_SUBTREE(N_((gchar *) "File"), fileMenu), GNOMEUIINFO_SUBTREE(N_((gchar *) "Help"), helpMenu), GNOMEUIINFO_END }; static gint eventDelete(GtkWidget *widget, GdkEvent *event, gpointer data) { closeSample(widget); /* indicate that closeapp already destroyed the window */
*/ GtkWidget *app; //!< Main application window GtkWidget *entryNr; //!< Entry widget for number of resistors GtkWidget *entryV; //!< Entry widget for voltage GtkWidget *entryR1; //!< Entry widget for resistor value number 1 GtkWidget *entryR2; //!< Entry widget for resistor value number 2 GtkWidget *entryR3; //!< Entry widget for resistor value number 3 GtkWidget *radioSerial; //!< Radio buttons for serial connection type GtkWidget *radioParalell; //!< Radio buttons for parallel connection type static GnomeUIInfo filemenu[] = { GNOMEUIINFO_MENU_EXIT_ITEM ( closeApp, NULL ), GNOMEUIINFO_END };//!< File menu item static GnomeUIInfo helpmenu[] = { GNOMEUIINFO_MENU_ABOUT_ITEM ( onAboutActivate, NULL ), GNOMEUIINFO_END };//!< Help menu item static GnomeUIInfo menubar[] = { GNOMEUIINFO_MENU_FILE_TREE (filemenu), GNOMEUIINFO_MENU_HELP_TREE (helpmenu), GNOMEUIINFO_END };//!< Menubar for the application GtkWidget *createMainWindow( void ) { GtkWidget *app;//!< Main container GtkWidget *buttonCalc, *buttonClose; GtkWidget *labelHeader; GtkWidget *label; GtkWidget *boxResistors, *boxConnType;
#include <gnome.h> #include "callbacks.h" #include "interface.h" #include "support.h" static GnomeUIInfo file1_menu_uiinfo[] = { GNOMEUIINFO_MENU_EXIT_ITEM (on_exit1_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo help1_menu_uiinfo[] = { GNOMEUIINFO_MENU_ABOUT_ITEM (on_about1_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo menubar1_uiinfo[] = { GNOMEUIINFO_MENU_FILE_TREE (file1_menu_uiinfo), GNOMEUIINFO_MENU_HELP_TREE (help1_menu_uiinfo), GNOMEUIINFO_END }; GtkWidget* create_app (void) { GtkWidget *app; GtkWidget *dock1;
}; static GnomeUIInfo misc_menu [] = { GNOMEUIINFO_END }; static GnomeUIInfo help_menu [] = { /* FIXME */ /* GNOMEUIINFO_HELP ("gnome-yank"), */ { GNOME_APP_UI_ITEM, N_("yank homepage"), 0, cb_yank_homepage, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_HOME, 0, 0, 0 }, GNOMEUIINFO_MENU_ABOUT_ITEM(cb_about, NULL), GNOMEUIINFO_END }; static GnomeUIInfo menu [] = { GNOMEUIINFO_MENU_FILE_TREE(file_menu), GNOMEUIINFO_MENU_EDIT_TREE(edit_menu), GNOMEUIINFO_SUBTREE(N_("A_dd"), add_menu), GNOMEUIINFO_SUBTREE(N_("M_isc"), misc_menu), GNOMEUIINFO_MENU_HELP_TREE(help_menu), GNOMEUIINFO_END }; static GnomeUIInfo toolbar [] = {
GNOMEUIINFO_MENU_EXIT_ITEM (gtk_main_quit, NULL), GNOMEUIINFO_END }; static GnomeUIInfo mnuContacts_menu_uiinfo[] = { {GNOME_APP_UI_ITEM, N_("_Add"), NULL, (gpointer) on_Add, NULL, NULL, 0, NULL, 0, 0, NULL}, {GNOME_APP_UI_ITEM, N_("_Delete"),NULL, (gpointer) on_mnuDelete_activate, NULL, NULL, 0, NULL, 0, 0, NULL}, GNOMEUIINFO_SEPARATOR, {GNOME_APP_UI_ITEM, N_("_Offline Messages"), NULL, (gpointer) on_Offline, NULL, NULL, 0, NULL, 0, 0, NULL}, GNOMEUIINFO_END }; static GnomeUIInfo mnuHelp_menu_uiinfo[] = { GNOMEUIINFO_MENU_ABOUT_ITEM (on_mnuAbout_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo menubar_uiinfo[] = { {GNOME_APP_UI_SUBTREE, N_("_Conn"),NULL,conn_menu_uiinfo, NULL, NULL, 0, NULL, 0, 0, NULL}, {GNOME_APP_UI_SUBTREE, N_("Con_tacts"),NULL,mnuContacts_menu_uiinfo, NULL, NULL, 0, NULL, 0, 0, NULL}, GNOMEUIINFO_MENU_HELP_TREE (mnuHelp_menu_uiinfo), GNOMEUIINFO_END }; GtkWidget *scrolledwindow1; GtkWidget *scrolledwindow4; extern GtkWidget *gifmain;