Patch by Jorma Karvonen, modified by myself to remove translations of BView
names and localization unfriendly string composition. Closes ticket #5563, thanks! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36647 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6977563bf8
commit
2271983375
@ -25,7 +25,9 @@ DoCatalogs ShowImage :
|
||||
x-vnd.Haiku-ShowImage
|
||||
:
|
||||
PrintOptionsWindow.cpp
|
||||
ProgressWindow.cpp
|
||||
ResizerWindow.cpp
|
||||
ShowImageApp.cpp
|
||||
ShowImageView.cpp
|
||||
ShowImageWindow.cpp
|
||||
;
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Autolock.h>
|
||||
#include <Catalog.h>
|
||||
#include <Locale.h>
|
||||
#include <MessageRunner.h>
|
||||
#include <Screen.h>
|
||||
#include <StatusBar.h>
|
||||
@ -18,10 +20,13 @@
|
||||
|
||||
static const uint32 kMsgShow = 'show';
|
||||
|
||||
#undef TR_CONTEXT
|
||||
#define TR_CONTEXT "ProgressWindow"
|
||||
|
||||
|
||||
ProgressWindow::ProgressWindow(BWindow* referenceWindow, bool center)
|
||||
:
|
||||
BWindow(BRect(0, 0, 250, 100), "Progress monitor",
|
||||
BWindow(BRect(0, 0, 250, 100), TR("Progress monitor"),
|
||||
B_MODAL_WINDOW_LOOK, B_FLOATING_APP_WINDOW_FEEL,
|
||||
B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS),
|
||||
fRunner(NULL)
|
||||
|
@ -13,6 +13,7 @@
|
||||
* Bernd Korz
|
||||
*/
|
||||
|
||||
|
||||
#include "ShowImageView.h"
|
||||
|
||||
#include <math.h>
|
||||
@ -23,11 +24,13 @@
|
||||
#include <Application.h>
|
||||
#include <Bitmap.h>
|
||||
#include <BitmapStream.h>
|
||||
#include <Catalog.h>
|
||||
#include <Clipboard.h>
|
||||
#include <Debug.h>
|
||||
#include <Directory.h>
|
||||
#include <Entry.h>
|
||||
#include <File.h>
|
||||
#include <Locale.h>
|
||||
#include <MenuBar.h>
|
||||
#include <MenuItem.h>
|
||||
#include <Message.h>
|
||||
@ -1245,11 +1248,15 @@ ShowImageView::_OutputFormatForType(BBitmap* bitmap, const char* type,
|
||||
}
|
||||
|
||||
|
||||
#undef TR_CONTEXT
|
||||
#define TR_CONTEXT "SaveToFile"
|
||||
|
||||
|
||||
void
|
||||
ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
|
||||
const translation_format* format)
|
||||
{
|
||||
if (!bitmap) {
|
||||
if (bitmap == NULL) {
|
||||
// If no bitmap is supplied, write out the whole image
|
||||
bitmap = fBitmap;
|
||||
}
|
||||
@ -1277,9 +1284,10 @@ ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
|
||||
}
|
||||
if (loop) {
|
||||
// If loop terminated because of a break, there was an error
|
||||
BString errText;
|
||||
errText << "Sorry, the file '" << name << "' could not be written.";
|
||||
BAlert *palert = new BAlert(NULL, errText.String(), "OK");
|
||||
char buffer[512];
|
||||
snprintf(buffer, sizeof(buffer), TR("The file '%s' could not "
|
||||
"be written."), name);
|
||||
BAlert *palert = new BAlert("", buffer, TR("OK"));
|
||||
palert->Go();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user