changeset 3418:c27b1b544026 trunk

macos: carbon menubar, try 1
author William Pitcock <nenolod@atheme.org>
date Sun, 02 Sep 2007 22:40:32 -0500
parents db83b4a786ed
children 47d6fb3884fb
files src/audacious/ui/Makefile src/audacious/ui/carbon-menubar.ui src/audacious/ui_manager.c
diffstat 3 files changed, 149 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- /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 @@
+<?xml version="1.0" standalone="yes" encoding="utf-8" ?>
+
+<ui>
+	<menubar name="carbon-menubar">
+		<menu action="dummy" name="main-menu">
+			<menu action="file">
+				<menuitem action="play file" />
+				<menuitem action="play location" />
+        			<separator />
+				<menuitem action="preferences" />
+				<menuitem action="quit" />
+			</menu>
+			<menu action="playback">
+				<menuitem action="playback repeat" />
+				<menuitem action="playback shuffle" />
+				<menuitem action="playback no playlist advance" />
+				<menuitem action="stop after current song" />
+				<separator />
+				<menuitem action="playback play" />
+				<menuitem action="playback pause" />
+				<menuitem action="playback stop" />
+				<menuitem action="playback previous" />
+				<menuitem action="playback next" />
+				<separator />
+				<menuitem action="jump to playlist start" />
+				<separator />
+				<menuitem action="ab set" />
+				<menuitem action="ab clear" />
+				<separator />
+				<menuitem action="jump to file" />
+				<menuitem action="jump to time" />
+				<separator />
+				<menuitem action="current track info" />
+			</menu>
+			<menu action="playlist">
+				<menuitem action="playlist new" />
+				<menuitem action="playlist delete" />
+				<separator />
+				<menuitem action="playlist select next" />
+				<menuitem action="playlist select previous" />
+				<separator />
+				<menuitem action="playlist load" />
+				<menuitem action="playlist save" />
+				<menuitem action="playlist save default" />
+				<separator />
+				<menuitem action="playlist manager" />
+				<separator />
+				<menuitem action="playlist refresh" />
+				<separator />
+<!--				<menuitem action="playlist delete" /> -->
+			</menu>
+			<menu action="view">
+				<menuitem action="show player" />
+				<menuitem action="show playlist editor" />
+				<menuitem action="show equalizer" />
+				<separator />
+				<menuitem action="view time elapsed" />
+				<menuitem action="view time remaining" />
+				<separator />
+				<menuitem action="view always on top" />
+				<menuitem action="view put on all workspaces" />
+				<menuitem action="autoscroll songname" />
+				<separator />
+				<menuitem action="roll up player" />
+				<menuitem action="roll up playlist editor" />
+				<menuitem action="roll up equalizer" />
+				<separator />
+				<menuitem action="view doublesize" />
+				<menuitem action="view easy move" />
+			</menu>
+			<menu action="visualization">
+				<menu action="vismode">
+					<menuitem action="vismode analyzer" />
+					<menuitem action="vismode scope" />
+					<menuitem action="vismode voiceprint" />
+					<menuitem action="vismode off" />
+				</menu>
+				<menu action="anamode">
+					<menuitem action="anamode normal" />
+					<menuitem action="anamode fire" />
+					<menuitem action="anamode vertical lines" />
+					<separator />
+					<menuitem action="anatype lines" />
+					<menuitem action="anatype bars" />
+					<separator />
+					<menuitem action="anamode peaks" />
+				</menu>
+				<menu action="scomode">
+					<menuitem action="scomode dot" />
+					<menuitem action="scomode line" />
+					<menuitem action="scomode solid" />
+				</menu>
+				<menu action="vprmode">
+					<menuitem action="vprmode normal" />
+					<menuitem action="vprmode fire" />
+					<menuitem action="vprmode ice" />
+				</menu>
+				<menu action="wshmode">
+					<menuitem action="wshmode normal" />
+					<menuitem action="wshmode smooth" />
+				</menu>
+				<menu action="refrate">
+					<menuitem action="refrate full" />
+					<menuitem action="refrate half" />
+					<menuitem action="refrate quarter" />
+					<menuitem action="refrate eighth" />
+				</menu>
+				<menu action="anafoff">
+					<menuitem action="anafoff slowest" />
+					<menuitem action="anafoff slow" />
+					<menuitem action="anafoff medium" />
+					<menuitem action="anafoff fast" />
+					<menuitem action="anafoff fastest" />
+				</menu>
+				<menu action="peafoff">
+					<menuitem action="peafoff slowest" />
+					<menuitem action="peafoff slow" />
+					<menuitem action="peafoff medium" />
+					<menuitem action="peafoff fast" />
+					<menuitem action="peafoff fastest" />
+				</menu>
+			</menu>
+			<menu action="help">
+				<menuitem action="about audacious" />
+			</menu>
+		</menu>
+	</menubar>
+</ui>
--- 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<ui/carbon-menubar.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 )