From 993bca391adf825dcf139d516c17dfdca0832bc8 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 28 Aug 2008 16:44:01 -0500 Subject: Updated README.txt to have info about Imprudence (instead of the SL source archive). --- README.txt | 86 ++++++++++++++++++++++++++------------------------------------ 1 file changed, 36 insertions(+), 50 deletions(-) diff --git a/README.txt b/README.txt index d7f6c75..be85b03 100644 --- a/README.txt +++ b/README.txt @@ -1,55 +1,41 @@ - - ABOUT THE SECOND LIFE VIEWER SOURCE ARCHIVE PROJECT - - This project is a community-maintained archive of Second Life - viewer source code releases. For more information about the - project, see: - - http://github.com/jacek/sl-viewer-source-archive/ - - - PURPOSE - - The purpose of the archive is to provide a base for viewer - forks or patch development and a convenient method for viewing - and merging the diffs between releases via the Git version - control system. - - - CONTENTS - - The archive contains the full source code for every official, - versioned release and release candidate of the Second Life - viewer since January 2007, when the viewer code was first - released. - - The archive does not contain the source for betas, "First - Look" viewers, dated snapshots, or development branches, - because it is infeasible to deduce their ancestral - relationship to other versions. - - The archive also does not contain the viewer artwork or - required libraries, for space and licensing reasons. - - As of this writing, these other resources (as well as all - code contained in the archive) are available for download - from Linden Research, Inc.: - - http://wiki.secondlife.com/wiki/Source_downloads - - + + ABOUT IMPRUDENCE + + Imprudence is an open source metaverse viewer project based on + the Second Life Viewer source. + + The goal of Imprudence is to greatly improve the usability of + the Viewer through community involvement, thoughtful design, + modern development methods, and a pro-change atmosphere. + + For more information about the rationale, goals, and methods + of the Imprudence project, please see MANIFESTO.txt. + + If you would like to get involved with the Imprudence project, + please see CONTRIBUTE.txt. There are many ways you can help, + no matter your skills or the amount of time you can dedicate. + + + Imprudence is online at ImprudenceViewer.org + + + The latest source code for the Imprudence Viewer is always + available at: + + http://github.com/jacek/imprudence/tree/master + + LICENSE - - All code in the archive has been released by Linden Research - Inc. under the terms of the GNU General Public License version - 2.0 (plus a special exception). See linden/LICENSE-source.txt - for details. - - + + All code is licensed under the terms of the GNU General Public + License version 2.0 (plus a special exception). + + See linden/LICENSE-source.txt for details. + + DISCLAIMERS AND NOTICES - - The project and archive are in no way affiliated with - Linden Research, Inc. Second Life is a registered trademark of Linden Research, Inc. + + Imprudence is in no way affiliated with Linden Research, Inc. -- cgit v1.1 From 6f0d1dc6b922f1b103a8933a03c4ed5e10b290ef Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 28 Aug 2008 16:49:31 -0500 Subject: Added MANIFESTO.txt. --- MANIFESTO.txt | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 MANIFESTO.txt diff --git a/MANIFESTO.txt b/MANIFESTO.txt new file mode 100644 index 0000000..2a6fdb4 --- /dev/null +++ b/MANIFESTO.txt @@ -0,0 +1,178 @@ + + + THE IMPRUDENCE MANIFESTO + + + THE PROBLEM + + The Second Life Viewer suffers from a stifling atmosphere of + non-change. This atmosphere emanates from Linden Lab, whose + attitudes and policies discourage all but the smallest and most + superficial improvements. This is the result of the nature of + Linden Lab as a corporation; in particular: + + + * A lack of resources to invest in making significant + improvements to the Viewer. Linden Lab is stuck treading water; + they don't have the manpower to spend on making major + improvements to the Viewer. + + * A burdensome Quality Assurance procedure that punishes any sort + of change. The larger the change, the more it's punished. The + simple fact that all changes have to pass through such an + arduous process discourages anyone from attempting any major + endeavor. + + * A vast throng of paying customers who want the Viewer to remain + constant and familiar. If the Viewer changes, they are forced + to spend effort relearning it. The most vocal and abusive users + even meet change with sneers and insults. + + + Combined, these render Linden Lab ineffectual at dealing with the + fundamental usability problems that plague the Viewer: + + + * A cluttered interface that frustrates and confuses both new and + long-time users. It is difficult to learn, frustrating to use, + and obscures the thing that users actually care about: the + world. + + * Crude tools that force users into awkward and inefficient + workflows. The tools bear little relation to the way today's + users want to use them. Whether because these tools are + outdated relics of the past, or just half-baked non-solutions, + very few rise above even the "somewhat usable" mark. + + * Stability and performance problems that make the Viewer + unreliable for any real use. Viewer crashes are an everyday + occurance for many users, disrupting their activities, + destroying their unsaved work, and afflicting their lives with + undue stress and frustration. + + + We don't deny that Linden Lab has made some progress in these areas + over time. But such progress is slow and often superficial, because + Linden Lab cannot afford to make significant improvement. + Encumbered by their own nature, they are forced onto an untenable + road of caution, hesitation, and prudence. This is a path that can + lead only to stagnation. + + These fundamental usability problems will not be solved by Linden + Lab; their atmosphere precludes it. Even the contribution of source + code patches by open sourcers can only address one factor, Linden + Lab's lack of resources. Patch contributors are still affected by + the burdensome QA process and the community's anti-change attitude + just as much as Linden Lab developers are. Any endeavor which + relies on Linden Lab to approve and integrate changes will face the + same bottlenecks. + + + SOLUTION + + As I have described, Linden Lab's approach is characterized by + three factors that put a damper on significant improvement or + innovation: + + * Cautious, gradual changes over a long period of time. + + * Dependence on an overloaded central QA department. + + * Yielding to pressure from large numbers of users to reject + change. + + It stands to reason that a project which removed or reduced these + factors would be more free to make radical, fundamental changes to + the Viewer. Such a project would exhibit the opposite + characteristics: + + * More significant changes over a shorter period of time. + + * A scalable, hierarchical QA process to screen and approve + changes. + + * Less need to satisfy users who demand non-change. + + This is precisely the sort of project we propose to undertake. + Because our approach is incautious, and perhaps even reckless, we + have dubbed the project Imprudence. Goals + + The primary goal of Imprudence is simple: to greatly improve the + usability of the Viewer. In particular, there are 3 aspects of + usability that we intend to address: + + * Approachability. Improving comfort and ease of use, especially + for new or non-technical users. + + * Efficiency. Improving speed and ease of common tasks and + workflows. + + * Satisfaction. Improving the emotional effect of the software on + the user. + + This is not to minimize other aspects of usability, such as + reliability, accessibility, or internationalization/localization. + We recognize their importance, but lack the expertise to properly + address them. We welcome people with such expertise to join the + project and help. + + + METHOD + + In order to achieve these goals, we propose to combine the open and + distributed nature of open source development with the dedication + to quality design usually associated with commercial products. The + main highlights of our approach are: + + * Open, public project management. Our plans, goals, and roadmaps + are laid out on the table. Our code is published in plain view + as it's written. There won't be any sudden bombshells to + disrupt your plans. + + * A pro-change atmosphere. Change is natural and healthy, and it + is the only way to make improvement. We encourage experimental + change, coupled with evaluation to filter out the negative. + Users wanting a static, unchanging viewer should look + elsewhere. + + * Designers, programmers, and users working with each other. Good + software requires more than just a team of programmers. It + needs designers listening to users, programmers working with + designers, and users testing and providing feedback. Every role + is necessary and appreciated. + + * Commmunity involvement. There are many ways to be involved, + whatever your interests, skill set, or level of commitment. + Contributions are welcomed, not looked upon as burdens. + + * A modern, distributed development model. The Git version + control system makes it easy for programmers to work freely + without stepping on each others' toes. Easy and powerful + branching and merging tools mean that releases will never be + littered with untested, half-baked code. + + * A scalable, hierarchical QA model. New contributions work their + way up a hierarchy of approval, which will start small and grow + naturally as load increases. By the time a contribution reaches + the top of the hierarchy, it has been tested, polished, and + approved by multiple people, and is ready to be integrated. + + + A CALL FOR VOLUNTEERS + + Imprudence is an open-source, volunteer effort; it depends on + people like you getting involved! There are many ways to + contribute, and most of them don't require any programming skills + or special knowledge -- just some free time and the will to be part + of something great. + + If you'd like to contribute in any way, have a look at + CONTRIBUTE.txt. + + You have nothing to lose, and a better SL experience to gain! + + + SIGNATORIES + + Jacek Antonelli (August 27, 2008) + McCabe Maxsted (August 27, 2008) -- cgit v1.1 From ec8b17013071896e7228c7d0032d3bfc44697c3a Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 28 Aug 2008 16:51:45 -0500 Subject: Added CONTRIBUTE.txt. --- CONTRIBUTE.txt | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 CONTRIBUTE.txt diff --git a/CONTRIBUTE.txt b/CONTRIBUTE.txt new file mode 100644 index 0000000..ece4c73 --- /dev/null +++ b/CONTRIBUTE.txt @@ -0,0 +1,104 @@ + + + HOW YOU CAN CONTRIBUTE + + + Imprudence isn't just a project for programmers. No matter your + skills (or lack thereof) or how much time you can commit, there's + a way for you to be a part of it. + + + EVERYBODY AND THEIR GRANDMAS + + Here are some good ways anybody can help out: + + * Let us know what you think needs to be improved about the SL + Viewer. + + * Participate in discussions on the forums or mailing list. + (Visit ImprudenceViewer.org for links to both of those.) + + * Try out the Imprudence Viewer (when it's released) and give + feedback about it. + + * Watch a friend, family member, or co-worker to try SL for the + first time, and take notes about the things they find difficult + or confusing. + + * Blog about the latest Imprudence news and developments (either + on the ImprudenceViewer.org blog or your own). + + * Help organize and coordinate other volunteers to keep things + running smoothly. + + * Tell a friend and get them involved too! + + + ARTISTS, DESIGNERS, AND UI FREAKS + + If you happen to have some graphics skill or an interest in User + Interface design, here are some things you could do: + + * Work with users to turn their ideas into something people can + look at. + + * Make a sketch or Flash mock-up of how some part of the UI + should behave, look, or be organized. + + * Offer suggestions and constructive criticism about other + people's designs. + + * Create or improve a color scheme or skin for the Viewer. + + * Paint some graphics or icons for a UI-in-progress. + + * Hook up with a programmer and turn your design into a real, + working interface! + + + CODE MONKEYS AND TEKKIE-WIKIS + + Of course, there's always plenty for programmers and other + tech-savvy people to do: + + * Compile a Viewer branch for other people to download and test. + + * Try out a patch to make sure it applies cleanly, and make a Git + branch so others can easily merge the changes. + + * Clean up or add comments/documentation for part of the source + code. + + * Fix a bug or optimize a slow piece of code. + + * Work with a designer to bring a UI concept to life! + + + OTHER REALLY COOL PEOPLE + + We're also looking for people who can help with: + + * Accessibility. We'd love to make it easier for people with + disabilities to have a functional and satisfying SL experience, + but we need people with the knowledge and experience to help us + identify the biggest hurdles and find solutions. + + * Localization & Translation. Many of the non-English UI + translations are awkward or wrong, but only someone who knows + the language can make them better. If you are fluent in both + English and another tongue, please help us add or improve the + translation for your language. + + + GOT ANOTHER IDEA? + + There are many more ways to get involved than we could list here; + and there are surely some good ones that you can think of, but that + we hadn't! Don't hesitate to contact us if you'd like to help + out, even if it's not listed here! + + + CONTACT INFO + + If you’d like to contribute to Imprudence in any way, send an email + to jacek.antonelli at gmail or an IM to Jacek Antonelli in-world. -- cgit v1.1 From f37093d4dda55fd77bc9228c9fb359d46d4f1715 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Tue, 16 Sep 2008 00:01:02 -0500 Subject: Created ChangeLog.txt. --- ChangeLog.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ChangeLog.txt diff --git a/ChangeLog.txt b/ChangeLog.txt new file mode 100644 index 0000000..e69de29 -- cgit v1.1 From f39e9904b27422b14256289d508d014d82c99531 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 7 Sep 2008 16:27:00 -0500 Subject: Applied VWR-8056: Clean up menu_viewer.xml (main menu XUI) --- ChangeLog.txt | 4 + .../skins/default/xui/en-us/menu_viewer.xml | 759 +++++++++------------ 2 files changed, 311 insertions(+), 452 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index e69de29..c68482d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -0,0 +1,4 @@ +2008-09-07 Jacek Antonelli + + * linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml: + VWR-8056: Clean up menu_viewer.xml (main menu XUI). diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 054f867..acdb963 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1,856 +1,711 @@ - - - - + + + + + + + + - + - + - + - - + + - + - - + + - - + + - + - - + + - - + + + + + + + - + - - + + - + - + - + - - + + - - + + - + - - + + - - - - - + + + + + - + - + - + - + - + - + - + - + - + - - + + - + - + - - + + - + - - + + - - - + + + + + + + - + - + - + - + - - + + - + - + - + - + - + - - + + - + - + - + - - + + - + - + - - - + + + - - + + - + - + - + - - + + - + - + - + - + - - + + - + - - + + - - - + + + - + - + - + - + - - + + - + - + - - + + - + - - + + + + + + + - + - + - - + + - + - - + + - - + + - + - + - - + + - + - + - - + + - + - + - + - - - + + + - + - + - + - + - - + + - - - + + + + + + + + - + - + - + - + - - + + - + - + - + - + - + - - + + - + - + - + - - + + - + - + - - + + - + - + - + - + - + - - + + - + - + - + - + - - + + + + + + + - + - - + + - - + + - + - - + + - + - + - - - + + + - + - - + + - + - + - - + + - - + + - - + + + + -- cgit v1.1 From 8048f6322d887f5aa636ea6a7890eec2186bbc9b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 7 Sep 2008 18:00:32 -0500 Subject: VWR-7827: Allow Dimple/Profile Cut for boxes and box-based prims in the UI. --- ChangeLog.txt | 7 ++++++ linden/indra/newview/llpanelobject.cpp | 26 +++++++++++++++++++++- .../skins/default/xui/en-us/floater_tools.xml | 6 +++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index e69de29..dfd6354 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -0,0 +1,7 @@ +2008-09-07 McCabe Maxsted + + * linden/indra/newview/llpanelobject.cpp: + VWR-7827: Allow Dimple/Profile Cut for boxes and box-based prims + in the UI. + * linden/indra/newview/skins/default/xui/en-us/floater_tools.xml: + Ditto. diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index 7024691..9732dac 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -827,7 +827,7 @@ void LLPanelObject::getState( ) BOOL top_shear_x_visible = TRUE; BOOL top_shear_y_visible = TRUE; BOOL twist_visible = TRUE; - BOOL advanced_cut_visible = FALSE; + BOOL advanced_cut_visible = TRUE; BOOL taper_visible = FALSE; BOOL skew_visible = FALSE; BOOL radius_offset_visible = FALSE; @@ -838,6 +838,7 @@ void LLPanelObject::getState( ) F32 twist_inc = OBJECT_TWIST_LINEAR_INC; BOOL advanced_is_dimple = FALSE; + BOOL advanced_is_slice = FALSE; BOOL size_is_hole = FALSE; // Tune based on overall volume type @@ -851,6 +852,7 @@ void LLPanelObject::getState( ) //twist_visible = FALSE; advanced_cut_visible = TRUE; advanced_is_dimple = TRUE; + advanced_is_slice = FALSE; twist_min = OBJECT_TWIST_MIN; twist_max = OBJECT_TWIST_MAX; twist_inc = OBJECT_TWIST_INC; @@ -864,6 +866,7 @@ void LLPanelObject::getState( ) size_is_hole = TRUE; skew_visible = TRUE; advanced_cut_visible = TRUE; + advanced_is_slice = FALSE; taper_visible = TRUE; radius_offset_visible = TRUE; revolutions_visible = TRUE; @@ -891,8 +894,20 @@ void LLPanelObject::getState( ) break; case MI_BOX: + advanced_cut_visible = TRUE; + advanced_is_slice = TRUE; + break; + case MI_CYLINDER: + advanced_cut_visible = TRUE; + advanced_is_slice = TRUE; + break; + case MI_PRISM: + advanced_cut_visible = TRUE; + advanced_is_slice = TRUE; + break; + default: break; } @@ -984,6 +999,8 @@ void LLPanelObject::getState( ) childSetVisible("advanced_cut", FALSE); childSetVisible("advanced_dimple", FALSE); + childSetVisible("advanced_slice", FALSE); + if (advanced_cut_visible) { if (advanced_is_dimple) @@ -991,6 +1008,12 @@ void LLPanelObject::getState( ) childSetVisible("advanced_dimple", TRUE); childSetEnabled("advanced_dimple", enabled); } + + else if (advanced_is_slice) + { + childSetVisible("advanced_slice", TRUE); + childSetEnabled("advanced_slice", enabled); + } else { childSetVisible("advanced_cut", TRUE); @@ -1823,6 +1846,7 @@ void LLPanelObject::clearCtrls() childSetEnabled("scale_taper", FALSE); childSetEnabled( "advanced_cut", FALSE ); childSetEnabled( "advanced_dimple", FALSE ); + childSetVisible("advanced_slice", FALSE); } // diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index db176b3..27691c7 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -800,6 +800,12 @@ mouse_opaque="true" name="advanced_dimple" v_pad="0" width="141"> Dimple Begin and End + + Slice Begin and End + + + * linden/indra/SConstruct: + VWR-2865: New SConstruct flag to (not) make tarball after compiling. + For convenience until we switch to CMake. + * linden/indra/newview/viewer_manifest.py: + Ditto. diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index 9353317..5ca22e6 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct @@ -100,6 +100,7 @@ opts.AddOptions( BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), BoolOption('RUNTESTS', 'Run tests at end of compilation', True), + BoolOption('MAKE_PACKAGE', 'Create a package (tarball) after compiling "releasefordownload".', True), BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line ) optenv = Environment(options = opts) @@ -120,6 +121,7 @@ runtests = optenv['RUNTESTS'] opensource = standalone or optenv['OPENSOURCE'] enable_fmod = not opensource and optenv['FMOD'] elfio = optenv['ELFIO'] +make_package = optenv['MAKE_PACKAGE'] targets = [ target_param ] @@ -717,6 +719,8 @@ for build_target in targets: 'arch':arch} if login_channel: cmd += ' --login_channel=\'Second Life %s\'' % (login_channel) + if not make_package: + cmd += ' --actions="copy"' env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd) Depends('newview/' + package_name, output_bin + '-stripped') Depends('newview/' + package_name, output_crashlogger_bin + '-stripped') diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 27c12dd..ae25745 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -483,11 +483,14 @@ class LinuxManifest(ViewerManifest): find %(dst)s -type f -perm 0400 | xargs chmod 0444; true""" % {'dst':self.get_dst_prefix() }) - # temporarily move directory tree so that it has the right name in the tarfile - self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) - # --numeric-owner hides the username of the builder for security etc. - self.run_command('tar -C %(dir)s --numeric-owner -cjf %(inst_path)s.tar.bz2 %(inst_name)s' % {'dir':self.get_src_prefix(), 'inst_name': installer_name, 'inst_path':self.src_path_of(installer_name)}) - self.run_command("mv %(inst)s %(dst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) + if("package" in self.args['actions'] or + "unpacked" in self.args['actions']): + # temporarily move directory tree so that it has the right name in the tarfile + self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) + # --numeric-owner hides the username of the builder for security etc. + self.run_command('tar -C %(dir)s --numeric-owner -cjf %(inst_path)s.tar.bz2 %(inst_name)s' % {'dir':self.get_src_prefix(), 'inst_name': installer_name, 'inst_path':self.src_path_of(installer_name)}) + self.run_command("mv %(inst)s %(dst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) + class Linux_i686Manifest(LinuxManifest): def construct(self): -- cgit v1.1 From 1192eebda081091433b4f7b5b7ea0861e9bba322 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 19 Sep 2008 18:51:27 -0500 Subject: New optional SConstruct flag to specify an exact path to build directory: BUILD_DIR. For convenience until we switch to CMake. --- ChangeLog.txt | 4 ++++ linden/indra/SConstruct | 20 ++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a9b9ec6..31bfe4a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,10 @@ 2008-09-19 Jacek Antonelli * linden/indra/SConstruct: + New optional SConstruct flag to specify an exact path to build + directory: BUILD_DIR. For convenience until we switch to CMake. + + * linden/indra/SConstruct: VWR-2865: New SConstruct flag to (not) make tarball after compiling. For convenience until we switch to CMake. * linden/indra/newview/viewer_manifest.py: diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index 5ca22e6..0f9f237 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct @@ -101,6 +101,7 @@ opts.AddOptions( BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), BoolOption('RUNTESTS', 'Run tests at end of compilation', True), BoolOption('MAKE_PACKAGE', 'Create a package (tarball) after compiling "releasefordownload".', True), + PathOption('BUILD_DIR', 'Specify full path to build directory. If omitted, use default build directory.', '', PathOption.PathAccept), BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line ) optenv = Environment(options = opts) @@ -207,12 +208,19 @@ for build_target in targets: system_lib_dir += '/lib_release' lib_dir = './lib_release_' + build_target + '/' + system_str - try: - build_dir_prefix = os.environ['TEMP_BUILD_DIR'] - except: - build_dir_prefix = '/tmp/' + os.environ['USER'] - - build_dir = build_dir_prefix + os.getcwd() + '/' + system_str + '-' + build_target + '-' + buildtype + + build_dir = optenv['BUILD_DIR'] + if build_dir != '': + # Validate directory, and create if needed. + # This is a hack to get around SCons' inflexibility. + PathOption.PathIsDirCreate("BUILD_DIR", build_dir, optenv) + else: + try: + build_dir_prefix = os.environ['TEMP_BUILD_DIR'] + except: + build_dir_prefix = '/tmp/' + os.environ['USER'] + os.getcwd() + '/' + + build_dir = build_dir_prefix + system_str + '-' + build_target + '-' + buildtype ### Base include directories ### -- cgit v1.1 From 9118b54b611e5c6d0e3b64dfaa7cb7bec4415df6 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 19 Sep 2008 19:17:18 -0500 Subject: VWR-1363: Add "Return Object" to the Tools menu. --- ChangeLog.txt | 5 +++++ linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 31bfe4a..007dabc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,8 @@ +2008-09-19 McCabe Maxsted + + * linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml: + VWR-1363: Add "Return Object" to the Tools menu. + 2008-09-19 Jacek Antonelli * linden/indra/SConstruct: diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 054f867..92521bc 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -713,6 +713,12 @@ + + + + + -- cgit v1.1 From 770eff3ccce41c08109d6fbd2484fc44d4b6c122 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 19 Sep 2008 19:29:40 -0500 Subject: VWR-7877: Change the default cut increment from 0.05 to 0.025. --- ChangeLog.txt | 5 +++++ linden/indra/newview/skins/default/xui/en-us/floater_tools.xml | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 31bfe4a..bb7cf59 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,8 @@ +2008-09-19 McCabe Maxsted + + * linden/indra/newview/skins/default/xui/en-us/floater_tools.xml: + VWR-7877: Change the default cut increment from 0.05 to 0.025. + 2008-09-19 Jacek Antonelli * linden/indra/SConstruct: diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index db176b3..b42101d 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -698,10 +698,10 @@ Path Cut Begin and End + + * linden/indra/newview/skins/default/xui/en-us/panel_groups.xml: + VWR-8024: simplify group invites: invite to group from groups list. + 2008-09-19 Jacek Antonelli * linden/indra/SConstruct: diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp index f6e226d..01624c6 100644 --- a/linden/indra/newview/llfloatergroups.cpp +++ b/linden/indra/newview/llfloatergroups.cpp @@ -39,6 +39,7 @@ #include "llviewerprecompiledheaders.h" #include "llfloatergroups.h" +#include "llfloatergroupinvite.h" #include "message.h" #include "roles_constants.h" @@ -223,6 +224,8 @@ BOOL LLPanelGroups::postBuild() childSetAction("Create", onBtnCreate, this); childSetAction("Search...", onBtnSearch, this); + + childSetAction("Invite...", onBtnInvite, this); setDefaultBtn("IM"); @@ -271,6 +274,14 @@ void LLPanelGroups::enableButtons() { childDisable("Create"); } + if (group_id.notNull() && gAgent.hasPowerInGroup(group_id, GP_MEMBER_INVITE)) + { + LLPanelGroups::childEnable("Invite..."); + } + else + { + LLPanelGroups::childDisable("Invite..."); + } } @@ -280,6 +291,12 @@ void LLPanelGroups::onBtnCreate(void* userdata) if(self) self->create(); } +void LLPanelGroups::onBtnInvite(void* userdata) +{ + LLPanelGroups* self = (LLPanelGroups*)userdata; + if(self) self->invite(); +} + void LLPanelGroups::onBtnActivate(void* userdata) { LLPanelGroups* self = (LLPanelGroups*)userdata; @@ -401,6 +418,21 @@ void LLPanelGroups::search() LLFloaterDirectory::showGroups(); } +void LLPanelGroups::invite() +{ + LLCtrlListInterface *group_list = childGetListInterface("group list"); + LLUUID group_id; + + //if (group_list && (group_id = group_list->getCurrentID()).notNull()) + + if (group_list) + { + group_id = group_list->getCurrentID(); + } + + LLFloaterGroupInvite::showForGroup(group_id); +} + // static void LLPanelGroups::callbackLeaveGroup(S32 option, void* userdata) { diff --git a/linden/indra/newview/llfloatergroups.h b/linden/indra/newview/llfloatergroups.h index 5eda8ba..ad3ecac 100644 --- a/linden/indra/newview/llfloatergroups.h +++ b/linden/indra/newview/llfloatergroups.h @@ -110,6 +110,7 @@ protected: static void onBtnLeave(void* userdata); static void onBtnSearch(void* userdata); static void onBtnVote(void* userdata); + static void onBtnInvite(void* userdata); static void onDoubleClickGroup(void* userdata); void create(); @@ -119,6 +120,7 @@ protected: void leave(); void search(); void callVote(); + void invite(); static void callbackLeaveGroup(S32 option, void* userdata); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_groups.xml b/linden/indra/newview/skins/default/xui/en-us/panel_groups.xml index 416f58b..02d5504 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_groups.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_groups.xml @@ -34,4 +34,6 @@ label="Create..." name="Create" width="80" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1 From 3282c5ff73176cb9fe8a8be6a372790516237448 Mon Sep 17 00:00:00 2001 From: Michelle2 Zenovka Date: Sat, 20 Sep 2008 13:16:14 -0500 Subject: VWR-5082: 'Set permissions on selected task inventory' feature. --- ChangeLog.txt | 13 + linden/indra/newview/llfloaterbulkpermission.cpp | 595 +++++++++++++++++++++ linden/indra/newview/llfloaterbulkpermission.h | 143 +++++ linden/indra/newview/llviewermenu.cpp | 13 + .../skins/default/xui/en-us/floater_bulk_perms.xml | 127 +++++ .../skins/default/xui/en-us/menu_viewer.xml | 5 + 6 files changed, 896 insertions(+) create mode 100644 linden/indra/newview/llfloaterbulkpermission.cpp create mode 100644 linden/indra/newview/llfloaterbulkpermission.h create mode 100644 linden/indra/newview/skins/default/xui/en-us/floater_bulk_perms.xml diff --git a/ChangeLog.txt b/ChangeLog.txt index 31bfe4a..a0d5bfc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,16 @@ +2008-09-20 Michelle2 Zenovka + + * linden/indra/newview/llfloaterbulkpermission.h: + VWR-5082: 'Set permissions on selected task inventory' feature. + * linden/indra/newview/llfloaterbulkpermission.cpp: + Ditto. + * linden/indra/newview/llviewermenu.cpp: + Ditto. + * linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml: + Ditto. + * linden/indra/newview/skins/default/xui/en-us/floater_bulk_perms.xml: + Ditto. + 2008-09-19 Jacek Antonelli * linden/indra/SConstruct: diff --git a/linden/indra/newview/llfloaterbulkpermission.cpp b/linden/indra/newview/llfloaterbulkpermission.cpp new file mode 100644 index 0000000..29d94bc --- /dev/null +++ b/linden/indra/newview/llfloaterbulkpermission.cpp @@ -0,0 +1,595 @@ +/** + * @file llfloaterbulkpermissions.cpp + * @brief A floater which allows task inventory item's properties to be changed on mass. + * + * $LicenseInfo:firstyear=2008&license=viewergpl$ + * + * Copyright (c) 2008, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +/* Allow multiple task inventory properties to be set in one go, by Michelle2 Zenovka */ + +/* TODO + + * Add in the option to select objects or task inventory +s + +It would be nice to set the permissions on groups of prims as well as task inventory + +*/ + + +#include "llviewerprecompiledheaders.h" +#include "llfloaterbulkpermission.h" +#include "llagent.h" +#include "llchat.h" +#include "llviewerwindow.h" +#include "llviewerobject.h" +#include "llviewerobjectlist.h" +#include "llviewerregion.h" +#include "lscript_rt_interface.h" +#include "llviewercontrol.h" +#include "llviewerobject.h" +#include "llviewerregion.h" +#include "llresmgr.h" +#include "llbutton.h" +#include "lldir.h" +#include "llfloaterchat.h" +#include "llviewerstats.h" +#include "lluictrlfactory.h" +#include "llselectmgr.h" +#include "llinventory.h" + + +#include +#include +#include "llcachename.h" +#include "lldbstrings.h" +#include "llinventory.h" + +#include "llagent.h" +#include "llbutton.h" +#include "llcheckboxctrl.h" +#include "llfloateravatarinfo.h" +#include "llfloatergroupinfo.h" +#include "llinventorymodel.h" +#include "lllineeditor.h" +#include "llradiogroup.h" +#include "llresmgr.h" +#include "roles_constants.h" +#include "llselectmgr.h" +#include "lltextbox.h" +#include "lluiconstants.h" +#include "llviewerinventory.h" +#include "llviewerobjectlist.h" +#include "llviewerregion.h" +#include "llviewercontrol.h" + +#include "lluictrlfactory.h" + + +const char* BULKPERM_QUEUE_TITLE = "Update Progress"; +const char* BULKPERM_START_STRING = "update"; + +namespace +{ + struct BulkQueueObjects : public LLSelectedObjectFunctor + { + BOOL scripted; + BOOL modifiable; + LLFloaterBulkPermission* mQueue; + BulkQueueObjects(LLFloaterBulkPermission* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {} + virtual bool apply(LLViewerObject* obj) + { + scripted = obj->flagScripted(); + modifiable = obj->permModify(); + + mQueue->addObject(obj->getID()); + return false; + + } + }; +} + +///---------------------------------------------------------------------------- +/// Class LLFloaterBulkPermission +///---------------------------------------------------------------------------- + +// static +LLMap LLFloaterBulkPermission::sInstances; + + +// Default constructor +LLFloaterBulkPermission::LLFloaterBulkPermission(const std::string& name, + const LLRect& rect, + const char* title, + const char* start_string) : + LLFloater(name, rect, title, + RESIZE_YES, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, + DRAG_ON_TOP, MINIMIZE_YES, CLOSE_YES) +{ + + req_perm_mask=0; // This should match the default state the checkboxes are set to + recurse=false; + + LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml"); + + childSetAction("Apply...",onApplyBtn,this); + childSetEnabled("Apply...",TRUE); + + childSetCommitCallback("Modify",&onCommitPermissions, this); + childSetCommitCallback("Trans",&onCommitPermissions, this); + childSetCommitCallback("Copy",&onCommitPermissions, this); + + //childSetCommitCallback("Recurse",&onRecurse, this); + + childSetCommitCallback("Parent",&onParent, this); + + childSetCommitCallback("objects",&InvSelection, this); + childSetCommitCallback("scripts",&InvSelection, this); + childSetCommitCallback("textures",&InvSelection, this); + childSetCommitCallback("sounds",&InvSelection, this); + childSetCommitCallback("animations",&InvSelection, this); + childSetCommitCallback("notecards",&InvSelection, this); + childSetCommitCallback("landmarks",&InvSelection, this); + childSetCommitCallback("bodyparts",&InvSelection, this); + childSetCommitCallback("clothing",&InvSelection, this); + childSetCommitCallback("gestures",&InvSelection, this); + + //Set variable state to XUI default state consistancy + processObject=getChild("objects")->get(); + processScript=getChild("scripts")->get(); + processTexture=getChild("textures")->get(); + processSound=getChild("sounds")->get(); + processAnimation=getChild("animations")->get(); + processNotecard=getChild("notecards")->get(); + processGesture=getChild("gestures")->get(); + processClothing=getChild("clothing")->get(); + processBodypart=getChild("bodyparts")->get(); + processLandmark=getChild("landmarks")->get(); + parent=getChild("Parent")->get(); + + + setTitle(title); + + if (!getHost()) + { + LLRect curRect = getRect(); + translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop); + } + + mStartString = start_string; + mDone = FALSE; + sInstances.addData(mID, this); + +} + +void LLFloaterBulkPermission::doApply() +{ + // Its alive now do the nasty work that the ScriptQueue and friends try to do in the menu code + // but first grab the user options + + LLScrollListCtrl* list = getChild("queue output"); + list->deleteAllItems(); + + //Apply to selected objects if requested first + + if(parent) + { + llinfos<< "Setting permission on parent items" << llendl; + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_NEXT_OWNER,true, req_perm_mask); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_NEXT_OWNER,false, ~req_perm_mask); //How annoying need to set and unset + } + + + LLFloaterBulkPermission* q; + q=(LLFloaterBulkPermission*)this; + + BulkQueueObjects func(q); + const bool firstonly = false; + bool fail = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&func, firstonly); + if(fail) + { + if ( !func.modifiable ) + { + gViewerWindow->alertXml("NO MODIFY"); + } + else + { + llwarns << "Bad logic. Are there actualy any items in that prim?" << llendl; + } + } + else + { + if (!q->start()) + { + llwarns << "Unexpected failure attepmting to set permissions." << llendl; + } + } +} + +// Destroys the object +LLFloaterBulkPermission::~LLFloaterBulkPermission() +{ + sInstances.removeData(mID); +} + +// find an instance by ID. Return NULL if it does not exist. +// static +LLFloaterBulkPermission* LLFloaterBulkPermission::findInstance(const LLUUID& id) +{ + if(sInstances.checkData(id)) + { + return sInstances.getData(id); + } + return NULL; +} + + +// This is the callback method for the viewer object currently being +// worked on. +// NOT static, virtual! +void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object, + InventoryObjectList* inv, + S32, + void* q_id) +{ + llinfos << "LLFloaterBulkPermission::inventoryChanged() for object " + << viewer_object->getID() << llendl; + + //Remove this listener from the object since its + //listener callback is now being executed. + + //We remove the listener here because the function + //removeVOInventoryListener removes the listener from a ViewerObject + //which it internally stores. + + //If we call this further down in the function, calls to handleInventory + //and nextObject may update the interally stored viewer object causing + //the removal of the incorrect listener from an incorrect object. + + //Fixes SL-6119:Recompile scripts fails to complete + removeVOInventoryListener(); + + if (viewer_object && inv && (viewer_object->getID() == mCurrentObjectID) ) + { + handleInventory(viewer_object, inv); + } + else + { + // something went wrong... + // note that we're not working on this one, and move onto the + // next object in the list. + llwarns << "No inventory for " << mCurrentObjectID + << llendl; + nextObject(); + } +} + +void LLFloaterBulkPermission::onApplyBtn(void* user_data) +{ + LLFloaterBulkPermission* self = (LLFloaterBulkPermission*)user_data; + self->doApply(); +} + + +// static +void LLFloaterBulkPermission::InvSelection(LLUICtrl* ctrl, void* data) +{ + LLFloaterBulkPermission* self = (LLFloaterBulkPermission*)data; + + self->processObject=self->getChild("objects")->get(); + self->processScript=self->getChild("scripts")->get(); + self->processTexture=self->getChild("textures")->get(); + self->processSound=self->getChild("sounds")->get(); + self->processAnimation=self->getChild("animations")->get(); + self->processNotecard=self->getChild("notecards")->get(); + self->processGesture=self->getChild("gestures")->get(); + self->processClothing=self->getChild("clothing")->get(); + self->processBodypart=self->getChild("bodyparts")->get(); + self->processLandmark=self->getChild("landmarks")->get(); + + +} + +// static +void LLFloaterBulkPermission::onParent(LLUICtrl* ctrl, void* data) +{ + LLFloaterBulkPermission* self = (LLFloaterBulkPermission*)data; + self->parent=self->getChild("Parent")->get(); +} + +// static +void LLFloaterBulkPermission::onRecurse(LLUICtrl* ctrl, void* data) +{ + LLFloaterBulkPermission* self = (LLFloaterBulkPermission*)data; + self->recurse=self->getChild("Recurse")->get(); +} + +// static +void LLFloaterBulkPermission::onCommitPermissions(LLUICtrl* ctrl, void* data) +{ + LLFloaterBulkPermission* self = (LLFloaterBulkPermission*)data; + LLCheckBoxCtrl* CheckModify = self->getChild("Modify"); + LLCheckBoxCtrl* CheckCopy = self->getChild("Copy"); + LLCheckBoxCtrl* CheckTrans = self->getChild("Trans"); + + self->req_perm_mask=0; + + if(CheckModify->get()) + { + self->req_perm_mask|=PERM_MODIFY; + } + else + { + self->req_perm_mask&=~PERM_MODIFY; + } + + if(CheckCopy->get()) + { + self->req_perm_mask|=PERM_COPY; + } + else + { + self->req_perm_mask&=~PERM_COPY; + } + + if(CheckTrans->get()) + { + self->req_perm_mask|=PERM_TRANSFER; + } + else + { + self->req_perm_mask&=~PERM_TRANSFER; + } + + +} + +void LLFloaterBulkPermission::addObject(const LLUUID& id) +{ + mObjectIDs.put(id); +} + +BOOL LLFloaterBulkPermission::start() +{ + llinfos << "LLFloaterBulkPermission::start()" << llendl; + char buffer[MAX_STRING]; /*Flawfinder: ignore*/ + snprintf(buffer, sizeof(buffer), "Starting %s of %d items.", mStartString, mObjectIDs.count()); /* Flawfinder: ignore */ + + LLScrollListCtrl* list = getChild("queue output"); + list->addCommentText(buffer); + + return nextObject(); +} + +BOOL LLFloaterBulkPermission::isDone() const +{ + return (mCurrentObjectID.isNull() || (mObjectIDs.count() == 0)); +} + +// go to the next object. If no objects left, it falls out silently +// and waits to be killed by the window being closed. +BOOL LLFloaterBulkPermission::nextObject() +{ + S32 count; + BOOL successful_start = FALSE; + do + { + count = mObjectIDs.count(); + llinfos << "LLFloaterBulkPermission::nextObject() - " << count + << " objects left to process." << llendl; + mCurrentObjectID.setNull(); + if(count > 0) + { + successful_start = popNext(); + } + llinfos << "LLFloaterBulkPermission::nextObject() " + << (successful_start ? "successful" : "unsuccessful") + << llendl; + } while((mObjectIDs.count() > 0) && !successful_start); + + if(isDone() && !mDone) + { + + LLScrollListCtrl* list = getChild("queue output"); + mDone = TRUE; + char buffer[MAX_STRING]; /*Flawfinder: ignore*/ + snprintf(buffer, sizeof(buffer), "Done."); /* Flawfinder: ignore */ + list->addCommentText(buffer); + + } + return successful_start; +} + +// returns true if the queue has started, otherwise false. This +// method pops the top object off of the queue. +BOOL LLFloaterBulkPermission::popNext() +{ + // get the first element off of the container, and attempt to get + // the inventory. + BOOL rv = FALSE; + S32 count = mObjectIDs.count(); + if(mCurrentObjectID.isNull() && (count > 0)) + { + mCurrentObjectID = mObjectIDs.get(0); + llinfos << "LLFloaterBulkPermission::popNext() - mCurrentID: " + << mCurrentObjectID << llendl; + mObjectIDs.remove(0); + LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID); + if(obj) + { + llinfos << "LLFloaterBulkPermission::popNext() requesting inv for " + << mCurrentObjectID << llendl; + LLUUID* id = new LLUUID(mID); + + registerVOInventoryListener(obj,id); + requestVOInventory(); + rv = TRUE; + } + else + { + llinfos<<"LLFloaterBulkPermission::popNext() returned a NULL LLViewerObject" <getNewFloaterPosition(&left, &top); + LLRect rect = gSavedSettings.getRect("CompileOutputRect"); + rect.translate(left - rect.mLeft, top - rect.mTop); + LLFloaterBulkPermission* new_queue = new LLFloaterBulkPermission("queue",rect,"Setting Bulk permissions","Results"); + new_queue->open(); /*Flawfinder: ignore*/ + return new_queue; +} + + +void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, InventoryObjectList* inv) +{ + // find all of the lsl, leaving off duplicates. We'll remove + // all matching asset uuids on compilation success. + + llinfos<<"handleInventory"<("queue output"); + + InventoryObjectList::const_iterator it = inv->begin(); + InventoryObjectList::const_iterator end = inv->end(); + for ( ; it != end; ++it) + { + llinfos<<"Doing iterator of inventory"<getType() == LLAssetType::AT_LSL_TEXT && processScript) || + ( (*it)->getType() == LLAssetType::AT_TEXTURE && processTexture) || + ( (*it)->getType() == LLAssetType::AT_SOUND && processSound) || + ( (*it)->getType() == LLAssetType::AT_LANDMARK && processLandmark) || + ( (*it)->getType() == LLAssetType::AT_CLOTHING && processClothing) || + ( (*it)->getType() == LLAssetType::AT_OBJECT && processObject) || + ( (*it)->getType() == LLAssetType::AT_NOTECARD && processNotecard) || + ( (*it)->getType() == LLAssetType::AT_BODYPART && processBodypart) || + ( (*it)->getType() == LLAssetType::AT_ANIMATION && processAnimation) || + ( (*it)->getType() == LLAssetType::AT_GESTURE && processGesture)) + { + + LLViewerObject* object = gObjectList.findObject(viewer_obj->getID()); + + if (object) + { + LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); + LLViewerInventoryItem* new_item = (LLViewerInventoryItem*)item; + LLPermissions perm(new_item->getPermissions()); + + // chomp the inventory name so it fits in the scroll window nicely + // and the user can see the [OK] + std::string invname; + invname=item->getName().substr(0,item->getName().size() < 30 ? item->getName().size() : 30 ); + + // My attempt at checking valid permissions, CHECK ME + // note its not actually bad to try to set permissions that are not allowed as the + // server will protect against this, but it will piss the user off if its wrong + if( + (perm.getCreator()==gAgentID) || + (perm.getMaskOwner() & PERM_TRANSFER) && (perm.getMaskOwner() & PERM_MODIFY) || + (gAgent.getGroupID()==perm.getGroup() && (perm.getMaskGroup() & PERM_TRANSFER) && (perm.getMaskGroup() & PERM_MODIFY)) + ){ + llinfos<<"Setting perms"<setPermissions(perm); + updateInventory(object,new_item,TASK_INVENTORY_ITEM_KEY,FALSE); + snprintf(buffer, sizeof(buffer), "Setting perms on '%s' [OK]", invname.c_str()); /* Flawfinder: ignore */ + } + else + { + llinfos<<"NOT setting perms"<addCommentText(buffer); + + if(recurse && ( (*it)->getType() == LLAssetType::AT_OBJECT && processObject)) + { + //Add this object back to the queue to be processed as it has inventory + snprintf(buffer, sizeof(buffer), "Queueing object '%s' for open", invname.c_str()); + llwarns << "Queueing object "<< invname.c_str() << " ID "<< (*it)->getUUID()<getUUID()); + // This will not YET work. as this is not a viewer object the unpack will fail + } + + } + } + } + + nextObject(); +} + + +// Avoid inventory callbacks etc by just fire and forgetting the message with the permissions update +// we could do this via LLViewerObject::updateInventory but that uses inventory call backs and buggers +// us up and we would have a dodgy item iterator + +void LLFloaterBulkPermission::updateInventory( + LLViewerObject* object, + LLViewerInventoryItem* item, + U8 key, + bool is_new) +{ + LLMemType mt(LLMemType::MTYPE_OBJECT); + + + // This slices the object into what we're concerned about on the + // viewer. The simulator will take the permissions and transfer + // ownership. + LLPointer task_item = + new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(), + item->getAssetUUID(), item->getType(), + item->getInventoryType(), + item->getName(), item->getDescription(), + item->getSaleInfo(), + item->getFlags(), + item->getCreationDate()); + task_item->setTransactionID(item->getTransactionID()); + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_UpdateTaskInventory); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_UpdateData); + msg->addU32Fast(_PREHASH_LocalID, object->mLocalID); + msg->addU8Fast(_PREHASH_Key, key); + msg->nextBlockFast(_PREHASH_InventoryData); + task_item->packMessage(msg); + msg->sendReliable(object->getRegion()->getHost()); + +} + diff --git a/linden/indra/newview/llfloaterbulkpermission.h b/linden/indra/newview/llfloaterbulkpermission.h new file mode 100644 index 0000000..3de871b --- /dev/null +++ b/linden/indra/newview/llfloaterbulkpermission.h @@ -0,0 +1,143 @@ +/** + * @file llfloaterbulkpermissions.h + * @brief A floater which allows task inventory item's properties to be changed on mass. + * + * $LicenseInfo:firstyear=2008&license=viewergpl$ + * + * Copyright (c) 2008, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +/* Allow multiple task inventory properties to be set in one go, by Michelle2 Zenovka */ + +#ifndef LL_LLBULKPERMISSION_H +#define LL_LLBULKPERMISSION_H + +#include "lldarray.h" +#include "llinventory.h" +#include "llviewerobject.h" +#include "llvoinventorylistener.h" +#include "llmap.h" +#include "lluuid.h" + +#include "llfloater.h" +#include "llscrolllistctrl.h" + +#include "llviewerinventory.h" + +class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener +{ +public: + // addObject() accepts an object id. + void addObject(const LLUUID& id); + + // start() returns TRUE if the queue has started, otherwise FALSE. + BOOL start(); + + // Use this method to create a reset queue. Once created, it + // will be responsible for it's own destruction. + static LLFloaterBulkPermission * create(); + +protected: + LLFloaterBulkPermission(const std::string& name, const LLRect& rect, + const char* title, const char* start_string); + virtual ~LLFloaterBulkPermission(); + + // This is the callback method for the viewer object currently + // being worked on. + /*virtual*/ void inventoryChanged(LLViewerObject* obj, + InventoryObjectList* inv, + S32 serial_num, + void* queue); + + // This is called by inventoryChanged + void handleInventory(LLViewerObject* viewer_obj, + InventoryObjectList* inv); + + + void updateInventory(LLViewerObject* object, + LLViewerInventoryItem* item, + U8 key, + bool is_new); + + + static void onCloseBtn(void* user_data); + static void onApplyBtn(void* user_data); + static void onCommitPermissions(LLUICtrl* ctrl, void* data); + static void InvSelection(LLUICtrl* ctrl, void* data); + static void onRecurse(LLUICtrl* ctrl, void* data); + static void onParent(LLUICtrl* ctrl, void* data); + + // returns true if this is done + BOOL isDone() const; + + //Read the settings and Apply the permissions + void doApply(); + + // go to the next object. If no objects left, it falls out + // silently and waits to be killed by the deleteIfDone() callback. + BOOL nextObject(); + BOOL popNext(); + + // Get this instances ID. + const LLUUID& getID() const { return mID; } + + // find an instance by ID. Return NULL if it does not exist. + static LLFloaterBulkPermission* findInstance(const LLUUID& id); + + U32 req_perm_mask; + + BOOL processObject; + BOOL processScript; + BOOL processTexture; + BOOL processSound; + BOOL processAnimation; + BOOL processCallingcard; + BOOL processNotecard; + BOOL processGesture; + BOOL processClothing; + BOOL processBodypart; + BOOL processLandmark; + + BOOL recurse; + BOOL parent; + +protected: + // UI + LLScrollListCtrl* mMessages; + LLButton* mCloseBtn; + + // Object Queue + LLDynamicArray mObjectIDs; + LLUUID mCurrentObjectID; + BOOL mDone; + + LLUUID mID; + static LLMap sInstances; + + const char* mStartString; + +}; + +#endif diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 3e99384..1ec71ac 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -86,6 +86,7 @@ #include "llfloateravatarinfo.h" #include "llfloateravatartextures.h" #include "llfloaterbuildoptions.h" +#include "llfloaterbulkpermission.h" #include "llfloaterbump.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" @@ -6239,6 +6240,17 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, cons } } +class LLToolsSetBulkPerms : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLFloaterBulkPermission* queue = NULL; + queue = LLFloaterBulkPermission::create(); + return true; + } +}; + + class LLToolsSelectedScriptAction : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -7827,6 +7839,7 @@ void initialize_menus() addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory"); addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory"); addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction"); + addMenu(new LLToolsSetBulkPerms(), "Tools.SetBulkPerms"); addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie"); addMenu(new LLToolsEnableLink(), "Tools.EnableLink"); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_bulk_perms.xml b/linden/indra/newview/skins/default/xui/en-us/floater_bulk_perms.xml new file mode 100644 index 0000000..3dd838a --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_bulk_perms.xml @@ -0,0 +1,127 @@ + + + +Apply to + + + + + + + + + + + + + + + + + + + + + +Permissions + + + + + + + + + + + + + + + * linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml: + Reindented and cleaned up menu XML for code readability. + 2008-09-20 Michelle2 Zenovka * linden/indra/newview/llfloaterbulkpermission.h: diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 6627dec..69604b0 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1,1663 +1,2033 @@ + opaque="false" tear_off="false"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - - + + + - - - - - - - + + + + - --> - - - + + + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + + - - - - - - - - - + + + - - - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + - - - - - + + + + + + + + + + + + + + - - - - + + + - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - - - - - - - - + + + - - + + + - - - - - - - - - - - - + + + - - - - - - - - - + + + + + + - - - - - - - - + + - - + + + - - + + - - - - - + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + - + userdata="VelocityInterpolate" /> + - + - + userdata="PingInterpolate" /> + - + + + + + + + + + + + + - + userdata="StatsSessionTrackFrameStats" /> + - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + - - - - - - + + + + + + + + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1 From 997fb0cbf21cc6b2f2ff8c8381de488eafff4c8d Mon Sep 17 00:00:00 2001 From: Aimee Trescothick Date: Mon, 22 Sep 2008 02:01:57 -0500 Subject: VWR-8430: Usability improvements to the land tools floater. --- ChangeLog.txt | 19 +++ linden/doc/contributions.txt | 1 + linden/indra/newview/app_settings/settings.xml | 2 +- linden/indra/newview/llfloatertools.cpp | 44 ++---- linden/indra/newview/llfloatertools.h | 3 +- linden/indra/newview/llpanelland.cpp | 26 +++- linden/indra/newview/llpanelland.h | 3 + linden/indra/newview/lltoolbrush.cpp | 4 +- .../newview/skins/default/xui/en-us/alerts.xml | 13 ++ .../skins/default/xui/en-us/floater_tools.xml | 149 +++++++++++++-------- 10 files changed, 171 insertions(+), 93 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 6b8b5a1..b78250c 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,22 @@ +2008-09-22 Aimee Trescothick + + * linden/indra/newview/app_settings/settings.xml: + VWR-8430: Usability improvements to the land tools floater. + * linden/indra/newview/llfloatertools.cpp: + Ditto. + * linden/indra/newview/llfloatertools.h: + Ditto. + * linden/indra/newview/llpanelland.cpp: + Ditto. + * linden/indra/newview/llpanelland.h: + Ditto. + * linden/indra/newview/lltoolbrush.cpp: + Ditto. + * linden/indra/newview/skins/default/xui/en-us/alerts.xml: + Ditto. + * linden/indra/newview/skins/default/xui/en-us/floater_tools.xml: + Ditto. + 2008-09-19 Gigs Taggart * linden/indra/newview/app_settings/settings.xml: diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 9efcd03..de87457 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -14,6 +14,7 @@ Adam Marker Aimee Trescothick VWR-3903 VWR-4083 + VWR-8430 Alejandro Rosenthal VWR-1184 Alissa Sabre diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index fa0d21e..cdf9fb4 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -5569,7 +5569,7 @@ Value 0 - RadioLandBrushSize + LandBrushSize Comment Size of land modification brush (0 = small, 1 = medium, 2 = large) diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 8d4d6e2..9ce5d35 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp @@ -106,9 +106,8 @@ void click_popup_rotate_left(void*); void click_popup_rotate_reset(void*); void click_popup_rotate_right(void*); void click_popup_dozer_mode(LLUICtrl *, void *user); -void click_popup_dozer_size(LLUICtrl *, void *user); +void commit_slider_dozer_size(LLUICtrl *, void*); void commit_slider_dozer_force(LLUICtrl *, void*); -void click_dozer_size(LLUICtrl *, void*); void click_apply_to_selection(void*); void commit_radio_zoom(LLUICtrl *, void*); void commit_radio_orbit(LLUICtrl *, void*); @@ -303,14 +302,13 @@ BOOL LLFloaterTools::postBuild() childSetCommitCallback("radio noise",click_popup_dozer_mode, (void*)4); mRadioDozerRevert = getChild("radio revert"); childSetCommitCallback("radio revert",click_popup_dozer_mode, (void*)5); - mComboDozerSize = getChild("combobox brush size"); - childSetCommitCallback("combobox brush size",click_dozer_size, (void*)0); - if(mComboDozerSize) mComboDozerSize->setCurrentByIndex(0); mBtnApplyToSelection = getChild("button apply to selection"); childSetAction("button apply to selection",click_apply_to_selection, (void*)0); - mCheckShowOwners = getChild("checkbox show owners"); - childSetValue("checkbox show owners",gSavedSettings.getBOOL("ShowParcelOwners")); + mSliderDozerSize = getChild("slider brush size"); + childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0); + childSetValue( "slider brush size", gSavedSettings.getS32("LandBrushSize")); + mSliderDozerForce = getChild("slider force"); childSetCommitCallback("slider force",commit_slider_dozer_force, (void*)0); // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here @@ -391,10 +389,9 @@ LLFloaterTools::LLFloaterTools() mRadioDozerSmooth(NULL), mRadioDozerNoise(NULL), mRadioDozerRevert(NULL), - mComboDozerSize(NULL), + mSliderDozerSize(NULL), + mSliderDozerForce(NULL), mBtnApplyToSelection(NULL), - mCheckShowOwners(NULL), - mTab(NULL), mPanelPermissions(NULL), @@ -702,7 +699,6 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mRadioSelectLand) mRadioSelectLand->setVisible( land_visible ); S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction"); - S32 dozer_size = gSavedSettings.getS32("RadioLandBrushSize"); if (mRadioDozerFlatten) { @@ -734,20 +730,16 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mRadioDozerRevert ->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 5); mRadioDozerRevert ->setVisible( land_visible ); } - if (mComboDozerSize) - { - mComboDozerSize ->setCurrentByIndex(dozer_size); - mComboDozerSize ->setVisible( land_visible ); - mComboDozerSize ->setEnabled( tool == LLToolBrushLand::getInstance() ); - } if (mBtnApplyToSelection) { mBtnApplyToSelection->setVisible( land_visible ); mBtnApplyToSelection->setEnabled( land_visible && !LLViewerParcelMgr::getInstance()->selectionEmpty() && tool != LLToolSelectLand::getInstance()); } - if (mCheckShowOwners) + if (mSliderDozerSize) { - mCheckShowOwners ->setVisible( land_visible ); + mSliderDozerSize ->setVisible( land_visible ); + childSetVisible("Brush:", land_visible); + childSetVisible("Brush Size:", land_visible); } if (mSliderDozerForce) { @@ -933,23 +925,15 @@ void click_popup_rotate_right(void*) void click_popup_dozer_mode(LLUICtrl *, void *user) { - S32 show_owners = gSavedSettings.getBOOL("ShowParcelOwners"); S32 mode = (S32)(intptr_t) user; gFloaterTools->setEditTool( LLToolBrushLand::getInstance() ); gSavedSettings.setS32("RadioLandBrushAction", mode); - gSavedSettings.setBOOL("ShowParcelOwners", show_owners); -} - -void click_popup_dozer_size(LLUICtrl *, void *user) -{ - S32 size = (S32)(intptr_t) user; - gSavedSettings.setS32("RadioLandBrushSize", size); } -void click_dozer_size(LLUICtrl *ctrl, void *user) +void commit_slider_dozer_size(LLUICtrl *ctrl, void*) { - S32 size = ((LLComboBox*) ctrl)->getCurrentIndex(); - gSavedSettings.setS32("RadioLandBrushSize", size); + S32 size = (S32)ctrl->getValue().asInteger(); + gSavedSettings.setS32("LandBrushSize", size); } void commit_slider_dozer_force(LLUICtrl *ctrl, void*) diff --git a/linden/indra/newview/llfloatertools.h b/linden/indra/newview/llfloatertools.h index a75aa87..3d8a144 100644 --- a/linden/indra/newview/llfloatertools.h +++ b/linden/indra/newview/llfloatertools.h @@ -168,11 +168,10 @@ public: LLCheckBoxCtrl *mRadioDozerSmooth; LLCheckBoxCtrl *mRadioDozerNoise; LLCheckBoxCtrl *mRadioDozerRevert; + LLSlider *mSliderDozerSize; LLSlider *mSliderDozerForce; - LLComboBox *mComboDozerSize; LLButton *mBtnApplyToSelection; - LLCheckBoxCtrl *mCheckShowOwners; std::vector mButtons;//[ 15 ]; diff --git a/linden/indra/newview/llpanelland.cpp b/linden/indra/newview/llpanelland.cpp index be05703..1a7892d 100644 --- a/linden/indra/newview/llpanelland.cpp +++ b/linden/indra/newview/llpanelland.cpp @@ -37,10 +37,13 @@ #include "llagent.h" #include "llbutton.h" +#include "llcheckboxctrl.h" #include "llfloaterland.h" #include "lltextbox.h" +#include "llviewercontrol.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" +#include "llviewerwindow.h" #include "roles_constants.h" #include "lluictrlfactory.h" @@ -65,6 +68,10 @@ BOOL LLPanelLandInfo::postBuild() childSetAction("button subdivide land",onClickDivide,this); childSetAction("button join land",onClickJoin,this); childSetAction("button about land",onClickAbout,this); + childSetAction("button show owners help", onShowOwnersHelp, this); + + mCheckShowOwners = getChild("checkbox show owners"); + childSetValue("checkbox show owners", gSavedSettings.getBOOL("ShowParcelOwners")); return TRUE; } @@ -72,7 +79,8 @@ BOOL LLPanelLandInfo::postBuild() // Methods // LLPanelLandInfo::LLPanelLandInfo(const std::string& name) -: LLPanel(name) +: LLPanel(name), + mCheckShowOwners(NULL) { if (!sInstance) { @@ -255,3 +263,19 @@ void LLPanelLandInfo::onClickAbout(void*) LLFloaterLand::showInstance(); } + +void LLPanelLandInfo::onShowOwnersHelp(void* user_data) +{ + LLPanelLandInfo* self = static_cast(user_data); + + const char* xml_alert = "ShowOwnersHelp"; + LLAlertDialog* dialogp = gViewerWindow->alertXml(xml_alert); + if (dialogp) + { + LLFloater* root_floater = gFloaterView->getParentFloater(self); + if (root_floater) + { + root_floater->addDependentFloater(dialogp); + } + } +} diff --git a/linden/indra/newview/llpanelland.h b/linden/indra/newview/llpanelland.h index c83bf2c..c44cb9d 100644 --- a/linden/indra/newview/llpanelland.h +++ b/linden/indra/newview/llpanelland.h @@ -50,6 +50,8 @@ public: void refresh(); static void refreshAll(); + + LLCheckBoxCtrl *mCheckShowOwners; protected: static void onClickClaim(void*); @@ -57,6 +59,7 @@ protected: static void onClickDivide(void*); static void onClickJoin(void*); static void onClickAbout(void*); + static void onShowOwnersHelp(void*); protected: //LLTextBox* mTextPriceLabel; diff --git a/linden/indra/newview/lltoolbrush.cpp b/linden/indra/newview/lltoolbrush.cpp index fdd7b66..0291eab 100644 --- a/linden/indra/newview/lltoolbrush.cpp +++ b/linden/indra/newview/lltoolbrush.cpp @@ -96,7 +96,7 @@ LLToolBrushLand::LLToolBrushLand() mGotHover(FALSE), mBrushSelected(FALSE) { - mBrushIndex = gSavedSettings.getS32("RadioLandBrushSize"); + mBrushIndex = gSavedSettings.getS32("LandBrushSize"); } void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, @@ -447,7 +447,7 @@ void LLToolBrushLand::render() spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 ); spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 ); - mBrushIndex = gSavedSettings.getS32("RadioLandBrushSize"); + mBrushIndex = gSavedSettings.getS32("LandBrushSize"); region_list_t regions; determineAffectedRegions(regions, spot); diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml index c7ec62f..4bf5ff1 100644 --- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml @@ -1996,6 +1996,19 @@ Join land? Cancel + + + If this box is checked, land parcels will be +overlaid with a color indicating their status. + +Red: Land owned by others. +Green: Your land. +Aqua: Land owned by a group that you are a member of. +Yellow: For sale. +Purple: Land in the auction system. +Grey: Rare public land. + + This notecard needs to be saved before the item can be copied or viewed. Save notecard? diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index 3ae37ea..1817d8c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -245,55 +245,65 @@ - - - - - - - - - - Small - - - Medium - - - Large - - -