/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* e-dropdown-menu.c * * Copyright (C) 2001 Ximian, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Authors: * Ettore Perazzoli * Damon Chaplin */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include "e-dropdown-button.h" /* (The following is shameless stolen from `testgnome.c'. */ static void item_activated (GtkWidget *widget, void *data) { printf ("%s activated.\n", (char *) data); } static GnomeUIInfo ui_info[] = { { GNOME_APP_UI_ITEM, "_New", "Create a new file", item_activated, "file/new", NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_NEW, 'n', GDK_CONTROL_MASK, NULL }, { GNOME_APP_UI_ITEM, "_Open...", "Open an existing file", item_activated, "file/open", NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN, 'o', GDK_CONTROL_MASK, NULL }, { GNOME_APP_UI_ITEM, "_Save", "Save the current file", item_activated, "file/save", NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE, 's', GDK_CONTROL_MASK, NULL }, { GNOME_APP_UI_ITEM, "Save _as...", "Save the current file with a new name", item_activated, "file/save as", NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE_AS, 0, 0, NULL }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, "_Print...", "Print the current file", item_activated, "file/print", NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_PRINT, 'p', GDK_CONTROL_MASK, NULL }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, "_Close", "Close the current file", item_activated, "file/close", NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CLOSE, 0, 0, NULL }, { GNOME_APP_UI_ITEM, "E_xit", "Exit the program", item_activated, "file/exit", NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_EXIT, 'q', GDK_CONTROL_MASK, NULL }, GNOMEUIINFO_END }; int main (int argc, char **argv) { GtkWidget *window; GtkWidget *menu; GtkWidget *dropdown_button; gnome_init ("test-dropdown-button", "0.0", argc, argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW (window), 1, 1); menu = gtk_menu_new (); gnome_app_fill_menu (GTK_MENU_SHELL (menu), ui_info, NULL, TRUE, 0); dropdown_button = e_dropdown_button_new ("Me_nu", GTK_MENU (menu)); gtk_container_add (GTK_CONTAINER (window), dropdown_button); gtk_widget_show (window); gtk_widget_show (dropdown_button); gtk_main (); return 0; } n> FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Reduce dependency on the python2 metaportantoine2018-02-191-1/+1
* lang/spidermonkey185: unbreak build with Clang 6 (C++14 by default)jbeich2018-01-261-0/+247
* Update devel/readline to 7.0 patch 3sunpoet2017-06-271-1/+1
* Add patches to fix the build on armv6.kwm2017-06-056-1/+77
* Mark as broken on various tier-2 archs.linimon2016-11-161-7/+8
* Do not redefine DEBUG_DESC when its meaning more or less matches the defaultdanfe2016-10-291-1/+0
* devel/nspr, security/nss: drop version from SONAMEjbeich2016-10-091-1/+1
* Remove ${PORTSDIR}/ from dependencies, categories h, i, j, k, and l.mat2016-04-011-3/+3
* Mark spidermonkey185 as not for PowerPC/PowerPC64jmmv2015-10-211-0/+3
* Drop 8 support.mat2015-10-151-2/+2
* MASTER_SITES cleanup.mat2015-05-141-2/+1
* Cleanup plistbapt2014-10-271-1/+0
* - Convert ports of irc/ and lang/ to new USES=pythonmva2014-10-211-2/+1
* Replace USE_AUTOTOOLS=autoconf213:env with a regular build dependency.tijl2014-10-011-3/+3
* Fix build with readline from portsbapt2014-07-011-56/+13
* Stagify, overwrite symlinks otherwise they point into the stagedir.kwm2014-03-071-3/+5
* Python cleanup:rene2014-01-141-1/+1
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1
* Fix leftout from previous commitbapt2013-09-171-1/+1
* Convert to new perl frameworkbapt2013-09-171-4/+2
* - Remove MAKE_JOBS_SAFE variableak2013-08-151-1/+0
* lang/spidermonkey185: Fix clang build, cherrypick upstream clang fixeskoobs2013-06-096-3/+1942
* Update MAINTAINER address for all my ports. While I'm here,koobs2013-02-091-2/+2
* Add a symlink for libmozjs185.so.1 so adding mozjs185 to LIB_DEPENDS works.kwm2012-10-172-0/+5