aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.xml223
-rw-r--r--resources/application.properties9
-rw-r--r--resources/config/defaults.properties31
-rw-r--r--resources/images/images.properties329
-rw-r--r--resources/languages/resources.properties664
-rw-r--r--resources/languages/resources_bg.properties298
-rw-r--r--resources/languages/resources_de.properties416
-rw-r--r--resources/languages/resources_fr.properties349
-rw-r--r--resources/languages/resources_it.properties611
-rw-r--r--resources/languages/resources_ro.properties297
-rw-r--r--resources/languages/resources_zh_CN.properties337
-rw-r--r--resources/login.properties2
-rw-r--r--resources/lookandfeel.properties1
-rw-r--r--resources/size/size.properties10
-rw-r--r--resources/sounds/sounds.properties18
-rw-r--r--src/net/java/sip/communicator/impl/audionotifier/SCAudioClipImpl.java4
-rw-r--r--src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java7
-rw-r--r--src/net/java/sip/communicator/impl/gui/GuiActivator.java20
-rw-r--r--src/net/java/sip/communicator/impl/gui/UIServiceImpl.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/i18n/Messages.java36
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommChatSelectorMenuUI.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java64
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java4
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/MainFrame.java20
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/account/AccountRegFirstPage.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java2
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/call/DialPanel.java12
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java2
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java6
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/MenusPanel.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java8
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java.orig210
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/menus/HelpMenu.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/toolBars/ExtendedMainToolBar.java6
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java3
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java.orig668
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/ExtendedQuickMenu.java6
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java3
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/menus/QuickMenu.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/ViewMenu.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/ApplicationProperties.java57
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/ColorProperties.java80
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/utils/Constants.java22
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java50
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/Images.java50
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/LoginProperties.java57
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/LookAndFeelProperties.java57
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/SizeProperties.java60
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/Smiley.java13
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/dict/DictStatusEnum.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java25
-rw-r--r--src/net/java/sip/communicator/impl/protocol/dict/dict.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/GibberishStatusEnum.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolIconGibberishImpl.java31
-rw-r--r--src/net/java/sip/communicator/impl/protocol/gibberish/gibberish.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/AimStatusEnum.java99
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/IcqActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconAimImpl.java24
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconIcqImpl.java24
-rw-r--r--src/net/java/sip/communicator/impl/protocol/icq/icq.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/ProtocolIconIrcImpl.java25
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/irc.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java38
-rwxr-xr-xsrc/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/MsnActivator.java20
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/ProtocolIconMsnImpl.java4
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/Resources.java60
-rwxr-xr-xsrc/net/java/sip/communicator/impl/protocol/msn/msn.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/msn/resources.properties1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/ProtocolIconRssImpl.java30
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/RssStatusEnum.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/rss/rss.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/OperationSetSmsMessagingSipImpl.java728
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/ProtocolIconSipImpl.java25
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/SipStatusEnum.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/sip.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java4
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/ProtocolIconSSHImpl.java4
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/Resources.java30
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java19
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/SSHStatusEnum.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/resources.properties4
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/ssh.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java6
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolIconYahooImpl.java4
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/Resources.java60
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/YahooActivator.java20
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/resources.properties2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/yahoo/yahoo.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolIconZeroconfImpl.java25
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfStatusEnum.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/zeroconf/zeroconf.provider.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java45
-rw-r--r--src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java594
-rw-r--r--src/net/java/sip/communicator/impl/resources/resourcemanagement.manifest.mf10
-rw-r--r--src/net/java/sip/communicator/impl/systray/Resources.java100
-rw-r--r--src/net/java/sip/communicator/impl/systray/systray.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/version/VersionActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/version/VersionImpl.java21
-rwxr-xr-xsrc/net/java/sip/communicator/impl/version/version.impl.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/accountinfo/AccountDetailsPanel.java2
-rw-r--r--src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java2
-rw-r--r--src/net/java/sip/communicator/plugin/accountinfo/Resources.java85
-rw-r--r--src/net/java/sip/communicator/plugin/accountinfo/accountinfo.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java79
-rw-r--r--src/net/java/sip/communicator/plugin/aimaccregwizz/aimaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/branding/AboutWindow.java32
-rw-r--r--src/net/java/sip/communicator/plugin/branding/AboutWindowPluginComponent.java5
-rw-r--r--src/net/java/sip/communicator/plugin/branding/BrandingActivator.java22
-rw-r--r--src/net/java/sip/communicator/plugin/branding/BrandingResources.java67
-rw-r--r--src/net/java/sip/communicator/plugin/branding/Constants.java16
-rw-r--r--src/net/java/sip/communicator/plugin/branding/Resources.java105
-rw-r--r--src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java31
-rwxr-xr-xsrc/net/java/sip/communicator/plugin/branding/branding.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/contactinfo/ContactInfoActivator.java2
-rw-r--r--src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java8
-rw-r--r--src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDialog.java4
-rw-r--r--src/net/java/sip/communicator/plugin/contactinfo/ContactInfoMenuItem.java2
-rw-r--r--src/net/java/sip/communicator/plugin/contactinfo/Resources.java70
-rw-r--r--src/net/java/sip/communicator/plugin/contactinfo/contactinfo.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultColorPackImpl.java33
-rw-r--r--src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultImagePackImpl.java33
-rw-r--r--src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java100
-rw-r--r--src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultResourcePackActivator.java94
-rw-r--r--src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSettingsPackImpl.java33
-rw-r--r--src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSoundPackImpl.java33
-rw-r--r--src/net/java/sip/communicator/plugin/defaultresourcepack/defaultresourcepack.manifest.mf8
-rw-r--r--src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/dictaccregwizz/Resources.java79
-rw-r--r--src/net/java/sip/communicator/plugin/dictaccregwizz/dictaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/extendedcallhistorysearch/ExtendedCallHistorySearchActivator.java2
-rw-r--r--src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java113
-rw-r--r--src/net/java/sip/communicator/plugin/extendedcallhistorysearch/extendedcallhistorysearch.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationForm.java2
-rw-r--r--src/net/java/sip/communicator/plugin/generalconfig/Resources.java93
-rw-r--r--src/net/java/sip/communicator/plugin/generalconfig/generalconfig.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/gibberishaccregwizz/Resources.java78
-rw-r--r--src/net/java/sip/communicator/plugin/gibberishaccregwizz/gibberishaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java4
-rw-r--r--src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java2
-rw-r--r--src/net/java/sip/communicator/plugin/googletalkaccregwizz/Resources.java117
-rw-r--r--src/net/java/sip/communicator/plugin/googletalkaccregwizz/googletalkaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/ButtonTableCellRenderer.java46
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/ButtonTableEditor.java58
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/ColorsPanel.java105
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/CustomTableModel.java18
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/CustomizationWindow.java349
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/GuiCustomizationActivator.java54
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/I18nStringsPanel.java228
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/ImagesPanel.java282
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/LabelTableCellRenderer.java43
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/SettingsPanel.java62
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/SoundsPanel.java239
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/TextAreaCellRenderer.java32
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/guicustomization.manifest.mf14
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomColorPackImpl.java33
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomImagePackImpl.java33
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomLanguagePackImpl.java97
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomResourcePackActivator.java103
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomSettingsPackImpl.java33
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomSoundPackImpl.java33
-rw-r--r--src/net/java/sip/communicator/plugin/guicustomization/resourcepack/customresourcepack.manifest.mf10
-rw-r--r--src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/icqaccregwizz/Resources.java76
-rw-r--r--src/net/java/sip/communicator/plugin/icqaccregwizz/icqaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/ircaccregwizz/Resources.java81
-rw-r--r--src/net/java/sip/communicator/plugin/ircaccregwizz/ircaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberServerChooserDialog.java5
-rw-r--r--src/net/java/sip/communicator/plugin/jabberaccregwizz/Resources.java124
-rwxr-xr-xsrc/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf1
-rwxr-xr-xsrc/net/java/sip/communicator/plugin/jabberaccregwizz/resources.properties4
-rw-r--r--src/net/java/sip/communicator/plugin/mailbox/MailboxActivator.java52
-rw-r--r--src/net/java/sip/communicator/plugin/mailbox/Resources.java54
-rw-r--r--src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/msnaccregwizz/Resources.java77
-rwxr-xr-xsrc/net/java/sip/communicator/plugin/msnaccregwizz/msnaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder32*32.pngbin1669 -> 0 bytes
-rw-r--r--src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder48*48.pngbin4416 -> 0 bytes
-rw-r--r--src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder64*64.pngbin4509 -> 0 bytes
-rw-r--r--src/net/java/sip/communicator/plugin/pluginmanager/NewBundleDialog.java35
-rw-r--r--src/net/java/sip/communicator/plugin/pluginmanager/PluginManagerConfigForm.java2
-rw-r--r--src/net/java/sip/communicator/plugin/pluginmanager/Resources.java106
-rw-r--r--src/net/java/sip/communicator/plugin/pluginmanager/pluginmanager.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/rssaccregwizz/Resources.java78
-rw-r--r--src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/rssaccregwizz/rssaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/simpleaccreg/Resources.java108
-rw-r--r--src/net/java/sip/communicator/plugin/simpleaccreg/simpleaccreg.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java6
-rw-r--r--src/net/java/sip/communicator/plugin/sipaccregwizz/Resources.java77
-rw-r--r--src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java4
-rwxr-xr-xsrc/net/java/sip/communicator/plugin/sipaccregwizz/sipaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/sshaccregwizz/Resources.java83
-rw-r--r--src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/sshaccregwizz/sshaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/statusupdate/Resources.java32
-rw-r--r--src/net/java/sip/communicator/plugin/statusupdate/StatusUpdateActivator.java2
-rw-r--r--src/net/java/sip/communicator/plugin/statusupdate/statusupdate.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/updatechecker/Resources.java52
-rw-r--r--src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java41
-rw-r--r--src/net/java/sip/communicator/plugin/updatechecker/updatecheck.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/whiteboard/Resources.java123
-rw-r--r--src/net/java/sip/communicator/plugin/whiteboard/whiteboard.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/yahooaccregwizz/Resources.java75
-rw-r--r--src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/plugin/zeroconfaccregwizz/Resources.java80
-rw-r--r--src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java4
-rw-r--r--src/net/java/sip/communicator/plugin/zeroconfaccregwizz/zeroconfaccregwizz.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/service/protocol/msnconstants/MsnStatusEnum.java2
-rw-r--r--src/net/java/sip/communicator/service/resources/ColorPack.java17
-rw-r--r--src/net/java/sip/communicator/service/resources/ImagePack.java17
-rw-r--r--src/net/java/sip/communicator/service/resources/LanguagePack.java21
-rw-r--r--src/net/java/sip/communicator/service/resources/ResourceManagementService.java58
-rw-r--r--src/net/java/sip/communicator/service/resources/ResourcePack.java20
-rw-r--r--src/net/java/sip/communicator/service/resources/SettingsPack.java17
-rw-r--r--src/net/java/sip/communicator/service/resources/SoundPack.java17
245 files changed, 9681 insertions, 2540 deletions
diff --git a/build.xml b/build.xml
index 6f468d0..b1b1a61 100644
--- a/build.xml
+++ b/build.xml
@@ -334,7 +334,7 @@
<delete failonerror="false">
<fileset dir="${dest}" includes="net/java/sip/communicator/impl/version/*.class"/>
</delete>
- <javac destdir="${dest}" source="1.5" target="1.5">
+ <javac classpathref="compile.class.path" destdir="${dest}" source="1.5" target="1.5">
<src path="${src}"/>
<include name="net/java/sip/communicator/impl/version/NightlyBuildID.java" />
<include name="net/java/sip/communicator/impl/version/VersionImpl.java" />
@@ -601,6 +601,7 @@
bundle-netaddr,bundle-netaddr-slick,bundle-slickless,
bundle-slick-runner,bundle-sip,bundle-sip-slick,bundle-fileaccess,
bundle-fileaccess-slick,bundle-media,bundle-media-slick,
+ bundle-resource-manager,bundle-resources-defaultpack,
bundle-protocol,bundle-icq,bundle-icq-slick,bundle-mock,bundle-smacklib,
bundle-jabber,bundle-jabber-slick,bundle-swing-ui,
bundle-msn,bundle-msn-slick,bundle-yahoo,bundle-yahoo-slick,
@@ -622,7 +623,7 @@
bundle-contacteventhandler,bundle-plugin-contactinfo,
bundle-plugin-accountinfo,bundle-plugin-chatalerter,
bundle-plugin-statusupdate,
- bundle-updatecheckplugin,
+ bundle-updatecheckplugin,bundle-gui-customizer,
bundle-dict,bundle-plugin-dictaccregwizz,
bundle-plugin-simpleaccreg,bundle-plugin-generalconfig,
bundle-plugin-googletalkaccregwizz"/>
@@ -894,8 +895,6 @@ javax.swing.event, javax.swing.border"/>
<zipfileset src="${lib.noinst}/JainSipApi1.2.jar" prefix=""/>
<zipfileset src="${lib.noinst}/concurrent.jar" prefix=""/>
<zipfileset src="${lib.noinst}/log4j-1.2.8.jar" prefix=""/>
- <zipfileset dir="${resources}/images/protocol/sip"
- prefix="resources/images/protocol/sip"/>
</jar>
</target>
<target name="bundle-sip-slick">
@@ -941,10 +940,6 @@ javax.swing.event, javax.swing.border"/>
<zipfileset src="${lib.noinst}/joscar-common.jar" prefix=""/>
<zipfileset src="${lib.noinst}/joscar-protocol.jar" prefix=""/>
<zipfileset src="${lib.noinst}/jsocks-klea.jar" prefix=""/>
- <zipfileset dir="${resources}/images/protocol/icq"
- prefix="resources/images/protocol/icq"/>
- <zipfileset dir="${resources}/images/protocol/aim"
- prefix="resources/images/protocol/aim"/>
</jar>
</target>
@@ -979,8 +974,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/impl/protocol/jabber"
prefix="net/java/sip/communicator/impl/protocol/jabber"/>
- <zipfileset dir="${resources}/images/protocol/jabber"
- prefix="resources/images/protocol/jabber"/>
</jar>
</target>
@@ -1004,8 +997,6 @@ javax.swing.event, javax.swing.border"/>
prefix="net/java/sip/communicator/impl/protocol/msn"/>
<zipfileset src="${lib.noinst}/jml-1.0b2.jar" prefix=""/>
<zipfileset src="${lib.noinst}/commons-logging.jar" prefix=""/>
- <zipfileset dir="${resources}/images/protocol/msn"
- prefix="resources/images/protocol/msn"/>
</jar>
</target>
@@ -1030,8 +1021,6 @@ javax.swing.event, javax.swing.border"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/protocol/ssh"
prefix="net/java/sip/communicator/impl/protocol/ssh"/>
<zipfileset src="${lib.noinst}/jsch-0.1.36.jar" prefix=""/>
- <zipfileset dir="${resources}/images/protocol/ssh"
- prefix="resources/images/protocol/ssh"/>
</jar>
</target>
@@ -1042,10 +1031,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/sshaccregwizz/sshaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/sshaccregwizz"
prefix="net/java/sip/communicator/plugin/sshaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/ssh"
- prefix="resources/images/protocol/ssh"/>
- <zipfileset dir="${resources}/languages/plugin/sshaccregwizz"
- prefix="resources/languages/plugin/sshaccregwizz"/>
</jar>
</target>
@@ -1057,8 +1042,6 @@ javax.swing.event, javax.swing.border"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/protocol/yahoo"
prefix="net/java/sip/communicator/impl/protocol/yahoo"/>
<zipfileset src="${lib.noinst}/ymsg_network_v0_63.jar" prefix=""/>
- <zipfileset dir="${resources}/images/protocol/yahoo"
- prefix="resources/images/protocol/yahoo"/>
</jar>
</target>
@@ -1081,8 +1064,6 @@ javax.swing.event, javax.swing.border"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/protocol/gibberish"
prefix="net/java/sip/communicator/impl/protocol/gibberish"/>
<!-- zipfileset src="${lib.noinst}/gibberish_stack.jar" prefix=""/-->
- <zipfileset dir="${resources}/images/protocol/gibberish"
- prefix="resources/images/protocol/gibberish"/>
</jar>
</target>
@@ -1106,24 +1087,6 @@ javax.swing.event, javax.swing.border"/>
prefix="net/java/sip/communicator/service/gui"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/gui"
prefix="net/java/sip/communicator/impl/gui"/>
- <zipfileset dir="${resources}/images/logo"
- prefix="resources/images/logo"/>
- <zipfileset dir="${resources}/images/impl/gui"
- prefix="resources/images/impl/gui"/>
- <zipfileset dir="${resources}/styles"
- prefix="resources/styles"/>
- <zipfileset dir="${resources}/colors"
- prefix="resources/colors"/>
- <zipfileset dir="${resources}" includes="login.properties"
- prefix="resources"/>
- <zipfileset dir="${resources}" includes="lookandfeel.properties"
- prefix="resources"/>
- <zipfileset dir="${resources}/size" includes="size.properties"
- prefix="resources/size"/>
- <zipfileset dir="${resources}" includes="application.properties"
- prefix="resources"/>
- <zipfileset dir="${resources}/languages/impl/gui"
- prefix="resources/languages/impl/gui"/>
</jar>
</target>
@@ -1164,10 +1127,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/icqaccregwizz/icqaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/icqaccregwizz"
prefix="net/java/sip/communicator/plugin/icqaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/icq"
- prefix="resources/images/protocol/icq"/>
- <zipfileset dir="${resources}/languages/plugin/icqaccregwizz"
- prefix="resources/languages/plugin/icqaccregwizz"/>
</jar>
</target>
@@ -1178,10 +1137,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/aimaccregwizz/aimaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/aimaccregwizz"
prefix="net/java/sip/communicator/plugin/aimaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/aim"
- prefix="resources/images/protocol/aim"/>
- <zipfileset dir="${resources}/languages/plugin/aimaccregwizz"
- prefix="resources/languages/plugin/aimaccregwizz"/>
</jar>
</target>
@@ -1192,10 +1147,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/jabberaccregwizz"
prefix="net/java/sip/communicator/plugin/jabberaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/jabber"
- prefix="resources/images/protocol/jabber"/>
- <zipfileset dir="${resources}/languages/plugin/jabberaccregwizz"
- prefix="resources/languages/plugin/jabberaccregwizz"/>
</jar>
</target>
@@ -1220,10 +1171,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/msnaccregwizz/msnaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/msnaccregwizz"
prefix="net/java/sip/communicator/plugin/msnaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/msn"
- prefix="resources/images/protocol/msn"/>
- <zipfileset dir="${resources}/languages/plugin/msnaccregwizz"
- prefix="resources/languages/plugin/msnaccregwizz"/>
</jar>
</target>
@@ -1234,10 +1181,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/yahooaccregwizz"
prefix="net/java/sip/communicator/plugin/yahooaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/yahoo"
- prefix="resources/images/protocol/yahoo"/>
- <zipfileset dir="${resources}/languages/plugin/yahooaccregwizz"
- prefix="resources/languages/plugin/yahooaccregwizz"/>
</jar>
</target>
@@ -1248,10 +1191,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/sipaccregwizz/sipaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/sipaccregwizz"
prefix="net/java/sip/communicator/plugin/sipaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/sip"
- prefix="resources/images/protocol/sip"/>
- <zipfileset dir="${resources}/languages/plugin/sipaccregwizz"
- prefix="resources/languages/plugin/sipaccregwizz"/>
</jar>
</target>
@@ -1263,10 +1202,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/gibberishaccregwizz/gibberishaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/gibberishaccregwizz"
prefix="net/java/sip/communicator/plugin/gibberishaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/gibberish"
- prefix="resources/images/protocol/gibberish"/>
- <zipfileset dir="${resources}/languages/plugin/gibberishaccregwizz"
- prefix="resources/languages/plugin/gibberishaccregwizz"/>
</jar>
</target>
@@ -1341,8 +1276,6 @@ javax.swing.event, javax.swing.border"/>
prefix="net/java/sip/communicator/service/audionotifier"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/audionotifier"
prefix="net/java/sip/communicator/impl/audionotifier" />
- <zipfileset dir="${resources}/sounds"
- prefix="resources/sounds"/>
</jar>
</target>
@@ -1363,16 +1296,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/branding/branding.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/branding"
prefix="net/java/sip/communicator/plugin/branding"/>
- <zipfileset dir="${resources}/images/plugin/branding"
- prefix="resources/images/plugin/branding"/>
- <zipfileset dir="${resources}/styles"
- prefix="resources/styles"/>
- <zipfileset dir="${resources}/colors"
- prefix="resources/colors"/>
- <zipfileset dir="${resources}" includes="application.properties"
- prefix="resources"/>
- <zipfileset dir="${resources}/languages/plugin/branding"
- prefix="resources/languages/plugin/branding"/>
</jar>
</target>
@@ -1386,17 +1309,6 @@ javax.swing.event, javax.swing.border"/>
prefix="net/java/sip/communicator/service/systray"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/systray"
prefix="net/java/sip/communicator/impl/systray"/>
- <zipfileset dir="${resources}/images/impl/gui/common"
- includes="renameDialogIcon.png"
- prefix="resources/images/impl/gui/common"/>
- <zipfileset dir="${resources}/images/impl/gui/buttons"
- prefix="resources/images/impl/gui/buttons"/>
- <zipfileset dir="${resources}/images/impl/systray"
- prefix="resources/images/impl/systray"/>
- <zipfileset dir="${resources}" includes="application.properties"
- prefix="resources"/>
- <zipfileset dir="${resources}/languages/impl/systray"
- prefix="resources/languages/impl/systray"/>
<zipfileset src="${lib.mac.noinst}/dock.jar" prefix=""/>
</jar>
</target>
@@ -1420,12 +1332,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/pluginmanager/pluginmanager.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/pluginmanager"
prefix="net/java/sip/communicator/plugin/pluginmanager"/>
- <zipfileset dir="${resources}/colors"
- prefix="resources/colors"/>
- <zipfileset dir="${resources}/images/plugin/pluginmanager"
- prefix="resources/images/plugin/pluginmanager"/>
- <zipfileset dir="${resources}/languages/plugin/pluginmanager"
- prefix="resources/languages/plugin/pluginmanager"/>
</jar>
</target>
@@ -1437,12 +1343,6 @@ javax.swing.event, javax.swing.border"/>
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/extendedcallhistorysearch"
prefix="net/java/sip/communicator/plugin/extendedcallhistorysearch"/>
<zipfileset src="${lib.noinst}/jcalendar-1.3.2.jar" prefix=""/>
- <zipfileset dir="${resources}/images/plugin/extendedcallhistorysearch"
- prefix="resources/images/plugin/extendedcallhistorysearch"/>
- <zipfileset dir="${resources}/colors"
- prefix="resources/colors"/>
- <zipfileset dir="${resources}/languages/plugin/extendedcallhistorysearch"
- prefix="resources/languages/plugin/extendedcallhistorysearch"/>
</jar>
</target>
@@ -1461,8 +1361,6 @@ javax.swing.event, javax.swing.border"/>
<!-- LIBRARY FOR FAVICON SUPPORT -->
<zipfileset src="${lib.noinst}/aclibico-2.1.jar" prefix=""/>
- <zipfileset dir="${resources}/images/protocol/rss"
- prefix="resources/images/protocol/rss"/>
</jar>
</target>
@@ -1485,10 +1383,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/rssaccregwizz/rssaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/rssaccregwizz"
prefix="net/java/sip/communicator/plugin/rssaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/rss"
- prefix="resources/images/protocol/rss"/>
- <zipfileset dir="${resources}/languages/plugin/rssaccregwizz"
- prefix="resources/languages/plugin/rssaccregwizz"/>
</jar>
</target>
@@ -1499,8 +1393,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/impl/protocol/zeroconf/zeroconf.provider.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/impl/protocol/zeroconf"
prefix="net/java/sip/communicator/impl/protocol/zeroconf"/>
- <zipfileset dir="${resources}/images/protocol/zeroconf"
- prefix="resources/images/protocol/zeroconf"/>
</jar>
</target>
@@ -1511,10 +1403,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/zeroconfaccregwizz/zeroconfaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/zeroconfaccregwizz"
prefix="net/java/sip/communicator/plugin/zeroconfaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/zeroconf"
- prefix="resources/images/protocol/zeroconf"/>
- <zipfileset dir="${resources}/languages/plugin/zeroconfaccregwizz"
- prefix="resources/languages/plugin/zeroconfaccregwizz"/>
</jar>
</target>
@@ -1526,8 +1414,6 @@ javax.swing.event, javax.swing.border"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/protocol/irc"
prefix="net/java/sip/communicator/impl/protocol/irc"/>
<zipfileset src="${lib.noinst}/pircbot.jar" prefix=""/>
- <zipfileset dir="${resources}/images/protocol/irc"
- prefix="resources/images/protocol/irc"/>
</jar>
</target>
@@ -1539,10 +1425,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/ircaccregwizz/ircaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/ircaccregwizz"
prefix="net/java/sip/communicator/plugin/ircaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/irc"
- prefix="resources/images/protocol/irc"/>
- <zipfileset dir="${resources}/languages/plugin/ircaccregwizz"
- prefix="resources/languages/plugin/ircaccregwizz"/>
</jar>
</target>
@@ -1564,12 +1446,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/mailbox/mailbox.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/mailbox"
prefix="net/java/sip/communicator/plugin/mailbox" />
- <zipfileset dir="${resources}/sounds/mailbox"
- prefix="resources/sounds"/>
- <zipfileset dir="${resources}/images/plugin/mailbox"
- prefix="resources/images/plugin/mailbox"/>
- <zipfileset dir="${resources}/languages/plugin/mailbox"
- prefix="resources/languages/plugin/mailbox"/>
</jar>
</target>
@@ -1592,10 +1468,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/whiteboard/whiteboard.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/whiteboard"
prefix="net/java/sip/communicator/plugin/whiteboard"/>
- <zipfileset dir="${resources}/images/plugin/whiteboard"
- prefix="resources/images/plugin/whiteboard"/>
- <zipfileset dir="${resources}/languages/plugin/whiteboard"
- prefix="resources/languages/plugin/whiteboard"/>
</jar>
</target>
@@ -1616,10 +1488,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/contactinfo/contactinfo.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/contactinfo"
prefix="net/java/sip/communicator/plugin/contactinfo"/>
- <zipfileset dir="${resources}/languages/plugin/contactinfo"
- prefix="resources/languages/plugin/contactinfo"/>
- <zipfileset dir="${resources}/images/plugin/contactinfo"
- prefix="resources/images/plugin/contactinfo"/>
</jar>
</target>
@@ -1640,10 +1508,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/accountinfo/accountinfo.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/accountinfo"
prefix="net/java/sip/communicator/plugin/accountinfo"/>
- <zipfileset dir="${resources}/images/plugin/accountinfo"
- prefix="resources/images/plugin/accountinfo"/>
- <zipfileset dir="${resources}/languages/plugin/accountinfo"
- prefix="resources/languages/plugin/accountinfo"/>
</jar>
</target>
@@ -1653,10 +1517,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/impl/protocol/dict/dict.provider.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/impl/protocol/dict"
prefix="net/java/sip/communicator/impl/protocol/dict"/>
- <zipfileset dir="${resources}/images/protocol/dict"
- prefix="resources/images/protocol/dict"/>
- <zipfileset dir="${resources}/languages/plugin/dictaccregwizz"
- prefix="resources/languages/plugin/dictaccregwizz"/>
</jar>
</target>
@@ -1668,10 +1528,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/dictaccregwizz/dictaccregwizz.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/dictaccregwizz"
prefix="net/java/sip/communicator/plugin/dictaccregwizz"/>
- <zipfileset dir="${resources}/images/protocol/dict"
- prefix="resources/images/protocol/dict"/>
- <zipfileset dir="${resources}/languages/plugin/dictaccregwizz"
- prefix="resources/languages/plugin/dictaccregwizz"/>
</jar>
</target>
@@ -1681,10 +1537,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/updatechecker/updatecheck.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/updatechecker"
prefix="net/java/sip/communicator/plugin/updatechecker" />
- <zipfileset dir="${resources}/languages/plugin/updatechecker"
- prefix="resources/languages/plugin/updatechecker"/>
- <zipfileset dir="${resources}" includes="application.properties"
- prefix="resources"/>
</jar>
</target>
@@ -1694,8 +1546,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/statusupdate/statusupdate.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/statusupdate"
prefix="net/java/sip/communicator/plugin/statusupdate" />
- <zipfileset dir="${resources}/languages/plugin/statusupdate"
- prefix="resources/languages/plugin/statusupdate"/>
</jar>
</target>
@@ -1705,14 +1555,6 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/simpleaccreg/simpleaccreg.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/simpleaccreg"
prefix="net/java/sip/communicator/plugin/simpleaccreg" />
- <zipfileset dir="${resources}/languages/plugin/simpleaccreg"
- prefix="resources/languages/plugin/simpleaccreg"/>
- <zipfileset dir="${resources}" includes="login.properties"
- prefix="resources"/>
- <zipfileset dir="${resources}/colors"
- prefix="resources/colors"/>
- <zipfileset dir="${resources}" includes="application.properties"
- prefix="resources"/>
</jar>
</target>
@@ -1722,16 +1564,63 @@ javax.swing.event, javax.swing.border"/>
manifest="${src}/net/java/sip/communicator/plugin/generalconfig/generalconfig.manifest.mf">
<zipfileset dir="${dest}/net/java/sip/communicator/plugin/generalconfig"
prefix="net/java/sip/communicator/plugin/generalconfig" />
- <zipfileset dir="${resources}/languages/plugin/generalconfig"
- prefix="resources/languages/plugin/generalconfig"/>
- <zipfileset dir="${resources}/images/plugin/generalconfig"
- prefix="resources/images/plugin/generalconfig"/>
- <zipfileset dir="${resources}" includes="application.properties"
- prefix="resources"/>
<zipfileset src="${lib.noinst}/izpack-shortcut-link.jar" prefix=""/>
</jar>
</target>
+ <!--BUNDLE-DEFAULT-RESOURCES-->
+ <target name="bundle-resources-defaultpack">
+ <!-- Creates a bundle for the default resource pack."-->
+ <jar
+ compress="false" destfile="${bundles.dest}/defaultresources.jar"
+ manifest="${src}/net/java/sip/communicator/plugin/defaultresourcepack/defaultresourcepack.manifest.mf">
+ <zipfileset dir="${dest}/net/java/sip/communicator/plugin/defaultresourcepack"
+ prefix="net/java/sip/communicator/plugin/defaultresourcepack"/>
+
+ <zipfileset dir="${resources}/colors"
+ prefix="resources/colors"/>
+ <zipfileset dir="${resources}/config"
+ prefix="resources/config"/>
+ <zipfileset dir="${resources}/images"
+ prefix="resources/images"/>
+ <zipfileset dir="${resources}/languages"
+ prefix="resources/languages"/>
+ <zipfileset dir="${resources}/sounds"
+ prefix="resources/sounds"/>
+ <zipfileset dir="${resources}/styles"
+ prefix="resources/styles"/>
+ <zipfileset dir="${resources}" includes="sounds.properties"
+ prefix="resources"/>
+ </jar>
+ </target>
+
+ <!--BUNDLE-RESOURCE-MANAGER-->
+ <target name="bundle-resource-manager">
+ <!-- Creates a bundle for the Resource Management Service Impl."-->
+ <jar
+ compress="false" destfile="${bundles.dest}/resourcemanager.jar"
+ manifest="${src}/net/java/sip/communicator/impl/resources/resourcemanagement.manifest.mf">
+ <zipfileset dir="${dest}/net/java/sip/communicator/service/resources"
+ prefix="net/java/sip/communicator/service/resources"/>
+ <zipfileset dir="${dest}/net/java/sip/communicator/impl/resources"
+ prefix="net/java/sip/communicator/impl/resources"/>
+ </jar>
+ </target>
+
+ <!--BUNDLE-GUI-CUSTOMIZER-->
+ <target name="bundle-gui-customizer">
+ <!-- Creates a bundle for the Resource Management Service Impl."-->
+ <jar
+ compress="false" destfile="${bundles.dest}/guicustomizer.jar"
+ manifest="${src}/net/java/sip/communicator/plugin/guicustomization/guicustomization.manifest.mf">
+ <zipfileset dir="${dest}/net/java/sip/communicator/plugin/guicustomization"
+ prefix="net/java/sip/communicator/plugin/guicustomization"/>
+ <zipfileset dir="${src}/net/java/sip/communicator/plugin/guicustomization/resourcepack"
+ includes="customresourcepack.manifest.mf"
+ prefix="net/java/sip/communicator/plugin/guicustomization/resourcepack"/>
+ </jar>
+ </target>
+
<!-- BUNDLE-NOTIFICATION-CONFIG -->
<target name="bundle-notification-config">
<!-- Creates a bundle for the notifications.-->
diff --git a/resources/application.properties b/resources/application.properties
index 7f9a608..e69de29 100644
--- a/resources/application.properties
+++ b/resources/application.properties
@@ -1,9 +0,0 @@
-applicationName=SIP Communicator
-applicationWebSite=http://sip-communicator.org
-fontName=Verdana
-fontSize=12
-titleFontSize=14
-isLookAndFeelDecorated=false
-isToolBarExteneded=false
-aboutLogoFontSize=14
-defaultGroupName=
diff --git a/resources/config/defaults.properties b/resources/config/defaults.properties
index 5b073f7..6e34bc5 100644
--- a/resources/config/defaults.properties
+++ b/resources/config/defaults.properties
@@ -4,4 +4,33 @@ net.java.sip.communicator.impl.gui.sendMessageCommand=Enter
net.java.sip.communicator.impl.gui.sendTypingNotifications=true
net.java.sip.communicator.impl.gui.isMultiChatWindowEnabled=true
net.java.sip.communicator.impl.gui.isMessageHistoryShown=true
-net.java.sip.communicator.impl.gui.messageHistorySize=10 \ No newline at end of file
+net.java.sip.communicator.impl.gui.messageHistorySize=10
+applicationName=SIP Communicator
+applicationWebSite=http://sip-communicator.org
+fontName=Verdana
+fontSize=12
+titleFontSize=14
+isLookAndFeelDecorated=false
+isToolBarExteneded=false
+aboutLogoFontSize=14
+defaultGroupName=
+preferredAccountWizard=
+tabOverlap=10
+mainWindowWidth=200
+mainWindowHeight=450
+logoBarWidth=0
+logoBarHeight=0
+mainToolbarButtonHeight=28
+mainToolbarButtonWidth=28
+dialPadWidth=150
+dialPadHeight=150
+dialPadHorizontalGap=5
+dialPadVerticalGap=5
+
+# branding
+textStyle=resources/styles/defaultStyle.css
+
+# jabber accregwizz
+commentsFile=net/java/sip/communicator/plugin/jabberaccregwizz/resources/servercomments.xml
+
+simpleWizards=SIP|MSN|Yahoo|ICQ|AIM|Jabber
diff --git a/resources/images/images.properties b/resources/images/images.properties
new file mode 100644
index 0000000..78bb6cf
--- /dev/null
+++ b/resources/images/images.properties
@@ -0,0 +1,329 @@
+# gui
+SIP_COMMUNICATOR_LOGO=resources/images/logo/sc_logo16x16.png
+
+ACCOUNT_ICON=resources/images/impl/gui/buttons/addAccount.png
+QUICK_MENU_ADD_ICON=resources/images/impl/gui/buttons/addContactIcon.png
+QUICK_MENU_CONFIGURE_ICON=resources/images/impl/gui/buttons/configureIcon.png
+QUICK_MENU_INFO_ICON=resources/images/impl/gui/buttons/infoIcon.png
+QUICK_MENU_BUTTON_BG=resources/images/impl/gui/buttons/quickMenuButtonBg.png
+QUICK_MENU_BUTTON_ROLLOVER_BG=resources/images/impl/gui/buttons/quickMenuButtonRolloverBg.png
+QUICK_MENU_SHOW_OFFLINE_ICON=resources/images/impl/gui/buttons/showOffline.png
+QUICK_MENU_HIDE_OFFLINE_ICON=resources/images/impl/gui/buttons/hideOffline.png
+QUICK_MENU_SOUND_ON_ICON=resources/images/impl/gui/buttons/soundOn.png
+QUICK_MENU_SOUND_OFF_ICON=resources/images/impl/gui/buttons/soundOff.png
+
+SEARCH_ICON=resources/images/impl/gui/buttons/searchIcon.png
+SEARCH_ICON_16x16=resources/images/impl/gui/common/searchIcon16x16.png
+CALL_BUTTON_BG=resources/images/impl/gui/buttons/callButton.png
+CALL_BUTTON_PRESSED_BG=resources/images/impl/gui/buttons/callButtonPressed.png
+HANGUP_BUTTON_BG=resources/images/impl/gui/buttons/hangupButton.png
+CALL_ROLLOVER_BUTTON_BG=resources/images/impl/gui/buttons/callButtonRollover.png
+HANGUP_ROLLOVER_BUTTON_BG=resources/images/impl/gui/buttons/hangupButtonRollover.png
+HANGUP_BUTTON_PRESSED_BG=resources/images/impl/gui/buttons/hangupButtonPressed.png
+STATUS_SELECTOR_BOX=resources/images/impl/gui/buttons/combobox.png
+BUTTON_BG=resources/images/impl/gui/buttons/dialButtonBg.png
+BUTTON_ROLLOVER_BG=resources/images/impl/gui/buttons/dialButtonRolloverBg.png
+ONE_DIAL_BUTTON=resources/images/impl/gui/buttons/one.png
+TWO_DIAL_BUTTON=resources/images/impl/gui/buttons/two.png
+THREE_DIAL_BUTTON=resources/images/impl/gui/buttons/three.png
+FOUR_DIAL_BUTTON=resources/images/impl/gui/buttons/four.png
+FIVE_DIAL_BUTTON=resources/images/impl/gui/buttons/five.png
+SIX_DIAL_BUTTON=resources/images/impl/gui/buttons/six.png
+SEVEN_DIAL_BUTTON=resources/images/impl/gui/buttons/seven.png
+EIGHT_DIAL_BUTTON=resources/images/impl/gui/buttons/eight.png
+NINE_DIAL_BUTTON=resources/images/impl/gui/buttons/nine.png
+STAR_DIAL_BUTTON=resources/images/impl/gui/buttons/star.png
+ZERO_DIAL_BUTTON=resources/images/impl/gui/buttons/zero.png
+DIEZ_DIAL_BUTTON=resources/images/impl/gui/buttons/diez.png
+DEFAULT_USER_PHOTO=resources/images/impl/gui/common/personPhoto.png
+CALL_PANEL_MINIMIZE_BUTTON=resources/images/impl/gui/buttons/callPanelMinimizeButton.png
+CALL_PANEL_RESTORE_BUTTON=resources/images/impl/gui/buttons/callPanelRestoreButton.png
+CALL_PANEL_MINIMIZE_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/callPanelMinimizeButtonRollover.png
+CALL_PANEL_RESTORE_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/callPanelRestoreButtonRollover.png
+ADD_TO_CHAT_BUTTON=resources/images/impl/gui/buttons/addToChat.png
+ADD_TO_CHAT_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/addToChatRollover.png
+ADD_TO_CHAT_ICON=resources/images/impl/gui/buttons/addToChatIcon.png
+RIGHT_ARROW_ICON=resources/images/impl/gui/common/rightArrow.png
+RIGHT_ARROW_ROLLOVER_ICON=resources/images/impl/gui/common/rightArrowRollover.png
+ALIGN_LEFT_BUTTON=resources/images/impl/gui/buttons/alignLeft.png
+ALIGN_RIGHT_BUTTON=resources/images/impl/gui/buttons/alignRight.png
+ALIGN_CENTER_BUTTON=resources/images/impl/gui/buttons/alignCenter.png
+ALIGN_LEFT_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/alignLeftRollover.png
+ALIGN_RIGHT_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/alignRightRollover.png
+ALIGN_CENTER_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/alignCenterRollover.png
+TEXT_BOLD_BUTTON=resources/images/impl/gui/buttons/textBold.png
+TEXT_ITALIC_BUTTON=resources/images/impl/gui/buttons/textItalic.png
+TEXT_UNDERLINED_BUTTON=resources/images/impl/gui/buttons/textUnderlined.png
+TEXT_BOLD_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/textBoldRollover.png
+TEXT_ITALIC_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/textItalicRollover.png
+TEXT_UNDERLINED_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/textUnderlinedRollover.png
+DIAL_BUTTON=resources/images/impl/gui/buttons/dialButton.png
+INVITE_DIALOG_ICON=resources/images/impl/gui/common/inviteDialogIcon.png
+SEND_SMS_ICON=resources/images/impl/gui/common/gsm.png
+DIAL_BUTTON_BG=resources/images/impl/gui/buttons/dialButtonBg.png
+DIAL_BUTTON_ROLLOVER_BG=resources/images/impl/gui/buttons/dialButtonRolloverBg.png
+MSG_TOOLBAR_BUTTON_BG=resources/images/impl/gui/buttons/msgToolbarBg.png
+MSG_TOOLBAR_ROLLOVER_BUTTON_BG=resources/images/impl/gui/buttons/msgToolBarRolloverBg.png
+COPY_ICON=resources/images/impl/gui/buttons/copy.png
+CUT_ICON=resources/images/impl/gui/buttons/cut.png
+PASTE_ICON=resources/images/impl/gui/buttons/paste.png
+SMILIES_ICON=resources/images/impl/gui/buttons/smiley.png
+SAVE_ICON=resources/images/impl/gui/buttons/save.png
+PRINT_ICON=resources/images/impl/gui/buttons/print.png
+CLOSE_ICON=resources/images/impl/gui/buttons/close.png
+PREVIOUS_ICON=resources/images/impl/gui/buttons/previous.png
+NEXT_ICON=resources/images/impl/gui/buttons/next.png
+HISTORY_ICON=resources/images/impl/gui/buttons/history.png
+SEND_FILE_ICON=resources/images/impl/gui/buttons/sendFile.png
+FONT_ICON=resources/images/impl/gui/buttons/fontIcon.png
+
+CHAT_CONTACT_INFO_BUTTON=resources/images/impl/gui/buttons/chatInfoButton.png
+CHAT_CONTACT_INFO_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/chatInfoButtonRollover.png
+CHAT_CONTACT_CALL_BUTTON=resources/images/impl/gui/buttons/chatCallButton.png
+CHAT_CONTACT_CALL_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/chatCallButtonRollover.png
+CHAT_CONTACT_SEND_FILE_BUTTON=resources/images/impl/gui/buttons/chatSendFile.png
+CHAT_SEND_FILE_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/chatSendFileRollover.png
+
+WARNING_ICON=resources/images/impl/gui/common/warning.png
+ERROR_ICON=resources/images/impl/gui/common/error.png
+INFO_ICON=resources/images/impl/gui/common/info.png
+
+SEND_MESSAGE_16x16_ICON=resources/images/impl/gui/common/sendMessage16x16.png
+CALL_16x16_ICON=resources/images/impl/gui/common/call16x16.png
+DELETE_16x16_ICON=resources/images/impl/gui/common/delete16x16.png
+HISTORY_16x16_ICON=resources/images/impl/gui/common/history16x16.png
+SEND_FILE_16x16_ICON=resources/images/impl/gui/common/sendFile16x16.png
+GROUPS_16x16_ICON=resources/images/impl/gui/common/groups16x16.png
+ADD_CONTACT_16x16_ICON=resources/images/impl/gui/common/addContact16x16.png
+RENAME_16x16_ICON=resources/images/impl/gui/common/rename16x16.png
+MORE_INFO_ICON=resources/images/impl/gui/common/moreInfo.png
+TOOLBAR_DRAG_ICON=resources/images/impl/gui/common/toolbarDragIcon.png
+ADD_GROUP_ICON=resources/images/impl/gui/common/addGroup.png
+MOVE_CONTACT=resources/images/impl/gui/common/moveContact.png
+
+SMILEY1=resources/images/impl/gui/common/smilies/default/smiley1.png
+SMILEY2=resources/images/impl/gui/common/smilies/default/smiley2.png
+SMILEY3=resources/images/impl/gui/common/smilies/default/smiley3.png
+SMILEY4=resources/images/impl/gui/common/smilies/default/smiley4.png
+SMILEY5=resources/images/impl/gui/common/smilies/default/smiley5.png
+SMILEY6=resources/images/impl/gui/common/smilies/default/smiley6.png
+SMILEY7=resources/images/impl/gui/common/smilies/default/smiley7.png
+SMILEY8=resources/images/impl/gui/common/smilies/default/smiley8.png
+SMILEY9=resources/images/impl/gui/common/smilies/default/smiley9.png
+SMILEY10=resources/images/impl/gui/common/smilies/default/smiley10.png
+SMILEY11=resources/images/impl/gui/common/smilies/default/smiley11.png
+SMILEY12=resources/images/impl/gui/common/smilies/default/smiley12.png
+
+AUTH_WINDOW_BACKGROUND=resources/images/impl/gui/common/passWindowBackground.png
+
+USER_ONLINE_ICON=resources/images/impl/gui/common/statusicons/online.png
+USER_OFFLINE_ICON=resources/images/impl/gui/common/statusicons/offline.png
+USER_AWAY_ICON=resources/images/impl/gui/common/statusicons/away.png
+USER_NA_ICON=resources/images/impl/gui/common/statusicons/na.png
+USER_DND_ICON=resources/images/impl/gui/common/statusicons/dnd.png
+USER_FFC_ICON=resources/images/impl/gui/common/statusicons/freeForChat.png
+USER_OCCUPIED_ICON=resources/images/impl/gui/common/statusicons/occupied.png
+
+CLOSE_TAB_ICON=resources/images/impl/gui/buttons/closeTab.png
+CLOSE_TAB_SELECTED_ICON=resources/images/impl/gui/buttons/closeTabSelected.png
+
+SELECTED_TAB_LEFT_BG=resources/images/impl/gui/lookandfeel/selectedTabLeft.png
+SELECTED_TAB_MIDDLE_BG=resources/images/impl/gui/lookandfeel/selectedTabMiddle.png
+SELECTED_TAB_RIGHT_BG=resources/images/impl/gui/lookandfeel/selectedTabRight.png
+TAB_LEFT_BG=resources/images/impl/gui/lookandfeel/tabLeft.png
+TAB_MIDDLE_BG=resources/images/impl/gui/lookandfeel/tabMiddle.png
+TAB_RIGHT_BG=resources/images/impl/gui/lookandfeel/tabRight.png
+DELETE_TEXT_ICON=resources/images/impl/gui/lookandfeel/delete.png
+DELETE_TEXT_ROLLOVER_ICON=resources/images/impl/gui/lookandfeel/deleteRollover.png
+
+SELECTED_CLOSABLE_TAB_BG=resources/images/impl/gui/lookandfeel/closableTabSelected.png
+CLOSABLE_TAB_BG=resources/images/impl/gui/lookandfeel/closableTab.png
+
+BUTTON=resources/images/impl/gui/lookandfeel/button1.png
+BUTTON_ROLLOVER=resources/images/impl/gui/lookandfeel/button2.png
+TOGGLE_BUTTON_PRESSED=resources/images/impl/gui/lookandfeel/button3.png
+TOGGLE_BUTTON=resources/images/impl/gui/lookandfeel/button4.png
+
+SPLITPANE_HORIZONTAL=resources/images/impl/gui/lookandfeel/splitpaneHorizontal.png
+SPLITPANE_VERTICAL=resources/images/impl/gui/lookandfeel/splitpaneVertical.png
+
+SCROLLBAR_HORIZONTAL=resources/images/impl/gui/lookandfeel/scrollbar_horiz2.png
+SCROLLBAR_VERTICAL=resources/images/impl/gui/lookandfeel/scrollbar_vert1.png
+SCROLLBAR_THUMB_HORIZONTAL=resources/images/impl/gui/lookandfeel/horizThumbHandle.png
+SCROLLBAR_THUMB_VERTICAL=resources/images/impl/gui/lookandfeel/vertThumbHandle.png
+
+ADD_CONTACT_WIZARD_ICON=resources/images/impl/gui/common/addContactWizardIcon.png
+RENAME_DIALOG_ICON=resources/images/impl/gui/common/renameDialogIcon.png
+
+BROWSER_ICON=resources/images/impl/gui/common/browser16x16.png
+
+AUTHORIZATION_ICON=resources/images/impl/gui/common/padlock.gif
+
+INCOMING_CALL=resources/images/impl/gui/common/incomingCall.png
+OUTGOING_CALL=resources/images/impl/gui/common/outgoingCall.png
+
+EXCLAMATION_MARK=resources/images/impl/gui/common/exclamationMark.png
+
+ABOUT_WINDOW_BACKGROUND=resources/images/impl/gui/common/aboutWindowBackground.png
+
+OPENED_GROUP=resources/images/impl/gui/common/openedGroup.png
+CLOSED_GROUP=resources/images/impl/gui/common/closedGroup.png
+
+CHAT_ROOM_16x16_ICON=resources/images/impl/gui/common/chatRoom16x16.png
+CHAT_SERVER_16x16_ICON=resources/images/impl/gui/common/multiUserChatServer16x16.png
+
+MESSAGE_RECEIVED_ICON=resources/images/impl/gui/common/envelope.png
+
+REASON_DIALOG_ICON=resources/images/impl/gui/common/reasonDialogIcon.png
+
+JOIN_ICON=resources/images/impl/gui/common/join.png
+JOIN_AS_ICON=resources/images/impl/gui/common/join.png
+LEAVE_ICON=resources/images/impl/gui/common/leave.png
+
+STATUS_SEPARATOR_ICON=resources/images/impl/gui/common/statusSeparator.png
+
+MAIN_WINDOW_BACKGROUND=resources/images/impl/gui/common/mainWindowBackground.png
+
+TOOL_BAR_BACKGROUND=resources/images/impl/gui/common/toolbarBackground.png
+MENU_BACKGROUND=resources/images/impl/gui/common/menuBackground.png
+WINDOW_TITLE_BAR=resources/images/impl/gui/common/windowTitleBarBackground.png
+WINDOW_TITLE_BAR_BG=resources/images/impl/gui/common/windowTitleBar.png
+
+
+# systray
+trayIcon=resources/images/impl/systray/systrayIcon.png
+trayIconOffline=resources/images/impl/systray/systrayIconOffline.png
+trayIconAway=resources/images/impl/systray/systrayIconAway.png
+trayIconFFC=resources/images/impl/systray/systrayIconFFC.png
+trayIconWindows=resources/images/impl/systray/systrayIconWindows.png
+trayIconWindowsOffline=resources/images/impl/systray/systrayIconWindowsOffline.png
+trayIconWindowsAway=resources/images/impl/systray/systrayIconWindowsAway.png
+trayIconWindowsFFC=resources/images/impl/systray/systrayIconWindowsFFC.png
+trayIconMacOSX=resources/images/impl/systray/systrayIconMacOSX.png
+trayIconMacOSXWhite=resources/images/impl/systray/systrayIconMacOSXWhite.png
+dockIconOffline=resources/images/impl/systray/dock-offline.png
+dockIconAway=resources/images/impl/systray/dock-away.png
+dockIconFFC=resources/images/impl/systray/dock-chatty.png
+addContactIcon=resources/images/impl/gui/buttons/addContactIcon.png
+statusMenuIcon=resources/images/impl/systray/statusIcon.png
+settingsMenuIcon=resources/images/impl/gui/buttons/configureIcon.png
+closeMenuIcon=resources/images/impl/systray/quit.png
+messageIcon=resources/images/impl/systray/envelope.png
+messageIconWindows=resources/images/impl/systray/envelopeWindows.png
+messageIconMacOSX=resources/images/impl/systray/envelopeMacOSX.png
+messageIconMacOSXWhite=resources/images/impl/systray/envelopeMacOSXWhite.png
+newStatusMessageIcon=resources/images/impl/gui/common/renameDialogIcon.png
+
+# dict accregwizz
+protocolIconDict=resources/images/protocol/dict/dict-16x16.png
+pageImageDict=resources/images/protocol/dict/dict-64x64.png
+
+# icq accregwiz
+protocolIconIcq=resources/images/protocol/icq/icq16x16-online.png
+pageImageIcq=resources/images/protocol/icq/icq64x64.png
+
+# zeroconf accregwizz
+protocolIconZeroconf=resources/images/protocol/zeroconf/zeroconf-color-16.png
+pageImageZeroconf=resources/images/protocol/zeroconf/zeroconf-color-64.png
+
+# branding
+aboutWindowBg=resources/images/plugin/branding/aboutWindowBackground.png
+splashScreenBg=resources/images/plugin/branding/splashScreenBackground.png
+
+# yahoo accregwizz
+protocolIconYahoo=resources/images/protocol/yahoo/yahoo16x16.png
+pageImageYahoo=resources/images/protocol/yahoo/yahoo64x64.png
+
+# accountinfo
+accountInfoIcon=resources/images/plugin/accountinfo/userInfo16x16.png
+accountInfoDefaultPersonIcon=resources/images/plugin/accountinfo/personPhoto.png
+
+# ssh accregwizz
+protocolIconSsh=resources/images/protocol/ssh/ssh-online.png
+pageImageSsh=resources/images/protocol/ssh/ssh64x64.png
+
+# general config
+pluginIconGeneralConfig=resources/images/plugin/generalconfig/configureIcon.png
+
+#msn accregwizz
+protocolIconMsn=resources/images/protocol/msn/msn16x16.png
+pageImageMsn=resources/images/protocol/msn/msn64x64.png
+
+# mailbox
+mailboxIcon=resources/images/tape.png
+
+# pluginmanager
+installedStateIcon=resources/images/plugin/pluginmanager/installed.png
+desactivatedStateIcon=resources/images/plugin/pluginmanager/desactivated.png
+startingStateIcon=resources/images/plugin/pluginmanager/starting.png
+stoppingStateIcon=resources/images/plugin/pluginmanager/stopping.png
+activeStateIcon=resources/images/plugin/pluginmanager/active.png
+pluginIconPluginManager=resources/images/plugin/pluginmanager/pluginIcon.png
+
+# sip accregwizz
+protocolIconSip=resources/images/protocol/sip/sip16x16.png
+pageImageSip=resources/images/protocol/sip/sip64x64.png
+
+# extended callhistorysearch
+searchIcon=resources/images/plugin/extendedcallhistorysearch/searchIcon.png
+historyMenuIcon=resources/images/plugin/extendedcallhistorysearch/history16x16.png
+incomingCall=resources/images/plugin/extendedcallhistorysearch/incomingCall.png
+outgoingCall=resources/images/plugin/extendedcallhistorysearch/outgoingCall.png
+calendarIcon=resources/images/plugin/extendedcallhistorysearch/calendarIcon.png
+
+# gibberish accregwiz
+protocolIconGibberish=resources/images/protocol/gibberish/gibberish-online.png
+pageImageGibberish=resources/images/protocol/gibberish/gibberish64x64.png
+
+# whiteboard
+circleIcon=resources/images/plugin/whiteboard/circle.png
+circle2Icon=resources/images/plugin/whiteboard/circle2.png
+circleFIcon=resources/images/plugin/whiteboard/circleF.png
+colorIcon=resources/images/plugin/whiteboard/color.png
+editCopyIcon=resources/images/plugin/whiteboard/editcopy.png
+editPasteIcon=resources/images/plugin/whiteboard/editpaste.png
+fileImportIcon=resources/images/plugin/whiteboard/fileimport.png
+fileNewIcon=resources/images/plugin/whiteboard/filenew.png
+fileSaveIcon=resources/images/plugin/whiteboard/filesave.png
+imgIcon=resources/images/plugin/whiteboard/img.png
+lineIcon=resources/images/plugin/whiteboard/line.png
+line2Icon=resources/images/plugin/whiteboard/line2.png
+modifIcon=resources/images/plugin/whiteboard/modif.png
+penIcon=resources/images/plugin/whiteboard/pen.png
+mpenIcon=resources/images/plugin/whiteboard/m_pen.png
+polyIcon=resources/images/plugin/whiteboard/poly.png
+polyFIcon=resources/images/plugin/whiteboard/polyF.png
+polyLineIcon=resources/images/plugin/whiteboard/polyLine.png
+rectIcon=resources/images/plugin/whiteboard/rect.png
+rectFIcon=resources/images/plugin/whiteboard/rectF.png
+sc_logo16x16=resources/images/plugin/whiteboard/sc_logo16x16.png
+selectIcon=resources/images/plugin/whiteboard/select.png
+squareIcon=resources/images/plugin/whiteboard/square.png
+straightLineIcon=resources/images/plugin/whiteboard/straight_line.png
+textIcon=resources/images/plugin/whiteboard/text.png
+text2Icon=resources/images/plugin/whiteboard/text2.png
+inviteIcon=resources/images/plugin/whiteboard/inviteDialogIcon.png
+
+# rss accregwizz
+protocolIconRss=resources/images/protocol/rss/rss-online.png
+pageImageRss=resources/images/protocol/rss/rss64x64.png
+
+# aim accregwizz
+protocolIconAim=resources/images/protocol/aim/aim16x16-online.png
+pageImageAim=resources/images/protocol/aim/aim64x64.png
+
+# contactinfo
+contactInfoIcon=resources/images/plugin/contactinfo/userInfo16x16.png
+contactInfoDefaultPersonIcon=resources/images/plugin/contactinfo/personPhoto.png
+
+# irc accregwizz
+protocolIconIrc=resources/images/protocol/irc/cr16-action-irc_online.png
+pageImageIrc=resources/images/protocol/irc/cr64-app-irc_protocol.png
+
+# jabber accregwizz
+protocolIconJabber=resources/images/protocol/jabber/status16x16-online.png
+pageImageJabber=resources/images/protocol/jabber/logo48x48.png
+
+#googletalkaccregwizz
+protocolIcon=resources/images/protocol/googletalk/status16x16-online.png
+pageImage=resources/images/protocol/googletalk/logo48x48.png
diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties
new file mode 100644
index 0000000..a3f59a6
--- /dev/null
+++ b/resources/languages/resources.properties
@@ -0,0 +1,664 @@
+# SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+#
+# Distributable under LGPL license.
+# See terms of license at gnu.org.
+
+# Note to translators:
+# To translate SIP Communicator to your language
+# - copy messages.properties to messages_xx.properties
+# (where xx is the ISO 639-1 language code of your language)
+# - the file must use UTF-8 encoding
+# - all entries are of the form key=translation, where only the
+# translation part has to be changed
+# - {0}, {1}... are parameters which will be replaced by the
+# actual text at runtime, place them as you wish
+# - you don't have to translate all entries, if an entry is not
+# found in your translation, the text in messages.properties will
+# be used
+# - \ at the end of a line means that the translation is continued
+# in the next line
+#
+# To start SIP Communicator with a language that is different
+# from your system's language, pass the language code to ant:
+# ant -Duser.language=xx run
+#
+# The same rules apply to the properties files found in the other
+# directories.
+
+about=&About
+accept=&Accept
+account=Account
+accountRegistrationWizard=Account Registration Wizard
+accounts=Accounts
+activateOnlyWhenMinimized=Activate only when minimized
+add=&Add
+addAccount=Add account
+addContact=&Add contact
+addContactError=Failed to add contact with id: {0}
+addContactErrorTitle=Add contact Error
+addContactExistError=The contact {0} already exists in your contact list.
+addContactIdentifier=In the field below enter the identifier of the contact you would like to add.
+addContactWizard=Add contact wizard
+addGroupLocalError=Failed to add group with name: {0}. The problem occured during a local IO operation.
+addGroupNetError=Failed to add group with name: {0}. The problem occured due to a network failure. Please check your network connection and try again.
+addGroupError=Failed to add group with name: {0}.
+addGroupErrorTitle=Add group Error
+addGroupExistError=The group {0} already exists in your contact list.
+addGroup=Create group
+addSubcontact=&Add subcontact
+advanced=Advanced
+all=&All
+allContacts=&All contacts
+alwaysOnTop=Always on top
+appearance=Appearance
+application=Application
+apply=&Apply
+at=at
+authAccepted=contact has accepted your authorization request.
+authenticationWindowTitle=Authentication requested
+authRejected=contact has rejected your authorization request.
+authorizationRequested=Authorization requested
+authorizationRequestedInfo=The {0} contact requests your authorization.
+authenticationFailed=Authentication failed. The password you entered is not valid.
+authorizationResponse=Authorization response
+autoPopup=Bring window to front
+awayStatus=Away
+back=&Back
+ban=&Ban
+banFailed=Ban failed
+banFailedGeneralError=Failed to ban {0}. A general server error occured.
+banFailedNotAllowed=Failed to ban {0}. The owner and the administratior of the room could not be banned.
+banFailedNotEnoughPermissions=Failed to ban {0}. You don't have enough privileges to do that.
+brbMessage=I'm gone right now, but I'll be back.
+busyMessage=Sorry, I'm busy right now.
+call=Call
+callVia=Call via:
+callList=Call list
+cancel=&Cancel
+chatRoomAlreadyJoined=The {0} chat room is already joined.
+chatRoomConfiguration={0} chat room configuration
+chatRoomOpenConfigFailed=Failed to obtain the {0} chat room configuration form.
+chatRoomOpenConfigForbidden=Could not obtain the {0} chat room configuration form. Only administrators of the chat room could see and change the configuration form.
+chatRoomConfigFormSubmitFailed=An error occured while trying to submit the configuration form for chat room {0}.
+chatRoomUserJoined=has joined {0}
+chatRoomUserLeft=has left {0}
+chatRoomUserKicked=has been kicked from {0}
+chatRoomUserQuit=has quit {0}
+chatRoomName=Chat room name
+chatRoomNameInfo=In the field below enter the name of the chat room that you would like to create.
+chatRoomNotExist=The {0} room was not found in the {1} server. Please verify if the name you typed is correct.
+chatRoomNotConnected=You need to be logged in in order to join the {0} chat room.
+chatRoomNotJoined=You need to be joined to the chat room in order to do further operations with it.
+chatRoomOptions=Chat room options
+chatRoomRegistrationRequired=The {0} chat room requires registration to be joined.
+chatRoomRequiresPassword=The {0} chat room has requested a password.
+chatRooms=Chat rooms
+chatRoomSubjectChanged={0} has changed the subject to {1}
+close=Cl&ose
+closeChatAfterNewMsg=You have received a new message less than 2 seconds ago. Are you sure you want to close this chat?
+conference=Conference
+configure=&Configure
+configuration=Configuration
+connectionFailed=Connection failed
+connectionFailedMessage=<DIV>Connection failed for the following account: <BR> \
+User name: {0} <BR>\
+Server name: {1}. <BR>\
+Please check your network connection or contact <BR>\
+your network administrator for more information.</DIV>
+connectionExpiredMessage=You are currently disconnected from the {0} server.
+contactAddress=Contact address
+contactNotSupportingTelephony=The choosen {0} contact doesn't support telephony.
+contactPausedTyping={0} paused typing the message
+contactTyping={0} is typing a message
+contactTypingStateStale=typing state not updated
+contactInfo=&Contact info
+contacts=Contacts
+continue=&Continue
+copy=&Copy
+copyLink=Copy &link
+create=C&reate
+createChatRoom=&Create chat room...
+createChatRoomNotSupported=Failed to create chat room with name: {0}. The server you have choosen: {1} doesn't support this operation.
+createChatRoomError=Failed to create chat room with name: {0}.
+createChatRoomWizard=Create chat room wizard
+createGroup=&Create group
+createGroupName=In the field below enter the name of the group you would like to create.
+createFirstGroupWizard=Your contact list doesn't contain any groups. Please create a group first (File/Create group).
+cut=C&ut
+date=Date
+description=Description
+dial=&Dial
+dialpad=Dialpad
+dndStatus=Do not disturb
+doNotAskAgain=Don't ask again
+doNotShowAgain=Don't show this message again
+dontSupportWebInfo=This contact doesn't support web contact info
+duration=Duration
+edit=&Edit
+emptyHistory=&Empty history
+enableNotifications=Enable notifications
+enableTypingNotifications=Enable &typing notifications
+enterPhoneNumber=Enter phone number
+error=Error
+exit=E&xit
+extendedCriteria=Extended criteria
+general=General
+generalError=General error
+group=Group
+groupName=Group name
+failedToCreateChatRoom=Failed to create chat room with name: {0}.
+failedToJoinChatRoom=Failed to join chat room with name: {0}.
+ffcStatus=Free for chat
+file=&File
+findChatRoomError=Failed to find the "{0}" chat room.
+finish=&Finish
+first=First
+font=Font
+hangUp=Hang up
+haveToBeConnectedToJoin=You have to be connected in order to join a chat room. Please connect and then try again.
+haveToBeConnectedToLeave=You have to be connected in order to leave a chat room.
+help=?
+hideOffline=Hide
+hideOfflineContacts=Hide inactive contacts
+hideCallPanel=&Hide call panel
+hideMainWindow=<DIV>Clicking the X window button will not exit the application, \
+but only <BR> hide it. If you wish to exit the application choose File/Quit.</DIV>
+history=&History
+historyContact=History - {0}
+hour=Hour
+identifier=Identifier
+ignore=&Ignore
+info=Info
+insertSmiley=Insert smiley
+invalidCall=Invalid call
+invitation=Invitation text
+invitationReceived=Invitation received
+invitationReceivedFormInfo={0} has invited you to join {1} chat room. You could accept, reject or ignore this invitation.
+invite=&Invite
+inviteContactFormInfo=Please write the name of the user you would like to invite. If you wish you could also precise the reason for this invitation.
+inviteContactToChat=Invite contact to chat
+join=&Join
+joinAs=J&oin as
+joinChatRoom=&Join chat room...
+joinChatRoomTitle=Join chat room
+joinChatRoomName=Please enter the name of the chat room you would like to join.
+joinChatRoomWizard=Join chat room wizard
+kick=&Kick
+kickFailed=Kick failed
+kickFailedGeneralError=Failed to kick {0}. A general server error occured.
+kickFailedNotAllowed=Failed to kick {0}. The owner and the administratior of the room could not be kicked.
+kickFailedNotEnoughPermissions=Failed to kick {0}. You don't have enough privileges to do that.
+last=Last
+launchBrowserError=Error attempting to launch web browser.
+launchOnStartUp=Launch on start up
+leave=&Leave
+limitReachedForIp=You have too many existing registrations from the local IP address and the {0} server doesn't allow to open any more of them.
+login=&Login
+loginNetworkError=<DIV>Unable to log in with account:<BR>\
+User name: {0}<BR>\
+Server name: {1}<BR>\
+due to a network failure. Please check your network connection.</DIV>
+loginGeneralError=An error occured while logging in with account: User name: {0}, Server name: {1}.
+loginInternalError=An error occured while logging in with account: User name: {0}, Server name: {1}. This is most probably an internal application error. You could report your problem to issues@sip-communicator.dev.java.net.
+loginInvalidPropsError=Unable to log in with account: User name: {0}, Server name: {1}, due to an account configuration problem. Please check your account configuration.
+loginWindowTitle=Login {0}
+logoffNotSucceeded=An error occured while logging off with the following account: User name: {0}, Server name: {1}.
+me=me
+modify=&Modify
+move=Move
+moveSubcontactMsg=Select the contact, where you would like to move.
+moveSubcontact=M&ove contact
+moveSubcontactInSameContact=The contact you have choosen is the same as \n the source one. Please choose another contact!
+moveSubcontactQuestion=<DIV>Are you sure you want to move <B> {0} </B> to <B> {1} </B> ?</DIV>
+moveToGroup=&Move to group
+moveContactError=&Contact cannot be moved
+msgDeliveryFailure=The above message could not be delivered
+msgDeliveryOfflineNotSupported=The protocol you are using doesn't support offline messages. You could try to reach this contact through another protocol or wait until he/she becomes online.
+msgDeliveryInternalError=An internal error occured. This is most probably a bug. Please report it here: http://www.sip-communicator.org/index.php/Development/BugsAndIssues
+msgDeliveryUnknownError=Your message could not be delivered due to the following problem: {0}.
+msgNotDelivered=A network problem occured. Please check your network configuration and try again.
+msgReceived={0} has sent you a message
+msgSendConnectionProblem=You should be connected to be able to send messages.
+multipleLogins=You have logged in more than once with the same account. The following account: User name: {0}, Server name: {1} is currently disconnected.
+name=Name
+network=Network
+networkFailure=Network failure
+next=&Next
+new=&New
+newAccount=Add &new account
+newMessage=New message...
+newName=New name:
+newStatusMessage=New status message
+no=No
+noAvailableRooms=The list of rooms for this server is currently not available.
+noMessage=No message
+noMultiChatAccountAvailable=No accounts, supporting multi user chat found. Check sip-communicator.org for more information on which protocols support multi user chat.
+nonEmptyChatWindowClose=You're trying to close a chat with a non-sent message. Are you sure you want to close this chat?
+nonExistingUserId=The {0} server does not recognize specified user id.
+notifications=Notifications
+ok=&Ok
+offline=Offline
+olderCalls=Older calls
+online=Online
+openInBrowser=Open in &browser
+options=Options
+passwd=Password
+paste=&Paste
+previous=Previous
+print=&Print
+protocol=Protocol
+providerNotConnected=You must be connected to be able to communicate.
+quit=&Quit
+ready=Ready
+reason=Reason
+reconnectionLimitExceeded=You have have been disconnecting and reconnecting to the server too fast. The following account: User name: {0}, Server name: {1} is temporarily banned and would have to wait a bit before trying to login again.
+refresh=Refresh
+registrationTimeout=Registration timeout:
+reject=&Reject
+rememberPassword=Remember password
+remove=&Remove
+removeAccount=&Remove account
+removeAccountMessage=Are you sure you want to remove this account?
+removeContact=&Remove subcontact
+removeContactText=<DIV>Are you sure you want to remove <B> {0} </B><BR>from your contact list?</DIV>
+removeGroup=&Remove group
+rename=&Rename
+renameContact=Re&name contact
+renameContactWizard=In the field below you can specify the name you would like to use for the given contact.
+renameGroup=Re&name group
+renameGroupInfo=In the field below you can specify the name you would like to use for the given group.
+request=&Request
+requestAuthorization=&Request authorization
+requestAuthorizationInfo=Can't add {0} to your Contact List. {0} must authorize your request to add him/her. Please enter your request below.
+requestAuthReason=Request reason
+requestAuthReasonEnter=Enter request reason
+responseAuthReasonEnter=Enter response reason
+retry=Retry
+rootGroup=Root group
+save=&Save
+search=&Search
+searchForChatRooms=&Search for chat rooms
+searchForChatRoomsText=Click the below button to show all chat rooms existing in the selected server. Then select the one you would like to join and click the join button.
+securityAuthorityRealm=The {0} server has requested your authentication.
+selectAccount=Select account
+selectAccountRegistration=From the list below select the account registration wizard to use for creating a new account.
+selectAccountRegWizardTitle=Select account registration
+selectGroup=Select group
+selectGroupWizard=The list below contains all groups in your Contact List. Select the one, where you would like to add the new contact.
+selectGroupWizardTitle=Specify group
+selectProvidersForChatRoom=The list below contains all accounts that support the multi user chat feature. Select the one you would like to use to create your chat room.
+selectProvidersWizard=The list below contains all registered accounts. Select the one you would like to use to communicate with the new contact.
+selectProvidersWizardTitle=Select account
+send=&Send
+sendFile=Send &file
+selectContactSupportingInfo=There is no info for this contact.
+sendMessage=&Send a message
+sendAsSms=Send as SMS
+sendSms=S&end SMS
+sendSmsDetails=Remember that you need to enter the number in international \
+format e.g. starting with +44 for the UK for example, +447777000000
+sendSmsNotSupported=The protocol you have selected doesn't support SMS messages.
+sendVia=Send via
+setStatusMessage=Set status message
+settings=&Settings
+showCallPanel=Show call panel
+showChannelsList=Show channels list
+showOffline=Show
+showOfflineContacts=Show inactive contacts
+signin=Sign in
+smiley=Smiley
+smsSuccessfullySent=SMS message successfully sent!
+smsSendConnectionProblem=You need to be connected before being able to send SMS messages. Please connect your SMS provider account.
+specifyReason=In the field below you could specify the reason of this operation.
+sound=Sound
+soundOnOff=Turn sound on/off
+statusChangedChatMessage=has become {0}
+statusChangeGeneralError=Failed to change status for account: User name: {0}, Server name: {1}, due to a general error.
+statusChangeNetworkFailure=Failed to change status for account: User name: {0}, Server name: {1}, due to a network problem.
+statusMessageInfo=In the field below you can specify the new message you would like to use.
+subject=Subject
+summary=Summary
+today=Today
+tools=&Tools
+typeYourRequest=Type your request here
+uin=User identifier:
+unknown=Unknown user
+useCtrlEnterToSend=Use Ctrl-&Enter to send
+username=Username
+msgDeliveryFailedUnknownError=Unknown error has occured while delivering your message.
+unregisteredMessage=Unable to connect the following account: User name: {0}, Server name: {1}. You are currently offline.
+updateAutomatically=Automatically install new updates
+updates=Updates
+view=&View
+viewHistory=View &history
+warning=Warning
+yes=Yes
+yesterday=Yesterday
+
+january=Jan
+february=Feb
+march=Mar
+april=Apr
+may=May
+june=Jun
+july=Jul
+august=Aug
+september=Sep
+october=Oct
+november=Nov
+december=Dec
+
+# systray
+setStatus=Set Status
+onlineStatus=Online
+offlineStatus=Offline
+messageReceived=Message received from
+failedToLoadAddContactDialog=Failed to load the "Add contact" wizard dialog.
+
+# account info
+accountInfo=Account info for
+title=Account Info
+browse=Browse
+summaryDesc=Summary of account info for
+extended=Extended
+extendedDesc=Extended account info for
+notSupported=Account info not available.
+clickWeb=Click for Web Info
+webInfo=Web Info
+firstNameNS=First Name:
+middleNameNS=Middle Name:
+lastNameNS=Last Name:
+ageNS=Age:
+bdayNS=Birth Date:
+genderNS=Gender:
+emailNS=E-mail:
+phoneNS=Phone:
+userPictures=User Pictures
+change=Change
+onlyMessages=Only messages
+
+# aimaccregwizz
+protocolNameAim=AIM
+protocolDescriptionAim=The AIM service protocol
+id=AIM Screenname:
+password=Password:
+uinAndPassword=UIN and Password
+registerNewAccount=Register new account
+aimRegisterNewAccountText=In case you don't have an AIM account, click on this button to create a new one.
+existingAccount=* The account you entered is already installed.
+ovverideServerOps=Override server default options
+advancedOptions=Advanced Options
+proxy=Proxy
+proxyPort=Proxy port
+proxyType=Proxy type
+proxyUsername=Proxy username
+proxyPassword=Proxy password
+
+# branding
+aboutWindowTitle=About {0}
+logoMessage=Open Source VoIP & Instant Messaging
+loading=Loading
+aboutMenuEntry=About
+basedOn=based on
+welcomeMessage=<DIV color={0}>The {1} is currently under active development. \
+ The version you are running is only experimental and MAY NOT \
+ work as expected. Please refer to {2} for more information.</DIV>
+copyright=<DIV><font size=3 color={0}>(c)2003-2007 Copyright \
+ <b>sip-communicator.org</b>. All rights reserved. Visit \
+ <a href="http://sip-communicator.org">http://sip-communicator.org</a>.\
+ </font></DIV>
+license=<DIV color={0}>The <b>SIP Communicator</b> is distributed under \
+ the terms of the LGPL (<a href=\"http://www.gnu.org\">\
+ http://www.gnu.org</a>).</DIV>
+
+# contact info
+contactDetails=Contact details
+selectUser=Select a user
+contactSummaryDesc=Summary of contact info for
+contactExtendedDesc=Extended contact info for
+contactInfoNotSupported=This protocol doesn't support server stored details for now. Try one of the other protocols.
+notSpecified=[Not specified]
+
+# dict accregwizz
+protocolNameDict=Dict
+protocolDescriptionDict=The Dict service protocol
+strategyList=List of strategies:
+strategyActu=Search strategies
+strategyDesc=Strategie is use to search similar words,if a translation was not found, thanks to different approaches. For example the Prefix strategies will search words which begin like the word you would translate.
+
+dictAccountInfoTitle=Dict Account Information
+firstAccount=This wizard will create your first Dict Account for you on dict.org.\n\n\
+You can add new dictionary by going on Account Registration Wizard. Fill the host Field with dictionnary you would like to add.
+
+# extendedcallsearchhistory
+advancedCallHistorySearch=&Advanced call history search
+search=Search
+contactName=Contact Name
+since=Since
+until=Until
+callType=Call Type
+incoming=Incoming
+outgoing=Outgoing
+olderCalls=Older Calls
+all=all
+
+# generalconfig
+autoStartOption=Auto - start MotoGP Impact when computer restarts or reboots.
+groupChatMessages=Group chat messages in one window.
+logHistory=Log chat history
+showHistory=Show history
+historySize=recent messages in new chats
+sendMessagesWith=Send messages with:
+enableTypingNotifications=Enable typing notifications
+bringWindowToFront=Bring chat window to front
+errorPermission=You don't have enough privileges to remove autostart
+
+
+# gibberish accregwizz
+protocolNameGibberish=Gibberish
+protocolDescriptionGibberish=A SIP Communicator test protocol.
+userID=User ID:
+userAndPassword=Identification
+
+# icqaccregwizz
+protocolNameIcq=ICQ
+protocolDescriptionIcq=The AOL ICQ service protocol
+uin=ICQ Number:
+icqRegisterNewAccountText=In case you don't have an ICQ account, click on this button to create a new one.
+
+# irc accregwizz
+protocolNameIrc=IRC
+protocolDescriptionIrc=IRC protocol.
+nick=Nickname:
+infoPassword=Most IRC servers do not require password.
+autoNickChange=Automatically change nick when it's already used
+defaultPort=Use default port
+passwordNotRequired=My nickname doesn't require identification
+server=Hostname:
+port=Port:
+serverIRC=Server
+
+# jabber accregwizz
+protocolNameJabber=JABBER
+protocolDescriptionJabber=The Jabber protocol
+username=Jabber username
+password2=Confirm password
+userIDAndPassword=ID and Password
+cserver=Server
+server=Connect Server
+port=Port
+enableKeepAlive=Enable keep alive
+newAccountTitle=Jabber new account registration
+registerNewAccountText=In case you don't have a Jabber account, click on this button to create a new one.
+chooseTitle=Jabber new account server chooser
+chooseServerText=Choose the server for your new account in the list below.
+okLabel=&Ok
+cancelLabel=C&ancel
+chooseLabel=&Choose
+serverColumn=Server
+commentColumn=Comment
+resource=Resource
+priority=Priority
+
+xmppError=XMPP Error
+userExist=This user already exist on this server. Choose another user or server.
+unknownXmppError=Unknown XMPP error. Verify that the server name is correct.
+notSamePassword=The two entered password aren't the same.
+
+# mailbox
+outgoing=Outgoing Message:
+incoming=Incoming Messages:
+waitTime=Delay Until Call Sent to Voicemail
+maxMessageTime=Maximum Incoming Message Duration
+confirm=Confirm
+default=Defaults
+mailbox=Mailbox
+
+# msn accregwizz
+protocolNameMsn=MSN
+protocolDescriptionMsn=A protocol to connect and chat on the MSN Service.
+id=Email:
+msnUinAndPassword=ID and Password
+
+# plugin manager
+activate=Activate
+desactivate=Desactivate
+install=Install
+uninstall=Uninstall
+update=Update
+new=New
+plugins=Plug-ins
+cancel=Cancel
+url=Url
+chooseFile=Select File
+showSystemBundles=Show system bundles
+system=System
+
+# rss accregwizz
+protocolNameRss=RSS
+protocolDescriptionRss=Add your preferred RSS feeds into SIP Communicator !
+rssAccountExist=RSS account already exists!
+rssAccountInfo=This wizard will create an RSS account for you.\n\n\
+Note that you could have only one RSS account!\n\n\
+You can add RSS feeds to your contact list using the "Add contact" wizard. Fill in the contact address field with the URI of the RSS feed you would like to add.
+rssAccountInfoTitle=RSS Account Information
+rssAccountAttention=Please read attentively the information provided below!
+
+# simple accregwizz
+initialAccountRegistration=Configure all your favorite protocols in one click.
+signup=Not registered yet?
+specialSignup=Not registered yet ? - click here to get a new username
+cancel=Cancel
+
+# sipaccregwizz
+protocolNameSip=SIP
+protocolDescriptionSip=The SIP protocol
+id=SIP id
+sipUinAndPassword=User name and password
+registrar=Registrar
+serverPort=Server port
+preferredTransport=Preferred transport
+enablePresence=Enable presence (SIMPLE)
+forceP2PPresence=Force peer-to-peer presence mode
+offlineContactPollingPeriod=Offline contacts polling period (in s.)
+subscriptionExpiration=Default subscription duration (in s.)
+presenceOptions=Presence Options
+keepAlive=Keep alive
+keepAliveMethod=Keep alive method
+keepAliveInterval=Keep alive interval
+keepAliveIntervalEx=Between 1 and 3600 seconds
+register=REGISTER
+
+# ssh accregwizz
+protocolNameSsh=SSH
+protocolDescriptionSsh=A Protocol to connect to remote machines over SSH.
+accountID=Account ID:
+identityFile=Identitity File:
+knownHosts=Known Hosts:
+accountDetails=SSH Account Details
+
+# status update
+cancel=Cancel
+enable=Enable
+info=Information
+infotext=Set "Idle", when your computer is not used for X minutes. The status is reset to the status before, when activity is detected.
+menuEntry=Automatic Status
+minutes=Minutes
+
+# updatechecker
+dialogTitle=New version available
+dialogMessage1=<html>A new version of {0} is available for download.
+dialogMessage2=<br>{0} ({1}): <br>
+dialogMessageDebian=
+buttonDownload=Download
+buttonClose=Close
+
+# whiteboard
+invitationReceivedFormInfo={0} has invited you to join {1} whiteboard. You could accept, reject or ignore this invitation.
+whiteboardTitle=Whiteboard [Beta]
+whiteboardMenuItemText=Whiteboard
+whiteboardMenuItemNotSupportedTooltip=This contact does not support whiteboarding
+cancel=Cancel
+doNotAskAgain=Do not ask me again.
+closeSessionQuestion=Would you like to end current session ? If you choose "yes" the current session will be ended, otherwise only your whiteboard window will be closed.
+file=File
+draw=Draw
+new=New
+save=Save
+open=Open
+copy=Copy
+paste=Paste
+pen=Pen
+select=Select
+line=Line
+rectangle=Rectangle
+fillRectangle=Filled rectangle
+text=Text
+image=Image
+polygon=Polygon
+fillPolygon=Filled polygon
+polyline=Polyline
+circle=Circle
+fillCircle=Filled circle
+color=Color
+modification=Modification
+thickness=Thickness:
+send=Send
+print=Print
+exit=Exit
+edit=Edit
+grid=Grid
+deselect=Deselect
+delete=Delete
+properties=Properties
+help=Help
+About=About
+
+# yahoo accregwizz
+protocolNameYahoo=YAHOO
+protocolDescriptionYahoo=A protocol to connect and chat on the Yahoo Service.
+id=Username:
+yahooUinAndPassword=ID and Password
+
+# zero accregwizz
+protocolNameZeroconf=Zeroconf
+protocolDescriptionZeroconf=The Zeroconf (Bonjour) service protocol.
+firstname=Firname:
+
+# ssh protocol
+#Contact Details Seperator(must not be part of contact data stored as persistent
+# data)
+detailsSeperator=~
+
+# msn protocol
+newMail=You have one new Mail from {0} ({1}) with subject: {2}
+
+# yahoo protocol
+newYahooMail=New mail, subject
+fromYahoo=From
+
+# gtalk accregwizz
+protocolName=GOOGLE TALK
+protocolDescription=The Google Talk protocol
+gtalkUsername=Google Talk username
+gtalkRegisterNewAccountText=In case you don't have a Google Talk account, click on this button to create a new one.
diff --git a/resources/languages/resources_bg.properties b/resources/languages/resources_bg.properties
new file mode 100644
index 0000000..5b25816
--- /dev/null
+++ b/resources/languages/resources_bg.properties
@@ -0,0 +1,298 @@
+# SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+#
+# Distributable under LGPL license.
+# See terms of license at gnu.org.
+
+# Incomplete Bulgarian translation.
+# Author: Yana Stamcheva
+
+about=Относно
+accept=&Приемам
+account=Сметка
+accountRegistrationWizard=Регистрация на сметка
+accounts=Сметки
+activateOnlyWhenMinimized=Activate only when minimized
+add=&Добави
+addContact=&Добави контакт
+addContactError=Неуспешно добавяне на контакт с идентификатор: {0}
+addContactErrorTitle=Грешка при добавяне на контакт
+addContactExistError=Контактът {0} вече съществува във вашият списък с контакти.
+addContactIdentifier=В полето по-долу въведете идентификатора на контакта, който бихте искали да добавите.
+addContactWizard=Добавяне на контакт
+addGroupLocalError=Неуспешно добавяне на група: {0}. Проблемът е възникнал по време на входно-изходно операция.
+addGroupNetError=Неуспешно добавяне на група: {0}. Проблемът е възникнал по време на мрежова операция. Проверете мрежовите си настройки и опитайте отново.
+addGroupError=Неуспешно добавяне на група: {0}.
+addGroupErrorTitle=Грешка при добавяне на група
+addGroupExistError=Групата {0} е вече добавена към вашия списък с контакти.
+addSubcontact=&Добавяне на подконтакт
+all=&Всички
+allContacts=&Всички контаки
+alwaysOnTop=Винаги на преден план
+appearance=Външен вид
+application=Приложение
+apply=&Приложи
+at=от
+authAccepted=контакт прие вашата молба за добавяне.
+authenticationWindowTitle=Проверка на самоличността
+authRejected=контакт отказа вашата молба за добавяне.
+authorizationRequested=Молба за добавяне
+authorizationRequestedInfo=Контактът {0} поиска да ви добави.
+authenticationFailed=Неуспешна проверка на самоличността за потребител {0}, от сървър {1}. Въвели сте невалидна парола.
+authorizationResponse=Отговор на молба за добавяне
+autoPopup=Изкарай прозореца на преден план.
+awayStatus=Няма ме
+back=&Назад
+ban=&Забрана
+banFailed=Забраната се провали
+banFailedGeneralError=Неуспешен опит за забраняване на {0}. Възникна грешка на сървъра.
+banFailedNotAllowed=Неуспешен опит за забраняване на {0}. Собственикът и администратора на стаята не могат да бъдат забранявани.
+banFailedNotEnoughPermissions=Нямате нужните права за да осъществите забраната на {0}.
+brbMessage=В момента ме няма, но ще се върна скоро.
+busyMessage=Сори, зает съм в момента.
+call=Обаждане
+callVia=Обаждане през:
+callList=Списък на обажданиата
+cancel=&Отмени
+chatRoomAlreadyJoined=Вече сте влезли в стая {0}.
+chatRoomConfiguration={0} конфигуриране на стая
+chatRoomOpenConfigFailed=Грешка при изтегляне на конфигурационните данни за стая {0}.
+chatRoomOpenConfigForbidden=Грешка при изтегляне на конфигурационните данни за стая {0}. Само администраторите на стаята могат да консултират и променят нейните настройки.
+chatRoomConfigFormSubmitFailed=An error occured while trying to submit the configuration form for chat room {0}.
+chatRoomUserJoined=влезе в {0}
+chatRoomUserLeft=напусна {0}
+chatRoomUserKicked=беше изритан от {0}
+chatRoomUserQuit=напусна {0}
+chatRoomName=Име на стая
+chatRoomNameInfo=Моля въведете името на стаята която желаете да създадете.
+chatRoomNotExist=Не успях да намеря стая {0} на сървър {1}. Моля проверете дали правилно сте написали името.
+chatRoomNotConnected=Трябва да се включите към сървъра (логнете) преди да може да влезете в стая {0}.
+chatRoomNotJoined=Трябва да сте в стаята за да можете да оперирате с нея.
+chatRoomOptions=Настройки на стаята
+chatRoomRegistrationRequired=Нужно е да се регистрирате за да влезнете в стая {0}.
+chatRoomRequiresPassword=Нужна е парола за стая {0}.
+chatRooms=Стаи за разговори
+chatRoomSubjectChanged={0} смени темата на {1}
+close=&Затваряне
+closeChatAfterNewMsg=Получихте съобщение преди по-малко от 2 секунди. Сигурни ли сте, че въпреки това желаете да затворите прозореца за този разговор?
+conference=Конференция
+configure=&Настройване
+configuration=Настройки
+connectionFailed=Връзката е прекъсната
+connectionFailedMessage=Връзката към сървър {1} е прекъсната за потребител {0}.
+connectionExpiredMessage=В момента не сте свързани с {0}.
+contactAddress=Адрес на контакта
+contactNotSupportingTelephony={0} не поддържа телефонните разговори.
+contactPausedTyping={0} спря да пише
+contactTyping={0} пише съобщение
+contactTypingStateStale=статусът на писането не е обновен
+contacts=Контакти
+continue=&По-нататък
+copy=&Копирай
+copyLink=Копирай &връзка
+create=С&ъздай
+createChatRoom=&Създай стая за разговори...
+createChatRoomNotSupported=Неуспешен опит за създаване на стая: {0}. Сървър {1} не поддържа тази операция.
+createChatRoomError=Неуспешен опит за създаване на стая: {0}.
+createChatRoomWizard=Create chat room wizard
+createGroup=&Създай групa
+createGroupName=Въведете името на групата, която бихте искали да създадете.
+createFirstGroupWizard=Списъкът ви с контакти не съдържа групи. Моля добавете група от меню Файл/Добави група.
+cut=О&трежи
+date=Дата
+description=Описаня
+dial=&Набери
+dialpad=Панел за набиране
+dndStatus=Не ме безпокойте
+doNotAskAgain=Не ме питай повече
+doNotShowAgain=Повече не ми показвай това съобщение
+dontSupportWebInfo=Контактът не поддържа уеб информация
+duration=Продължителност
+edit=&Редактирай
+emptyHistory=&Изтрий историята
+enableNotifications=Включи известяваниата
+enableTypingNotifications=Включи статуса на &писане
+error=Грешка
+exit=И&зход
+extendedCriteria=Допълнителни условия
+general=Общи
+generalError=Обща грешка
+group=Група
+groupName=Име на групата
+failedToCreateChatRoom=Неуспешен опит за създаване на група: {0}.
+failedToJoinChatRoom=Неуспешен опит за влизане в стая: {0}.
+ffcStatus=Бъбри ми се
+file=&Файл
+findChatRoomError=Стаята {0} не е намерена.
+finish=&Приключи
+first=Първи
+font=Шрифт
+haveToBeConnectedToJoin=Трябва да сте свързани със сървъра преди да влезете в стаята. Свържете се и опитайте пак.
+haveToBeConnectedToLeave=Трябва да се свържете преди да напуснете стаята (парадоксално, а :) ).
+help=?
+hideCallPanel=&Скрии панела за обажданиата
+hideMainWindow=Бутонът "X" няма да прекрати програмата а само ще я скрие. Ако желаете да излезнете можете да го направите от меню Файл/Изход.
+history=&История
+historyContact=История - {0}
+hour=Час
+identifier=Ключ
+ignore=&Пренебрегни
+insertSmiley=Усмихнати човечета
+invalidCall=Невалидно обаждане
+invitation=Текст на поканата
+invitationReceived=Получена е покана
+invitationReceivedFormInfo={0} ви кани да влезете в стая {1}. Можете да приемете, откажете или да пренебрегнете тази покана.
+invite=&Покана
+inviteContactFormInfo=Моля въведете името на потребителя който бихте желали да поканите. Ако желаете можете да въведете и обяснение към поканата.
+inviteContactToChat=Покани контакт на чат
+join=&Влез
+joinAs=В&лез като
+joinChatRoom=&Влез в стая за разговори...
+joinChatRoomTitle=Влизане в стая за разговори
+joinChatRoomName=Моля, въведете името на стаята, в която желаете да влезнете.
+joinChatRoomWizard=Асистент за влизане в стая.
+kick=&Изритай
+kickFailed=Неуспешен опит за изритване
+kickFailedGeneralError=При опит за изритване на {0} възникна грешка на сървъва. Опитът е неуспешен.
+kickFailedNotAllowed=Неуспешен опит за изритване на {0}. Собствениците и администраторите на една стая не могат да бъдат изритвани.
+kickFailedNotEnoughPermissions=Нямата правата необходими за изритването на {0}.
+last=Последно
+launchBrowserError=Грешка при опит за отваряне на уеб браузър.
+launchOnStartUp=Пусни при стартиране
+leave=&Напусни
+limitReachedForIp=Имате прекалено много регистрации от текущия ви адрес и сървърт на {0} не разрешава отварянето на нови.
+login=&Включване
+loginNotSucceeded=Възникна грешка при свързване на потребител {0} със сървър: {1}.
+loginWindowTitle=Включване {0}
+logoffNotSucceeded=Възникна грешка при свързване на потребител {0} със сървър: {1}.
+me=аз
+modify=&Промени
+moveSubcontactMsg=Изберете контакта където желаете да преместите.
+moveSubcontact=Пре&мести подконтакт
+moveSubcontactInSameContact=Подконтактът вече се намира в този контакт. \n Моля изберете друг отправен контакт!
+moveToGroup=Пре&мести група
+msgDeliveryFailure=Доставката на горното съобщение се провали
+msgDeliveryOfflineNotSupported=Протоколът който използвате не позволява съобщенията към не включени потребители. Опитайте да се свържете с контакта чрез друг протокол или изчакайте да се включи.
+msgDeliveryInternalError=Възникна грешка в програмата. Това най-вероятно е бъг. Ще ви бъдем благодарни ако ни уведомите: http://www.sip-communicator.org/index.php/Development/BugsAndIssues
+msgNotDelivered=Възникна проблем с мрежовата връзка.
+msgReceived=Получихте съобщение от {0}
+msgSendConnectionProblem=Трябва да се свържете за да можете да изпращате съобщения.
+multipleLogins=Свързали сте се повече от веднъж с един и същ акаунт. Потребител {0} на сървър {1} ше бъде изключен.
+name=Име
+networkFailure=Проблем с мрежата
+next=&Напред
+new=&Нов
+newAccount=&Нов акаунт
+newMessage=Ново съобщение...
+newName=Ново име:
+newStatusMessage=Ново статус съобщение
+no=Не
+noAccountFound=За да използвате СИП Комуникатор трябва да регистрирате поне един акаунт (потребител). С този асистент ще ви помогнем да го направите.
+noAvailableRooms=Списъкът от стаи за този сървър не е наличен в момента.
+noMessage=Няма съобщение
+noMultiChatAccountAvailable=Няма акаунт който да поддържа стаи за разговор. За да разберете кои протоколи поддържат тази функционалност проверете на sip-communicator.org.
+nonEmptyChatWindowClose=Опитвате се да затворите прозорец с неизпратено съобщение, \nкоето би довело до загубата му. Сигурни ли сте?
+nonExistingUserId=Сървърът на {0} не разпознава въведения от вас потребител.
+notifications=Известявания
+ok=&ОК
+offline=Изключен
+olderCalls=Предишни обаждания
+online=Включен
+openInBrowser=Отвори в &браузър
+options=Настройки
+passwd=Парола:
+paste=&Залепи
+previous=На&зад
+print=&Печат
+protocol=Протокол
+providerNotConnected=Трябва да се свържете за да можете да комуникирате.
+quit=И&зход
+ready=Готов
+reason=Причина
+reconnectionLimitExceeded=Осъществихте няколко включвания и изключвания в прекалено кратък интервал от време. Потребител {0} е временно забранен на сървър {1} и ще трябва да изчака преди да се включи отново.
+refresh=Поднови
+registrationTimeout=Регистрацията е пресрочена:
+reject=&Отказ
+rememberPassword=Запомни паролата
+remove=&Премахни
+removeAccount=&Премахни акаунт
+removeAccountMessage=Сигурен ли сте, че искате да премахне този акаунт?
+removeContact=Премахни под&контакт
+removeGroup=Премахни &група
+rename=Пре&именувай
+renameContact=Пре&именувай контакт
+renameContactWizard=Въведете иново име за избрания контакт.
+renameGroup=Пре&именувай група
+renameGroupInfo=Въведете ново име за избраната група.
+request=&Молба
+requestAuthorization=&Молба за оторизиране
+requestAuthorizationInfo={0} не може да бъде добавен към списъка ви с контакта. {0} трябва да ви оторизира преди да бъде вкаран в списъка ви. Можля въведете молба по-долу.
+requestAuthReason=Текст към молбата
+requestAuthReasonEnter=Въведете текст към молбата
+responseAuthReasonEnter=Въведете текст към отговора
+rootGroup=Група корен
+save=&Запази
+search=&Търси
+searchForChatRooms=&Търси стаи за разговор
+searchForChatRoomsText=Използвайе бутона за да видите всички стаи от избрания сървър и с бутона Влез, изберете тази, в която искате да влезете.
+securityAuthorityRealm=Идентификация за сървър {0}.
+selectAccount=Изберете потребител
+selectAccountRegistration=Изберете един от асистентите в списъка по-долу за да можете да създадете акаунт.
+selectAccountRegWizardTitle=Изберете регистрация на акаунт
+selectGroup=Изберете група
+selectGroupWizard=Списъкът по-долу съдържа всички групи от вашата контакт листа. Изберете тази, в която искате да добавите новия контакт.
+selectGroupWizardTitle=Изберете група
+selectProvidersForChatRoom=Списъкът по-долу съдържа всички акаунти, които поддържат разговори с повече участници. Изберете този, в който желаете да създадете нова стая.
+selectProvidersWizard=Списъкът по-долу съдържа всички регистрирани акаунти. Изберете този, който желаете да ползвате за разговори с новия контакт.
+selectProvidersWizardTitle=Изберете акаунт(и)
+send=&Изпрати
+sendFile=Изпрати &файл
+selectContactSupportingInfo=Няма информация за този контакт.
+sendMessage=&Изпрати съобщение
+sendVia=Изпрати чрез:
+setStatusMessage=Настройка на статус съобщение
+settings=&Настройки
+showCallPanel=Покажи панела за обажданията
+showChannelsList=Покажи списъка със стаите
+showOfflineUsers=Показване/Скриване на изключените потребители
+sipCommunicator=СИП Комуникатор
+specifyReason=Моля въведете причина за тази операция.
+soundOnOff=Включване/Изключване на звука
+statusChangedChatMessage=премина в статус "{0}"
+statusChangeGeneralError=Грешка при смяната на статуца за потребител {0} на сървър {1}.
+statusChangeNetworkFailure=Грешка по мрежата при смяната на статуца за потребител {0} на сървър {1}.
+statusMessageInfo=Въведете новото съобщение, което желаете да ползвате.
+subject=Тема
+summary=Обобщение
+today=Днес
+tools=&Инструменти
+typeYourRequest=Въведете молбата си тук
+uin=Номер:
+unknown=Неизвестен потребител
+useCtrlEnterToSend=Изпращане с Ctrl-&Enter
+msgDeliveryFailedUnknownError=Възникна грешка по време на изпращането на вашето съобщение.
+unregisteredMessage=Грешка при свързването. Потребителят {0} не е включен на сървър {1}.
+updateAutomatically=Автоматично инсталиране на новости.
+updates=Новости
+userInfo=&Информация за потребител
+view=&Преглед
+viewHistory=Преглед на &историята
+warning=Предупреждение
+yes=Да
+yesterday=Вчера
+
+january=Ян
+february=Фев
+march=Мар
+april=Апр
+may=Май
+june=Юни
+july=Юли
+august=Авг
+september=Сеп
+october=Окт
+november=Нов
+december=Дек
+
+# systray
+
+
diff --git a/resources/languages/resources_de.properties b/resources/languages/resources_de.properties
new file mode 100644
index 0000000..07b93ea
--- /dev/null
+++ b/resources/languages/resources_de.properties
@@ -0,0 +1,416 @@
+# SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+#
+# Distributable under LGPL license.
+# See terms of license at gnu.org.
+
+# German translation
+# Author: Thomas Hofer
+about=&Über
+accept=&OK
+account=Benutzerkonto
+accountRegistrationWizard=Kontoverwaltung
+accounts=Benutzerkonten
+activateOnlyWhenMinimized=Nur aktivieren wenn minimiert
+add=&Hinzufügen
+addContact=Kontakt &hinzufügen
+addContactError=Kann Kontakt mit id {0} nicht hinzufügen
+addContactErrorTitle=Fehler beim Kontakthinzufügen
+addContactExistError=Der Kontakt {0} existierte bereits
+addContactIdentifier=Geben Sie die Informationen des Kontaktes, den Sie hinzufügen wollen, in das Feld unten ein
+addContactWizard=Kontakt hinzufügen...
+addGroupLocalError=Kann Gruppe "{0}" nicht hinzufügen. Das Problem ist bei einer lokalen Lese/Schreiboperation aufgetreten. (Festplatte voll? Fehlende Rechte?)
+addGroupNetError=Kann Gruppe "{0}" nicht hinzufügen. Überprüfen Sie Ihre Netzwerkverbindung und versuchen Sie es erneut.
+addGroupError=Kann Gruppe "{0}" nicht hinzufügen.
+addGroupErrorTitle=Fehler beim "Gruppe hinzufügen"
+addGroupExistError=Die Gruppe "{0}" existiert bereits in Ihrer Kontaktliste
+addSubcontact=&Unterkontakt hinzügen
+all=&Alle
+allContacts=&Alle Kontakte
+alwaysOnTop=immer im Vordergrund
+appearance=Ansicht
+application=Anwendung
+apply=&Anwenden
+at=at
+authAccepted=Der Kontakt hat die Authorisierungsanfrage akzeptiert.
+authenticationWindowTitle=Authorisierungsanfrage
+authRejected=Der Kontakt hat die Authorisierungsanfrage zurückgewiesen.
+authorizationRequested=Authorisierung angefragt
+authorizationRequestedInfo=Der {0} Kontakt erbittet Ihre Authorisierung
+authenticationFailed=Folgenes Konto konnte nicht verbunden werden: Benutzername: {0}, Servername: {1}. Das Passwort ist ungültig.
+authorizationResponse=Authorisierungsantwort
+autoPopup=Bringe das Fenster nach vorne
+awayStatus=Abwesend
+back=&Zurück
+ban=&Verbannen
+banFailed=Verbannung nicht erfolgreich.
+banFailedGeneralError=Verbannung von {0} nicht erfolgreich. Es ist ein Fehler am Server aufgetreten.
+banFailedNotAllowed=Verbannung von {0} nicht erfolgreich. Der Ersteller und der Administrator des Raumens können nicht verbannt werden.
+banFailedNotEnoughPermissions=Verbannung von {0} nicht erfolgreich. Sie haben nicht die erforderlichen Rechte.
+brbMessage=Ich komme gleich wieder.
+busyMessage=Ich bin gerade beschäftigt.
+call=Anrufen
+callVia=Anrufen über:
+callList=Gesprächsliste
+cancel=&Abbrechen
+chatRoomAlreadyJoined=Sie nehmen bereits an der Gesprächsrunde {0} teil.
+chatRoomConfiguration=Konfiguration der Gesprächsrunde {0}
+chatRoomOpenConfigFailed=Konnte die Konfiguration der Gesprächsrunde {0} nicht starten.
+chatRoomOpenConfigForbidden=onnte die Konfiguration der Gesprächsrunde {0} nicht starten. Nur deren Administratoren dürfen diese Einstellungen sehen und ändern.
+chatRoomConfigFormSubmitFailed=Beim speichern der geänderteten Konfiguration der Gesprächsrunde {0} ist ein fehler aufgetreten.
+chatRoomUserJoined=ist hereingekommen {0}
+chatRoomUserLeft=ist gegangen {0}
+chatRoomUserKicked=ist von {0} hinausgeschmissen worde
+chatRoomUserQuit=hat uns verlassen {0}
+chatRoomName=Name der Gesprächsrunde
+chatRoomNameInfo=Geben Sie den Namen der Gesprächsrunde ein, die Sie erstellen wollen.
+chatRoomNotExist=Die Runde {0} konne nicht am Server {1} gefunden werden. Bitte überprüfen Sie die Eingabe.
+chatRoomNotConnected=Sie müssen verbunden sein, bevor sie der Gesprächsrunde {0} beitreten können.
+chatRoomNotJoined=Sie müssen der Gesprächsrunde beigetreten sein, bevor Sie weitere Operationen damit ausführen können.
+chatRoomOptions=Einstellungen der Gesprächsrunde
+chatRoomRegistrationRequired=Die Gesprächsrunde {0} verlangt eine Registrierung zum Beitritt.
+chatRoomRequiresPassword=Die Gesprächsrunde {0} benötigt ein Passwort.
+chatRooms=Gesprächsrunden
+chatRoomSubjectChanged={0} hat das Thema auf {1} geändert
+close=&Schließen
+closeChatAfterNewMsg=Sie haben gerade eine Nachricht erhalten. Sind Sie sicher, dass Sie die Gesprächsrunde verlassen wollen?
+conference=Konferenz
+configure=&Konfigurieren
+configuration=Konfiguration
+connectionFailed=Verbindung fehlgeschlagen
+connectionFailedMessage=Verbindung für das folgende Konto fehlgeschlagen: Benutzername: {0}, Servername: {1}.
+connectionExpiredMessage=Sie sind nicht zum Server {0} verbunden
+contactAddress=Kontaktadresse
+contactNotSupportingTelephony=Der gewählte {0} Kontakt unterstützt keine Telefonie.
+contactPausedTyping={0} unterbricht das Tippen
+contactTyping={0} tippt eine Nachricht
+contactTypingStateStale=Tipp-Information nicht aktuell
+contactInfo=&Kontaktinformation
+contacts=Kontakte
+continue=&Weiter
+copy=&Kopieren
+copyLink=Kopiere &Link
+create=E&rzeuge
+createChatRoom=&Gesprächsrunde anlegen
+createChatRoomNotSupported=Konnte Gesprächsrunde mit dem Namen {0} nicht anlegen. Der Server {1} untstützt dies nicht.
+createChatRoomError=Konnte Gesprächsrunde mit dem Namen {0} nicht anlegen.
+createChatRoomWizard=Lege Gesprächsrunde an.
+createGroup=G&ruppe anlegen
+createGroupName=Bitte geben Sie den Namen der zu erstellenden Gruppe ein.
+createFirstGroupWizard=Deine Kontaktliste enthält keine Gruppe. Bitte lege zuerst eine Gruppe an (Datei/Gruppe erstellen).
+cut=&Ausschneiden
+date=Datum
+description=Beschreibung
+dial=&Wähle
+dialpad=Wähltastatur
+dndStatus=Bitte nicht stören.
+doNotAskAgain=Nicht mehr fragen
+doNotShowAgain=Diese Nachricht nicht mehr anzeigen.
+dontSupportWebInfo=Dieser Kontakt unterstützt keine Web-Information
+duration=Dauer
+edit=&Ändern
+emptyHistory=&Leere Protokoll
+enableNotifications=Aktiviere Meldungen
+enableTypingNotifications=Aktiviere Schreib-Notifizierung
+error=Fehler
+exit=B&eenden
+extendedCriteria=Erweitere die Kriterien
+general=Allgemein
+generalError=Algemeiner Fehler
+group=Gruppe
+groupName=Name der Gruppe
+failedToCreateChatRoom=Konnte Gesprächsrunde mit dem Namen {0} nicht anlegen.
+failedToJoinChatRoom=Konnte der Gesprächsrunde mit dem Namen {0} nicht beitreten.
+ffcStatus=Für Chats verfügbar
+file=&Datei
+findChatRoomError=Konnte Gesprächsrunde mit dem Namen {0} nicht finden.
+finish=&Fertig
+first=Erster
+font=Schriftart
+haveToBeConnectedToJoin=Sie müssen verbunden sein, um einer Gesprächsrunde beizutreten. Bitte verbinden Sie sich und versuchen Sie es erneut.
+haveToBeConnectedToLeave=Sie müssen verbunden sein, um eine Gesprächsrunde zu verlassen.
+help=?
+hideOffline=Ausblenden
+hideOfflineContacts=Inaktive Kontakte ausblenden
+hideCallPanel=&Verstecke Wähltastatur
+hideMainWindow=Ein Klick auf das X schließt die Applikation nicht, sondern minimiert sie nur. Wenn Sie beenden wollen, wählen Sie Datei/Beenden aus dem Menü.
+history=&Protokoll
+historyContact=Protokoll - {0}
+hour=Stunde
+identifier=Identifier
+ignore=&Ignorieren
+info=Info
+insertSmiley=Smiley einfügen
+invalidCall=Ungültiger Anruf
+invitation=Einladungstext
+invitationReceived=Einladung erhalten
+invitationReceivedFormInfo={0} hat Sie zur Gesprächsrunde {0} eingeladen. Sie können der Einladung folgen, diese ignorieren oder zurückweisen.
+invite=&Einladen
+inviteContactFormInfo=Geben Sie den Namen des Benutzers ein, den Sie einladen wollen. Sie können weiters einen Grund für die Einladung eingeben.
+inviteContactToChat=Kontakt zu einer Gesprächsrunde einladen.
+join=&Teilnehmen
+joinAs=T&eilnemen als
+joinChatRoom=&Teilnehmen an der Runde...
+joinChatRoomTitle=Teilnehmen an einer Gesprächsrunde
+joinChatRoomName=Bitte geben Sie den Namen der Gesprächsrunde ein, an der Sie teilnehmen wollen.
+joinChatRoomWizard=Trete dem Chat-Raum bei
+kick=&Hinauswerfen
+kickFailed=Hinauswurf gescheitert.
+kickFailedGeneralError=Hinauswurf von {0} gescheitert. Ein allgemeiner Fehler am Server ist aufgetreten
+kickFailedNotAllowed=Hinauswurf von {0} gescheitert. Der Eigentümer und der Administrator des Raumes können nicht hinausgeworfen werden.
+kickFailedNotEnoughPermissions=Hinauswurf von {0} gescheitert. Sie haben dazu keine Rechte.
+last=Letzter
+launchBrowserError=Fehler beim Start des Webbrowsers.
+launchOnStartUp=Ausführen beim Starten
+leave=&Verlassen
+limitReachedForIp=Sie haben schon zu viele Verbindungen von Ihrer IP-Addresse und der Server {0} erlaubt keine weiteren.
+login=&Anmelden
+loginNotSucceeded=Bei der Anmeldung mit dem Konto {0} am Server {1} ist ein Fehler aufgetreten.
+loginGeneralError=Ein Fehler ist beim Anmelden aufgetreten: User name: {0}, Server name: {1}.
+loginInternalError=Ein Fehler ist beim Anmelden aufgetreten: User name: {0}, Server name: {1}. Dies ist wahrscheinlich ein Fehler in der Anwendung. Bitte senden Sie diesen Fehler an issues@sip-communicator.dev.java.net.
+loginInvalidPropsError=Ein Fehler ist beim Anmelden aufgetreten: User name: {0}, Server name: {1}. Es ist ein Konfigurationsfehler aufgetreten, überprüfen Sie bitte Ihre Einstellungen.
+loginWindowTitle=Anmelden {0}
+logoffNotSucceeded=Bei der Abmeldung mit dem Konto {0} vom Server {1} ist ein Fehler aufgetreten.
+me=mich
+modify=&Ändern
+moveSubcontactMsg=Wählen Sie den Kontakt aus, den Sie verschieben wollen.
+moveSubcontact=&Verschiebe Unterkontakt.
+moveSubcontactInSameContact=Der Zielkontakt ist der selbe wie der Ausgangskontakt. Wählen Sie einen anderen aus!
+moveSubcontactQuestion=<DIV>Sind Sie sicher, dass sie <B> {0} </B> in <B> {1} </B> verschieben wollen?</DIV>
+moveToGroup=&Verschiebe in Gruppe
+moveContactError=&Kontakt kann nicht verschoben werden
+msgDeliveryFailure=Diese Nachricht konnte nicht zugestellt werden.
+msgDeliveryOfflineNotSupported=Das verwendetet Protokoll kann Nachrichten nur zustellen, wenn Benutzer online sind. Warten Sie darauf, oder verwenden Sie ein anderes Protokoll.
+msgDeliveryInternalError=Ein interner Fehler ist aufgetreten. Dies ist wahrscheinlich ein Bug. Bitte melden Sie ihn unter http://www.sip-communicator.org/index.php/Development/BugsAndIssues
+msgNotDelivered=Ein Netzwerkproblem ist aufgetreten.
+msgReceived={0} hat Ihnen eine Nachricht gesendet.
+msgSendConnectionProblem=Sie sollen verbunden sein, um Nachrichten zu senden.
+multipleLogins=Sie sind mehrfach mit dem selben Konto verbunden. Das Konto User name: {0}, Server name: {1} ist derzeit nicht verbunden.
+name=Name
+networkFailure=Netzwerkfehler
+next=&Weiter
+new=&Neu
+newAccount=&Neues Konto
+newMessage=New message...
+newName=Neuer Name:
+newStatusMessage=Neue Statusinformation
+no=Nein
+noAccountFound=Um dieses Programm zu verwenden, sollten Sie mindestens ein Konto erstellen. Die folgenden Seiten werden Sie unterstützen, ein Konto zu erstellen.
+noAvailableRooms=Die Raumliste für diesen Server ist gerade nicht verfügbar.
+noMessage=Keine Nachricht
+noMultiChatAccountAvailable=Keine Konten, die Mehrbenutzerchats unterstützen, gefunden. Sehen Sie auf sip-communicator.org für mehr Information, welche Protokolle Mehrbenutzerchats unterstützen.
+nonEmptyChatWindowClose=Sie versuchen, ein Fenster mit einer ungesendeten Nachricht zu schließen. Sind Sie sicher?
+nonExistingUserId=Der {0} Server kennt das Konto nicht.
+notifications=Nachrichten
+ok=&OK
+offline=Nicht Verbunden
+olderCalls=Ältere Anrufe
+online=Verbunden
+openInBrowser=Im &Brower öffnen
+options=Optionen
+passwd=Passwort:
+paste=&Einfügen
+previous=Voriges
+print=&Drucken
+protocol=Protokoll
+providerNotConnected=Sie müssen online sein, um zu kommunizieren.
+quit=&Beenden
+ready=Bereit
+reason=Grund
+reconnectionLimitExceeded=Sie haben sich zu oft getrennt und neu verbunden. Das Konto User name: {0}, Server name: {1} ist zur Zeit verbannt. Bitte versuchen Sie es in ein paar Minuten erneut.
+refresh=Aktualisieren
+registrationTimeout=Registration timeout:
+reject=&Zurückweisen
+rememberPassword=Passwort merken
+remove=&Löschen
+removeAccount=&Konto löschen
+removeAccountMessage=Sind Sie sicher, dass Sie den Kontakt löschen wollen?
+removeContact=&Lösche Kontakt
+removeContactText=<DIV>Sind Sie sicher, dass Sie <B> {0} </B><BR>entfernen wollen?</DIV>
+removeGroup=&Lösche Gruppe
+rename=&Umbenennen
+renameContact=Kontakt umbenennen
+renameContactWizard=Bitte geben Sie den Namen für den Kontakt ein.
+renameGroup=Gruppe umbenenne
+renameGroupInfo=Bitte geben Sie den Namen für die Gruppe ein.
+request=&Anforderung
+requestAuthorization=&Authorisierungsanforderung
+requestAuthorizationInfo=Kann {0} nicht zur Liste der Kontakte hinzufügen. {0} muss Sie vorher dazu autorisieren. Bitte geben Sie ihre Bitte dazu ein.
+requestAuthReason=Grund der Anfrage
+requestAuthReasonEnter=Geben Sie den Grund der Anforderung ein
+responseAuthReasonEnter=Geben Sie den Grund der Antwort ein
+rootGroup=Hauptgruppe
+save=&Speichern
+search=&Suche
+searchForChatRooms=&Suche Gesprächsrunden.
+searchForChatRoomsText=Klicken Sie den Knopf, um alle Gesprächsrunden auf dem ausgewählten Server anzuzeigen. Wählen Sien dann eine aus und treten Sie ihr bei.
+securityAuthorityRealm=Der {0} Server benötigt Ihre Zugangsdaten.
+selectAccount=Konto auswählen
+selectAccountRegistration=Um ein neues Konto zu erstellen, wählen Sie ein Protokoll aus der Liste aus.
+selectAccountRegWizardTitle=Konto erstellen
+selectGroup=Wähle Gruppe
+selectGroupWizard=Die unten angeführte Liste enthält Ihre Gruppen der Kontaktliste. Wählen Sie diejenige aus, zu der Sie den Kontakt hinzufügen wollen.
+selectGroupWizardTitle=Wähle Gruppe
+selectProvidersForChatRoom=Die unten angeführte List zeigt alle Konten, die Gesprächsrunden unterstützen. Wählen Sie aus und erstellen Sie eine Gesprächsrunde.
+selectProvidersWizard=Die unten angeführte Liste enthält Ihre registrierten Benutzerkonten. Wählen Sie eines oder mehrere aus, über welche Sie mit dem neuen Kontakt kommunizieren wollen.
+selectProvidersWizardTitle=Wähle Konto
+send=&Senden
+sendFile=Datei S&enden
+selectContactSupportingInfo=Für diesen Kontakt ist keine Information verfügbar
+sendMessage=Nachricht &Senden
+sendAsSms=SMS Versenden
+sendSms=SMS vers&enden
+sendSmsNotSupported=Das ausgewählte Protokoll unterstützt den Versand vom SMS nicht.
+sendVia=Senden via
+setStatusMessage=Statusinformation setzen
+settings=&Einstellungen
+showCallPanel=Zeige Telefonfeld
+showChannelsList=Zeige Kanalliste
+showOfflineUsers=Verstecke/Zeige Benutzer, die offline sind.
+specifyReason=Geben Sie den Grund für diese Operation ein.
+smiley=Smiley
+specifyReason=In diesem Feld können Sie eine Begründung für die Aktion eingeben.
+sound=Ton
+soundOnOff=Ton ein/aus
+statusChangedChatMessage=ist nun {0}
+statusChangeGeneralError=Konnte Status nicht ändern. Benutzername: {0}, Servername: {1}. Ein allgemeiner Fehler ist aufgetreten.
+statusChangeNetworkFailure=Konnte Status nicht ändern. Benutzername: {0}, Servername: {1}. Ein Netzwerkfehler ist aufgetreten.
+statusMessageInfo=In the field below you can specify the new message you would like to use.
+subject=Betreff
+summary=Zusammenfassung
+today=Heute
+tools=&Werkzeuge
+typeYourRequest=Schreiben Sie Ihre Anfrage hier
+uin=User identifier:
+unknown=Benutzer unbekannt
+useCtrlEnterToSend=Benutze Ctrl-&Enter zum senden
+msgDeliveryFailedUnknownError=Unbekannter Fehler beim Zustellen der Nachricht.
+unregisteredMessage=Fehler beim Verbinden über das folgende Konto: Benutzername: {0}, Servername: {1}. Sie sind nicht verbunden.
+updateAutomatically=Installiere Updates automatisch
+updates=Updates
+view=&Ansicht
+viewHistory=Zeige &Verlauf/Geschichte
+warning=Warnung
+yes=Ja
+yesterday=Gestern
+
+january=Jan
+february=Feb
+march=Mär
+april=Apr
+may=Mai
+june=Jun
+july=Jul
+august=Aug
+september=Sep
+october=Okt
+november=Nov
+december=Dez
+# Author: Thomas Hofer
+trayIcon=resources/images/impl/systray/systrayIcon.png
+trayIconWindows=resources/images/impl/systray/systrayIconWindows.png
+trayIconMacOSX=resources/images/impl/systray/systrayIconMacOSX.png
+trayIconMacOSXWhite=resources/images/impl/systray/systrayIconMacOSXWhite.png
+addContactIcon=resources/images/impl/gui/buttons/addContactIcon.png
+statusMenuIcon=resources/images/impl/systray/statusIcon.png
+settingsMenuIcon=resources/images/impl/gui/buttons/configureIcon.png
+closeMenuIcon=resources/images/impl/systray/quit.png
+messageIcon=resources/images/impl/systray/envelope.png
+messageIconWindows=resources/images/impl/systray/envelopeWindows.png
+messageIconMacOSX=resources/images/impl/systray/envelopeMacOSX.png
+messageIconMacOSXWhite=resources/images/impl/systray/envelopeMacOSXWhite.png
+newStatusMessageIcon=resources/images/impl/gui/common/renameDialogIcon.png
+settings=Einstellungen...
+addContact=Kontakt hinzufügen...
+setStatus=Status
+close=Schließen
+onlineStatus=Online
+offlineStatus=Offline
+messageReceived=Nachricht erhalten von
+failedToLoadAddContactDialog=Der "Kontakt hinzufügen"-Dialog konnte nicht gestartet werden.
+setStatusMessage=Setze Statusnachricht
+newStatusMessage=Neue Statusnachricht
+statusMessageInfo=Im Eingabefeld können Sie die neue Statusnachricht angeben.
+noMessage=Keine Nachricht.
+newMessage=Neue Nachricht...
+brbMessage=Ich bin gerade nicht da, komme aber wieder.
+ok=&Ok
+
+# branding
+aboutWindowTitle=Über {0}
+logoMessage=Open Source VoIP & Instant Messaging
+loading=Lade
+aboutMenuEntry=Über
+ok=OK
+basedOn=basierend auf
+welcomeMessage=<DIV color={0}>{1} ist derzeit in Entwicklung. \
+ Diese Version dient nur zum Experimentieren und wird sich \
+ möglicherweise nicht so verhalten, wie es zu erwarten ist. \
+ Weitere Informationen sind unter {2} verfügbar.</DIV>
+copyright=<DIV><font size=3 color={0}>(c)2003-2007 Copyright \
+ <b>sip-communicator.org</b>. All rights reserved. Visit \
+ <a href="http://sip-communicator.org">http://sip-communicator.org</a>.\
+ </font></DIV>
+license=<DIV color={0}>The <b>SIP Communicator</b> is distributed under \
+ the terms of the LGPL (<a href=\"http://www.gnu.org\">\
+ http://www.gnu.org</a>).</DIV>
+
+# contact info
+contactDetails=Kontaktdetails
+selectUser=Benutzer auswählen
+summary=Überblick
+contactSummaryDesc=Kontaktüberblick für
+extended=Erweitert
+contactExtendedDesc=Erweiterte Informationen für
+contactInfoNotSupported=Dieses Protokoll unterstützt derzeit keine Internet-Informationen. Wählen Sie ein anderes Protokoll.
+clickWeb=Klicken für die Web-Info
+webInfo=Web Info
+firstNameNS=Vorname:
+middleNameNS=Zweiter Name:
+lastNameNS=Nachname:
+ageNS=Alter:
+bdayNS=Geburtsdatum:
+genderNS=Geschlecht:
+emailNS=E-mail:
+phoneNS=Telefon:
+userPictures=Bilder
+notSpecified=[Not specified]
+
+# icq accregwizz
+protocolName=ICQ
+protocolDescription=Das AOL/ICQ-Protokoll
+uin=ICQ UIN:
+password=Passwort:
+rememberPassword=Speichere Passwort
+uinAndPassword=UIN und Passwort
+registerNewAccount=Erstelle neues Benutzerkonto
+registerNewAccountText=Wenn Sie kein ICQ-Benutzerkonto haben, können Sie hier eines anlegen.
+existingAccount=* Dieses Benutzerkonto existiert bereits.
+ovverideServerOps=Überschreibe Voreinstellungen
+advancedOptions=Erweiterte Optionen
+proxy=Proxy
+proxyPort=Proxy port
+proxyType=Proxy type
+proxyUsername=Proxy username
+proxyPassword=Proxy password
+
+# plugin manager
+activate=Aktivieren
+desactivate=Deaktivieren
+install=Installieren
+uninstall=Deinstallieren
+update=Aktualisieren
+new=Neues Plug-in
+plugins=Plug-ins
+url=URL
+showSystemBundles=Zeige Systemkomponenten
+system=System
+
+# status update
+enable=Aktivieren
+info=Information
+infotext=Setze "Abwesend" als Status, wenn der Computer für X Minuten nicht verwendet wird. Der Status wird bei auf den vorangegangen Status zurückgesetzt, sobald der Computer wieder aktiv verwendet wird.
+menuEntry=Automatischer Status
+minutes=Minuten
+ok=OK
+
+
diff --git a/resources/languages/resources_fr.properties b/resources/languages/resources_fr.properties
new file mode 100644
index 0000000..3d2421f
--- /dev/null
+++ b/resources/languages/resources_fr.properties
@@ -0,0 +1,349 @@
+# SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+#
+# Distributable under LGPL license.
+# See terms of license at gnu.org.
+
+# Note to translators:
+# To translate SIP Communicator to your language
+# - copy messages.properties to messages_xx.properties
+# (where xx is the ISO 639-1 language code of your language)
+# - the file must use UTF-8 encoding
+# - all entries are of the form key=translation, where only the
+# translation part has to be changed
+# - {0}, {1}... are parameters which will be replaced by the
+# actual text at runtime, place them as you wish
+# - you don't have to translate all entries, if an entry is not
+# found in your translation, the text in messages.properties will
+# be used
+# - \ at the end of a line means that the translation is continued
+# in the next line
+#
+# To start SIP Communicator with a language that is different
+# from your system's language, pass the language code to ant:
+# ant -Duser.language=xx run
+#
+# The same rules apply to the properties files found in the other
+# directories.
+
+about=&A propos
+accept=&Accepter
+account=compte
+accountRegistrationWizard=Assistant d'enregistrement de compte
+accounts=Comptes
+activateOnlyWhenMinimized=Activer uniquement en mode réduit
+add=&Ajouter
+addContact=&Ajouter un contact
+addContactError=Échec lors de l'ajout du contact : {0}
+addContactErrorTitle=Échec lors de l'ajout d'un contact
+addContactExistError=Le contact {0} existe déjà dans votre liste de contact.
+addContactIdentifier=Dans le champ suivant, veuillez entrer l'identifiant du contact que vous souhaitez ajouter.
+addContactWizard=Assistant d'ajout de contact
+addGroupLocalError=Échec lors de l'ajout du groupe : {0}. Le problème est dû à un échec d'E/S lors d'une opération locale.
+addGroupNetError=Échec lors de l'ajout du groupe : {0}. Le problème est dû à un échec du réseau. Prière, de vérifier votre connection au réseau avant de réessayer.
+addGroupError=Échec lors de l'ajout du groupe : {0}.
+addGroupErrorTitle=Erreur lors de l'ajout de groupe
+addGroupExistError=Le groupe {0} existe déjà dans votre liste de contact.
+addSubcontact=&Ajouter un sous-contact
+all=&Tous
+allContacts=&Tous les contacts
+alwaysOnTop=Toujours au premier plan
+appearance=Apparence
+application=Application
+apply=&Effectuer
+at=arobase
+authAccepted=Le contact a accepté votre requête d'autorisation.
+authenticationWindowTitle=Demande d'authentification
+authRejected=Le contact a rejeté votre demande d'autorisation.
+authorizationRequested=Demande d'autorisation
+authorizationRequestedInfo=Le contact {0} demande votre autorisation.
+authenticationFailed=L'authentification a échouée pour le compte suivant : Nom d'utilisateur : {0}, Nom du serveur : {1}. Le mot de passe que vous avez fourni est incorrect.
+authorizationResponse=Réponse de demande d'autorisation
+autoPopup=Mettre la fenêtre au premier plan
+awayStatus=Absent
+back=&De retour
+ban=&Exclure
+banFailed=Échec lors de l'exclusion
+banFailedGeneralError=Erreur lors de l'exclusion {0}. Une erreur au niveau du serveur est survenue.
+banFailedNotAllowed=Erreur lors de l'exclusion {0}. Le propriétaire et l'administrateur du salon ne peuvent pas être exclu.
+banFailedNotEnoughPermissions=Erreur lors de l'exclusion {0}. Vous n'avez pas les droits suffisant pour cela.
+brbMessage=Je suis parti, mais je reviens tout de suite.
+busyMessage=Désolé, je suis très occupé.
+call=Appel
+callVia=Appel via:
+callList=Liste d'appels
+cancel=&Annuler
+chatRoomAlreadyJoined=Vous avez déjà rejoint le salon {0}.
+chatRoomConfiguration=Configuration du salon {0}
+chatRoomOpenConfigFailed=Échec lors de l'obtention de la configuration du salon {0}.
+chatRoomOpenConfigForbidden=Échec lors de l'obtention de la configuration du salon {0}. Seuls les administrateurs du salon peuvent voir et modifier la configuration.
+chatRoomConfigFormSubmitFailed=Erreur lors de la mise à jour de la configuration du salon {0}.
+chatRoomUserJoined=a rejoint {0}
+chatRoomUserLeft=est parti de {0}
+chatRoomUserKicked=a été banni de {0}
+chatRoomUserQuit=a quitté {0}
+chatRoomName=Nom du salon
+chatRoomNameInfo=Dans le champ suivant, veuillez entrer le nom du salon que vous souhaitez créer.
+chatRoomNotExist=Le salon {0} est introuvable sur le serveur {1}. Prière de vérifier la validité du nom que vous avez saisi.
+chatRoomNotConnected=Vous devez vous connecter pour rejoindre le salon {0}.
+chatRoomNotJoined=Vous devez d'abord rejoindre un salon pour effectuer cette opération.
+chatRoomOptions=Options du salon
+chatRoomRegistrationRequired=Vous devez être enregistré avant de pouvoir le rejoindre le salon {0}.
+chatRoomRequiresPassword=Le salon {0} nécessite un mot de passe.
+chatRooms=Salons
+chatRoomSubjectChanged={0} a changé le sujet à {1}
+close=F&ermer
+closeChatAfterNewMsg=Vous avez reçu un message il y a moins de 2 secondes. Êtes-vous sûr de vouloir fermer cette conversation ?
+conference=Conférence
+configure=&Configurer
+configuration=Configuration
+connectionFailed=Échec de connection
+connectionFailedMessage=Échec de connection pour le compte : Nom d'utilisateur : {0}, Nom du serveur : {1}.
+connectionExpiredMessage=Vous avez été déconnecte du serveur {0}.
+contactAddress=Adresse du contact
+contactNotSupportingTelephony=Le contact choisit {0} ne supporte pas la téléphonie.
+contactPausedTyping={0} s'est arrêté d'écrire le message
+contactTyping={0} est en train d'écrire un message
+contactTypingStateStale=L'état de la saisie ne peut pas être mise à jour
+contacts=Contacts
+continue=&Continuer
+copy=&Copier
+copyLink=Copier le l'&adresse
+create=C&réer
+createChatRoom=&Créer un salon...
+createChatRoomNotSupported=Échec lors de la création du salon : {0}. Le serveur {1} ne supporte pas cette opération.
+createChatRoomError=Échec lors de la création du salon : {0}.
+createChatRoomWizard=Assistant de création de salon
+createGroup=&Créer un groupe
+createGroupName=Veiller saisir dans le champ suivant le nom du groupe que vous désirer créer.
+createFirstGroupWizard=Votre liste de contacts ne contient aucun groupe. Prière de créer un groupe (Fichier/Créer groupe) en premier lieu.
+cut=C&ouper
+date=Date
+description=Description
+dial=&Composer
+dialpad=Clavier téléphonique
+dndStatus=Ne pas déranger
+doNotAskAgain=Ne plus redemander
+doNotShowAgain=Ne plus afficher ce message
+dontSupportWebInfo=Ce contact ne dispose pas d'informations sur le web.
+duration=Durée
+edit=&Éditer
+emptyHistory=&Vider l'historique
+enableNotifications=Activer les notifications
+enableTypingNotifications=Activer les notifications de &saisie.
+error=Erreur
+exit=Q&uitter
+extendedCriteria=Critères étendus
+general=Général
+generalError=Erreur générale
+group=Groupe
+groupName=Nom de groupe
+failedToCreateChatRoom=Échec lors de la création du salon : {0}.
+failedToJoinChatRoom=Échec, impossible de rejoindre le salon : {0}.
+ffcStatus=Disponible pour discuter
+file=&Fichier
+findChatRoomError=Échec pour trouver le salon "{0}".
+finish=&Terminer
+first=Premier
+font=Police
+haveToBeConnectedToJoin=Vous devez être connecté avant de pouvoir rejoindre un salon. Prière de vous connectez avant de réessayer.
+haveToBeConnectedToLeave=Vous devez être connecté pour pouvoir quitter un salon.
+help=?
+hideCallPanel=&Masquer la zone d'appels
+hideMainWindow=Cliquer sur le bouton X ne quittera pas l'application, mais la masquera seulement. Utilisez "Fichier/Quitter" si vous souhaitez quitter l'application.
+history=&Historique
+historyContact=Historique - {0}
+hour=Heure
+identifier=Identifiant
+ignore=&Ignorer
+insertSmiley=Insérer une émoticône
+invalidCall=Appel invalide
+invitation=Motif de l'invitation
+invitationReceived=Invitation reçue
+invitationReceivedFormInfo={0} vous a invité à rejoindre le salon {1}. Vous pouvez accepter, rejeter ou ignorer cette invitation.
+invite=&Inviter
+inviteContactFormInfo=Merci de renseigner le nom de l'utilisateur que vous souhaitez inviter. Si vous le souhaitez, vous pouvez également préciser le motif de cette invitation.
+inviteContactToChat=Inviter un contact à discuter
+join=&Rejoindre
+joinAs=Re&joindre comme
+joinChatRoom=Re&joindre le salon...
+joinChatRoomTitle=Rejoindre le salon
+joinChatRoomName=Prière d'entrer le nom du salon que vous souhaitez rejoindre.
+joinChatRoomWizard=Assistant pour rejoindre un salon
+kick=&Exclure
+kickFailed=Échec de la tentative d'exclusion
+kickFailedGeneralError=Échec de la tentative d'exclusion {0}. Une erreur au niveau du serveur est survenue.
+kickFailedNotAllowed=Échec de la tentative d'exclusion {0}. Le propriétaire et l'administrateur du salon ne peuvent être exclu.
+kickFailedNotEnoughPermissions=Échec de la tentative d'exclusion {0}. Vous n'avez pas assez de privilèges pour cela.
+last=Dernier
+launchBrowserError=Échec de la tentative de démarrage du navigateur web.
+launchOnStartUp=Lancer au démarrage
+leave=&Quitter
+limitReachedForIp=Votre adresse IP est déjà enregistrée de trop nombreuses fois et le serveur {0} ne permet pas d'en avoir plus.
+login=&Identifiant
+loginNotSucceeded=Une erreur est survenue pendant la connexion avec le compte suivant : Nom d'utilisateur : {0}, Nom du serveur : {1}.
+loginWindowTitle=Connexion à {0}
+logoffNotSucceeded=Une erreur est survenue lors de la déconnexion avec le compte suivant : Nom d'utilisateur : {0}, Nom du serveur : {1}.
+me=moi
+modify=&Modifier
+moveSubcontactMsg=Sélectionnez un contact où déplacer le contact choisi.
+moveSubcontact=D&éplacer le sous-contact
+moveSubcontactInSameContact=Le contact choisi est le même que celui que vous voulez déplacer.\n Prière de choisir un autre contact !
+moveToGroup=&Déplacer au sein du groupe
+moveContactError=Le &contact ne peut pas être déplacer
+msgDeliveryFailure=Le précédent message ne peut pas être délivré
+msgDeliveryOfflineNotSupported=Le protocole que vous utilisé ne supporte pas l'envoi de messages en mode "déconnecté". Vous pouvez essayer de joindre votre contact au moyen d'un autre protocole ou attendre jusqu'à ce qu'il ou elle soit "connecté(e)".
+msgDeliveryInternalError=Une erreur interne est survenue. Merci de reporter ce problème à l'adresse suivante : http://www.sip-communicator.org/index.php/Development/BugsAndIssues
+msgNotDelivered=Un problème au niveau du réseau est survenue.
+msgReceived={0} vous a envoyé un message
+msgSendConnectionProblem=Vous devez être connecté pour pouvoir envoyer des messages.
+multipleLogins=Vous vous êtes connecté plus d'une fois avec le compte suivant : Nom d'utilisateur : {0}, Nom du serveur : {1} est actuellement déconnecté.
+name=Nom
+networkFailure=Échec au niveau réseau
+next=&Suivant
+new=&Nouveau
+newAccount=&Nouveau compte
+newMessage=Nouveau message...
+newName=Nouveau nom :
+newStatusMessage=Nouveau message de statut
+no=Non
+noAccountFound=Pour utiliser SIP-Communicator, vous devez au moins configurer un compte. Les pages suivantes vous guiderons pour en configurer un.
+noAvailableRooms=La liste des salons de ce serveur n'est pas accessible pour le moment.
+noMessage=Aucun message
+noMultiChatAccountAvailable=Aucun de vos comptes ne permet l'accès et l'utilisation de salon de discussion. Pour plus d'informations sur les protocoles supportant les salons de discussion, reportez vous à l'adresse suivante : sip-communicator.org.
+nonEmptyChatWindowClose=Vous venez de demander la fermeture d'une fenêtre de discussion avec un message non-envoyé. Étes-vous certain de vouloir fermer cette fenêtre ?
+nonExistingUserId=Le serveur {0} ne supporte pas l'identifiant de compte utilisé.
+notifications=Notifications
+ok=&Ok
+offline=Déconnecté
+olderCalls=Anciens appels
+online=Connecté
+openInBrowser=Ouvrir dans un n&avigateur
+options=Options
+passwd=Mot de passe :
+paste=&Coller
+previous=Précédent
+print=&Imprimer
+protocol=Protocole
+providerNotConnected=Vous devez être connecté pour pouvoir communiquer.
+quit=&Quitter
+ready=Prêt
+reason=Raison
+reconnectionLimitExceeded=Vous vous êtes déconnecté et reconnecté trop rapidement au serveur. Le compte suivant: Nom d'utilisateur : {0}, Nom du serveur : {1} est temporairement banni et va devoir attendre encore un peu avant de réessayer de se reconnecter.
+refresh=Rafraîchir
+registrationTimeout=Expiration de l'enregistrement :
+reject=&Rejeter
+rememberPassword=Mémoriser le mot de passe
+remove=&Supprimer
+removeAccount=&Supprimer le compte
+removeAccountMessage=Êtes-vous certain de vouloir supprimer ce compte ?
+removeContact=&Supprimer le sous-contact
+removeContactText=<DIV>Êtes-vous certain de vouloir supprimer <b> {0} </b><br>de votre liste de contact?</DIV>
+removeGroup=&Supprimer le groupe
+rename=&Renommer
+renameContact=Re&nnomer le contact
+renameContactWizard=Dans le champ suivant, vous pouvez saisir le nom de contact que vous souhaitez utiliser.
+renameGroup=Re&nnomer le groupe
+renameGroupInfo=Dans le champ suivant, vous pouvez saisir le nom de groupe que vous souhaitez utiliser.
+request=&Demander
+requestAuthorization=&Demande d'autorisation
+requestAuthorizationInfo=Impossible d'ajouter {0} à votre liste de contacts. {0} doit vous autoriser votre demande pour l'ajouter. Merci d'entrer votre demande ci-dessous.
+requestAuthReason=Raison de la demande
+requestAuthReasonEnter=Entrer la raison de votre demande
+responseAuthReasonEnter=Entrer la raison de votre réponse
+rootGroup=Racine du groupe
+save=&Sauvegarder
+search=&Rechercher
+searchForChatRooms=&Rechercher un salon
+searchForChatRoomsText=Cliquez sur le bouton ci-dessous pour afficher tous les salons existant du serveur sélectionné. Puis, choisissez celui que vous souhaitez rejoindre et cliquez le bouton "rejoindre".
+securityAuthorityRealm=Le serveur {0} a demandé votre autorisation.
+selectAccount=Choix d'un compte
+selectAccountRegistration=Dans la liste ci-dessous, choisissez un assistant de configuration pour créer un nouveau compte.
+selectAccountRegWizardTitle=Choisissez un enregistrement de compte
+selectGroup=Choisissez un groupe
+selectGroupWizard=La liste suivante contient tous les groupes de votre liste de contacts. Choisissez-en un, auquel vous souhaitez ajouter un nouveau contact.
+selectGroupWizardTitle=Spécifiez un groupe
+selectProvidersForChatRoom=La liste suivante contient tous les comptes qui permettent de participer à des salons de discussion. Choisissez celui que vous souhaitez utiliser pour créer un salon.
+selectProvidersWizard=La liste suivante contient tous les comptes enregistrés. Choisissez ceux que vous souhaitez utiliser pour communiquer avec de nouveaux contacts.
+selectProvidersWizardTitle=Choisir un/des compte(s)
+send=&Envoyer
+sendFile=Envoyer un &fichier
+selectContactSupportingInfo=Aucune information n'est disponible pour ce contact.
+sendMessage=&Envoyer un message
+sendAsSms=Envoyer tel un SMS
+sendSms=E&nvoyer un SMS
+sendSmsNotSupported=Le protocole que vous avez sélectionné ne permet pas l'envoi de SMS.
+sendVia=Envoyer via
+setStatusMessage=Définir le statut du message
+settings=&Paramètres
+showCallPanel=Afficher la zone d'appels
+showChannelsList=Afficher la liste des canaux
+showOfflineUsers=Masquer/Afficher les utilisateurs "déconnectés"
+specifyReason=Dans le champ suivant, vous pouvez saisir la raison de cette opération.
+soundOnOff=Activer/Désactiver le son
+statusChangedChatMessage=est devenu {0}
+statusChangeGeneralError=Échec lors du changement de statut pour le compte : Nom d'utilisateur : {0}, Nom du serveur : {1}.
+statusChangeNetworkFailure=Échec lors du changement de statut pour le compte : Nom d'utilisateur : {0}, Nom du serveur : {1}, survenue à cause d'un problème au niveau réseau.
+statusMessageInfo=Dans le champ suivant, vous pouvez saisir le nouveau message que vous souhaitez utiliser.
+subject=Sujet
+summary=Sommaire
+today=Aujourd'hui
+tools=&Outils
+typeYourRequest=Saisissez ici votre demande
+uin=Identificateur:
+unknown=Utilisateur inconnu
+useCtrlEnterToSend=Utilisez Ctrl-&Enter pour envoyer
+msgDeliveryFailedUnknownError=Une erreur inconnue est survenue pendant l'envoi de votre message.
+unregisteredMessage=Impossible de se connecter avec le compte : Nom d'utilisateur : {0}, Nom du serveur : {1}. Vous êtes actuellement "déconnecté".
+updateAutomatically=Installer les mises à jour automatiquement
+updates=Mises à jour
+userInfo=&Informations de l'utilisateur
+view=&Voir
+viewHistory=Voir l'&historique
+warning=Attention
+yes=Oui
+yesterday=Hier
+
+january=Jan
+february=Fev
+march=Mar
+april=Avr
+may=Mai
+june=Juin
+july=Juil
+august=Aoû
+september=Sep
+october=Oct
+november=Nov
+december=Dec
+
+#systray
+# Author: JD
+trayIcon=resources/images/impl/systray/systrayIcon.png
+trayIconWindows=resources/images/impl/systray/systrayIconWindows.png
+trayIconMacOSX=resources/images/impl/systray/systrayIconMacOSX.png
+trayIconMacOSXWhite=resources/images/impl/systray/systrayIconMacOSXWhite.png
+addContactIcon=resources/images/impl/gui/buttons/addContactIcon.png
+statusMenuIcon=resources/images/impl/systray/statusIcon.png
+settingsMenuIcon=resources/images/impl/gui/buttons/configureIcon.png
+closeMenuIcon=resources/images/impl/systray/quit.png
+messageIcon=resources/images/impl/systray/envelope.png
+messageIconWindows=resources/images/impl/systray/envelopeWindows.png
+messageIconMacOSX=resources/images/impl/systray/envelopeMacOSX.png
+messageIconMacOSXWhite=resources/images/impl/systray/envelopeMacOSXWhite.png
+newStatusMessageIcon=resources/images/impl/gui/common/renameDialogIcon.png
+settings=Paramêtres
+addContact=Ajouter un contact
+setStatus=Status
+close=Fermer
+onlineStatus=Disponible
+offlineStatus=Hors ligne
+messageReceived=Message recu
+failedToLoadAddContactDialog=Impossible de lancer l'assistant d'ajout de contact.
+setStatusMessage=Définir un message de status.
+newStatusMessage=Nouveau message de status.
+statusMessageInfo=Vous pouvez saisir ci-dessous le nouveau message que vous voulez utiliser.
+noMessage=Aucun Message.
+newMessage=Nouveau Message.
+busyMessage=Désolé, je suis occupé pour le moment.
+brbMessage=Je suis absent, je reviens dans un moment.
+
diff --git a/resources/languages/resources_it.properties b/resources/languages/resources_it.properties
new file mode 100644
index 0000000..cc13093
--- /dev/null
+++ b/resources/languages/resources_it.properties
@@ -0,0 +1,611 @@
+# SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+#
+# Distributable under LGPL license.
+# See terms of license at gnu.org.
+
+# Note to translators:
+# To translate SIP Communicator to your language
+# - copy messages.properties to messages_xx.properties
+# (where xx is the ISO 639-1 language code of your language)
+# - the file must use UTF-8 encoding
+# - all entries are of the form key=translation, where only the
+# translation part has to be changed
+# - {0}, {1}... are parameters which will be replaced by the
+# actual text at runtime, place them as you wish
+# - you don't have to translate all entries, if an entry is not
+# found in your translation, the text in messages.properties will
+# be used
+# - \ at the end of a line means that the translation is continued
+# in the next line
+#
+# To start SIP Communicator with a language that is different
+# from your system's language, pass the language code to ant:
+# ant -Duser.language=xx run
+#
+# The same rules apply to the properties files found in the other
+# directories.
+
+about=&About
+accept=&Accetta
+account=Account
+accountRegistrationWizard=Creazione guidata account
+accounts=Accounts
+activateOnlyWhenMinimized=Attiva solo quando minimizzato
+add=&Aggiungi
+addContact=&Aggiungi contatto
+addContactError=Errore durante la creazione del contatto. Codice: {0}
+addContactErrorTitle=Impossibile aggiungere il contatto
+addContactExistError=Il contatto {0} esiste gia`.
+addContactIdentifier=Inserisci l'identificativo del contatto che vuoi aggiugnere nel campo sottostante.
+addContactWizard=Creazione guidata contatto
+addGroupLocalError=Impossibile aggiungere il gruppo {0}. Errore durante operaizone I/O.
+addGroupNetError=Impossibile aggiungere il gruppo {0}. Errore di rete, verificare la connessione e riprovare.
+addGroupError=Impossibile aggiungere il gruppo {0}.
+addGroupErrorTitle=Impossibile creare il gruppo
+addGroupExistError=Il gruppo {0} esiste gia`.
+addSubcontact=&Aggiungi contatto annidato
+all=&Tutti
+allContacts=&Tutti i contatti
+alwaysOnTop=Sempre in primo piano
+appearance=Aspetto
+application=Applicazione
+apply=&Applica
+at=at
+authAccepted=il contatto ha accettato la tua richiesta di autorizzazione.
+authenticationWindowTitle=Richiesta di autorizzazione
+authRejected=il contatto ha rifiutato la tua richiesta di autorizzazione.
+authorizationRequested=Autorizzazione richiesta
+authorizationRequestedInfo=Il contatto {0} richiede la tua autorizzazione.
+authenticationFailed=Autenticazione fallita per il seguente account: Username: {0}, Server: {1}. Password non valida.
+authorizationResponse=Risposta di autorizzazione
+autoPopup=Porta la finestra in primo piano
+awayStatus=Away
+back=&Indietro
+ban=&Bandisci
+banFailed=Impossibile bandire
+banFailedGeneralError=Impossibile bandire {0}. Errore sul server.
+banFailedNotAllowed=Impossibile bandire {0}. Il proprietario e l'amministratore della stanza non possono essere banditi.
+banFailedNotEnoughPermissions=Impossibile bandire {0}. Non hai i privilegi per bandire.
+brbMessage=Sono momentaneamente assente, ma tornero`.
+busyMessage=Scusa, affaccendato
+call=Chiamata
+callVia=Chiama tramite:
+callList=Lista chiamate
+cancel=&Annulla
+chatRoomAlreadyJoined=Utente gia` presente nella stanza {0}.
+chatRoomConfiguration=Configurazione della stanza {0}
+chatRoomOpenConfigFailed=Impossibile ottenere la configurazione per la stanza {0}.
+chatRoomOpenConfigForbidden=Impossibile ottenere la configurazione per la stanza {0}. Solo gli amministratori possono accedere alle configurazioni.
+chatRoomConfigFormSubmitFailed=Impossibile cambiare le configurazioni nella stanza {0}.
+chatRoomUserJoined=entrato nella stanza {0}
+chatRoomUserLeft=uscito dalla stanza {0}
+chatRoomUserKicked=espulso dalla stanza {0}
+chatRoomUserQuit=uscito dalla stanza {0}
+chatRoomName=Nome della stanza
+chatRoomNameInfo=Inserisci il nome della nuova stanza nel campo sottostante.
+chatRoomNotExist=Impossibile trovare la stanza {0} sul server {1}. Verificare che il nome sia corretto.
+chatRoomNotConnected=Effettuare login per entrare nella stanza {0}.
+chatRoomNotJoined=Entrare nella stanza per effettuare ulteriori operazioni.
+chatRoomOptions=Opzioni della stanza
+chatRoomRegistrationRequired=L'accesso alla stanza {0} richiede registrazione
+chatRoomRequiresPassword=La stanza {0} richiede una password.
+chatRooms=Stanze
+chatRoomSubjectChanged={0} ha impostato il titolo a {1}
+close=Chiudi
+closeChatAfterNewMsg=Hai ricevuto un messaggio da meno di 2 secondi. Sei sicuro di volere chiudere?
+conference=Conferenza
+configure=&Configura
+configuration=Configurazione
+connectionFailed=Errore di connessione
+connectionFailedMessage=Impossibile connettere l'account: Username: {0}, Server: {1}.
+connectionExpiredMessage=Sei attualmente disconnesso dal server {0}.
+contactAddress=Contact address
+contactNotSupportingTelephony=Il contatto {0} non ha supporto telefonico.
+contactPausedTyping={0} ha interrotto la digitazione
+contactTyping={0} sta digitando
+contactTypingStateStale=stato di digitazione non aggiornato
+contacts=Contatti
+continue=&Continua
+copy=&Copia
+copyLink=Copia il link
+create=Crea
+createChatRoom=Crea stanza...
+createChatRoomNotSupported=Impossibile creare la stanza {0}. Il server {1} non supporta l'operazione
+createChatRoomError=Impossibile creare la stanza {0}.
+createChatRoomWizard=Creazione guidata stanza
+createGroup=&Crea gruppo
+createGroupName=Inserisci il nome del gruppo nel campo sottostante.
+createFirstGroupWizard=La rubrica non contiene alcun gruppo. Creare prima un gruppo (File/Crea gruppo).
+cut=Taglia
+date=Data
+description=Descrizione
+dial=&Chiama
+dialpad=Tastiera
+dndStatus=Non disturbare
+doNotAskAgain=Non chiedere in futuro
+doNotShowAgain=Non mostrare il messaggio in futuro
+dontSupportWebInfo=Questo contatto non supporta web info
+duration=Durata
+edit=&Modifica
+emptyHistory=&Storia vuota
+enableNotifications=Abilita notifiche
+enableTypingNotifications=Abilita notifiche digitazione
+error=Errore
+exit=Esci
+extendedCriteria=Criteri avanzati
+general=Generale
+generalError=Errore generico
+group=Gruppo
+groupName=Nome gruppo
+failedToCreateChatRoom=Impossibile creare la stanza {0}.
+failedToJoinChatRoom=Impossibile entrare nella stanza {0}.
+ffcStatus=Disponibile
+file=&File
+findChatRoomError=Impossibile trovare la stanza {0}.
+finish=&Termina
+first=Primo
+font=Font
+haveToBeConnectedToJoin=Impossibile entrare nella stanza senza essere connesso. Esegui la connessione e riprova.
+haveToBeConnectedToLeave=Impossibile uscire dalla stanza senza essere connesso.
+help=?
+hideCallPanel=&Nascondi pannello chiamata
+hideMainWindow=La pressione del bottone X non chiude l'applicazione, ma la nasconde solamente. Se vuoi chiudere l'applicazione seleziona File/Esci.
+history=&Storia
+historyContact=Storia - {0}
+hour=Ora
+identifier=Identificativo
+ignore=&Ignora
+insertSmiley=Inserisci smiley
+invalidCall=Chiamata non valida
+invitation=Testo per l'invito
+invitationReceived=Invito ricevuto
+invitationReceivedFormInfo={0} ti ha invitato ad entrare nella stanza {1}. Puoi accettare, rifiutare o ignorare tale invito.
+invite=&Invita
+inviteContactFormInfo=Inserisci il nome dell'utente che vuoi invitare. Puoi anche aggiungere una motivazione a questo invito.
+inviteContactToChat=Invita il contatto in chat
+join=&Entra
+joinAs=Entra come
+joinChatRoom=Entra in una stanza...
+joinChatRoomTitle=Entra in una stanza
+joinChatRoomName=Inserisci il nome della stanza in cui vuoi entrare.
+joinChatRoomWizard=Entrata guidata in una stanza
+kick=&Espelli
+kickFailed=Espulsione fallita
+kickFailedGeneralError=Impossibile espellere {0}. Errore sul server.
+kickFailedNotAllowed=Impossibile espellere {0}. Il proprietario e l'amministratore della stanza non possono essere espulsi.
+kickFailedNotEnoughPermissions=Impossibile espellere {0}. Non hai i privilegi per espellere.
+last=Ultimo
+launchBrowserError=Impossibile lanciare il browser web.
+launchOnStartUp=Lancia all'avvio
+leave=&Esci
+limitReachedForIp=Limite registrazioni per il tuo indirizzo IP raggiunto sul server.
+login=&Login
+loginNotSucceeded=Impossibile effettuare login per il seguente account: Username: {0}, Server: {1}.
+loginWindowTitle=Login {0}
+logoffNotSucceeded=Impossibile effettuare logout per il seguente account: Username: {0}, Server: {1}.
+me=me
+modify=&Modifica
+moveSubcontactMsg=Seleziona il contatto destinazione.
+moveSubcontact=Sposta contatto annidato
+moveSubcontactInSameContact=Il contatto selezionato concide con quello da spostare. Seleziona un altro contatto.
+moveToGroup=&Sposta nel gruppo
+msgDeliveryFailure=Impossibile consegnare il messaggio
+msgDeliveryOfflineNotSupported=Il protocollo che stai utilizzando non supporta i messaggi offline. Puoi raggiungere questo contatto attraverso un altro account o quando verra` raggiungibile.
+msgDeliveryInternalError=Errore irrimediabile. Questo e` quasi sicuramente un bug, che puoi riportare a: http://www.sip-communicator.org/index.php/Development/BugsAndIssues
+msgNotDelivered=Errore di rete.
+msgReceived=Messaggio ricevuto da {0}
+msgSendConnectionProblem=Effettuare la connessione prima di inviare messaggi.
+multipleLogins=Impossibile effettuare login multipli dal seguente account: Username: {0}, Server: {1}.
+name=Nome
+networkFailure=Errore di rete
+next=&Successivo
+new=&Nuovo
+newAccount=&Nuovo acccount
+newMessage=Nuovo messaggio...
+newName=Nuovo nome:
+newStatusMessage=Nuovo messaggio di stato
+no=No
+noAccountFound=Per utilizzare SIP-Communicator e` necessario avere almeno un account registrato. Le pagine seguenti ti guideranno attraverso il processo di creazione di un account.
+noAvailableRooms=La lista di stanze per questo server non e` attualmente disponibile.
+noMessage=Nessun messaggio
+noMultiChatAccountAvailable=Nessun account supporta chat multiutente. Cerca su sip-communicator.org ulteriori informazioni sui protocolli supportati.
+nonEmptyChatWindowClose=Stai per chiudere una chat con un messaggio non inviato. Sei sicuro di volere chiudere?
+nonExistingUserId=Il server {0} non riconosce l'identificativo specificato.
+notifications=Notifiche
+ok=&Ok
+offline=Offline
+olderCalls=Chiamate precedenti
+online=Online
+openInBrowser=Apri in un web browser
+options=Opzioni
+passwd=Password:
+paste=&Incolla
+previous=Precedente
+print=&Stampa
+protocol=Protocollo
+providerNotConnected=E` necessario effettuare la connessione per potere comunicare.
+quit=&Esci
+ready=Pronto
+reason=Motivo
+reconnectionLimitExceeded=Ti sei disconnesso e riconnesso al server troppo velocemente. L'account: Username: {0}, Server: {1} e` stato disconnesso e temporaneamente bandito.
+refresh=Aggiorna
+registrationTimeout=Registrazione scaduta:
+reject=&Rifiuta
+rememberPassword=Ricorda password
+remove=&Rimuovi
+removeAccount=&Rimuovi account
+removeAccountMessage=Sei sicuro di volere rimuovere l'account?
+removeContact=&Rimuovi contatto annidato
+removeGroup=&Rimuovi gruppo
+rename=&Rinomina
+renameContact=Rinomina contatto
+renameContactWizard=Inserire il nome da utilizzare per il contatto nel campo sottostante.
+renameGroup=Rinomina gruppo
+renameGroupInfo=Inserire il nome da utilizzare per il gruppo nel campo sottostante.
+request=&Richiesta
+requestAuthorization=&Richiesta di autorizzazione
+requestAuthorizationInfo=Impossibile inserire {0} in rubrica senza autorizzazione. Inserisci un messaggio di richiesta nel campo sottostante.
+requestAuthReason=Motivo della richiesta
+requestAuthReasonEnter=Inserisci il motivo della richiesta
+responseAuthReasonEnter=Inserisci il motivo della risposta
+rootGroup=Gruppo root
+save=&Salva
+search=&Cerca
+searchForChatRooms=&Cerca stanze
+searchForChatRoomsText=Clicca il bottone sottostante per mostrare tutte le stanze disponibili nel server selezionato. Seleziona la stanza in cui intendi entrare e premi il bottone entra.
+securityAuthorityRealm=Il server {0} ha richiesto l'autenticazione.
+selectAccount=Seleziona account
+selectAccountRegistration=Seleziona la creazione guidata da utilizzare per creare il nuovo account.
+selectAccountRegWizardTitle=Seleziona una registrazione account
+selectGroup=Seleziona un gruppo
+selectGroupWizard=La lista sottostante contiene tutti i gruppi presenti nella tua rubrica. Seleziona quello in cui vuoi inserire il nuovo contatto.
+selectGroupWizardTitle=Specifica un gruppo
+selectProvidersForChatRoom=La lista sottostante contiene tutti gli account che supportano chat multiutente. Seleziona quella che vuoi utilizzare per creare la nuova stanza.
+selectProvidersWizard=La lista sottostante contiene tutti gli account registrati. Seleziona quelli che vuoi utilizzare per comunicare con il nuovo contatto.
+selectProvidersWizardTitle=Seleziona account
+send=&Invia
+sendFile=Invia file
+selectContactSupportingInfo=Nessuna informazione disponibile per questo contatto.
+sendMessage=&Invia un messaggio
+sendVia=Invia tramite
+setStatusMessage=Imposta messaggio di stato
+settings=&Configurazioni
+showCallPanel=Mostra pannello chiamata
+showChannelsList=Mostra lista canali
+showOfflineUsers=Nascondi/Mostra utenti offline
+sipCommunicator=SIPCommunicator
+specifyReason=Inserire la motivazione di questa operazione nel campo sottostante.
+soundOnOff=Attiva/disattiva suono
+statusChangedChatMessage=e` diventato {0}
+statusChangeGeneralError=Impossibile cambiare lo stato per l'account: Username: {0}, Server: {1}. Errore sconosciuto.
+statusChangeNetworkFailure=Impossibile cambiare lo stato per l'account: Username: {0}, Server: {1}. Errore di rete.
+statusMessageInfo=Inserire il nuovo messaggo nel campo sottostante.
+subject=Oggetto
+summary=Sommario
+today=Oggi
+tools=&Strumenti
+typeYourRequest=Inserisci la richiesta qui
+uin=User identifier:
+unknown=Utente sconosciuto
+useCtrlEnterToSend=Premi Ctrl-&Enter per inviare
+msgDeliveryFailedUnknownError=Impossibile consegnare il messaggio. Errore sconosciuto.
+unregisteredMessage=Impossibile connettere il seguente account: Username: {0}, Server: {1}. Sei attualmente offline.
+updateAutomatically=Installa aggiornamenti automaticamente
+updates=Aggiornamenti
+userInfo=&Informazioni utente
+view=&Visualizza
+viewHistory=Visualizza &storia
+warning=Attenzione
+yes=Si`
+yesterday=Ieri
+
+january=Gen
+february=Feb
+march=Mar
+april=Apr
+may=Mag
+june=Giu
+july=Lug
+august=Ago
+september=Set
+october=Ott
+november=Nov
+december=Dic
+
+# account info
+accountInfo=informazione account utente
+title=informazione account
+apply=applica
+browse=scorri
+selectAccount=scegli account
+summaryDesc=sommarion dell'informazione account per
+extended=estesa
+extendedDesc=informazione account estesa per
+notSupported=informazione account non disponibile
+clickWeb=clicca per informazione web
+webInfo=informazione Web
+firstNameNS=nome
+middleNameNS=secondo nome
+lastNameNS=cognome
+ageNS=eta'
+bdayNS=data di nascita
+genderNS=sesso
+emailNS=E-mail
+phoneNS=telefono
+userPictures=foto utente
+change=cambiamento
+onlyMessages=solo messaggi
+
+# aim accregwizz
+protocolName=servizio messaggi istantanei (AIM)
+protocolDescription=descrizione di protocollo per il servizio AIM
+id=nome schermo AIM
+password=password
+uinAndPassword=UIN e password
+registerNewAccount=registra nuovo account
+registerNewAccountText=se non hai un account AIM, premi questo tasto per crearne uno nuovo
+existingAccount=l'account immesso e' gia' stato installato
+ovverideServerOps=disimpegna i default del server
+advancedOptions=opzioni avanzate
+proxy=proxy
+proxyPort=porta proxy
+proxyType=tipo di proxy
+proxyUsername=nome utente proxy
+proxyPassword=password proxy
+
+# branding
+aboutWindowTitle=titolo di finestra su
+logoMessage=messaggio pubblicitario
+loading=caricando
+aboutMenuEntry=su l'entrata al Menu
+ok=OK
+basedOn=basato su
+welcomeMessage=messaggio di benvenuto
+copyright=diritto d'autore
+license=licenza
+
+# contactinfo
+contactDetails=informazione per il contatto
+selectUser=Seleziona un'utente
+contactSummaryDesc=sommario dell'informazione per il contatto
+contactExtendedDesc=informazione per il contatto estesa
+contactInfoNotSupported=questo protocollo non sostiene informazioni memorizzate sul server per adesso. prova uno degli altri protocolli
+notSpecified=non specificato
+
+# extended callhistory search
+advancedCallHistorySearch=controllo numero di chiamate avanzato
+search=ricerca
+contactName=nome di contatto
+since=da quando
+until=fino a quando
+callType=tipo di chiamata
+incoming=in arrivo
+outgoing=in uscita
+olderCalls=chiamate precedenti
+duration=durata
+at=a
+all=tutto
+today=oggi
+january=gennaio
+february=febbraio
+march=marzo
+april=aprile
+may=maggio
+june=giugno
+july=luglio
+august=agosto
+september=settembre
+october=ottobre
+november=novembre
+december=dicembre
+
+# gibberish accregwiz
+protocolName=risultati incomprensibili
+protocolDescription=protocollo d'esame per SIP Communicator
+userID=identita' dell'utente
+password=Password
+userAndPassword=Identificazione
+
+#icq accregwizz
+protocolName=servizio ICQ
+protocolDescription=servizio ICQ di AOL
+uin=ICQ UIN:
+password=Password
+uinAndPassword=UIN e Password
+registerNewAccount=Registra nuovo account
+registerNewAccountText=se non avete un'account ICQ, premete questo tasto per crearne uno nuovo
+ovverideServerOps=disimpegna opzioni di default per il server
+proxy=Proxy
+proxyPort= porta Proxy
+proxyType= tipo di Proxy
+proxyUsername= nome utente Proxy
+proxyPassword= password per Proxy
+
+# irc accregwizz
+protocolName=IRC
+protocolDescription= protocollo IRC
+nick=Nomignolo
+password=Password
+infoPassword= la maggior parte dei server IRC no richiedono una password
+autoNickChange=cambia automaticamente nomignolo se gia' usato
+defaultPort=Usa porta default
+passwordNotRequired=il mio nomignolo non richiede identificazione
+server=nome del Host
+port=Porta
+serverIRC=Server
+
+# jabber accregwizz
+protocolName=borbottamento/Jabber
+protocolDescription=protocollo Jabber
+userID=identita' Jabber
+username= nome utente Jabber
+password=Password
+password2=Conferma password
+userIDAndPassword=Identificazione e Password
+ovverideServerOps=disimpegna opzioni di default del server
+cserver=Server
+server=collega Server
+sendKeepAlive=manda pacchetti per tenere in vita
+newAccountTitle= registrazione nuovo account Jabber
+registerNewAccount=Registra account nuovo
+registerNewAccountText=se non avete un' account Jabber premete questo tasto per crearne uno nuovo
+chooseTitle=scelta server per nuovo account Jabber
+chooseServerText=scegliete il server per il nuovo account nuovo dalla lista sottostante
+okLabel=Ok
+cancelLabel=annulla
+chooseLabel=scegli
+serverColumn=Server
+commentColumn=Comment
+
+xmppError=XMPP Errore
+userExist=questo utente e' gia' esistente. Scegliete un'altro utente o server
+unknownXmppError=errore XMPP ignoto. Controllate che il nome del server sia corretto
+notSamePassword=le due password immesse sono diverse
+
+# mailbox
+outgoing=messaggio in uscita
+incoming=messaggio in arrivo
+browse=naviga
+waitTime=ritadro finche' chiamata sara' mandata alla segreteria
+maxMessageTime=durata massima di messaggio in arrivo
+confirm=Conferma
+default=Default
+mailbox=casella di posta elettronica
+
+# msn accregwizz
+protocolName=MSN
+protocolDescription=Collegati e chatta usando il servizio MSN
+id=Email
+password=Password
+uinAndPassword=Identificazione e Password
+
+# plugin manager
+activate=Attiva
+desactivate=Disattiva
+install=Installa
+uninstall=disinstall
+update=aggiorna
+new=Nuovo
+plugins=collegamento
+cancel=Cancella
+url=URL
+showSystemBundles=mostra pacchetti di sistemi
+system=Sistema
+
+# rss accregwizz
+protocolName=RSS
+protocolDescription=aggiungete i vostri collegamenti RSS preferiti ad SIP Communicator
+rssAccountExist=Collegamento RSS gia' esistente
+rssAccountInfo=Questo genio/wizard aggiungera' per voi un'istruttore RSS.Notate che potete avere solo un' account RSS. Potete aggiungere piu' collegamenti alla vostra lista contatti usando il genio "aggiungi contatti". Riempite il campo indirizzi di contatti con il URI del collegamento RSS che vorreste aggiungere
+rssAccountInfoTitle=Informazione account RSS
+rssAccountAttention=Vi preghiamo di leggere attentamente le informazioni riportate sotto
+
+# sip accregwizz
+protocolName=SIP
+protocolDescription=protocollo SIP
+uin= identificazioneSIP
+password=Password
+uinAndPassword=nome utente e password
+ovverideServerOps=disimpegna opzioni di default per il server
+registrar=Conservatore del registro
+serverPort=porta server
+proxy=Proxy
+proxyPort=Porta Proxy
+preferredTransport=Trasporto preferenziale
+yes=Si
+enablePresence=attiva presenza(SIMPLE)
+forceP2PPresence=forza modalita' peer-to-peer
+offlineContactPollingPeriod=periodo voto contatti offline
+subscriptionExpiration=durata di abbonamento default
+presenceOptions=opzioni presenza
+keepAlive=mantieni in vita
+keepAliveMethod=metodo per mantenere in vita
+keepAliveInterval=Intervallo per mantenimento in vita
+register=Registra
+
+# ssh accregwizz
+protocolName=SSH
+protocolDescription=unprotocollo per collegarsi a macchine remote tramite SHH
+accountID=Identita' account
+identityFile=Cartella identita'
+knownHosts=Hosts conosciuti
+accountDetails= Dettagli di Account SHH
+
+# status update
+cancel=Cancella
+enable=attiva
+info=Informazione
+infotext=mettete 'idle' quando il vostro computer non viene usato per x minuti. Lo stato e' ripristinato allo stato di prima
+menuEntry=stato automatico
+minutes=Minuti
+ok=OK
+
+# update checker
+dialogTitle=Nuova versione disponibile
+dialogMessage1=una versione nuova e' disponibile da scaricare
+dialogMessage2=
+dialogMessageDebian=
+buttonDownload=scarica
+buttonClose=Chiudi
+
+# whiteboard
+reason=ragione
+accept=accetta
+reject=respingi
+ignore=ignora
+invitationReceivedFormInfo=Vi ha invitato ad unirvi. Lavagna bianca.Potete respingere/accettare o ingnorare questo invito
+invitation=testo d'invito
+whiteboardTitle=Titolo della Lavagna bianca
+whiteboardMenuItemText=Lavagna bianca
+whiteboardMenuItemNotSupportedTooltip=Questo contato no appoggia l'attivita' Lavagna bianca
+cancel=Cancella
+yes=Si
+doNotAskAgain=Non chiedermelo ancora
+closeSessionQuestion=Vorreste concludere la seduta in corso?Se scegliete "Si" la seduta in corso verra' conclusa ,altrimenti verra' chiusa solo la vostra finestra bianca
+file=schedario
+draw=tirare
+new=nuovo
+save=Salva
+open=apri
+copy=Copia
+paste=Incolla
+pen=Penna
+select=Seleziona
+line=Linea
+rectangle=Rettangolo
+fillRectangle= completa rettangolo
+text=testo
+image=Immagine
+polygon=Poligono
+fillPolygon=rettangolo completato
+polyline=Polylinea
+circle=Cerhio
+fillCircle=cerchio completato
+color=Colore
+modification=Modificazione
+thickness=spessore
+send=invia
+print=stampa
+edit=Edita
+grid=Grata
+deselect=Disattiva
+delete=Cancella
+properties=Proprieta'
+help=Aiuto
+About=Su
+
+# yahoo accregwizz
+protocolName=YAHOO
+protocolDescription=Collegati e chatta usando Yahoo.
+id=nome utente
+password=Password
+uinAndPassword=Identificazione e Password
+
+# zeroconf accregwizz
+protocolName=Zeroconf
+protocolDescription=protocollo di servizio seroconf
+userID=identitificazione utente
+firstname=Nome
+password=Password
+
+
diff --git a/resources/languages/resources_ro.properties b/resources/languages/resources_ro.properties
new file mode 100644
index 0000000..d6245c3
--- /dev/null
+++ b/resources/languages/resources_ro.properties
@@ -0,0 +1,297 @@
+# SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+#
+# Distributable under LGPL license.
+# See terms of license at gnu.org.
+
+# Romanian translation
+# Author: Cristina Tabacaru
+
+about=&Despre
+accept=&Acceptă
+account=Cont
+accountRegistrationWizard=Asistent de înregistrare conturi
+accounts=Conturi
+activateOnlyWhenMinimized=Activează numai la minimizare
+add=&Adaugă
+addContact=&Adaugă contact
+addContactError=Nu s-a putut adăuga contactul având id: {0}
+addContactErrorTitle=Eroare la adăugarea contactului
+addContactExistError=Contactul {0} există deja în lista dvs de contacte.
+addContactIdentifier=În câmpul de mai jos introduceți identificatorul contactului pe care doriți să îl adăugați.
+addContactWizard=Asistent de adăugare contact
+addGroupLocalError=Nu s-a putut adăuga grupul cu numele: {0}. Problema a intervenit în timpul unei operații I/O.
+addGroupNetError=Nu s-a putut adăuga grupul cu numele: {0}. Problema se datorează unei erori de rețea. Verificați conexiunea la rețea și reîncercați.
+addGroupError=Nu s-a putut adăuga grupul cu numele: {0}.
+addGroupErrorTitle=Eroare la Adăugare grup
+addGroupExistError=Grupul {0} există deja în lista dvs de contacte.
+addSubcontact=&Adaugă subcontact
+all=&Toate
+allContacts=&Toate contactele
+alwaysOnTop=Întotdeauna deasupra
+appearance=Aspect
+application=Aplicație
+apply=&Aplică
+at=la
+authAccepted=Contactul a acceptat cererea dvs de autorizare.
+authenticationWindowTitle=Autentificare obligatorie
+authRejected=Contactul a refuzat cererea dvs de autorizare.
+authorizationRequested=Autorizare obligatorie
+authorizationRequestedInfo=Contactul {0} vă cere permisiunea.
+authenticationFailed=Eroare de autentificare pentru contul: Nume utilizator: {0}, Nume server: {1}. Parola introdusă nu este validă.
+authorizationResponse=Răspuns la cererea de autorizare
+autoPopup=Deplasează fereastră în prim plan
+awayStatus=Plecat(ă)
+back=&Înapoi
+ban=&Exclude
+banFailed=Eroare de excludere
+banFailedGeneralError=Eroare de excludere {0}. S-a produs o eroare la server.
+banFailedNotAllowed=Eroare de excludere {0}. Proprietarul sau administratorul conferinței nu a putut fi exclus.
+banFailedNotEnoughPermissions=Eroare de excludere {0}. Nu dispuneți de suficiente privilegii pentru această operație.
+brbMessage=Sunt plecat(ă) momentan, dar mă voi întoarce.
+busyMessage=Scuze, sunt ocupat(ă) momentan.
+call=Apelează
+callVia=Apel via:
+callList=Listă de apeluri
+cancel=&Anulează
+chatRoomAlreadyJoined= {0} Sunteți deja înscris(ă) la conferință.
+chatRoomConfiguration={0} Configurare conferință
+chatRoomOpenConfigFailed=Eroare la obținerea formularului de configurare a conferinței {0}
+chatRoomOpenConfigForbidden=Eroare la obținerea formularului de configurare a conferinței {0}. Numai administratorii conferinței pot vizualiza și modifica fereastra de configurare.
+chatRoomConfigFormSubmitFailed=A intervenit o eroare la încercarea de transmitere a formularului de configurare a conferinței {0}.
+chatRoomUserJoined=s-a înscris {0}
+chatRoomUserLeft=a plecat {0}
+chatRoomUserKicked=a fost exclus(ă) din {0}
+chatRoomUserQuit=a părăsit {0}
+chatRoomName=Numele conferinței
+chatRoomNameInfo=În câmpul de mai jos introduceți numele conferinței pe care doriți să o creați.
+chatRoomNotExist=Conferința {0} nu a fost gasită pe {1} server. Verificați corectitudinea numelui introdus.
+chatRoomNotConnected=Trebuie să fiți logat pentru a vă înscrie la conferința {0}.
+chatRoomNotJoined=Trebuie să fiți înscris la conferință pentru a efectua alte operații în cadrul acesteia.
+chatRoomOptions=Opțiuni conferință
+chatRoomRegistrationRequired={0} Trebuie să fiți înregistrat(ă) pentru a vă înscrie la conferință.
+chatRoomRequiresPassword={0} Conferința necesită o parolă.
+chatRooms=Conferințe
+chatRoomSubjectChanged={0} a schimbat subiectul la {1}
+close=&Închide
+closeChatAfterNewMsg=Ați primit un mesaj acum 2 secunde. Sunteți sigur ca vreți sa terminați conversația ?
+conference=Conferință (Conference)
+configure=&Configurează
+configuration=Configurație
+connectionFailed=Eroare de conexiune
+connectionFailedMessage=Eroare de conexiune pentru contul: Nume utilizator: {0}, Nume server: {1}.
+connectionExpiredMessage=Momentan sunteți deconectat(ă) de la server {0}.
+contactAddress=Adresa contactului
+contactNotSupportingTelephony=Contactul {0} ales nu permite telefonie.
+contactPausedTyping={0} s-a oprit din scrierea mesajului
+contactTyping={0} scrie un mesaj
+contactTypingStateStale=Starea de scriere nu poate fi actualizată
+contacts=Contacte
+continue=&Continuă
+copy=&Copiază
+copyLink=Copiază &legatura
+create=C&rează
+createChatRoom=&Crează conferință...
+createChatRoomNotSupported=Nu s-a putut crea conferința cu numele: {0}. Serverul ales: {1} nu permite această operație.
+createChatRoomError=Nu s-a putut crea conferința cu numele: {0}.
+createChatRoomWizard=Asistent de creare conferințe
+createGroup=&Crează grup
+createGroupName=În câmpul de mai jos introduceți numele grupului pe care doriți să îl creați.
+createFirstGroupWizard=Lista dvs de contacte nu conține nici un grup. Pentru început creați un grup (Fișier/Crează grup).
+cut=&Taie
+date=Dată
+description=Descriere
+dial=&Formează numărul
+dialpad=Panou taste telefonice
+dndStatus=A nu deranja
+doNotAskAgain=A nu întreba din nou
+doNotShowAgain=A nu reafișa mesajul
+dontSupportWebInfo=Acest contact nu dispune de informații pe web
+duration=Durată
+edit=&Editare
+emptyHistory=&Istoric vid
+enableNotifications=Activează notificările
+enableTypingNotifications=Activează notificările de tastare
+error=Eroare
+exit=I&eșire
+extendedCriteria=Criteriu extins
+general=General
+generalError=Eroare Generala
+group=Grup
+groupName=Nume grup
+failedToCreateChatRoom=Nu a fost posibilă crearea conferinței cu numele: {0}.
+failedToJoinChatRoom=Eroare, nu se poate realiza înscrierea la conferința cu numele {0}.
+ffcStatus=Disponibil(ă) pentru chat
+file=&Fișier
+findChatRoomError=Nu s-a putut găsi conferința "{0}" .
+finish=&Încheiere
+first=Primul
+font=Font
+haveToBeConnectedToJoin=Trebuie să fiți conectat(ă) pentru a vă putea înscrie la o conferință. Conectați-vă și reîncercați.
+haveToBeConnectedToLeave=Trebuie să fiți conectat(ă) pentru a vă putea deconecta de la o conferință.
+help=?
+hideCallPanel=&Ascunde panoul de taste telefonice
+hideMainWindow=Apăsarea butonului X nu va închide aplicația, ci doar o va ascunde. Dacă doriți să închideți aplicația selectați Fișier/Închide.
+history=&Istoric
+historyContact=Istoric - {0}
+hour=Ora
+identifier=Identificator
+ignore=&Ignoră
+insertSmiley=Inserează smiley
+invalidCall=Apel invalid
+invitation=Motivul invitației
+invitationReceived=Invitație primită
+invitationReceivedFormInfo={0} v-a invitat să vă înscrieți {1} în conferință. Puteți accepta, respinge sau ignora această invitație.
+invite=&Invită
+inviteContactFormInfo=Scrieți numele utilizatorului pe care doriți să-l invitați. Puteți deasemenea preciza motivul invitației.
+inviteContactToChat=Invită contact pentru chat
+join=&Înscriere
+joinAs=&Înscriere ca și
+joinChatRoom=&Înscriere la conferință ...
+joinChatRoomTitle=Înscriere la conferință
+joinChatRoomName=Introduceți numele conferinței la care doriți să vă înscrieți.
+joinChatRoomWizard=Asistent de înscriere la conferințe
+kick=&Exclude
+kickFailed=Eroare de excludere
+kickFailedGeneralError=Eroare de excludere {0}. A intervenit o eroare generală la server.
+kickFailedNotAllowed=Eroare de excludere {0}. Proprietarul sau administratorul conferinței nu a putut fi exclus.
+kickFailedNotEnoughPermissions=Eroare de excludere {0}. Nu dispuneți de suficiente privilegii pentru această operație.
+last=Ultimul
+launchBrowserError=A intervenit o eroare în încercarea de lansare a navigatorului Web.
+launchOnStartUp=Lansare la pornire
+leave=&Închide
+limitReachedForIp=Adresa dvs IP este înregistrată deja de mai multe ori și serverul {0} nu permite alte înregistrari.
+login=&Identificator
+loginNotSucceeded=A intervenit o eroare în încercarea de conectare a contului: Nume utilizator: {0}, Nume server: {1}.
+loginWindowTitle=Conectare la {0}
+logoffNotSucceeded=A intervenit o eroare în încercarea de deconectare a contului: Nume utilizator: {0}, Nume server: {1}.
+me=eu
+modify=&Modificare
+moveSubcontactMsg=Selectați un contact unde doriți să deplasați contactul ales.
+moveSubcontact=D&eplasează subcontact
+moveSubcontactInSameContact=Contactul selectat este același cu contactul sursa. Selectați un alt contact!
+moveToGroup=&Deplasează în cadrul unui grup
+moveContactError=&Contactul nu poate fi deplasat
+msgDeliveryFailure=Mesajul de mai sus nu a putut fi trimis.
+msgDeliveryOfflineNotSupported=Protocolul pe care îl utilizați nu permite transmiterea de mesaje în mod "deconectat". Puteți încerca să accesați acest contact prin intermediul altui protocol sau așteptând momentul în care el/ea va fi conectat(ă).
+msgDeliveryInternalError=A intervenit o eroare internă. Vă rugăm să o raportați aici: http://www.sip-communicator.org/index.php/Development/BugsAndIssues
+msgNotDelivered=A intervenit o problemă în rețea.
+msgReceived={0} v-a trimis un mesaj.
+msgSendConnectionProblem=Trebuie să fiți conectat(ă) pentru a putea trimite mesaje.
+multipleLogins=Sunteți logat(ă) de mai multe ori cu același cont. Următorul cont: Nume utilizator: {0}, Nume server: {1} este momentan deconectat.
+name=Nume
+networkFailure=Eroare de rețea
+next=&Următorul
+new=&Nou
+newAccount=&Cont nou
+newMessage=Mesaj nou...
+newName=Nume nou:
+newStatusMessage=Nou mesaj de status
+no=Nu
+noAccountFound=Pentru a utiliza SIP-Communicator aveți nevoie de cel puțin un cont înregistrat. Următoarele pagini vă vor asista în procesul de creare a unui cont.
+noAvailableRooms=Lista de conferințe pentru acest server nu este disponibilă momentan.
+noMessage=Nici un mesaj
+noMultiChatAccountAvailable=Nu au fost găsite conturi ce permit conversații în cadrul unei conferințe. Consultați sip-communicator.org pentru mai multe informații privind protocoalele ce permit conferințe.
+nonEmptyChatWindowClose=Sunteți pe punctul de a închide o conversație având un mesaj netrimis. Sunteți sigur că doriți să închideți această conversație ?
+nonExistingUserId=Serverul {0} nu recunoaște identificatorul utilizatorului specificat.
+notifications=Notificări
+ok=&Ok
+offline=Deconectat(ă)
+olderCalls=Apeluri anterioare
+online=Conectat(ă)
+openInBrowser=Deschide in &navigator
+options=Opțiuni
+passwd=Parolă:
+paste=&Lipește
+previous=Anterior
+print=&Imprimă
+protocol=Protocol
+providerNotConnected=Trebuie să fiți conectat(ă) pentru a putea comunica.
+quit=&Închide
+ready=Gata
+reason=Motiv
+reconnectionLimitExceeded=V-ați deconectat și reconectat la server prea repede. Următorul cont : Nume utilizator: {0}, Nume server: {1} este exclus momentan. Va trebui să așteptați un moment înainte de a încerca să vă reconectați.
+refresh=Reîncarcă
+registrationTimeout=Expirarea înregistrării:
+reject=&Respinge
+rememberPassword=Reține parola
+remove=&Elimină
+removeAccount=&Elimină cont
+removeAccountMessage=Sunteți sigur că doriți să eliminați acest cont ?
+removeContact=&Elimină subcontact
+removeGroup=&Elimină grup
+rename=&Redenumește
+renameContact=Re&denumește contact
+renameContactWizard=În câmpul de mai jos puteți specifica numele pe care doriți să-l utilizați pentru contactul dat.
+renameGroup=Re&denumește grup
+renameGroupInfo= În câmpul de mai jos puteți specifica numele pe care doriți să-l utilizați pentru grupul dat.
+request=&Cerere
+requestAuthorization=&Cerere de autorizare
+requestAuthorizationInfo={0} nu poate fi adăugat în Lista dvs de contacte. {0} trebuie să autorizeze cererea dvs de a îl/o adăuga. Introduceți cererea dvs mai jos.
+requestAuthReason=Motivul cererii
+requestAuthReasonEnter=Introduceți motivul cererii
+responseAuthReasonEnter=Introduceți motivul răspunsului
+rootGroup=Rădăcina grupului
+save=&Salvează
+search=&Căutare
+searchForChatRooms=&Caută conferințe
+searchForChatRoomsText=Apăsați butonul de mai jos pentru afișarea tuturor conferințelor existente pe serverul selectat. Alegeți apoi una la care doriți să vă inscrieți și apăsați butonul de înscriere.
+securityAuthorityRealm=Serverul {0} solicită autentificarea dvs.
+selectAccount=Selectează cont
+selectAccountRegistration=Din lista de mai jos selectați asistentul de înregistrare conturi pentru a-l utiliza la crearea noului cont.
+selectAccountRegWizardTitle=Selecție înregistrare cont
+selectGroup=Selecție grup
+selectGroupWizard=Lista de mai jos conține toate grupurile din Lista de contacte. Selectați-l pe acela în care doriți să adăugați noul contact.
+selectGroupWizardTitle=Specificare grup
+selectProvidersForChatRoom=Lista de mai jos conține toate conturile ce permit participarea la conferințe (chat room). Selectați-l pe acela pe care doriți să-l utilizați la crearea propriei conferințe.
+selectProvidersWizard=Lista de mai jos conține toate conturile înregistrate. Selectați-le pe acelea pe care doriți să le utilizați în conversațiile cu noul contact.
+selectProvidersWizardTitle=Selectează contul(conturile)
+send=&Trimite
+sendFile=Trimite &fișier
+selectContactSupportingInfo=Nu există informații pentru acest contact.
+sendMessage=&Trimite un mesaj
+sendAsSms=Trimite ca și SMS
+sendSms=T&rimite SMS
+sendSmsNotSupported=Protocolul selectat nu permite trimiterea de mesaje SMS.
+sendVia=Trimite via
+setStatusMessage=Definește mesajul de status
+settings=&Setări
+showCallPanel=Afișează tastele telefonice
+showChannelsList=Afișează lista canalelor
+showOfflineUsers=Ascunde/Afișează utilizatorii deconectați
+specifyReason=În câmpul de mai jos puteți specifica motivul acestei operații.
+soundOnOff=Activează/ Dezactivează sunetul.
+statusChangedChatMessage=a devenit {0}
+statusChangeGeneralError=Eroare la schimbarea statusului pentru contul: Nume utilizator: {0}, Nume server: {1}, datorită unei probleme generale.
+statusChangeNetworkFailure=Eroare la schimbarea statusului pentru contul: Nume utilizator: {0}, Nume server: {1}, datorită unei probleme de rețea.
+statusMessageInfo=În câmpul de mai jos puteți specifica noul mesaj pe care doriți să-l utilizați.
+subject=Subiect
+summary=Sumar
+today=Astăzi
+tools=&Unelte
+typeYourRequest=Introduceți aici cererea dvs.
+uin=User identifier:
+unknown=Utilizator necunoscut
+useCtrlEnterToSend=Utilizează Ctrl-&Enter pentru trimitere
+msgDeliveryFailedUnknownError=O eroare necunoscută a intervenit în timpul trimiterii mesajului dvs.
+unregisteredMessage=Conexiune imposibilă pentru contul: Nume utilizator: {0}, Nume Server: {1}. Momentan sunteți deconectat(ă)
+updateAutomatically=Instalează automat actualizările
+updates=Actualizări
+userInfo=&Informații utilizator
+view=&Vizualizare
+viewHistory=Vizualizează &istoric
+warning=Avertisment
+yes=Da
+yesterday=Ieri
+
+january=Ian
+february=Feb
+march=Mar
+april=Apr
+may=Mai
+june=Iun
+july=Iul
+august=Aug
+september=Sep
+october=Oct
+november=Nov
+december=Dec
diff --git a/resources/languages/resources_zh_CN.properties b/resources/languages/resources_zh_CN.properties
new file mode 100644
index 0000000..3388411
--- /dev/null
+++ b/resources/languages/resources_zh_CN.properties
@@ -0,0 +1,337 @@
+# SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+#
+# Distributable under LGPL license.
+# See terms of license at gnu.org.
+
+# Chinese translation
+# Author: Nie Pin
+
+# MUST change eclipse settings
+# "Preferences/General/Content Types/Text/Java Properties File/Default encoding"
+# from "ISO-8859-1" to "UTF-8"
+
+about=&关于
+accept=&接受
+account=帐号
+accountRegistrationWizard=帐号注册向导
+accounts=帐号
+activateOnlyWhenMinimized=最小化窗口后可用
+add=&添加
+addContact=&添加联系人
+addContactError=添加联系人 {0} 失败
+addContactErrorTitle=添加联系人错误
+addContactExistError=联系人 {0} 已经存在于您的联系人名单中了
+addContactIdentifier=请在下面输入栏中输入您想要添加的联系人的称呼.
+addContactWizard=添加联系人向导
+addGroupLocalError=添加组 {0} 失败. 错误出自本地读写操作.
+addGroupNetError=添加组 {0} 失败. 错误出自网络错误. 请检查您的网络设置,然后重试.
+addGroupError=添加组 {0} 失败
+addGroupErrorTitle=添加组错误
+addGroupExistError=组 {0} 已经存在于您的联系人名单中了.
+addSubcontact=&添加所属联系人
+all=&清单
+allContacts=&所有联系人
+alwaysOnTop=窗口最前显示
+appearance=外观
+application=应用
+apply=&应用
+at=在
+authAccepted=联系人已经接受您的加为好友请求.
+authenticationWindowTitle=身份验证
+authRejected=联系人已经拒绝您的加为好友请求.
+authorizationRequested=请求加为好友
+authorizationRequestedInfo=联系人 {0} 请求加为好友.
+authenticationFailed=以下帐号身份验证失败: 用户名: {0}, 服务器名: {1}. 您输入的密码错误.
+authorizationResponse=加为好友请求回复
+autoPopup=窗口置顶
+awayStatus=离开
+back=&回来
+ban=&禁止
+banFailed=禁止操作失败
+banFailedGeneralError=阻止 {0} 失败. 服务器错误.
+banFailedNotAllowed=阻止 {0} 失败. 聊天室的创建人或管理员不能被禁止.
+banFailedNotEnoughPermissions=阻止 {0} 失败. 您没有权限.
+brbMessage=本人目前不在,不过马上回来.
+busyMessage=抱歉,目前很忙.
+call=呼叫
+callVia=转接呼叫:
+callList=呼叫名单
+cancel=&取消
+chatRoomAlreadyJoined=已加入聊天室 {0}.
+chatRoomConfiguration=聊天室 {0} 属性配置
+chatRoomOpenConfigFailed=获取聊天室 {0} 配置失败.
+chatRoomOpenConfigForbidden=获取聊天室 {0} 配置失败, 只有本聊天室管理员能进行配置操作.
+chatRoomConfigFormSubmitFailed=提交聊天室 {0} 配置失败, 发生错误.
+chatRoomUserJoined=已加入 {0}
+chatRoomUserLeft=已离开 {0}
+chatRoomUserKicked=被逐出 {0}
+chatRoomUserQuit=已退出 {0}
+chatRoomName=聊天室名
+chatRoomNameInfo=请在下面输入栏中输入您想要创建的聊天室名.
+chatRoomNotExist=在服务器 {1} 上找不到聊天室 {0}. 请检查你的输入是否正确.
+chatRoomNotConnected=您需要先登录, 然后才能进入聊天室 {0}.
+chatRoomNotJoined=您需要先进入聊天室, 然后才能做进一步操作.
+chatRoomOptions=聊天室选项
+chatRoomRegistrationRequired=需要注册才能加入聊天室 {0}.
+chatRoomRequiresPassword=输入密码, 然后进入聊天室 {0}.
+chatRooms=聊天室
+chatRoomSubjectChanged={0} 已经更换了新主题 {1}
+close=C&关闭
+closeChatAfterNewMsg=您刚收到新消息, 是否要结束本次聊天?
+conference=会议
+configure=&配置
+configuration=配置
+connectionFailed=连接失败
+connectionFailedMessage=账号登录失败: 用户名: {0}, 服务器名: {1}.
+connectionExpiredMessage=您已经断开了与服务器 {0} 的连接.
+contactAddress=联系人地址
+contactNotSupportingTelephony=您选择的联系人 {0} 不支持通话.
+contactPausedTyping={0} 停止输入
+contactTyping={0} 正在输入
+contactTypingStateStale=输入状态未知
+contactInfo=&联系人信息
+contacts=联系人
+continue=&继续
+copy=&复制
+copyLink=复制 &链接
+create=C&新建
+createChatRoom=&创建聊天室...
+createChatRoomNotSupported=创建聊天室 {0} 失败. 您选择的服务器 {1} 不支持此操作.
+createChatRoomError=创建聊天室 {0} 失败.
+createChatRoomWizard=聊天室新建向导
+createGroup=&新建组
+createGroupName=请在下面输入栏中输入您想要创建的组名.
+createFirstGroupWizard=您的联系人名单中没有任何组. 请创建一个组 (文件/新建组).
+cut=C&剪切
+date=日期
+description=说明
+dial=&拨号
+dialpad=拨号面板
+dndStatus=请别打扰
+doNotAskAgain=请不要重复询问
+doNotShowAgain=请不要重复此消息
+dontSupportWebInfo=该联系人不支持网络名片
+duration=持续时间
+edit=&编辑
+emptyHistory=&清空历史
+enableNotifications=启用提示功能
+enableTypingNotifications=启用 &输入提示
+error=错误
+exit=E&退出
+extendedCriteria=延时标准
+general=通用
+generalError=一般错误
+group=组
+groupName=组名
+failedToCreateChatRoom=创建聊天室 {0} 失败.
+failedToJoinChatRoom=加入聊天室 {0} 失败.
+ffcStatus=可以聊天了
+file=&文件
+findChatRoomError=找不到聊天室 "{0}".
+finish=&完成
+first=第一个
+font=字体
+haveToBeConnectedToJoin=您必须先登录上服务器才能加入聊天室, 请登录后重试.
+haveToBeConnectedToLeave=您必须先登录上服务器才能退出聊天室.
+help=帮助
+hideCallPanel=&隐藏呼叫控制面板
+hideMainWindow=点击快捷键 X 隐藏窗口. 如果需要退出, 请选择 文件/退出.
+history=&历史
+historyContact=历史记录 - {0}
+hour=时
+identifier=称呼
+ignore=&忽略
+info=信息
+insertSmiley=插入小图标
+invalidCall=无效/错误 呼叫
+invitation=邀请
+invitationReceived=收到邀请
+invitationReceivedFormInfo={0} 邀请 {1} 加入聊天室. 您可以选择同意, 拒绝或者忽略这个邀请.
+invite=&邀请
+inviteContactFormInfo=如果想进行精确查找, 请输入该用户的名称.
+inviteContactToChat=邀请其他联系人加入聊天
+join=&加入
+joinAs=J&选择名称加入
+joinChatRoom=&加入聊天室...
+joinChatRoomTitle=加入聊天室
+joinChatRoomName=请输入您想加入的聊天室的名称.
+joinChatRoomWizard=聊天室加入向导
+kick=&驱逐
+kickFailed=驱逐操作失败
+kickFailedGeneralError=驱逐 {0} 失败, 服务器出错.
+kickFailedNotAllowed=驱逐 {0} 失败, 聊天室的创建人或管理员不能被驱逐.
+kickFailedNotEnoughPermissions=驱逐 {0} 失败, 您没有权限.
+last=上一个
+launchBrowserError=打开浏览器出错.
+launchOnStartUp=启动程序时打开浏览器
+leave=&离开
+limitReachedForIp=本地IP地址注册账户过多, 服务器 {0} 不能接受更多注册.
+login=&登录
+loginNotSucceeded=登录账户出错: 用户名: {0}, 服务器名: {1}.
+loginWindowTitle=登录 {0}
+logoffNotSucceeded=退出账户出错: 用户名: {0}, 服务器名: {1}.
+me=我
+modify=&修改
+moveSubcontactMsg=请选择你想要移动联系人到哪个地方.
+moveSubcontact=M&移动所属联系人
+moveSubcontactInSameContact=您选择的联系人已经存在, 请重新选择!
+moveToGroup=&移动到组
+moveContactError=&联系人不能被移动
+msgDeliveryFailure=上面消息发送失败
+msgDeliveryOfflineNotSupported=您正在使用的协议不支持离线消息. 请尝试其他协议或者等待该用户上线.
+msgDeliveryInternalError=内部出错. 可能是程序自身错误. 请发送您的错误报告到: http://www.sip-communicator.org/index.php/Development/BugsAndIssues
+msgNotDelivered=网络错误.
+msgReceived={0} 发送消息给你了
+msgSendConnectionProblem=请先登录服务器, 然后发送消息.
+multipleLogins=账号在其他地方登录, 本地连接断开: 用户名: {0}, 服务器: {1}.
+name=名称
+networkFailure=网络错误
+next=&下一个
+new=&新建
+newAccount=&新建账号
+newMessage=新消息...
+newName=新名称:
+newStatusMessage=新状态的描述
+no=否
+noAccountFound=使用 SIP-Communicator 之前必须创建至少一个账户. 下面的向导将帮助您创建一个新账户.
+noAvailableRooms=该服务器上的聊天室清单暂时不可获得.
+noMessage=没有消息
+noMultiChatAccountAvailable=支持群聊. 进入 sip-communicator.org 查找更多支持群聊的协议.
+nonEmptyChatWindowClose=消息还没有发送出去, 是否一定退出?
+nonExistingUserId=服务器 {0} 不能识别用户身份.
+notifications=通知
+ok=&OK
+offline=离线
+olderCalls=之前的通话
+online=在线
+openInBrowser=在 &浏览器 中打开
+options=选项
+passwd=密码:
+paste=&粘贴
+previous=上一个
+print=&打印
+protocol=协议
+providerNotConnected=必须登录服务器后才能通信.
+quit=&退出
+ready=就绪
+reason=原因
+reconnectionLimitExceeded=该账户多次重复登录服务器: 用户名: {0}, 服务器名: {1} 目前已经被禁止, 请等待一段时间后再试.
+refresh=刷新
+registrationTimeout=账户注册已到期:
+reject=&拒绝
+rememberPassword=记住密码
+remove=&删除
+removeAccount=&删除账户
+removeAccountMessage=确认删除该账户?
+removeContact=&删除所属联系人
+removeGroup=&删除组
+rename=&重命名
+renameContact=Re&重命名联系人
+renameContactWizard=请在下面的输入栏中输入您对该联系人的新名称.
+renameGroup=Re&重命名组
+renameGroupInfo=请在下面的输入栏中输入您对该组的新名称.
+request=&请求
+requestAuthorization=&请求加为好友
+requestAuthorizationInfo=不能添加 {0} 到您的联系人名单. 必须等待 {0} 加您为他/她的好友. 请输入您的请求信息.
+requestAuthReason=请求原因
+requestAuthReasonEnter=请输入您的请求
+responseAuthReasonEnter=请输入您的回答
+rootGroup=最上级组
+save=&保存
+search=&搜索
+searchForChatRooms=&搜索聊天室
+searchForChatRoomsText=点击按键显示服务器上所有聊天室, 然后选择您感兴趣的聊天室, 点击加入.
+securityAuthorityRealm=服务器 {0} 要求验证您的身份.
+selectAccount=选择账户
+selectAccountRegistration=请通过下面的账户注册向导, 创建新的账户.
+selectAccountRegWizardTitle=选择账户注册
+selectGroup=选择组
+selectGroupWizard=下面的名单中包含您所有联系人组, 请选择一个, 然后加入新的联系人.
+selectGroupWizardTitle=指示组名
+selectProvidersForChatRoom=下面的名单中包含所有支持群聊的账户. 请选择一个, 然后创建您的聊天室.
+selectProvidersWizard=下面的名单中包含您所有的注册账户. 请选择一个和新联系人对话.
+selectProvidersWizardTitle=选择账户
+send=&发送
+sendFile=发送 &文件
+selectContactSupportingInfo=没有该联系人信息.
+sendMessage=&发送消息
+sendAsSms=作为手机短信, 发送消息
+sendSms=S&发送手机短信
+sendSmsNotSupported=您选择的协议不支持发送手机短信.
+sendVia=转发消息
+setStatusMessage=设置状态信息
+settings=&设置
+showCallPanel=显示呼叫控制面板
+showChannelsList=显示频道清单
+showOffline=离线状态
+showOfflineUsers=隐藏/显示 离线用户
+specifyReason=请在下面输入栏输入您此次操作的原因.
+sound=声音
+soundOnOff=打开/关闭 声音
+statusChangedChatMessage={0} 已上线
+statusChangeGeneralError=未知错误, 账号状态更新失败: 用户名: {0}, 服务器名: {1}.
+statusChangeNetworkFailure=网络错误, 账号状态更新失败: 用户名: {0}, 服务器名: {1}.
+statusMessageInfo=请在下面输入栏输入您的新状态信息.
+subject=主题
+summary=概要
+today=今天
+tools=&工具
+typeYourRequest=请在这里输入您的请求
+uin=User identifier:
+unknown=未知用户
+useCtrlEnterToSend=使用组合键 Ctrl-&Enter 发送消息
+msgDeliveryFailedUnknownError=发送消息失败, 未知错误.
+unregisteredMessage=登录账户失败: 用户名: {0}, 服务器: {1}. 您现在处于离线状态.
+updateAutomatically=自动安装更新
+updates=更新
+view=&查看
+viewHistory=查看 &历史
+warning=警告
+yes=是
+yesterday=昨天
+
+january=一月
+february=二月
+march=三月
+april=四月
+may=五月
+june=六月
+july=七月
+august=八月
+september=九月
+october=十月
+november=十一月
+december=十二月
+
+#systray
+# Author: Nie Pin
+
+# MUST change eclipse settings
+# "Preferences/General/Content Types/Text/Java Properties File/Default encoding"
+# from "ISO-8859-1" to "UTF-8"
+
+trayIcon=resources/images/impl/systray/systrayIcon.png
+trayIconWindows=resources/images/impl/systray/systrayIconWindows.png
+trayIconMacOSX=resources/images/impl/systray/systrayIconMacOSX.png
+trayIconMacOSXWhite=resources/images/impl/systray/systrayIconMacOSXWhite.png
+addContactIcon=resources/images/impl/gui/buttons/addContactIcon.png
+statusMenuIcon=resources/images/impl/systray/statusIcon.png
+settingsMenuIcon=resources/images/impl/gui/buttons/configureIcon.png
+closeMenuIcon=resources/images/impl/systray/quit.png
+messageIcon=resources/images/impl/systray/envelope.png
+messageIconWindows=resources/images/impl/systray/envelopeWindows.png
+messageIconMacOSX=resources/images/impl/systray/envelopeMacOSX.png
+messageIconMacOSXWhite=resources/images/impl/systray/envelopeMacOSXWhite.png
+newStatusMessageIcon=resources/images/impl/gui/common/renameDialogIcon.png
+settings=设置...
+addContact=添加联系人...
+setStatus=设置状态
+close=关闭
+onlineStatus=上线
+offlineStatus=离线
+messageReceived=消息来自
+failedToLoadAddContactDialog=加载"添加联系人"向导失败.
+newStatusMessage=新状态描述
+noMessage=暂无消息
+busyMessage=抱歉, 目前很忙.
+
diff --git a/resources/login.properties b/resources/login.properties
deleted file mode 100644
index 44eccbe..0000000
--- a/resources/login.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-preferredAccountWizard=
-simpleWizards=SIP|MSN|Yahoo|ICQ|AIM|Jabber \ No newline at end of file
diff --git a/resources/lookandfeel.properties b/resources/lookandfeel.properties
index 035c5fc..e69de29 100644
--- a/resources/lookandfeel.properties
+++ b/resources/lookandfeel.properties
@@ -1 +0,0 @@
-tabOverlap=10 \ No newline at end of file
diff --git a/resources/size/size.properties b/resources/size/size.properties
index 6b73dca..e69de29 100644
--- a/resources/size/size.properties
+++ b/resources/size/size.properties
@@ -1,10 +0,0 @@
-mainWindowWidth=200
-mainWindowHeight=450
-logoBarWidth=0
-logoBarHeight=0
-mainToolbarButtonHeight=28
-mainToolbarButtonWidth=28
-dialPadWidth=150
-dialPadHeight=150
-dialPadHorizontalGap=5
-dialPadVerticalGap=5 \ No newline at end of file
diff --git a/resources/sounds/sounds.properties b/resources/sounds/sounds.properties
new file mode 100644
index 0000000..8d5dd04
--- /dev/null
+++ b/resources/sounds/sounds.properties
@@ -0,0 +1,18 @@
+INCOMING_MESSAGE=resources/sounds/incomingMessage.wav
+INCOMING_CALL=resources/sounds/incomingCall.wav
+OUTGOING_CALL=resources/sounds/ring.wav
+
+DIAL_ZERO=resources/sounds/one_1.wav
+DIAL_ONE=resources/sounds/one_1.wav
+DIAL_TWO=resources/sounds/two_2.wav
+DIAL_THREE=resources/sounds/three_3.wav
+DIAL_FOUR=resources/sounds/four_4.wav
+DIAL_FIVE=resources/sounds/five_5.wav
+DIAL_SIX=resources/sounds/six_6.wav
+DIAL_SEVEN=resources/sounds/seven_7.wav
+DIAL_EIGHT=resources/sounds/eight_8.wav
+DIAL_NINE=resources/sounds/nine_9.wav
+DIAL_DIEZ=resources/sounds/one_1.wav
+DIAL_STAR=resources/sounds/one_1.wav
+
+BUSY=resources/sounds/busy.wav \ No newline at end of file
diff --git a/src/net/java/sip/communicator/impl/audionotifier/SCAudioClipImpl.java b/src/net/java/sip/communicator/impl/audionotifier/SCAudioClipImpl.java
index cc0121c..a5b85cb 100644
--- a/src/net/java/sip/communicator/impl/audionotifier/SCAudioClipImpl.java
+++ b/src/net/java/sip/communicator/impl/audionotifier/SCAudioClipImpl.java
@@ -51,10 +51,10 @@ public class SCAudioClipImpl implements SCAudioClip
InputStream inputstream;
try {
inputstream = url.openStream();
- this.createAppletAudioClip(inputstream);
+ this.createAppletAudioClip(inputstream);
}
catch (IOException e)
- {
+ {
e.printStackTrace();
}
diff --git a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java
index e742284..c3a1861 100644
--- a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java
@@ -325,7 +325,12 @@ public class ConfigurationServiceImpl
while(keys.hasNext())
{
String key = (String)keys.next();
- String keyPrefix = key.substring(0, key.lastIndexOf('.'));
+ int ix = key.lastIndexOf('.');
+
+ if(ix == -1)
+ continue;
+
+ String keyPrefix = key.substring(0, ix);
if(exactPrefixMatch)
{
diff --git a/src/net/java/sip/communicator/impl/gui/GuiActivator.java b/src/net/java/sip/communicator/impl/gui/GuiActivator.java
index aece132..eb4ac67 100644
--- a/src/net/java/sip/communicator/impl/gui/GuiActivator.java
+++ b/src/net/java/sip/communicator/impl/gui/GuiActivator.java
@@ -18,6 +18,7 @@ import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.msghistory.*;
import net.java.sip.communicator.service.notification.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.service.systray.*;
import net.java.sip.communicator.util.*;
@@ -52,6 +53,8 @@ public class GuiActivator implements BundleActivator
private static NotificationService notificationService;
private static SystrayService systrayService;
+
+ private static ResourceManagementService resourcesService;
private static Map providerFactoriesMap = new Hashtable();
@@ -305,6 +308,23 @@ public class GuiActivator implements BundleActivator
return systrayService;
}
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService) bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
+
/**
* Returns the <tt>NotificationService</tt> obtained from the bundle context.
*
diff --git a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
index d1b700c..22026d2 100644
--- a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
@@ -600,8 +600,8 @@ public class UIServiceImpl
// Check the isLookAndFeelDecorated property and set the appropriate
// default decoration.
boolean isDecorated
- = new Boolean(ApplicationProperties
- .getProperty("isLookAndFeelDecorated")).booleanValue();
+ = new Boolean(GuiActivator.getResources().
+ getSettingsString("isLookAndFeelDecorated")).booleanValue();
if (isDecorated)
{
diff --git a/src/net/java/sip/communicator/impl/gui/i18n/Messages.java b/src/net/java/sip/communicator/impl/gui/i18n/Messages.java
index 7099e34..fa7469b 100644
--- a/src/net/java/sip/communicator/impl/gui/i18n/Messages.java
+++ b/src/net/java/sip/communicator/impl/gui/i18n/Messages.java
@@ -9,17 +9,13 @@ package net.java.sip.communicator.impl.gui.i18n;
import java.text.*;
import java.util.*;
+import net.java.sip.communicator.impl.gui.GuiActivator;
/**
* The Messages class manages the access to the internationalization
* properties files.
* @author Yana Stamcheva
*/
public class Messages {
- private static final String BUNDLE_NAME
- = "resources.languages.impl.gui.resources";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
/**
* Returns an internationalized string corresponding to the given key.
@@ -32,18 +28,12 @@ public class Messages {
String resourceString;
try {
- resourceString = RESOURCE_BUNDLE.getString(key);
+ resourceString = GuiActivator.getResources().getI18NString(key);
- int mnemonicIndex = resourceString.indexOf('&');
+ char mnemonicIndex = GuiActivator.getResources().getI18nMnemonic(key);
- if(mnemonicIndex > -1) {
- i18nString.setMnemonic(resourceString.charAt(mnemonicIndex + 1));
-
- String firstPart = resourceString.substring(0, mnemonicIndex);
- String secondPart = resourceString.substring(mnemonicIndex + 1);
-
- resourceString = firstPart.concat(secondPart);
- }
+ if(mnemonicIndex > -1)
+ i18nString.setMnemonic(mnemonicIndex);
i18nString.setText(resourceString);
@@ -71,21 +61,15 @@ public class Messages {
String resourceString;
try {
- resourceString = RESOURCE_BUNDLE.getString(key);
+ resourceString = GuiActivator.getResources().getI18NString(key);
+
+ char mnemonicIndex = GuiActivator.getResources().getI18nMnemonic(key);
resourceString = MessageFormat.format(
resourceString, (Object[]) params);
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1) {
- i18nString.setMnemonic(resourceString.charAt(mnemonicIndex + 1));
-
- String firstPart = resourceString.substring(0, mnemonicIndex);
- String secondPart = resourceString.substring(mnemonicIndex + 1);
-
- resourceString = firstPart.concat(secondPart);
- }
+ if(mnemonicIndex > -1)
+ i18nString.setMnemonic(mnemonicIndex);
i18nString.setText(resourceString);
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommChatSelectorMenuUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommChatSelectorMenuUI.java
index 59230e3..a7cd049 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommChatSelectorMenuUI.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommChatSelectorMenuUI.java
@@ -12,6 +12,7 @@ import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
/**
@@ -57,8 +58,8 @@ public class SIPCommChatSelectorMenuUI
super.paintBackground(g, menuItem, bgColor);
boolean isToolBarExtended
- = new Boolean(ApplicationProperties
- .getProperty("isToolBarExteneded")).booleanValue();
+ = new Boolean(GuiActivator.getResources().
+ getSettingsString("isToolBarExteneded")).booleanValue();
if (!isToolBarExtended)
{
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
index eb7aad5..651d04a 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
@@ -14,6 +14,7 @@ import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
import javax.swing.text.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
/**
@@ -30,7 +31,8 @@ public class SIPCommDefaultTheme
* thumb shadow, tabbed pane focus, toolbar docking foreground
*/
private static final ColorUIResource PRIMARY_CONTROL_DARK_SHADOW =
- new ColorUIResource(ColorProperties.getColor("primaryControlDarkShadow"));
+ new ColorUIResource(GuiActivator.getResources().
+ getColor("primaryControlDarkShadow"));
/**
* Used for desktop color, menu selected background, focus color, slider
@@ -38,17 +40,20 @@ public class SIPCommDefaultTheme
* scroll bar thumb
*/
private static final ColorUIResource PRIMARY_CONTROL_SHADOW =
- new ColorUIResource(ColorProperties.getColor("primaryControlShadow"));
+ new ColorUIResource(GuiActivator.getResources().
+ getColor("primaryControlShadow"));
/**
* Used for progress bar border, tooltip border inactive, tooltip foreground
* inactive, scroll bar dark shadow.
*/
private static final ColorUIResource CONTROL_DARK_SHADOW =
- new ColorUIResource(ColorProperties.getColor("controlDarkShadow"));
+ new ColorUIResource(GuiActivator.getResources().
+ getColor("controlDarkShadow"));
private static final ColorUIResource CONTROL_SHADOW =
- new ColorUIResource(ColorProperties.getColor("controlShadow"));
+ new ColorUIResource(GuiActivator.getResources().
+ getColor("controlShadow"));
/**
* Used for window title inactive background, menu background, tooltip
@@ -56,7 +61,8 @@ public class SIPCommDefaultTheme
* scroll bar background, tabbed pane tab area background.
*/
private static final ColorUIResource CONTROL_COLOR =
- new ColorUIResource(ColorProperties.getColor("controlColor"));
+ new ColorUIResource(GuiActivator.getResources().
+ getColor("controlColor"));
/**
* Used for text hightlight color, window title background, scroll bar thumb
@@ -64,64 +70,76 @@ public class SIPCommDefaultTheme
* ToolBar.floatingForeground
*/
private static final ColorUIResource PRIMARY_CONTROL_COLOR
- = new ColorUIResource(ColorProperties.getColor("primaryControlColor"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("primaryControlColor"));
// Used to paint a gradient for a check box or a radio button.
private static final ColorUIResource BUTTON_GRADIENT_DARK_COLOR
- = new ColorUIResource(ColorProperties.getColor("buttonGradientDark"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("buttonGradientDark"));
private static final ColorUIResource BUTTON_GRADIENT_LIGHT_COLOR
- = new ColorUIResource(ColorProperties.getColor("buttonGradientLight"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("buttonGradientLight"));
private static final ColorUIResource SLIDER_GRADIENT_DARK_COLOR
- = new ColorUIResource(ColorProperties.getColor("sliderGradientDark"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("sliderGradientDark"));
private static final ColorUIResource SLIDER_GRADIENT_LIGHT_COLOR
- = new ColorUIResource(ColorProperties.getColor("sliderGradientLight"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("sliderGradientLight"));
private static final ColorUIResource SELECTION_FOREGROUND
- = new ColorUIResource(ColorProperties.getColor("selectionForeground"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("selectionForeground"));
private static final ColorUIResource SELECTION_BACKGROUND
- = new ColorUIResource(ColorProperties.getColor("selectionBackground"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("selectionBackground"));
private static final ColorUIResource SPLIT_PANE_DEVIDER_FOCUS_COLOR
- = new ColorUIResource(ColorProperties
+ = new ColorUIResource(GuiActivator.getResources()
.getColor("splitPaneDeviderFocused"));
private static final ColorUIResource TABBED_PANE_HIGHLIGHT_COLOR
- = new ColorUIResource(ColorProperties
+ = new ColorUIResource(GuiActivator.getResources()
.getColor("tabbedPaneBorderHighlight"));
private static final ColorUIResource TABLE_GRID_COLOR
- = new ColorUIResource(ColorProperties.getColor("tableGrid"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("tableGrid"));
private static final ColorUIResource SCROLL_BAR_TRACK_HIGHLIGHT
- = new ColorUIResource(ColorProperties
+ = new ColorUIResource(GuiActivator.getResources()
.getColor("scrollBarTrackHighlight"));
private static final ColorUIResource SCROLL_BAR_DARK_SHADOW
- = new ColorUIResource(ColorProperties.getColor("scrollBarDarkShadow"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("scrollBarDarkShadow"));
private static final ColorUIResource DESKTOP_BACKGROUND_COLOR
- = new ColorUIResource(ColorProperties.getColor("desktopBackgroundColor"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("desktopBackgroundColor"));
private static final ColorUIResource CONTROL_TEXT_COLOR
- = new ColorUIResource(ColorProperties.getColor("textColor"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("textColor"));
private static final ColorUIResource INACTIVE_CONTROL_TEXT_COLOR
- = new ColorUIResource(ColorProperties.getColor("inactiveTextColor"));
+ = new ColorUIResource(GuiActivator.getResources().
+ getColor("inactiveTextColor"));
private static final ColorUIResource MENU_DISABLED_FOREGROUND
- = new ColorUIResource(ColorProperties
+ = new ColorUIResource(GuiActivator.getResources()
.getColor("menuDisabledForeground"));
private static final ColorUIResource TAB_TITLE_HIGHLIGHT
- = new ColorUIResource(ColorProperties
+ = new ColorUIResource(GuiActivator.getResources()
.getColor("tabTitleHighlight"));
private static final ColorUIResource TAB_TITLE
- = new ColorUIResource(ColorProperties
+ = new ColorUIResource(GuiActivator.getResources()
.getColor("tabTitle"));
private static final FontUIResource BASIC_FONT
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java
index 132f2f3..47bcf55 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java
@@ -19,6 +19,7 @@ import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import javax.swing.text.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
/**
@@ -33,7 +34,8 @@ public class SIPCommTabbedPaneEnhancedUI extends SIPCommTabbedPaneUI {
private static final Color whiteColor = Color.white;
private static final int TAB_OVERLAP
- = new Integer(LookAndFeelProperties.getProperty("tabOverlap")).intValue();
+ = new Integer(GuiActivator.getResources().
+ getSettingsString("tabOverlap")).intValue();
private static final int PREFERRED_WIDTH = 150;
diff --git a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
index 91246ba..a80c982 100755
--- a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
+++ b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
@@ -99,8 +99,8 @@ public class MainFrame
tabbedPane = new MainTabbedPane(this);
String isToolbarExtendedString
- = ApplicationProperties.getProperty(
- "isToolBarExteneded");
+ = GuiActivator.getResources().
+ getSettingsString("isToolBarExteneded");
boolean isToolBarExtended
= new Boolean(isToolbarExtendedString).booleanValue();
@@ -120,7 +120,7 @@ public class MainFrame
this.initTitleFont();
String applicationName
- = ApplicationProperties.getProperty(
+ = GuiActivator.getResources().getSettingsString(
"applicationName");
this.setTitle(applicationName);
@@ -170,8 +170,8 @@ public class MainFrame
*/
private void initBounds()
{
- int width = SizeProperties.getSize("mainWindowWidth");
- int height = SizeProperties.getSize("mainWindowHeight");
+ int width = GuiActivator.getResources().getSettingsInt("mainWindowWidth");
+ int height = GuiActivator.getResources().getSettingsInt("mainWindowHeight");
this.setSize(width, height);
@@ -187,11 +187,11 @@ public class MainFrame
JComponent layeredPane = this.getLayeredPane();
String fontName
- = ApplicationProperties.getProperty(
+ = GuiActivator.getResources().getSettingsString(
"fontName");
String titleFontSize
- = ApplicationProperties.getProperty(
+ = GuiActivator.getResources().getSettingsString(
"titleFontSize");
Font font = new Font( fontName,
@@ -1327,8 +1327,8 @@ public class MainFrame
*/
public LogoBar()
{
- int width = SizeProperties.getSize("logoBarWidth");
- int height = SizeProperties.getSize("logoBarHeight");
+ int width = GuiActivator.getResources().getSettingsInt("logoBarWidth");
+ int height = GuiActivator.getResources().getSettingsInt("logoBarHeight");
this.setMinimumSize(new Dimension(width, height));
this.setPreferredSize(new Dimension(width, height));
@@ -1348,7 +1348,7 @@ public class MainFrame
= ImageLoader.getImage(ImageLoader.WINDOW_TITLE_BAR);
g.setColor(new Color(
- ColorProperties.getColor("logoBarBackground")));
+ GuiActivator.getResources().getColor("logoBarBackground")));
g.fillRect(0, 0, this.getWidth(), this.getHeight());
g.drawImage(backgroundImage, 0, 0, null);
diff --git a/src/net/java/sip/communicator/impl/gui/main/account/AccountRegFirstPage.java b/src/net/java/sip/communicator/impl/gui/main/account/AccountRegFirstPage.java
index 12a96af..8c1f747 100644
--- a/src/net/java/sip/communicator/impl/gui/main/account/AccountRegFirstPage.java
+++ b/src/net/java/sip/communicator/impl/gui/main/account/AccountRegFirstPage.java
@@ -16,6 +16,7 @@ import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.utils.*;
@@ -94,7 +95,8 @@ public class AccountRegFirstPage extends JPanel
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
// check for preferred wizard
- String prefWName = LoginProperties.getProperty("preferredAccountWizard");
+ String prefWName = GuiActivator.getResources().
+ getSettingsString("preferredAccountWizard");
if(prefWName != null && prefWName.length() > 0)
preferredWizardName = prefWName;
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java b/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
index 70492cf..13f533e 100644
--- a/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
@@ -96,7 +96,8 @@ public class NewAccountDialog
private void initNetworkList()
{
// check for preferred wizard
- String prefWName = LoginProperties.getProperty("preferredAccountWizard");
+ String prefWName = GuiActivator.getResources().
+ getSettingsString("preferredAccountWizard");
if(prefWName != null && prefWName.length() > 0)
preferredWizardName = prefWName;
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java
index c26b7a1..c8f2972 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java
@@ -435,7 +435,7 @@ public class CallListPanel
super.paintComponent(g);
g.setColor(new Color(
- ColorProperties.getColor("contactListBackground")));
+ GuiActivator.getResources().getColor("contactListBackground")));
// paint the background with the choosen color
g.fillRect(0, 0, getWidth(), getHeight());
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java
index e46ea93..d7cf7e0 100755
--- a/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java
@@ -72,9 +72,11 @@ public class DialPanel
private DialButton diezButton = new DialButton(
ImageLoader.getImage(ImageLoader.DIEZ_DIAL_BUTTON));
- private int hgap = SizeProperties.getSize("dialPadHorizontalGap");
+ private int hgap = GuiActivator.getResources().
+ getSettingsInt("dialPadHorizontalGap");
- private int vgap = SizeProperties.getSize("dialPadVerticalGap");
+ private int vgap = GuiActivator.getResources().
+ getSettingsInt("dialPadVerticalGap");
private JPanel dialPadPanel = new JPanel(new GridLayout(4, 3, hgap, vgap));
@@ -97,8 +99,8 @@ public class DialPanel
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
- int width = SizeProperties.getSize("dialPadWidth");
- int height = SizeProperties.getSize("dialPadHeight");
+ int width = GuiActivator.getResources().getSettingsInt("dialPadWidth");
+ int height = GuiActivator.getResources().getSettingsInt("dialPadHeight");
this.dialPadPanel.setPreferredSize(new Dimension(width, height));
@@ -421,7 +423,7 @@ public class DialPanel
super.paintComponent(g);
g.setColor(new Color(
- ColorProperties.getColor("contactListBackground")));
+ GuiActivator.getResources().getColor("contactListBackground")));
// paint the background with the chosen color
g.fillRect(0, 0, getWidth(), getHeight());
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java
index 9f4ee5a..9bbe043 100755
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java
@@ -1170,7 +1170,7 @@ public class ChatConversationPanel
super.paintComponent(g);
g.setColor(new Color(
- ColorProperties.getColor("contactListBackground")));
+ GuiActivator.getResources().getColor("contactListBackground")));
// paint the background with the choosen color
g.fillRect(0, 0, getWidth(), getHeight());
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
index 14c8dc9..bc50006 100755
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
@@ -795,8 +795,8 @@ public class ChatWindow
*/
public LogoBar()
{
- int width = SizeProperties.getSize("logoBarWidth");
- int height = SizeProperties.getSize("logoBarHeight");
+ int width = GuiActivator.getResources().getSettingsInt("logoBarWidth");
+ int height = GuiActivator.getResources().getSettingsInt("logoBarHeight");
this.setMinimumSize(new Dimension(width, height));
this.setPreferredSize(new Dimension(width, height));
@@ -816,7 +816,7 @@ public class ChatWindow
= ImageLoader.getImage(ImageLoader.WINDOW_TITLE_BAR);
g.setColor(new Color(
- ColorProperties.getColor("logoBarBackground")));
+ GuiActivator.getResources().getColor("logoBarBackground")));
g.fillRect(0, 0, this.getWidth(), this.getHeight());
g.drawImage(backgroundImage, 0, 0, null);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/MenusPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/MenusPanel.java
index e2ea81e..270a4d1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/MenusPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/MenusPanel.java
@@ -11,6 +11,7 @@ import java.awt.*;
import javax.swing.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.menus.*;
import net.java.sip.communicator.impl.gui.main.chat.toolBars.*;
import net.java.sip.communicator.impl.gui.utils.*;
@@ -42,8 +43,8 @@ public class MenusPanel
this.parentWindow = parentWindow;
boolean isToolBarExtended
- = new Boolean(ApplicationProperties
- .getProperty("isToolBarExteneded")).booleanValue();
+ = new Boolean(GuiActivator.getResources().
+ getSettingsString("isToolBarExteneded")).booleanValue();
if (isToolBarExtended)
mainToolBar = new ExtendedMainToolBar(this.parentWindow);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java b/src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java
index 751c2ec..c930aa7 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java
@@ -14,6 +14,7 @@ import java.awt.event.*;
import javax.swing.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.lookandfeel.*;
import net.java.sip.communicator.impl.gui.utils.*;
@@ -38,10 +39,10 @@ public class SmiliesSelectorBox extends JMenuBar
private SIPCommMenu selectorBox = new SIPCommMenu();
private static int BUTTON_HEIGHT
- = SizeProperties.getSize("mainToolbarButtonHeight");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonHeight");
private static int BUTTON_WIDTH
- = SizeProperties.getSize("mainToolbarButtonWidth");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonWidth");
private SelectorBoxRolloverListener rolloverListener
= new SelectorBoxRolloverListener();
@@ -173,7 +174,8 @@ public class SmiliesSelectorBox extends JMenuBar
this.selectorBox.setVerticalTextPosition(SwingConstants.BOTTOM);
this.selectorBox.setHorizontalTextPosition(SwingConstants.CENTER);
this.selectorBox.setForeground(
- new Color(ColorProperties.getColor("chatMenuForeground")));
+ new Color(GuiActivator.getResources().
+ getColor("chatMenuForeground")));
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java.orig b/src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java.orig
new file mode 100644
index 0000000..751c2ec
--- /dev/null
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/SmiliesSelectorBox.java.orig
@@ -0,0 +1,210 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+
+package net.java.sip.communicator.impl.gui.main.chat;
+
+import java.util.*;
+
+import java.awt.*;
+import java.awt.event.*;
+
+import javax.swing.*;
+
+import net.java.sip.communicator.impl.gui.customcontrols.*;
+import net.java.sip.communicator.impl.gui.lookandfeel.*;
+import net.java.sip.communicator.impl.gui.utils.*;
+
+/**
+ * The <tt>SmiliesSelectorBox</tt> is the component where user could choose
+ * a smiley icon to send.
+ *
+ * @author Yana Stamcheva
+ */
+public class SmiliesSelectorBox extends JMenuBar
+ implements ActionListener
+{
+ private ChatWindow chatWindow;
+
+ private ArrayList imageList;
+
+ private int gridRowCount = 0;
+
+ private int gridColCount = 0;
+
+ private SIPCommMenu selectorBox = new SIPCommMenu();
+
+ private static int BUTTON_HEIGHT
+ = SizeProperties.getSize("mainToolbarButtonHeight");
+
+ private static int BUTTON_WIDTH
+ = SizeProperties.getSize("mainToolbarButtonWidth");
+
+ private SelectorBoxRolloverListener rolloverListener
+ = new SelectorBoxRolloverListener();
+
+ /**
+ * Creates an instance of this <tt>SmiliesSelectorBox</tt> and initializes
+ * the panel with the smiley icons given by the incoming imageList.
+ *
+ * @param imageList The pack of smiley icons.
+ */
+ public SmiliesSelectorBox(ArrayList imageList, ChatWindow chatWindow)
+ {
+ this.imageList = imageList;
+
+ this.chatWindow = chatWindow;
+
+ this.selectorBox.setUI(new SIPCommChatSelectorMenuUI());
+
+ this.setOpaque(false);
+ this.selectorBox.setOpaque(false);
+ this.setPreferredSize(
+ new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
+
+ //Should explicitly remove any border in order to align correctly the
+ //icon.
+ this.selectorBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
+
+ this.selectorBox.setIcon(new ImageIcon(ImageLoader
+ .getImage(ImageLoader.SMILIES_ICON)));
+
+ this.calculateGridDimensions(imageList.size());
+
+ this.selectorBox.getPopupMenu().setLayout(new GridLayout(
+ this.gridRowCount, this.gridColCount, 5, 5));
+
+ for (int i = 0; i < imageList.size(); i++) {
+
+ Smiley smiley = (Smiley) this.imageList.get(i);
+
+ ImageIcon imageIcon
+ = new ImageIcon(ImageLoader.getImage(smiley.getImageID()));
+
+ JMenuItem smileyItem = new JMenuItem (imageIcon);
+
+// smileyItem.setPreferredSize(
+// new Dimension( imageIcon.getIconWidth(),
+// imageIcon.getIconHeight()));
+
+// smileyItem.setMargin(new Insets(2, 2, 2, 2));
+
+ smileyItem.setToolTipText(smiley.getSmileyStrings()[0]);
+
+ smileyItem.addActionListener(this);
+
+ this.selectorBox.add(smileyItem);
+ }
+
+ this.add(selectorBox);
+ }
+
+ /**
+ * In order to have a popup which is at the form closest to sqware.
+ * @param itemsCount the count of items that will be laied out.
+ */
+ private void calculateGridDimensions(int itemsCount) {
+
+ this.gridRowCount = (int) Math.round(Math.sqrt(itemsCount));
+
+ this.gridColCount = (int) Math.round(itemsCount / gridRowCount);
+ }
+
+ /**
+ * Opens the smilies selector box.
+ */
+ public void open()
+ {
+ this.selectorBox.doClick();
+ }
+
+ /**
+ * Returns TRUE if the selector box is opened, otherwise returns FALSE.
+ * @return TRUE if the selector box is opened, otherwise returns FALSE
+ */
+ public boolean isMenuSelected()
+ {
+ if(selectorBox.isPopupMenuVisible())
+ return true;
+
+ return false;
+ }
+
+ /**
+ * Writes the symbol corresponding to a choosen smiley icon to the write
+ * message area at the end of the current text.
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ JMenuItem smileyItem = (JMenuItem) e.getSource();
+ String buttonText = smileyItem.getToolTipText();
+
+ for (int i = 0; i < this.imageList.size(); i++) {
+
+ Smiley smiley = (Smiley) this.imageList.get(i);
+
+ if (buttonText.equals(smiley.getSmileyStrings()[0])) {
+
+ ChatPanel chatPanel = this.chatWindow
+ .getCurrentChatPanel();
+
+ chatPanel.addTextInWriteArea(
+ smiley.getSmileyStrings()[0] + " ");
+
+ chatPanel.requestFocusInWriteArea();
+ }
+ }
+ }
+
+ /**
+ * Sets the given text to this smiley selector box. The given text will be
+ * position by default on the bottom of the icon.
+ *
+ * @param text the text to be added to this selector box.
+ */
+ public void setText(String text)
+ {
+ this.selectorBox.setText(text);
+
+ this.selectorBox.setFont(getFont().deriveFont(Font.BOLD, 10f));
+ this.selectorBox.setVerticalTextPosition(SwingConstants.BOTTOM);
+ this.selectorBox.setHorizontalTextPosition(SwingConstants.CENTER);
+ this.selectorBox.setForeground(
+ new Color(ColorProperties.getColor("chatMenuForeground")));
+ }
+
+ /**
+ * Enables or disabled the roll-over effect, when user moves the mouse over
+ * this smilies selector box.
+ *
+ * @param isRollover <code>true</code> to enable the roll-over,
+ * <code>false</code> - otherwise.
+ */
+ public void setRollover(boolean isRollover)
+ {
+ if(isRollover)
+ selectorBox.addMouseListener(rolloverListener);
+ else
+ selectorBox.removeMouseListener(rolloverListener);
+ }
+
+ /**
+ * Handles <tt>MouseEvent</tt>s and changes the state of the contained
+ * selector box in order to make a roll-over effect.
+ */
+ private class SelectorBoxRolloverListener extends MouseAdapter
+ {
+ public void mouseEntered(MouseEvent e)
+ {
+ selectorBox.setMouseOver(true);
+ }
+
+ public void mouseExited(MouseEvent e)
+ {
+ selectorBox.setMouseOver(false);
+ }
+ }
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java b/src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java
index c9ec512..8a2768b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java
@@ -12,6 +12,7 @@ import java.awt.event.*;
import javax.swing.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
@@ -57,7 +58,7 @@ public class EditMenu extends SIPCommMenu
this.chatWindow = chatWindow;
this.setForeground(new Color(
- ColorProperties.getColor("chatMenuForeground")));
+ GuiActivator.getResources().getColor("chatMenuForeground")));
this.cutMenuItem.setName("cut");
this.copyMenuItem.setName("copy");
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java b/src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java
index ab109cb..4c658a1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java
@@ -12,6 +12,7 @@ import java.awt.event.*;
import javax.swing.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
@@ -56,7 +57,7 @@ public class FileMenu extends SIPCommMenu
this.parentWindow = parentWindow;
this.setForeground(new Color(
- ColorProperties.getColor("chatMenuForeground")));
+ GuiActivator.getResources().getColor("chatMenuForeground")));
this.add(saveMenuItem);
this.add(printMenuItem);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/menus/HelpMenu.java b/src/net/java/sip/communicator/impl/gui/main/chat/menus/HelpMenu.java
index eb836d6..d1b2aa0 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/menus/HelpMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/menus/HelpMenu.java
@@ -51,7 +51,7 @@ public class HelpMenu
this.chatWindow = chatWindow;
this.setForeground(new Color(
- ColorProperties.getColor("chatMenuForeground")));
+ GuiActivator.getResources().getColor("chatMenuForeground")));
this.setMnemonic(Messages.getI18NString("help").getMnemonic());
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/ExtendedMainToolBar.java b/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/ExtendedMainToolBar.java
index 789807d..72303f4 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/ExtendedMainToolBar.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/ExtendedMainToolBar.java
@@ -88,10 +88,10 @@ public class ExtendedMainToolBar
ImageLoader.getImage(ImageLoader.FONT_ICON));
private static int DEFAULT_BUTTON_HEIGHT
- = SizeProperties.getSize("mainToolbarButtonHeight");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonHeight");
private static int DEFAULT_BUTTON_WIDTH
- = SizeProperties.getSize("mainToolbarButtonWidth");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonWidth");
private SmiliesSelectorBox smiliesBox;
@@ -432,7 +432,7 @@ public class ExtendedMainToolBar
this.setFont(getFont().deriveFont(Font.BOLD, 10f));
this.setForeground(new Color(
- ColorProperties.getColor("toolBarForeground")));
+ GuiActivator.getResources().getColor("toolBarForeground")));
this.setVerticalTextPosition(SwingConstants.BOTTOM);
this.setHorizontalTextPosition(SwingConstants.CENTER);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java b/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java
index dd025f6..76d4514 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java
@@ -79,10 +79,10 @@ public class MainToolBar
.getImage(ImageLoader.FONT_ICON));
private static int BUTTON_HEIGHT
- = SizeProperties.getSize("mainToolbarButtonHeight");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonHeight");
private static int BUTTON_WIDTH
- = SizeProperties.getSize("mainToolbarButtonWidth");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonWidth");
private SmiliesSelectorBox smiliesBox;
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java
index 3e77fcd..6e4185a 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java
@@ -12,6 +12,7 @@ import java.awt.image.*;
import javax.swing.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.main.chat.conference.*;
@@ -139,7 +140,7 @@ public class ChatRoomsListPanel
super.paintComponent(g);
g.setColor(new Color(
- ColorProperties.getColor("contactListBackground")));
+ GuiActivator.getResources().getColor("contactListBackground")));
// paint the background with the choosen color
g.fillRect(0, 0, getWidth(), getHeight());
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java
index 4ba0da4..bbf0e20 100755
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java
@@ -15,6 +15,7 @@ import java.util.*;
import javax.swing.*;
import javax.swing.Timer;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
@@ -641,7 +642,7 @@ public class ContactListPanel
super.paintComponent(g);
g.setColor(new Color(
- ColorProperties.getColor("contactListBackground")));
+ GuiActivator.getResources().getColor("contactListBackground")));
// paint the background with the choosen color
g.fillRect(0, 0, getWidth(), getHeight());
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java.orig b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java.orig
new file mode 100644
index 0000000..047332f
--- /dev/null
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java.orig
@@ -0,0 +1,668 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+
+package net.java.sip.communicator.impl.gui.main.contactlist;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.image.*;
+import java.util.*;
+
+import javax.swing.*;
+import javax.swing.Timer;
+
+import net.java.sip.communicator.impl.gui.i18n.*;
+import net.java.sip.communicator.impl.gui.main.*;
+import net.java.sip.communicator.impl.gui.main.chat.*;
+import net.java.sip.communicator.impl.gui.utils.*;
+import net.java.sip.communicator.service.contacteventhandler.*;
+import net.java.sip.communicator.service.contactlist.*;
+import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.protocol.event.*;
+import net.java.sip.communicator.util.*;
+
+/**
+ * The contactlist panel not only contains the contact list but it has the role
+ * of a message dispatcher. It process all sent and received messages as well as
+ * all typing notifications. Here are managed all contact list mouse events.
+ *
+ * @author Yana Stamcheva
+ */
+public class ContactListPanel
+ extends JScrollPane
+ implements MessageListener,
+ TypingNotificationsListener,
+ ContactListListener
+{
+ private MainFrame mainFrame;
+
+ private ContactList contactList;
+
+ private JPanel treePanel = new JPanel(new BorderLayout());
+
+ private TypingTimer typingTimer = new TypingTimer();
+
+ private CommonRightButtonMenu commonRightButtonMenu;
+
+ private Logger logger = Logger.getLogger(ContactListPanel.class);
+
+ private ChatWindowManager chatWindowManager;
+
+ /**
+ * Creates the contactlist scroll panel defining the parent frame.
+ *
+ * @param mainFrame The parent frame.
+ */
+ public ContactListPanel(MainFrame mainFrame) {
+
+ this.mainFrame = mainFrame;
+
+ this.chatWindowManager = mainFrame.getChatWindowManager();
+
+ this.treePanel.setOpaque(false);
+
+ this.setViewport(new ScrollPaneBackground());
+
+ this.getViewport().setView(treePanel);
+
+ this.setHorizontalScrollBarPolicy(
+ JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+
+ this.getVerticalScrollBar().setUnitIncrement(30);
+
+ this.setPreferredSize(new Dimension(200, 450));
+ this.setMinimumSize(new Dimension(80, 200));
+
+ }
+
+ /**
+ * Initializes the contact list.
+ *
+ * @param contactListService The MetaContactListService which will be used
+ * for a contact list data model.
+ */
+ public void initList(MetaContactListService contactListService)
+ {
+ this.contactList = new ContactList(mainFrame);
+
+ this.contactList.addContactListListener(this);
+ this.treePanel.addMouseListener(new MouseAdapter() {
+ public void mousePressed(MouseEvent e)
+ {
+
+ if ((e.getModifiers() & InputEvent.BUTTON3_MASK) != 0) {
+ commonRightButtonMenu = new CommonRightButtonMenu(mainFrame);
+
+ commonRightButtonMenu.setInvoker(treePanel);
+
+ commonRightButtonMenu.setLocation(e.getX()
+ + mainFrame.getX() + 5, e.getY() + mainFrame.getY()
+ + 105);
+
+ commonRightButtonMenu.setVisible(true);
+ }
+ }
+ });
+
+ this.treePanel.add(contactList, BorderLayout.NORTH);
+
+ this.treePanel.setBackground(Color.WHITE);
+ this.contactList.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
+
+ this.getActionMap().put("runChat", new ContactListPanelEnterAction());
+
+ InputMap imap = this.getInputMap(
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+ imap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "runChat");
+ }
+
+ /**
+ * Returns the contact list.
+ *
+ * @return the contact list
+ */
+ public ContactList getContactList()
+ {
+ return this.contactList;
+ }
+
+ /**
+ * Implements the ContactListListener.contactSelected method.
+ */
+ public void contactClicked(ContactListEvent evt)
+ {
+ MetaContact metaContact = evt.getSourceContact();
+
+ // Searching for the right proto contact to use as default for the
+ // chat conversation.
+ Contact defaultContact = metaContact.getDefaultContact();
+
+ ProtocolProviderService defaultProvider
+ = defaultContact.getProtocolProvider();
+
+ OperationSetBasicInstantMessaging
+ defaultIM = (OperationSetBasicInstantMessaging)
+ defaultProvider.getOperationSet(
+ OperationSetBasicInstantMessaging.class);
+
+ ProtocolProviderService protoContactProvider;
+ OperationSetBasicInstantMessaging protoContactIM;
+
+ if (defaultContact.getPresenceStatus().getStatus() < 1
+ && (!defaultIM.isOfflineMessagingSupported()
+ || !defaultProvider.isRegistered()))
+ {
+ Iterator<Contact> protoContacts = metaContact.getContacts();
+
+ while(protoContacts.hasNext())
+ {
+ Contact contact = protoContacts.next();
+
+ protoContactProvider = contact.getProtocolProvider();
+
+ protoContactIM = (OperationSetBasicInstantMessaging)
+ protoContactProvider.getOperationSet(
+ OperationSetBasicInstantMessaging.class);
+
+ if(protoContactIM.isOfflineMessagingSupported()
+ && protoContactProvider.isRegistered())
+ {
+ defaultContact = contact;
+ }
+ }
+ }
+
+ ContactEventHandler contactHandler = mainFrame
+ .getContactHandler(defaultContact.getProtocolProvider());
+
+ contactHandler.contactClicked(defaultContact, evt.getClickCount());
+ }
+
+ /**
+ * Implements the ContactListListener.groupSelected method.
+ */
+ public void groupSelected(ContactListEvent evt)
+ {}
+
+ /**
+ * Implements the ContactListListener.protocolContactSelected method.
+ */
+ public void protocolContactClicked(ContactListEvent evt)
+ {
+ Contact protoContact = evt.getSourceProtoContact();
+
+ ContactEventHandler contactHandler = mainFrame
+ .getContactHandler(protoContact.getProtocolProvider());
+
+ contactHandler.contactClicked(protoContact, evt.getClickCount());
+ }
+
+ /**
+ * Runs the chat window for the specified contact. We examine different
+ * cases here, depending on the chat window mode.
+ *
+ * In mode "Open messages in new window" a new window is opened for the
+ * given <tt>MetaContact</tt> if there's no opened window for it,
+ * otherwise the existing chat window is made visible and focused.
+ *
+ * In mode "Group messages in one chat window" a JTabbedPane is used to show
+ * chats for different contacts in ona window. A new tab is opened for the
+ * given <tt>MetaContact</tt> if there's no opened tab for it, otherwise
+ * the existing chat tab is selected and focused.
+ *
+ * @author Yana Stamcheva
+ */
+ public class RunMessageWindow implements Runnable
+ {
+ private MetaContact metaContact;
+
+ private Contact protocolContact;
+
+ private boolean isSmsSelected = false;
+
+ /**
+ * Creates an instance of <tt>RunMessageWindow</tt> by specifying the
+ *
+ * @param metaContact the meta contact to which we will talk.
+ */
+ public RunMessageWindow(MetaContact metaContact)
+ {
+ this.metaContact = metaContact;
+ }
+
+ /**
+ * Creates a chat window
+ *
+ * @param metaContact
+ * @param protocolContact
+ */
+ public RunMessageWindow(MetaContact metaContact,
+ Contact protocolContact)
+ {
+ this.metaContact = metaContact;
+ this.protocolContact = protocolContact;
+ }
+
+ /**
+ * Creates a chat window
+ *
+ * @param metaContact
+ * @param protocolContact
+ * @param isSmsSelected
+ */
+ public RunMessageWindow(MetaContact metaContact,
+ Contact protocolContact, boolean isSmsSelected)
+ {
+ this.metaContact = metaContact;
+ this.protocolContact = protocolContact;
+ this.isSmsSelected = isSmsSelected;
+ }
+
+ /**
+ * Opens a chat window
+ */
+ public void run()
+ {
+ MetaContactChatPanel chatPanel;
+
+ if(protocolContact != null)
+ chatPanel = chatWindowManager
+ .getContactChat(metaContact, protocolContact);
+ else
+ chatPanel = chatWindowManager.getContactChat(metaContact);
+
+ chatPanel.setSmsSelected(isSmsSelected);
+
+ chatWindowManager.openChat(chatPanel, true);
+ }
+ }
+
+ /**
+ * When a message is received determines whether to open a new chat window
+ * or chat window tab, or to indicate that a message is received from a
+ * contact which already has an open chat. When the chat is found checks if
+ * in mode "Auto popup enabled" and if this is the case shows the message in
+ * the appropriate chat panel.
+ *
+ * @param evt the event containing details on the received message
+ */
+ public void messageReceived(MessageReceivedEvent evt)
+ {
+ logger.trace("MESSAGE RECEIVED from contact: "
+ + evt.getSourceContact().getAddress());
+
+ Contact protocolContact = evt.getSourceContact();
+ Date date = evt.getTimestamp();
+ Message message = evt.getSourceMessage();
+ int eventType = evt.getEventType();
+
+ MetaContact metaContact = mainFrame.getContactList()
+ .findMetaContactByContact(protocolContact);
+
+ if(metaContact != null)
+ {
+ // Show an envelope on the sender contact in the contact list and
+ // in the systray.
+ ContactListModel clistModel
+ = (ContactListModel) contactList.getModel();
+
+ clistModel.addActiveContact(metaContact);
+ contactList.refreshContact(metaContact);
+
+ // Obtain the corresponding chat panel.
+ final MetaContactChatPanel chatPanel
+ = chatWindowManager.getContactChat( metaContact,
+ protocolContact,
+ message.getMessageUID());
+
+ // Distinguish the message type, depending on the type of event that
+ // we have received.
+ String messageType = null;
+
+ if(eventType == MessageReceivedEvent.CONVERSATION_MESSAGE_RECEIVED)
+ {
+ messageType = Constants.INCOMING_MESSAGE;
+ }
+ else if(eventType == MessageReceivedEvent.SYSTEM_MESSAGE_RECEIVED)
+ {
+ messageType = Constants.SYSTEM_MESSAGE;
+ }
+ else if(eventType == MessageReceivedEvent.SMS_MESSAGE_RECEIVED)
+ {
+ messageType = Constants.SMS_MESSAGE;
+ }
+
+ chatPanel.processMessage(protocolContact.getDisplayName(), date,
+ messageType, message.getContent(),
+ message.getContentType());
+
+ // A bug Fix for Previous/Next buttons .
+ // Must update buttons state after message is processed
+ // otherwise states are not proper
+ chatPanel.getChatWindow().getMainToolBar().
+ changeHistoryButtonsState(chatPanel);
+
+ // Opens the chat panel with the new message in the UI thread.
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ chatWindowManager.openChat(chatPanel, false);
+ }
+ });
+
+ // Fire notification
+ String title = Messages.getI18NString("msgReceived",
+ new String[]{evt.getSourceContact().getDisplayName()}).getText();
+
+ NotificationManager.fireChatNotification(
+ protocolContact,
+ NotificationManager.INCOMING_MESSAGE,
+ title,
+ message.getContent());
+
+ chatPanel.treatReceivedMessage(protocolContact);
+ }
+ else
+ {
+ logger.trace("MetaContact not found for protocol contact: "
+ + protocolContact + ".");
+ }
+ }
+
+ /**
+ * When a sent message is delivered shows it in the chat conversation panel.
+ *
+ * @param evt the event containing details on the message delivery
+ */
+ public void messageDelivered(MessageDeliveredEvent evt)
+ {
+ Contact contact = evt.getDestinationContact();
+
+ MetaContact metaContact = mainFrame.getContactList()
+ .findMetaContactByContact(contact);
+
+ logger.trace("MESSAGE DELIVERED to contact: "
+ + evt.getDestinationContact().getAddress());
+
+ Message msg = evt.getSourceMessage();
+
+ MetaContactChatPanel chatPanel = null;
+
+ if(chatWindowManager.isChatOpenedForContact(metaContact))
+ chatPanel = chatWindowManager.getContactChat(metaContact);
+
+ if (chatPanel != null)
+ {
+ ProtocolProviderService protocolProvider = evt
+ .getDestinationContact().getProtocolProvider();
+
+ logger.trace("MESSAGE DELIVERED: process message to chat for contact: "
+ + evt.getDestinationContact().getAddress());
+
+ chatPanel.processMessage(this.mainFrame
+ .getAccount(protocolProvider), evt.getTimestamp(),
+ Constants.OUTGOING_MESSAGE, msg.getContent(),
+ msg.getContentType());
+ }
+ }
+
+ /**
+ * Shows a warning message to the user when message delivery has failed.
+ *
+ * @param evt the event containing details on the message delivery failure
+ */
+ public void messageDeliveryFailed(MessageDeliveryFailedEvent evt)
+ {
+ logger.error(evt.getReason());
+
+ String errorMsg = null;
+
+ Message sourceMessage = (Message) evt.getSource();
+
+ Contact sourceContact = evt.getDestinationContact();
+
+ MetaContact metaContact = mainFrame.getContactList()
+ .findMetaContactByContact(sourceContact);
+
+ if (evt.getErrorCode()
+ == MessageDeliveryFailedEvent.OFFLINE_MESSAGES_NOT_SUPPORTED) {
+
+ errorMsg = Messages.getI18NString(
+ "msgDeliveryOfflineNotSupported").getText();
+ }
+ else if (evt.getErrorCode()
+ == MessageDeliveryFailedEvent.NETWORK_FAILURE) {
+
+ errorMsg = Messages.getI18NString("msgNotDelivered").getText();
+ }
+ else if (evt.getErrorCode()
+ == MessageDeliveryFailedEvent.PROVIDER_NOT_REGISTERED) {
+
+ errorMsg = Messages.getI18NString(
+ "msgSendConnectionProblem").getText();
+ }
+ else if (evt.getErrorCode()
+ == MessageDeliveryFailedEvent.INTERNAL_ERROR) {
+
+ errorMsg = Messages.getI18NString(
+ "msgDeliveryInternalError").getText();
+ }
+ else {
+ errorMsg = Messages.getI18NString(
+ "msgDeliveryFailedUnknownError").getText();
+ }
+
+ MetaContactChatPanel chatPanel = chatWindowManager
+ .getContactChat(metaContact, sourceContact);
+
+ chatPanel.processMessage(
+ metaContact.getDisplayName(),
+ new Date(System.currentTimeMillis()),
+ Constants.OUTGOING_MESSAGE,
+ sourceMessage.getContent(),
+ sourceMessage.getContentType());
+
+ chatPanel.processMessage(
+ metaContact.getDisplayName(),
+ new Date(System.currentTimeMillis()),
+ Constants.ERROR_MESSAGE,
+ errorMsg,
+ "text");
+
+ chatWindowManager.openChat(chatPanel, false);
+ }
+
+ /**
+ * Informs the user what is the typing state of his chat contacts.
+ *
+ * @param evt the event containing details on the typing notification
+ */
+ public void typingNotificationReceifed(TypingNotificationEvent evt)
+ {
+ if (typingTimer.isRunning())
+ typingTimer.stop();
+
+ String notificationMsg = "";
+
+ String contactName = this.mainFrame.getContactList()
+ .findMetaContactByContact(evt.getSourceContact())
+ .getDisplayName()
+ + " ";
+
+ if (contactName.equals("")) {
+ contactName = Messages.getI18NString("unknown").getText() + " ";
+ }
+
+ int typingState = evt.getTypingState();
+ MetaContact metaContact = mainFrame.getContactList()
+ .findMetaContactByContact(evt.getSourceContact());
+
+ if (typingState == OperationSetTypingNotifications.STATE_TYPING)
+ {
+ notificationMsg
+ = Messages.getI18NString("contactTyping",
+ new String[]{contactName}).getText();
+
+ typingTimer.setMetaContact(metaContact);
+ typingTimer.start();
+ }
+ else if (typingState == OperationSetTypingNotifications.STATE_PAUSED)
+ {
+ notificationMsg = Messages.getI18NString("contactPausedTyping",
+ new String[]{contactName}).getText();
+ typingTimer.setMetaContact(metaContact);
+ typingTimer.start();
+ }
+ else if (typingState == OperationSetTypingNotifications.STATE_STOPPED)
+ {
+ notificationMsg = "";
+ }
+ else if (typingState == OperationSetTypingNotifications.STATE_STALE)
+ {
+ notificationMsg
+ = Messages.getI18NString("contactTypingStateStale").getText();
+ }
+ else if (typingState == OperationSetTypingNotifications.STATE_UNKNOWN)
+ {
+ // TODO: Implement state unknown
+ }
+ this.setChatNotificationMsg(metaContact, notificationMsg);
+ }
+
+ /**
+ * Sets the typing notification message at the appropriate chat.
+ *
+ * @param metaContact The meta contact.
+ * @param notificationMsg The typing notification message.
+ */
+ public void setChatNotificationMsg(MetaContact metaContact,
+ String notificationMsg)
+ {
+ if(chatWindowManager.isChatOpenedForContact(metaContact))
+ chatWindowManager.getContactChat(metaContact)
+ .setStatusMessage(notificationMsg);
+ }
+
+ /**
+ * Returns the right button menu of the contact list.
+ * @return the right button menu of the contact list
+ */
+ public CommonRightButtonMenu getCommonRightButtonMenu()
+ {
+ return commonRightButtonMenu;
+ }
+
+ /**
+ * The TypingTimer is started after a PAUSED typing notification is
+ * received. It waits 5 seconds and if no other typing event occurs removes
+ * the PAUSED message from the chat status panel.
+ */
+ private class TypingTimer extends Timer
+ {
+
+ private MetaContact metaContact;
+
+ public TypingTimer() {
+ // Set delay
+ super(5 * 1000, null);
+
+ this.addActionListener(new TimerActionListener());
+ }
+
+ private class TimerActionListener implements ActionListener
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ setChatNotificationMsg(metaContact, "");
+ }
+ }
+
+ private void setMetaContact(MetaContact metaContact)
+ {
+ this.metaContact = metaContact;
+ }
+ }
+
+ /**
+ * Opens chat window when the selected value is a MetaContact and opens a
+ * group when the selected value is a MetaContactGroup.
+ */
+ private class ContactListPanelEnterAction extends AbstractAction
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ Object selectedValue = contactList.getSelectedValue();
+
+ if (selectedValue instanceof MetaContact) {
+ MetaContact contact = (MetaContact) selectedValue;
+
+ SwingUtilities.invokeLater(new RunMessageWindow(contact));
+ }
+ else if (selectedValue instanceof MetaContactGroup) {
+ MetaContactGroup group = (MetaContactGroup) selectedValue;
+
+ ContactListModel model
+ = (ContactListModel) contactList.getModel();
+
+ if (model.isGroupClosed(group)) {
+ model.openGroup(group);
+ }
+ }
+ }
+ }
+
+ private class ScrollPaneBackground extends JViewport
+ {
+ BufferedImage bgImage;
+
+ TexturePaint texture;
+
+ public ScrollPaneBackground()
+ {
+ bgImage = ImageLoader.getImage(ImageLoader.MAIN_WINDOW_BACKGROUND);
+// Rectangle rect
+// = new Rectangle(0, 0,
+// bgImage.getWidth(null),
+// bgImage.getHeight(null));
+
+// texture = new TexturePaint(bgImage, rect);
+ }
+
+ public void paintComponent(Graphics g)
+ {
+ // do the superclass behavior first
+ super.paintComponent(g);
+
+ g.setColor(new Color(
+ ColorProperties.getColor("contactListBackground")));
+
+ // paint the background with the choosen color
+ g.fillRect(0, 0, getWidth(), getHeight());
+
+ // paint the image
+ if (bgImage != null)
+ {
+ Graphics2D g2 = (Graphics2D) g;
+
+// g2.setPaint(texture);
+
+ g2.drawImage(bgImage,
+ this.getWidth() - bgImage.getWidth(),
+ this.getHeight() - bgImage.getHeight(),
+ this);
+ }
+ }
+
+ public void setView(JComponent view)
+ {
+ view.setOpaque(false);
+ super.setView(view);
+ }
+ }
+}
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/ExtendedQuickMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/ExtendedQuickMenu.java
index d9afd03..dc8bbf3 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/ExtendedQuickMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/ExtendedQuickMenu.java
@@ -72,10 +72,10 @@ public class ExtendedQuickMenu
ImageLoader.getImage(ImageLoader.QUICK_MENU_SOUND_ON_ICON));
private static int DEFAULT_BUTTON_HEIGHT
- = SizeProperties.getSize("mainToolbarButtonHeight");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonHeight");
private static int DEFAULT_BUTTON_WIDTH
- = SizeProperties.getSize("mainToolbarButtonWidth");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonWidth");
private ExportedWindow configDialog;
@@ -509,7 +509,7 @@ public class ExtendedQuickMenu
this.setFont(getFont().deriveFont(Font.BOLD, 10f));
this.setForeground(new Color(
- ColorProperties.getColor("toolBarForeground")));
+ GuiActivator.getResources().getColor("toolBarForeground")));
this.setVerticalTextPosition(SwingConstants.BOTTOM);
this.setHorizontalTextPosition(SwingConstants.CENTER);
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
index d22ffaf..a6bb1b9 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
@@ -89,7 +89,7 @@ public class FileMenu
super(Messages.getI18NString("file").getText());
this.setForeground(
- new Color(ColorProperties.getColor("mainMenuForeground")));
+ new Color(GuiActivator.getResources().getColor("mainMenuForeground")));
this.parentWindow = parentWindow;
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java
index 80a2f0d..d248a45 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/HelpMenu.java
@@ -52,7 +52,8 @@ public class HelpMenu
this.setMnemonic(Messages.getI18NString("help").getMnemonic());
this.setForeground(
- new Color(ColorProperties.getColor("mainMenuForeground")));
+ new Color(GuiActivator.getResources().
+ getColor("mainMenuForeground")));
this.initPluginComponents();
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/QuickMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/QuickMenu.java
index 608c462..74c05a8 100755
--- a/src/net/java/sip/communicator/impl/gui/main/menus/QuickMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/QuickMenu.java
@@ -68,10 +68,10 @@ public class QuickMenu
ImageLoader.QUICK_MENU_SOUND_ON_ICON)));
private static int BUTTON_HEIGHT
- = SizeProperties.getSize("mainToolbarButtonHeight");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonHeight");
private static int BUTTON_WIDTH
- = SizeProperties.getSize("mainToolbarButtonWidth");
+ = GuiActivator.getResources().getSettingsInt("mainToolbarButtonWidth");
private ExportedWindow configDialog;
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
index 1ac5ed2..11f90f6 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
@@ -55,7 +55,8 @@ public class ToolsMenu
super(Messages.getI18NString("tools").getText());
this.setForeground(
- new Color(ColorProperties.getColor("mainMenuForeground")));
+ new Color(GuiActivator.getResources().
+ getColor("mainMenuForeground")));
this.parentWindow = parentWindow;
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/ViewMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/ViewMenu.java
index 15b80c5..2904343 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/ViewMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/ViewMenu.java
@@ -54,7 +54,8 @@ public class ViewMenu
super(Messages.getI18NString("view").getText());
this.setForeground(
- new Color(ColorProperties.getColor("mainMenuForeground")));
+ new Color(GuiActivator.getResources().
+ getColor("mainMenuForeground")));
this.mainFrame = mainFrame;
diff --git a/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf b/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
index dd7f624..dd2fd58 100644
--- a/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
+++ b/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
@@ -7,6 +7,7 @@ Export-Package: net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.gui.event
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ApplicationProperties.java b/src/net/java/sip/communicator/impl/gui/utils/ApplicationProperties.java
index dc5e5fb..e69de29 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ApplicationProperties.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ApplicationProperties.java
@@ -1,57 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.gui.utils;
-
-import java.util.*;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * Accesses all application properties saved in the application.properties file.
- *
- * @author Yana Stamcheva
- */
-public class ApplicationProperties
-{
- /**
- * Logger for this class.
- */
- private static Logger log = Logger.getLogger(ApplicationProperties.class);
-
- /**
- * Name of the bundle where we will search for color resources.
- */
- private static final String BUNDLE_NAME
- = "resources.application";
-
- /**
- * Bundle which handle access to localized resources.
- */
- private static final ResourceBundle PROPERTIES_BUNDLE = ResourceBundle
- .getBundle( BUNDLE_NAME);
-
- /**
- * Returns the application property corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return the application property corresponding to the given key
- */
- public static String getProperty(String key)
- {
- try
- {
- return PROPERTIES_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- log.error("Missing property.", e);
-
- return "";
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ColorProperties.java b/src/net/java/sip/communicator/impl/gui/utils/ColorProperties.java
index 7b92d47..e69de29 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ColorProperties.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ColorProperties.java
@@ -1,80 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.gui.utils;
-
-import java.util.*;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * Accesses the color resources saved in the colorResources.properties file.
- *
- * @author Yana Stamcheva
- */
-public class ColorProperties
-{
- /**
- * Logger for this class.
- */
- private static Logger log = Logger.getLogger(ColorProperties.class);
-
- /**
- * Name of the bundle where we will search for color resources.
- */
- private static final String BUNDLE_NAME
- = "resources.colors.colorResources";
-
- /**
- * Bundle which handle access to localized resources.
- */
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle( BUNDLE_NAME,
- Locale.getDefault(),
- ColorProperties.class.getClassLoader());
-
- /**
- * Returns an int RGB color corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return An internationalized string corresponding to the given key.
- */
- public static int getColor(String key)
- {
- try
- {
- return Integer.parseInt(RESOURCE_BUNDLE.getString(key), 16);
- }
- catch (MissingResourceException e)
- {
- log.error("Missing color resource.", e);
-
- return 0xFFFFFF;
- }
- }
-
- /**
- * Returns an int RGB color corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return An internationalized string corresponding to the given key.
- */
- public static String getColorString(String key)
- {
- try
- {
- return RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- log.error("Missing color resource.", e);
-
- return "0xFFFFFF";
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/gui/utils/Constants.java b/src/net/java/sip/communicator/impl/gui/utils/Constants.java
index aa3e637..880d4b0 100755
--- a/src/net/java/sip/communicator/impl/gui/utils/Constants.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/Constants.java
@@ -15,6 +15,7 @@ import java.util.*;
import javax.swing.text.html.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
@@ -138,48 +139,55 @@ public class Constants
* record.
*/
public static final Color HISTORY_IN_CALL_COLOR
- = new Color(ColorProperties.getColor("historyIncomingCallBackground"));
+ = new Color(GuiActivator.getResources().
+ getColor("historyIncomingCallBackground"));
/**
* The color used to paint the background of an outgoing call history
* record.
*/
public static final Color HISTORY_OUT_CALL_COLOR
- = new Color(ColorProperties.getColor("historyOutgoingCallBackground"));
+ = new Color(GuiActivator.getResources().
+ getColor("historyOutgoingCallBackground"));
/**
* The end color used to paint a gradient selected background of some
* components.
*/
public static final Color SELECTED_COLOR
- = new Color(ColorProperties.getColor("listSelectionColor"));
+ = new Color(GuiActivator.getResources().
+ getColor("listSelectionColor"));
/**
* The start color used to paint a gradient mouse over background of some
* components.
*/
public static final Color GRADIENT_DARK_COLOR
- = new Color(ColorProperties.getColor("gradientDarkColor"));
+ = new Color(GuiActivator.getResources().
+ getColor("gradientDarkColor"));
/**
* The end color used to paint a gradient mouse over background of some
* components.
*/
public static final Color GRADIENT_LIGHT_COLOR
- = new Color(ColorProperties.getColor("gradientLightColor"));
+ = new Color(GuiActivator.getResources().
+ getColor("gradientLightColor"));
/**
* A color between blue and gray used to paint some borders.
*/
public static final Color BORDER_COLOR
- = new Color(ColorProperties.getColor("borderColor"));
+ = new Color(GuiActivator.getResources().
+ getColor("borderColor"));
/**
* A color between blue and gray (darker than the other one), used to paint
* some borders.
*/
public static final Color LIST_SELECTION_BORDER_COLOR
- = new Color(ColorProperties.getColor("listSelectionBorderColor"));
+ = new Color(GuiActivator.getResources().
+ getColor("listSelectionBorderColor"));
/*
* ======================================================================
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
index 25d1e20..5bcdacb 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java
@@ -10,11 +10,13 @@ package net.java.sip.communicator.impl.gui.utils;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
+import java.net.*;
import java.util.*;
import javax.imageio.*;
import javax.imageio.stream.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.util.*;
/**
@@ -1067,15 +1069,14 @@ public class ImageLoader {
}
else
{
- String path = Images.getString(imageID.getId());
+ URL path = GuiActivator.getResources().getImageURL(imageID.getId());
if (path == null)
return null;
try
{
- image = ImageIO.read(ImageLoader.class.getClassLoader()
- .getResource(path));
+ image = ImageIO.read(path);
loadedImages.put(imageID, image);
}
@@ -1093,16 +1094,22 @@ public class ImageLoader {
* @param imageID The identifier of the image.
* @return The image for the given identifier.
*/
- public static byte[] getImageInBytes(ImageID imageID) {
- byte[] image = new byte[100000];
+ public static byte[] getImageInBytes(ImageID imageID)
+ {
+ InputStream in = GuiActivator.getResources().
+ getImageInputStream(imageID.getId());
- String path = Images.getString(imageID.getId());
- try {
- Images.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ if (in == null)
+ return null;
+ byte[] image = null;
+ try
+ {
+ image = new byte[in.available()];
- } catch (IOException e) {
- log.error("Failed to load image:" + path, e);
+ in.read(image);
+ } catch (IOException e)
+ {
+ log.error("Failed to load image:" + imageID.getId(), e);
}
return image;
@@ -1191,22 +1198,29 @@ public class ImageLoader {
* The image wich path to return.
* @return The path string of an already loaded image, otherwise null.
*/
- public static String getImagePath(Image image) {
-
- String path = null;
-
+ public static String getImagePath(Image image)
+ {
Iterator i = ImageLoader.loadedImages.entrySet().iterator();
while (i.hasNext()) {
Map.Entry entry = (Map.Entry) i.next();
- if (entry.getValue().equals(image)) {
+ if (entry.getValue().equals(image))
+ {
String imageID = ((ImageID) entry.getKey()).getId();
- path = Images.getString(imageID);
+ try
+ {
+ return GuiActivator.getResources().
+ getImageURL(imageID).toURI().toString();
+ }
+ catch(URISyntaxException ex)
+ {
+ log.error("Failed to create path for image " + imageID);
+ }
}
}
- return path;
+ return null;
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/utils/Images.java b/src/net/java/sip/communicator/impl/gui/utils/Images.java
index a11db2e..e69de29 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/Images.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/Images.java
@@ -1,50 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package net.java.sip.communicator.impl.gui.utils;
-
-import java.util.*;
-import net.java.sip.communicator.util.*;
-
-/**
- * Manages the access to the properties file containing all image paths.
- *
- * @author Yana Stamcheva
- */
-public class Images
-{
- private static final Logger logger
- = Logger.getLogger(Images.class);
-
- private static final String BUNDLE_NAME
- = "net.java.sip.communicator.impl.gui.utils.images";
-
- private static final ResourceBundle RESOURCE_BUNDLE
- = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Images() {
- }
-
- /**
- * Returns an image path corresponding to the given image key.
- * @param key The key of the image.
- * @return An image path corresponding to the given image key.
- */
- public static String getString(String key)
- {
- try
- {
- return RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException exc)
- {
- logger.warn("Failed to find image for path " + key, exc);
- }
-
- return null;
- }
-}
diff --git a/src/net/java/sip/communicator/impl/gui/utils/LoginProperties.java b/src/net/java/sip/communicator/impl/gui/utils/LoginProperties.java
index 8c93a9a..e69de29 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/LoginProperties.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/LoginProperties.java
@@ -1,57 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.gui.utils;
-
-import java.util.*;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * Accesses all login properties saved in the login.properties file.
- *
- * @author Yana Stamcheva
- */
-public class LoginProperties
-{
- /**
- * Logger for this class.
- */
- private static Logger log = Logger.getLogger(ColorProperties.class);
-
- /**
- * Name of the bundle where we will search for color resources.
- */
- private static final String BUNDLE_NAME
- = "resources.login";
-
- /**
- * Bundle which handle access to localized resources.
- */
- private static final ResourceBundle PROPERTIES_BUNDLE = ResourceBundle
- .getBundle( BUNDLE_NAME);
-
- /**
- * Returns the application property corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return the application property corresponding to the given key
- */
- public static String getProperty(String key)
- {
- try
- {
- return PROPERTIES_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- log.error("Missing property.", e);
-
- return "";
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/gui/utils/LookAndFeelProperties.java b/src/net/java/sip/communicator/impl/gui/utils/LookAndFeelProperties.java
index c5a9016..e69de29 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/LookAndFeelProperties.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/LookAndFeelProperties.java
@@ -1,57 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.gui.utils;
-
-import java.util.*;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * Accesses all Look&Feel properties saved in the lookandfeel.properties file.
- *
- * @author Yana Stamcheva
- */
-public class LookAndFeelProperties
-{
- /**
- * Logger for this class.
- */
- private static Logger log = Logger.getLogger(LookAndFeelProperties.class);
-
- /**
- * Name of the bundle where we will search for look and feel resources.
- */
- private static final String BUNDLE_NAME
- = "resources.lookandfeel";
-
- /**
- * Bundle which handle access to look and feel resources.
- */
- private static final ResourceBundle PROPERTIES_BUNDLE = ResourceBundle
- .getBundle( BUNDLE_NAME);
-
- /**
- * Returns the look and feel property corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return the look and feel property corresponding to the given key
- */
- public static String getProperty(String key)
- {
- try
- {
- return PROPERTIES_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- log.error("Missing property.", e);
-
- return "";
- }
- }
-} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/impl/gui/utils/SizeProperties.java b/src/net/java/sip/communicator/impl/gui/utils/SizeProperties.java
index 491ec72..e69de29 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/SizeProperties.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/SizeProperties.java
@@ -1,60 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.gui.utils;
-
-import java.util.*;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * Manages the access to the size properties contained in the size.properties
- * file in the resource folder.
- *
- * @author Yana Stamcheva
- */
-public class SizeProperties
-{
- /**
- * Logger for this class.
- */
- private static Logger log = Logger.getLogger(SizeProperties.class);
-
- /**
- * Name of the bundle where we will search for size properties.
- */
- private static final String BUNDLE_NAME
- = "resources.size.size";
-
- /**
- * Bundle which handles access to the size properties.
- */
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle( BUNDLE_NAME,
- Locale.getDefault(),
- SizeProperties.class.getClassLoader());
-
- /**
- * Returns the size corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return the size corresponding to the given key
- */
- public static int getSize(String key)
- {
- try
- {
- return Integer.parseInt(RESOURCE_BUNDLE.getString(key));
- }
- catch (MissingResourceException e)
- {
- log.error("Missing size resource.", e);
-
- return 0;
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/gui/utils/Smiley.java b/src/net/java/sip/communicator/impl/gui/utils/Smiley.java
index 5f9441d..1c47048 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/Smiley.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/Smiley.java
@@ -7,6 +7,8 @@
package net.java.sip.communicator.impl.gui.utils;
+import java.net.*;
+import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.ImageLoader.*;
/**
@@ -76,7 +78,14 @@ public class Smiley {
* Returns the path of the image corresponding to this smily.
* @return the path of the image corresponding to this smily.
*/
- public String getImagePath() {
- return Images.getString(this.getImageID().getId());
+ public String getImagePath()
+ {
+ URL url = GuiActivator.getResources().
+ getImageURL(this.getImageID().getId());
+
+ if(url == null)
+ return null;
+
+ return url.toString();
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java b/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java
index 073f355..b8fc967 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/SoundProperties.java
@@ -67,9 +67,6 @@ public class SoundProperties
private static final String BUNDLE_NAME
= "net.java.sip.communicator.impl.gui.utils.sounds";
- private static final ResourceBundle RESOURCE_BUNDLE
- = ResourceBundle.getBundle(BUNDLE_NAME);
-
private SoundProperties() {
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java b/src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java
index 962c798..7050052 100644
--- a/src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/dict/DictActivator.java
@@ -26,7 +26,7 @@ public class DictActivator
/**
* The currently valid bundle context.
*/
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
private ServiceRegistration dictPpFactoryServReg = null;
private static ProtocolProviderFactoryDictImpl
diff --git a/src/net/java/sip/communicator/impl/protocol/dict/DictStatusEnum.java b/src/net/java/sip/communicator/impl/protocol/dict/DictStatusEnum.java
index 9259dda..2e7144c 100644
--- a/src/net/java/sip/communicator/impl/protocol/dict/DictStatusEnum.java
+++ b/src/net/java/sip/communicator/impl/protocol/dict/DictStatusEnum.java
@@ -86,7 +86,8 @@ public class DictStatusEnum
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = DictStatusEnum.class.getClassLoader().getResourceAsStream(imagePath);
+ InputStream is =
+ ProtocolIconDictImpl.getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try
diff --git a/src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java b/src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java
index d783476..51d315b 100644
--- a/src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/dict/ProtocolIconDictImpl.java
@@ -10,8 +10,11 @@ import java.io.*;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* Reperesents the Dict protocol icon. Implements the <tt>ProtocolIcon</tt>
* interface in order to provide a dict logo image in two different sizes.
@@ -24,6 +27,8 @@ public class ProtocolIconDictImpl
{
private static Logger logger = Logger.getLogger(ProtocolIconDictImpl.class);
+ private static ResourceManagementService resourcesService;
+
/**
* A hash table containing the protocol icon in different sizes.
*/
@@ -83,8 +88,7 @@ public class ProtocolIconDictImpl
* @return The image for the given identifier.
*/
public static byte[] loadIcon(String imagePath) {
- InputStream is = ProtocolIconDictImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
@@ -95,4 +99,21 @@ public class ProtocolIconDictImpl
}
return icon;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = DictActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)DictActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/dict/dict.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/dict/dict.provider.manifest.mf
index ff0b0d2..b2e050c 100644
--- a/src/net/java/sip/communicator/impl/protocol/dict/dict.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/dict/dict.provider.manifest.mf
@@ -6,6 +6,7 @@ Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.util,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java b/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java
index b353774..3fd95dd 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishActivator.java
@@ -38,7 +38,7 @@ public class GibberishActivator
/**
* The currently valid bundle context.
*/
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishStatusEnum.java b/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishStatusEnum.java
index 153a043..00aa715 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishStatusEnum.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/GibberishStatusEnum.java
@@ -154,20 +154,7 @@ public class GibberishStatusEnum
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = GibberishStatusEnum.class.getClassLoader()
- .getResourceAsStream(imagePath);
-
- byte[] icon = null;
- try
- {
- icon = new byte[is.available()];
- is.read(icon);
- }
- catch (IOException exc)
- {
- logger.error("Failed to load icon: " + imagePath, exc);
- }
- return icon;
+ return ProtocolIconGibberishImpl.loadIcon(imagePath);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolIconGibberishImpl.java b/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolIconGibberishImpl.java
index 39e057d..0e0fed0 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolIconGibberishImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/ProtocolIconGibberishImpl.java
@@ -6,19 +6,16 @@
*/
package net.java.sip.communicator.impl.protocol.gibberish;
-import java.awt.image.*;
import java.io.*;
-import java.net.*;
import java.util.*;
-import javax.imageio.*;
-import javax.imageio.stream.*;
-
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.impl.gui.utils.ImageLoader.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* Reperesents the Gibberish protocol icon. Implements the <tt>ProtocolIcon</tt>
* interface in order to provide a gibberish logo image in two different sizes.
@@ -31,6 +28,8 @@ public class ProtocolIconGibberishImpl
private static Logger logger
= Logger.getLogger(ProtocolIconGibberishImpl.class);
+ private static ResourceManagementService resourcesService;
+
/**
* A hash table containing the protocol icon in different sizes.
*/
@@ -85,8 +84,7 @@ public class ProtocolIconGibberishImpl
* @return The image for the given identifier.
*/
public static byte[] loadIcon(String imagePath) {
- InputStream is = ProtocolIconGibberishImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
@@ -97,4 +95,21 @@ public class ProtocolIconGibberishImpl
}
return icon;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = GibberishActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)GibberishActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/gibberish/gibberish.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/gibberish/gibberish.provider.manifest.mf
index 86b00cb..4bb0210 100644
--- a/src/net/java/sip/communicator/impl/protocol/gibberish/gibberish.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/gibberish/gibberish.provider.manifest.mf
@@ -4,6 +4,7 @@ Bundle-Description: A bundle providing support for the Gibberish protocol.
Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.util,
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/AimStatusEnum.java b/src/net/java/sip/communicator/impl/protocol/icq/AimStatusEnum.java
new file mode 100644
index 0000000..ca92400
--- /dev/null
+++ b/src/net/java/sip/communicator/impl/protocol/icq/AimStatusEnum.java
@@ -0,0 +1,99 @@
+package net.java.sip.communicator.impl.protocol.icq;
+
+import java.io.*;
+import java.util.*;
+
+import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
+
+/**
+ * An enumeration containing all status instances that MUST be supported by
+ * an implementation of the AIM (Oscar) protocol. Implementations may
+ * support other forms of PresenceStatus but they MUST ALL support those
+ * enumerated here.
+ * <p>
+ * For testing purposes, this class also provides a <tt>List</tt> containing
+ * all of the status fields.
+ *
+ * @author Emil Ivov
+ */
+public class AimStatusEnum
+ extends PresenceStatus
+{
+
+ private static Logger logger = Logger.getLogger(AimStatusEnum.class);
+
+ /**
+ * The Online AIM status. Indicate that the user is able and willing to
+ * communicate.
+ */
+ public static final AimStatusEnum ONLINE
+ = new AimStatusEnum(65, "Online",
+ loadIcon("resources/images/protocol/aim/aim16x16-online.png"));
+
+ /**
+ * The Invisible AIM status. Indicates that the user has connectivity even
+ * though it may appear otherwise to others, to whom she would appear to be
+ * offline.
+ */
+ public static final AimStatusEnum INVISIBLE
+ = new AimStatusEnum(45, "Invisible",
+ loadIcon("resources/images/protocol/aim/aim16x16-invisible.png"));
+
+ /**
+ * The Away AIM status. Indicates that the user has connectivity but might
+ * not be able to immediately act upon initiation of communication.
+ */
+ public static final AimStatusEnum AWAY
+ = new AimStatusEnum(40, "Away",
+ loadIcon("resources/images/protocol/aim/aim16x16-away.png"));
+
+ /**
+ * The Offline AIM status. Indicates the user does not seem to be connected
+ * to the AIM network or at least does not want us to know she is
+ */
+ public static final AimStatusEnum OFFLINE
+ = new AimStatusEnum(0, "Offline",
+ loadIcon("resources/images/protocol/aim/aim16x16-offline.png"));
+
+ /**
+ * The minimal set of states that any AIM implementation must support.
+ */
+ public static final ArrayList aimStatusSet =new ArrayList();
+ static{
+ aimStatusSet.add(ONLINE);
+ aimStatusSet.add(INVISIBLE);
+ aimStatusSet.add(AWAY);
+ aimStatusSet.add(OFFLINE);
+ }
+
+ /**
+ * Creates a status with the specified connectivity coeff, name and icon.
+ * @param status the connectivity coefficient for the specified status
+ * @param statusName String
+ * @param statusIcon the icon associated with this status
+ */
+ protected AimStatusEnum(int status, String statusName, byte[] statusIcon)
+ {
+ super(status, statusName, statusIcon);
+ }
+
+ /**
+ * Loads an image from a given image path.
+ * @param imagePath The identifier of the image.
+ * @return The image for the given identifier.
+ */
+ public static byte[] loadIcon(String imagePath) {
+ InputStream is = AimStatusEnum.class.getClassLoader()
+ .getResourceAsStream(imagePath);
+
+ byte[] icon = null;
+ try {
+ icon = new byte[is.available()];
+ is.read(icon);
+ } catch (IOException e) {
+ logger.error("Failed to load icon: " + imagePath, e);
+ }
+ return icon;
+ }
+}
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java
index a8d7d3f..11a990b 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java
@@ -4,7 +4,6 @@ import java.util.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.icqconstants.*;
-import net.java.sip.communicator.service.protocol.aimconstants.*;
import net.kano.joustsim.oscar.oscar.service.ssi.*;
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/IcqActivator.java b/src/net/java/sip/communicator/impl/protocol/icq/IcqActivator.java
index 255ebeb..5ecfa38 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/IcqActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/IcqActivator.java
@@ -17,7 +17,7 @@ public class IcqActivator
{
private ServiceRegistration icqPpFactoryServReg = null;
private ServiceRegistration aimPpFactoryServReg = null;
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
private static ConfigurationService configurationService = null;
private static ProtocolProviderFactoryIcqImpl icqProviderFactory = null;
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
index d58fe3a..bbd7a79 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetBasicInstantMessagingIcqImpl.java
@@ -20,7 +20,6 @@ import net.kano.joscar.snaccmd.icq.*;
import net.kano.joustsim.*;
import net.kano.joustsim.oscar.oscar.service.icbm.*;
import net.java.sip.communicator.service.protocol.icqconstants.*;
-import net.java.sip.communicator.service.protocol.aimconstants.*;
/**
* A straightforward implementation of the basic instant messaging operation
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
index 7c63a7a..d11ec29 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java
@@ -12,7 +12,6 @@ import java.util.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.protocol.icqconstants.*;
-import net.java.sip.communicator.service.protocol.aimconstants.*;
import net.java.sip.communicator.service.protocol.AuthorizationResponse.*;
import net.java.sip.communicator.util.*;
import net.kano.joscar.*;
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconAimImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconAimImpl.java
index 0c56539..5a7b61c 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconAimImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconAimImpl.java
@@ -10,7 +10,9 @@ import java.io.*;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
/**
* Reperesents the Aim protocol icon. Implements the <tt>ProtocolIcon</tt>
@@ -23,6 +25,8 @@ public class ProtocolIconAimImpl
{
private static Logger logger = Logger.getLogger(ProtocolIconAimImpl.class);
+ private static ResourceManagementService resourcesService;
+
/**
* A hash table containing the protocol icon in different sizes.
*/
@@ -78,8 +82,7 @@ public class ProtocolIconAimImpl
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = ProtocolIconAimImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
@@ -90,4 +93,21 @@ public class ProtocolIconAimImpl
}
return icon;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = IcqActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)IcqActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconIcqImpl.java
index d75a75a..2ed212d 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconIcqImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolIconIcqImpl.java
@@ -10,7 +10,9 @@ import java.io.*;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
/**
* Reperesents the Icq protocol icon. Implements the <tt>ProtocolIcon</tt>
@@ -23,6 +25,8 @@ public class ProtocolIconIcqImpl
{
private static Logger logger = Logger.getLogger(ProtocolIconIcqImpl.class);
+ private static ResourceManagementService resourcesService;
+
/**
* A hash table containing the protocol icon in different sizes.
*/
@@ -78,8 +82,7 @@ public class ProtocolIconIcqImpl
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = ProtocolIconIcqImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
@@ -90,4 +93,21 @@ public class ProtocolIconIcqImpl
}
return icon;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = IcqActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)IcqActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/icq/icq.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/icq/icq.provider.manifest.mf
index 36574bf..a0fda28 100644
--- a/src/net/java/sip/communicator/impl/protocol/icq/icq.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/icq/icq.provider.manifest.mf
@@ -7,6 +7,7 @@ Import-Package: org.osgi.framework,
javax.net,
sun.misc,
net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/ProtocolIconIrcImpl.java b/src/net/java/sip/communicator/impl/protocol/irc/ProtocolIconIrcImpl.java
index bd753df..e653a66 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/ProtocolIconIrcImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/ProtocolIconIrcImpl.java
@@ -10,8 +10,11 @@ import java.io.*;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* Represents the IRC protocol icon. Implements the <tt>ProtocolIcon</tt>
* interface in order to provide an IRC icon image in two different sizes.
@@ -24,6 +27,8 @@ public class ProtocolIconIrcImpl
{
private static Logger logger = Logger.getLogger(ProtocolIconIrcImpl.class);
+ private static ResourceManagementService resourcesService;
+
/**
* A hash table containing the protocol icon in different sizes.
*/
@@ -79,8 +84,7 @@ public class ProtocolIconIrcImpl
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = ProtocolIconIrcImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
@@ -91,4 +95,21 @@ public class ProtocolIconIrcImpl
}
return icon;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = IrcActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)IrcActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/irc.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/irc/irc.provider.manifest.mf
index 7a1bf0b..b11d55b 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/irc.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/irc/irc.provider.manifest.mf
@@ -6,6 +6,7 @@ Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event \ No newline at end of file
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java b/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java
index f4cff4d..5e318e6 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java
@@ -31,7 +31,7 @@ public class JabberActivator
/**
* Bundle context from OSGi.
*/
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
/**
* Configuration service.
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java
index 5480b3f..d9e17d2 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java
@@ -10,9 +10,11 @@ import java.io.*;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.service.protocol.jabberconstants.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* Reperesents the Jabber protocol icon. Implements the <tt>ProtocolIcon</tt>
* interface in order to provide a jabber icon image in two different sizes.
@@ -30,6 +32,8 @@ public class ProtocolIconJabberImpl
*/
private final String iconPath;
+ private static ResourceManagementService resourcesService;
+
/**
* A hash table containing the protocol icon in different sizes.
*/
@@ -93,9 +97,33 @@ public class ProtocolIconJabberImpl
* @param imagePath The identifier of the image.
* @return The image for the given identifier.
*/
- public static byte[] loadIcon(String imagePath)
+ public static byte[] loadIcon(String imagePath) {
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
+
+ byte[] icon = null;
+ try {
+ icon = new byte[is.available()];
+ is.read(icon);
+ } catch (IOException e) {
+ logger.error("Failed to load icon: " + imagePath, e);
+ }
+ return icon;
+ }
+
+ public static ResourceManagementService getResources()
{
- return JabberStatusEnum.loadIcon(imagePath,
- ProtocolIconJabberImpl.class);
- }
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = JabberActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)JabberActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf
index 18388ff..780867b 100755
--- a/src/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/jabber.provider.manifest.mf
@@ -19,6 +19,7 @@ Import-Package: org.osgi.framework,
org.jivesoftware.smackx.jingle.packet,
org.jivesoftware.smackx.jingle.provider,
net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/MsnActivator.java b/src/net/java/sip/communicator/impl/protocol/msn/MsnActivator.java
index fc144a0..7dbb079 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/MsnActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/MsnActivator.java
@@ -11,6 +11,7 @@ import java.util.*;
import org.osgi.framework.*;
import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
/**
* Loads the MSN provider factory and registers it with service in the OSGI
@@ -26,6 +27,8 @@ public class MsnActivator
private static ConfigurationService configurationService = null;
private static ProtocolProviderFactoryMsnImpl msnProviderFactory = null;
+
+ private static ResourceManagementService resourcesService;
/**
* Called when this bundle is started so the Framework can perform the
@@ -112,4 +115,21 @@ public class MsnActivator
msnProviderFactory.stop();
msnPpFactoryServReg.unregister();
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService) bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java
index 284a16f..bf07574 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/OperationSetBasicInstantMessagingMsnImpl.java
@@ -349,7 +349,8 @@ public class OperationSetBasicInstantMessagingMsnImpl
}
Message newMailMessage = new MessageMsnImpl(
- MessageFormat.format(Resources.getString("newMail"),
+ MessageFormat.format(
+ MsnActivator.getResources().getI18NString("newMail"),
new Object[]{message.getFrom(),
message.getFromAddr(),
subject}),
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/ProtocolIconMsnImpl.java b/src/net/java/sip/communicator/impl/protocol/msn/ProtocolIconMsnImpl.java
index fbeabc1..a6f6826 100644
--- a/src/net/java/sip/communicator/impl/protocol/msn/ProtocolIconMsnImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/msn/ProtocolIconMsnImpl.java
@@ -77,8 +77,8 @@ public class ProtocolIconMsnImpl
* @return The image for the given identifier.
*/
public static byte[] loadIcon(String imagePath) {
- InputStream is = ProtocolIconMsnImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is =
+ MsnActivator.getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/Resources.java b/src/net/java/sip/communicator/impl/protocol/msn/Resources.java
deleted file mode 100644
index 7077827..0000000
--- a/src/net/java/sip/communicator/impl/protocol/msn/Resources.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package net.java.sip.communicator.impl.protocol.msn;
-
-import java.io.*;
-import java.util.*;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * The Resources class manages the access to the internationalization
- * properties files.
- *
- * @author Yana Stamcheva
- */
-public class Resources
-{
-
- /**
- * Logger for this class.
- */
- private static Logger log = Logger.getLogger(Resources.class);
-
- /**
- * Name of the bundle were we will search for localized string.
- */
- private static final String BUNDLE_NAME
- = "net.java.sip.communicator.impl.protocol.msn.resources";
-
- /**
- * Bundle which handle access to localized resources.
- */
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- /**
- * Returns an internationalized string corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return An internationalized string corresponding to the given key.
- */
- public static String getString(String key)
- {
- try
- {
- return RESOURCE_BUNDLE.getString(key);
-
- }
- catch (MissingResourceException e) {
-
- return '!' + key + '!';
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/msn.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/msn/msn.provider.manifest.mf
index 7eecccd..75d1cd6 100755
--- a/src/net/java/sip/communicator/impl/protocol/msn/msn.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/msn/msn.provider.manifest.mf
@@ -12,6 +12,7 @@ Import-Package: org.osgi.framework,
org.xml.sax,
sun.security.action,
net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/impl/protocol/msn/resources.properties b/src/net/java/sip/communicator/impl/protocol/msn/resources.properties
deleted file mode 100644
index fe2231a..0000000
--- a/src/net/java/sip/communicator/impl/protocol/msn/resources.properties
+++ /dev/null
@@ -1 +0,0 @@
-newMail=You have one new Mail from {0} ({1}) with subject: {2}
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/ProtocolIconRssImpl.java b/src/net/java/sip/communicator/impl/protocol/rss/ProtocolIconRssImpl.java
index 2133dbd..a08551f 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/ProtocolIconRssImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/ProtocolIconRssImpl.java
@@ -6,18 +6,14 @@
*/
package net.java.sip.communicator.impl.protocol.rss;
-import java.awt.image.*;
import java.io.*;
-import java.net.*;
import java.util.*;
-import javax.imageio.*;
-import javax.imageio.stream.*;
-
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.impl.gui.utils.ImageLoader.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.ServiceReference;
/**
* Reperesents the Rss protocol icon. Implements the <tt>ProtocolIcon</tt>
@@ -31,6 +27,8 @@ public class ProtocolIconRssImpl
private static Logger logger
= Logger.getLogger(ProtocolIconRssImpl.class);
+ private static ResourceManagementService resourcesService;
+
/**
* A hash table containing the protocol icon in different sizes.
*/
@@ -87,8 +85,7 @@ public class ProtocolIconRssImpl
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = ProtocolIconRssImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
@@ -99,4 +96,21 @@ public class ProtocolIconRssImpl
}
return icon;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = RssActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)RssActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java b/src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java
index 2c9a391..77b1bcf 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/RssActivator.java
@@ -39,7 +39,7 @@ public class RssActivator
/**
* The currently valid bundle context.
*/
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/RssStatusEnum.java b/src/net/java/sip/communicator/impl/protocol/rss/RssStatusEnum.java
index 263241a..e374345 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/RssStatusEnum.java
+++ b/src/net/java/sip/communicator/impl/protocol/rss/RssStatusEnum.java
@@ -85,20 +85,7 @@ public class RssStatusEnum
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = RssStatusEnum.class.getClassLoader()
- .getResourceAsStream(imagePath);
-
- byte[] icon = null;
- try
- {
- icon = new byte[is.available()];
- is.read(icon);
- }
- catch (IOException exc)
- {
- logger.error("Failed to load icon: " + imagePath, exc);
- }
- return icon;
+ return ProtocolIconRssImpl.loadIcon(imagePath);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/rss/rss.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/rss/rss.provider.manifest.mf
index e1c5bf6..baebfc5 100644
--- a/src/net/java/sip/communicator/impl/protocol/rss/rss.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/rss/rss.provider.manifest.mf
@@ -11,6 +11,7 @@ Import-Package: org.osgi.framework,
javax.xml.parsers,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetSmsMessagingSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetSmsMessagingSipImpl.java
new file mode 100644
index 0000000..bafffc7
--- /dev/null
+++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetSmsMessagingSipImpl.java
@@ -0,0 +1,728 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.impl.protocol.sip;
+
+import java.io.*;
+import java.net.*;
+import java.text.*;
+import java.util.*;
+import javax.sip.*;
+import javax.sip.address.*;
+import javax.sip.header.*;
+import javax.sip.message.*;
+
+import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.protocol.Message;
+import net.java.sip.communicator.service.protocol.event.*;
+import net.java.sip.communicator.util.*;
+
+/**
+ * A straightforward implementation of the basic instant messaging operation
+ * set.
+ *
+ * @author Benoit Pradelle
+ */
+public class OperationSetSmsMessagingSipImpl
+ implements OperationSetSmsMessaging, SipMessageProcessor
+{
+ private static final Logger logger =
+ Logger.getLogger(OperationSetBasicInstantMessagingSipImpl.class);
+
+ /**
+ * A list of listeners registered for message events.
+ */
+ private Vector messageListeners = new Vector();
+
+ /**
+ * The provider that created us.
+ */
+ private ProtocolProviderServiceSipImpl sipProvider = null;
+
+ /**
+ * A reference to the persistent presence operation set that we use
+ * to match incoming messages to <tt>Contact</tt>s and vice versa.
+ */
+ private OperationSetPresenceSipImpl opSetPersPresence = null;
+
+ /**
+ * A reference to the persistent presence operation set that we use
+ * to match incoming messages to <tt>Contact</tt>s and vice versa.
+ */
+ private OperationSetBasicInstantMessagingSipImpl opSetBasicIm = null;
+
+ private static final String SMS_OUTGOING_MESSAGE_HEADER = "P-Send-SMS";
+ private static final String[] SMS_OUTGOING_MESSAGE_HEADER_VALUES =
+ new String[]{"simple", "confirmation-request", "premium"};
+ private static final String SMS_OUTGOING_DEFAULT_MESSAGE_HEADER_VALUE =
+ SMS_OUTGOING_MESSAGE_HEADER_VALUES[0];
+ private static final String SMS_RECEIVED_MESSAGE_HEADER = "P-Received-SMS";
+
+ /**
+ * Creates an instance of this operation set.
+ * @param provider a ref to the <tt>ProtocolProviderServiceImpl</tt>
+ * that created us and that we'll use for retrieving the underlying aim
+ * connection.
+ */
+ OperationSetSmsMessagingSipImpl(
+ ProtocolProviderServiceSipImpl provider,
+ OperationSetBasicInstantMessagingSipImpl opSetBasicIm)
+ {
+ this.sipProvider = provider;
+
+ provider.addRegistrationStateChangeListener(new
+ RegistrationStateListener());
+ this.opSetBasicIm = opSetBasicIm;
+ opSetBasicIm.addMessageProcessor(this);
+ }
+
+ /**
+ * Registers a MessageListener with this operation set so that it gets
+ * notifications of successful message delivery, failure or reception of
+ * incoming messages..
+ *
+ * @param listener the <tt>MessageListener</tt> to register.
+ */
+ public void addMessageListener(MessageListener listener)
+ {
+ synchronized (this.messageListeners)
+ {
+ if (!this.messageListeners.contains(listener))
+ {
+ this.messageListeners.add(listener);
+ }
+ }
+ }
+
+ /**
+ * Unregisters <tt>listener</tt> so that it won't receive any further
+ * notifications upon successful message delivery, failure or reception of
+ * incoming messages..
+ *
+ * @param listener the <tt>MessageListener</tt> to unregister.
+ */
+ public void removeMessageListener(MessageListener listener)
+ {
+ synchronized (this.messageListeners)
+ {
+ this.messageListeners.remove(listener);
+ }
+ }
+
+ /**
+ * Create a Message instance for sending arbitrary MIME-encoding content.
+ *
+ * @param content content value
+ * @param contentType the MIME-type for <tt>content</tt>
+ * @param contentEncoding encoding used for <tt>content</tt>
+ * @return the newly created message.
+ */
+ public Message createMessage(byte[] content, String contentType,
+ String contentEncoding)
+ {
+ return opSetBasicIm.createMessage(
+ content, contentType, contentEncoding, null);
+ }
+
+ /**
+ * Create a Message instance for sending a simple text messages with
+ * default (text/plain) content type and encoding.
+ *
+ * @param messageText the string content of the message.
+ * @return Message the newly created message
+ */
+ public Message createMessage(String messageText)
+ {
+ return opSetBasicIm.createMessage(messageText);
+ }
+
+ /**
+ * Determines whether the protocol supports the supplied content type
+ *
+ * @param contentType the type we want to check
+ * @return <tt>true</tt> if the protocol supports it and
+ * <tt>false</tt> otherwise.
+ */
+ public boolean isContentTypeSupported(String contentType)
+ {
+ if(contentType.equals(DEFAULT_MIME_TYPE))
+ return true;
+ else
+ return false;
+ }
+
+ /**
+ * Sends the <tt>message</tt> to the destination indicated by the
+ * <tt>to</tt> contact.
+ *
+ * @param to the destination to send <tt>message</tt> to
+ * @param message the <tt>Message</tt> to send.
+ * @throws java.lang.IllegalStateException if the underlying stack is
+ * not registered and initialized.
+ * @throws java.lang.IllegalArgumentException if <tt>to</tt> is not an
+ * instance of ContactImpl.
+ */
+ public void sendSmsMessage(String to, Message message)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ ContactSipImpl volatileContact =
+ (ContactSipImpl)opSetPersPresence.findContactByID(to);
+
+ // check if contact already exist
+ if(volatileContact == null)
+ volatileContact = opSetPersPresence.createVolatileContact(to);
+
+ sendSmsMessage(volatileContact, message);
+ }
+
+ /**
+ * Sends the <tt>message</tt> to the destination indicated by the
+ * <tt>to</tt> contact.
+ *
+ * @param to the <tt>Contact</tt> to send <tt>message</tt> to
+ * @param message the <tt>Message</tt> to send.
+ * @throws java.lang.IllegalStateException if the underlying stack is
+ * not registered and initialized.
+ * @throws java.lang.IllegalArgumentException if <tt>to</tt> is not an
+ * instance of ContactImpl.
+ */
+ public void sendSmsMessage(Contact to, Message message)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ if (! (to instanceof ContactSipImpl))
+ throw new IllegalArgumentException(
+ "The specified contact is not a Sip contact."
+ + to);
+
+ assertConnected();
+
+ // create the message
+ Request mes;
+ try
+ {
+ mes = opSetBasicIm.createMessage(to, message);
+ }
+ catch (OperationFailedException ex)
+ {
+ logger.error(
+ "Failed to create the message."
+ , ex);
+
+ MessageDeliveryFailedEvent evt =
+ new MessageDeliveryFailedEvent(
+ message,
+ to,
+ MessageDeliveryFailedEvent.INTERNAL_ERROR,
+ new Date());
+ fireMessageEvent(evt);
+ return;
+ }
+
+ Header smsHeader = null;
+ try
+ {
+ smsHeader = this.sipProvider.getHeaderFactory()
+ .createHeader(SMS_OUTGOING_MESSAGE_HEADER,
+ SMS_OUTGOING_DEFAULT_MESSAGE_HEADER_VALUE);
+ }
+ catch (ParseException exc)
+ {
+ //shouldn't happen
+ logger.error(
+ "An unexpected error occurred while"
+ + "constructing the SmsHeadder", exc);
+
+ MessageDeliveryFailedEvent evt =
+ new MessageDeliveryFailedEvent(
+ message,
+ to,
+ MessageDeliveryFailedEvent.INTERNAL_ERROR,
+ new Date());
+ fireMessageEvent(evt);
+ return;
+ }
+
+ mes.addHeader(smsHeader);
+
+ try
+ {
+ opSetBasicIm.sendRequestMessage(mes, to, message);
+ }
+ catch(TransactionUnavailableException ex)
+ {
+ logger.error(
+ "Failed to create messageTransaction.\n"
+ + "This is most probably a network connection error."
+ , ex);
+
+ MessageDeliveryFailedEvent evt =
+ new MessageDeliveryFailedEvent(
+ message,
+ to,
+ MessageDeliveryFailedEvent.NETWORK_FAILURE,
+ new Date());
+ fireMessageEvent(evt);
+ return;
+ }
+ catch(SipException ex)
+ {
+ logger.error(
+ "Failed to send the message."
+ , ex);
+
+ MessageDeliveryFailedEvent evt =
+ new MessageDeliveryFailedEvent(
+ message,
+ to,
+ MessageDeliveryFailedEvent.INTERNAL_ERROR,
+ new Date());
+ fireMessageEvent(evt);
+ return;
+ }
+ }
+
+ /**
+ * Utility method throwing an exception if the stack is not properly
+ * initialized.
+ * @throws java.lang.IllegalStateException if the underlying stack is
+ * not registered and initialized.
+ */
+ private void assertConnected()
+ throws IllegalStateException
+ {
+ if (this.sipProvider == null)
+ throw new IllegalStateException(
+ "The provider must be non-null and signed on the "
+ + "service before being able to communicate.");
+ if (!this.sipProvider.isRegistered())
+ throw new IllegalStateException(
+ "The provider must be signed on the service before "
+ + "being able to communicate.");
+ }
+
+ /**
+ * Our listener that will tell us when we're registered to
+ */
+ private class RegistrationStateListener
+ implements RegistrationStateChangeListener
+ {
+ /**
+ * The method is called by a ProtocolProvider implementation whenever
+ * a change in the registration state of the corresponding provider had
+ * occurred.
+ * @param evt ProviderStatusChangeEvent the event describing the status
+ * change.
+ */
+ public void registrationStateChanged(RegistrationStateChangeEvent evt)
+ {
+ logger.debug("The provider changed state from: "
+ + evt.getOldState()
+ + " to: " + evt.getNewState());
+
+ if (evt.getNewState() == RegistrationState.REGISTERED)
+ {
+ opSetPersPresence = (OperationSetPresenceSipImpl)
+ sipProvider.getSupportedOperationSets()
+ .get(OperationSetPersistentPresence.class.getName());
+ }
+ }
+ }
+
+ /**
+ * Delivers the specified event to all registered message listeners.
+ * @param evt the <tt>EventObject</tt> that we'd like delivered to all
+ * registered message listeners.
+ */
+ private void fireMessageEvent(EventObject evt)
+ {
+ Iterator listeners = null;
+ synchronized (this.messageListeners)
+ {
+ listeners = new ArrayList(this.messageListeners).iterator();
+ }
+
+ while (listeners.hasNext())
+ {
+ MessageListener listener
+ = (MessageListener) listeners.next();
+
+ if (evt instanceof MessageDeliveredEvent)
+ {
+ listener.messageDelivered( (MessageDeliveredEvent) evt);
+ }
+ else if (evt instanceof MessageReceivedEvent)
+ {
+ listener.messageReceived( (MessageReceivedEvent) evt);
+ }
+ else if (evt instanceof MessageDeliveryFailedEvent)
+ {
+ listener.messageDeliveryFailed(
+ (MessageDeliveryFailedEvent) evt);
+ }
+ }
+ }
+
+ /**
+ * Process the incoming sip messages
+ * @param requestEvent the incoming event holding the message
+ * @return whether this message needs further processing(true) or no(false)
+ */
+ public boolean processMessage(RequestEvent requestEvent)
+ {
+ // get the content
+ String content = null;
+
+ try
+ {
+ Request req = requestEvent.getRequest();
+
+ // ignore messages which are not sms and continue processing
+ if(req.getHeader(SMS_RECEIVED_MESSAGE_HEADER) == null)
+ return true;
+
+ content = new String(req.getRawContent(), getCharset(req));
+ }
+ catch (UnsupportedEncodingException ex)
+ {
+ logger.debug("failed to convert the message charset");
+ content = new String(requestEvent.getRequest().getRawContent());
+ }
+
+ // who sent this request ?
+ FromHeader fromHeader = (FromHeader)
+ requestEvent.getRequest().getHeader(FromHeader.NAME);
+
+ if (fromHeader == null)
+ {
+ logger.error("received a request without a from header");
+ // no further processing
+ return false;
+ }
+
+ Contact from = resolveContact(
+ fromHeader.getAddress().getURI().toString());
+ Message newMessage = createMessage(content);
+
+ if (from == null) {
+ logger.debug("received a message from an unknown contact: "
+ + fromHeader.getAddress().getURI().toString());
+ //create the volatile contact
+ from = opSetPersPresence
+ .createVolatileContact(fromHeader.getAddress().getURI()
+ .toString().substring(4));
+ }
+
+ // answer ok
+ try
+ {
+ Response ok = sipProvider.getMessageFactory()
+ .createResponse(Response.OK, requestEvent.getRequest());
+ SipProvider jainSipProvider = (SipProvider) requestEvent.
+ getSource();
+ jainSipProvider.getNewServerTransaction(
+ requestEvent.getRequest()).sendResponse(ok);
+ }
+ catch (ParseException exc)
+ {
+ logger.error("failed to build the response", exc);
+ }
+ catch (SipException exc)
+ {
+ logger.error("failed to send the response : "
+ + exc.getMessage(),
+ exc);
+ }
+ catch (InvalidArgumentException exc)
+ {
+ logger.debug("Invalid argument for createResponse : "
+ + exc.getMessage(),
+ exc);
+ }
+
+ // fire an event
+ MessageReceivedEvent msgReceivedEvt
+ = new MessageReceivedEvent(
+ newMessage, from, new Date(),
+ MessageReceivedEvent.SMS_MESSAGE_RECEIVED);
+ fireMessageEvent(msgReceivedEvt);
+
+ // no further processing
+ return false;
+ }
+
+ /**
+ * Process the responses of sent messages
+ * @param responseEvent the incoming event holding the response
+ * @return whether this message needs further processing(true) or no(false)
+ */
+ public boolean processResponse(ResponseEvent responseEvent, Map sentMsg)
+ {
+ Request req = responseEvent.getClientTransaction().getRequest();
+
+ // ignore messages which are not sms and continue processing
+ if(req.getHeader(SMS_OUTGOING_MESSAGE_HEADER) == null)
+ return true;
+
+ int status = responseEvent.getResponse().getStatusCode();
+
+ // content of the response
+ String content = null;
+
+ try
+ {
+ content = new String(req.getRawContent(), getCharset(req));
+ }
+ catch (UnsupportedEncodingException exc)
+ {
+ logger.debug("failed to convert the message charset", exc);
+ content = new String(req.getRawContent());
+ }
+
+ // to who did we send the original message ?
+ ToHeader toHeader = (ToHeader)
+ req.getHeader(ToHeader.NAME);
+
+ if (toHeader == null)
+ {
+ // should never happen
+ logger.error("send a request without a to header");
+ return false;
+ }
+
+ Contact to = resolveContact(toHeader.getAddress()
+ .getURI().toString());
+
+ if (to == null) {
+ logger.error(
+ "Error received a response from an unknown contact : "
+ + toHeader.getAddress().getURI().toString() + " : "
+ + responseEvent.getResponse().getReasonPhrase());
+
+ // error for delivering the message
+ MessageDeliveryFailedEvent evt =
+ new MessageDeliveryFailedEvent(
+ // we don't know what message it concerns
+ createMessage(content),
+ to,
+ MessageDeliveryFailedEvent.INTERNAL_ERROR,
+ new Date());
+ fireMessageEvent(evt);
+
+ return false;
+ }
+
+ // we retrieve the original message
+ String key = ((CallIdHeader)req.getHeader(CallIdHeader.NAME))
+ .getCallId();
+
+ Message newMessage = (Message) sentMsg.get(key);
+
+ if (newMessage == null) {
+ // should never happen
+ logger.error("Couldn't find the message sent");
+
+ // error for delivering the message
+ MessageDeliveryFailedEvent evt =
+ new MessageDeliveryFailedEvent(
+ // we don't know what message it is
+ createMessage(content),
+ to,
+ MessageDeliveryFailedEvent.INTERNAL_ERROR,
+ new Date());
+ fireMessageEvent(evt);
+
+ return false;
+ }
+
+ // status 401/407 = proxy authentification
+ if (status >= 400 && status != 401 && status != 407)
+ {
+ logger.info(
+ "Error received from the network : "
+ + responseEvent.getResponse().getReasonPhrase());
+
+ // error for delivering the message
+ MessageDeliveryFailedEvent evt =
+ new MessageDeliveryFailedEvent(
+ newMessage,
+ to,
+ MessageDeliveryFailedEvent.NETWORK_FAILURE,
+ new Date(),
+ responseEvent.getResponse().getReasonPhrase());
+ fireMessageEvent(evt);
+ sentMsg.remove(key);
+
+ return false;
+ }
+ else if (status == 401 || status == 407)
+ {
+ return true;
+ }
+ else if (status >= 200)
+ {
+ logger.debug(
+ "Ack received from the network : "
+ + responseEvent.getResponse().getReasonPhrase());
+
+ // we delivered the message
+ MessageDeliveredEvent msgDeliveredEvt
+ = new MessageDeliveredEvent(
+ newMessage, to, new Date());
+
+ fireMessageEvent(msgDeliveredEvt);
+
+ // we don't need this message anymore
+ sentMsg.remove(key);
+
+ return false;
+ }
+
+ return false;
+ }
+
+ public boolean processTimeout(TimeoutEvent timeoutEvent, Map sentMessages)
+ {
+ // this is normaly handled by the SIP stack
+ logger.error("Timeout event thrown : " + timeoutEvent.toString());
+
+ if (timeoutEvent.isServerTransaction())
+ {
+ logger.warn("The sender has probably not received our OK");
+ return false;
+ }
+
+ Request req = timeoutEvent.getClientTransaction().getRequest();
+
+ // ignore messages which are not sms and continue processing
+ if(req.getHeader(SMS_OUTGOING_MESSAGE_HEADER) == null)
+ return true;
+
+ // get the content
+ String content = null;
+ try
+ {
+ content = new String(req.getRawContent(), getCharset(req));
+ }
+ catch (UnsupportedEncodingException ex)
+ {
+ logger.warn("failed to convert the message charset", ex);
+ content = new String(req.getRawContent());
+ }
+
+ // to who this request has been sent ?
+ ToHeader toHeader = (ToHeader) req.getHeader(ToHeader.NAME);
+
+ if (toHeader == null)
+ {
+ logger.error("received a request without a to header");
+ return false;
+ }
+
+ Contact to = resolveContact(
+ toHeader.getAddress().getURI().toString());
+
+ Message failedMessage = null;
+
+ if (to == null) {
+ logger.error(
+ "timeout on a message sent to an unknown contact : "
+ + toHeader.getAddress().getURI().toString());
+
+ //we don't know what message it concerns, so create a new
+ //one
+ failedMessage = createMessage(content);
+ }
+ else
+ {
+ // try to retrieve the original message
+ String key = ((CallIdHeader)req.getHeader(CallIdHeader.NAME))
+ .getCallId();
+ failedMessage = (Message) sentMessages.get(key);
+
+ if (failedMessage == null)
+ {
+ // should never happen
+ logger.error("Couldn't find the sent message.");
+
+ // we don't know what the message is so create a new one
+ //based on the content of the failed request.
+ failedMessage = createMessage(content);
+ }
+ }
+
+ // error for delivering the message
+ MessageDeliveryFailedEvent evt =
+ new MessageDeliveryFailedEvent(
+ // we don't know what message it concerns
+ failedMessage,
+ to,
+ MessageDeliveryFailedEvent.INTERNAL_ERROR,
+ new Date());
+ fireMessageEvent(evt);
+
+ return false;
+ }
+
+ /**
+ * Try to find a charset in a MESSAGE request for the
+ * text content. If no charset is defined, the default charset
+ * for text messages is returned.
+ *
+ * @param req the MESSAGE request in which to look for a charset
+ * @return defined charset in the request or DEFAULT_MIME_ENCODING
+ * if no charset is specified
+ */
+ private String getCharset(Request req)
+ {
+ String charset = null;
+ Header contentTypeHeader = req.getHeader(ContentTypeHeader.NAME);
+ if (contentTypeHeader instanceof ContentTypeHeader)
+ charset = ((ContentTypeHeader) contentTypeHeader)
+ .getParameter("charset");
+ if (charset == null)
+ charset = DEFAULT_MIME_ENCODING;
+ return charset;
+ }
+
+ /**
+ * Try to find a contact registered using a string to identify him.
+ *
+ * @param contactID A string with which the contact may have
+ * been registered
+ * @return A valid contact if it has been found, null otherwise
+ */
+ private Contact resolveContact(String contactID) {
+ Contact res = opSetPersPresence.findContactByID(contactID);
+
+ if (res == null) {
+ // we try to resolve the conflict by removing "sip:" from the id
+ if (contactID.startsWith("sip:")) {
+ res = opSetPersPresence.findContactByID(
+ contactID.substring(4));
+ }
+
+ if (res == null) {
+ // we try to remove the part after the '@'
+ if (contactID.indexOf('@') > -1) {
+ res = opSetPersPresence.findContactByID(
+ contactID.substring(0,
+ contactID.indexOf('@')));
+
+ if (res == null) {
+ // try the same thing without sip:
+ if (contactID.startsWith("sip:")) {
+ res = opSetPersPresence.findContactByID(
+ contactID.substring(4,
+ contactID.indexOf('@')));
+ }
+ }
+ }
+ }
+ }
+
+ return res;
+ }
+}
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolIconSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolIconSipImpl.java
index 8084b1a..96c0031 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolIconSipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolIconSipImpl.java
@@ -10,8 +10,11 @@ import java.io.*;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* Represents the Sip protocol icon. Implements the <tt>ProtocolIcon</tt>
* interface in order to provide an sip icon image in two different sizes.
@@ -29,6 +32,8 @@ public class ProtocolIconSipImpl
* A hash table containing the protocol icon in different sizes.
*/
private Hashtable iconsTable = new Hashtable();
+
+ private static ResourceManagementService resourcesService;
/**
* Creates an instance of this class by passing to it the path, where all
@@ -101,8 +106,7 @@ public class ProtocolIconSipImpl
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = ProtocolIconSipImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try
@@ -116,4 +120,21 @@ public class ProtocolIconSipImpl
}
return icon;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = SipActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)SipActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java b/src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java
index 4452bdc..192536a 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java
@@ -26,7 +26,7 @@ public class SipActivator
private Logger logger = Logger.getLogger(SipActivator.class.getName());
private ServiceRegistration sipPpFactoryServReg = null;
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
private static ConfigurationService configurationService = null;
private static NetworkAddressManagerService networkAddressManagerService
= null;
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipStatusEnum.java b/src/net/java/sip/communicator/impl/protocol/sip/SipStatusEnum.java
index db5b549..13ffece 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/SipStatusEnum.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipStatusEnum.java
@@ -187,20 +187,7 @@ public class SipStatusEnum
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = SipStatusEnum.class.getClassLoader()
- .getResourceAsStream(imagePath);
-
- byte[] icon = null;
- try
- {
- icon = new byte[is.available()];
- is.read(icon);
- }
- catch (IOException exc)
- {
- logger.error("Failed to load icon: " + imagePath, exc);
- }
- return icon;
+ return ProtocolIconSipImpl.loadIcon(imagePath);
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/sip.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/sip/sip.provider.manifest.mf
index a2ef9a4..8408124 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/sip.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/sip/sip.provider.manifest.mf
@@ -9,6 +9,7 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
net.java.sip.communicator.util.xml,
net.java.sip.communicator.service.configuration.event,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,
net.java.sip.communicator.service.netaddr,
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java
index a4859ac..55d5f73 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/ContactSSHImpl.java
@@ -33,8 +33,8 @@ public class ContactSSHImpl
/**
* This acts as a seperator between details stored in persistent data
*/
- private final String detailsSeperator = Resources
- .getString("detailsSeperator");
+ private final String detailsSeperator =
+ Resources.getString("detailsSeperator");
/**
* The identifier for SSH Stack
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolIconSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolIconSSHImpl.java
index 4be9e27..5dca388 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolIconSSHImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolIconSSHImpl.java
@@ -87,8 +87,8 @@ public class ProtocolIconSSHImpl
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = ProtocolIconSSHImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is =
+ SSHActivator.getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java
index 428ffc9..08eb57b 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/ProtocolProviderServiceSSHImpl.java
@@ -49,7 +49,8 @@ public class ProtocolProviderServiceSSHImpl
* The test command given after each command to determine the reply length
* of the command
*/
- private final String testCommand = Resources.getString("testCommand");
+ private final String testCommand =
+ Resources.getString("testCommand");
/**
* A reference to the protocol provider of UIService
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/Resources.java b/src/net/java/sip/communicator/impl/protocol/ssh/Resources.java
index 6209e5e..59a29ae 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/Resources.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/Resources.java
@@ -13,7 +13,6 @@
package net.java.sip.communicator.impl.protocol.ssh;
import java.io.*;
-import java.util.*;
import net.java.sip.communicator.util.*;
@@ -25,13 +24,7 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- private static final String BUNDLE_NAME
- = "net.java.sip.communicator.impl.protocol.ssh.resources";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- public static ImageID SSH_LOGO = new ImageID("protocolIcon");
+ public static ImageID SSH_LOGO = new ImageID("protocolIconSsh");
/**
* Returns an string corresponding to the given key.
@@ -42,15 +35,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return RESOURCE_BUNDLE.getString(key);
-
- }
- catch (MissingResourceException exc)
- {
- return '!' + key + '!';
- }
+ return SSHActivator.getResources().getI18NString(key);
}
/**
@@ -60,15 +45,12 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image= null;
+ byte[] image = null;
InputStream inputStream;
-
- String path = Resources.getString(imageID.getId());
-
try
{
- inputStream = Resources.class.getClassLoader()
- .getResourceAsStream(path);
+ inputStream =
+ SSHActivator.getResources().getImageInputStream(imageID.getId());
image = new byte[inputStream.available()];
@@ -76,7 +58,7 @@ public class Resources
}
catch (IOException exc)
{
- log.error("Failed to load image:" + path, exc);
+ log.error("Failed to load image:" + imageID.getId(), exc);
}
return image;
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java b/src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java
index 31c89f0..7981779 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/SSHActivator.java
@@ -17,6 +17,7 @@ import java.util.*;
import org.osgi.framework.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
/**
* Loads the SSH provider factory and registers its services in the OSGI
@@ -47,6 +48,7 @@ public class SSHActivator
*/
private static BundleContext bundleContext = null;
+ private static ResourceManagementService resourcesService;
/**
* Called when this bundle is started. In here we'll export the
@@ -121,4 +123,21 @@ public class SSHActivator
sshPpFactoryServReg.unregister();
logger.info("SSH protocol implementation [STOPPED].");
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService) bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/SSHStatusEnum.java b/src/net/java/sip/communicator/impl/protocol/ssh/SSHStatusEnum.java
index bccb8f2..d346f2b 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/SSHStatusEnum.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/SSHStatusEnum.java
@@ -135,20 +135,7 @@ public class SSHStatusEnum
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = SSHStatusEnum.class.getClassLoader()
- .getResourceAsStream(imagePath);
-
- byte[] icon = null;
- try
- {
- icon = new byte[is.available()];
- is.read(icon);
- }
- catch (IOException exc)
- {
- logger.error("Failed to load icon: " + imagePath, exc);
- }
- return icon;
+ return ProtocolIconSSHImpl.loadIcon(imagePath);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/resources.properties b/src/net/java/sip/communicator/impl/protocol/ssh/resources.properties
deleted file mode 100644
index ed39a76..0000000
--- a/src/net/java/sip/communicator/impl/protocol/ssh/resources.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#Contact Details Seperator(must not be part of contact data stored as persistent
-# data)
-detailsSeperator=~
-protocolIcon=resources/images/protocol/ssh/ssh-online.png
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/ssh.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/ssh/ssh.provider.manifest.mf
index 75af2d0..c77a0e9 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/ssh.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/ssh.provider.manifest.mf
@@ -12,6 +12,7 @@ Import-Package: org.osgi.framework,
javax.crypto.interfaces,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java
index dc48fc7..631eec8 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetBasicInstantMessagingYahooImpl.java
@@ -436,10 +436,12 @@ public class OperationSetBasicInstantMessagingYahooImpl
+ yahooMailLogon + "\">"
+ yahooMailLogon + "</a>";
- String newMail = "<b>" + Resources.getString("newMail") + " : </b> "
+ String newMail = "<b>" +
+ YahooActivator.getResources().getI18NString("newMail") + " : </b> "
+ ev.getSubject();
- newMail += "\n<br /><b>" + Resources.getString("from") + " : </b> "
+ newMail += "\n<br /><b>" +
+ YahooActivator.getResources().getI18NString("from") + " : </b> "
+ ev.getFrom() + " &lt;" + ev.getEmailAddress() + "&gt;";
newMail += "\n<br />&nbsp;&nbsp;&nbsp;&nbsp;" + yahooMailLogon;
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolIconYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolIconYahooImpl.java
index c90e660..c1b8573 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolIconYahooImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/ProtocolIconYahooImpl.java
@@ -77,8 +77,8 @@ public class ProtocolIconYahooImpl
* @return The image for the given identifier.
*/
public static byte[] loadIcon(String imagePath) {
- InputStream is = ProtocolIconYahooImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is =
+ YahooActivator.getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try {
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/Resources.java b/src/net/java/sip/communicator/impl/protocol/yahoo/Resources.java
deleted file mode 100644
index b62f025..0000000
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/Resources.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-
-package net.java.sip.communicator.impl.protocol.yahoo;
-
-import java.io.*;
-import java.util.*;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * The Resources class manages the access to the internationalization
- * properties files.
- *
- * @author Yana Stamcheva
- */
-public class Resources
-{
-
- /**
- * Logger for this class.
- */
- private static Logger log = Logger.getLogger(Resources.class);
-
- /**
- * Name of the bundle were we will search for localized string.
- */
- private static final String BUNDLE_NAME
- = "net.java.sip.communicator.impl.protocol.yahoo.resources";
-
- /**
- * Bundle which handle access to localized resources.
- */
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- /**
- * Returns an internationalized string corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return An internationalized string corresponding to the given key.
- */
- public static String getString(String key)
- {
- try
- {
- return RESOURCE_BUNDLE.getString(key);
-
- }
- catch (MissingResourceException e) {
-
- return '!' + key + '!';
- }
- }
-}
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/YahooActivator.java b/src/net/java/sip/communicator/impl/protocol/yahoo/YahooActivator.java
index 2874504..8dbe58b 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/YahooActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/YahooActivator.java
@@ -11,6 +11,7 @@ import java.util.*;
import org.osgi.framework.*;
import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
/**
* Loads the Yahoo provider factory and registers it with service in the OSGI
@@ -26,6 +27,8 @@ public class YahooActivator
private static ConfigurationService configurationService = null;
private static ProtocolProviderFactoryYahooImpl yahooProviderFactory = null;
+
+ private static ResourceManagementService resourcesService;
/**
* Called when this bundle is started so the Framework can perform the
@@ -112,4 +115,21 @@ public class YahooActivator
yahooProviderFactory.stop();
yahooPpFactoryServReg.unregister();
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService) bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/resources.properties b/src/net/java/sip/communicator/impl/protocol/yahoo/resources.properties
deleted file mode 100644
index 6797533..0000000
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/resources.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-newMail=New mail, subject
-from=From
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/yahoo.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/yahoo/yahoo.provider.manifest.mf
index 453478b..d956708 100644
--- a/src/net/java/sip/communicator/impl/protocol/yahoo/yahoo.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/yahoo/yahoo.provider.manifest.mf
@@ -13,6 +13,7 @@ Import-Package: org.osgi.framework,
org.xml.sax,
sun.security.action,
net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolIconZeroconfImpl.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolIconZeroconfImpl.java
index 33a5ca8..87b6dbc 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolIconZeroconfImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/ProtocolIconZeroconfImpl.java
@@ -10,8 +10,11 @@ import java.io.*;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* Reperesents the zeroconf protocol icon. Implements the <tt>ProtocolIcon</tt>
* interface in order to provide a zeroconf logo image in two different sizes.
@@ -25,6 +28,8 @@ public class ProtocolIconZeroconfImpl
private static Logger logger
= Logger.getLogger(ProtocolIconZeroconfImpl.class);
+ private static ResourceManagementService resourcesService;
+
/**
* A hash table containing the protocol icon in different sizes.
*/
@@ -84,8 +89,7 @@ public class ProtocolIconZeroconfImpl
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = ProtocolIconZeroconfImpl.class
- .getClassLoader().getResourceAsStream(imagePath);
+ InputStream is = getResources().getImageInputStreamForPath(imagePath);
byte[] icon = null;
try
@@ -99,4 +103,21 @@ public class ProtocolIconZeroconfImpl
}
return icon;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = ZeroconfActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService)ZeroconfActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java
index e25ba29..8de1830 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfActivator.java
@@ -39,7 +39,7 @@ public class ZeroconfActivator
/**
* The currently valid bundle context.
*/
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfStatusEnum.java b/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfStatusEnum.java
index 35e7f12..a35b784 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfStatusEnum.java
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/ZeroconfStatusEnum.java
@@ -130,20 +130,7 @@ public class ZeroconfStatusEnum
*/
public static byte[] loadIcon(String imagePath)
{
- InputStream is = ZeroconfStatusEnum.class.getClassLoader()
- .getResourceAsStream(imagePath);
-
- byte[] icon = null;
- try
- {
- icon = new byte[is.available()];
- is.read(icon);
- }
- catch (IOException exc)
- {
- logger.error("Failed to load icon: " + imagePath, exc);
- }
- return icon;
+ return ProtocolIconZeroconfImpl.loadIcon(imagePath);
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/zeroconf/zeroconf.provider.manifest.mf b/src/net/java/sip/communicator/impl/protocol/zeroconf/zeroconf.provider.manifest.mf
index 305ce56..d256c49 100644
--- a/src/net/java/sip/communicator/impl/protocol/zeroconf/zeroconf.provider.manifest.mf
+++ b/src/net/java/sip/communicator/impl/protocol/zeroconf/zeroconf.provider.manifest.mf
@@ -6,6 +6,7 @@ Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.util,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event \ No newline at end of file
diff --git a/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java b/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java
new file mode 100644
index 0000000..3069076
--- /dev/null
+++ b/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java
@@ -0,0 +1,45 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.impl.resources;
+
+import net.java.sip.communicator.service.resources.*;
+
+import net.java.sip.communicator.util.Logger;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ *
+ * @author damencho
+ */
+public class ResourceManagementActivator
+ implements BundleActivator
+{
+
+ private Logger logger =
+ Logger.getLogger(ResourceManagementActivator.class);
+ static BundleContext bundleContext;
+
+ public void start(BundleContext bc) throws Exception
+ {
+ bundleContext = bc;
+
+ ResourceManagementServiceImpl resPackImpl =
+ new ResourceManagementServiceImpl();
+
+ bundleContext.registerService( ResourceManagementService.class.getName(),
+ resPackImpl,
+ null);
+
+ logger.info("Default resources ... [REGISTERED]");
+ }
+
+ public void stop(BundleContext bc) throws Exception
+ {
+
+ }
+}
diff --git a/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java b/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java
new file mode 100644
index 0000000..2713546
--- /dev/null
+++ b/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java
@@ -0,0 +1,594 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.impl.resources;
+
+import java.io.*;
+import java.net.*;
+import java.text.MessageFormat;
+import java.util.*;
+
+import net.java.sip.communicator.service.resources.*;
+import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class ResourceManagementServiceImpl
+ implements ResourceManagementService,
+ ServiceListener
+{
+ private static Logger logger =
+ Logger.getLogger(ResourceManagementServiceImpl.class);
+
+ private ResourceBundle colorResourceBundle;
+ private ResourcePack colorPack = null;
+
+ private ResourceBundle imageResourceBundle;
+ private ResourcePack imagePack = null;
+
+ private LanguagePack languagePack = null;
+
+ private ResourceBundle settingsResourceBundle;
+ private ResourcePack settingsPack = null;
+
+ private ResourceBundle soundResourceBundle;
+ private ResourcePack soundPack = null;
+
+ ResourceManagementServiceImpl()
+ {
+ ResourceManagementActivator.bundleContext.addServiceListener(this);
+
+ colorPack =
+ registerDefaultPack(ColorPack.class.getName(),
+ ColorPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ if (colorPack != null)
+ colorResourceBundle = getResourceBundle(colorPack);
+
+ imagePack =
+ registerDefaultPack(ImagePack.class.getName(),
+ ImagePack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ if (imagePack != null)
+ imageResourceBundle = getResourceBundle(imagePack);
+
+ languagePack =
+ (LanguagePack) registerDefaultPack(LanguagePack.class.getName(),
+ LanguagePack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ settingsPack =
+ registerDefaultPack(SettingsPack.class.getName(),
+ SettingsPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ if (settingsPack != null)
+ settingsResourceBundle = getResourceBundle(settingsPack);
+
+ soundPack =
+ registerDefaultPack(SoundPack.class.getName(),
+ SoundPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ if (soundPack != null)
+ soundResourceBundle = getResourceBundle(soundPack);
+ }
+
+ private ResourcePack registerDefaultPack( String className,
+ String typeName)
+ {
+ ServiceReference[] serRefs = null;
+
+ String osgiFilter =
+ "(" + ResourcePack.RESOURCE_NAME + "=" + typeName + ")";
+
+ try
+ {
+ serRefs = ResourceManagementActivator
+ .bundleContext.getServiceReferences(
+ className,
+ osgiFilter);
+ }
+ catch (InvalidSyntaxException exc)
+ {
+ logger.error("Could not obtain resource packs reference.", exc);
+ }
+
+ if (serRefs != null)
+ {
+ for (int i = 0; i < serRefs.length; i++)
+ {
+ ResourcePack rp =
+ (ResourcePack) ResourceManagementActivator.bundleContext.
+ getService(serRefs[i]);
+
+ return rp;
+ }
+ }
+
+ return null;
+ }
+
+ private ResourceBundle getResourceBundle(ResourcePack resourcePack)
+ {
+ String baseName = resourcePack.getResourcePackBaseName();
+
+ return ResourceBundle.getBundle(
+ baseName,
+ Locale.getDefault(),
+ resourcePack.getClass().getClassLoader());
+ }
+
+ private ResourceBundle getResourceBundle(ResourcePack resourcePack, Locale l)
+ {
+ String baseName = resourcePack.getResourcePackBaseName();
+
+ return ResourceBundle.getBundle(
+ baseName,
+ l,
+ resourcePack.getClass().getClassLoader());
+ }
+
+ private String findString(String key, ResourceBundle resourceBundle)
+ {
+ try
+ {
+ String value = resourceBundle.getString(key);
+ if (value != null)
+ {
+ return value;
+ }
+ }
+ catch (MissingResourceException e)
+ {
+ logger.error("Missing resource.", e);
+ }
+
+ // nothing found
+ return null;
+ }
+
+ public void serviceChanged(ServiceEvent event)
+ {
+ Object sService = ResourceManagementActivator.bundleContext.getService(
+ event.getServiceReference());
+
+ if (!(sService instanceof ResourcePack))
+ {
+ return;
+ }
+
+ ResourcePack resource = (ResourcePack) sService;
+
+ if (event.getType() == ServiceEvent.REGISTERED)
+ {
+ logger.info("Resource registered " + resource);
+
+ String resourceBaseName = resource.getResourcePackBaseName();
+
+ ResourceBundle resourceBundle = ResourceBundle.getBundle(
+ resourceBaseName,
+ Locale.getDefault(),
+ resource.getClass().getClassLoader());
+
+ if(resource instanceof ColorPack && colorPack == null)
+ {
+ colorPack = resource;
+ colorResourceBundle = resourceBundle;
+ }
+ else if(resource instanceof ImagePack && imagePack == null)
+ {
+ imagePack = resource;
+ imageResourceBundle = resourceBundle;
+ }
+ else if(resource instanceof LanguagePack && languagePack == null)
+ {
+ languagePack = (LanguagePack) resource;
+ }
+ else if(resource instanceof SettingsPack && settingsPack == null)
+ {
+ settingsPack = resource;
+ settingsResourceBundle = resourceBundle;
+ }
+ else if(resource instanceof SoundPack && soundPack == null)
+ {
+ soundPack = resource;
+ soundResourceBundle = resourceBundle;
+ }
+ }
+ else if (event.getType() == ServiceEvent.UNREGISTERING)
+ {
+ if(resource instanceof ColorPack
+ && colorPack.equals(resource))
+ {
+ colorPack = null;
+ colorResourceBundle = null;
+ }
+ else if(resource instanceof ImagePack
+ && imagePack.equals(resource))
+ {
+ imagePack = null;
+ imageResourceBundle = null;
+ }
+ else if(resource instanceof LanguagePack
+ && languagePack.equals(resource))
+ {
+ languagePack = null;
+ }
+ else if(resource instanceof SettingsPack
+ && settingsPack.equals(resource))
+ {
+ settingsPack = null;
+ settingsResourceBundle = null;
+ }
+ else if(resource instanceof SoundPack
+ && soundPack.equals(resource))
+ {
+ soundPack = null;
+ soundResourceBundle = null;
+ }
+ }
+ }
+
+ // Color pack methods
+ public int getColor(String key)
+ {
+ String res = findString(key, colorResourceBundle);
+
+ if(res == null)
+ {
+ logger.error("Missing color resource for key: " + key);
+
+ return 0xFFFFFF;
+ }
+ else
+ return Integer.parseInt(res, 16);
+ }
+
+ public String getColorString(String key)
+ {
+ String res = findString(key, colorResourceBundle);
+
+ if(res == null)
+ {
+ logger.error("Missing color resource for key: " + key);
+
+ return "0xFFFFFF";
+ }
+ else
+ return res;
+ }
+
+ // Image pack methods
+ /**
+ * Loads a stream from a given identifier.
+ *
+ * @param streamKey The identifier of the stream.
+ * @return The stream for the given identifier.
+ */
+ public InputStream getImageInputStreamForPath(String path)
+ {
+ return imagePack.getClass().getClassLoader().getResourceAsStream(path);
+ }
+ /**
+ * Loads a stream from a given identifier.
+ *
+ * @param streamKey The identifier of the stream.
+ * @return The stream for the given identifier.
+ */
+ public InputStream getImageInputStream(String streamKey)
+ {
+ String path = findString(streamKey, imageResourceBundle);
+
+ if (path == null || path.length() == 0)
+ {
+ logger.warn("Missing resource for key: " + streamKey);
+ return null;
+ }
+
+ return getImageInputStreamForPath(path);
+ }
+
+ /**
+ * Loads an url from a given identifier.
+ *
+ * @param urlKey The identifier of the url.
+ * @return The url for the given identifier.
+ */
+ public URL getImageURL(String urlKey)
+ {
+ String path = findString(urlKey, imageResourceBundle);
+
+ if (path == null || path.length() == 0)
+ {
+ logger.warn("Missing resource for key: " + urlKey
+ + " / " + imageResourceBundle);
+ return null;
+ }
+ return getImageURLForPath(path);
+ }
+
+ public URL getImageURLForPath(String path)
+ {
+ return imagePack.getClass().getClassLoader().getResource(path);
+ }
+
+ // Language pack methods
+ /**
+ * Returns an internationalized string corresponding to the given key.
+ *
+ * @param key The key of the string.
+ * @return An internationalized string corresponding to the given key.
+ */
+ public String getI18NString(String key)
+ {
+ return getI18NString(key, Locale.getDefault());
+ }
+
+ /**
+ * Returns an internationalized string corresponding to the given key.
+ *
+ * @param key The key of the string.
+ * @param l The locale.
+ * @return An internationalized string corresponding to the given key and
+ * given locale.
+ */
+ public String getI18NString(String key, Locale l)
+ {
+ ResourceBundle resourceBundle
+ = getResourceBundle(languagePack, l);
+
+ String resourceString = findString(key, resourceBundle);
+
+ if (resourceString == null)
+ {
+ logger.warn("Missing resource for key: " + key);
+ return '!' + key + '!';
+ }
+
+ int mnemonicIndex = resourceString.indexOf('&');
+
+ if (mnemonicIndex > -1)
+ {
+ String firstPart = resourceString.substring(0, mnemonicIndex);
+ String secondPart = resourceString.substring(mnemonicIndex + 1);
+
+ resourceString = firstPart.concat(secondPart);
+ }
+
+ return resourceString;
+ }
+
+ /**
+ * Returns an internationalized string corresponding to the given key.
+ *
+ * @param key The key of the string.
+ * @return An internationalized string corresponding to the given key.
+ */
+ public String getI18NString(String key, String[] params)
+ {
+ return getI18NString(key, params, Locale.getDefault());
+ }
+
+ /**
+ * Returns an internationalized string corresponding to the given key.
+ *
+ * @param key The key of the string.
+ * @param l The locale.
+ * @return An internationalized string corresponding to the given key.
+ */
+ public String getI18NString(String key, String[] params, Locale l)
+ {
+ ResourceBundle resourceBundle
+ = getResourceBundle(languagePack, l);
+
+ String resourceString = findString(key, resourceBundle);
+
+ if (resourceString == null)
+ {
+ logger.warn("Missing resource for key: " + key);
+ return '!' + key + '!';
+ }
+
+ int mnemonicIndex = resourceString.indexOf('&');
+
+ if (mnemonicIndex > -1)
+ {
+ String firstPart = resourceString.substring(0, mnemonicIndex);
+ String secondPart = resourceString.substring(mnemonicIndex + 1);
+
+ resourceString = firstPart.concat(secondPart);
+ }
+
+ resourceString = MessageFormat.format(resourceString, (Object[])params);
+
+ return resourceString;
+ }
+
+ /**
+ * Returns an internationalized string corresponding to the given key.
+ *
+ * @param key The key of the string.
+ * @return An internationalized string corresponding to the given key.
+ */
+ public char getI18nMnemonic(String key)
+ {
+ return getI18nMnemonic(key, Locale.getDefault());
+ }
+
+ /**
+ * Returns an internationalized string corresponding to the given key.
+ *
+ * @param key The key of the string.
+ * @return An internationalized string corresponding to the given key.
+ */
+ public char getI18nMnemonic(String key, Locale l)
+ {
+ ResourceBundle resourceBundle
+ = getResourceBundle(languagePack, l);
+
+ String resourceString = findString(key, resourceBundle);
+
+ if (resourceString == null)
+ {
+ logger.warn("Missing resource for key: " + key);
+ return 0;
+ }
+
+ int mnemonicIndex = resourceString.indexOf('&');
+
+ if (mnemonicIndex > -1)
+ {
+ return resourceString.charAt(mnemonicIndex + 1);
+ }
+
+ return 0;
+ }
+
+ // Settings pack methods
+ public String getSettingsString(String key)
+ {
+ return findString(key, settingsResourceBundle);
+ }
+
+ public int getSettingsInt(String key)
+ {
+ String resourceString = findString(key, settingsResourceBundle);
+
+ if (resourceString == null)
+ {
+ logger.warn("Missing resource for key: " + key);
+ return 0;
+ }
+
+ return Integer.parseInt(resourceString);
+ }
+
+ /**
+ * Loads an url from a given identifier.
+ *
+ * @param urlKey The identifier of the url.
+ * @return The url for the given identifier.
+ */
+ public URL getSettingsURL(String urlKey)
+ {
+ String path = findString(urlKey, settingsResourceBundle);
+
+ if (path == null || path.length() == 0)
+ {
+ logger.warn("Missing resource for key: " + urlKey);
+ return null;
+ }
+ return settingsPack.getClass().getClassLoader().getResource(path);
+ }
+ /**
+ * Loads a stream from a given identifier.
+ *
+ * @param streamKey The identifier of the stream.
+ * @return The stream for the given identifier.
+ */
+ public InputStream getSettingsInputStream(String streamKey)
+ {
+ String path = findString(streamKey, settingsResourceBundle);
+
+ if (path == null || path.length() == 0)
+ {
+ logger.warn("Missing resource for key: " + streamKey);
+ return null;
+ }
+
+ return settingsPack.getClass().getClassLoader().getResourceAsStream(path);
+ }
+
+
+ // Sound pack methods
+ public URL getSoundURL(String urlKey)
+ {
+ String path = findString(urlKey, soundResourceBundle);
+
+ if (path == null || path.length() == 0)
+ {
+ logger.warn("Missing resource for key: " + urlKey);
+ return null;
+ }
+ return getSoundURLForPath(path);
+ }
+
+ public URL getSoundURLForPath(String path)
+ {
+ return soundPack.getClass().getClassLoader().getResource(path);
+ }
+
+ public Iterator getCurrentColors()
+ {
+ Enumeration colorKeys = colorResourceBundle.getKeys();
+
+ List colorList = new ArrayList();
+ while (colorKeys.hasMoreElements())
+ {
+ colorList.add(colorKeys.nextElement());
+ }
+
+ return colorList.iterator();
+ }
+
+ public Iterator getCurrentImages()
+ {
+ Enumeration imageKeys = imageResourceBundle.getKeys();
+
+ List imageList = new ArrayList();
+ while (imageKeys.hasMoreElements())
+ {
+ imageList.add(imageKeys.nextElement());
+ }
+
+ return imageList.iterator();
+ }
+
+ public Iterator getCurrentSettings()
+ {
+ Enumeration settingKeys = settingsResourceBundle.getKeys();
+
+ List settingList = new ArrayList();
+ while (settingKeys.hasMoreElements())
+ {
+ settingList.add(settingKeys.nextElement());
+ }
+
+ return settingList.iterator();
+ }
+
+ public Iterator getCurrentSounds()
+ {
+ Enumeration soundKeys = soundResourceBundle.getKeys();
+
+ List soundList = new ArrayList();
+ while (soundKeys.hasMoreElements())
+ {
+ soundList.add(soundKeys.nextElement());
+ }
+
+ return soundList.iterator();
+ }
+
+ public Iterator getAvailableLocales()
+ {
+ return languagePack.getAvailableLocales();
+ }
+
+ public Iterator getI18nStringsByLocale(Locale l)
+ {
+ Enumeration languageKeys = getResourceBundle(languagePack, l).getKeys();
+
+ List languageList = new ArrayList();
+ while (languageKeys.hasMoreElements())
+ {
+ languageList.add(languageKeys.nextElement());
+ }
+
+ return languageList.iterator();
+ }
+}
diff --git a/src/net/java/sip/communicator/impl/resources/resourcemanagement.manifest.mf b/src/net/java/sip/communicator/impl/resources/resourcemanagement.manifest.mf
new file mode 100644
index 0000000..be777e9
--- /dev/null
+++ b/src/net/java/sip/communicator/impl/resources/resourcemanagement.manifest.mf
@@ -0,0 +1,10 @@
+Bundle-Activator: net.java.sip.communicator.impl.resources.ResourceManagementActivator
+Bundle-Name: Resource Management Service
+Bundle-Description: The plugin managing images and languages resource packs.
+Bundle-Vendor: sip-communicator.org
+Bundle-Version: 0.0.1
+Export-Package: net.java.sip.communicator.service.resources
+Import-Package: org.osgi.framework,
+ net.java.sip.communicator.util,
+ net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.configuration.event
diff --git a/src/net/java/sip/communicator/impl/systray/Resources.java b/src/net/java/sip/communicator/impl/systray/Resources.java
index 4dd570b..d92bcd4 100644
--- a/src/net/java/sip/communicator/impl/systray/Resources.java
+++ b/src/net/java/sip/communicator/impl/systray/Resources.java
@@ -15,7 +15,10 @@ import java.util.*;
import javax.imageio.*;
import javax.swing.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+
+import org.osgi.framework.*;
/**
* The Messages class manages the access to the internationalization
* properties files.
@@ -23,22 +26,11 @@ import net.java.sip.communicator.util.*;
* @author Nicolas Chamouard
*/
public class Resources
-{
-
+{
private static Logger log = Logger.getLogger(Resources.class);
- private static final String BUNDLE_NAME
- = "resources.languages.impl.systray.resources";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private static final String APPLICATION_RESUORCE_LOCATION
- = "resources.application";
-
- private static final ResourceBundle applicationBundle
- = ResourceBundle.getBundle(APPLICATION_RESUORCE_LOCATION);
-
+ private static ResourceManagementService resourcesService;
+
/**
* Returns an internationalized string corresponding to the given key.
*
@@ -47,26 +39,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- String resourceString = RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- {
- String firstPart = resourceString.substring(0, mnemonicIndex);
- String secondPart = resourceString.substring(mnemonicIndex + 1);
-
- resourceString = firstPart.concat(secondPart);
- }
-
- return resourceString;
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -77,21 +50,7 @@ public class Resources
*/
public static char getMnemonic(String key)
{
- try
- {
- String resourceString = RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- return resourceString.charAt(mnemonicIndex + 1);
- }
- catch (MissingResourceException e)
- {
- return 0;
- }
-
- return 0;
+ return getResources().getI18nMnemonic(key);
}
/**
@@ -104,21 +63,19 @@ public class Resources
{
BufferedImage image = null;
- String path = Resources.getString(imageID);
+ InputStream in =
+ getResources().getImageInputStream(imageID);
- if(path == null || path.length() == 0)
+ if(in == null)
return null;
try
{
- image =
- ImageIO.read(Resources.class.getClassLoader()
- .getResourceAsStream(path));
-
+ image = ImageIO.read(in);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return new ImageIcon(image);
@@ -132,13 +89,7 @@ public class Resources
*/
public static URL getImageURL(String imageID)
{
- String path = Resources.getString(imageID);
-
- if(path == null || path.length() == 0)
- return null;
-
- return Resources.class.getClassLoader()
- .getResource(path);
+ return getResources().getImageURL(imageID);
}
/**
@@ -149,13 +100,24 @@ public class Resources
*/
public static String getApplicationString(String key)
{
- try
- {
- return applicationBundle.getString(key);
- }
- catch (MissingResourceException e)
+ return getResources().getSettingsString(key);
+ }
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
{
- return '!' + key + '!';
+ ServiceReference serviceReference = SystrayActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)SystrayActivator.bundleContext
+ .getService(serviceReference);
}
+
+ return resourcesService;
}
}
diff --git a/src/net/java/sip/communicator/impl/systray/systray.manifest.mf b/src/net/java/sip/communicator/impl/systray/systray.manifest.mf
index b863eef..2693328 100644
--- a/src/net/java/sip/communicator/impl/systray/systray.manifest.mf
+++ b/src/net/java/sip/communicator/impl/systray/systray.manifest.mf
@@ -11,6 +11,7 @@ Import-Package: org.osgi.framework,
com.apple.cocoa.foundation,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,
net.java.sip.communicator.service.gui,
diff --git a/src/net/java/sip/communicator/impl/version/VersionActivator.java b/src/net/java/sip/communicator/impl/version/VersionActivator.java
index 647a841..e365e83 100644
--- a/src/net/java/sip/communicator/impl/version/VersionActivator.java
+++ b/src/net/java/sip/communicator/impl/version/VersionActivator.java
@@ -24,7 +24,7 @@ public class VersionActivator
private Logger logger = Logger.getLogger(VersionActivator.class.getName());
private ServiceRegistration versionServReg = null;
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
private static ConfigurationService configurationService = null;
/**
diff --git a/src/net/java/sip/communicator/impl/version/VersionImpl.java b/src/net/java/sip/communicator/impl/version/VersionImpl.java
index e5c95b7..de66f1d 100644
--- a/src/net/java/sip/communicator/impl/version/VersionImpl.java
+++ b/src/net/java/sip/communicator/impl/version/VersionImpl.java
@@ -9,6 +9,8 @@ package net.java.sip.communicator.impl.version;
import java.util.*;
import net.java.sip.communicator.service.version.*;
+import net.java.sip.communicator.service.resources.*;
+import org.osgi.framework.ServiceReference;
/**
* A static implementation of the Version interface.
@@ -75,6 +77,8 @@ public class VersionImpl
* SIP Communicator.
*/
public static final VersionImpl CURRENT_VERSION = new VersionImpl();
+
+ private static ResourceManagementService resourcesService;
/**
* Returns the version major of the current SIP Communicator version. In an
@@ -296,9 +300,22 @@ public class VersionImpl
{
try
{
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = VersionActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)VersionActivator.bundleContext
+ .getService(serviceReference);
+ }
+
applicationName =
- ResourceBundle.getBundle("resources.application").
- getString("applicationName");
+ resourcesService.getSettingsString("applicationName");
+
} catch (Exception e)
{
// if resource bundle is not found or the key is missing
diff --git a/src/net/java/sip/communicator/impl/version/version.impl.manifest.mf b/src/net/java/sip/communicator/impl/version/version.impl.manifest.mf
index 7b7d255..6f22d2a 100755
--- a/src/net/java/sip/communicator/impl/version/version.impl.manifest.mf
+++ b/src/net/java/sip/communicator/impl/version/version.impl.manifest.mf
@@ -6,6 +6,7 @@ Bundle-Version: 0.0.1
System-Bundle: yes
Import-Package: org.osgi.framework,
net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.util,
net.java.sip.communicator.service.version
diff --git a/src/net/java/sip/communicator/plugin/accountinfo/AccountDetailsPanel.java b/src/net/java/sip/communicator/plugin/accountinfo/AccountDetailsPanel.java
index fe504d1..12597f8 100644
--- a/src/net/java/sip/communicator/plugin/accountinfo/AccountDetailsPanel.java
+++ b/src/net/java/sip/communicator/plugin/accountinfo/AccountDetailsPanel.java
@@ -144,7 +144,7 @@ public class AccountDetailsPanel
changeAvatarButton.addActionListener(new ChangeAvatarActionListener());
- avatarLabel.setIcon(Resources.getImage("defaultPersonIcon"));
+ avatarLabel.setIcon(Resources.getImage("accountInfoDefaultPersonIcon"));
changeButtonPanel.add(changeAvatarButton);
diff --git a/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java b/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java
index dbd6c78..50e25e4 100644
--- a/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java
+++ b/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoForm.java
@@ -114,7 +114,7 @@ public class AccountInfoForm
*/
public byte[] getIcon()
{
- return Resources.getImageInBytes("infoIcon");
+ return Resources.getImageInBytes("accountInfoIcon");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/accountinfo/Resources.java b/src/net/java/sip/communicator/plugin/accountinfo/Resources.java
index 1f45e84..2828c14 100644
--- a/src/net/java/sip/communicator/plugin/accountinfo/Resources.java
+++ b/src/net/java/sip/communicator/plugin/accountinfo/Resources.java
@@ -14,7 +14,10 @@ import java.util.*;
import javax.imageio.*;
import javax.swing.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+
+import org.osgi.framework.*;
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -25,31 +28,7 @@ public class Resources {
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.accountinfo.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.accountinfo.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
/**
* Returns an internationalized string corresponding to the given key.
@@ -58,14 +37,7 @@ public class Resources {
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -77,15 +49,19 @@ public class Resources {
{
BufferedImage image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID);
+ InputStream in =
+ getResources().getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
try
{
- image = ImageIO.read(Resources.class.getClassLoader()
- .getResourceAsStream(path));
+ image = ImageIO.read(in);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return new ImageIcon(image);
@@ -98,21 +74,42 @@ public class Resources {
*/
public static byte[] getImageInBytes(String imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID);
+ InputStream in =
+ getResources().getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
-
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = AccountInfoActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)AccountInfoActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/accountinfo/accountinfo.manifest.mf b/src/net/java/sip/communicator/plugin/accountinfo/accountinfo.manifest.mf
index a53defa..28359d7 100644
--- a/src/net/java/sip/communicator/plugin/accountinfo/accountinfo.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/accountinfo/accountinfo.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,
diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java
index c48fa66..b14d7ca 100644
--- a/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccountRegistrationWizard.java
@@ -71,7 +71,7 @@ public class AimAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameAim");
}
/**
@@ -81,7 +81,7 @@ public class AimAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionAim");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
index 7b530e1..fb4637c 100644
--- a/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
@@ -69,7 +69,7 @@ public class FirstWizardPage
private JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
private JTextArea registerArea =
- new JTextArea(Resources.getString("registerNewAccountText"));
+ new JTextArea(Resources.getString("aimRegisterNewAccountText"));
private JButton registerButton =
new JButton(Resources.getString("registerNewAccount"));
diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java
index 37a4d7c..1f82730 100644
--- a/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java
@@ -10,7 +10,11 @@ package net.java.sip.communicator.plugin.aimaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -21,41 +25,17 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.aimaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.aimaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
/**
* A constant pointing to the Aim protocol logo image.
*/
- public static ImageID AIM_LOGO = new ImageID("protocolIcon");
+ public static ImageID AIM_LOGO = new ImageID("protocolIconAim");
/**
* A constant pointing to the Aim protocol wizard page image.
*/
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageAim");
/**
* Returns an internationalized string corresponding to the given key.
@@ -64,15 +44,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
-
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -82,19 +54,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
-
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -117,4 +92,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = AimAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)AimAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/aimaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/aimaccregwizz/aimaccregwizz.manifest.mf
index 4da5f84..013edda 100644
--- a/src/net/java/sip/communicator/plugin/aimaccregwizz/aimaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/aimaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/branding/AboutWindow.java b/src/net/java/sip/communicator/plugin/branding/AboutWindow.java
index 7a68ac0..875380e 100644
--- a/src/net/java/sip/communicator/plugin/branding/AboutWindow.java
+++ b/src/net/java/sip/communicator/plugin/branding/AboutWindow.java
@@ -22,19 +22,20 @@ public class AboutWindow extends JDialog implements HyperlinkListener,
private WindowBackground mainPanel = new WindowBackground();
private JLabel titleLabel = new JLabel(
- BrandingResources.getApplicationString("applicationName"));
+ BrandingActivator.getResources().getSettingsString("applicationName"));
private JLabel versionLabel = new JLabel(" "
+ System.getProperty("sip-communicator.version"));
private JTextArea logoArea = new JTextArea(
- Resources.getString("logoMessage"));
+ BrandingActivator.getResources().getI18NString("logoMessage"));
private StyledHTMLEditorPane rightsArea = new StyledHTMLEditorPane();
private StyledHTMLEditorPane licenseArea = new StyledHTMLEditorPane();
- private JButton okButton = new JButton(Resources.getString("ok"));
+ private JButton okButton = new JButton(
+ BrandingActivator.getResources().getI18NString("ok"));
private JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
@@ -44,9 +45,10 @@ public class AboutWindow extends JDialog implements HyperlinkListener,
{
super(owner);
- this.setTitle( Resources.getString("aboutWindowTitle",
- new String[]{BrandingResources
- .getApplicationString("applicationName")}));
+ this.setTitle(
+ BrandingActivator.getResources().getI18NString("aboutWindowTitle",
+ new String[]{BrandingActivator.getResources().
+ getSettingsString("applicationName")}));
this.setModal(false);
@@ -66,8 +68,8 @@ public class AboutWindow extends JDialog implements HyperlinkListener,
this.versionLabel.setForeground(Constants.TITLE_COLOR);
this.versionLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
- int logoAreaFontSize = new Integer(
- BrandingResources.getApplicationString("aboutLogoFontSize")).intValue();
+ int logoAreaFontSize = BrandingActivator.getResources().
+ getSettingsInt("aboutLogoFontSize");
this.logoArea.setFont(
Constants.FONT.deriveFont(Font.BOLD, logoAreaFontSize));
@@ -83,7 +85,8 @@ public class AboutWindow extends JDialog implements HyperlinkListener,
this.rightsArea.setContentType("text/html");
- this.rightsArea.appendToEnd(Resources.getString("copyright",
+ this.rightsArea.appendToEnd(BrandingActivator.getResources().
+ getI18NString("copyright",
new String[]{Constants.TEXT_COLOR}));
this.rightsArea.setPreferredSize(new Dimension(50, 20));
@@ -95,7 +98,8 @@ public class AboutWindow extends JDialog implements HyperlinkListener,
this.rightsArea.addHyperlinkListener(this);
this.licenseArea.setContentType("text/html");
- this.licenseArea.appendToEnd(Resources.getString("license",
+ this.licenseArea.appendToEnd(BrandingActivator.getResources().
+ getI18NString("license",
new String[]{Constants.TEXT_COLOR}));
this.licenseArea.setPreferredSize(new Dimension(50, 20));
@@ -114,7 +118,8 @@ public class AboutWindow extends JDialog implements HyperlinkListener,
this.getRootPane().setDefaultButton(okButton);
- this.okButton.setMnemonic(Resources.getString("ok").charAt(0));
+ this.okButton.setMnemonic(BrandingActivator.getResources().
+ getI18nMnemonic("ok"));
this.okButton.addActionListener(this);
@@ -151,9 +156,8 @@ public class AboutWindow extends JDialog implements HyperlinkListener,
{
try
{
- bgImage = ImageIO.read(WindowBackground.class.getClassLoader()
- .getResource(BrandingResources
- .getResourceString("aboutWindowBg")));
+ bgImage = ImageIO.read(BrandingActivator.getResources().
+ getImageURL("aboutWindowBg"));
}
catch (IOException e)
{
diff --git a/src/net/java/sip/communicator/plugin/branding/AboutWindowPluginComponent.java b/src/net/java/sip/communicator/plugin/branding/AboutWindowPluginComponent.java
index ab0f0c2..0cae435 100644
--- a/src/net/java/sip/communicator/plugin/branding/AboutWindowPluginComponent.java
+++ b/src/net/java/sip/communicator/plugin/branding/AboutWindowPluginComponent.java
@@ -17,7 +17,8 @@ public class AboutWindowPluginComponent
implements PluginComponent
{
private JMenuItem aboutMenuItem
- = new JMenuItem(Resources.getString("aboutMenuEntry"));
+ = new JMenuItem(BrandingActivator.getResources().
+ getI18NString("aboutMenuEntry"));
private Container container;
@@ -52,7 +53,7 @@ public class AboutWindowPluginComponent
public String getName()
{
- return Resources.getString("aboutMenuEntry");
+ return BrandingActivator.getResources().getI18NString("aboutMenuEntry");
}
public void setCurrentContact(MetaContact metaContact)
diff --git a/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java b/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java
index e48864b..578faa2 100644
--- a/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java
+++ b/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java
@@ -6,11 +6,9 @@
*/
package net.java.sip.communicator.plugin.branding;
-import java.awt.event.*;
import java.util.*;
-import javax.swing.*;
-
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.util.*;
@@ -25,6 +23,8 @@ public class BrandingActivator
private WelcomeWindow welcomeWindow;
private static BundleContext bundleContext;
+
+ private static ResourceManagementService resourcesService;
public void start(BundleContext bc) throws Exception
{
@@ -107,4 +107,20 @@ public class BrandingActivator
return bundleContext;
}
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService) bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/branding/BrandingResources.java b/src/net/java/sip/communicator/plugin/branding/BrandingResources.java
index 3940911..e69de29 100644
--- a/src/net/java/sip/communicator/plugin/branding/BrandingResources.java
+++ b/src/net/java/sip/communicator/plugin/branding/BrandingResources.java
@@ -1,67 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.plugin.branding;
-
-import java.text.*;
-import java.util.*;
-
-/**
- * The BrandingResources class manages the access to the
- * brandingResources.properties file.
- *
- * @author Yana Stamcheva
- */
-public class BrandingResources
-{
- private static final String RESOUCRE_LOCATION
- = "net.java.sip.communicator.plugin.branding.brandingResources";
-
- private static final ResourceBundle resourceBundle
- = ResourceBundle.getBundle(RESOUCRE_LOCATION);
-
- private static final String APPLICATION_RESUORCE_LOCATION
- = "resources.application";
-
- private static final ResourceBundle applicationBundle
- = ResourceBundle.getBundle(APPLICATION_RESUORCE_LOCATION);
-
- /**
- * Returns the resource string corresponding to the given key.
- *
- * @param key The key of the string.
- * @return the resource string corresponding to the given key
- */
- public static String getResourceString(String key)
- {
- try
- {
- return resourceBundle.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
- }
-
- /**
- * Returns the application property string corresponding to the given key.
- *
- * @param key The key of the string.
- * @return the application property string corresponding to the given key
- */
- public static String getApplicationString(String key)
- {
- try
- {
- return applicationBundle.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
- }
-} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/plugin/branding/Constants.java b/src/net/java/sip/communicator/plugin/branding/Constants.java
index 6b7d2e4..861e67e 100644
--- a/src/net/java/sip/communicator/plugin/branding/Constants.java
+++ b/src/net/java/sip/communicator/plugin/branding/Constants.java
@@ -30,14 +30,14 @@ public class Constants
* Dark blue color used in the about window and the splash screen.
*/
public static final Color TITLE_COLOR
- = new Color(Integer.parseInt(
- Resources.getColor("splashScreenTitleColor"), 16));
+ = new Color(
+ BrandingActivator.getResources().getColor("splashScreenTitleColor"));
/**
* Text color used in the about window and the splash screen.
*/
public static final String TEXT_COLOR
- = Resources.getColor("splashScreenTextColor");
+ = BrandingActivator.getResources().getColorString("splashScreenTextColor");
/*
@@ -50,10 +50,9 @@ public class Constants
* The default <tt>Font</tt> object used through this ui implementation.
*/
public static final Font FONT
- = new Font( BrandingResources.getApplicationString("fontName"),
+ = new Font( BrandingActivator.getResources().getSettingsString("fontName"),
Font.PLAIN,
- new Integer(BrandingResources.getApplicationString("fontSize"))
- .intValue());
+ BrandingActivator.getResources().getSettingsInt("fontSize"));
/**
* Temporary method to load the css style used in the chat window.
@@ -62,9 +61,8 @@ public class Constants
*/
public static void loadSimpleStyle(StyleSheet style)
{
- InputStream is = Constants.class.getClassLoader()
- .getResourceAsStream(
- BrandingResources.getResourceString("textStyle"));
+ InputStream is = BrandingActivator.getResources().
+ getSettingsInputStream("textStyle");
Reader r = new BufferedReader(new InputStreamReader(is));
try
diff --git a/src/net/java/sip/communicator/plugin/branding/Resources.java b/src/net/java/sip/communicator/plugin/branding/Resources.java
deleted file mode 100644
index da0d2ba..0000000
--- a/src/net/java/sip/communicator/plugin/branding/Resources.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.plugin.branding;
-
-import java.text.*;
-import java.util.*;
-
-import net.java.sip.communicator.util.*;
-
-/**
- * The Messages class manages the access to the internationalization properties
- * files.
- *
- * @author Yana Stamcheva
- */
-public class Resources
-{
- private static Logger log = Logger.getLogger(Resources.class);
-
- private static final String RESOURCE_LOCATION
- = "resources.languages.plugin.branding.resources";
-
- private static final ResourceBundle resourceBundle
- = ResourceBundle.getBundle(RESOURCE_LOCATION);
-
- private static final String COLOR_BUNDLE_NAME
- = "resources.colors.colorResources";
-
- private static final ResourceBundle COLOR_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(COLOR_BUNDLE_NAME);
-
- /**
- * Returns an internationalized string corresponding to the given key.
- *
- * @param key The key of the string.
- * @return An internationalized string corresponding to the given key.
- */
- public static String getString(String key)
- {
- try
- {
- return resourceBundle.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
- }
-
- /**
- * Returns an internationalized string corresponding to the given key,
- * by replacing all occurences of '?' with the given string param.
- * @param key The key of the string.
- * @param params the params, that should replace {1}, {2}, etc. in the
- * string given by the key parameter
- * @return An internationalized string corresponding to the given key,
- * by replacing all occurences of {#number} with the given string param.
- */
- public static String getString(String key, String[] params)
- {
- String resourceString;
-
- try
- {
- resourceString = resourceBundle.getString(key);
-
- resourceString = MessageFormat.format(
- resourceString, (Object[]) params);
-
- }
- catch (MissingResourceException e)
- {
- log.error("Missing string resource.", e);
-
- resourceString = '!' + key + '!';
- }
-
- return resourceString;
- }
-
- /**
- * Returns an int RGB color corresponding to the given key.
- *
- * @param key The key of the string.
- *
- * @return an int RGB color corresponding to the given key.
- */
- public static String getColor(String key)
- {
- try
- {
- return COLOR_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- log.error("Missing color resource.", e);
-
- return "FFFFFF";
- }
- }
-}
diff --git a/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java b/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java
index c923e99..ba990a9 100644
--- a/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java
+++ b/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java
@@ -12,13 +12,13 @@ public class WelcomeWindow extends JDialog
private WindowBackground mainPanel = new WindowBackground();
private JLabel titleLabel
- = new JLabel(BrandingResources.getApplicationString("applicationName"));
+ = new JLabel(BrandingActivator.getResources().getSettingsString("applicationName"));
private JLabel versionLabel = new JLabel(" "
+ System.getProperty("sip-communicator.version"));
- private JTextArea logoArea = new JTextArea(Resources
- .getString("logoMessage"));
+ private JTextArea logoArea = new JTextArea(
+ BrandingActivator.getResources().getI18NString("logoMessage"));
private StyledHTMLEditorPane rightsArea = new StyledHTMLEditorPane();
@@ -29,13 +29,14 @@ public class WelcomeWindow extends JDialog
private JPanel loadingPanel = new JPanel(new BorderLayout());
private JLabel loadingLabel = new JLabel(
- Resources.getString("loading") + ": ");
+ BrandingActivator.getResources().getI18NString("loading") + ": ");
private JLabel bundleLabel = new JLabel();
public WelcomeWindow()
{
- this.setTitle(BrandingResources.getApplicationString("applicationName"));
+ this.setTitle(
+ BrandingActivator.getResources().getSettingsString("applicationName"));
this.setModal(false);
this.setUndecorated(true);
@@ -56,9 +57,8 @@ public class WelcomeWindow extends JDialog
this.versionLabel.setForeground(Constants.TITLE_COLOR);
this.versionLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
- int logoAreaFontSize = new Integer(
- BrandingResources.getApplicationString("aboutLogoFontSize"))
- .intValue();
+ int logoAreaFontSize = BrandingActivator.getResources().
+ getSettingsInt("aboutLogoFontSize");
this.logoArea.setFont(
Constants.FONT.deriveFont(Font.BOLD, logoAreaFontSize));
@@ -72,11 +72,12 @@ public class WelcomeWindow extends JDialog
this.logoArea.setBorder(BorderFactory.createEmptyBorder(20, 190, 0, 0));
this.rightsArea.setContentType("text/html");
- this.rightsArea.appendToEnd(Resources.getString("welcomeMessage",
+ this.rightsArea.appendToEnd(BrandingActivator.getResources().getI18NString(
+ "welcomeMessage",
new String[]{
Constants.TEXT_COLOR,
- BrandingResources.getApplicationString("applicationName"),
- BrandingResources.getApplicationString("applicationWebSite")
+ BrandingActivator.getResources().getSettingsString("applicationName"),
+ BrandingActivator.getResources().getSettingsString("applicationWebSite")
}));
this.rightsArea.setPreferredSize(new Dimension(50, 50));
@@ -87,7 +88,8 @@ public class WelcomeWindow extends JDialog
this.rightsArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
this.licenseArea.setContentType("text/html");
- this.licenseArea.appendToEnd(Resources.getString("license",
+ this.licenseArea.appendToEnd(BrandingActivator.getResources().getI18NString(
+ "license",
new String[]
{
Constants.TEXT_COLOR
@@ -186,9 +188,8 @@ public class WelcomeWindow extends JDialog
try
{
- bgImage = ImageIO.read(WindowBackground.class.getClassLoader()
- .getResource(
- BrandingResources.getResourceString("splashScreenBg")));
+ bgImage = ImageIO.read(
+ BrandingActivator.getResources().getImageURL("splashScreenBg"));
}
catch (IOException e)
{
diff --git a/src/net/java/sip/communicator/plugin/branding/branding.manifest.mf b/src/net/java/sip/communicator/plugin/branding/branding.manifest.mf
index 4a6a2bc..9042c9c 100755
--- a/src/net/java/sip/communicator/plugin/branding/branding.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/branding/branding.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.service.browserlauncher,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.gui.event,
net.java.sip.communicator.util,
diff --git a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoActivator.java b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoActivator.java
index 2d758f8..2b50db6 100644
--- a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoActivator.java
+++ b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoActivator.java
@@ -20,7 +20,7 @@ public class ContactInfoActivator implements BundleActivator
private static BrowserLauncherService browserLauncherService;
- private static BundleContext bundleContext;
+ static BundleContext bundleContext;
/**
* Starts this bundle.
diff --git a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java
index 17294d2..2b7252e 100644
--- a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java
+++ b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java
@@ -98,13 +98,13 @@ public class ContactInfoDetailsPanel
JScrollPane extendedScrollPane = new JScrollPane(extendedPanel);
this.tabbedPane.addTab(Resources.getString("summary"), icon,
- summaryPanel, Resources.getString("summaryDesc")
+ summaryPanel, Resources.getString("contactSummaryDesc")
+ contact.getDisplayName());
this.tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
this.tabbedPane.addTab(Resources.getString("extended"), icon,
- extendedScrollPane, Resources.getString("extendedDesc")
+ extendedScrollPane, Resources.getString("contactExtendedDesc")
+ contact.getDisplayName());
this.tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
@@ -126,7 +126,7 @@ public class ContactInfoDetailsPanel
private JPanel createUnsupportedPanel()
{
JTextArea unsupportedTextArea =
- new JTextArea(Resources.getString("notSupported"));
+ new JTextArea(Resources.getString("contactInfoNotSupported"));
unsupportedTextArea.setEditable(false);
unsupportedTextArea.setLineWrap(true);
@@ -169,7 +169,7 @@ public class ContactInfoDetailsPanel
if (bytes != null)
avatarImage = new ImageIcon(bytes);
else
- avatarImage = Resources.getImage("defaultPersonIcon");
+ avatarImage = Resources.getImage("contactInfoDefaultPersonIcon");
ImageIcon scaledImage =
new ImageIcon(avatarImage.getImage().getScaledInstance(105, 130,
diff --git a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDialog.java b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDialog.java
index c4ea25a..7e828a9 100644
--- a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDialog.java
+++ b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDialog.java
@@ -52,11 +52,11 @@ public class ContactInfoDialog
*/
public ContactInfoDialog(MetaContact metaContact)
{
- super(Resources.getString("contactInfo"));
+ super(Resources.getString("contactDetails"));
this.metaContact = metaContact;
- this.setTitle(Resources.getString("contactInfo")
+ this.setTitle(Resources.getString("contactDetails")
+ ": "
+ metaContact.getDisplayName());
diff --git a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoMenuItem.java b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoMenuItem.java
index c612bf8..dce3bfb 100644
--- a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoMenuItem.java
+++ b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoMenuItem.java
@@ -25,7 +25,7 @@ public class ContactInfoMenuItem
{
private JMenuItem menuItem
= new JMenuItem(Resources.getString("contactInfo"),
- Resources.getImage("infoIcon"));
+ Resources.getImage("contactInfoIcon"));
private MetaContact metaContact;
diff --git a/src/net/java/sip/communicator/plugin/contactinfo/Resources.java b/src/net/java/sip/communicator/plugin/contactinfo/Resources.java
index 77fda90..5f72602 100644
--- a/src/net/java/sip/communicator/plugin/contactinfo/Resources.java
+++ b/src/net/java/sip/communicator/plugin/contactinfo/Resources.java
@@ -14,8 +14,11 @@ import java.util.*;
import javax.imageio.*;
import javax.swing.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -26,31 +29,7 @@ public class Resources {
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.contactinfo.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.contactinfo.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
/**
* Returns an internationalized string corresponding to the given key.
@@ -59,15 +38,7 @@ public class Resources {
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
-
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -79,18 +50,39 @@ public class Resources {
{
BufferedImage image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID);
-
+ InputStream in =
+ getResources().getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
try
{
- image = ImageIO.read(Resources.class.getClassLoader()
- .getResourceAsStream(path));
+ image = ImageIO.read(in);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return new ImageIcon(image);
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = ContactInfoActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)ContactInfoActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/contactinfo/contactinfo.manifest.mf b/src/net/java/sip/communicator/plugin/contactinfo/contactinfo.manifest.mf
index 530dcec..2fdc1e8 100644
--- a/src/net/java/sip/communicator/plugin/contactinfo/contactinfo.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/contactinfo/contactinfo.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,
diff --git a/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultColorPackImpl.java b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultColorPackImpl.java
new file mode 100644
index 0000000..5c4ac6e
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultColorPackImpl.java
@@ -0,0 +1,33 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.defaultresourcepack;
+
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class DefaultColorPackImpl
+ implements ColorPack
+{
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.colors.colorResources";
+ }
+
+ public String getName()
+ {
+ return "Default Color Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator default Color resource pack.";
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultImagePackImpl.java b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultImagePackImpl.java
new file mode 100644
index 0000000..b8b9779
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultImagePackImpl.java
@@ -0,0 +1,33 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.defaultresourcepack;
+
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class DefaultImagePackImpl
+ implements ImagePack
+{
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.images.images";
+ }
+
+ public String getName()
+ {
+ return "Default Image Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator default Image resource pack.";
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java
new file mode 100644
index 0000000..e9dc7f0
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultLanguagePackImpl.java
@@ -0,0 +1,100 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license. See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.defaultresourcepack;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import java.util.jar.*;
+
+import net.java.sip.communicator.service.resources.*;
+import net.java.sip.communicator.util.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class DefaultLanguagePackImpl
+ implements LanguagePack
+{
+ private Logger logger = Logger.getLogger(DefaultLanguagePackImpl.class);
+
+ private ArrayList localeList = new ArrayList();
+
+ public DefaultLanguagePackImpl()
+ {
+ try
+ {
+ JarFile jf = new JarFile(getJarfileName());
+
+ Enumeration resources = jf.entries();
+ while (resources.hasMoreElements())
+ {
+ JarEntry je = (JarEntry) resources.nextElement();
+
+ Locale locale;
+ String entryName = je.getName();
+ if (entryName.matches("resources/languages/.*\\.properties"))
+ {
+ int localeIndex = entryName.indexOf('_');
+
+ if (localeIndex == -1)
+ locale = new Locale("EN");
+ else
+ {
+ String localeName =
+ entryName.substring(localeIndex + 1,
+ entryName.indexOf('.'));
+
+ locale = new Locale(localeName);
+ }
+
+ localeList.add(locale);
+ }
+ }
+ }
+ catch (java.io.IOException e)
+ {
+ logger.error("Cannot load locales.", e);
+ }
+ }
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.languages.resources";
+ }
+
+ public Iterator getAvailableLocales()
+ {
+ return localeList.iterator();
+ }
+
+ public String getName()
+ {
+ return "Default Language Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator default Language resource pack.";
+ }
+
+ private String getJarfileName()
+ {
+ // Get the location of the jar file and the jar file name
+ java.net.URL outputURL =
+ DefaultLanguagePackImpl.class.getProtectionDomain().getCodeSource()
+ .getLocation();
+
+ String outputString = outputURL.toString();
+
+ String[] parseString;
+ parseString = outputString.split("file:");
+
+ String jarFilename = parseString[1];
+ return jarFilename;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultResourcePackActivator.java b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultResourcePackActivator.java
new file mode 100644
index 0000000..bc06e4b
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultResourcePackActivator.java
@@ -0,0 +1,94 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.defaultresourcepack;
+
+import java.util.Hashtable;
+import net.java.sip.communicator.service.resources.*;
+
+import net.java.sip.communicator.util.Logger;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ *
+ * @author damencho
+ */
+public class DefaultResourcePackActivator
+ implements BundleActivator
+{
+
+ private Logger logger =
+ Logger.getLogger(DefaultResourcePackActivator.class);
+ private static BundleContext bundleContext;
+
+ public void start(BundleContext bc) throws Exception
+ {
+ bundleContext = bc;
+
+ DefaultColorPackImpl colPackImpl =
+ new DefaultColorPackImpl();
+
+ Hashtable props = new Hashtable();
+ props.put(ColorPack.RESOURCE_NAME,
+ ColorPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( ColorPack.class.getName(),
+ colPackImpl,
+ props);
+
+ DefaultImagePackImpl imgPackImpl =
+ new DefaultImagePackImpl();
+
+ Hashtable imgProps = new Hashtable();
+ imgProps.put(ImagePack.RESOURCE_NAME,
+ ImagePack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( ImagePack.class.getName(),
+ imgPackImpl,
+ imgProps);
+
+ DefaultLanguagePackImpl langPackImpl =
+ new DefaultLanguagePackImpl();
+
+ Hashtable langProps = new Hashtable();
+ langProps.put(LanguagePack.RESOURCE_NAME,
+ LanguagePack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( LanguagePack.class.getName(),
+ langPackImpl,
+ langProps);
+
+ DefaultSettingsPackImpl setPackImpl =
+ new DefaultSettingsPackImpl();
+
+ Hashtable setProps = new Hashtable();
+ langProps.put(SettingsPack.RESOURCE_NAME,
+ SettingsPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( SettingsPack.class.getName(),
+ setPackImpl,
+ setProps);
+
+ DefaultSoundPackImpl sndPackImpl =
+ new DefaultSoundPackImpl();
+
+ Hashtable sndProps = new Hashtable();
+ langProps.put(SoundPack.RESOURCE_NAME,
+ SoundPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( SoundPack.class.getName(),
+ sndPackImpl,
+ sndProps);
+
+ logger.info("Default resources ... [REGISTERED]");
+ }
+
+ public void stop(BundleContext bc) throws Exception
+ {
+
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSettingsPackImpl.java b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSettingsPackImpl.java
new file mode 100644
index 0000000..6ec12df
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSettingsPackImpl.java
@@ -0,0 +1,33 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.defaultresourcepack;
+
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class DefaultSettingsPackImpl
+ implements SettingsPack
+{
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.config.defaults";
+ }
+
+ public String getName()
+ {
+ return "Default Settings Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator default Settings resource pack.";
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSoundPackImpl.java b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSoundPackImpl.java
new file mode 100644
index 0000000..82e10ed
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/defaultresourcepack/DefaultSoundPackImpl.java
@@ -0,0 +1,33 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.defaultresourcepack;
+
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class DefaultSoundPackImpl
+ implements SoundPack
+{
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.sounds.sounds";
+ }
+
+ public String getName()
+ {
+ return "Default Sounds Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator default Sounds resource pack.";
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/defaultresourcepack/defaultresourcepack.manifest.mf b/src/net/java/sip/communicator/plugin/defaultresourcepack/defaultresourcepack.manifest.mf
new file mode 100644
index 0000000..182caf1
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/defaultresourcepack/defaultresourcepack.manifest.mf
@@ -0,0 +1,8 @@
+Bundle-Activator: net.java.sip.communicator.plugin.defaultresourcepack.DefaultResourcePackActivator
+Bundle-Name: Default Resource Pack
+Bundle-Description: The plugin offering default images and languages.
+Bundle-Vendor: sip-communicator.org
+Bundle-Version: 0.0.1
+Import-Package: org.osgi.framework,
+ net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources
diff --git a/src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java
index 7fa4f61..1d48b41 100644
--- a/src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/dictaccregwizz/DictAccountRegistrationWizard.java
@@ -86,7 +86,7 @@ public class DictAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameDict");
}
/**
@@ -96,7 +96,7 @@ public class DictAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionDict");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/dictaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/dictaccregwizz/Resources.java
index 4266c2c..348f0f6 100644
--- a/src/net/java/sip/communicator/plugin/dictaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/dictaccregwizz/Resources.java
@@ -10,8 +10,11 @@ package net.java.sip.communicator.plugin.dictaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -23,35 +26,11 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.dictaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.dictaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ public static ImageID DICT_LOGO = new ImageID("protocolIconDict");
- public static ImageID DICT_LOGO = new ImageID("protocolIcon");
-
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageDict");
/**
* Returns an internationalized string corresponding to the given key.
@@ -61,15 +40,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
- //return '!' + key + '!';
+ return getResources().getI18NString(key);
}
/**
@@ -79,20 +50,24 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+ if(in == null)
+ return null;
+
+ byte[] image = null;
+
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
-
+
return image;
}
@@ -113,4 +88,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = DictAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)DictAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/dictaccregwizz/dictaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/dictaccregwizz/dictaccregwizz.manifest.mf
index 4dcab77..c1c4169 100644
--- a/src/net/java/sip/communicator/plugin/dictaccregwizz/dictaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/dictaccregwizz/dictaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/ExtendedCallHistorySearchActivator.java b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/ExtendedCallHistorySearchActivator.java
index 9dd5efa..9847c8f 100644
--- a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/ExtendedCallHistorySearchActivator.java
+++ b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/ExtendedCallHistorySearchActivator.java
@@ -26,7 +26,7 @@ public class ExtendedCallHistorySearchActivator
private Logger logger
= Logger.getLogger(ExtendedCallHistorySearchActivator.class);
- private static BundleContext context;
+ static BundleContext context;
public void start(BundleContext bc) throws Exception
{
diff --git a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java
index e5c61a9..876a378 100644
--- a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java
+++ b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/Resources.java
@@ -14,8 +14,11 @@ import java.util.*;
import javax.imageio.*;
import javax.swing.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files, image resources and color resources used in this plugin.
@@ -26,37 +29,7 @@ public class Resources {
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.extendedcallhistorysearch.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.extendedcallhistorysearch.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
- private static final String COLOR_BUNDLE_NAME
- = "resources.colors.colorResources";
-
- private static final ResourceBundle COLOR_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(COLOR_BUNDLE_NAME);
+ private static ResourceManagementService resourcesService;
/**
* Returns an internationalized string corresponding to the given key.
@@ -65,28 +38,7 @@ public class Resources {
*/
public static String getString(String key)
{
- String resourceString;
-
- try
- {
- resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- {
- String firstPart = resourceString.substring(0, mnemonicIndex);
- String secondPart = resourceString.substring(mnemonicIndex + 1);
-
- resourceString = firstPart.concat(secondPart);
- }
- }
- catch (MissingResourceException e)
- {
- resourceString = '!' + key + '!';
- }
-
- return resourceString;
+ return getResources().getI18NString(key);
}
/**
@@ -99,17 +51,19 @@ public class Resources {
{
BufferedImage image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID);
-
+ InputStream in =
+ getResources().getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
try
{
- image = ImageIO.read(Resources.class.getClassLoader()
- .getResourceAsStream(path));
-
+ image = ImageIO.read(in);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return new ImageIcon(image);
@@ -123,23 +77,7 @@ public class Resources {
*/
public static char getMnemonic(String key)
{
- String resourceString;
- try
- {
- resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- {
- return resourceString.charAt(mnemonicIndex + 1);
- }
- }
- catch (MissingResourceException e)
- {
- return '!';
- }
- return '!';
+ return getResources().getI18nMnemonic(key);
}
/**
@@ -151,15 +89,24 @@ public class Resources {
*/
public static int getColor(String key)
{
- try
+ return getResources().getColor(key);
+ }
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
{
- return Integer.parseInt(COLOR_RESOURCE_BUNDLE.getString(key), 16);
+ ServiceReference serviceReference = ExtendedCallHistorySearchActivator.context
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)ExtendedCallHistorySearchActivator.context
+ .getService(serviceReference);
}
- catch (MissingResourceException e)
- {
- log.error("Missing color resource.", e);
- return 0xFFFFFF;
- }
+ return resourcesService;
}
}
diff --git a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/extendedcallhistorysearch.manifest.mf b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/extendedcallhistorysearch.manifest.mf
index b73a13f..df4af89 100644
--- a/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/extendedcallhistorysearch.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/extendedcallhistorysearch/extendedcallhistorysearch.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,
diff --git a/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationForm.java b/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationForm.java
index e325fd9..613f85c 100644
--- a/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationForm.java
+++ b/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationForm.java
@@ -265,7 +265,7 @@ public class GeneralConfigurationForm
public byte[] getIcon()
{
- return Resources.getImage("pluginIcon");
+ return Resources.getImage("pluginIconGeneralConfig");
}
public String getTitle()
diff --git a/src/net/java/sip/communicator/plugin/generalconfig/Resources.java b/src/net/java/sip/communicator/plugin/generalconfig/Resources.java
index aab180e..6804cdc 100644
--- a/src/net/java/sip/communicator/plugin/generalconfig/Resources.java
+++ b/src/net/java/sip/communicator/plugin/generalconfig/Resources.java
@@ -10,8 +10,11 @@ package net.java.sip.communicator.plugin.generalconfig;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -22,44 +25,7 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.generalconfig.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.generalconfig.resources";
-
- /**
- * The name of the resource, where application properties are
- * stored.
- */
- private static final String APPLICATION_RESUORCE_LOCATION
- = "resources.application";
-
- /**
- * The application resource bundle.
- */
- private static final ResourceBundle APPLICATION_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(APPLICATION_RESUORCE_LOCATION);
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
/**
* Returns an internationalized string corresponding to the given key.
@@ -68,14 +34,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -85,14 +44,7 @@ public class Resources
*/
public static String getApplicationString(String key)
{
- try
- {
- return APPLICATION_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getSettingsString(key);
}
/**
@@ -102,19 +54,42 @@ public class Resources
*/
public static byte[] getImage(String imageId)
{
- byte[] image = new byte[100000];
+ InputStream in =
+ getResources().getImageInputStream(imageId);
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageId);
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageId, e);
}
return image;
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = GeneralConfigPluginActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)GeneralConfigPluginActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/generalconfig/generalconfig.manifest.mf b/src/net/java/sip/communicator/plugin/generalconfig/generalconfig.manifest.mf
index 44332fd..1dc25ed 100644
--- a/src/net/java/sip/communicator/plugin/generalconfig/generalconfig.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/generalconfig/generalconfig.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,
diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java
index 7ca29ee..54d0424 100644
--- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccountRegistrationWizard.java
@@ -86,7 +86,7 @@ public class GibberishAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameGibberish");
}
/**
@@ -96,7 +96,7 @@ public class GibberishAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionGibberish");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/Resources.java
index 0010823..afe720b 100644
--- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/Resources.java
@@ -8,10 +8,12 @@
package net.java.sip.communicator.plugin.gibberishaccregwizz;
import java.io.*;
-import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -23,41 +25,17 @@ public class Resources
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.gibberishaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.gibberishaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
/**
* A constant pointing to the Gibberish protocol logo icon.
*/
- public static ImageID GIBBERISH_LOGO = new ImageID("protocolIcon");
+ public static ImageID GIBBERISH_LOGO = new ImageID("protocolIconGibberish");
/**
* A constant pointing to the Gibberish protocol wizard page image.
*/
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageGibberish");
/**
* Returns an internationalized string corresponding to the given key.
@@ -67,14 +45,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException exc)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -85,18 +56,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
- catch (IOException exc)
+ catch (IOException e)
{
- log.error("Failed to load image:" + path, exc);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -119,5 +94,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = GibberishAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)GibberishAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/gibberishaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/gibberishaccregwizz.manifest.mf
index 13505e1..06d5959 100644
--- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/gibberishaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/gibberishaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java
index 776b02e..f0b3309 100644
--- a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java
@@ -41,7 +41,7 @@ public class FirstWizardPage
private JPanel valuesPanel = new JPanel();
- private JLabel userIDLabel = new JLabel(Resources.getString("username"));
+ private JLabel userIDLabel = new JLabel(Resources.getString("gtalkUsername"));
private JLabel passLabel = new JLabel(Resources.getString("password"));
@@ -95,7 +95,7 @@ public class FirstWizardPage
private JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
private JTextArea registerArea = new JTextArea(Resources
- .getString("registerNewAccountText"));
+ .getString("gtalkRegisterNewAccountText"));
private JButton registerButton = new JButton(Resources
.getString("registerNewAccount"));
diff --git a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java
index ff106a3..fab7a41 100644
--- a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java
@@ -116,7 +116,7 @@ public class GoogleTalkAccountRegistrationWizard
{
Hashtable summaryTable = new Hashtable();
- summaryTable.put( Resources.getString("username"),
+ summaryTable.put( Resources.getString("gtalkUsername"),
registration.getUserID());
summaryTable.put( Resources.getString("rememberPassword"),
diff --git a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/Resources.java
index 889d62f..9e10d2a 100644
--- a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/Resources.java
@@ -9,6 +9,9 @@ import java.io.*;
import java.util.*;
import net.java.sip.communicator.util.*;
+import net.java.sip.communicator.service.resources.*;
+
+import org.osgi.framework.*;
/**
* The <tt>Resources</tt> class manages the access to the internationalization
@@ -20,32 +23,8 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME =
- "resources.languages.plugin.googletalkaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String RESOURCE_NAME =
- "net.java.sip.communicator.plugin.googletalkaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE =
- ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle RESOURCE_BUNDLE =
- ResourceBundle.getBundle(RESOURCE_NAME);
-
+ private static ResourceManagementService resourcesService;
+
/**
* A constant pointing to the Google Talk protocol logo image.
*/
@@ -64,27 +43,7 @@ public class Resources
*/
public static String getString(String key)
{
- String resourceString;
- try
- {
- resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if (mnemonicIndex > -1)
- {
- String firstPart = resourceString.substring(0, mnemonicIndex);
- String secondPart = resourceString.substring(mnemonicIndex + 1);
-
- resourceString = firstPart.concat(secondPart);
- }
- }
- catch (MissingResourceException e)
- {
- resourceString = '!' + key + '!';
- }
-
- return resourceString;
+ return getResources().getI18NString(key);
}
/**
@@ -95,26 +54,7 @@ public class Resources
*/
public static char getMnemonic(String key)
{
- String resourceString;
-
- try
- {
- resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if (mnemonicIndex > -1)
- {
- return resourceString.charAt(mnemonicIndex + 1);
- }
-
- }
- catch (MissingResourceException e)
- {
- return '!';
- }
-
- return '!';
+ return getResources().getI18nMnemonic(key);
}
/**
@@ -125,18 +65,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader().getResourceAsStream(path).read(
- image);
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -151,14 +95,7 @@ public class Resources
*/
public static String getProperty(String key)
{
- try
- {
- return RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -178,4 +115,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = GoogleTalkAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)GoogleTalkAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/googletalkaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/googletalkaccregwizz.manifest.mf
index 6266fce..4b4936f 100644
--- a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/googletalkaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/googletalkaccregwizz.manifest.mf
@@ -6,6 +6,7 @@ Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.icqconstants,
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/ButtonTableCellRenderer.java b/src/net/java/sip/communicator/plugin/guicustomization/ButtonTableCellRenderer.java
new file mode 100644
index 0000000..0bccc08
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/ButtonTableCellRenderer.java
@@ -0,0 +1,46 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license. See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+import javax.swing.*;
+import javax.swing.table.*;
+
+/**
+ * Custom <tt>TableCellRenderer</tt> that renders
+ * <tt>ProtocolProviderService</tt> objects, <tt>MetaContactGroup</tt>
+ * objects and JLabels.
+ *
+ * @author Yana Stamcheva
+ */
+public class ButtonTableCellRenderer
+ extends JPanel
+ implements TableCellRenderer
+{
+ public ButtonTableCellRenderer()
+ {
+ super(new FlowLayout(FlowLayout.CENTER));
+
+ this.setOpaque(true);
+ }
+
+ public Component getTableCellRendererComponent( JTable table,
+ Object value,
+ boolean isSelected,
+ boolean hasFocus,
+ int row,
+ int column)
+ {
+ this.removeAll();
+
+ if(value instanceof JButton)
+ {
+ this.add((JButton) value);
+ }
+
+ return this;
+ }
+} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/ButtonTableEditor.java b/src/net/java/sip/communicator/plugin/guicustomization/ButtonTableEditor.java
new file mode 100644
index 0000000..c8b793f
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/ButtonTableEditor.java
@@ -0,0 +1,58 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+
+import javax.swing.*;
+
+/**
+ * @version 1.0 11/09/98
+ */
+public class ButtonTableEditor
+ extends DefaultCellEditor
+{
+ private JButton button;
+
+ private JPanel buttonPanel;
+
+ private boolean isPushed;
+
+ public ButtonTableEditor()
+ {
+ super(new JCheckBox());
+ }
+
+ public Component getTableCellEditorComponent(JTable table, Object value,
+ boolean isSelected, int row, int column)
+ {
+ isPushed = true;
+ if (value instanceof JButton)
+ {
+ this.button = (JButton) value;
+
+ buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
+
+ buttonPanel.add(button);
+
+ return buttonPanel;
+ }
+
+ return null;
+ }
+
+ public Object getCellEditorValue()
+ {
+ isPushed = false;
+ return button;
+ }
+
+ public boolean stopCellEditing()
+ {
+ isPushed = false;
+ return super.stopCellEditing();
+ }
+
+ protected void fireEditingStopped()
+ {
+ super.fireEditingStopped();
+ }
+} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/ColorsPanel.java b/src/net/java/sip/communicator/plugin/guicustomization/ColorsPanel.java
new file mode 100644
index 0000000..ce3853f
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/ColorsPanel.java
@@ -0,0 +1,105 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+
+import javax.swing.*;
+import javax.swing.table.*;
+
+public class ColorsPanel
+ extends JScrollPane
+{
+ private JTable colorsTable = new JTable();
+
+ private CustomTableModel colorsTableModel = new CustomTableModel();
+
+ public ColorsPanel()
+ {
+ this.getViewport().add(colorsTable);
+
+ colorsTable.setModel(colorsTableModel);
+ colorsTableModel.addColumn("Description");
+ colorsTableModel.addColumn("Color");
+ colorsTableModel.addColumn("Change color");
+
+ colorsTable.getColumnModel().getColumn(1).setCellRenderer(
+ new LabelTableCellRenderer());
+
+ TableColumn buttonColumn
+ = colorsTable.getColumnModel().getColumn(2);
+
+ buttonColumn.setCellRenderer(new ButtonTableCellRenderer());
+ buttonColumn.setCellEditor(new ButtonTableEditor());
+
+ this.initColorTable();
+ }
+
+ private void initColorTable()
+ {
+ Iterator colorKeys
+ = GuiCustomizationActivator.getResources()
+ .getCurrentColors();
+
+ while (colorKeys.hasNext())
+ {
+ String key = (String) colorKeys.next();
+ final Color color = new Color(
+ GuiCustomizationActivator.getResources().getColor(key));
+
+ final JLabel colorLabel = new JLabel();
+ colorLabel.setBackground(color);
+
+ JButton colorChooserButton = new JButton();
+ colorChooserButton.setAction(
+ new ChooseColorAction(color, colorLabel));
+
+ colorsTableModel.addRow(new Object[]{ key,
+ colorLabel,
+ colorChooserButton});
+ colorChooserButton.setText("Choose a colour");
+
+ int rowHeight = 40;
+ colorsTable.setRowHeight( colorsTableModel.getRowCount() - 1,
+ rowHeight );
+ }
+ }
+
+ private class ChooseColorAction extends AbstractAction
+ {
+ private Color defaultColor;
+ private JLabel colorLabel;
+
+ public ChooseColorAction(Color defaultColor, JLabel colorLabel)
+ {
+ this.defaultColor = defaultColor;
+ this.colorLabel = colorLabel;
+ }
+ public void actionPerformed(ActionEvent evt)
+ {
+ Color newColor
+ = JColorChooser.showDialog( new JColorChooser(),
+ "Choose a colour",
+ defaultColor);
+
+ colorLabel.setBackground(newColor);
+ }
+ }
+
+ Hashtable<String, String> getColors()
+ {
+ Hashtable res = new Hashtable();
+ int rows = colorsTableModel.getRowCount();
+ for (int i = 0; i < rows; i++)
+ {
+ String key = (String)colorsTableModel.getValueAt(i, 0);
+ JLabel colorLabel = (JLabel)colorsTableModel.getValueAt(i, 1);
+
+ res.put(
+ key,
+ Integer.toHexString(colorLabel.getBackground().getRGB()).substring(2));
+ }
+
+ return res;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/CustomTableModel.java b/src/net/java/sip/communicator/plugin/guicustomization/CustomTableModel.java
new file mode 100644
index 0000000..f969415
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/CustomTableModel.java
@@ -0,0 +1,18 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import javax.swing.*;
+import javax.swing.table.*;
+
+public class CustomTableModel
+ extends DefaultTableModel
+{
+ public boolean isCellEditable(int row, int column)
+ {
+ Object o = getValueAt(row, column);
+
+ if (column == 0 || o instanceof JLabel)
+ return false;
+
+ return true;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/CustomizationWindow.java b/src/net/java/sip/communicator/plugin/guicustomization/CustomizationWindow.java
new file mode 100644
index 0000000..8290fa8
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/CustomizationWindow.java
@@ -0,0 +1,349 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license. See terms of license at gnu.org.
+ */
+/*
+ * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
+ * Builder, which is free for non-commercial use. If Jigloo is being used
+ * commercially (ie, by a corporation, company or business for any purpose
+ * whatever) then you should purchase a license for each developer using Jigloo.
+ * Please visit www.cloudgarden.com for details. Use of Jigloo implies
+ * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
+ * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
+ * ANY CORPORATE OR COMMERCIAL PURPOSE.
+ */
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+import java.util.jar.*;
+import java.util.zip.*;
+import javax.swing.*;
+
+import net.java.sip.communicator.plugin.guicustomization.resourcepack.*;
+import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
+public class CustomizationWindow
+ extends JFrame
+{
+ private JTabbedPane tabbedPane;
+
+ private ImagesPanel imagesPanel;
+
+ private SoundsPanel soundsPanel;
+
+ private ColorsPanel colorsPanel;
+
+ private I18nStringsPanel stringsPanel;
+
+ private SettingsPanel settingsPanel;
+
+ private Logger logger = Logger.getLogger(CustomizationWindow.class);
+
+ private JButton saveProjectButton = new JButton("Create Skin");
+
+ private JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
+
+ private final String srcPackagePath =
+ "/net/java/sip/communicator/plugin/guicustomization/resourcepack";
+ private final String manifestFileName = "customresourcepack.manifest.mf";
+
+ private final String[] customClassFiles = new String[]{
+ "CustomColorPackImpl",
+ "CustomImagePackImpl",
+ "CustomLanguagePackImpl",
+ "CustomResourcePackActivator",
+ "CustomSettingsPackImpl",
+ "CustomSoundPackImpl"
+ };
+
+ private final String dstPackagePath =
+ "net/java/sip/communicator/plugin/guicustomization/resourcepack";
+
+ public CustomizationWindow()
+ {
+ super("SIP Communicator Branding Studio");
+
+ this.initGUI();
+ }
+
+ private void initGUI()
+ {
+ this.imagesPanel = new ImagesPanel(this);
+ this.colorsPanel = new ColorsPanel();
+ this.soundsPanel = new SoundsPanel(this);
+ this.stringsPanel = new I18nStringsPanel();
+ this.settingsPanel = new SettingsPanel();
+
+ this.tabbedPane = new JTabbedPane();
+ this.getContentPane().add(tabbedPane, BorderLayout.CENTER);
+ this.getContentPane().add(buttonPanel, BorderLayout.SOUTH);
+
+ this.tabbedPane.addTab("Images", imagesPanel);
+ this.tabbedPane.addTab("Colors", colorsPanel);
+ this.tabbedPane.addTab("Sounds", soundsPanel);
+ this.tabbedPane.addTab("Strings", stringsPanel);
+ this.tabbedPane.addTab("Settings", settingsPanel);
+
+ this.buttonPanel.add(saveProjectButton);
+
+ this.saveProjectButton.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent arg0)
+ {
+ //TODO: Implement jar creation here.
+ performSaveProject();
+ }
+ });
+
+ this.setSize(570, 337);
+ }
+
+ private void performSaveProject()
+ {
+ try
+ {
+ File file = null;
+
+ JFileChooser fileChooser = new JFileChooser();
+
+ fileChooser.setDialogType(JFileChooser.SAVE_DIALOG);
+ fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ fileChooser.setDialogTitle("Select Destination");
+ fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
+
+ int result
+ = fileChooser.showOpenDialog(CustomizationWindow.this);
+
+ if (result == JFileChooser.APPROVE_OPTION)
+ {
+ file = fileChooser.getSelectedFile();
+ file = new File(file, "customresources.jar");
+ }
+ else
+ return;
+
+
+ InputStream manifestIs =
+ CustomizationWindow.class.
+ getResource(srcPackagePath + "/" + manifestFileName).
+ openStream();
+
+ JarOutputStream outFile =
+ new JarOutputStream(
+ new FileOutputStream(file),
+ new Manifest(manifestIs));
+
+ for (int i = 0; i < customClassFiles.length; i++)
+ {
+ String cf = customClassFiles[i];
+
+ InputStream clIs =
+ CustomizationWindow.class.
+ getResourceAsStream(srcPackagePath + "/" + cf + ".class");
+ byte[] bs = new byte[clIs.available()];
+ clIs.read(bs);
+ clIs.close();
+
+ addNewZipEntry(dstPackagePath + "/" + cf + ".class", outFile, bs);
+ }
+
+ saveColorPack(outFile);
+ saveImagePack(outFile);
+ saveLanguagePack(outFile);
+ saveSettingsPack(outFile);
+ saveSoundsPack(outFile);
+
+ outFile.flush();
+ outFile.close();
+ manifestIs.close();
+ }
+ catch (Exception e)
+ {
+
+ logger.error("",e);
+ }
+ }
+
+ private void saveColorPack(JarOutputStream outFile)
+ throws Exception
+ {
+ String resources =
+ new CustomColorPackImpl().getResourcePackBaseName();
+
+ Properties props = new Properties();
+
+ Hashtable h = colorsPanel.getColors();
+ Iterator<String> iter = h.keySet().iterator();
+ while (iter.hasNext())
+ {
+ String k = iter.next();
+ props.put(k, h.get(k));
+ }
+
+ ByteArrayOutputStream outB = new ByteArrayOutputStream();
+ props.store(outB, "Custom Color resources");
+
+ addNewZipEntry(resources.replaceAll("\\.", "/") + ".properties",
+ outFile, outB.toByteArray());
+ }
+
+ private void saveImagePack(JarOutputStream outFile)
+ throws Exception
+ {
+ String resources =
+ new CustomImagePackImpl().getResourcePackBaseName();
+
+ Properties props = new Properties();
+ String imagePathPrefix = "resources/images/";
+ int imageName = 0;
+
+ Hashtable<String, byte[]> h = imagesPanel.getImages();
+ Iterator<String> iter = h.keySet().iterator();
+ while (iter.hasNext())
+ {
+ String k = iter.next();
+ String fileName = imagePathPrefix + String.valueOf(imageName++) + ".png";
+ byte[] bs = h.get(k);
+
+ if(bs.length > 0)
+ {
+ props.put(k, fileName);
+
+ addNewZipEntry(fileName,
+ outFile, bs);
+ }
+ else
+ props.put(k, "");
+ }
+ ByteArrayOutputStream outB = new ByteArrayOutputStream();
+ props.store(outB, "Custom Color resources");
+
+ addNewZipEntry(resources.replaceAll("\\.", "/") + ".properties",
+ outFile, outB.toByteArray());
+ }
+
+ private void saveLanguagePack(JarOutputStream outFile)
+ throws Exception
+ {
+ String resources =
+ new CustomLanguagePackImpl().getResourcePackBaseName();
+
+ Hashtable languages = stringsPanel.getLanguages();
+ Iterator<String> iter = languages.keySet().iterator();
+ while (iter.hasNext())
+ {
+ String l = iter.next();
+ Properties props = new Properties();
+
+ Hashtable<String,String> strings = (Hashtable<String,String>)languages.get(l);
+
+ Iterator<String> stringsIter = strings.keySet().iterator();
+ while (stringsIter.hasNext())
+ {
+ String k = stringsIter.next();
+ String v = strings.get(k);
+
+ props.put(k, v);
+ }
+
+ String filename = null;
+ if(l.equals("en"))
+ filename =
+ resources.replaceAll("\\.", "/") + ".properties";
+ else
+ filename =
+ resources.replaceAll("\\.", "/") + "_" + l + ".properties";
+
+ ByteArrayOutputStream outB = new ByteArrayOutputStream();
+ props.store(outB, "Custom Color resources");
+
+ addNewZipEntry(filename,
+ outFile, outB.toByteArray());
+ }
+ }
+
+ private void saveSettingsPack(JarOutputStream outFile)
+ throws Exception
+ {
+ String resources =
+ new CustomSettingsPackImpl().getResourcePackBaseName();
+
+ Properties props = new Properties();
+
+ Hashtable h = settingsPanel.getSettings();
+ Iterator<String> iter = h.keySet().iterator();
+ while (iter.hasNext())
+ {
+ String k = iter.next();
+ props.put(k, h.get(k));
+ }
+
+ ByteArrayOutputStream outB = new ByteArrayOutputStream();
+ props.store(outB, "Custom Color resources");
+
+ addNewZipEntry(resources.replaceAll("\\.", "/") + ".properties",
+ outFile, outB.toByteArray());
+
+ // fix for missing styles, must also add the styles css
+ String entryName =
+ GuiCustomizationActivator.getResources().getSettingsString("textStyle");
+ InputStream in =
+ GuiCustomizationActivator.getResources().getSettingsInputStream("textStyle");
+ byte[] bs = new byte[in.available()];
+ in.read(bs);
+ in.close();
+
+ addNewZipEntry(entryName, outFile, bs);
+ }
+
+ private void saveSoundsPack(JarOutputStream outFile)
+ throws Exception
+ {
+ String resources =
+ new CustomSoundPackImpl().getResourcePackBaseName();
+
+ Properties props = new Properties();
+
+ String sndPathPrefix = "resources/sounds/";
+ int sndName = 0;
+
+ Hashtable<String,URL> h = soundsPanel.getSounds();
+ Iterator<String> iter = h.keySet().iterator();
+ while (iter.hasNext())
+ {
+ String k = iter.next();
+ URL u = h.get(k);
+
+ String fileName = sndPathPrefix + String.valueOf(sndName++);
+
+ props.put(k, fileName);
+
+ InputStream in = u.openStream();
+ byte[] bs = new byte[in.available()];
+ in.read(bs);
+
+ addNewZipEntry(fileName,
+ outFile, bs);
+ }
+
+ ByteArrayOutputStream outB = new ByteArrayOutputStream();
+ props.store(outB, "Custom Color resources");
+
+ addNewZipEntry(resources.replaceAll("\\.", "/") + ".properties",
+ outFile, outB.toByteArray());
+ }
+
+ private void addNewZipEntry(String name, JarOutputStream outFile, byte[] data)
+ throws Exception
+ {
+ ZipEntry z = new ZipEntry(name);
+ outFile.putNextEntry(z);
+ outFile.write(data);
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/GuiCustomizationActivator.java b/src/net/java/sip/communicator/plugin/guicustomization/GuiCustomizationActivator.java
new file mode 100644
index 0000000..ef73f11
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/GuiCustomizationActivator.java
@@ -0,0 +1,54 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.guicustomization;
+
+import net.java.sip.communicator.service.resources.*;
+import net.java.sip.communicator.util.*;
+
+import org.osgi.framework.*;
+
+public class GuiCustomizationActivator implements BundleActivator
+{
+ private Logger logger = Logger.getLogger(GuiCustomizationActivator.class);
+
+ static BundleContext bundleContext;
+
+ private static ResourceManagementService resourceService;
+
+ public void start(BundleContext bc) throws Exception
+ {
+ bundleContext = bc;
+
+// CustomizationWindow customizationWindow
+// = new CustomizationWindow();
+//
+// customizationWindow.pack();
+// customizationWindow.setSize(600, 500);
+// customizationWindow.setVisible(true);
+ }
+
+ public void stop(BundleContext bc) throws Exception
+ {
+ }
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourceService == null)
+ {
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourceService = (ResourceManagementService) bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourceService;
+ }
+} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/I18nStringsPanel.java b/src/net/java/sip/communicator/plugin/guicustomization/I18nStringsPanel.java
new file mode 100644
index 0000000..fa76a47
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/I18nStringsPanel.java
@@ -0,0 +1,228 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+
+import javax.swing.*;
+import javax.swing.event.*;
+
+import net.java.sip.communicator.service.resources.*;
+
+public class I18nStringsPanel
+ extends JPanel
+{
+ private JScrollPane tablePane = new JScrollPane();
+
+ private JScrollPane languageListPane = new JScrollPane();
+
+ private JTable stringsTable = new JTable();
+
+ private JList languageList = new JList();
+
+ private DefaultListModel languageListModel = new DefaultListModel();
+
+ private JButton addLanguageButton = new JButton("Add new language");
+
+ private JPanel leftPanel = new JPanel(new BorderLayout());
+
+ private Hashtable languagesTable = new Hashtable();
+
+ public I18nStringsPanel()
+ {
+ super(new BorderLayout());
+
+ this.add(tablePane, BorderLayout.CENTER);
+ this.add(leftPanel, BorderLayout.WEST);
+
+ leftPanel.add(languageListPane, BorderLayout.CENTER);
+ leftPanel.add(addLanguageButton, BorderLayout.NORTH);
+
+ languageListPane.getViewport().add(languageList);
+ languageList.setModel(languageListModel);
+ languageList
+ .addListSelectionListener(new LanguageListSelectionListener());
+
+ addLanguageButton.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent arg0)
+ {
+ NewLanguageDialog dialog = new NewLanguageDialog();
+
+ dialog.pack();
+ dialog.setLocation(
+ (Toolkit.getDefaultToolkit().getScreenSize().width
+ - dialog.getWidth()) / 2,
+ (Toolkit.getDefaultToolkit().getScreenSize().height
+ - dialog.getHeight()) / 2);
+ dialog.setVisible(true);
+ }
+ });
+
+ tablePane.getViewport().add(stringsTable);
+
+ stringsTable.setShowGrid(true);
+ stringsTable.setGridColor(Color.GRAY);
+
+ this.initLocalesList();
+ this.languageList.setSelectedIndex(0);
+ }
+
+ private void initLocalesList()
+ {
+ ResourceManagementService resourceService
+ = GuiCustomizationActivator.getResources();
+
+ Iterator locales = resourceService.getAvailableLocales();
+
+ Locale locale;
+ CustomTableModel stringsTableModel;
+
+ while(locales.hasNext())
+ {
+ locale = (Locale) locales.next();
+
+ languageListModel.addElement(locale.getLanguage());
+
+ stringsTableModel = new CustomTableModel();
+
+ stringsTableModel.addColumn("Key");
+ stringsTableModel.addColumn("Text");
+
+ this.initStringsTable(stringsTableModel, locale);
+
+ languagesTable.put( locale.getLanguage(),
+ stringsTableModel);
+ }
+ }
+
+ private void initStringsTable(CustomTableModel tableModel, Locale l)
+ {
+ Iterator stringKeys = GuiCustomizationActivator
+ .getResources().getI18nStringsByLocale(l);
+
+ while (stringKeys.hasNext())
+ {
+ String key = (String) stringKeys.next();
+ String value
+ = GuiCustomizationActivator.getResources()
+ .getI18NString(key, l);
+
+ tableModel.addRow(new Object[]{ key, value});
+ }
+ }
+
+ private class LanguageListSelectionListener implements ListSelectionListener
+ {
+ public void valueChanged(ListSelectionEvent e)
+ {
+ if (!e.getValueIsAdjusting())
+ {
+ CustomTableModel newModel
+ = (CustomTableModel) languagesTable
+ .get(languageList.getSelectedValue());
+
+ stringsTable.setModel(newModel);
+ stringsTable.getColumnModel().getColumn(1)
+ .setCellRenderer(new TextAreaCellRenderer());
+ stringsTable.repaint();
+ }
+ }
+ }
+
+ private class NewLanguageDialog
+ extends JDialog
+ implements ActionListener
+ {
+ private JPanel mainPanel = new JPanel(new BorderLayout(5, 5));
+
+ private JLabel enterLocaleLabel = new JLabel("Enter new locale: ");
+
+ private JComboBox localeBox
+ = new JComboBox(Locale.getAvailableLocales());
+
+ private JButton okButton = new JButton("Ok");
+
+ private JButton cancelButton = new JButton("Cancel");
+
+ private JPanel buttonPanel
+ = new JPanel(new FlowLayout(FlowLayout.RIGHT));
+
+ public NewLanguageDialog()
+ {
+ this.getContentPane().add(mainPanel);
+
+ this.mainPanel.add(enterLocaleLabel, BorderLayout.WEST);
+ this.mainPanel.add(localeBox, BorderLayout.CENTER);
+ this.mainPanel.add(buttonPanel, BorderLayout.SOUTH);
+
+ this.buttonPanel.add(okButton);
+ this.buttonPanel.add(cancelButton);
+
+ this.okButton.addActionListener(this);
+ this.cancelButton.addActionListener(this);
+
+ this.mainPanel.setBorder(
+ BorderFactory.createEmptyBorder(15, 15, 15, 15));
+ this.mainPanel.setPreferredSize(new Dimension(210, 120));
+
+ this.getRootPane().setDefaultButton(okButton);
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ JButton button = (JButton) evt.getSource();
+
+ if (button.equals(okButton))
+ {
+ Locale locale = (Locale)localeBox.getSelectedItem();
+
+ languageListModel.addElement(locale);
+
+ CustomTableModel stringsTableModel = new CustomTableModel();
+
+ stringsTableModel.addColumn("Key");
+ stringsTableModel.addColumn("Text");
+
+ initStringsTable(stringsTableModel, locale);
+
+ languagesTable.put( locale,
+ stringsTableModel);
+
+ this.dispose();
+ }
+ else if (button.equals(cancelButton))
+ {
+ this.dispose();
+ }
+ }
+ }
+
+ Hashtable<String, Hashtable<String, String>> getLanguages()
+ {
+ Hashtable res = new Hashtable();
+ Enumeration e = languageListModel.elements();
+ while (e.hasMoreElements())
+ {
+ String locale = (String)e.nextElement();
+
+ CustomTableModel model =
+ (CustomTableModel)languagesTable.get(locale);
+
+ Hashtable strings = new Hashtable();
+
+ int rows = model.getRowCount();
+ for (int i = 0; i < rows; i++)
+ {
+ String key = (String)model.getValueAt(i, 0);
+ String val = (String)model.getValueAt(i, 1);
+
+ strings.put(key, val);
+ }
+
+ res.put(locale, strings);
+ }
+
+ return res;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/ImagesPanel.java b/src/net/java/sip/communicator/plugin/guicustomization/ImagesPanel.java
new file mode 100644
index 0000000..4bba1c7
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/ImagesPanel.java
@@ -0,0 +1,282 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.image.*;
+import java.io.*;
+import java.util.*;
+
+import javax.imageio.*;
+import javax.swing.*;
+import javax.swing.table.*;
+
+import net.java.sip.communicator.util.*;
+
+public class ImagesPanel
+ extends JScrollPane
+{
+ private Logger logger = Logger.getLogger(ImagesPanel.class);
+
+ private CustomTableModel imagesTableModel = new CustomTableModel();
+
+ private JTable imagesTable = new JTable();
+
+ private JFrame parentWindow;
+
+ public ImagesPanel(JFrame parentWindow)
+ {
+ this.parentWindow = parentWindow;
+
+ this.getViewport().add(imagesTable);
+
+ imagesTableModel.addColumn("File path");
+ imagesTableModel.addColumn("Image size");
+ imagesTableModel.addColumn("Image");
+ imagesTableModel.addColumn("Change image");
+
+ imagesTable.setModel(imagesTableModel);
+
+ TableColumn sizeColumn
+ = imagesTable.getColumnModel().getColumn(1);
+
+ sizeColumn.setCellRenderer(
+ new LabelTableCellRenderer());
+ sizeColumn.setMaxWidth(100);
+
+ imagesTable.getColumnModel().getColumn(2).setCellRenderer(
+ new LabelTableCellRenderer());
+
+ TableColumn buttonColumn
+ = imagesTable.getColumnModel().getColumn(3);
+ buttonColumn.setCellRenderer(new ButtonTableCellRenderer());
+ buttonColumn.setCellEditor(new ButtonTableEditor());
+
+ this.initImageTable();
+ }
+
+ private void initImageTable()
+ {
+ Iterator imageKeys
+ = GuiCustomizationActivator.getResources()
+ .getCurrentImages();
+
+ // we set an initial row height, to fit the button.
+ int rowHeight = 40;
+
+ while (imageKeys.hasNext())
+ {
+ String key = (String) imageKeys.next();
+ ImageIcon image = getImage(key);
+ final JLabel imageLabel = new JLabel();
+ JLabel imageSizeLabel = new JLabel();
+ int currentImageWidth = 0;
+ int currentImageHeight = 0;
+
+ if (image != null)
+ {
+ imageLabel.setIcon(image);
+ currentImageWidth = image.getImage().getWidth(null);
+ currentImageHeight = image.getImage().getHeight(null);
+
+ imageSizeLabel
+ .setText(currentImageWidth + "x" + currentImageHeight);
+
+ images.put(key, getImageBytes(key));
+ }
+
+ JButton fileChooserButton = new JButton();
+
+ fileChooserButton.setAction(
+ new ChangeImageAction( key,
+ imageLabel,
+ imageSizeLabel,
+ currentImageWidth,
+ currentImageHeight));
+
+ imagesTableModel.addRow(new Object[]{ key,
+ imageSizeLabel,
+ imageLabel,
+ fileChooserButton});
+
+ fileChooserButton.setText("Change image");
+
+ if (image != null && rowHeight < image.getIconHeight())
+ {
+ imagesTable.setRowHeight( imagesTableModel.getRowCount() - 1,
+ image.getIconHeight() );
+ }
+ else
+ {
+ imagesTable.setRowHeight( imagesTableModel.getRowCount() - 1,
+ rowHeight );
+ }
+ }
+ }
+
+
+ /**
+ * Loads an image from a given image identifier.
+ *
+ * @param imageID The identifier of the image.
+ * @return The image for the given identifier.
+ */
+ private ImageIcon getImage(String imageID)
+ {
+ BufferedImage image = null;
+
+ InputStream in =
+ GuiCustomizationActivator.getResources()
+ .getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
+ try
+ {
+ image = ImageIO.read(in);
+ }
+ catch (IOException e)
+ {
+ logger.error("Failed to load image:" + imageID, e);
+ }
+
+ return new ImageIcon(image);
+ }
+
+ /**
+ * Loads an image from a given image identifier.
+ *
+ * @param imageID The identifier of the image.
+ * @return The image for the given identifier.
+ */
+ private byte[] getImageBytes(String imageID)
+ {
+ InputStream in =
+ GuiCustomizationActivator.getResources()
+ .getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
+ try
+ {
+ byte[] bs = new byte[in.available()];
+ in.read(bs);
+
+ return bs;
+ }
+ catch (IOException e)
+ {
+ logger.error("Failed to load image:" + imageID, e);
+ }
+
+ return null;
+ }
+
+ private class ChangeImageAction extends AbstractAction
+ {
+ private JLabel imageLabel;
+ private JLabel imageSizeLabel;
+ private int imageWidth;
+ private int imageHeight;
+ private String key;
+
+ public ChangeImageAction( String key,
+ JLabel imageLabel,
+ JLabel imageSizeLabel,
+ int imageWidth,
+ int imageHeight)
+ {
+ this.key = key;
+ this.imageLabel = imageLabel;
+ this.imageSizeLabel = imageSizeLabel;
+ this.imageWidth = imageWidth;
+ this.imageHeight = imageHeight;
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ JFileChooser fileChooser
+ = new JFileChooser();
+
+ int result
+ = fileChooser.showOpenDialog(parentWindow);
+
+ if (result == JFileChooser.APPROVE_OPTION)
+ {
+ File newImageFile = fileChooser.getSelectedFile();
+ ImageIcon newImageIcon = new ImageIcon(newImageFile.getPath());
+
+ try
+ {
+ FileInputStream in = new FileInputStream(newImageFile);
+ byte[] bs = new byte[in.available()];
+ in.read(bs);
+ in.close();
+
+ images.put(key, bs);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ imageLabel.setIcon(newImageIcon);
+
+ if (newImageIcon.getIconWidth() > imageWidth
+ || newImageIcon.getIconHeight() > imageHeight)
+ {
+ imageSizeLabel.setBackground(Color.RED);
+ }
+ }
+ }
+ }
+
+// public static byte[] convertImage(Image img)
+// {
+// try
+// {
+// int[] pix = new int[img.getWidth(null) * img.getHeight(null)];
+// PixelGrabber pg =
+// new PixelGrabber(img, 0, 0, img.getWidth(null),
+// img.getHeight(null), pix, 0, img.getWidth(null));
+// pg.grabPixels();
+//
+// byte[] pixels = new byte[img.getWidth(null) * img.getHeight(null)];
+//
+// for (int j = 0; j < pix.length; j++)
+// pixels[j] = new Integer(pix[j]).byteValue();
+//
+// return pixels;
+// }
+// catch (InterruptedException e)
+// {
+// e.printStackTrace();
+// }
+// return null;
+// }
+
+ Hashtable<String, byte[]> images = new Hashtable<String, byte[]>();
+
+ Hashtable<String, byte[]> getImages()
+ {
+ return images;
+// Hashtable res = new Hashtable();
+// int rows = imagesTableModel.getRowCount();
+// for (int i = 0; i < rows; i++)
+// {
+// String key = (String)imagesTableModel.getValueAt(i, 0);
+// JLabel imageLabel = (JLabel)imagesTableModel.getValueAt(i, 2);
+//
+// Icon icon = imageLabel.getIcon();
+// if(icon != null && icon instanceof ImageIcon)
+// res.put(
+// key,
+// convertImage(((ImageIcon)icon).getImage()));
+// else
+// res.put(key,new byte[0]);
+// }
+//
+// return res;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/LabelTableCellRenderer.java b/src/net/java/sip/communicator/plugin/guicustomization/LabelTableCellRenderer.java
new file mode 100644
index 0000000..302192f
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/LabelTableCellRenderer.java
@@ -0,0 +1,43 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.table.*;
+
+public class LabelTableCellRenderer
+ extends JLabel
+ implements TableCellRenderer
+{
+ public LabelTableCellRenderer()
+ {
+ this.setOpaque(true);
+ }
+ public Component getTableCellRendererComponent(JTable table, Object value,
+ boolean isSelected, boolean hasFocus, int row, int column)
+ {
+ if (isSelected)
+ {
+ setBackground(table.getSelectionBackground());
+ setForeground(table.getSelectionForeground());
+ }
+ else
+ {
+ setBackground(table.getBackground());
+ setForeground(table.getForeground());
+ }
+
+ if (value instanceof JLabel)
+ {
+ JLabel labelValue = (JLabel) value;
+ this.setText(labelValue.getText());
+ this.setIcon(labelValue.getIcon());
+ this.setBackground(labelValue.getBackground());
+ }
+
+ setEnabled(table.isEnabled());
+ setFont(table.getFont());
+
+ return this;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/SettingsPanel.java b/src/net/java/sip/communicator/plugin/guicustomization/SettingsPanel.java
new file mode 100644
index 0000000..59a25b3
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/SettingsPanel.java
@@ -0,0 +1,62 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+import java.util.*;
+
+import javax.swing.*;
+
+public class SettingsPanel
+ extends JScrollPane
+{
+ private JTable settingsTable = new JTable();
+
+ private CustomTableModel settingsTableModel = new CustomTableModel();
+
+ public SettingsPanel()
+ {
+ this.getViewport().add(settingsTable);
+
+ settingsTable.setModel(settingsTableModel);
+ settingsTableModel.addColumn("Key");
+ settingsTableModel.addColumn("Text");
+
+ settingsTable.getColumnModel().getColumn(1)
+ .setCellRenderer(new TextAreaCellRenderer());
+ settingsTable.setShowGrid(true);
+ settingsTable.setGridColor(Color.GRAY);
+ this.initSettingTable();
+ }
+
+ private void initSettingTable()
+ {
+ Iterator settingKeys
+ = GuiCustomizationActivator.getResources()
+ .getCurrentSettings();
+
+ while (settingKeys.hasNext())
+ {
+ String key = (String) settingKeys.next();
+ String value
+ = GuiCustomizationActivator.getResources()
+ .getSettingsString(key);
+
+ settingsTableModel.addRow(new Object[]{ key,
+ value});
+ }
+ }
+
+ Hashtable<String, String> getSettings()
+ {
+ Hashtable res = new Hashtable();
+ int rows = settingsTableModel.getRowCount();
+ for (int i = 0; i < rows; i++)
+ {
+ String key = (String)settingsTableModel.getValueAt(i, 0);
+ String value = (String)settingsTableModel.getValueAt(i, 1);
+
+ res.put(key, value);
+ }
+
+ return res;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/SoundsPanel.java b/src/net/java/sip/communicator/plugin/guicustomization/SoundsPanel.java
new file mode 100644
index 0000000..7522016
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/SoundsPanel.java
@@ -0,0 +1,239 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.applet.*;
+import java.awt.event.*;
+import java.io.*;
+import java.lang.reflect.*;
+import java.net.*;
+import java.security.*;
+import java.util.*;
+
+import javax.swing.*;
+import javax.swing.table.*;
+
+import net.java.sip.communicator.plugin.guicustomization.CustomizationWindow.*;
+import net.java.sip.communicator.util.*;
+
+public class SoundsPanel
+ extends JScrollPane
+{
+ private Logger logger = Logger.getLogger(SoundsPanel.class);
+
+ private JTable soundsTable = new JTable();
+
+ private CustomTableModel soundsTableModel = new CustomTableModel();
+
+ private static Constructor acConstructor = null;
+
+ private JFrame parentWindow;
+
+ public SoundsPanel(JFrame parentWindow)
+ {
+ this.parentWindow = parentWindow;
+
+ this.getViewport().add(soundsTable);
+
+ soundsTable.setModel(soundsTableModel);
+ soundsTableModel.addColumn("Description");
+ soundsTableModel.addColumn("File path");
+ soundsTableModel.addColumn("Change sound");
+
+ TableColumn buttonColumn1
+ = soundsTable.getColumnModel().getColumn(1);
+
+ buttonColumn1.setCellRenderer(new ButtonTableCellRenderer());
+ buttonColumn1.setCellEditor(new ButtonTableEditor());
+ buttonColumn1.setWidth(40);
+
+ TableColumn buttonColumn2
+ = soundsTable.getColumnModel().getColumn(2);
+
+ buttonColumn2.setCellRenderer(new ButtonTableCellRenderer());
+ buttonColumn2.setCellEditor(new ButtonTableEditor());
+ buttonColumn2.setWidth(40);
+
+ this.initSoundTable();
+ }
+
+ private void initSoundTable()
+ {
+ Iterator soundKeys
+ = GuiCustomizationActivator.getResources()
+ .getCurrentSounds();
+
+ int rowHeight = 40;
+ while (soundKeys.hasNext())
+ {
+ String key = (String) soundKeys.next();
+ URL soundURL
+ = GuiCustomizationActivator.getResources().getSoundURL(key);
+
+ PlaySoundButton playSoundButton = new PlaySoundButton(soundURL);
+ playSoundButton.setAction(new PlaySoundAction());
+
+ JButton fileChooserButton = new JButton();
+ fileChooserButton.setAction(new ChangeSoundAction(playSoundButton));
+
+ soundsTableModel.addRow(new Object[]{ key,
+ playSoundButton,
+ fileChooserButton});
+ playSoundButton.setText("Play!");
+ fileChooserButton.setText("Choose sound");
+
+ soundsTable.setRowHeight( soundsTableModel.getRowCount() - 1,
+ rowHeight );
+ }
+ }
+
+
+ private class ChangeSoundAction extends AbstractAction
+ {
+ private PlaySoundButton playSoundButton;
+
+ public ChangeSoundAction(PlaySoundButton button)
+ {
+ this.playSoundButton = button;
+ }
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ JFileChooser fileChooser
+ = new JFileChooser();
+
+ int result
+ = fileChooser.showOpenDialog(parentWindow);
+
+ if (result == JFileChooser.APPROVE_OPTION)
+ {
+ File newSoundFile = fileChooser.getSelectedFile();
+ try
+ {
+ playSoundButton
+ .setSoundURL(newSoundFile.toURL());
+ }
+ catch (MalformedURLException e)
+ {
+ logger.error("Faile to create sound file.", e);
+ }
+ }
+ }
+ }
+
+ private class PlaySoundAction extends AbstractAction
+ {
+ public void actionPerformed(ActionEvent evt)
+ {
+ PlaySoundButton button = (PlaySoundButton) evt.getSource();
+ AudioClip ac;
+ try
+ {
+ ac = createAppletAudioClip(button.getSoundURL().openStream());
+
+ ac.play();
+ }
+ catch (IOException e)
+ {
+ logger.error("Failed to open sound file.", e);
+ }
+ }
+ }
+
+ private class PlaySoundButton extends JButton
+ {
+ private URL soundURL;
+
+ public PlaySoundButton(URL soundURL)
+ {
+ this.soundURL = soundURL;
+ }
+
+ public URL getSoundURL()
+ {
+ return soundURL;
+ }
+
+ public void setSoundURL(URL url)
+ {
+ this.soundURL = url;
+ }
+ }
+
+ /**
+ * Creates an AppletAudioClip.
+ *
+ * @param inputstream the audio input stream
+ * @throws IOException
+ */
+ private AudioClip createAppletAudioClip(InputStream inputstream)
+ throws IOException
+ {
+ if(acConstructor == null)
+ {
+ try
+ {
+ acConstructor = (Constructor) AccessController
+ .doPrivileged(new PrivilegedExceptionAction()
+ {
+ public Object run()
+ throws NoSuchMethodException,
+ SecurityException,
+ ClassNotFoundException
+ {
+
+ Class class1 = null;
+ try
+ {
+ class1 = Class.forName(
+ "com.sun.media.sound.JavaSoundAudioClip",
+ true, ClassLoader.getSystemClassLoader());
+ }
+ catch(ClassNotFoundException ex)
+ {
+ class1 = Class.forName(
+ "sun.audio.SunAudioClip", true, null);
+ }
+ Class aclass[] = new Class[1];
+ aclass[0] = Class.forName("java.io.InputStream");
+ return class1.getConstructor(aclass);
+ }
+ });
+ }
+ catch(PrivilegedActionException privilegedactionexception)
+ {
+ throw new IOException("Failed to get AudioClip constructor: "
+ + privilegedactionexception.getException());
+ }
+ }
+ try
+ {
+ Object aobj[] = {
+ inputstream
+ };
+
+ return (AudioClip)acConstructor.newInstance(aobj);
+ }
+ catch(Exception exception)
+ {
+ throw new IOException("Failed to construct the AudioClip: "
+ + exception);
+ }
+ }
+
+ Hashtable<String, URL> getSounds()
+ {
+ Hashtable res = new Hashtable();
+ int rows = soundsTableModel.getRowCount();
+ for (int i = 0; i < rows; i++)
+ {
+ String key = (String)soundsTableModel.getValueAt(i, 0);
+ PlaySoundButton sndButton =
+ (PlaySoundButton)soundsTableModel.getValueAt(i, 1);
+
+ res.put(
+ key,
+ sndButton.getSoundURL());
+ }
+
+ return res;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/TextAreaCellRenderer.java b/src/net/java/sip/communicator/plugin/guicustomization/TextAreaCellRenderer.java
new file mode 100644
index 0000000..fadaac0
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/TextAreaCellRenderer.java
@@ -0,0 +1,32 @@
+package net.java.sip.communicator.plugin.guicustomization;
+
+import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.table.*;
+
+public class TextAreaCellRenderer
+ extends JTextArea
+ implements TableCellRenderer
+{
+ public TextAreaCellRenderer()
+ {
+ setLineWrap(true);
+ setWrapStyleWord(true);
+ }
+
+ public Component getTableCellRendererComponent(JTable table, Object value,
+ boolean isSelected, boolean hasFocus, int row, int column)
+ {
+ String stringValue = (String) value;
+
+ setText(stringValue);
+ setSize(table.getColumnModel().getColumn(column).getWidth(),
+ getPreferredSize().height);
+ if (table.getRowHeight(row) != getPreferredSize().height)
+ {
+ table.setRowHeight(row, getPreferredSize().height);
+ }
+ return this;
+ }
+} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/guicustomization.manifest.mf b/src/net/java/sip/communicator/plugin/guicustomization/guicustomization.manifest.mf
new file mode 100644
index 0000000..64e320a
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/guicustomization.manifest.mf
@@ -0,0 +1,14 @@
+Bundle-Activator: net.java.sip.communicator.plugin.guicustomization.GuiCustomizationActivator
+Bundle-Name: Gui Customization Activator
+Bundle-Description: The plugin offering gui customization interface.
+Bundle-Vendor: sip-communicator.org
+Bundle-Version: 0.0.1
+Import-Package: org.osgi.framework,
+ net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
+ javax.swing,
+ javax.swing.event,
+ javax.swing.table,
+ javax.swing.text,
+ javax.swing.text.html,
+ javax.imageio \ No newline at end of file
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomColorPackImpl.java b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomColorPackImpl.java
new file mode 100644
index 0000000..11fedce
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomColorPackImpl.java
@@ -0,0 +1,33 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.guicustomization.resourcepack;
+
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class CustomColorPackImpl
+ implements ColorPack
+{
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.colors.colorResources";
+ }
+
+ public String getName()
+ {
+ return "Color Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator Color resource pack.";
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomImagePackImpl.java b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomImagePackImpl.java
new file mode 100644
index 0000000..2d384a0
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomImagePackImpl.java
@@ -0,0 +1,33 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.guicustomization.resourcepack;
+
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class CustomImagePackImpl
+ implements ImagePack
+{
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.images.images";
+ }
+
+ public String getName()
+ {
+ return "Image Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator Image resource pack.";
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomLanguagePackImpl.java b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomLanguagePackImpl.java
new file mode 100644
index 0000000..1531f9e
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomLanguagePackImpl.java
@@ -0,0 +1,97 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.guicustomization.resourcepack;
+
+import java.util.*;
+
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class CustomLanguagePackImpl
+ implements LanguagePack
+{
+ private ArrayList localeList = new ArrayList();
+
+ public CustomLanguagePackImpl()
+ {
+ try
+ {
+ JarFile jf = new JarFile(getJarfileName());
+
+ Enumeration resources = jf.entries();
+ while (resources.hasMoreElements())
+ {
+ JarEntry je = (JarEntry) resources.nextElement();
+
+ Locale locale;
+ String entryName = je.getName();
+ if (entryName.matches("resources/languages/.*\\.properties"))
+ {
+ int localeIndex = entryName.indexOf('_');
+
+ if (localeIndex == -1)
+ locale = new Locale("EN");
+ else
+ {
+ String localeName =
+ entryName.substring(localeIndex + 1,
+ entryName.indexOf('.'));
+
+ locale = new Locale(localeName);
+ }
+
+ localeList.add(locale);
+ }
+ }
+ }
+ catch (java.io.IOException e)
+ {
+// logger.error("Cannot load locales.", e);
+ }
+ }
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.languages.resources";
+ }
+
+ public String getName()
+ {
+ return "Language Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator Language resource pack.";
+ }
+
+ public Iterator getAvailableLocales()
+ {
+ return localeList.iterator();
+ }
+
+ private String getJarfileName()
+ {
+ // Get the location of the jar file and the jar file name
+ java.net.URL outputURL =
+ CustomLanguagePackImpl.class.getProtectionDomain().getCodeSource()
+ .getLocation();
+
+ String outputString = outputURL.toString();
+
+ String[] parseString;
+ parseString = outputString.split("file:");
+
+ String jarFilename = parseString[1];
+ return jarFilename;
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomResourcePackActivator.java b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomResourcePackActivator.java
new file mode 100644
index 0000000..95d0105
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomResourcePackActivator.java
@@ -0,0 +1,103 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.guicustomization.resourcepack;
+
+import java.util.*;
+import org.osgi.framework.*;
+import org.osgi.service.startlevel.*;
+
+import net.java.sip.communicator.service.resources.*;
+import net.java.sip.communicator.util.*;
+
+/**
+ *
+ * @author damencho
+ */
+public class CustomResourcePackActivator
+ implements BundleActivator
+{
+
+ private Logger logger =
+ Logger.getLogger(CustomResourcePackActivator.class);
+
+ private static BundleContext bundleContext;
+
+ public void start(BundleContext bc) throws Exception
+ {
+ bundleContext = bc;
+
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(StartLevel.class.getName());
+
+ StartLevel startLevelService = (StartLevel) bundleContext
+ .getService(serviceReference);
+
+ startLevelService.setBundleStartLevel(bc.getBundle(), 39);
+
+ CustomColorPackImpl colPackImpl =
+ new CustomColorPackImpl();
+
+ Hashtable props = new Hashtable();
+ props.put(ColorPack.RESOURCE_NAME,
+ ColorPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( ColorPack.class.getName(),
+ colPackImpl,
+ props);
+
+ CustomImagePackImpl imgPackImpl =
+ new CustomImagePackImpl();
+
+ Hashtable imgProps = new Hashtable();
+ imgProps.put(ImagePack.RESOURCE_NAME,
+ ImagePack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( ImagePack.class.getName(),
+ imgPackImpl,
+ imgProps);
+
+ CustomLanguagePackImpl langPackImpl =
+ new CustomLanguagePackImpl();
+
+ Hashtable langProps = new Hashtable();
+ langProps.put(LanguagePack.RESOURCE_NAME,
+ LanguagePack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( LanguagePack.class.getName(),
+ langPackImpl,
+ langProps);
+
+ CustomSettingsPackImpl setPackImpl =
+ new CustomSettingsPackImpl();
+
+ Hashtable setProps = new Hashtable();
+ langProps.put(SettingsPack.RESOURCE_NAME,
+ SettingsPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( SettingsPack.class.getName(),
+ setPackImpl,
+ setProps);
+
+ CustomSoundPackImpl sndPackImpl =
+ new CustomSoundPackImpl();
+
+ Hashtable sndProps = new Hashtable();
+ langProps.put(SoundPack.RESOURCE_NAME,
+ SoundPack.RESOURCE_NAME_DEFAULT_VALUE);
+
+ bundleContext.registerService( SoundPack.class.getName(),
+ sndPackImpl,
+ sndProps);
+
+ logger.info("Custom resources ... [REGISTERED]");
+ }
+
+ public void stop(BundleContext bc) throws Exception
+ {
+
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomSettingsPackImpl.java b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomSettingsPackImpl.java
new file mode 100644
index 0000000..6deac80
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomSettingsPackImpl.java
@@ -0,0 +1,33 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.guicustomization.resourcepack;
+
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class CustomSettingsPackImpl
+ implements SettingsPack
+{
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.config.defaults";
+ }
+
+ public String getName()
+ {
+ return "Settings Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator Settings resource pack.";
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomSoundPackImpl.java b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomSoundPackImpl.java
new file mode 100644
index 0000000..2a9c7a6
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/CustomSoundPackImpl.java
@@ -0,0 +1,33 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.plugin.guicustomization.resourcepack;
+
+import net.java.sip.communicator.service.resources.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public class CustomSoundPackImpl
+ implements SoundPack
+{
+
+ public String getResourcePackBaseName()
+ {
+ return "resources.sounds";
+ }
+
+ public String getName()
+ {
+ return "Sounds Resources";
+ }
+
+ public String getDescription()
+ {
+ return "Provide SIP Communicator Sounds resource pack.";
+ }
+}
diff --git a/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/customresourcepack.manifest.mf b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/customresourcepack.manifest.mf
new file mode 100644
index 0000000..ea6a54b
--- /dev/null
+++ b/src/net/java/sip/communicator/plugin/guicustomization/resourcepack/customresourcepack.manifest.mf
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-Activator: net.java.sip.communicator.plugin.guicustomization.resourcepack.CustomResourcePackActivator
+Bundle-Name: Custom Resource Pack
+Bundle-Description: The plugin offering custom images and languages.
+Bundle-Vendor: sip-communicator.org
+Bundle-Version: 0.0.1
+Import-Package: org.osgi.framework,
+ org.osgi.service.startlevel,
+ net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources
diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
index 5c412d6..b8d851f 100644
--- a/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
@@ -68,7 +68,7 @@ public class FirstWizardPage
private JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
private JTextArea registerArea =
- new JTextArea(Resources.getString("registerNewAccountText"));
+ new JTextArea(Resources.getString("icqRegisterNewAccountText"));
private JButton registerButton =
new JButton(Resources.getString("registerNewAccount"));
diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java
index 1975a1a..b4051b4 100644
--- a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccountRegistrationWizard.java
@@ -71,7 +71,7 @@ public class IcqAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameIcq");
}
/**
@@ -81,7 +81,7 @@ public class IcqAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionIcq");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/Resources.java
index dfe50fd..c87677d 100644
--- a/src/net/java/sip/communicator/plugin/icqaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/Resources.java
@@ -10,8 +10,11 @@ package net.java.sip.communicator.plugin.icqaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -22,35 +25,11 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.icqaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.icqaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
- public static ImageID ICQ_LOGO = new ImageID("protocolIcon");
+ public static ImageID ICQ_LOGO = new ImageID("protocolIconIcq");
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageIcq");
/**
* Returns an internationalized string corresponding to the given key.
@@ -60,14 +39,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -77,18 +49,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -111,4 +87,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = IcqAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)IcqAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/icqaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/icqaccregwizz/icqaccregwizz.manifest.mf
index 853ea55..94bd8a9 100644
--- a/src/net/java/sip/communicator/plugin/icqaccregwizz/icqaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/icqaccregwizz.manifest.mf
@@ -7,6 +7,7 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.icqconstants,
net.java.sip.communicator.service.protocol.event,
diff --git a/src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java
index fb64551..17bdd67 100644
--- a/src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/ircaccregwizz/IrcAccountRegistrationWizard.java
@@ -83,7 +83,7 @@ public class IrcAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameIrc");
}
/**
@@ -93,7 +93,7 @@ public class IrcAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionIrc");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/ircaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/ircaccregwizz/Resources.java
index 927c00a..703f268 100644
--- a/src/net/java/sip/communicator/plugin/ircaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/ircaccregwizz/Resources.java
@@ -10,9 +10,11 @@ package net.java.sip.communicator.plugin.ircaccregwizz;
import java.io.*;
import java.util.*;
-import net.java.sip.communicator.plugin.aimaccregwizz.Resources.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The Messages class manages the access to the internationalization
* properties files.
@@ -24,41 +26,17 @@ public class Resources
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.ircaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.ircaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
+ private static ResourceManagementService resourcesService;
+
/**
* A constant pointing to the IRC protocol logo image.
*/
- public static ImageID IRC_LOGO = new ImageID("protocolIcon");
+ public static ImageID IRC_LOGO = new ImageID("protocolIconIrc");
/**
* A constant pointing to the IRC protocol wizard page image.
*/
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageIrc");
/**
* Returns an internationalized string corresponding to the given key.
@@ -67,14 +45,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException exc)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -84,18 +55,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
- catch (IOException exc)
+ catch (IOException e)
{
- log.error("Failed to load image:" + path, exc);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -118,4 +93,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = IrcAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)IrcAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/ircaccregwizz/ircaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/ircaccregwizz/ircaccregwizz.manifest.mf
index 31f8be7..9149518 100644
--- a/src/net/java/sip/communicator/plugin/ircaccregwizz/ircaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/ircaccregwizz/ircaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java
index f5c67d6..7e9a0a9 100644
--- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java
@@ -82,7 +82,7 @@ public class JabberAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameJabber");
}
/**
@@ -92,7 +92,7 @@ public class JabberAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionJabber");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberServerChooserDialog.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberServerChooserDialog.java
index 22be4ec..ced5ee4 100644
--- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberServerChooserDialog.java
+++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberServerChooserDialog.java
@@ -309,10 +309,7 @@ public class JabberServerChooserDialog
// Create the builder and parse the file
serverComments = factory.newDocumentBuilder()
- .parse(
- JabberServerChooserDialog.class.getClassLoader()
- .getResourceAsStream(
- Resources.getProperty("commentsFile")));
+ .parse(Resources.getPropertyInputStream("commentsFile"));
}
catch (SAXException e)
{
diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/Resources.java
index 56c74a1..6dc5ab8 100644
--- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/Resources.java
@@ -8,10 +8,14 @@
package net.java.sip.communicator.plugin.jabberaccregwizz;
import java.io.*;
+import java.net.URL;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -22,41 +26,17 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.jabberaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String RESOURCE_NAME
- = "net.java.sip.communicator.plugin.jabberaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle RESOURCE_BUNDLE
- = ResourceBundle.getBundle(RESOURCE_NAME);
-
+ private static ResourceManagementService resourcesService;
+
/**
* A constant pointing to the Jabber protocol logo image.
*/
- public static ImageID PROTOCOL_ICON = new ImageID("protocolIcon");
+ public static ImageID PROTOCOL_ICON = new ImageID("protocolIconJabber");
/**
* A constant pointing to the Aim protocol wizard page image.
*/
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageJabber");
/**
* Returns an internationalized string corresponding to the given key.
@@ -66,27 +46,7 @@ public class Resources
*/
public static String getString(String key)
{
- String resourceString;
- try
- {
- resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- {
- String firstPart = resourceString.substring(0, mnemonicIndex);
- String secondPart = resourceString.substring(mnemonicIndex + 1);
-
- resourceString = firstPart.concat(secondPart);
- }
- }
- catch (MissingResourceException e)
- {
- resourceString = '!' + key + '!';
- }
-
- return resourceString;
+ return getResources().getI18NString(key);
}
/**
@@ -97,26 +57,7 @@ public class Resources
*/
public static char getMnemonic(String key)
{
- String resourceString;
-
- try
- {
- resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- {
- return resourceString.charAt(mnemonicIndex + 1);
- }
-
- }
- catch (MissingResourceException e)
- {
- return '!';
- }
-
- return '!';
+ return getResources().getI18nMnemonic(key);
}
/**
@@ -127,18 +68,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -151,16 +96,9 @@ public class Resources
* @param key the key of the resource to search for
* @return the resource for the given key
*/
- public static String getProperty(String key)
+ public static InputStream getPropertyInputStream(String key)
{
- try
- {
- return RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getSettingsInputStream(key);
}
/**
@@ -180,4 +118,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = JabberAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)JabberAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf
index 3e4ba6e..bcc9cb4 100755
--- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/resources.properties b/src/net/java/sip/communicator/plugin/jabberaccregwizz/resources.properties
deleted file mode 100755
index b76d798..0000000
--- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/resources.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-commentsFile=net/java/sip/communicator/plugin/jabberaccregwizz/resources/servercomments.xml
-
-protocolIcon=resources/images/protocol/jabber/status16x16-online.png
-pageImage=resources/images/protocol/jabber/logo48x48.png
diff --git a/src/net/java/sip/communicator/plugin/mailbox/MailboxActivator.java b/src/net/java/sip/communicator/plugin/mailbox/MailboxActivator.java
index 17e3d08..12a9ab1 100644
--- a/src/net/java/sip/communicator/plugin/mailbox/MailboxActivator.java
+++ b/src/net/java/sip/communicator/plugin/mailbox/MailboxActivator.java
@@ -12,6 +12,7 @@ import net.java.sip.communicator.service.fileaccess.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.service.media.MediaService;
+import net.java.sip.communicator.service.resources.*;
/**
* Activates the Mailbox plug-in.
@@ -57,6 +58,8 @@ public class MailboxActivator
* is currently registered with the bundle context.
*/
private static UIService uiService = null;
+
+ private static ResourceManagementService resourcesService;
/**
* Starts this bundle and adds the <tt>MailboxConfigurationForm</tt>
@@ -145,22 +148,39 @@ public class MailboxActivator
}
/**
- * Returns a reference to a MediaService implementation currently registered
- * in the bundle context or null if no such implementation was found.
- *
- * @return a reference to a MediaService implementation currently registered
- * in the bundle context or null if no such implementation was found.
- */
- public static MediaService getMediaService()
+ * Returns a reference to a MediaService implementation currently registered
+ * in the bundle context or null if no such implementation was found.
+ *
+ * @return a reference to a MediaService implementation currently registered
+ * in the bundle context or null if no such implementation was found.
+ */
+ public static MediaService getMediaService()
+ {
+ if(mediaService == null)
+ {
+ ServiceReference mediaServiceReference
+ = bundleContext.getServiceReference(
+ MediaService.class.getName());
+ mediaService = (MediaService)bundleContext
+ .getService(mediaServiceReference);
+ }
+ return mediaService;
+ }
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
{
- if(mediaService == null)
- {
- ServiceReference mediaServiceReference
- = bundleContext.getServiceReference(
- MediaService.class.getName());
- mediaService = (MediaService)bundleContext
- .getService(mediaServiceReference);
- }
- return mediaService;
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService) bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
}
}
diff --git a/src/net/java/sip/communicator/plugin/mailbox/Resources.java b/src/net/java/sip/communicator/plugin/mailbox/Resources.java
index e6de03f..ef56e24 100644
--- a/src/net/java/sip/communicator/plugin/mailbox/Resources.java
+++ b/src/net/java/sip/communicator/plugin/mailbox/Resources.java
@@ -26,33 +26,6 @@ public class Resources
private static Logger logger = Logger.getLogger(Resources.class);
/**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.mailbox.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.mailbox.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
-
- /**
* Returns an internationalized string corresponding to the given key.
*
* @param key The key of the string.
@@ -60,14 +33,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return MailboxActivator.getResources().getI18NString(key);
}
/**
@@ -78,22 +44,22 @@ public class Resources
*/
public static byte[] getImageInBytes(String imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID);
-
- logger.debug("Loading imageID=" + imageID + " from path=" + path);
+ logger.debug("Loading imageID=" + imageID);
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ InputStream in =
+ MailboxActivator.getResources().getImageInputStream(imageID);
+ byte[] image = new byte[in.available()];
+ in.read(image);
+
+ return image;
}
catch (IOException e)
{
- logger.error("Failed to load image:" + path, e);
+ logger.error("Failed to load image:" + imageID, e);
}
- return image;
+ return null;
}
} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
index a4e17bd..b221dbd 100644
--- a/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
@@ -116,7 +116,7 @@ public class FirstWizardPage
uinPassPanel.add(rememberPassBox, BorderLayout.SOUTH);
uinPassPanel.setBorder(BorderFactory.createTitledBorder(Resources
- .getString("uinAndPassword")));
+ .getString("msnUinAndPassword")));
mainPanel.add(uinPassPanel);
this.add(mainPanel, BorderLayout.NORTH);
diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java
index 596ebf4..27f977d 100644
--- a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccountRegistrationWizard.java
@@ -79,7 +79,7 @@ public class MsnAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameMsn");
}
/**
@@ -91,7 +91,7 @@ public class MsnAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionMsn");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/Resources.java
index 4ce8fc4..3beb785 100644
--- a/src/net/java/sip/communicator/plugin/msnaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/Resources.java
@@ -10,8 +10,11 @@ package net.java.sip.communicator.plugin.msnaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -22,41 +25,17 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.msnaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.msnaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
/**
* A constant pointing to the MSN protocol logo image.
*/
- public static ImageID MSN_LOGO = new ImageID("protocolIcon");
+ public static ImageID MSN_LOGO = new ImageID("protocolIconMsn");
/**
* A constant pointing to the Aim protocol wizard page image.
*/
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageMsn");
/**
* Returns an internationalized string corresponding to the given key.
@@ -66,14 +45,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -84,19 +56,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
-
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -119,4 +94,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = MsnAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)MsnAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/msnaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/msnaccregwizz/msnaccregwizz.manifest.mf
index 38774b6..9cb1ab7 100755
--- a/src/net/java/sip/communicator/plugin/msnaccregwizz/msnaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/msnaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder32*32.png b/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder32*32.png
deleted file mode 100644
index db2d185..0000000
--- a/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder32*32.png
+++ /dev/null
Binary files differ
diff --git a/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder48*48.png b/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder48*48.png
deleted file mode 100644
index 13af311..0000000
--- a/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder48*48.png
+++ /dev/null
Binary files differ
diff --git a/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder64*64.png b/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder64*64.png
deleted file mode 100644
index 4878503..0000000
--- a/src/net/java/sip/communicator/plugin/notificationconfiguration/resources/folder64*64.png
+++ /dev/null
Binary files differ
diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/NewBundleDialog.java b/src/net/java/sip/communicator/plugin/pluginmanager/NewBundleDialog.java
index 9f2cd90..2726e76 100644
--- a/src/net/java/sip/communicator/plugin/pluginmanager/NewBundleDialog.java
+++ b/src/net/java/sip/communicator/plugin/pluginmanager/NewBundleDialog.java
@@ -9,7 +9,8 @@ package net.java.sip.communicator.plugin.pluginmanager;
import java.awt.*;
import java.awt.event.*;
-
+import java.io.*;
+import java.net.*;
import javax.swing.*;
import net.java.sip.communicator.service.gui.*;
@@ -34,6 +35,9 @@ public class NewBundleDialog
private JPanel mainPanel = new JPanel(new BorderLayout());
+ private JButton fileChooserButton = new JButton(Resources.getString("chooseFile")
+ );
+
public NewBundleDialog ()
{
this.mainPanel.setPreferredSize(new Dimension(450, 150));
@@ -50,11 +54,13 @@ public class NewBundleDialog
this.installButton.addActionListener(this);
this.cancelButton.addActionListener(this);
+ this.fileChooserButton.addActionListener(this);
this.dataPanel.add(bundlePathLabel, BorderLayout.WEST);
this.dataPanel.add(bundlePathField, BorderLayout.CENTER);
+ this.dataPanel.add(fileChooserButton, BorderLayout.EAST);
}
public void actionPerformed (ActionEvent e)
@@ -72,6 +78,7 @@ public class NewBundleDialog
}
catch (BundleException ex)
{
+ ex.printStackTrace();
PluginManagerActivator.getUIService().getPopupDialog()
.showMessagePopupDialog(ex.getMessage(), "Error",
PopupDialog.ERROR_MESSAGE);
@@ -82,7 +89,29 @@ public class NewBundleDialog
}
}
}
-
- dispose();
+ else if (sourceButton.equals(fileChooserButton))
+ {
+ JFileChooser fileChooser
+ = new JFileChooser();
+
+ int result
+ = fileChooser.showOpenDialog(NewBundleDialog.this);
+
+ if (result == JFileChooser.APPROVE_OPTION)
+ {
+ try
+ {
+ File newBundleFile = fileChooser.getSelectedFile();
+
+ bundlePathField.setText(newBundleFile.toURL().toString());
+ }
+ catch (MalformedURLException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ }
+ else
+ dispose();
}
}
diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/PluginManagerConfigForm.java b/src/net/java/sip/communicator/plugin/pluginmanager/PluginManagerConfigForm.java
index 7090190..4f89796 100644
--- a/src/net/java/sip/communicator/plugin/pluginmanager/PluginManagerConfigForm.java
+++ b/src/net/java/sip/communicator/plugin/pluginmanager/PluginManagerConfigForm.java
@@ -151,7 +151,7 @@ public class PluginManagerConfigForm
*/
public byte[] getIcon()
{
- return Resources.getImageInBytes("pluginIcon");
+ return Resources.getImageInBytes("pluginIconPluginManager");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/Resources.java b/src/net/java/sip/communicator/plugin/pluginmanager/Resources.java
index da97508..9fe3a6b 100644
--- a/src/net/java/sip/communicator/plugin/pluginmanager/Resources.java
+++ b/src/net/java/sip/communicator/plugin/pluginmanager/Resources.java
@@ -9,12 +9,15 @@ package net.java.sip.communicator.plugin.pluginmanager;
import java.awt.image.*;
import java.io.*;
-import java.util.*;
import javax.imageio.*;
import javax.swing.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -25,45 +28,8 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.pluginmanager.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.pluginmanager.resources";
-
- /**
- * The name of the resource, where color constants used in this bundle are
- * stored.
- */
- private static final String COLOR_BUNDLE_NAME
- = "resources.colors.colorResources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
- /**
- * The color resource bundle.
- */
- private static final ResourceBundle COLOR_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(COLOR_BUNDLE_NAME);
-
+ private static ResourceManagementService resourcesService;
+
/**
* Returns an internationalized string corresponding to the given key.
*
@@ -72,14 +38,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -92,15 +51,19 @@ public class Resources
{
BufferedImage image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID);
+ InputStream in =
+ getResources().getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
try
{
- image = ImageIO.read(Resources.class.getClassLoader()
- .getResourceAsStream(path));
+ image = ImageIO.read(in);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return new ImageIcon(image);
@@ -114,18 +77,22 @@ public class Resources
*/
public static byte[] getImageInBytes(String imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID);
+ InputStream in =
+ getResources().getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -140,15 +107,24 @@ public class Resources
*/
public static int getColor(String key)
{
- try
+ return getResources().getColor(key);
+ }
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
{
- return Integer.parseInt(COLOR_RESOURCE_BUNDLE.getString(key), 16);
+ ServiceReference serviceReference = PluginManagerActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)PluginManagerActivator.bundleContext
+ .getService(serviceReference);
}
- catch (MissingResourceException e)
- {
- log.error("Missing color resource.", e);
- return 0xFFFFFF;
- }
+ return resourcesService;
}
}
diff --git a/src/net/java/sip/communicator/plugin/pluginmanager/pluginmanager.manifest.mf b/src/net/java/sip/communicator/plugin/pluginmanager/pluginmanager.manifest.mf
index 615178f..d1202b4 100644
--- a/src/net/java/sip/communicator/plugin/pluginmanager/pluginmanager.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/pluginmanager/pluginmanager.manifest.mf
@@ -7,6 +7,7 @@ System-Bundle: yes
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
net.java.sip.communicator.service.gui,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.gui.event,
net.java.sip.communicator.service.configuration,
javax.swing,
diff --git a/src/net/java/sip/communicator/plugin/rssaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/rssaccregwizz/Resources.java
index df944c3..14b054e 100644
--- a/src/net/java/sip/communicator/plugin/rssaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/rssaccregwizz/Resources.java
@@ -9,8 +9,11 @@ package net.java.sip.communicator.plugin.rssaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -22,41 +25,17 @@ public class Resources
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.rssaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.rssaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
+ private static ResourceManagementService resourcesService;
+
/**
* A constant pointing to the RSS protocol logo image.
*/
- public static ImageID RSS_LOGO = new ImageID("protocolIcon");
+ public static ImageID RSS_LOGO = new ImageID("protocolIconRss");
/**
* A constant pointing to the RSS protocol wizard page image.
*/
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageRss");
/**
* Returns an internationalized string corresponding to the given key.
@@ -66,14 +45,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException exc)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -84,17 +56,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
- catch (IOException exc)
+ catch (IOException e)
{
- log.error("Failed to load image:" + path, exc);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -118,4 +95,21 @@ public class Resources
}
}
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = RssAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)RssAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java
index 8201ef2..b779974 100644
--- a/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/rssaccregwizz/RssAccountRegistrationWizard.java
@@ -87,7 +87,7 @@ public class RssAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameRss");
}
/**
@@ -97,7 +97,7 @@ public class RssAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionRss");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/rssaccregwizz/rssaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/rssaccregwizz/rssaccregwizz.manifest.mf
index 215d410..1aa126c 100644
--- a/src/net/java/sip/communicator/plugin/rssaccregwizz/rssaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/rssaccregwizz/rssaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/simpleaccreg/Resources.java b/src/net/java/sip/communicator/plugin/simpleaccreg/Resources.java
index b382c86..3a542c9 100644
--- a/src/net/java/sip/communicator/plugin/simpleaccreg/Resources.java
+++ b/src/net/java/sip/communicator/plugin/simpleaccreg/Resources.java
@@ -10,8 +10,11 @@ package net.java.sip.communicator.plugin.simpleaccreg;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -23,56 +26,7 @@ public class Resources
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.simpleaccreg.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * Name of the bundle where we will search for color resources.
- */
- private static final String COLOR_BUNDLE_NAME
- = "resources.colors.colorResources";
-
- /**
- * Bundle which handle access to localized resources.
- */
- private static final ResourceBundle COLOR_RESOURCE_BUNDLE = ResourceBundle
- .getBundle( COLOR_BUNDLE_NAME,
- Locale.getDefault(),
- Resources.class.getClassLoader());
-
- /**
- * Name of the bundle where we will search for color resources.
- */
- private static final String LOGIN_BUNDLE_NAME
- = "resources.login";
-
- /**
- * Bundle which handle access to localized resources.
- */
- private static final ResourceBundle LOGIN_PROPERTIES_BUNDLE = ResourceBundle
- .getBundle(LOGIN_BUNDLE_NAME);
-
- /**
- * Name of the bundle where we will search for application resources.
- */
- private static final String APPLICATION_RESUORCE_LOCATION
- = "resources.application";
-
- /**
- * Bundle which handle access to application resources.
- */
- private static final ResourceBundle applicationBundle
- = ResourceBundle.getBundle(APPLICATION_RESUORCE_LOCATION);
+ private static ResourceManagementService resourcesService;
/**
* Returns an internationalized string corresponding to the given key.
@@ -82,14 +36,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException exc)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -101,16 +48,7 @@ public class Resources
*/
public static int getColor(String key)
{
- try
- {
- return Integer.parseInt(COLOR_RESOURCE_BUNDLE.getString(key), 16);
- }
- catch (MissingResourceException e)
- {
- log.error("Missing color resource.", e);
-
- return 0xFFFFFF;
- }
+ return getResources().getColor(key);
}
/**
@@ -122,16 +60,7 @@ public class Resources
*/
public static String getLoginProperty(String key)
{
- try
- {
- return LOGIN_PROPERTIES_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- log.error("Missing property.", e);
-
- return "";
- }
+ return getResources().getSettingsString(key);
}
/**
@@ -143,15 +72,24 @@ public class Resources
*/
public static String getApplicationProperty(String key)
{
- try
+ return getResources().getSettingsString(key);
+ }
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
{
- return applicationBundle.getString(key);
+ ServiceReference serviceReference = SimpleAccountRegistrationActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)SimpleAccountRegistrationActivator.bundleContext
+ .getService(serviceReference);
}
- catch (MissingResourceException e)
- {
- log.error("Missing property.", e);
- return "";
- }
+ return resourcesService;
}
}
diff --git a/src/net/java/sip/communicator/plugin/simpleaccreg/simpleaccreg.manifest.mf b/src/net/java/sip/communicator/plugin/simpleaccreg/simpleaccreg.manifest.mf
index 5cba876..aa379ff 100644
--- a/src/net/java/sip/communicator/plugin/simpleaccreg/simpleaccreg.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/simpleaccreg/simpleaccreg.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java
index e7c24ad..06ff898 100644
--- a/src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/FirstWizardPage.java
@@ -136,8 +136,8 @@ public class FirstWizardPage
private JComboBox keepAliveMethodBox
= new JComboBox(new Object []
{
- Resources.getString("register"),
- Resources.getString("options")
+ Resources.getString("register").toUpperCase(),
+ Resources.getString("options").toUpperCase()
});
private JTextField keepAliveIntervalValue = new JTextField();
@@ -206,7 +206,7 @@ public class FirstWizardPage
uinPassPanel.add(rememberPassBox, BorderLayout.SOUTH);
uinPassPanel.setBorder(BorderFactory.createTitledBorder(Resources
- .getString("uinAndPassword")));
+ .getString("sipUinAndPassword")));
firstTabPanel.add(uinPassPanel, BorderLayout.NORTH);
diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/Resources.java
index 8300ad3..66ed257 100644
--- a/src/net/java/sip/communicator/plugin/sipaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/Resources.java
@@ -10,8 +10,11 @@ package net.java.sip.communicator.plugin.sipaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -22,35 +25,11 @@ public class Resources {
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.sipaccregwizz.resources";
+ private static ResourceManagementService resourcesService;
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.sipaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
- public static ImageID SIP_LOGO = new ImageID("protocolIcon");
+ public static ImageID SIP_LOGO = new ImageID("protocolIconSip");
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageSip");
/**
* Returns an internationalized string corresponding to the given key.
@@ -59,15 +38,7 @@ public class Resources {
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
-
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -78,18 +49,22 @@ public class Resources {
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -112,4 +87,22 @@ public class Resources {
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = SIPAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)SIPAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java
index 3b7daff..8a6f5cb 100644
--- a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationWizard.java
@@ -81,7 +81,7 @@ public class SIPAccountRegistrationWizard
* @return String
*/
public String getProtocolName() {
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameSip");
}
/**
@@ -90,7 +90,7 @@ public class SIPAccountRegistrationWizard
* @return String
*/
public String getProtocolDescription() {
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionSip");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/sipaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/sipaccregwizz/sipaccregwizz.manifest.mf
index 4ba1f49..dac3182 100755
--- a/src/net/java/sip/communicator/plugin/sipaccregwizz/sipaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/sipaccregwizz.manifest.mf
@@ -7,6 +7,7 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.icqconstants,
net.java.sip.communicator.service.protocol.event,
diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/sshaccregwizz/Resources.java
index bf0fa66..b0eba2c 100644
--- a/src/net/java/sip/communicator/plugin/sshaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/Resources.java
@@ -17,8 +17,11 @@ package net.java.sip.communicator.plugin.sshaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -30,35 +33,11 @@ public class Resources
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.sshaccregwizz.resources";
+ private static ResourceManagementService resourcesService;
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.sshaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
- public static ImageID SSH_LOGO = new ImageID("protocolIcon");
+ public static ImageID SSH_LOGO = new ImageID("protocolIconSsh");
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageSsh");
/**
* Returns an internationalized string corresponding to the given key.
@@ -67,14 +46,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException exc)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -85,23 +57,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image=null;
- InputStream inputStream;
-
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
try
{
- inputStream = Resources.class.getClassLoader()
- .getResourceAsStream(path);
-
- image = new byte[inputStream.available()];
-
- inputStream.read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
- catch (IOException exc)
+ catch (IOException e)
{
- log.error("Failed to load image:" + path, exc);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -124,4 +95,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = SSHAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)SSHAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java
index 75eed15..b12ccc4 100644
--- a/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/SSHAccountRegistrationWizard.java
@@ -92,7 +92,7 @@ public class SSHAccountRegistrationWizard
* @return String
*/
public String getProtocolName() {
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameSsh");
}
/**
@@ -101,7 +101,7 @@ public class SSHAccountRegistrationWizard
* @return String
*/
public String getProtocolDescription() {
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionSsh");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/sshaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/sshaccregwizz/sshaccregwizz.manifest.mf
index b75dc1e..663b727 100644
--- a/src/net/java/sip/communicator/plugin/sshaccregwizz/sshaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/sshaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/statusupdate/Resources.java b/src/net/java/sip/communicator/plugin/statusupdate/Resources.java
index 119ccee..7b74902 100644
--- a/src/net/java/sip/communicator/plugin/statusupdate/Resources.java
+++ b/src/net/java/sip/communicator/plugin/statusupdate/Resources.java
@@ -8,6 +8,10 @@ package net.java.sip.communicator.plugin.statusupdate;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
+
+import org.osgi.framework.*;
+
/**
* The Messages class manages the access to the internationalization properties
* files.
@@ -16,11 +20,7 @@ import java.util.*;
*/
public class Resources
{
-
- private static final String BUNDLE_NAME = "resources.languages.plugin.statusupdate.resources";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
+ private static ResourceManagementService resourcesService;
/**
* Returns an internationalized string corresponding to the given key.
@@ -31,14 +31,24 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return RESOURCE_BUNDLE.getString(key);
-
- } catch (MissingResourceException e)
+ return getResources().getI18NString(key);
+ }
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
{
+ ServiceReference serviceReference = StatusUpdateActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
- return '!' + key + '!';
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)StatusUpdateActivator.bundleContext
+ .getService(serviceReference);
}
+
+ return resourcesService;
}
}
diff --git a/src/net/java/sip/communicator/plugin/statusupdate/StatusUpdateActivator.java b/src/net/java/sip/communicator/plugin/statusupdate/StatusUpdateActivator.java
index abc51fa..faaf19e 100644
--- a/src/net/java/sip/communicator/plugin/statusupdate/StatusUpdateActivator.java
+++ b/src/net/java/sip/communicator/plugin/statusupdate/StatusUpdateActivator.java
@@ -26,7 +26,7 @@ public class StatusUpdateActivator implements BundleActivator
private static Logger logger = Logger
.getLogger(StatusUpdateActivator.class);
- private static BundleContext bundleContext = null;
+ static BundleContext bundleContext = null;
private static Thread thread = null;
private static StatusUpdateThread runner = null;
diff --git a/src/net/java/sip/communicator/plugin/statusupdate/statusupdate.manifest.mf b/src/net/java/sip/communicator/plugin/statusupdate/statusupdate.manifest.mf
index cf9852f..24d2617 100644
--- a/src/net/java/sip/communicator/plugin/statusupdate/statusupdate.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/statusupdate/statusupdate.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.2
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.gui,
diff --git a/src/net/java/sip/communicator/plugin/updatechecker/Resources.java b/src/net/java/sip/communicator/plugin/updatechecker/Resources.java
index 73d4cd2..8c55fba 100644
--- a/src/net/java/sip/communicator/plugin/updatechecker/Resources.java
+++ b/src/net/java/sip/communicator/plugin/updatechecker/Resources.java
@@ -27,18 +27,6 @@ public class Resources
private static Properties configProps = null;
- private static final String LANG_BUNDLE_NAME
- = "resources.languages.plugin.updatechecker.resources";
-
- private static final String BUNDLE_APP_NAME
- = "resources.application";
-
- private static final ResourceBundle langBundle = ResourceBundle
- .getBundle(LANG_BUNDLE_NAME);
-
- private static final ResourceBundle APP_PROPERTIES_BUNDLE = ResourceBundle
- .getBundle( BUNDLE_APP_NAME);
-
/**
* Returns an internationalized string corresponding to the given key.
*
@@ -64,44 +52,4 @@ public class Resources
return null;
}
}
-
- /**
- * Returns an internationalized string corresponding to the given key.
- *
- * @param key The key of the string.
- * @return An internationalized string corresponding to the given key.
- */
- public static String getLangString(String key)
- {
- try
- {
- return langBundle.getString(key);
- }
- catch (MissingResourceException e)
- {
- logger.error("Missing resources.", e);
-
- return null;
- }
- }
-
- /**
- * Returns an string corresponding to the given key.
- *
- * @param key The key of the string.
- * @return An string corresponding to the given key.
- */
- public static String getAppPropString(String key)
- {
- try
- {
- return APP_PROPERTIES_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- logger.error("Missing resources.", e);
-
- return null;
- }
- }
}
diff --git a/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java b/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java
index d4fa543..0781491 100644
--- a/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java
+++ b/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java
@@ -23,6 +23,7 @@ import javax.swing.text.*;
import javax.swing.text.html.*;
import net.java.sip.communicator.service.browserlauncher.*;
import net.java.sip.communicator.service.gui.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.service.version.VersionService;
import net.java.sip.communicator.util.*;
@@ -42,6 +43,8 @@ public class UpdateCheckActivator
private static BrowserLauncherService browserLauncherService;
+ private static ResourceManagementService resourcesService;
+
private String downloadLink = null;
private String lastVersion = null;
@@ -77,21 +80,23 @@ public class UpdateCheckActivator
return;
final JDialog dialog = new JDialog();
- dialog.setTitle(Resources.getLangString("dialogTitle"));
+ dialog.setTitle(
+ getResources().getI18NString("dialogTitle"));
JEditorPane contentMessage = new JEditorPane();
contentMessage.setContentType("text/html");
contentMessage.setOpaque(false);
contentMessage.setEditable(false);
- String dialogMsg = MessageFormat.format(
- Resources.getLangString("dialogMessage1"),
- Resources.getAppPropString("applicationName"));
+ String dialogMsg =
+ getResources().getI18NString("dialogMessage1",
+ new String[]{getResources().getSettingsString("applicationName")});
if(lastVersion != null)
- dialogMsg += MessageFormat.format(
- Resources.getLangString("dialogMessage2"),
- Resources.getAppPropString("applicationName"), lastVersion);
+ dialogMsg +=
+ getResources().getI18NString(
+ "dialogMessage2",
+ new String[]{getResources().getSettingsString("applicationName")});
contentMessage.setText(dialogMsg);
@@ -100,7 +105,8 @@ public class UpdateCheckActivator
contentPane.add(contentMessage, BorderLayout.CENTER);
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 10));
- JButton closeButton = new JButton(Resources.getLangString("buttonClose"));
+ JButton closeButton = new JButton(
+ getResources().getI18NString("buttonClose"));
closeButton.addActionListener(new ActionListener() {
@@ -113,7 +119,7 @@ public class UpdateCheckActivator
if(downloadLink != null)
{
JButton downloadButton =
- new JButton(Resources.getLangString("buttonDownload"));
+ new JButton(getResources().getI18NString("buttonDownload"));
downloadButton.addActionListener(new ActionListener() {
@@ -172,6 +178,23 @@ public class UpdateCheckActivator
return browserLauncherService;
}
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService = (ResourceManagementService) bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
+
/**
* Check the first link as files on the web are sorted by date
* @param currentVersionStr
diff --git a/src/net/java/sip/communicator/plugin/updatechecker/updatecheck.manifest.mf b/src/net/java/sip/communicator/plugin/updatechecker/updatecheck.manifest.mf
index c081f43..fed044d 100644
--- a/src/net/java/sip/communicator/plugin/updatechecker/updatecheck.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/updatechecker/updatecheck.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.version,
net.java.sip.communicator.service.browserlauncher,
diff --git a/src/net/java/sip/communicator/plugin/whiteboard/Resources.java b/src/net/java/sip/communicator/plugin/whiteboard/Resources.java
index 4e5c9a0..75a5959 100644
--- a/src/net/java/sip/communicator/plugin/whiteboard/Resources.java
+++ b/src/net/java/sip/communicator/plugin/whiteboard/Resources.java
@@ -14,8 +14,11 @@ import java.util.*;
import javax.imageio.*;
import javax.swing.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -27,32 +30,7 @@ public class Resources
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.whiteboard.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.whiteboard.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
+ private static ResourceManagementService resourcesService;
/**
* Returns an internationalized string corresponding to the given key.
@@ -62,26 +40,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- String resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- {
- String firstPart = resourceString.substring(0, mnemonicIndex);
- String secondPart = resourceString.substring(mnemonicIndex + 1);
-
- resourceString = firstPart.concat(secondPart);
- }
-
- return resourceString;
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -95,29 +54,7 @@ public class Resources
*/
public static String getString(String key, String[] params)
{
- try
- {
- String resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- resourceString = MessageFormat.format(
- resourceString, (Object[]) params);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- {
- String firstPart = resourceString.substring(0, mnemonicIndex);
- String secondPart = resourceString.substring(mnemonicIndex + 1);
-
- resourceString = firstPart.concat(secondPart);
- }
-
- return resourceString;
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key, params);
}
/**
@@ -128,21 +65,7 @@ public class Resources
*/
public static char getMnemonic(String key)
{
- try
- {
- String resourceString = STRING_RESOURCE_BUNDLE.getString(key);
-
- int mnemonicIndex = resourceString.indexOf('&');
-
- if(mnemonicIndex > -1)
- return resourceString.charAt(mnemonicIndex + 1);
- }
- catch (MissingResourceException e)
- {
- return 0;
- }
-
- return 0;
+ return getResources().getI18nMnemonic(key);
}
/**
@@ -155,19 +78,39 @@ public class Resources
{
BufferedImage image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID);
-
+ InputStream in =
+ getResources().getImageInputStream(imageID);
+
+ if(in == null)
+ return null;
+
try
{
- image =
- ImageIO.read(Resources.class.getClassLoader()
- .getResourceAsStream(path));
+ image = ImageIO.read(in);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return new ImageIcon(image);
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = WhiteboardActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)WhiteboardActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
} \ No newline at end of file
diff --git a/src/net/java/sip/communicator/plugin/whiteboard/whiteboard.manifest.mf b/src/net/java/sip/communicator/plugin/whiteboard/whiteboard.manifest.mf
index c1f1dec..1688917 100644
--- a/src/net/java/sip/communicator/plugin/whiteboard/whiteboard.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/whiteboard/whiteboard.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,
diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
index c5c86cf..b16eb67 100644
--- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
@@ -118,7 +118,7 @@ public class FirstWizardPage
uinPassPanel.add(rememberPassBox, BorderLayout.SOUTH);
uinPassPanel.setBorder(BorderFactory.createTitledBorder(Resources
- .getString("uinAndPassword")));
+ .getString("yahooUinAndPassword")));
mainPanel.add(uinPassPanel);
this.add(mainPanel, BorderLayout.NORTH);
diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/Resources.java
index 1655955..40760be 100644
--- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/Resources.java
@@ -10,8 +10,11 @@ package net.java.sip.communicator.plugin.yahooaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
@@ -22,35 +25,11 @@ public class Resources
{
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.yahooaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.yahooaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
+ private static ResourceManagementService resourcesService;
- public static ImageID YAHOO_LOGO = new ImageID("protocolIcon");
+ public static ImageID YAHOO_LOGO = new ImageID("protocolIconYahoo");
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageYahoo");
/**
* Returns an internationalized string corresponding to the given key.
@@ -59,14 +38,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -76,17 +48,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
+ image = new byte[in.available()];
+ in.read(image);
}
catch (IOException e)
{
- log.error("Failed to load image:" + path, e);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -109,5 +86,23 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = YahooAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)YahooAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java
index 1064cfa..1a9937a 100644
--- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccountRegistrationWizard.java
@@ -80,7 +80,7 @@ public class YahooAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameYahoo");
}
/**
@@ -92,7 +92,7 @@ public class YahooAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionYahoo");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf
index 8377e3e..22e25d6 100644
--- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/yahooaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/Resources.java
index ad709cb..9caaa3e 100644
--- a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/Resources.java
@@ -10,8 +10,11 @@ package net.java.sip.communicator.plugin.zeroconfaccregwizz;
import java.io.*;
import java.util.*;
+import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;
+import org.osgi.framework.*;
+
/**
* The Resources class manages the access to the internationalization
* properties files and the images properties file.
@@ -24,35 +27,11 @@ public class Resources
private static Logger log = Logger.getLogger(Resources.class);
- /**
- * The name of the resource, where internationalization strings for this
- * plugin are stored.
- */
- private static final String STRING_RESOURCE_NAME
- = "resources.languages.plugin.zeroconfaccregwizz.resources";
-
- /**
- * The name of the resource, where paths to images used in this bundle are
- * stored.
- */
- private static final String IMAGE_RESOURCE_NAME
- = "net.java.sip.communicator.plugin.zeroconfaccregwizz.resources";
-
- /**
- * The string resource bundle.
- */
- private static final ResourceBundle STRING_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(STRING_RESOURCE_NAME);
-
- /**
- * The image resource bundle.
- */
- private static final ResourceBundle IMAGE_RESOURCE_BUNDLE
- = ResourceBundle.getBundle(IMAGE_RESOURCE_NAME);
-
- public static ImageID ZEROCONF_LOGO = new ImageID("protocolIcon");
+ private static ResourceManagementService resourcesService;
- public static ImageID PAGE_IMAGE = new ImageID("pageImage");
+ public static ImageID ZEROCONF_LOGO = new ImageID("protocolIconZeroconf");
+
+ public static ImageID PAGE_IMAGE = new ImageID("pageImageZeroconf");
/**
* Returns an internationalized string corresponding to the given key.
@@ -61,14 +40,7 @@ public class Resources
*/
public static String getString(String key)
{
- try
- {
- return STRING_RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException exc)
- {
- return '!' + key + '!';
- }
+ return getResources().getI18NString(key);
}
/**
@@ -78,18 +50,22 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- byte[] image = new byte[100000];
+ InputStream in =
+ getResources().getImageInputStream(imageID.getId());
+
+ if(in == null)
+ return null;
+
+ byte[] image = null;
- String path = IMAGE_RESOURCE_BUNDLE.getString(imageID.getId());
try
{
- Resources.class.getClassLoader()
- .getResourceAsStream(path).read(image);
-
+ image = new byte[in.available()];
+ in.read(image);
}
- catch (IOException exc)
+ catch (IOException e)
{
- log.error("Failed to load image:" + path, exc);
+ log.error("Failed to load image:" + imageID, e);
}
return image;
@@ -116,4 +92,22 @@ public class Resources
return id;
}
}
+
+ public static ResourceManagementService getResources()
+ {
+ if (resourcesService == null)
+ {
+ ServiceReference serviceReference = ZeroconfAccRegWizzActivator.bundleContext
+ .getServiceReference(ResourceManagementService.class.getName());
+
+ if(serviceReference == null)
+ return null;
+
+ resourcesService =
+ (ResourceManagementService)ZeroconfAccRegWizzActivator.bundleContext
+ .getService(serviceReference);
+ }
+
+ return resourcesService;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java
index 57dcee4..56565a0 100644
--- a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/ZeroconfAccountRegistrationWizard.java
@@ -87,7 +87,7 @@ public class ZeroconfAccountRegistrationWizard
*/
public String getProtocolName()
{
- return Resources.getString("protocolName");
+ return Resources.getString("protocolNameZeroconf");
}
/**
@@ -97,7 +97,7 @@ public class ZeroconfAccountRegistrationWizard
*/
public String getProtocolDescription()
{
- return Resources.getString("protocolDescription");
+ return Resources.getString("protocolDescriptionZeroconf");
}
/**
diff --git a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/zeroconfaccregwizz.manifest.mf b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/zeroconfaccregwizz.manifest.mf
index 9762b18..f774a3e 100644
--- a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/zeroconfaccregwizz.manifest.mf
+++ b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/zeroconfaccregwizz.manifest.mf
@@ -5,6 +5,7 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
net.java.sip.communicator.util,
+ net.java.sip.communicator.service.resources,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.configuration.event,
net.java.sip.communicator.service.protocol,
diff --git a/src/net/java/sip/communicator/service/protocol/msnconstants/MsnStatusEnum.java b/src/net/java/sip/communicator/service/protocol/msnconstants/MsnStatusEnum.java
index 13f2f17..d3532f8 100644
--- a/src/net/java/sip/communicator/service/protocol/msnconstants/MsnStatusEnum.java
+++ b/src/net/java/sip/communicator/service/protocol/msnconstants/MsnStatusEnum.java
@@ -135,7 +135,7 @@ public class MsnStatusEnum
public static byte[] loadIcon(String imagePath) {
InputStream is = MsnStatusEnum.class.getClassLoader()
.getResourceAsStream(imagePath);
-logger.info("loadIcon " + imagePath);
+
byte[] icon = null;
try {
icon = new byte[is.available()];
diff --git a/src/net/java/sip/communicator/service/resources/ColorPack.java b/src/net/java/sip/communicator/service/resources/ColorPack.java
new file mode 100644
index 0000000..f0ec749
--- /dev/null
+++ b/src/net/java/sip/communicator/service/resources/ColorPack.java
@@ -0,0 +1,17 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.service.resources;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public interface ColorPack
+ extends ResourcePack
+{
+ public String RESOURCE_NAME_DEFAULT_VALUE = "DefaultColorPack";
+}
diff --git a/src/net/java/sip/communicator/service/resources/ImagePack.java b/src/net/java/sip/communicator/service/resources/ImagePack.java
new file mode 100644
index 0000000..70dbe63
--- /dev/null
+++ b/src/net/java/sip/communicator/service/resources/ImagePack.java
@@ -0,0 +1,17 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.service.resources;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public interface ImagePack
+ extends ResourcePack
+{
+ public String RESOURCE_NAME_DEFAULT_VALUE = "DefaultImagePack";
+}
diff --git a/src/net/java/sip/communicator/service/resources/LanguagePack.java b/src/net/java/sip/communicator/service/resources/LanguagePack.java
new file mode 100644
index 0000000..24843fe
--- /dev/null
+++ b/src/net/java/sip/communicator/service/resources/LanguagePack.java
@@ -0,0 +1,21 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.service.resources;
+
+import java.util.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public interface LanguagePack
+ extends ResourcePack
+{
+ public String RESOURCE_NAME_DEFAULT_VALUE = "DefaultLanguagePack";
+
+ public Iterator getAvailableLocales();
+}
diff --git a/src/net/java/sip/communicator/service/resources/ResourceManagementService.java b/src/net/java/sip/communicator/service/resources/ResourceManagementService.java
new file mode 100644
index 0000000..cbb8bbc
--- /dev/null
+++ b/src/net/java/sip/communicator/service/resources/ResourceManagementService.java
@@ -0,0 +1,58 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.service.resources;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public interface ResourceManagementService
+{
+ // Color pack methods
+ public int getColor(String key);
+ public String getColorString(String key);
+
+ // Image pack methods
+ public InputStream getImageInputStreamForPath(String path);
+ public InputStream getImageInputStream(String streamKey);
+ public URL getImageURL(String urlKey);
+ public URL getImageURLForPath(String path);
+
+ // Language pack methods
+ public String getI18NString(String key);
+ public String getI18NString(String key, Locale l);
+ public String getI18NString(String key, String[] params);
+ public String getI18NString(String key, String[] params, Locale l);
+ public char getI18nMnemonic(String key);
+ public char getI18nMnemonic(String key, Locale l);
+
+ // Settings pack methods
+ public URL getSettingsURL(String urlKey);
+ public InputStream getSettingsInputStream(String streamKey);
+ public String getSettingsString(String key);
+ public int getSettingsInt(String key);
+
+ // Sound pack methods
+ public URL getSoundURL(String urlKey);
+ public URL getSoundURLForPath(String path);
+
+ public Iterator getCurrentColors();
+
+ public Iterator getCurrentImages();
+
+ public Iterator getCurrentSettings();
+
+ public Iterator getCurrentSounds();
+
+ public Iterator getAvailableLocales();
+
+ public Iterator getI18nStringsByLocale(Locale l);
+}
diff --git a/src/net/java/sip/communicator/service/resources/ResourcePack.java b/src/net/java/sip/communicator/service/resources/ResourcePack.java
new file mode 100644
index 0000000..976fd17
--- /dev/null
+++ b/src/net/java/sip/communicator/service/resources/ResourcePack.java
@@ -0,0 +1,20 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.service.resources;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public interface ResourcePack
+{
+ public String RESOURCE_NAME = "ResourceName";
+
+ public String getResourcePackBaseName();
+ public String getName();
+ public String getDescription();
+}
diff --git a/src/net/java/sip/communicator/service/resources/SettingsPack.java b/src/net/java/sip/communicator/service/resources/SettingsPack.java
new file mode 100644
index 0000000..5e7ea8f
--- /dev/null
+++ b/src/net/java/sip/communicator/service/resources/SettingsPack.java
@@ -0,0 +1,17 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.service.resources;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public interface SettingsPack
+ extends ResourcePack
+{
+ public String RESOURCE_NAME_DEFAULT_VALUE = "DefaultSettingsPack";
+}
diff --git a/src/net/java/sip/communicator/service/resources/SoundPack.java b/src/net/java/sip/communicator/service/resources/SoundPack.java
new file mode 100644
index 0000000..3c6ec52
--- /dev/null
+++ b/src/net/java/sip/communicator/service/resources/SoundPack.java
@@ -0,0 +1,17 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.service.resources;
+
+/**
+ *
+ * @author Damian Minkov
+ */
+public interface SoundPack
+ extends ResourcePack
+{
+ public String RESOURCE_NAME_DEFAULT_VALUE = "DefaultSoundPack";
+}