diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llviewermenufile.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewermenufile.cpp | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/linden/indra/newview/llviewermenufile.cpp b/linden/indra/newview/llviewermenufile.cpp index a4c55f7..ab77b53 100644 --- a/linden/indra/newview/llviewermenufile.cpp +++ b/linden/indra/newview/llviewermenufile.cpp | |||
@@ -46,7 +46,7 @@ | |||
46 | #include "llstatusbar.h" | 46 | #include "llstatusbar.h" |
47 | #include "llviewercontrol.h" // gSavedSettings | 47 | #include "llviewercontrol.h" // gSavedSettings |
48 | #include "llviewerimagelist.h" | 48 | #include "llviewerimagelist.h" |
49 | #include "llvieweruictrlfactory.h" | 49 | #include "lluictrlfactory.h" |
50 | #include "llviewermenu.h" // gMenuHolder | 50 | #include "llviewermenu.h" // gMenuHolder |
51 | #include "llviewerregion.h" | 51 | #include "llviewerregion.h" |
52 | #include "llviewerstats.h" | 52 | #include "llviewerstats.h" |
@@ -86,7 +86,7 @@ class LLFileEnableUpload : public view_listener_t | |||
86 | { | 86 | { |
87 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 87 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
88 | { | 88 | { |
89 | bool new_value = gStatusBar && gGlobalEconomy && (gStatusBar->getBalance() >= gGlobalEconomy->getPriceUpload()); | 89 | bool new_value = gStatusBar && LLGlobalEconomy::Singleton::getInstance() && (gStatusBar->getBalance() >= LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()); |
90 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 90 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
91 | return true; | 91 | return true; |
92 | } | 92 | } |
@@ -218,7 +218,7 @@ class LLFileUploadImage : public view_listener_t | |||
218 | if (filename) | 218 | if (filename) |
219 | { | 219 | { |
220 | LLFloaterImagePreview* floaterp = new LLFloaterImagePreview(filename); | 220 | LLFloaterImagePreview* floaterp = new LLFloaterImagePreview(filename); |
221 | gUICtrlFactory->buildFloater(floaterp, "floater_image_preview.xml"); | 221 | LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_image_preview.xml"); |
222 | } | 222 | } |
223 | return TRUE; | 223 | return TRUE; |
224 | } | 224 | } |
@@ -232,7 +232,7 @@ class LLFileUploadSound : public view_listener_t | |||
232 | if (filename) | 232 | if (filename) |
233 | { | 233 | { |
234 | LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename); | 234 | LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename); |
235 | gUICtrlFactory->buildFloater(floaterp, "floater_sound_preview.xml"); | 235 | LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_sound_preview.xml"); |
236 | } | 236 | } |
237 | return true; | 237 | return true; |
238 | } | 238 | } |
@@ -246,7 +246,7 @@ class LLFileUploadAnim : public view_listener_t | |||
246 | if (filename) | 246 | if (filename) |
247 | { | 247 | { |
248 | LLFloaterAnimPreview* floaterp = new LLFloaterAnimPreview(filename); | 248 | LLFloaterAnimPreview* floaterp = new LLFloaterAnimPreview(filename); |
249 | gUICtrlFactory->buildFloater(floaterp, "floater_animation_preview.xml"); | 249 | LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_animation_preview.xml"); |
250 | } | 250 | } |
251 | return true; | 251 | return true; |
252 | } | 252 | } |
@@ -414,15 +414,6 @@ class LLFileTakeSnapshotToDisk : public view_listener_t | |||
414 | } | 414 | } |
415 | }; | 415 | }; |
416 | 416 | ||
417 | class LLFileSaveMovie : public view_listener_t | ||
418 | { | ||
419 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
420 | { | ||
421 | LLViewerWindow::saveMovieNumbered(NULL); | ||
422 | return true; | ||
423 | } | ||
424 | }; | ||
425 | |||
426 | class LLFileSetWindowSize : public view_listener_t | 417 | class LLFileSetWindowSize : public view_listener_t |
427 | { | 418 | { |
428 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 419 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -450,7 +441,7 @@ void handle_upload(void* data) | |||
450 | if (filename) | 441 | if (filename) |
451 | { | 442 | { |
452 | LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename); | 443 | LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename); |
453 | gUICtrlFactory->buildFloater(floaterp, "floater_name_description.xml"); | 444 | LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_name_description.xml"); |
454 | } | 445 | } |
455 | } | 446 | } |
456 | 447 | ||
@@ -808,7 +799,7 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt | |||
808 | { | 799 | { |
809 | // Charge the user for the upload. | 800 | // Charge the user for the upload. |
810 | LLViewerRegion* region = gAgent.getRegion(); | 801 | LLViewerRegion* region = gAgent.getRegion(); |
811 | S32 upload_cost = gGlobalEconomy->getPriceUpload(); | 802 | S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); |
812 | 803 | ||
813 | if(!(can_afford_transaction(upload_cost))) | 804 | if(!(can_afford_transaction(upload_cost))) |
814 | { | 805 | { |
@@ -920,17 +911,17 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty | |||
920 | 911 | ||
921 | if( LLAssetType::AT_SOUND == asset_type ) | 912 | if( LLAssetType::AT_SOUND == asset_type ) |
922 | { | 913 | { |
923 | gViewerStats->incStat(LLViewerStats::ST_UPLOAD_SOUND_COUNT ); | 914 | LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_SOUND_COUNT ); |
924 | } | 915 | } |
925 | else | 916 | else |
926 | if( LLAssetType::AT_TEXTURE == asset_type ) | 917 | if( LLAssetType::AT_TEXTURE == asset_type ) |
927 | { | 918 | { |
928 | gViewerStats->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT ); | 919 | LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT ); |
929 | } | 920 | } |
930 | else | 921 | else |
931 | if( LLAssetType::AT_ANIMATION == asset_type) | 922 | if( LLAssetType::AT_ANIMATION == asset_type) |
932 | { | 923 | { |
933 | gViewerStats->incStat(LLViewerStats::ST_UPLOAD_ANIM_COUNT ); | 924 | LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_ANIM_COUNT ); |
934 | } | 925 | } |
935 | 926 | ||
936 | if(LLInventoryType::IT_NONE == inv_type) | 927 | if(LLInventoryType::IT_NONE == inv_type) |
@@ -985,7 +976,7 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty | |||
985 | LLAssetType::AT_TEXTURE == asset_type || | 976 | LLAssetType::AT_TEXTURE == asset_type || |
986 | LLAssetType::AT_ANIMATION == asset_type) | 977 | LLAssetType::AT_ANIMATION == asset_type) |
987 | { | 978 | { |
988 | S32 upload_cost = gGlobalEconomy->getPriceUpload(); | 979 | S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); |
989 | S32 balance = gStatusBar->getBalance(); | 980 | S32 balance = gStatusBar->getBalance(); |
990 | if (balance < upload_cost) | 981 | if (balance < upload_cost) |
991 | { | 982 | { |
@@ -1033,7 +1024,6 @@ void init_menu_file() | |||
1033 | (new LLFileSaveTexture())->registerListener(gMenuHolder, "File.SaveTexture"); | 1024 | (new LLFileSaveTexture())->registerListener(gMenuHolder, "File.SaveTexture"); |
1034 | (new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot"); | 1025 | (new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot"); |
1035 | (new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk"); | 1026 | (new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk"); |
1036 | (new LLFileSaveMovie())->registerListener(gMenuHolder, "File.SaveMovie"); | ||
1037 | (new LLFileSetWindowSize())->registerListener(gMenuHolder, "File.SetWindowSize"); | 1027 | (new LLFileSetWindowSize())->registerListener(gMenuHolder, "File.SetWindowSize"); |
1038 | (new LLFileQuit())->registerListener(gMenuHolder, "File.Quit"); | 1028 | (new LLFileQuit())->registerListener(gMenuHolder, "File.Quit"); |
1039 | 1029 | ||