# HG changeset patch # User William Pitcock # Date 1188790832 18000 # Node ID c27b1b5440267526b772959401e196f92082e5e0 # Parent db83b4a786eda51b34ade6fa973d1ae8e60bd995 macos: carbon menubar, try 1 diff -r db83b4a786ed -r c27b1b544026 src/audacious/ui/Makefile --- a/src/audacious/ui/Makefile Sun Sep 02 22:32:57 2007 -0500 +++ b/src/audacious/ui/Makefile Sun Sep 02 22:40:32 2007 -0500 @@ -4,6 +4,7 @@ gladexmldir = $(pkgdatadir)/ui OBJECTIVE_DATA = \ + carbon-menubar.ui:$(gladexmldir) \ mainwin.ui:$(gladexmldir) \ playlist.ui:$(gladexmldir) \ equalizer.ui:$(gladexmldir) diff -r db83b4a786ed -r c27b1b544026 src/audacious/ui/carbon-menubar.ui --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/audacious/ui/carbon-menubar.ui Sun Sep 02 22:40:32 2007 -0500 @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r db83b4a786ed -r c27b1b544026 src/audacious/ui_manager.c --- a/src/audacious/ui_manager.c Sun Sep 02 22:32:57 2007 -0500 +++ b/src/audacious/ui_manager.c Sun Sep 02 22:40:32 2007 -0500 @@ -375,6 +375,10 @@ { "dummy", NULL, "dummy" }, + /* XXX Carbon support */ + { "file", NULL, N_("File") }, + { "help", NULL, N_("Help") }, + { "plugins-menu", NULL, N_("Plugin Services") }, { "current track info", AUD_STOCK_INFO , N_("View Track Details"), "I", @@ -625,6 +629,9 @@ return; } +#ifdef GDK_WINDOWING_QUARTZ +static GtkWidget *carbon_menubar; +#endif static void ui_manager_create_menus_init_pmenu( gchar * path ) @@ -667,6 +674,19 @@ /* initialize plugins-menu for mainwin-menus */ ui_manager_create_menus_init_pmenu( "/mainwin-menus/main-menu/plugins-menu" ); +#ifdef GDK_WINDOWING_QUARTZ + gtk_ui_manager_add_ui_from_file( ui_manager , DATA_DIR "/ui/carbon-menubar.ui" , &gerr ); + + if ( gerr != NULL ) + { + g_critical( "Error creating UI: %s" , gerr->message ); + g_error_free( gerr ); + return; + } + + carbon_menubar = ui_manager_get_popup_menu( ui_manager , "/carbon-menubar/main-menu" ); +#endif + gtk_ui_manager_add_ui_from_file( ui_manager , DATA_DIR "/ui/playlist.ui" , &gerr ); if ( gerr != NULL )