Back to index

lightning-sunbird  0.9+nobinonly
calendar-menubar.inc
Go to the documentation of this file.
00001 # ***** BEGIN LICENSE BLOCK *****
00002 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003 #
00004 # The contents of this file are subject to the Mozilla Public License Version
00005 # 1.1 (the "License"); you may not use this file except in compliance with
00006 # the License. You may obtain a copy of the License at
00007 # http://www.mozilla.org/MPL/
00008 #
00009 # Software distributed under the License is distributed on an "AS IS" basis,
00010 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011 # for the specific language governing rights and limitations under the
00012 # License.
00013 #
00014 # The Original Code is OEone Calendar Code, released October 31st, 2001.
00015 #
00016 # The Initial Developer of the Original Code is
00017 # OEone Corporation.
00018 # Portions created by the Initial Developer are Copyright (C) 2001
00019 # the Initial Developer. All Rights Reserved.
00020 #
00021 # Contributor(s): Garth Smedley <garths@oeone.com>
00022 #                 Mike Potter <mikep@oeone.com>
00023 #                 Colin Phillips <colinp@oeone.com>
00024 #                 Chris Charabaruk <coldacid@djfly.org>
00025 #                 Karl Guertin <grayrest@grayrest.com>
00026 #                 Dan Parent <danp@oeone.com>
00027 #                 ArentJan Banck <ajbanck@planet.nl>
00028 #                 Eric Belhaire <belhaire@ief.u-psud.fr>
00029 #                 Matthew Willis <mattwillis@gmail.com>
00030 #                 Stefan Sitter <ssitter@googlemail.com>
00031 #                 Philipp Kewisch <mozilla@kewis.ch>
00032 #                 Simon Paquet <bugzilla@babylonsounds.com>
00033 #
00034 # Alternatively, the contents of this file may be used under the terms of
00035 # either the GNU General Public License Version 2 or later (the "GPL"), or
00036 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00037 # in which case the provisions of the GPL or the LGPL are applicable instead
00038 # of those above. If you wish to allow use of your version of this file only
00039 # under the terms of either the GPL or the LGPL, and not to allow others to
00040 # use your version of this file under the terms of the MPL, indicate your
00041 # decision by deleting the provisions above and replace them with the notice
00042 # and other provisions required by the LGPL or the GPL. If you do not delete
00043 # the provisions above, a recipient may use your version of this file under
00044 # the terms of any one of the MPL, the GPL or the LGPL.
00045 #
00046 # ***** END LICENSE BLOCK *****
00047 
00048      <menubar id="main-menubar" style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
00049        <menu id="menu_File"
00050              label="&fileMenu.label;"
00051              accesskey="&fileMenu.accesskey;">
00052          <menupopup id="menu_FilePopup">
00053 
00054            <!-- create new event or task (top of 1st menu, for new users) -->
00055            <menuitem id="calendar-new-event-menu"
00056                      key="calendar-new-event-key"
00057                      label="&event.new.event;"
00058                      accesskey="&event.new.event.accesskey;"
00059                      observes="calendar_new_event_command"/>
00060            <menuitem id="calendar-new-todo-menu"
00061                      key="calendar-new-todo-key"
00062                      label="&event.new.todo;"
00063                      accesskey="&event.new.todo.accesskey;"
00064                      observes="calendar_new_todo_command"/>
00065            <menuitem id="calendar-new-calendar-menu"
00066                      key="new_calendar_key"
00067                      label="&calendar.new.server.label;"
00068                      accesskey="&calendar.new.server.accesskey;"
00069                      observes="calendar_new_calendar_command"/>
00070            <menuitem id="calendar-open-calendar-menu"
00071                      key="open_calendar_key"
00072                      label="&calendar.open.file.label;"
00073                      accesskey="&calendar.open.file.accesskey;"
00074                      observes="open_local_calendar_command"/>
00075            <menuitem id="calendar-addserver-menu"
00076                      label="&calendar.subscribe.label;"
00077                      accesskey="&calendar.subscribe.accesskey;"
00078                      observes="calendar_new_calendar_command"/>
00079            <menuseparator id="calendar-new-sep"/>
00080 
00081            <!-- import: pulling data into existing files -->
00082            <menuitem id="calendar-import-menu"
00083                      key="import_key"
00084                      label="&calendar.import.label;"
00085                      accesskey="&calendar.import.accesskey;"
00086                      observes="calendar_import_command"/>
00087            <!-- export: getting data out of existing files -->
00088            <menuitem id="calendar-export-menu"
00089                      label="&calendar.export.selection.label;"
00090                      accesskey="&calendar.export.selection.accesskey;"
00091                      observes="calendar_export_selection_command"/>
00092            <menuitem id="calendar-export-calendar-menu"
00093                      label="&calendar.export.calendar.label;"
00094                      accesskey="&calendar.export.calendar.accesskey;"
00095                      observes="calendar_export_command"/>
00096            <menuseparator id="calendar-importexport-sep"/>
00097            <menuitem id="calendar-publish-menu"
00098                      label="&calendar.publish.selection.label;"
00099                      accesskey="&calendar.publish.selection.accesskey;"
00100                      observes="calendar_publish_selected_events_command"/>
00101            <menuitem id="calendar-publish-calendar-menu"
00102                      label="&calendar.publish.calendar.label;"
00103                      accesskey="&calendar.publish.calendar.accesskey;"
00104                      observes="calendar_publish_calendar_command"/>
00105            <menuseparator id="calendar-publish-sep"/>
00106 
00107            <menuitem id="calendar-reloadserver-menu"
00108                      key="reload_server_key"
00109                      label="&calendar.reloadserver.label;"
00110                      accesskey="&calendar.reloadserver.accesskey;"
00111                      observes="calendar_reload_remote_calendars"/>
00112            <menuseparator id="calendar-reload-sep"/>
00113 
00114            <menuitem id="calendar-page-setup-menu"
00115                      label="&calendar.pagesetup.label;"
00116                      accesskey="&calendar.pagesetup.accesskey;"
00117                      observes="cmd_pageSetup"/>
00118            <menuitem id="calendar-print-menu"
00119                      key="print_key"
00120                      label="&calendar.print.label;"
00121                      accesskey="&calendar.print.accesskey;"
00122                      observes="cmd_print"/>
00123 #ifdef XP_MACOSX
00124            <menuitem id="menu_FileQuitItem"
00125                      label="&calendar.quit.label.mac;"
00126                      key="key_quitApplication"
00127                      command="cmd_quitApplication"/>
00128 #else
00129            <menuseparator id="calendar-print-sep"/>
00130 #ifdef XP_WIN
00131            <menuitem id="calendar-quit-menu"
00132                      label="&calendar.exit.label;"
00133                      accesskey="&calendar.exit.accesskey;"
00134                      oncommand="goQuitApplication()"/>
00135 #else
00136            <menuitem id="calendar-quit-menu"
00137                      label="&calendar.quit.label;"
00138                      accesskey="&calendar.quit.accesskey;"
00139                      key="key_quitApplication"
00140                      command="cmd_quitApplication"/>
00141 #endif
00142 #endif
00143          </menupopup>
00144        </menu>
00145 
00146        <menu id="menu_Edit"
00147              label="&editMenu.label;"
00148               accesskey="&editMenu.accesskey;">
00149          <menupopup id="mppEdit">
00150            <menuitem id="calendar-undo-menu"
00151                      key="undo_key"
00152                      accesskey="&calendar.undo.accesskey;"
00153                      label="&calendar.undo.label;"
00154                      observes="cmd_undo"/>
00155            <menuitem id="calendar-redo-menu"
00156                      key="redo_key"
00157                      accesskey="&calendar.redo.accesskey;"
00158                      label="&calendar.redo.label;"
00159                      observes="cmd_redo"/>
00160            <menuseparator id="before-undo-Section"/>
00161            <menuitem id="calendar-cut-menu"
00162                      key="key_cut"
00163                      label="&calendar.cut.label;"
00164                      accesskey="&calendar.cut.accesskey;"
00165                      observes="cmd_cut"/>
00166            <menuitem id="calendar-copy-menu"
00167                      key="key_copy"
00168                      label="&calendar.copy.label;"
00169                      accesskey="&calendar.copy.accesskey;"
00170                      observes="cmd_copy"/>
00171            <menuitem id="calendar-paste-menu"
00172                      key="key_paste"
00173                      label="&calendar.paste.label;"
00174                      accesskey="&calendar.paste.accesskey;"
00175                      observes="cmd_paste"/>
00176            <menuitem id="unifinder-modify-menu"
00177                      key="modify_event_key"
00178                      label="&event.edit.event;"
00179                      accesskey="&event.edit.event.accesskey;"
00180                      observes="calendar_modify_event_command"/>
00181            <menuitem id="unifinder-remove-event-menu"
00182                      label="&event.delete.event;"
00183                      accesskey="&event.delete.event.accesskey;"
00184                      observes="calendar_delete_event_command"/>
00185            <menuitem id="unifinder-remove-task-menu"
00186                      label="&event.delete.tasks;"
00187                      accesskey="&event.delete.tasks.accesskey;"
00188                      observes="calendar_delete_todo_command" />
00189            <menuitem id="calendar-selectall-menu"
00190                      key="key_selectAll"
00191                      label="&calendar.selectall.label;"
00192                      accesskey="&calendar.selectall.accesskey;"
00193                      observes="cmd_selectAll"/>
00194            <menuseparator id="before-Unifinder-Section"/>
00195            <menuitem id="calendar-show-unifinder-menu"
00196                      type="checkbox"
00197                      label="&showUnifinderCmd.label;"
00198                      observes="calendar_show_unifinder_command"
00199                      accesskey="&showUnifinderCmd.accesskey;"
00200                      checked="true"/>
00201 #ifdef XP_UNIX
00202 #ifndef XP_MACOSX
00203            <menuseparator/>
00204            <menuitem id="menu_preferences_unix"
00205                      label="&preferencesCmd.label;"
00206                      accesskey="&preferencesCmd.accesskey;"
00207                      oncommand="openPreferences();"/>
00208 #endif
00209 #endif
00210          </menupopup>
00211        </menu>
00212 
00213        <menu id="menu_View"
00214              label="&viewMenu.label;"
00215              accesskey="&viewMenu.accesskey;">
00216          <menupopup id="menu_viewPopup">
00217            <menu id="menu_Toolbars"
00218                  label="&toolbarsMenu.label;"
00219                  accesskey="&toolbarsMenu.accesskey;"
00220                  onpopupshowing="sbOnViewToolbarsPopupShowing(event);">
00221              <menupopup>
00222                <menuseparator/>
00223                <menuitem id="calendar-view-menu-customize"
00224                          observes="cmd_CustomizeToolbars"
00225                          label="&calendar.menu.customize.label;"
00226                          accesskey="&calendar.menu.customize.accesskey;"/>
00227              </menupopup>
00228            </menu>
00229            <menuitem id="menu_showStatusBar"
00230                      type="checkbox"
00231                      label="&showStatusBarCmd.label;"
00232                      command="cmd_showStatusBar"
00233                      accesskey="&showStatusBarCmd.accesskey;"
00234                      checked="true"/>
00235            <menuitem id="menu_showTaskBox"
00236                      type="checkbox"
00237                      label="&showTaskBoxCmd.label;"
00238                      command="cmd_showTaskBox"
00239                      accesskey="&showTaskBoxCmd.accesskey;"
00240                      checked="true"/>
00241            <menuseparator/>
00242            <menuitem id="calendar-view-menu-day"
00243                      type="radio"
00244                      name="calendarMenuViews"
00245                      key="calendar-day-view-key"
00246                      label="&calendar.flat.topbar.dayview;"
00247                      accesskey="&calendar.dayview.accesskey;"
00248                      observes="calendar_day-view_command"/>
00249            <menuitem id="calendar-view-menu-week"
00250                      type="radio"
00251                      name="calendarMenuViews"
00252                      key="calendar-week-view-key"
00253                      label="&calendar.flat.topbar.weekview;"
00254                      accesskey="&calendar.weekview.accesskey;"
00255                      observes="calendar_week-view_command"/>
00256            <menuitem id="calendar-view-menu-multiweek"
00257                      type="radio"
00258                      name="calendarMenuViews"
00259                      key="calendar-multiweek-view-key"
00260                      label="&calendar.flat.topbar.multiweekview;"
00261                      accesskey="&calendar.multiweekview.accesskey;"
00262                      observes="calendar_multiweek-view_command"/>
00263            <menuitem id="calendar-view-menu-month"
00264                      type="radio"
00265                      name="calendarMenuViews"
00266                      key="calendar-month-view-key"
00267                      label="&calendar.flat.topbar.monthview;"
00268                      accesskey="&calendar.monthview.accesskey;"
00269                      observes="calendar_month-view_command"/>
00270            <menuseparator/>
00271            <menuitem id="calendar_view_orientation"
00272                      type="checkbox"
00273                      label="&calendar.orientation.label;"
00274                      accesskey="&calendar.orientation.accesskey;"
00275                      observes="calendar_toggle_orientation_command"/>
00276            <menuitem id="only-workday-checkbox-1"
00277                      type="checkbox"
00278                      label="&calendar.onlyworkday.checkbox.label;"
00279                      accesskey="&calendar.onlyworkday.checkbox.accesskey;"
00280                      observes="calendar_toggle_workdays_only_command"/>
00281            <menuitem id="display-todo-inview-checkbox-1"
00282                      type="checkbox"
00283                      label="&calendar.displaytodos.checkbox.label;"
00284                      accesskey="&calendar.displaytodos.checkbox.accesskey;"
00285                      observes="calendar_toggle_tasks_in_view_command"/>
00286            <menuitem id="completed-tasks-inview-checkbox-1"
00287                      type="checkbox"
00288                      label="&calendar.completedtasks.checkbox.label;"
00289                      accesskey="&calendar.completedtasks.checkbox.accesskey;"
00290                      observes="calendar_toggle_show_completed_in_view_command"/>
00291            <menu id="menu-numberofweeks-inview"
00292                  label="&calendar.menu.numberofweeks.label;"
00293                  accesskey="&calendar.menu.numberofweeks.accesskey;"
00294                  oncommand="gCalendarWindow.currentView.changeNumberOfWeeks(event.target)"
00295                  disabled="true">
00296            <menupopup>
00297              <menuitem type="radio"
00298                        value="2"
00299                        name="menunbofweeks"
00300                        label="&calendar.menu.numberofweeks.2;"/>
00301              <menuitem type="radio"
00302                        value="3"
00303                        name="menunbofweeks"
00304                        label="&calendar.menu.numberofweeks.3;"/>
00305              <menuitem type="radio"
00306                        value="4"
00307                        name="menunbofweeks"
00308                        label="&calendar.menu.numberofweeks.4;"/>
00309              <menuitem type="radio"
00310                        value="5"
00311                        name="menunbofweeks"
00312                        label="&calendar.menu.numberofweeks.5;"/>
00313              <menuitem type="radio"
00314                        value="6"
00315                        name="menunbofweeks"
00316                        label="&calendar.menu.numberofweeks.6;"/>
00317            </menupopup>
00318            </menu>
00319            <menuseparator/>
00320            <!-- XXX lilmatt: Finish this! -->
00321            <menuitem id="calendar-fullscreen-menu"
00322                      label="&calendar.fullscreen.label;"
00323                      accesskey="&calendar.fullscreen.accesskey;"
00324                      disabled="true"/>
00325          </menupopup>
00326        </menu>
00327 
00328        <menu id="menu_Go"
00329              label="&goMenu.label;"
00330              accesskey="&goMenu.accesskey;">
00331          <menupopup id="mppView">
00332            <menuitem id="calendar-go-menu-today"
00333                      key="calendar-go-to-today-key"
00334                      label="&goTodayCmd.label;"
00335                      accesskey="&goTodayCmd.accesskey;"
00336                      observes="calendar_go_to_today_command"/>
00337            <menuitem id="calendar-go-menu-date"
00338                      key="go_to_date_key"
00339                      label="&goDateCmd.label;"
00340                      accesskey="&goDateCmd.accesskey;"
00341                      observes="go_date_command"/>
00342            <menuseparator/>
00343            <!-- Label is set appropriate to the variable newView in 
00344                 switchToView(newView) of calendarWindow.js -->
00345            <menuitem id="calendar-go-menu-previous"
00346                      label=""
00347                      label-day-view="&goPreviousCmd.day.label;"
00348                      label-week-view="&goPreviousCmd.week.label;"
00349                      label-multiweek-view="&goPreviousCmd.week.label;"
00350                      label-month-view="&goPreviousCmd.month.label;"
00351                      accesskey="&goPreviousCmd.accesskey;"
00352                      observes="calendar_view_prev_command"/>
00353            <menuitem id="calendar-go-menu-next"
00354                      label=""
00355                      label-day-view="&goNextCmd.day.label;"
00356                      label-week-view="&goNextCmd.week.label;"
00357                      label-multiweek-view="&goNextCmd.week.label;"
00358                      label-month-view="&goNextCmd.month.label;"
00359                      accesskey="&goNextCmd.all.accesskey;"
00360                      observes="calendar_view_next_command"/>
00361          </menupopup>
00362        </menu>
00363 
00364        <menu id="menu_Tools"
00365              label="&toolsMenu.label;"
00366              accesskey="&toolsMenu.accesskey;">
00367          <menupopup id="menu_ToolsPopup">
00368            <menuitem id="addonsManager"
00369                      label="&calendar.addons.label;"
00370                      accesskey="&calendar.addons.accesskey;"
00371                      command="Tools:Addons"/>
00372            <menuseparator id="devToolsSeparator"/>
00373            <menuitem id="javascriptConsole" 
00374                      label="&errorConsoleCmd.label;"
00375                      accesskey="&errorConsoleCmd.accesskey;"
00376                      oncommand="toJavaScriptConsole();"/>
00377 <!-- The ids of the following menuseparator and menuitem must remain as they are to be
00378    - automatically hidden on Mac OS X - See mozilla/widget/src/mac/nsMenuBarX.cpp -->
00379 #ifndef XP_UNIX
00380            <menuseparator id="menu_PrefsSeparator"/>
00381                <menuitem id="menu_preferences"
00382                          label="&optionsCmd.label;"
00383                          accesskey="&optionsCmd.accesskey;"
00384                          oncommand="openPreferences();"/>
00385 #endif
00386 #ifdef XP_MACOSX
00387 # -- ifdef UNIX also covers Mac OS X, so we have to explicitly enable this menuitem
00388            <menuseparator id="menu_PrefsSeparator"/>
00389                <menuitem id="menu_preferences"
00390                          label="&preferencesCmdMac.label;"
00391                          key="key_preferencesCmdMac"
00392                          oncommand="openPreferences();"/>
00393 #endif
00394          </menupopup>
00395        </menu>
00396 
00397 #ifdef XP_MACOSX
00398 <!-- Mac OS X only "Window" menu -->
00399        <menu id="windowMenu"
00400              label="&windowMenu.label;"
00401              datasources="rdf:window-mediator"
00402              ref="NC:WindowMediatorRoot"
00403              onpopupshown="checkFocusedWindow();">
00404          <template>
00405            <rule>
00406              <menupopup>
00407                <menuitem uri="rdf:*"
00408                          label="rdf:http://home.netscape.com/NC-rdf#Name"
00409                          type="radio"
00410                          name="windowList"
00411                          oncommand="ShowWindowFromResource(event.target)"/>
00412              </menupopup>
00413            </rule>
00414          </template>
00415          <menupopup id="windowPopup">
00416            <menuitem id="minimizeWindow"
00417                      key="key_minimizeWindow"
00418                      label="&minimizeWindow.label;"
00419                      command="minimizeWindowCmd"/>
00420            <menuitem id="zoomWindow"
00421                      label="&zoomWindow.label;"
00422                      command="zoomWindowCmd"/>
00423            <menuseparator/>
00424            <menuitem id="bringAllToFront"
00425                      label="&bringAllToFront.label;"
00426                      command="bringAllToFront"
00427                      disabled="true"/>
00428            <menuseparator id="sep-window-list"/>
00429          </menupopup>
00430 # We just need this node to exist in order to get Gecko to create a Services
00431 # menu for us under Cocoa widgets. It will be automatically hidden.
00432          <menuitem id="menu_mac_services"
00433                    label="&servicesMenuMac.label;"/>
00434 # We just need this node to exist in order to get Gecko to create a "Hide [app]"
00435 # menu for us under Cocoa widgets. It will be automatically hidden.
00436          <menuitem id="menu_mac_hide_app"
00437                    label="&hideThisAppCmdMac.label;"
00438                    key="key_hideThisAppCmdMac"/>
00439 # We just need this node to exist in order to get Gecko to create a "Hide Others"
00440 # menu for us under Cocoa widgets. It will be automatically hidden.
00441          <menuitem id="menu_mac_hide_others"
00442                    label="&hideOtherAppsCmdMac.label;"
00443                    key="key_hideOtherAppsCmdMac"/>
00444 # We just need this node to exist in order to get Gecko to create a "Show All"
00445 # menu for us under Cocoa widgets. It will be automatically hidden.
00446          <menuitem id="menu_mac_show_all"
00447                    label="&showAllAppsCmdMac.label;"/>
00448        </menu>
00449 #endif
00450 
00451 #ifdef XP_WIN
00452    <menu id="menu_Help"
00453          label="&helpMenuWin.label;"
00454          accesskey="&helpMenuWin.accesskey;">
00455 #else
00456    <menu id="menu_Help"
00457          label="&helpMenu.label;"
00458          accesskey="&helpMenu.accesskey;">
00459 #endif
00460          <menupopup id="menu_HelpPopup" onpopupshowing="sbUpdateItem();">
00461            <!-- XXX lilmatt: Finish this!  oncommand="openTopWin('&helpURL;');" -->
00462            <menuitem label="&calendar.help.label;"
00463                      accesskey="&calendar.help.accesskey;"
00464                      disabled="true"/>
00465            <menuitem accesskey="&releaseCmd.accesskey;"
00466                      label="&releaseCmd.label;"
00467                      oncommand="openReleaseNotes();"/>
00468            <menuseparator id="menu_HelpUpdatesSeparator"/>
00469            <menuitem id="checkForUpdates"
00470                      class="menuitem-iconic"
00471                      label="&updateCmd.label;"
00472                      accesskey="&updateCmd.accesskey;"
00473                      oncommand="sbCheckForUpdates();"/>
00474 
00475 # On Mac OS X, the "About Sunbird" menuitem belongs under the "Sunbird" menu.
00476 # We hide it (and its separator) here, but we don't ifdef the entire menuitem
00477 # out, as doing so will prevent it from appearing in either place at all!
00478 #
00479 #ifndef XP_MACOSX
00480            <menuseparator id="menu_HelpAboutSeparator"/>
00481 #endif
00482            <menuitem id="aboutName"
00483                      label="&aboutCmd.label;"
00484                      accesskey="&aboutCmd.accesskey;"
00485 #ifdef XP_MACOSX
00486                      hidden="true"
00487 #endif
00488                      oncommand="openAboutDialog();"/>
00489          </menupopup>
00490        </menu>
00491      </menubar>