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

Author: stippi
Date: 2011-03-21 11:59:10 +0100 (Mon, 21 Mar 2011)
New Revision: 41065
Changeset: https://dev.haiku-os.org/changeset/41065

Modified:
   haiku/trunk/src/apps/showimage/ShowImageWindow.cpp
   haiku/trunk/src/apps/showimage/ToolBarIcons.cpp
   haiku/trunk/src/apps/showimage/ToolBarIcons.h
   haiku/trunk/src/apps/showimage/ToolBarView.cpp
   haiku/trunk/src/apps/showimage/ToolBarView.h
Log:
 * Changed the previous/next icons to the ones intended by zuMi.
 * Removed the full-screen icon, since the zoom icon of the window
   already does the job.
 * Added an icon for the slide show, but it additionally goes into
   full-screen mode.
 * Added appropriate work arounds for bugs in the Interface Kit
   concerning the hiding of tool-tips, and a bug in the app_server
   concerning the invalidation of unhidden views...


Modified: haiku/trunk/src/apps/showimage/ShowImageWindow.cpp
===================================================================
--- haiku/trunk/src/apps/showimage/ShowImageWindow.cpp  2011-03-21 10:20:02 UTC 
(rev 41064)
+++ haiku/trunk/src/apps/showimage/ShowImageWindow.cpp  2011-03-21 10:59:10 UTC 
(rev 41065)
@@ -163,10 +163,14 @@
        
 //     fToolBarView->AddAction(MSG_FILE_OPEN, be_app,
 //             tool_bar_icon(kIconDocumentOpen), 
B_TRANSLATE("Open"B_UTF8_ELLIPSIS));
-       fToolBarView->AddAction(MSG_FILE_PREV, this, tool_bar_icon(kIconGoUp),
-               B_TRANSLATE("Previous file"));
-       fToolBarView->AddAction(MSG_FILE_NEXT, this, tool_bar_icon(kIconGoDown),
+       fToolBarView->AddAction(MSG_FILE_PREV, this,
+               tool_bar_icon(kIconGoPrevious), B_TRANSLATE("Previous file"));
+       fToolBarView->AddAction(MSG_FILE_NEXT, this, tool_bar_icon(kIconGoNext),
                B_TRANSLATE("Next file"));
+       BMessage* fullScreenSlideShow = new BMessage(MSG_SLIDE_SHOW);
+       fullScreenSlideShow->AddBool("full screen", true);
+       fToolBarView->AddAction(fullScreenSlideShow, this,
+               tool_bar_icon(kIconMediaMovieLibrary), B_TRANSLATE("Slide 
show"));
        fToolBarView->AddSeparator();
        fToolBarView->AddAction(MSG_SELECTION_MODE, this,
                tool_bar_icon(kIconDrawRectangularSelection),
@@ -180,9 +184,9 @@
                B_TRANSLATE("Zoom in"));
        fToolBarView->AddAction(MSG_ZOOM_OUT, this, tool_bar_icon(kIconZoomOut),
                B_TRANSLATE("Zoom out"));
-       fToolBarView->AddSeparator();
-       fToolBarView->AddAction(MSG_FULL_SCREEN, this,
-               tool_bar_icon(kIconViewFullScreen), B_TRANSLATE("Full screen"));
+//     fToolBarView->AddSeparator();
+//     fToolBarView->AddAction(MSG_FULL_SCREEN, this,
+//             tool_bar_icon(kIconViewFullScreen), B_TRANSLATE("Full screen"));
 
        fToolBarView->ResizeTo(viewFrame.Width(), 
fToolBarView->MinSize().height);
 
@@ -875,6 +879,16 @@
 
                case MSG_SLIDE_SHOW:
                {
+                       // TODO: Maybe two distinct messages? Also once the 
tool bar
+                       // automatically shows in full screen mode, the icon 
should
+                       // be a pause. There should be a separate icon to leave 
full
+                       // screen mode as well.
+                       bool fullScreen;
+                       if (message->FindBool("full screen", &fullScreen) == 
B_OK
+                               && fullScreen) {
+                               _ToggleFullScreen();
+                       }
+
                        BMenuItem* item = fBar->FindItem(message->what);
                        if (item == NULL)
                                break;

Modified: haiku/trunk/src/apps/showimage/ToolBarIcons.cpp
===================================================================
--- haiku/trunk/src/apps/showimage/ToolBarIcons.cpp     2011-03-21 10:20:02 UTC 
(rev 41064)
+++ haiku/trunk/src/apps/showimage/ToolBarIcons.cpp     2011-03-21 10:59:10 UTC 
(rev 41065)
@@ -167,6 +167,82 @@
 };
 
 
+static const uint8 kEditCut[] = {
+       0x6e, 0x63, 0x69, 0x66, 0x06, 0x05, 0x54, 0x03, 0x80, 0x00, 0x00, 0x02,
+       0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0xc0, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x47, 0x7f, 0xff, 0x00, 0xe6, 0xea,
+       0xf2, 0xff, 0xce, 0xd2, 0xd9, 0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00,
+       0x3a, 0x40, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00,
+       0x4a, 0x30, 0x00, 0x00, 0xff, 0xab, 0xab, 0xff, 0xd9, 0x00, 0x00, 0x05,
+       0xff, 0x04, 0x00, 0x66, 0x04, 0x06, 0x05, 0x4b, 0x00, 0x32, 0x24, 0x32,
+       0x26, 0x32, 0xb3, 0xcb, 0x30, 0x1f, 0x2e, 0x38, 0x32, 0x02, 0x04, 0x28,
+       0x3c, 0xb7, 0x11, 0x3c, 0xb5, 0x4e, 0x3c, 0x24, 0x42, 0x24, 0xbf, 0x3a,
+       0x24, 0xc1, 0xdd, 0x28, 0x48, 0xb5, 0x4e, 0x48, 0xb7, 0x11, 0x48, 0x2c,
+       0x42, 0x2c, 0xc1, 0xdd, 0x2c, 0xbf, 0x3a, 0x02, 0x04, 0x32, 0x38, 0x32,
+       0x38, 0x32, 0x3c, 0x2e, 0x42, 0x2e, 0x3e, 0x2e, 0x42, 0x2a, 0x42, 0x2a,
+       0x42, 0x2a, 0x3e, 0x2e, 0x38, 0x2e, 0x3c, 0x2e, 0x38, 0x0a, 0x04, 0x30,
+       0x32, 0x2e, 0x34, 0x2e, 0x1f, 0x30, 0x1f, 0x15, 0x0a, 0x05, 0x01, 0x00,
+       0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
+       0x71, 0x47, 0x97, 0xb6, 0xba, 0xfe, 0xcc, 0x01, 0x17, 0x84, 0x02, 0x04,
+       0x0a, 0x05, 0x01, 0x01, 0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc,
+       0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x97, 0xb6, 0xba, 0xfe, 0xcc, 0x01,
+       0x17, 0x88, 0x00, 0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0x3f, 0xc9, 0x71,
+       0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x97, 0xb6,
+       0xba, 0xfe, 0xcc, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x00, 0x01, 0x00,
+       0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
+       0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01, 0x17, 0x84, 0x02, 0x04,
+       0x0a, 0x01, 0x01, 0x01, 0x12, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc,
+       0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01,
+       0x17, 0x88, 0x00, 0x04, 0x0a, 0x01, 0x01, 0x02, 0x12, 0x3f, 0xc9, 0x71,
+       0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6,
+       0xc2, 0x2f, 0xec, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x02, 0x01, 0x00,
+       0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9,
+       0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x03, 0x01, 0x01, 0x12,
+       0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91, 0x3f, 0xc9, 0x71,
+       0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a,
+       0x03, 0x01, 0x02, 0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93,
+       0x91, 0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x04,
+       0x01, 0x03, 0x02, 0x3f, 0xc9, 0x71, 0x3c, 0x93, 0x91, 0xbc, 0x93, 0x91,
+       0x3f, 0xc9, 0x71, 0x47, 0x17, 0xb6, 0xc2, 0x2f, 0xec, 0x0a, 0x00, 0x00,
+       0x20, 0xb4, 0xe4, 0xb2, 0xf3, 0x0a, 0x05, 0x01, 0x00, 0x12, 0xbf, 0xc9,
+       0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x64,
+       0x70, 0xba, 0xf9, 0xaa, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x05, 0x01,
+       0x01, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f,
+       0xc9, 0x95, 0x49, 0x64, 0x70, 0xba, 0xf9, 0xaa, 0x01, 0x17, 0x88, 0x00,
+       0x04, 0x0a, 0x05, 0x01, 0x02, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1,
+       0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x64, 0x70, 0xba, 0xf9, 0xaa,
+       0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x00, 0x01, 0x00, 0x12, 0xbf, 0xc9,
+       0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24,
+       0x70, 0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x01, 0x01,
+       0x01, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f,
+       0xc9, 0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x88, 0x00,
+       0x04, 0x0a, 0x01, 0x01, 0x02, 0x12, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1,
+       0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a,
+       0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x02, 0xbf, 0xc9,
+       0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24,
+       0x70, 0xc2, 0x2f, 0x9a, 0x0a, 0x03, 0x01, 0x01, 0x12, 0xbf, 0xc9, 0x85,
+       0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95, 0x49, 0x24, 0x70,
+       0xc2, 0x2f, 0x9a, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a, 0x03, 0x01, 0x02,
+       0x02, 0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9,
+       0x95, 0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a, 0x0a, 0x04, 0x01, 0x03, 0x02,
+       0xbf, 0xc9, 0x85, 0x3c, 0x92, 0xb1, 0x3c, 0x92, 0xbb, 0x3f, 0xc9, 0x95,
+       0x49, 0x24, 0x70, 0xc2, 0x2f, 0x9a
+};
+
+
+const unsigned char kEditDelete[] = {
+       0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x80, 0x00, 0x00,
+       0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x20, 0x00, 0xc0, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xe0, 0x00, 0x00, 0xff,
+       0xab, 0xab, 0xff, 0xd9, 0x00, 0x00, 0x01, 0x0a, 0x0c, 0x48, 0x2a, 0x40,
+       0x22, 0x35, 0x2d, 0x2a, 0x22, 0x22, 0x2a, 0x2d, 0x35, 0x22, 0x40, 0x2a,
+       0x48, 0x35, 0x3d, 0x40, 0x48, 0x48, 0x40, 0x3d, 0x35, 0x03, 0x0a, 0x00,
+       0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01,
+       0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00,
+       0x00
+};
+
+
 static const uint8 kEditTrash[] = {
        0x6e, 0x63, 0x69, 0x66, 0x05, 0x04, 0x00, 0x66, 0x05, 0x00, 0x03, 0x08,
        0x59, 0x3e, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00,
@@ -195,6 +271,30 @@
 };
 
 
+const unsigned char kGoNext[] = {
+       0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
+       0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
+       0xff, 0x80, 0xff, 0x00, 0xb3, 0x00, 0x01, 0x0a, 0x07, 0x48, 0x35, 0x34,
+       0x48, 0x34, 0x3e, 0x22, 0x3e, 0x22, 0x2c, 0x34, 0x2c, 0x34, 0x22, 0x03,
+       0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04,
+       0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02,
+       0x01, 0x00, 0x00
+};
+
+
+const unsigned char kGoPrevious[] = {
+       0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
+       0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
+       0xff, 0x80, 0xff, 0x00, 0xb3, 0x00, 0x01, 0x0a, 0x07, 0x22, 0x35, 0x36,
+       0x22, 0x36, 0x2c, 0x48, 0x2c, 0x48, 0x3e, 0x36, 0x3e, 0x36, 0x48, 0x03,
+       0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04,
+       0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x02,
+       0x01, 0x00, 0x00
+};
+
+
 static const uint8 kGoUp[] = {
        0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
        0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
@@ -207,6 +307,58 @@
 };
 
 
+const unsigned char kMediaMovieLibraryR4[] = {
+       0x6e, 0x63, 0x69, 0x66, 0x06, 0x05, 0x00, 0x02, 0x00, 0x16, 0x02, 0x00,
+       0x00, 0x00, 0x3a, 0x40, 0x08, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4b,
+       0xff, 0xf9, 0x49, 0xe0, 0x04, 0x00, 0x82, 0xff, 0x29, 0x02, 0x00, 0x16,
+       0x02, 0x00, 0x00, 0x00, 0x39, 0x80, 0x10, 0xc0, 0x00, 0x01, 0x00, 0x00,
+       0x00, 0x4b, 0xff, 0xfd, 0x49, 0xe0, 0x04, 0x00, 0x82, 0xff, 0x29, 0x05,
+       0x54, 0x02, 0x00, 0x16, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x40, 0x00, 0xc0,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0xff, 0xfb, 0x46, 0xc0, 0x00, 0x00,
+       0xff, 0xff, 0xe6, 0x04, 0x00, 0x66, 0x09, 0x0a, 0x04, 0x28, 0x36, 0x42,
+       0x36, 0x42, 0x48, 0x28, 0x48, 0x0a, 0x04, 0x22, 0x38, 0x22, 0x46, 0x28,
+       0x42, 0x28, 0x3c, 0x02, 0x04, 0x3f, 0x22, 0xc1, 0x54, 0x22, 0xbd, 0x5f,
+       0x22, 0x36, 0x2b, 0x36, 0xb5, 0x67, 0x36, 0xb9, 0x5c, 0x3f, 0x34, 0xbd,
+       0x5f, 0x34, 0xc1, 0x54, 0x34, 0x48, 0x2b, 0x48, 0xb9, 0x5c, 0x48, 0xb5,
+       0x67, 0x06, 0x04, 0xef, 0x46, 0x2b, 0x46, 0xb7, 0x04, 0x46, 0xb7, 0xbf,
+       0xc1, 0xef, 0xb8, 0x6a, 0xc2, 0x10, 0xb8, 0x18, 0xc1, 0xef, 0xb8, 0x6a,
+       0x41, 0x2b, 0xc1, 0xf0, 0xb6, 0x59, 0xc1, 0xf0, 0xb6, 0x59, 0xc2, 0x10,
+       0xb6, 0xab, 0x06, 0x03, 0x3b, 0xc1, 0x88, 0xb5, 0xa9, 0xc1, 0x19, 0xb5,
+       0x1d, 0xc1, 0x88, 0xb5, 0xa9, 0x40, 0xb6, 0xb1, 0x40, 0xb4, 0xa2, 0x40,
+       0xb4, 0xa2, 0xc0, 0x79, 0xb4, 0xbc, 0x06, 0x03, 0x37, 0x3e, 0xb4, 0xa2,
+       0xbe, 0x3a, 0xb4, 0xbc, 0x3e, 0xb4, 0xa2, 0xb6, 0xb1, 0xbd, 0x2b, 0xb5,
+       0xa9, 0xbd, 0x2b, 0xb5, 0xa9, 0xbd, 0x9a, 0xb5, 0x1d, 0x06, 0x04, 0xfb,
+       0xbc, 0xc4, 0xb6, 0x59, 0xbc, 0xa3, 0xb6, 0xab, 0xbc, 0xc4, 0xb6, 0x59,
+       0x3d, 0x2b, 0xbc, 0xc3, 0xb8, 0x6a, 0xbc, 0xc3, 0xb8, 0x6a, 0xbc, 0xa3,
+       0xb8, 0x18, 0x38, 0x2b, 0x38, 0xb7, 0xbf, 0x38, 0xb7, 0x04, 0x06, 0x03,
+       0x3b, 0xbd, 0x2b, 0xb9, 0x1a, 0xbd, 0x9a, 0xb9, 0xa6, 0xbd, 0x2b, 0xb9,
+       0x1a, 0x3e, 0xb8, 0x12, 0x3e, 0xba, 0x21, 0x3e, 0xba, 0x21, 0xbe, 0x3a,
+       0xba, 0x06, 0x06, 0x03, 0x37, 0x40, 0xba, 0x21, 0xc0, 0x79, 0xba, 0x06,
+       0x40, 0xba, 0x21, 0xb8, 0x12, 0xc1, 0x88, 0xb9, 0x1a, 0xc1, 0x88, 0xb9,
+       0x1a, 0xc1, 0x19, 0xb9, 0xa6, 0x09, 0x0a, 0x05, 0x03, 0x00, 0x01, 0x02,
+       0x30, 0x22, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x05, 0x01, 0x02,
+       0x30, 0x0e, 0x22, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x00, 0x02, 0x00,
+       0x01, 0x10, 0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x00,
+       0x0a, 0x02, 0x01, 0x01, 0x00, 0x0a, 0x03, 0x07, 0x08, 0x07, 0x06, 0x05,
+       0x04, 0x03, 0x02, 0x10, 0x01, 0x17, 0x83, 0x00, 0x04, 0x0a, 0x04, 0x07,
+       0x02, 0x03, 0x07, 0x08, 0x05, 0x06, 0x04, 0x00, 0x0a, 0x03, 0x07, 0x08,
+       0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x30, 0x0c, 0x20, 0x01, 0x17, 0x83,
+       0x00, 0x04, 0x0a, 0x04, 0x07, 0x02, 0x03, 0x07, 0x08, 0x05, 0x06, 0x04,
+       0x20, 0x0c, 0x20
+};
+
+
+const unsigned char kMediaPlaybackStartEnabled[] = {
+       0x6e, 0x63, 0x69, 0x66, 0x03, 0x04, 0x00, 0x66, 0x03, 0x00, 0x59, 0x00,
+       0x02, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x60, 0x00, 0xc0, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x48, 0xa0, 0x00, 0x00, 0x80,
+       0xff, 0x80, 0xff, 0x00, 0xb2, 0x00, 0x01, 0x0a, 0x03, 0x46, 0x35, 0x24,
+       0xb3, 0xcb, 0x24, 0x48, 0x03, 0x0a, 0x00, 0x01, 0x00, 0x30, 0x22, 0x22,
+       0x01, 0x17, 0x83, 0x22, 0x04, 0x0a, 0x01, 0x01, 0x00, 0x10, 0x01, 0x17,
+       0x83, 0x22, 0x04, 0x0a, 0x02, 0x01, 0x00, 0x00
+};
+
+
 static const uint8 kViewFullScreen[] = {
        0x6e, 0x63, 0x69, 0x66, 0x07, 0x04, 0x00, 0x66, 0x03, 0xbf, 0x50, 0x00,
        0x03, 0xff, 0xd4, 0x00, 0x02, 0x02, 0x06, 0x02, 0x3b, 0x00, 0x00, 0x00,
@@ -370,8 +522,14 @@
        { kDocumentSave, sizeof(kDocumentSave), NULL },
        { kDrawRectangularSelection, sizeof(kDrawRectangularSelection), NULL },
        { kEditCopy, sizeof(kEditCopy), NULL },
+       { kEditCut, sizeof(kEditCut), NULL },
+       { kEditDelete, sizeof(kEditDelete), NULL },
        { kEditTrash, sizeof(kEditTrash), NULL },
+       { kMediaMovieLibraryR4, sizeof(kMediaMovieLibraryR4), NULL },
+       { kMediaPlaybackStartEnabled, sizeof(kMediaPlaybackStartEnabled), NULL 
},
        { kGoDown, sizeof(kGoDown), NULL },
+       { kGoNext, sizeof(kGoNext), NULL },
+       { kGoPrevious, sizeof(kGoPrevious), NULL },
        { kGoUp, sizeof(kGoUp), NULL },
        { kViewFullScreen, sizeof(kViewFullScreen), NULL },
        { kZoomFitBest, sizeof(kZoomFitBest), NULL },

Modified: haiku/trunk/src/apps/showimage/ToolBarIcons.h
===================================================================
--- haiku/trunk/src/apps/showimage/ToolBarIcons.h       2011-03-21 10:20:02 UTC 
(rev 41064)
+++ haiku/trunk/src/apps/showimage/ToolBarIcons.h       2011-03-21 10:59:10 UTC 
(rev 41065)
@@ -17,8 +17,14 @@
        kIconDocumentSave,
        kIconDrawRectangularSelection,
        kIconEditCopy,
+       kIconEditCut,
+       kIconEditDelete,
        kIconEditTrash,
+       kIconMediaMovieLibrary,
+       kIconMediaPlaybackStartEnabled,
        kIconGoDown,
+       kIconGoNext,
+       kIconGoPrevious,
        kIconGoUp,
        kIconViewFullScreen,
        kIconZoomFitBest,

Modified: haiku/trunk/src/apps/showimage/ToolBarView.cpp
===================================================================
--- haiku/trunk/src/apps/showimage/ToolBarView.cpp      2011-03-21 10:20:02 UTC 
(rev 41064)
+++ haiku/trunk/src/apps/showimage/ToolBarView.cpp      2011-03-21 10:59:10 UTC 
(rev 41065)
@@ -20,6 +20,8 @@
 
        GroupLayout()->AddItem(BSpaceLayoutItem::CreateGlue());
 
+       SetFlags(Flags() | B_FRAME_EVENTS | B_PULSE_NEEDED);
+
        MoveTo(frame.LeftTop());
        ResizeTo(frame.Width(), frame.Height());
        SetResizingMode(B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP);
@@ -32,6 +34,16 @@
 
 
 void
+ToolBarView::Hide()
+{
+       BView::Hide();
+       // TODO: This could be fixed in BView instead. Looking from the 
BIconButtons, they
+       // are not hidden, though, only their parent is...
+       _HideToolTips();
+}
+
+
+void
 ToolBarView::AddAction(uint32 command, BHandler* target, const BBitmap* icon,
        const char* toolTipText)
 {
@@ -75,6 +87,25 @@
 
 
 void
+ToolBarView::Pulse()
+{
+       // TODO: Perhaps this could/should be addressed in BView instead.
+       if (IsHidden())
+               _HideToolTips();
+}
+
+
+void
+ToolBarView::FrameResized(float width, float height)
+{
+       // TODO: There seems to be a bug in app_server which does not
+       // correctly trigger invalidation of views which are shown, when
+       // the resulting dirty area is somehow already part of an update region.
+       Invalidate();
+}
+
+
+void
 ToolBarView::_AddView(BView* view)
 {
        // Add before the space layout item at the end
@@ -102,3 +133,10 @@
 }
 
 
+void
+ToolBarView::_HideToolTips() const
+{
+       for (int32 i = 0; BView* view = ChildAt(i); i++)
+               view->HideToolTip();
+}
+

Modified: haiku/trunk/src/apps/showimage/ToolBarView.h
===================================================================
--- haiku/trunk/src/apps/showimage/ToolBarView.h        2011-03-21 10:20:02 UTC 
(rev 41064)
+++ haiku/trunk/src/apps/showimage/ToolBarView.h        2011-03-21 10:59:10 UTC 
(rev 41065)
@@ -20,6 +20,8 @@
                                                                
ToolBarView(BRect frame);
        virtual                                         ~ToolBarView();
 
+       virtual void                            Hide();
+
                        void                            AddAction(uint32 
command, BHandler* target,
                                                                        const 
BBitmap* icon,
                                                                        const 
char* toolTipText = NULL);
@@ -32,8 +34,12 @@
                        void                            SetActionPressed(uint32 
command, bool pressed);
 
 private:
+       virtual void                            Pulse();
+       virtual void                            FrameResized(float width, float 
height);
+
                        void                            _AddView(BView* view);
                        BIconButton*            _FindIconButton(uint32 command) 
const;
+                       void                            _HideToolTips() const;
 };
 
 #endif // TOOL_BAR_VIEW_H


Other related posts: