예제 #1
0
  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 */
  return TRUE;
}

static gint eventConfigure(GtkWidget *widget, GdkEventConfigure *event, Context *context)
{
  if (context->paragraph != NULL) {
예제 #2
0
	  GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOOK_RED, 0, 0, NULL },
	{ GNOME_APP_UI_ITEM, "Insert a _green book", NULL, insert_green, NULL, NULL,
	  GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOOK_GREEN, 0, 0, NULL },
	{ GNOME_APP_UI_ITEM, "Insert a _blue book", NULL, insert_blue, NULL, NULL,
	  GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOOK_BLUE, 0, 0, NULL },
	GNOMEUIINFO_END
};

static GnomeUIInfo helper_shared_popup[] = {
	{ GNOME_APP_UI_ITEM, "Insert a _red book", NULL, insert_red, NULL, NULL,
	  GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOOK_RED, 0, 0, NULL },
	{ GNOME_APP_UI_ITEM, "Insert a _green book", NULL, insert_green, NULL, NULL,
	  GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOOK_GREEN, 0, 0, NULL },
	{ GNOME_APP_UI_ITEM, "Insert a _blue book", NULL, insert_blue, NULL, NULL,
	  GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOOK_BLUE, 0, 0, NULL },
        GNOMEUIINFO_SUBTREE("Subtree", helper_shared_popup_dup),
	GNOMEUIINFO_END
};

/* These function change the fill color of the canvas item specified in the user data */

static void
set_cyan (GtkWidget *widget, gpointer data)
{
	GnomeCanvasItem *item;

	item = GNOME_CANVAS_ITEM (data);

	gnome_canvas_item_set (item,
			       "fill_color", "cyan",
			       NULL);
예제 #3
0
        cb_run_command, NULL, NULL, 0, 0, (gchar)NULL, GDK_CONTROL_MASK
    },    
    {
        GNOME_APP_UI_ITEM, N_("Run pipe"), N_("Filter selection"),
        cb_run_pipe, NULL, NULL, 0, 0, (gchar)NULL, GDK_CONTROL_MASK
    },    
    GNOMEUIINFO_END
};

static GnomeUIInfo edit_menu [] =
{
    GNOMEUIINFO_MENU_CUT_ITEM(cb_edit_cut, NULL),
    GNOMEUIINFO_MENU_COPY_ITEM(cb_edit_copy, NULL),
    GNOMEUIINFO_MENU_PASTE_ITEM(cb_edit_paste, NULL),
    GNOMEUIINFO_MENU_SELECT_ALL_ITEM(cb_edit_selall, NULL),
    GNOMEUIINFO_SUBTREE(N_("Sort todolist"), sort_menu),
    {
        GNOME_APP_UI_ITEM, N_("Sort tree"), N_("Sort the selected subtree(s)"),
        cb_sort_subtree, NULL, NULL, 0, 0, (gchar)NULL, GDK_CONTROL_MASK
    },    
    GNOMEUIINFO_SUBTREE(N_("Transform"), modify_menu),
    GNOMEUIINFO_SUBTREE(N_("Text Selection"), text_selection_popup),
    {
        GNOME_APP_UI_ITEM, N_("_Delete"), N_("Delete note(s)"),
        cb_delete_dialog, NULL, NULL, GNOME_APP_PIXMAP_STOCK,
        GNOME_STOCK_PIXMAP_TRASH, GDK_d, GDK_CONTROL_MASK
    },
    GNOMEUIINFO_MENU_FIND_ITEM(cb_search_dialog, NULL),
    GNOMEUIINFO_MENU_PREFERENCES_ITEM(cb_pref_dialog, NULL),
    {
        GNOME_APP_UI_ITEM, N_("Save Preferences"),
예제 #4
0
{
	GNOMEUIINFO_MENU_PREFERENCES_ITEM (on_preferences1_activate, NULL),
	GNOMEUIINFO_END
};

static GnomeUIInfo help_menu_uiinfo[] =
{
        GNOMEUIINFO_HELP("teg"),
	GNOMEUIINFO_MENU_ABOUT_ITEM (on_about_activate, NULL),
	GNOMEUIINFO_END
};

static GnomeUIInfo menubar_uiinfo[] =
{
	GNOMEUIINFO_MENU_GAME_TREE (game_menu_uiinfo),
	GNOMEUIINFO_SUBTREE(N_("_Actions"), actions_menu_uiinfo),
/*	GNOMEUIINFO_MENU_EDIT_TREE (edit_menu_uiinfo), */
	GNOMEUIINFO_MENU_VIEW_TREE (view_menu_uiinfo),
	GNOMEUIINFO_MENU_SETTINGS_TREE (settings_menu_uiinfo),
	GNOMEUIINFO_MENU_HELP_TREE (help_menu_uiinfo),
	GNOMEUIINFO_END
};

GnomeUIInfo toolbar_main[] =
{
	{GNOME_APP_UI_ITEM, N_("Connect"), N_("Connect to server"),
	on_connect_activate, NULL, NULL,
	GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_NEW, 0, 0, NULL},

	{GNOME_APP_UI_ITEM, N_("Start"), N_("Start the game"),
	on_start_activate, NULL, NULL,