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
|
x-vnd.Haiku-ShowImage
|
||||||
:
|
:
|
||||||
PrintOptionsWindow.cpp
|
PrintOptionsWindow.cpp
|
||||||
|
ProgressWindow.cpp
|
||||||
ResizerWindow.cpp
|
ResizerWindow.cpp
|
||||||
ShowImageApp.cpp
|
ShowImageApp.cpp
|
||||||
|
ShowImageView.cpp
|
||||||
ShowImageWindow.cpp
|
ShowImageWindow.cpp
|
||||||
;
|
;
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
|
#include <Catalog.h>
|
||||||
|
#include <Locale.h>
|
||||||
#include <MessageRunner.h>
|
#include <MessageRunner.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
#include <StatusBar.h>
|
#include <StatusBar.h>
|
||||||
@ -18,10 +20,13 @@
|
|||||||
|
|
||||||
static const uint32 kMsgShow = 'show';
|
static const uint32 kMsgShow = 'show';
|
||||||
|
|
||||||
|
#undef TR_CONTEXT
|
||||||
|
#define TR_CONTEXT "ProgressWindow"
|
||||||
|
|
||||||
|
|
||||||
ProgressWindow::ProgressWindow(BWindow* referenceWindow, bool center)
|
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_MODAL_WINDOW_LOOK, B_FLOATING_APP_WINDOW_FEEL,
|
||||||
B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS),
|
B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS),
|
||||||
fRunner(NULL)
|
fRunner(NULL)
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
* Bernd Korz
|
* Bernd Korz
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "ShowImageView.h"
|
#include "ShowImageView.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -23,11 +24,13 @@
|
|||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
#include <BitmapStream.h>
|
#include <BitmapStream.h>
|
||||||
|
#include <Catalog.h>
|
||||||
#include <Clipboard.h>
|
#include <Clipboard.h>
|
||||||
#include <Debug.h>
|
#include <Debug.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <File.h>
|
#include <File.h>
|
||||||
|
#include <Locale.h>
|
||||||
#include <MenuBar.h>
|
#include <MenuBar.h>
|
||||||
#include <MenuItem.h>
|
#include <MenuItem.h>
|
||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
@ -1245,11 +1248,15 @@ ShowImageView::_OutputFormatForType(BBitmap* bitmap, const char* type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#undef TR_CONTEXT
|
||||||
|
#define TR_CONTEXT "SaveToFile"
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
|
ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
|
||||||
const translation_format* format)
|
const translation_format* format)
|
||||||
{
|
{
|
||||||
if (!bitmap) {
|
if (bitmap == NULL) {
|
||||||
// If no bitmap is supplied, write out the whole image
|
// If no bitmap is supplied, write out the whole image
|
||||||
bitmap = fBitmap;
|
bitmap = fBitmap;
|
||||||
}
|
}
|
||||||
@ -1277,9 +1284,10 @@ ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
|
|||||||
}
|
}
|
||||||
if (loop) {
|
if (loop) {
|
||||||
// If loop terminated because of a break, there was an error
|
// If loop terminated because of a break, there was an error
|
||||||
BString errText;
|
char buffer[512];
|
||||||
errText << "Sorry, the file '" << name << "' could not be written.";
|
snprintf(buffer, sizeof(buffer), TR("The file '%s' could not "
|
||||||
BAlert *palert = new BAlert(NULL, errText.String(), "OK");
|
"be written."), name);
|
||||||
|
BAlert *palert = new BAlert("", buffer, TR("OK"));
|
||||||
palert->Go();
|
palert->Go();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user