[haiku-commits] r39262 - haiku/trunk/src/apps/showimage

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 1 Nov 2010 22:26:53 +0100 (CET)

Author: axeld
Date: 2010-11-01 22:26:53 +0100 (Mon, 01 Nov 2010)
New Revision: 39262
Changeset: http://dev.haiku-os.org/changeset/39262

Removed:
   haiku/trunk/src/apps/showimage/ResizerWindow.cpp
   haiku/trunk/src/apps/showimage/ResizerWindow.h
Modified:
   haiku/trunk/src/apps/showimage/Jamfile
   haiku/trunk/src/apps/showimage/ShowImageConstants.h
   haiku/trunk/src/apps/showimage/ShowImageWindow.cpp
   haiku/trunk/src/apps/showimage/ShowImageWindow.h
Log:
* Removed resizing ability.


Modified: haiku/trunk/src/apps/showimage/Jamfile
===================================================================
--- haiku/trunk/src/apps/showimage/Jamfile      2010-11-01 20:52:29 UTC (rev 
39261)
+++ haiku/trunk/src/apps/showimage/Jamfile      2010-11-01 21:26:53 UTC (rev 
39262)
@@ -10,7 +10,6 @@
        ImageFileNavigator.cpp
        PrintOptionsWindow.cpp
        ProgressWindow.cpp
-       ResizerWindow.cpp
        SelectionBox.cpp
        ShowImageApp.cpp
        ShowImageSettings.cpp
@@ -28,7 +27,6 @@
        :
        PrintOptionsWindow.cpp
        ProgressWindow.cpp
-       ResizerWindow.cpp
        ShowImageApp.cpp
        ShowImageView.cpp
        ShowImageWindow.cpp

Modified: haiku/trunk/src/apps/showimage/ShowImageConstants.h
===================================================================
--- haiku/trunk/src/apps/showimage/ShowImageConstants.h 2010-11-01 20:52:29 UTC 
(rev 39261)
+++ haiku/trunk/src/apps/showimage/ShowImageConstants.h 2010-11-01 21:26:53 UTC 
(rev 39262)
@@ -57,10 +57,8 @@
        MSG_ORIGINAL_SIZE                       = 'mOSZ',
        MSG_SCALE_BILINEAR                      = 'mSBL',
        MSG_DESKTOP_BACKGROUND          = 'mDBG',
-       MSG_OPEN_RESIZER_WINDOW         = 'mORS',
-       MSG_RESIZER_WINDOW_QUIT         = 'mRSQ',
-       MSG_RESIZE                                      = 'mRSZ',
        kMsgProgressStatusUpdate        = 'SIup'
 };
 
+
 #endif // SHOW_IMAGE_CONSTANTS_H

Modified: haiku/trunk/src/apps/showimage/ShowImageWindow.cpp
===================================================================
--- haiku/trunk/src/apps/showimage/ShowImageWindow.cpp  2010-11-01 20:52:29 UTC 
(rev 39261)
+++ haiku/trunk/src/apps/showimage/ShowImageWindow.cpp  2010-11-01 21:26:53 UTC 
(rev 39262)
@@ -17,6 +17,7 @@
 
 #include <new>
 #include <stdio.h>
+#include <stdlib.h>
 
 #include <Alert.h>
 #include <Application.h>
@@ -41,10 +42,8 @@
 #include <TranslationDefs.h>
 #include <TranslationUtils.h>
 #include <TranslatorRoster.h>
-#include <stdlib.h> // for bs_printf()
 
 #include "EntryMenuItem.h"
-#include "ResizerWindow.h"
 #include "ShowImageApp.h"
 #include "ShowImageConstants.h"
 #include "ShowImageStatusView.h"
@@ -143,9 +142,7 @@
        fModified(false),
        fFullScreen(false),
        fShowCaption(true),
-       fPrintSettings(NULL),
-       fResizerWindowMessenger(NULL),
-       fResizeItem(NULL)
+       fPrintSettings(NULL)
 {
        _LoadSettings();
 
@@ -225,7 +222,6 @@
 
 ShowImageWindow::~ShowImageWindow()
 {
-       delete fResizerWindowMessenger;
 }
 
 
@@ -389,12 +385,10 @@
        _AddItemMenu(menu, B_TRANSLATE("Flip top to bottom"),
                MSG_FLIP_TOP_TO_BOTTOM, 0, 0, this);
        menu->AddSeparatorItem();
-       fResizeItem = _AddItemMenu(menu, B_TRANSLATE("Resize" B_UTF8_ELLIPSIS),
-               MSG_OPEN_RESIZER_WINDOW, 0, 0, this);
-       bar->AddItem(menu);
-       menu->AddSeparatorItem();
        _AddItemMenu(menu, B_TRANSLATE("Use as background" B_UTF8_ELLIPSIS),
                MSG_DESKTOP_BACKGROUND, 0, 0, this);
+
+       bar->AddItem(menu);
 }
 
 
@@ -787,11 +781,9 @@
                                break;
                        if (item->IsMarked()) {
                                item->SetMarked(false);
-                               fResizeItem->SetEnabled(true);
                                fImageView->StopSlideShow();
                        } else if (_ClosePrompt()) {
                                item->SetMarked(true);
-                               fResizeItem->SetEnabled(false);
                                fImageView->StartSlideShow();
                        }
                        break;
@@ -857,11 +849,6 @@
                        
fImageView->SetScaleBilinear(_ToggleMenuItem(message->what));
                        break;
 
-               case MSG_RESIZER_WINDOW_QUIT:
-                       delete fResizerWindowMessenger;
-                       fResizerWindowMessenger = NULL;
-                       break;
-
                case MSG_DESKTOP_BACKGROUND:
                {
                        BMessage message(B_REFS_RECEIVED);
@@ -1207,45 +1194,6 @@
 }
 
 
-void
-ShowImageWindow::_OpenResizerWindow(int32 width, int32 height)
-{
-       if (fResizerWindowMessenger == NULL) {
-               // open window if it is not already opened
-               BWindow* window = new ResizerWindow(this, width, height);
-               fResizerWindowMessenger = new BMessenger(window);
-               window->Show();
-       } else {
-               
fResizerWindowMessenger->SendMessage(ResizerWindow::kActivateMsg);
-       }
-}
-
-
-void
-ShowImageWindow::_UpdateResizerWindow(int32 width, int32 height)
-{
-       if (fResizerWindowMessenger == NULL)
-               return;
-
-       BMessage updateMsg(ResizerWindow::kUpdateMsg);
-       updateMsg.AddInt32("width", width);
-       updateMsg.AddInt32("height", height);
-       fResizerWindowMessenger->SendMessage(&updateMsg);
-}
-
-
-void
-ShowImageWindow::_CloseResizerWindow()
-{
-       if (fResizerWindowMessenger == NULL)
-               return;
-
-       fResizerWindowMessenger->SendMessage(B_QUIT_REQUESTED);
-       delete fResizerWindowMessenger;
-       fResizerWindowMessenger = NULL;
-}
-
-
 bool
 ShowImageWindow::QuitRequested()
 {
@@ -1255,10 +1203,7 @@
        }
 
        bool quit = _ClosePrompt();
-
        if (quit) {
-               _CloseResizerWindow();
-
                // tell the app to forget about this window
                be_app->PostMessage(MSG_WINDOW_QUIT);
        }

Modified: haiku/trunk/src/apps/showimage/ShowImageWindow.h
===================================================================
--- haiku/trunk/src/apps/showimage/ShowImageWindow.h    2010-11-01 20:52:29 UTC 
(rev 39261)
+++ haiku/trunk/src/apps/showimage/ShowImageWindow.h    2010-11-01 21:26:53 UTC 
(rev 39262)
@@ -75,10 +75,6 @@
                        void                            _PrepareForPrint();
                        void                            _Print(BMessage* msg);
 
-                       void                            
_OpenResizerWindow(int32 width, int32 height);
-                       void                            
_UpdateResizerWindow(int32 width, int32 height);
-                       void                            _CloseResizerWindow();
-
 private:
                        ImageFileNavigator      fNavigator;
                        BFilePanel*                     fSavePanel;
@@ -95,8 +91,6 @@
                        BRect                           fWindowFrame;
                        BMessage*                       fPrintSettings;
                        PrintOptions            fPrintOptions;
-                       BMessenger*                     fResizerWindowMessenger;
-                       BMenuItem*                      fResizeItem;
                        BString                         fImageType;
 };
 


Other related posts: