Changeset 24049
- Timestamp:
- 02/21/08 15:10:41 (9 months ago)
- Location:
- haiku/trunk/src/apps/resedit
- Files:
-
- 4 modified
-
App.cpp (modified) (4 diffs)
-
Jamfile (modified) (1 diff)
-
ResWindow.cpp (modified) (1 diff)
-
ResWindow.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
haiku/trunk/src/apps/resedit/App.cpp
r23943 r24049 17 17 return 0; 18 18 } 19 19 20 20 21 App::App(void) … … 37 38 App::ReadyToRun(void) 38 39 { 39 /* 40 if (fWindowCount < 1) { 41 ResWindow *win = new ResWindow(BRect(50,100,600,400)); 42 win->Show(); 43 } 44 */ 45 if (fWindowCount < 1) { 46 BEntry entry("/boot/develop/projects/ResEdit/CapitalBe.rsrc"); 47 entry_ref ref; 48 entry.GetRef(&ref); 49 ResWindow *win = new ResWindow(BRect(50,100,600,400),&ref); 50 win->Show(); 51 } 40 if (fWindowCount < 1) 41 new ResWindow(BRect(50, 100, 600, 400)); 52 42 } 53 43 … … 83 73 App::ArgvReceived(int32 argc, char** argv) 84 74 { 85 int i; 86 for (i = 1; i < argc; i++) { 75 for (int32 i = 1; i < argc; i++) { 87 76 BEntry entry(argv[i]); 88 77 entry_ref ref; 89 78 if (entry.GetRef(&ref) < B_OK) 90 79 continue; 91 ResWindow *win = new ResWindow(BRect(50,100,600,400),&ref); 92 win->Show(); 80 new ResWindow(BRect(50, 100, 600, 400), &ref); 93 81 } 94 82 } 83 95 84 96 85 void … … 98 87 { 99 88 entry_ref ref; 100 int32 i=0; 101 while (msg->FindRef("refs",i,&ref) == B_OK) { 102 ResWindow *win = new ResWindow(BRect(50,100,600,400),&ref); 103 win->Show(); 104 i++; 105 } 89 int32 i = 0; 90 while (msg->FindRef("refs", i++, &ref) == B_OK) 91 new ResWindow(BRect(50, 100, 600, 400), &ref); 106 92 } 107 93 -
haiku/trunk/src/apps/resedit/Jamfile
r21802 r24049 27 27 ResView.cpp 28 28 ResWindow.cpp 29 : be tracker translation 29 : be tracker translation libcolumnlistview.a 30 30 ; -
haiku/trunk/src/apps/resedit/ResWindow.cpp
r19734 r24049 15 15 be_app->PostMessage(M_REGISTER_WINDOW); 16 16 17 ResView *child = new ResView(Bounds(), "resview", B_FOLLOW_ALL, B_WILL_DRAW, ref); 17 ResView *child = new ResView(Bounds(), "resview", B_FOLLOW_ALL, 18 B_WILL_DRAW, ref); 18 19 AddChild(child); 19 20 20 21 SetTitle(child->Filename()); 22 23 Show(); 21 24 } 22 25 -
haiku/trunk/src/apps/resedit/ResWindow.h
r19734 r24049 1 1 /* 2 * Copyright (c) 2005-200 6, Haiku, Inc.2 * Copyright (c) 2005-2008, Haiku, Inc. 3 3 * Distributed under the terms of the MIT license. 4 4 * … … 11 11 #include <Window.h> 12 12 13 class ResWindow : public BWindow 14 { 13 14 struct entry_ref; 15 16 class ResWindow : public BWindow { 15 17 public: 16 ResWindow(const BRect &rect, 17 const entry_ref *ref=NULL); 18 ~ResWindow(void); 19 bool QuitRequested(void); 18 ResWindow(const BRect& rect, 19 const entry_ref* ref = NULL); 20 virtual ~ResWindow(); 21 22 virtual bool QuitRequested(); 20 23 }; 21 24 22 #endif 25 #endif // RESWIN_H
