You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(40) |
Nov
(79) |
Dec
(35) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(14) |
Feb
(31) |
Mar
(2) |
Apr
(29) |
May
(14) |
Jun
(39) |
Jul
(33) |
Aug
(53) |
Sep
(11) |
Oct
|
Nov
|
Dec
(2) |
2003 |
Jan
(1) |
Feb
(4) |
Mar
(14) |
Apr
(7) |
May
(7) |
Jun
(2) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(1) |
2004 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
(3) |
Mar
(4) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(4) |
Dec
(1) |
2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
From: Monica G. <Mon...@ii...> - 2016-11-11 09:08:18
|
Postdoctoral position in “multisensory integration and development for learning and skills” Expires on: 20/11/2016 A two-year postdoctoral position focusing on the study of multisensory integration in children and adults with and without sensory disabilities will be available from January 2017. The selected candidate will work on the study of unisensory and multisensory skills, audio-vestibular integration for motion, development in children with and without disability. The post-Doc will also evaluate technological solutions to teach arithmetic and geometrical skills in children. He/she will work in a fully equipped laboratory in the “U-VIP” (Unit for Visually Impaired People, team leader Monica Gori) and have the opportunity to pursue research within the “WeDRAW” project (“Exploiting the best sensory modality for learning arithmetic and geometrical concepts based on multisensory interactive Information and Communication Technologies and serious games”) carried out with a consortium composed by an interdisciplinary team of psychologists, engineers, rehabilitators, teachers and physicists, pedagogics and SME directors. The WeDRAW project is coordinated by Monica Gori and funded by the European Union's H2020 Programme with Grant Agreement 731540. The goal of the project is to develop and test technologies to support learning and skills in school- age children with and without sensory impairment through: * The development of a new set of tests to quantify performance of children on arithmetic and geometrical tasks * The validation of the technology through user’s, experimental and clinical studies. Research for this Postdoctoral position will involve: • evaluation of skills through psychophysical and behavioral experiments and Bayesian modeling. • design of experiments, testing and data analysis (psychophysics, motion tracking analysis). The ideal candidate should possess a Master’s Degree in Psychology and a Ph.D. Degree in neuroscience. He/she should have at least a post-doc experience in cognitive neuroscience and clinics. He/she should also have published in peer-reviewed scientific journals and conferences in the related field. Experience with psychophysical measurements, motion tracking, data analysis, device development, statistics, modeling and programming is an asset. Moreover, previous experience with clinical populations mainly of children and knowledge related to visual impairment and laboratory-platform development are desired. The candidate should have knowledge of Matlab. Salary is highly competitive and commensurate with qualification and experience. Interested applicants should submit CV, list of publications, 2 reference letters and a statement of research interest to app...@ii...<mailto:app...@ii...> by November 20, 2016 quoting "Post Doc U-VIP CB 72836". Please note that this position is contingent on the signature of the relevant Grant Agreement Fondazione Istituto Italiano di Tecnologia – IIT (www.iit.it<http://www.iit.it>) - was founded with the objective of promoting Italy's technological development and further education in science and technology. In this framework, IIT’s scientific program is based on the combination of basic scientific research with the development of technical applications, a major inspirational principle. The research areas cover scientific topics of high innovative content, representing the most advanced frontiers of modern technology, with wide application possibilities in various fields ranging from medicine to industry, from computer science to robotics, life sciences and nanobiotechnology. In order to comply with Italian law (art. 23 of Privacy Law of the Italian Legislative Decree n. 196/03), the candidate is kindly asked to give his/her consent to allow IIT to process his/her personal data. We inform you that the information you provide will be solely used for the purpose of assessing your professional profile to meet the requirements of Istituto Italiano di Tecnologia. Your data will be processed by Istituto Italiano di Tecnologia, with its headquarters in Genoa, Via Morego 30, acting as the Data Holder, using computer and paper-based means, observing the rules on the protection of personal data, including those relating to the security of data. Please also note that, pursuant to art.7 of Legislative Decree 196/2003, you may exercise your rights at any time as a party concerned by contacting the Data Manager. Istituto Italiano di Tecnologia is an Equal Opportunity Employer that actively seeks diversity in the workforce. Contacts app...@ii...<mailto:app...@ii...> mon...@ii...<mailto:mon...@ii...> |
From: Thomas R. <th...@gr...> - 2016-09-20 10:50:36
|
Software Engineer Required in Edinburgh, Scotland ========================================== About SeeByte ============= SeeByte, global market leader in the development of smart software for unmanned maritime systems, are looking to recruit Software Engineers of varying levels of experience for various positions within our SeeTrack team in our Edinburgh office. This could be for a recent graduate looking for a career in robotics, or an experienced professional looking for an exciting new opportunity. You can expect to be working with state-of-the-art subsea robots on exciting and varied projects, global travel and at-sea experiments. There will also be opportunities to visit clients internationally to take part in in-water tests and trials, giving you the chance to see the real-world applications of the software you have created. This is a fantastic opportunity to work for an innovative and forward thinking company with an international client base. Main Purpose of the Role ====================== Engineers will get the opportunity to work on projects providing robotic solutions for domains such as oil pipeline surveying and offshore oil infrastructure inspection for clients in the oil and gas industry, and military mine countermeasure operations for various navies worldwide. Support and training will be given to allow you to develop within the role and become a specialist in software engineering for underwater systems. The successful applicant would become part of the team of experienced engineers working on SeeTrack, SeeByte's flagship product. SeeTrack is the leading technology used by Explosive Ordnance Disposal (EOD) and Clearance Divers around the world, to achieve success in managing their off-board assets during dangerous and demanding missions. =========================================================================== Applicants MUST be proficient in at least one high level programming language: Java or C++. =========================================================================== The applicant should demonstrate either of the following profiles: ======================================================= (1) User Interface Development, with ideally knowledge of SWING, Netbeans platform, C# (2) State of the art algorithm development, with ideally knowledge of Image Processing, autonomous robotics. Experience in any of the following areas is desirable but not essential: ========================================================= - Database Management - Webservices - GIS system - Path planning, Machine learning and/or any other relevant domain of Artificial Intelligence and Robotics - Embedded Real-time systems - Formal Software Testing - Commercial Software Development - Embedded Real-time systems - Successful candidates usually have a degree in Electronic/Computer Science/Software Engineering, or similar numerate discipline with a software engineering emphasis, or international equivalent. Required skills: ============= - Experience in programming on Linux and Windows systems. - Comfortable working with external clients. - Dependable when working under tight deadlines. - Willingness to travel abroad. TO APPLY: Please send a recent copy of your CV and a cover letter to hr...@se... ======================================================================= Benefits: ========= Salary - £24,000 to £34,000 (dependent on experience) + Pension Scheme and Bonuses --------------------------------------------------------------------------------------------------------------------------------------- Because of the nature of the work associated with this post it is subject to special nationality rules and is open only to British or European Citizens. All offers of employment will be conditional to a satisfactory background check. |
From: Jennifer S. <st...@yo...> - 2016-02-05 16:55:46
|
CAPnet-CPS CAN‐ACN SATELLITE SYMPOSIUM “Action & Perception: Cognition, Coding and Clinical Populations” Sunday May 29th, 2016, 9 am to 5 pm Canadian Association for Neuroscience (CAN-CAN) Conference, Sheraton Centre Toronto Hotel, Toronto, ON This one-day satellite symposium focuses on perception and sensorimotor processes underlying the control of vision and movement in healthy and clinical populations. Jointly organized by the Canadian Action and Perception Network (CAPnet), a neuroscience research consortium that focuses on sensation, perception, and movement control, and by the Canadian Physiological Society (CPS) we invite abstract submission. The satellite is open to everyone and will highlight presentations in three talk sessions, a poster session, and a keynote lecture given by the recipient of the 2016 CPS Sarrazin Lectureship (http://www.cpsscp.ca/sarrazin-award-lectureship). We invite talks and posters under three themed sessions: 1) Coding and Computational Models of A & P: including neuroimaging, non-human primate and rodent models and computational models of perception and/or action. Chair: Dr. Julio Martinez (Western) 2) Cognition and Cognitive influences on A & P: including a breadth of approaches to higher level interactions or influences relating to perception and/or action. Chair: Dr. Kari Hoffman (York) 3) A & P in Clinical Populations: covering diverse clinical populations focusing on how such cohorts inform models of perception and/or action in typical non-clinical systems. Chair: Dr. Susanne Ferber (U of T) Program Committee: Jennifer Steeves (York; chair), Miriam Spering (UBC), Susanne Ferber (U of T), Ashley Parr (Queen’s), Craig Chapman (Alberta) HOW TO SUBMIT AN ABSTRACT A& P Satellite abstracts can be the same as, or different from, those submitted to the main CAN‐ACN meeting. The number of oral presentations is limited (approx. 20) and will be selected by the program committee based on the excellence and novelty of the abstract, fit of the topic with the satellite theme, and to maximize the number of labs presenting. A preference for poster or talk should be included in the abstract submission. Two trainee awards, one for best talk and one for best poster, will be presented at the end of the satellite. Abstracts should be written in CAN‐ACN format (~250 words) and submitted online http://goo.gl/forms/NfVBnG2aW6 Closing date for abstract submission: February 29th, 2016 We will inform applicants of acceptance and presentation type (talk or poster), and post the final schedule, in early March 2016. HOW TO REGISTER Registration will be available through the CAN registration webpage shortly. Registration fee is $25 if combined with CAN meeting registration or $50 for those wishing to register for the satellite only (follow instructions on the satellite webpage (enter ‘coupon code’ CANsat1 into text box on page 1, select registration type ‘Satellite 1 ONLY’ at $50 rate). Travel support for trainees is available through the Canadian Physiological Society (CPS); to be eligible, both student and supervisor have to be CPS members (http://www.cpsscp.ca/student-travel-fund). |
From: Jennifer S. <st...@yo...> - 2016-01-19 14:23:46
|
CALL FOR ABSTRACTS – Oral Presentations and Posters – CAPnet-CPS CAN‐ACN SATELLITE SYMPOSIUM “Action & Perception: Cognition, Coding and Clinical Populations” Date: Sunday May 29th, 2016, 9 am to 5 pm Venue: Canadian Association for Neuroscience (CAN-CAN) Conference, Sheraton Centre Toronto Hotel, Toronto, ON PROGRAM DETAILS This one-day satellite symposium focuses on perception and sensorimotor processes underlying the control of vision and movement in healthy and clinical populations. It is jointly organized by the Canadian Action and Perception Network (CAPnet), a neuroscience research consortium that focuses on sensation, perception, and movement control, and by the Canadian Physiological Society (CPS). The satellite is open to everyone and will highlight presentations from neuroscientists across Canada in three talk sessions, a poster session, and a keynote lecture given by the recipient of the 2016 CPS Sarrazin Lectureship (open for nominations until January 31, 2016; for more information see http://www.cpsscp.ca/sarrazin-award-lectureship; the 2015 Sarrazin Award recipient was Dr. Kathy Cullin, McGill). Presentation format: talks (15 minutes, including discussion) and posters We will have three themed talk sessions: 1) Coding and Computational Models of A & P: including neuroimaging, non-human primate and rodent models and computational models of perception and/or action. Chair: Dr. Julio Martinez (Western) 2) Cognition and Cognitive influences on A & P: including a breadth of approaches to higher level interactions or influences relating to perception and/or action. Chair: Dr. Kari Hoffman (York) 3) A & P in Clinical Populations: covering diverse clinical populations focusing on how such cohorts inform models of perception and/or action in typical non-clinical systems. Chair: Dr. Susanne Ferber (U of T) Program Committee: Jennifer Steeves (York; chair), Miriam Spering (UBC), Susanne Ferber (U of T), Ashley Parr (Queen’s), Craig Chapman (Alberta) HOW TO SUBMIT AN ABSTRACT A& P Satellite abstracts can be the same as, or different from, those submitted to the main CAN‐ACN meeting. The number of oral presentations is limited (approx. 20) and will be selected by the program committee based on the excellence and novelty of the abstract, fit of the topic with the satellite theme, and to maximize the number of labs presenting. A preference for poster or talk should be included in the abstract submission. Two trainee awards, one for best talk and one for best poster, will be presented at the end of the satellite. Abstracts should be written in CAN‐ACN format (~250 words) and submitted online http://goo.gl/forms/NfVBnG2aW6 Closing date for abstract submission: February 29th, 2016 We will inform applicants of acceptance and presentation type (talk or poster), and post the final schedule, in early March 2016. HOW TO REGISTER Registration is available through the CAN registration webpage shortly. Registration fee is $25 if combined with CAN meeting registration or $50 for those wishing to register for the satellite only (follow instructions on the satellite webpage (enter ‘coupon code’ CANsat1 into text box on page 1, select registration type ‘Satellite 1 ONLY’ at $50 rate). Travel support for trainees is available through the Canadian Physiological Society (CPS); to be eligible, both student and supervisor have to be CPS members (http://www.cpsscp.ca/student-travel-fund). |
From: Thomas R. <th...@gr...> - 2016-01-15 19:19:29
|
About SeeByte Ltd: ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ SeeByte is a world leader in smart software for autonomous maritime systems, providing innovative solutions to the defence, offshore and marine science sectors. SeeByte has recently developed the Marine Autonomy Framework in collaboration with DSTL to support the deployment of collectives of autonomous maritime systems working collaboratively. The framework is now implemented on multiple assets including surface and underwater vehicles. The system currently supports a limited number of behaviours at platform level and has an effective but limited collaboration mission planning ability. As part of an Innovate UK funded project in collaboration with other partners, we are looking at expanding the capabilities of the system to support long term near shore surveys using a surface and one or more underwater vehicles in realistic environments. The intention is to develop a system that will, for the first time, minimise the loading on operators, and reliance on a support ship. Both the Unmanned Surface Vehicle(USV) and Unmanned Underwater Vehicle (UUV) will be deployed from the shore and will transit to the survey site with minimal operator oversight and without the need for a support vessel. The UUV will be positioned and communicated with acoustically from the USV. Once at the survey site the USV will act as a positioning aid and a communications relay for the UUV. The Role: ¯¯¯¯¯¯¯¯¯ There is the potential for a PhD to work in parallel with this project to develop new techniques that can improve both vehicle behaviours (including COLREGS to enforce safe navigation of surface vehicles) as well as multi-vehicle mission planning with uncertain and limited communications between assets. You will work alongside experts in the field and have will have access to unique platforms to validate your research. We are looking for students with a strong scientific background, the ability to work in a team, respond to a dynamic environment and motivated to solve real world problems. The suitable candidate will be interviewed by SeeByte Ltd personnel as well as university staff. The successful candidate will become part of the SeeByte R&D team. He/she will be allocated a SeeByte and an academic supervisor. Due to the possible restricted nature of some of the work performed in SeeByte, we will only consider UK/EU applicants. The student will mostly be based in SeeByte and will be part of a team of researchers and engineers. The main role will be to research new techniques suitable to tackle these issues and apply them to relevant problems, sensors and datasets in SeeByte, implement them on real platforms and validate your research. |
From: Jennifer S. <st...@yo...> - 2015-11-20 15:51:01
|
FIRST CALL FOR ABSTRACTS – Oral Presentations and Posters – CAPnet-CPS CAN‐ACN SATELLITE SYMPOSIUM “Action & Perception: Cognition, Coding and Clinical Populations” Date: Sunday May 29th, 2016, 9 am to 5 pm Venue: Canadian Association for Neuroscience (CAN-CAN) Conference, Sheraton Centre Toronto Hotel, Toronto, ON PROGRAM DETAILS This one-day satellite symposium focuses on perception and sensorimotor processes underlying the control of vision and movement in healthy and clinical populations. It is jointly organized by the Canadian Action and Perception Network (CAPnet), a neuroscience research consortium that focuses on sensation, perception, and movement control, and by the Canadian Physiological Society (CPS). The satellite is open to everyone and will highlight presentations from neuroscientists across Canada in three talk sessions, a poster session, and a keynote lecture given by the recipient of the 2016 CPS Sarrazin Lectureship (open for nominations until January 31, 2016; for more information see http://www.cpsscp.ca/sarrazin-award-lectureship; the 2015 Sarrazin Award recipient was Dr. Kathy Cullin, McGill). Presentation format: talks (15 minutes, including discussion) and posters We will have three themed talk sessions: 1) Coding and Computational Models of A & P: including neuroimaging, non-human primate and rodent models and computational models of perception and/or action. Chair: Dr. Julio Martinez (Western) 2) Cognition and Cognitive influences on A & P: including a breadth of approaches to higher level interactions or influences relating to perception and/or action. Chair: TBA 3) A & P in Clinical Populations: covering diverse clinical populations focusing on how such cohorts inform models of perception and/or action in typical non-clinical systems. Chair: TBA Program Committee: Jennifer Steeves (York; chair), Miriam Spering (UBC), Susanne Ferber (U of T), Ashley Parr (Queen’s), Craig Chapman (Alberta) More program details to follow. HOW TO SUBMIT AN ABSTRACT A& P Satellite abstracts can be the same as, or different from, those submitted to the main CAN‐ACN meeting. The number of oral presentations is limited (approx. 20) and will be selected by the program committee based on the excellence and novelty of the abstract, fit of the topic with the satellite theme, and to maximize the number of labs presenting. A preference for poster or talk should be included in the abstract submission. Two trainee awards, one for best talk and one for best poster, will be presented at the end of the satellite. Abstracts should be written in CAN‐ACN format (~250 words) and submitted online http://goo.gl/forms/NfVBnG2aW6 Closing date for abstract submission: February 29th, 2016 We will inform applicants of acceptance and presentation type (talk or poster), and post the final schedule, in early March 2016. HOW TO REGISTER Registration will be available through the CAN registration webpage shortly. Registration fee is $25 if combined with CAN meeting registration or $50 for those wishing to register for the satellite only (follow instructions on the satellite webpage (enter ‘coupon code’ CANsat1 into text box on page 1, select registration type ‘Satellite 1 ONLY’ at $50 rate). Travel support for trainees is available through the Canadian Physiological Society (CPS); to be eligible, both student and supervisor have to be CPS members (http://www.cpsscp.ca/student-travel-fund). |
From: Thomas R. <th...@gr...> - 2015-09-30 09:05:35
|
Salary - £24,000 to £39,000 (dependent on experience) Location - Scotland, Edinburgh ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ About SeeByte ¯¯¯¯¯¯¯¯¯¯¯¯¯ SeeByte, global market leader in the development of smart software for unmanned maritime systems, are looking to recruit Software Engineers with varied levels of experience for our Edinburgh office. You can expect to be working with state-of-the-art subsea robots on exciting and varied projects, global travel and at-sea experiments. There will also be opportunities to visit clients internationally to take part in in-water tests and trials, giving you the chance to see the real-world applications of the software you have created. This is a fantastic opportunity to work for an innovative and forward thinking company with an international client base. Main Purpose of the Role ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Engineers will get the opportunity to work on projects providing robotic solutions for domains such as oil pipeline surveying and offshore oil infrastructure inspection for clients in the oil and gas industry, and military mine countermeasure operations for various navies worldwide. Support and training will be given to allow you to develop within the role and become a specialist in software engineering for underwater systems. The role would suit an experienced engineer looking for an exciting career move, or a new graduate looking for their first professional position. Desirable Profile ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ SeeByte develops in a variety of software languages, but experience in at least one of the following languages is required: * C/C++ * Java * Scripting Languages In addition, experience in at least one of the following areas is desirable but not essential: * Embedded Real-time systems * Image Processing * User Interface Development * Database Management * Formal Software Testing * Commercial Software Development * Netbeans platform Successful candidates usually have a degree in Electronic/Computer Science/Software Engineering, or similar numerate discipline with a software engineering emphasis, or international equivalent. Relevant experience without qualifications will also be considered. Required skills: ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ * Experience in programming on Linux and Windows systems. * Good inter-personal/communications skills. * Comfortable working with external clients. * Dependable when working under tight deadlines. * Willingness to travel abroad. To apply please send a recent copy of your CV and a cover letter to hr...@se...<mailto:hr...@se...>. Because of the nature of the work associated with this post it is subject to special nationality rules and is open only to British, US or European Citizens. All offers of employment will be conditional to a satisfactory background check. NO RECRUITMENT AGENCIES |
From: Thomas R. <th...@gr...> - 2015-08-28 09:48:14
|
Salary - £24,000 to £39,000 (dependent on experience) Location - Scotland, Edinburgh ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ About SeeByte ¯¯¯¯¯¯¯¯¯¯¯¯¯ SeeByte, global market leader in the development of smart software for unmanned maritime systems, are looking to recruit Software Engineers with varied levels of experience for our Edinburgh office. You can expect to be working with state-of-the-art subsea robots on exciting and varied projects, global travel and at-sea experiments. There will also be opportunities to visit clients internationally to take part in in-water tests and trials, giving you the chance to see the real-world applications of the software you have created. This is a fantastic opportunity to work for an innovative and forward thinking company with an international client base. Main Purpose of the Role ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Engineers will get the opportunity to work on projects providing robotic solutions for domains such as oil pipeline surveying and offshore oil infrastructure inspection for clients in the oil and gas industry, and military mine countermeasure operations for various navies worldwide. Support and training will be given to allow you to develop within the role and become a specialist in software engineering for underwater systems. The role would suit an experienced engineer looking for an exciting career move, or a new graduate looking for their first professional position. Desirable Profile ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ SeeByte develops in a variety of software languages, but experience in at least one of the following languages is required: * C/C++ * Java * Scripting Languages In addition, experience in at least one of the following areas is desirable but not essential: * Embedded Real-time systems * Image Processing * User Interface Development * Database Management * Formal Software Testing * Commercial Software Development * Netbeans platform Successful candidates usually have a degree in Electronic/Computer Science/Software Engineering, or similar numerate discipline with a software engineering emphasis, or international equivalent. Relevant experience without qualifications will also be considered. Required skills: ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ * Experience in programming on Linux and Windows systems. * Good inter-personal/communications skills. * Comfortable working with external clients. * Dependable when working under tight deadlines. * Willingness to travel abroad. To apply please send a recent copy of your CV and a cover letter to hr...@se.... Because of the nature of the work associated with this post it is subject to special nationality rules and is open only to British, US or European Citizens. All offers of employment will be conditional to a satisfactory background check. NO RECRUITMENT AGENCIES |
From: Thomas R. <th...@gr...> - 2015-06-18 13:24:30
|
Junior Java Software Engineers - Edinburgh, Scotland Salary - £24,000 to £39,000 (dependent on experience) + pension scheme and bonuses Job Type - Permanent About SeeByte Ltd: SeeByte, global market leader in the development of smart software for unmanned maritime systems, are looking to recruit Software Engineers with varied levels of experience for our Edinburgh office. You can expect to be working with state-of-the-art subsea robots on exciting and varied projects, global travel and at-sea experiments. There will also be opportunities to visit clients internationally to take part in in-water tests and trials, giving you the chance to see the real-world applications of the software you have created. This is a fantastic opportunity to work for an innovative and forward thinking company with an international client base. Main Purpose of the Role: Engineers will get the opportunity to work on projects providing robotic solutions for domains such as oil pipeline surveying and offshore oil infrastructure inspection for clients in the oil and gas industry, and military mine countermeasure operations for various navies worldwide. Support and training will be given to allow you to develop within the role and become a specialist in software engineering for underwater systems. The role would suit an experienced engineer looking for an exciting career move, or a new graduate looking for their first professional position. Applicants MUST be proficient in java. Additionally it is desirable that the applicant has experience on: - Netbeans platform - C/C++ - Scripting Languages In addition, experience in at least one of the following areas is desirable but not essential: - User Interface Development, especially in JAVA/Netbeans - Embedded Real-time systems - Image Processing - User Interface Development - Database Management - Formal Software Testing - Commercial Software Development Successful candidates usually have a degree in Electronic/Computer Science/Software Engineering, or similar numerate discipline with a software engineering emphasis, or international equivalent. Relevant experience without qualifications will also be considered. Required skills: - Experience in programming on Linux and Windows systems. - Comfortable working with external clients. - Dependable when working under tight deadlines. - Willingness to travel abroad. To apply please send a recent copy of your CV and a cover letter to hr...@se...<mailto:hr...@se...>. Because of the nature of the work associated with this post it is subject to special nationality rules and is open only to British, US or European Citizens. All offers of employment will be conditional to a satisfactory background check. |
From: Thomas R. <th...@gr...> - 2015-06-09 13:11:40
|
Job Description: SeeByte, global market leader in the development of smart software for unmanned maritime robotic systems, are looking to recruit IT/Software Engineers into our Software Test Department, based at our Edinburgh offices. SeeByte utilises state-of-the-art software test and verification tools such as Jenkins, SonarQube and Ranorex to ensure our robotic and data management products have the highest levels of reliability and integrity in a domain where quality and safety is paramount. This is a fantastic opportunity to play a key role in shaping the future of how SeeByte products are built, tested and deployed to clients with the chance to research and implement new continuous delivery technologies and techniques. You can expect to be working with software systems, continuous integration and automated testing frameworks such as Jenkins and Ranorex. The role will assist in the development and deployment of new tools and manage supporting IT infrastructure. As a member of the Test Department team, your main responsibilities will involve: - Contribute to the infrastructure supporting the continuous delivery pipeline of SeeByte products such as embedded smart software and user interface components such as SeeTrack Military, SeeTrack CoPilot and AIV autonomous vehicle system - Testing interprocess communications, user experience, autonomous mission planning and execution and post-mission analysis tools for collected data - Extend existing continuous integration and automated testing infrastructure - Develop new strategies to validate all aspects of the lifecycle of SeeByte software - Analyse deployment scenarios for the software and execute test cases under controlled conditions This is a great opportunity to join a growing team, develop new personal and technical skills, and help shape the future testing and deployment capabilities within SeeByte. This position would be especially suited to a new graduate or junior engineer. On the job training will be given among the other benefits of working for SeeByte such as: - Private pension - Annual bonuses - Family benefits such as an HMRC approved childcare voucher scheme - Great opportunities to learn as part of a developing team - Chance to work for a company who has a reputation for delivering quality software and never before seen capabilities in the field of autonomous and remotely operated underwater vehicles Skills & Requirements: Graduate in Computer Science/IT/Software/Electronic Engineering or similar. Other relevant qualifications & experience will be considered. Technical Skills: Continuous Integration Systems such as Jenkins, CDash or Teamcity - Unit testing and integration testing - Issue tracking systems, such as Bugzilla or Jira - Source code management, such SVN, git, mercurial, bazaar - Build systems such as Maven, CMake, Visual Studio - General Linux or Windows scripting skills (e.g. bash, cmd-prompt) Skills in some of the following would be an advantage, but not essential: - Virtualisation, including setup and management General Skills: - Good technical writing/reporting skills - Good inter-personal/communication skills - Confident working in a small company environment - Dependable when working to tight deadlines - Can-do attitude and willing to learn on the job About SeeByte Ltd: Operating from offices in Edinburgh, Scotland and San Diego, California, SeeByte has achieved a position of leadership in the development of smart software for underwater vehicles, sensors and systems in both the Military and Oil & Gas sectors. SeeByte provides products and services to major government and commercial clients around the world. In the military sector, SeeByte's SeeTrack Military software has been chosen by nineteen of the world's navies to optimise operations involving unmanned underwater vehicles. SeeTrack Military enables fast and efficient mission-planning, monitoring and post-mission analysis. In the oil & gas sector, SeeByte has developed tools to automate complex subsea tasks. In order to lessen the demands placed upon operators, smart software technology can be used to make operations more efficient and consistent. Through SeeByte's software capabilities, operators can focus on the job at hand with a higher level of confidence in vehicle control, improving quality and reducing the time and cost of performing a range of subsea tasks. SeeByte is increasingly partnering with leading hardware manufacturers to provide enhanced capabilities for their sensors and systems. These partnerships are changing the subsea industry by providing turn-key robotic solutions, capable of carrying out complex and often risky operations in a safe and more efficient manner. SeeByte's current partnerships include: Subsea 7: This collaboration will result in AIV (Autonomous Inspection Vehicle), the first truly autonomous inspection vehicle for the offshore Oil & Gas industry SMD: Paired with SeeByte, SMD now offer advanced vehicle control software with a range of automated capabilities for work class ROVs. VideoRay: Equipping Micro ROVs with advanced control software for a range of automated capabilities Bluefin Robotics: Bluefin's 21-inch AUV platforms are equipped with SeeTrack AutoTracker to autonomously perform export pipeline inspections. Teledyne Blueview: Providing advanced tracking software for forward looking sonars. To apply please send a recent copy of your CV and a cover letter to hr...@se...<mailto:hr...@se...> http://www.seebyte.com |
From: <ane...@us...> - 2014-01-09 02:55:02
|
Revision: 949 http://sourceforge.net/p/vision/code/949 Author: anevilyak Date: 2014-01-09 02:54:59 +0000 (Thu, 09 Jan 2014) Log Message: ----------- 0.9.7-20140108: Update CPU info retrieval to use newer core topology APIs. Modified Paths: -------------- branches/0.9.7/Makefile branches/0.9.7/src/ParseCTCP.cpp Modified: branches/0.9.7/Makefile =================================================================== --- branches/0.9.7/Makefile 2014-01-06 00:56:17 UTC (rev 948) +++ branches/0.9.7/Makefile 2014-01-09 02:54:59 UTC (rev 949) @@ -16,7 +16,7 @@ # the file name, ... BINARY := Vision -VERSION := 0.9.7-H-20131020 +VERSION := 0.9.7-H-20140108 BUILDDATE := $(shell date +%b_%d_%Y) BUILD_TYPE := Release Modified: branches/0.9.7/src/ParseCTCP.cpp =================================================================== --- branches/0.9.7/src/ParseCTCP.cpp 2014-01-06 00:56:17 UTC (rev 948) +++ branches/0.9.7/src/ParseCTCP.cpp 2014-01-09 02:54:59 UTC (rev 949) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -38,7 +38,7 @@ theRest (RestOfString(theMsg.String(), 2)); theCTCP.RemoveFirst ("\1"); theCTCP.RemoveLast ("\1"); - + if (theCTCP == "PING") { if (theMsg == "-9z99") @@ -49,76 +49,58 @@ tempString += theMsg; SendData (tempString.String()); } - + else if ((theCTCP == "VERSION") || (theCTCP == "CLIENTINFO")) { BString sysInfoString; if (!vision_app->GetBool ("versionParanoid")) { -#if 0 - BString librootversion; - BFile *libroot (new BFile ("/boot/beos/system/lib/libroot.so", B_READ_ONLY)); - BAppFileInfo info (libroot); - version_info version; - info.GetVersionInfo (&version, B_SYSTEM_VERSION_KIND); - librootversion = version.short_info; - librootversion.RemoveFirst ("R"); - - delete libroot; -#endif system_info myInfo; get_system_info (&myInfo); + cpu_topology_node_info* cpuInfo = NULL; + uint32 infoCount = 0; + uint64 clockSpeed = 0; + get_cpu_topology_info(NULL, &infoCount); + if (infoCount != 0) { + cpuInfo = new cpu_topology_node_info[infoCount]; + get_cpu_topology_info(cpuInfo, &infoCount); + + for (uint32 i = 0; i < infoCount; i++) { + if (cpuInfo[i].type == B_TOPOLOGY_CORE) { + clockSpeed = cpuInfo[i].data.core.default_frequency; + break; + } + } + + delete [] cpuInfo; + } + utsname sysname; uname(&sysname); - + BString revInfo = sysname.version; revInfo.Remove(revInfo.FindFirst(' '), revInfo.Length()); - + + sysInfoString = " : "; sysInfoString += sysname.sysname; sysInfoString += "/"; sysInfoString += revInfo; -#if 0 - if ((librootversion.FindFirst("5.0") == 0) || (librootversion == "5")) - { - // this is the way the BeOS 5.0.1 update checks for R5 Pro... - bool BePro; - BePro = true; // innocent until proven guilty - BFile *indeo5rt (new BFile ("/boot/beos/system/add-ons/media/encoders/indeo5rt.encoder", B_READ_ONLY)); - BFile *indeo5rtmmx (new BFile ("/boot/beos/system/add-ons/media/encoders/indeo5rtmmx.encoder", B_READ_ONLY)); - BFile *mp3 (new BFile ("/boot/beos/system/add-ons/media/encoders/mp3.encoder", B_READ_ONLY)); - - if ((indeo5rt->InitCheck() != B_OK) - || (indeo5rtmmx->InitCheck() != B_OK) - || (mp3->InitCheck() != B_OK)) - BePro = false; // *gasp*! leeches! - - delete indeo5rt; - delete indeo5rtmmx; - delete mp3; - - if (BePro) - sysInfoString += " Pro Edition"; - else - sysInfoString += " Personal Ed."; - - } -#endif sysInfoString += " ("; sysInfoString << myInfo.cpu_count; sysInfoString += "x"; - sysInfoString << myInfo.cpu_clock_speed / 1000000; + sysInfoString << clockSpeed / 1000000; sysInfoString += "MHz) : "; } else sysInfoString = " : A bird in the bush usually has a friend in there with him : "; - + BString tempString ("NOTICE "); BString tempString2; vision_app->VisionVersion (VERSION_VERSION, tempString2); tempString += theNick; - tempString += " :\1VERSION Vision-"; + tempString += " :\1VERSION Vision-"; tempString += tempString2; tempString += sysInfoString; tempString += "http://vision.sourceforge.net"; @@ -148,18 +130,18 @@ tempString += '\1'; SendData (tempString.String()); } - + else if ((theCTCP == "TIME") || (theCTCP == "DATE")) { time_t st (time (0)); struct tm curTime; - localtime_r (&st, &curTime); + localtime_r (&st, &curTime); char str[47]; strftime (str,47,"%A %b %d %Y %I:%M %p %Z",&curTime); BString tempString ("NOTICE "); tempString += theNick; - tempString += " :\1TIME "; + tempString += " :\1TIME "; tempString += str; tempString += '\1'; SendData (tempString.String()); @@ -235,7 +217,7 @@ msg.AddBool ("continue", true); fMsgr.SendMessage(&msg); - + delete data; break; } @@ -251,8 +233,8 @@ for (int32 i = 0; i < poss.Length(); ++i) pos = pos * 10 + poss[i] - '0'; - + // Have to tell the sender we can resume BString tempString("PRIVMSG "); tempString += theNick; @@ -264,20 +246,20 @@ tempString += poss; tempString += "\1"; SendData (tempString.String()); - + BMessage bMsg (M_DCC_MESSENGER), bReply; be_app_messenger.SendMessage (&bMsg, &bReply); - + BMessenger msgr; bReply.FindMessenger ("msgr", &msgr); - + BMessage msg (M_ADD_RESUME_DATA), reply; msg.AddString ("vision:nick", theNick.String()); msg.AddString ("vision:port", port.String()); msg.AddString ("vision:file", file.String()); msg.AddInt64 ("vision:pos", pos); - + // do sync.. we do not want to have the transfer // start before we tell it okay msgr.SendMessage (&msg, &reply); @@ -319,12 +301,12 @@ int32 theChars = theRest.Length(); if (theRest[theChars - 1] == '\1') theRest.Truncate (theChars - 1); - + buffer += "] "; buffer += theRest; buffer += '\n'; } - + PackDisplay (&display, buffer.String(), C_CTCP_REQ, C_BACKGROUND, F_SERVER); PostActive (&display); } @@ -381,7 +363,7 @@ tempString += theReply; tempString += '\n'; } - + BMessage display (M_DISPLAY); BString buffer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ane...@us...> - 2014-01-06 00:56:20
|
Revision: 948 http://sourceforge.net/p/vision/code/948 Author: anevilyak Date: 2014-01-06 00:56:17 +0000 (Mon, 06 Jan 2014) Log Message: ----------- Applied patch by GCI student "Freeman". Resolves Feature Request #5. Thanks! Modified Paths: -------------- branches/0.9.7/src/PrefLog.cpp branches/0.9.7/src/PrefLog.h branches/0.9.7/src/VisionMessages.h branches/0.9.7/src/VisionStrings.h branches/0.9.7/src/VisionStrings.h.en Modified: branches/0.9.7/src/PrefLog.cpp =================================================================== --- branches/0.9.7/src/PrefLog.cpp 2013-10-20 19:02:54 UTC (rev 947) +++ branches/0.9.7/src/PrefLog.cpp 2014-01-06 00:56:17 UTC (rev 948) @@ -26,7 +26,11 @@ #include "VTextControl.h" #include <Alert.h> +#include <Button.h> #include <CheckBox.h> +#include <Directory.h> +#include <FindDirectory.h> +#include <Entry.h> #include <Path.h> #include <ctype.h> @@ -58,6 +62,15 @@ checkboxRect.top += fLogStampFormat->Bounds().Height() * 1.2; BMessage msg (M_PREFLOG_CHECKBOX_CHANGED); + fClearLogs = new BButton(BRect(0,0,0,0), "Clear Logs", S_PREFLOG_DELETE_LOGS, + new BMessage(M_PREFLOG_DELETE_LOGS)); + fClearLogs->ResizeToPreferred(); + fClearLogs->MoveTo(fLogBaseDir->Bounds().Width() + 200, + fLogBaseDir->Frame().bottom + be_plain_font->Size()); + if (_CheckIfEmpty()) + fClearLogs->SetEnabled(false); + AddChild(fClearLogs); + checkboxRect.top += be_plain_font->Size(); checkboxRect.bottom = checkboxRect.top; msg.AddString ("setting", "timestamp"); @@ -111,6 +124,7 @@ fLogBaseDir->ResizeTo (Bounds().Width() - 15, fLogBaseDir->Bounds().Height()); fLogStampFormat->SetTarget (this); fLogStampFormat->ResizeTo (Bounds().Width() / 2.0, fLogStampFormat->Bounds().Height()); + fClearLogs->SetTarget (this); fTimeStamp->SetTarget (this); fTimeStamp->MoveTo (be_plain_font->StringWidth ("S"), fLogStampFormat->Frame().bottom + fLogStampFormat->Bounds().Height()); fLogEnabled->SetTarget (this); @@ -177,9 +191,53 @@ vision_app->SetString ("timestamp_format", 0, fLogStampFormat->Text()); } break; - + + case M_PREFLOG_DELETE_LOGS: + { + BString path(vision_app->GetString ("logBaseDir")); + BEntry entry(path.String()); + _DeleteLogs(&entry); + fClearLogs->SetEnabled(false); + } + break; + default: BView::MessageReceived (msg); break; } } + + +void +LogPrefsView::_DeleteLogs(BEntry* dir_entry) +{ + BEntry entry; + BDirectory dir(dir_entry); + dir.Rewind(); + while (dir.GetNextEntry(&entry) == B_OK) + { + if (entry.IsDirectory()) + _DeleteLogs(&entry); + else + entry.Remove(); + } +} + + +bool +LogPrefsView::_CheckIfEmpty() +{ + BString path(vision_app->GetString ("logBaseDir")); + BDirectory dir(path.String()); + BEntry entry; + while (dir.GetNextEntry(&entry) == B_OK) + { + if (entry.IsDirectory()) { + BDirectory directory(&entry); + if (directory.CountEntries() > 0) + return false; + } else + return false; + } + return true; +} Modified: branches/0.9.7/src/PrefLog.h =================================================================== --- branches/0.9.7/src/PrefLog.h 2013-10-20 19:02:54 UTC (rev 947) +++ branches/0.9.7/src/PrefLog.h 2014-01-06 00:56:17 UTC (rev 948) @@ -28,6 +28,8 @@ class BMenuField; class BCheckBox; class BBox; +class BButton; +class BEntry; class LogPrefsView : public BView { @@ -46,6 +48,10 @@ BCheckBox *fLogEnabled, *fLogFileTimestamp, *fTimeStamp; + BButton *fClearLogs; + private: + void _DeleteLogs(BEntry* dir_entry); + bool _CheckIfEmpty(); }; #endif // _PREFLOG_H Modified: branches/0.9.7/src/VisionMessages.h =================================================================== --- branches/0.9.7/src/VisionMessages.h 2013-10-20 19:02:54 UTC (rev 947) +++ branches/0.9.7/src/VisionMessages.h 2014-01-06 00:56:17 UTC (rev 948) @@ -232,6 +232,7 @@ const uint32 M_PREFLOG_LOGPATH_CHANGED = 0x2315; const uint32 M_PREFLOG_TS_FORMAT_CHANGED = 0x2316; const uint32 M_DCC_PRIVATE_CHANGED = 0x2317; +const uint32 M_PREFLOG_DELETE_LOGS = 0x2318; // misc Modified: branches/0.9.7/src/VisionStrings.h =================================================================== --- branches/0.9.7/src/VisionStrings.h 2013-10-20 19:02:54 UTC (rev 947) +++ branches/0.9.7/src/VisionStrings.h 2014-01-06 00:56:17 UTC (rev 948) @@ -369,6 +369,7 @@ #define S_PREFLOG_ALERT_TITLE "Error" #define S_PREFLOG_ALERT_TEXT "The log path you have entered is invalid." #define S_PREFLOG_ALERT_BUTTON "OK" +#define S_PREFLOG_DELETE_LOGS "Delete Log Files" // main prefs view Modified: branches/0.9.7/src/VisionStrings.h.en =================================================================== --- branches/0.9.7/src/VisionStrings.h.en 2013-10-20 19:02:54 UTC (rev 947) +++ branches/0.9.7/src/VisionStrings.h.en 2014-01-06 00:56:17 UTC (rev 948) @@ -362,7 +362,7 @@ #define S_PREFLOG_ALERT_TITLE "Error" #define S_PREFLOG_ALERT_TEXT "The log path you have entered is invalid." #define S_PREFLOG_ALERT_BUTTON "OK" - +#define S_PREFLOG_DELETE_LOGS "Delete Log Files" // main prefs view #define S_PREFGEN_APP_ITEM "Application" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ane...@us...> - 2013-10-20 19:02:58
|
Revision: 947 http://sourceforge.net/p/vision/code/947 Author: anevilyak Date: 2013-10-20 19:02:54 +0000 (Sun, 20 Oct 2013) Log Message: ----------- 20131020: Fix incorrect handling of nick notifications. - Only send the notifications after having run through the loop, not on each pass, otherwise one would get incrementally larger notifications when multiple nicks were reported online simultaneously, rather than a single notification at the end. Reported by Matt Madia. Modified Paths: -------------- branches/0.9.7/Makefile branches/0.9.7/src/ParseENums.cpp Modified: branches/0.9.7/Makefile =================================================================== --- branches/0.9.7/Makefile 2013-10-05 02:03:57 UTC (rev 946) +++ branches/0.9.7/Makefile 2013-10-20 19:02:54 UTC (rev 947) @@ -16,7 +16,7 @@ # the file name, ... BINARY := Vision -VERSION := 0.9.7-H-20131004 +VERSION := 0.9.7-H-20131020 BUILDDATE := $(shell date +%b_%d_%Y) BUILD_TYPE := Release @@ -84,10 +84,7 @@ LDFLAGS := $(REG_LIBS) -nodefaultlibs -ifeq ($(wildcard /boot/common/include/infopopper/InfoPopper.h), ) -else - CFLAGS += -DUSE_INFOPOPPER=1 -endif +CFLAGS += -DUSE_INFOPOPPER=1 DEP := gcc -MM -DBEOS_BUILD Modified: branches/0.9.7/src/ParseENums.cpp =================================================================== --- branches/0.9.7/src/ParseENums.cpp 2013-10-05 02:03:57 UTC (rev 946) +++ branches/0.9.7/src/ParseENums.cpp 2013-10-20 19:02:54 UTC (rev 947) @@ -471,43 +471,44 @@ offlined << item->Text(); } } + } - if (offlined.Length()) - { - BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetGroup(BString("Vision")); - entry_ref ref = vision_app->AppRef(); - notification.SetOnClickFile(&ref); - notification.SetTitle(fServerName.String()); - BString content; - content << offlined; - if (offlined.FindFirst(' ') > -1) - content << " are offline"; - else - content << " is offline"; + if (offlined.Length()) + { + BNotification notification(B_INFORMATION_NOTIFICATION); + notification.SetGroup(BString("Vision")); + entry_ref ref = vision_app->AppRef(); + notification.SetOnClickFile(&ref); + notification.SetTitle(fServerName.String()); + BString content; + content << offlined; + if (offlined.FindFirst(' ') > -1) + content << " are offline"; + else + content << " is offline"; - notification.SetContent(content); - notification.Send(); - } - if (onlined.Length()) - { - BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetGroup(BString("Vision")); - entry_ref ref = vision_app->AppRef(); - notification.SetOnClickFile(&ref); - notification.SetTitle(fServerName.String()); - BString content; - content << onlined; - if (onlined.FindFirst(' ') > -1) - content << " are online"; - else - content << " is online"; + notification.SetContent(content); + notification.Send(); + } - notification.SetContent(content); - notification.Send(); - } + if (onlined.Length()) + { + BNotification notification(B_INFORMATION_NOTIFICATION); + notification.SetGroup(BString("Vision")); + entry_ref ref = vision_app->AppRef(); + notification.SetOnClickFile(&ref); + notification.SetTitle(fServerName.String()); + BString content; + content << onlined; + if (onlined.FindFirst(' ') > -1) + content << " are online"; + else + content << " is online"; + notification.SetContent(content); + notification.Send(); } + fNotifyNicks.SortItems(SortNotifyItems); msg.AddPointer ("list", &fNotifyNicks); msg.AddPointer ("source", this); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ane...@us...> - 2013-10-05 02:04:01
|
Revision: 946 http://sourceforge.net/p/vision/code/946 Author: anevilyak Date: 2013-10-05 02:03:57 +0000 (Sat, 05 Oct 2013) Log Message: ----------- Fix logging regression as a result of package management. - To date, we have always defaulted to saving our logs in a subdir of the app directory. This is no longer feasible, as the latter is read-only in PM world. Furthermore, due to a lack of error checking, this would result in some code falling through and instead creating the log folders in /boot/home, even when logging was disabled. The error check is now properly guarded, and the logic changed anyways, so if the log path is given as relative (the default), we now create it as a subdir off the Vision settings directory instead. Modified Paths: -------------- branches/0.9.7/Makefile branches/0.9.7/src/ClientAgentLogger.cpp branches/0.9.7/src/ClientAgentLogger.h branches/0.9.7/src/Vision.cpp Modified: branches/0.9.7/Makefile =================================================================== --- branches/0.9.7/Makefile 2013-07-28 14:21:27 UTC (rev 945) +++ branches/0.9.7/Makefile 2013-10-05 02:03:57 UTC (rev 946) @@ -16,7 +16,7 @@ # the file name, ... BINARY := Vision -VERSION := 0.9.7-H-280704 +VERSION := 0.9.7-H-20131004 BUILDDATE := $(shell date +%b_%d_%Y) BUILD_TYPE := Release Modified: branches/0.9.7/src/ClientAgentLogger.cpp =================================================================== --- branches/0.9.7/src/ClientAgentLogger.cpp 2013-07-28 14:21:27 UTC (rev 945) +++ branches/0.9.7/src/ClientAgentLogger.cpp 2013-10-05 02:03:57 UTC (rev 946) @@ -1,33 +1,34 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair * Alan Ellis <al...@cg...> */ - + +#include <Application.h> +#include <Directory.h> +#include <Entry.h> +#include <FindDirectory.h> +#include <Mime.h> #include <Path.h> -#include <Entry.h> -#include <Directory.h> -#include <Application.h> #include <Roster.h> -#include <Mime.h> #include "ClientAgentLogger.h" #include "Utilities.h" @@ -40,6 +41,7 @@ fIsLogging = false; fLogThread = -1; fNewLine = false; + fLogSetupDone = false; StartLogging(); } @@ -70,13 +72,13 @@ fLogBuffer = new BObjectList<BString>(); fLogBufferLock = new BLocker(); fIsLogging = true; - + // semaphore used to synchronize the log thread and newly incoming log requests fLogSyncherLock = create_sem (0, "logSynchLock_sem"); - + BString name; vision_app->GetThreadName (THREAD_L, name); - + fLogThread = spawn_thread (AsyncLogger, name.String(), B_LOW_PRIORITY, @@ -99,7 +101,7 @@ // if it doesn't already exist // initialize the file, otherwise just open the existing one // and add a starting session line - + time_t myTime (time (0)); struct tm ptr; localtime_r (&myTime, &ptr); @@ -108,7 +110,7 @@ wName.ReplaceAll ("/", "_"); wName.ReplaceAll ("*", "_"); wName.ReplaceAll ("?", "_"); - + // append timestamp in year/month/day format to filename if desired if (vision_app->GetBool ("log_filetimestamp")) { @@ -122,12 +124,12 @@ BPath filePath (fLogPath); filePath.Append (wName.String()); - + if (filePath.InitCheck() != B_OK) return; - + BFile logFile(filePath.Path(), B_READ_WRITE | B_CREATE_FILE | B_OPEN_AT_END); - + if (logFile.InitCheck() == B_OK) { char tempTime[96]; @@ -162,10 +164,10 @@ for (int32 i = 0; i < fLogBuffer->CountItems();) { BString *currentLog (NULL); - + // read through buffer and find all strings that belonged to this file, // then write and remove them - + if (((currentLog = fLogBuffer->ItemAt(i)) != NULL) && (currentLog->ICompare (name) == 0)) { @@ -179,7 +181,7 @@ } fLogBufferLock->Unlock(); } - + CloseSession (logFile); BString logName (name); fLogFiles.erase(logName); @@ -197,7 +199,7 @@ localtime_r (&myTime, &ptr); char tempTime[96]; strftime (tempTime, 96, "Session Close: %a %b %d %H:%M %Y\n", &ptr); - off_t len = strlen (tempTime); + size_t len = strlen (tempTime); logFile.Write (tempTime, len); logFile.Unset(); } @@ -206,32 +208,38 @@ void ClientAgentLogger::SetupLogging (void) { - // create the dirs if they don't already exist + if (fLogSetupDone) + return; - app_info ai; - be_app->GetAppInfo (&ai); + if (!vision_app->GetBool("log_enabled")) + return; - BEntry entry (&ai.ref); - if (entry.InitCheck() == B_OK) - { - entry.GetPath (&fLogPath); - if (fLogPath.InitCheck() == B_OK) - fLogPath.GetParent (&fLogPath); - - BString visLogPath (vision_app->GetString ("logBaseDir")); - if (visLogPath.Length() == 0) - visLogPath = "logs"; - else if (visLogPath[0] == '/') - fLogPath.SetTo (visLogPath.String()); - else - fLogPath.Append (visLogPath.String()); - create_directory (fLogPath.Path(), 0777); - BDirectory dir (fLogPath.Path()); - BString sName (fServerName); - sName.ToLower(); - dir.CreateDirectory (sName.String(), &dir); - fLogPath.Append (sName.String()); - } + // create the dirs if they don't already exist + BString visLogPath (vision_app->GetString ("logBaseDir")); + if (visLogPath.Length() == 0) + visLogPath = "logs"; + else if (visLogPath[0] == '/') + fLogPath.SetTo (visLogPath.String()); + else { + if (find_directory(B_USER_SETTINGS_DIRECTORY, &fLogPath) == B_OK) + fLogPath.Append("Vision"); + else + return; + fLogPath.Append (visLogPath.String()); + } + + if (create_directory (fLogPath.Path(), 0777) != B_OK) + return; + + BDirectory dir (fLogPath.Path()); + if (dir.InitCheck() == B_OK) { + BString sName (fServerName); + sName.ToLower(); + dir.CreateDirectory (sName.String(), &dir); + fLogPath.Append (sName.String()); + fLogSetupDone = true; + } + } void @@ -239,20 +247,27 @@ { if (!fIsLogging) return; - + if ((loggername == NULL) || (data == NULL)) return; - + + // depending on log state at the time the logger was initialized, + // the file may not yet exist. Attempt to create it if so. + if (fLogFiles.find(loggername) == fLogFiles.end()) + { + RegisterLogger(loggername); + } + // add entry to logfile for fLogThread to write asynchronously fLogBufferLock->Lock(); BString *pathString (new BString (loggername)); BString *logString (new BString (data)); - + if (fNewLine) logString->Prepend (TimeStamp().String()); - + fNewLine = (logString->IFindFirst("\n") == B_ERROR) ? false : true; - + fLogBuffer->AddItem (pathString); fLogBuffer->AddItem (logString); fLogBufferLock->Unlock(); @@ -264,15 +279,12 @@ ClientAgentLogger::AsyncLogger (void *arg) { ClientAgentLogger *logger ((ClientAgentLogger *)arg); - + BString *currentLogger (NULL); BString *currentString (NULL); BLocker *myLogBufferLock ((logger->fLogBufferLock)); BObjectList<BString> *myLogBuffer ((logger->fLogBuffer)); - BFile *myLogFile; - - // initialize the log file if it doesn't already exist - logger->SetupLogging(); + BFile *myLogFile; // sit in event loop waiting for new data // loop will break when ~Logger deletes the semaphore @@ -281,6 +293,8 @@ myLogBufferLock->Lock(); if (!myLogBuffer->IsEmpty()) { + if (!logger->fLogSetupDone) + logger->SetupLogging(); // grab next string from list and write to file currentLogger = myLogBuffer->RemoveItemAt (0L); currentString = myLogBuffer->RemoveItemAt (0L); @@ -305,7 +319,7 @@ delete currentLogger; delete currentString; } - + // clean up the now unneeded BList and Locker delete myLogBuffer; delete myLogBufferLock; Modified: branches/0.9.7/src/ClientAgentLogger.h =================================================================== --- branches/0.9.7/src/ClientAgentLogger.h 2013-07-28 14:21:27 UTC (rev 945) +++ branches/0.9.7/src/ClientAgentLogger.h 2013-10-05 02:03:57 UTC (rev 946) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -42,12 +42,12 @@ virtual ~ClientAgentLogger (void); void StartLogging (void); void RegisterLogger (const char *); - void UnregisterLogger (const char *); + void UnregisterLogger (const char *); void Log (const char *, const char *); void StopLogging (void); bool fIsQuitting; bool fIsLogging; - + private: void SetupLogging (void); void CloseSession (BFile &); @@ -60,7 +60,8 @@ BLocker *fLogBufferLock; sem_id fLogSyncherLock; bool fNewLine; - filemap fLogFiles; + filemap fLogFiles; + bool fLogSetupDone; }; #endif Modified: branches/0.9.7/src/Vision.cpp =================================================================== --- branches/0.9.7/src/Vision.cpp 2013-07-28 14:21:27 UTC (rev 945) +++ branches/0.9.7/src/Vision.cpp 2013-10-05 02:03:57 UTC (rev 946) @@ -526,8 +526,14 @@ if (!fVisionSettings->HasBool ("notifyExpanded")) fVisionSettings->AddBool("notifyExpanded", true); - if (!fVisionSettings->HasString ("logBaseDir")) - fVisionSettings->AddString("logBaseDir", "logs"); + if (!fVisionSettings->HasString ("logBaseDir")) { + BPath base; + if (find_directory(B_USER_SETTINGS_DIRECTORY, &base) == B_OK) { + base.Append("Vision"); + base.Append("logs"); + } + fVisionSettings->AddString("logBaseDir", base.Path()); + } if (!fVisionSettings->HasInt32 ("encoding")) fVisionSettings->AddInt32("encoding", B_ISO1_CONVERSION); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ane...@us...> - 2013-07-28 14:21:31
|
Revision: 945 http://sourceforge.net/p/vision/code/945 Author: anevilyak Date: 2013-07-28 14:21:27 +0000 (Sun, 28 Jul 2013) Log Message: ----------- - Update to latest Haiku version of BColumnListView. - 64-bit fixes. Modified Paths: -------------- branches/0.9.7/Makefile branches/0.9.7/src/ChannelAgent.h branches/0.9.7/src/ClientAgentInputFilter.cpp branches/0.9.7/src/ColorSelector.cpp branches/0.9.7/src/ColumnListView.cpp branches/0.9.7/src/ColumnListView.h branches/0.9.7/src/ColumnTypes.cpp branches/0.9.7/src/ColumnTypes.h branches/0.9.7/src/NamesView.cpp branches/0.9.7/src/NetPrefsServerView.cpp branches/0.9.7/src/NetworkMenu.cpp branches/0.9.7/src/NetworkPrefsView.cpp branches/0.9.7/src/NotifyList.cpp branches/0.9.7/src/PrefGeneral.cpp branches/0.9.7/src/ServerAgent.cpp branches/0.9.7/src/ServerAgent.h branches/0.9.7/src/StatusView.cpp branches/0.9.7/src/Vision.cpp branches/0.9.7/src/WindowList.cpp Added Paths: ----------- branches/0.9.7/src/ObjectListPrivate.h Removed Paths: ------------- branches/0.9.7/src/ObjectList.h Modified: branches/0.9.7/Makefile =================================================================== --- branches/0.9.7/Makefile 2013-06-05 00:25:23 UTC (rev 944) +++ branches/0.9.7/Makefile 2013-07-28 14:21:27 UTC (rev 945) @@ -16,7 +16,7 @@ # the file name, ... BINARY := Vision -VERSION := 0.9.7-H-130604 +VERSION := 0.9.7-H-280704 BUILDDATE := $(shell date +%b_%d_%Y) BUILD_TYPE := Release @@ -69,9 +69,8 @@ CFLAGS += -DBEOS_BUILD CFLAGS += -DBUILD_DATE=\"$(BUILDDATE)\" -CFLAGS += -fno-pic +CFLAGS += -fPIC CFLAGS += -ffast-math -CFLAGS += -march=pentium -mcpu=pentiumpro CFLAGS += -Wall -W -Wno-multichar -Wpointer-arith CFLAGS += -Wwrite-strings -Woverloaded-virtual CFLAGS += -Wconversion -Wpointer-arith Modified: branches/0.9.7/src/ChannelAgent.h =================================================================== --- branches/0.9.7/src/ChannelAgent.h 2013-06-05 00:25:23 UTC (rev 944) +++ branches/0.9.7/src/ChannelAgent.h 2013-07-28 14:21:27 UTC (rev 945) @@ -29,7 +29,7 @@ #include <Rect.h> #include <String.h> #include "ClientAgent.h" -#include "ObjectList.h" +#include <ObjectList.h> class ChannelOptions; class BScrollView; Modified: branches/0.9.7/src/ClientAgentInputFilter.cpp =================================================================== --- branches/0.9.7/src/ClientAgentInputFilter.cpp 2013-06-05 00:25:23 UTC (rev 944) +++ branches/0.9.7/src/ClientAgentInputFilter.cpp 2013-07-28 14:21:27 UTC (rev 945) @@ -165,7 +165,7 @@ // we have our own pasting code so we can catch multiple lines BClipboard clipboard ("system"); const char *fText; - int32 textLen; + ssize_t textLen; BMessage *clip ((BMessage *)NULL); if (clipboard.Lock()) Modified: branches/0.9.7/src/ColorSelector.cpp =================================================================== --- branches/0.9.7/src/ColorSelector.cpp 2013-06-05 00:25:23 UTC (rev 944) +++ branches/0.9.7/src/ColorSelector.cpp 2013-07-28 14:21:27 UTC (rev 945) @@ -243,7 +243,7 @@ fColorPalette->SetDoubleBuffering (B_UPDATE_INVALIDATED | B_UPDATE_RESIZED | B_UPDATE_EXPOSED); #else rgb_color *color (NULL); - int32 size (0); + ssize_t size (0); fColors.FindData ("color", B_RGB_COLOR_TYPE, 0, (const void **)(&color), &size); swatch = new ColorSwatch (dummyRect, "swatch", *color); AddChild (swatch); @@ -332,7 +332,7 @@ { if (msg->WasDropped()) { rgb_color *color; - int32 size; + ssize_t size; if (msg->FindData ("RGBColor", B_RGB_COLOR_TYPE, (const void **)&color, &size) == B_OK) { if (fColorPalette) { @@ -352,7 +352,7 @@ case CMD_CHOOSE_UI_COLOR: { const char* field; int32 index (0); - int32 size; + ssize_t size; if (msg->FindString("field", &field) == B_OK) { msg->FindInt32 ("index", &index); fCurrentField = field; @@ -449,7 +449,7 @@ void ColorSelector::Update(const BMessage& changes) { int32 index (0); - int32 size (0); + ssize_t size (0); rgb_color *color; changes.FindInt32 ("index", &index); changes.FindData ("color", B_RGB_COLOR_TYPE, (const void **)(&color), &size); @@ -477,7 +477,7 @@ BMessage OriginalColors = fInitColors; SetTo (OriginalColors); rgb_color *color; - int32 size (0); + ssize_t size (0); for (int32 i = 0; i < MAX_COLORS; i++) if (fInitColors.FindData ("color", B_RGB_COLOR_TYPE, i, (const void **)(&color), &size) == B_OK) Modified: branches/0.9.7/src/ColumnListView.cpp =================================================================== --- branches/0.9.7/src/ColumnListView.cpp 2013-06-05 00:25:23 UTC (rev 944) +++ branches/0.9.7/src/ColumnListView.cpp 2013-07-28 14:21:27 UTC (rev 945) @@ -43,6 +43,8 @@ / *******************************************************************************/ +#include "ColumnListView.h" + #include <typeinfo> #include <stdio.h> @@ -50,85 +52,33 @@ #include <Application.h> #include <Bitmap.h> +#include <ControlLook.h> #include <Cursor.h> #include <Debug.h> #include <GraphicsDefs.h> +#include <LayoutUtils.h> #include <MenuItem.h> #include <PopUpMenu.h> #include <Region.h> #include <ScrollBar.h> #include <String.h> +#include <SupportDefs.h> #include <Window.h> +#include "ObjectListPrivate.h" + +#include "ColorTools.h" #include "ObjectList.h" -#include "ColumnListView.h" -#include "ColorTools.h" -/* -#ifndef _ARCHIVE_DEFS_H -#include <archive_defs.h> -#endif -*/ + #define DOUBLE_BUFFERED_COLUMN_RESIZE 1 #define SMART_REDRAW 1 #define DRAG_TITLE_OUTLINE 1 #define CONSTRAIN_CLIPPING_REGION 1 -#define LOWER_SCROLLBAR 1 +#define LOWER_SCROLLBAR 0 namespace BPrivate { -static const unsigned char kResizeCursorData[] = { - 16, 1, 8, 8, - 0x03, 0xc0, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, - 0x1a, 0x58, 0x2a, 0x54, 0x4a, 0x52, 0x8a, 0x51, - 0x8a, 0x51, 0x4a, 0x52, 0x2a, 0x54, 0x1a, 0x58, - 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x03, 0xc0, - - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, - 0x1b, 0xd8, 0x3b, 0xdc, 0x7b, 0xde, 0xfb, 0xdf, - 0xfb, 0xdf, 0x7b, 0xde, 0x3b, 0xdc, 0x1b, 0xd8, - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0 -}; - -static const unsigned char kMaxResizeCursorData[] = { - 16, 1, 8, 8, - 0x03, 0xc0, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, - 0x1a, 0x40, 0x2a, 0x40, 0x4a, 0x40, 0x8a, 0x40, - 0x8a, 0x40, 0x4a, 0x40, 0x2a, 0x40, 0x1a, 0x40, - 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x03, 0xc0, - - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, - 0x1b, 0xc0, 0x3b, 0xc0, 0x7b, 0xc0, 0xfb, 0xc0, - 0xfb, 0xc0, 0x7b, 0xc0, 0x3b, 0xc0, 0x1b, 0xc0, - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0 -}; - -static const unsigned char kMinResizeCursorData[] = { - 16, 1, 8, 8, - 0x03, 0xc0, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, - 0x02, 0x58, 0x02, 0x54, 0x02, 0x52, 0x02, 0x51, - 0x02, 0x51, 0x02, 0x52, 0x02, 0x54, 0x02, 0x58, - 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x03, 0xc0, - - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, - 0x03, 0xd8, 0x03, 0xdc, 0x03, 0xde, 0x03, 0xdf, - 0x03, 0xdf, 0x03, 0xde, 0x03, 0xdc, 0x03, 0xd8, - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0 -}; - -static const unsigned char kColumnMoveCursorData[] = { - 16, 1, 8, 8, - 0x01, 0x80, 0x02, 0x40, 0x04, 0x20, 0x08, 0x10, - 0x1e, 0x78, 0x2a, 0x54, 0x4e, 0x72, 0x80, 0x01, - 0x80, 0x01, 0x4e, 0x72, 0x2a, 0x54, 0x1e, 0x78, - 0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x01, 0x80, - - 0x01, 0x80, 0x03, 0xc0, 0x07, 0xe0, 0x0f, 0xf0, - 0x1f, 0xf8, 0x3b, 0xdc, 0x7f, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0x7f, 0xfe, 0x3b, 0xdc, 0x1f, 0xf8, - 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0x80 -}; - -static const unsigned char kUpSortArrow8x8[] = { +static const unsigned char kDownSortArrow8x8[] = { 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, @@ -139,7 +89,7 @@ 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff }; -static const unsigned char kDownSortArrow8x8[] = { +static const unsigned char kUpSortArrow8x8[] = { 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, @@ -150,7 +100,7 @@ 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff }; -static const unsigned char kUpSortArrow8x8Invert[] = { +static const unsigned char kDownSortArrow8x8Invert[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -161,7 +111,7 @@ 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff }; -static const unsigned char kDownSortArrow8x8Invert[] = { +static const unsigned char kUpSortArrow8x8Invert[] = { 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x1f, 0x1f, 0xff, 0xff, 0xff, @@ -172,15 +122,15 @@ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -static const float kTintedLineTint = 0.7 * B_NO_TINT + 0.3 * B_DARKEN_1_TINT; +static const float kTintedLineTint = 1.04; -static const float kTitleHeight = 17.0; +static const float kTitleHeight = 16.0; static const float kLatchWidth = 15.0; static const rgb_color kColor[B_COLOR_TOTAL] = { - {236, 236, 236, 255}, // B_COLOR_BACKGROUND + {255, 255, 255, 255}, // B_COLOR_BACKGROUND { 0, 0, 0, 255}, // B_COLOR_TEXT {148, 148, 148, 255}, // B_COLOR_ROW_DIVIDER {190, 190, 190, 255}, // B_COLOR_SELECTION @@ -196,7 +146,7 @@ static const int32 kMaxDepth = 1024; static const float kLeftMargin = kLatchWidth; -static const float kRightMargin = kLatchWidth; +static const float kRightMargin = 8; static const float kOutlineLevelIndent = kLatchWidth; static const float kColumnResizeAreaWidth = 10.0; static const float kRowDragSensitivity = 5.0; @@ -211,352 +161,408 @@ }; class TitleView : public BView { + typedef BView _inherited; public: - TitleView(BRect, OutlineView*, BList *visibleColumns, BList *sortColumns, - BColumnListView *masterView, uint32 resizingMode); - ~TitleView(); - void ColumnAdded(BColumn*); - void SetColumnVisible(BColumn*, bool); + TitleView(BRect frame, OutlineView* outlineView, + BList* visibleColumns, BList* sortColumns, + BColumnListView* masterView, + uint32 resizingMode); + virtual ~TitleView(); - virtual void Draw(BRect rect); - virtual void ScrollTo(BPoint); - virtual void MessageReceived(BMessage*); - virtual void MouseDown(BPoint); - virtual void MouseMoved(BPoint, uint32, const BMessage*); - virtual void MouseUp(BPoint position); - virtual void FrameResized(float width, float height); - - void MoveColumn(BColumn *column, int32 index); - void SetColumnFlags(column_flags flags); + void ColumnAdded(BColumn* column); + void ColumnResized(BColumn* column, float oldWidth); + void SetColumnVisible(BColumn* column, bool visible); - void SetEditMode(bool state) { fEditMode = state; } + virtual void Draw(BRect updateRect); + virtual void ScrollTo(BPoint where); + virtual void MessageReceived(BMessage* message); + virtual void MouseDown(BPoint where); + virtual void MouseMoved(BPoint where, uint32 transit, + const BMessage* dragMessage); + virtual void MouseUp(BPoint where); + virtual void FrameResized(float width, float height); + void MoveColumn(BColumn* column, int32 index); + void SetColumnFlags(column_flags flags); + + void SetEditMode(bool state) + { fEditMode = state; } + + float MarginWidth() const; + private: - void GetTitleRect(BColumn*, BRect *out_rect); - int32 FindColumn(BPoint, float *out_leftEdge); - void FixScrollBar(bool scrollToFit); - void DragSelectedColumn(BPoint); - void ResizeSelectedColumn(BPoint, bool = false); - void ComputeDragBoundries(BColumn*, BPoint); - void DrawTitle(BView*, BRect, BColumn*, bool depressed); + void GetTitleRect(BColumn* column, BRect* _rect); + int32 FindColumn(BPoint where, float* _leftEdge); + void FixScrollBar(bool scrollToFit); + void DragSelectedColumn(BPoint where); + void ResizeSelectedColumn(BPoint where, + bool preferred = false); + void ComputeDragBoundries(BColumn* column, + BPoint where); + void DrawTitle(BView* view, BRect frame, + BColumn* column, bool depressed); - OutlineView *fOutlineView; - BList *fColumns; - BList *fSortColumns; - float fColumnsWidth; - BRect fVisibleRect; - + float _VirtualWidth() const; + + OutlineView* fOutlineView; + BList* fColumns; + BList* fSortColumns; +// float fColumnsWidth; + BRect fVisibleRect; + #if DOUBLE_BUFFERED_COLUMN_RESIZE - BBitmap *fDrawBuffer; - BView *fDrawBufferView; + BBitmap* fDrawBuffer; + BView* fDrawBufferView; #endif - enum { - INACTIVE, - RESIZING_COLUMN, - PRESSING_COLUMN, - DRAG_COLUMN_INSIDE_TITLE, - DRAG_COLUMN_OUTSIDE_TITLE - } fCurrentState; + enum { + INACTIVE, + RESIZING_COLUMN, + PRESSING_COLUMN, + DRAG_COLUMN_INSIDE_TITLE, + DRAG_COLUMN_OUTSIDE_TITLE + } fCurrentState; - BPopUpMenu *fColumnPop; - BColumnListView *fMasterView; - bool fEditMode; - int32 fColumnFlags; + BPopUpMenu* fColumnPop; + BColumnListView* fMasterView; + bool fEditMode; + int32 fColumnFlags; // State information for resizing/dragging - BColumn *fSelectedColumn; - BRect fSelectedColumnRect; - bool fResizingFirstColumn; - BPoint fClickPoint; // offset within cell - float fLeftDragBoundry; - float fRightDragBoundry; - BPoint fCurrentDragPosition; + BColumn* fSelectedColumn; + BRect fSelectedColumnRect; + bool fResizingFirstColumn; + BPoint fClickPoint; // offset within cell + float fLeftDragBoundry; + float fRightDragBoundry; + BPoint fCurrentDragPosition; - - BBitmap *fUpSortArrow; - BBitmap *fDownSortArrow; - BCursor *fResizeCursor; - BCursor *fMinResizeCursor; - BCursor *fMaxResizeCursor; - BCursor *fColumnMoveCursor; - - typedef BView _inherited; + BBitmap* fUpSortArrow; + BBitmap* fDownSortArrow; + + BCursor* fResizeCursor; + BCursor* fMinResizeCursor; + BCursor* fMaxResizeCursor; + BCursor* fColumnMoveCursor; }; class OutlineView : public BView { + typedef BView _inherited; public: - OutlineView(BRect, BList *visibleColumns, BList *sortColumns, BColumnListView *listView); - ~OutlineView(); + OutlineView(BRect, BList* visibleColumns, + BList* sortColumns, + BColumnListView* listView); + virtual ~OutlineView(); virtual void Draw(BRect); const BRect& VisibleRect() const; - void RedrawColumn(BColumn *column, float leftEdge, bool isFirstColumn); + void RedrawColumn(BColumn* column, float leftEdge, + bool isFirstColumn); void StartSorting(); - float GetColumnPreferredWidth(BColumn *column); - - void AddRow(BRow*, int32 index, BRow *TheRow); - BRow* CurrentSelection(BRow *lastSelected) const; + float GetColumnPreferredWidth(BColumn* column); + + void AddRow(BRow*, int32 index, BRow* TheRow); + BRow* CurrentSelection(BRow* lastSelected) const; void ToggleFocusRowSelection(bool selectRange); void ToggleFocusRowOpen(); - void ChangeFocusRow(bool up, bool updateSelection, bool addToCurrentSelection); + void ChangeFocusRow(bool up, bool updateSelection, + bool addToCurrentSelection); void MoveFocusToVisibleRect(); - void ExpandOrCollapse(BRow *parent, bool expand); + void ExpandOrCollapse(BRow* parent, bool expand); void RemoveRow(BRow*); BRowContainer* RowList(); void UpdateRow(BRow*); - bool FindParent(BRow *row, BRow **out_parent, bool *out_isVisible); - int32 IndexOf(BRow *row); + bool FindParent(BRow* row, BRow** _parent, + bool* _isVisible); + int32 IndexOf(BRow* row); void Deselect(BRow*); void AddToSelection(BRow*); void DeselectAll(); BRow* FocusRow() const; - void SetFocusRow(BRow *row, bool select); - BRow* FindRow(float ypos, int32 *out_indent, float *out_top); - bool FindRect(const BRow *row, BRect *out_rect); - void ScrollTo(const BRow* Row); + void SetFocusRow(BRow* row, bool select); + BRow* FindRow(float ypos, int32* _indent, + float* _top); + bool FindRect(const BRow* row, BRect* _rect); + void ScrollTo(const BRow* row); void Clear(); - void SetSelectionMode(list_view_type); + void SetSelectionMode(list_view_type type); list_view_type SelectionMode() const; void SetMouseTrackingEnabled(bool); void FixScrollBar(bool scrollToFit); - void SetEditMode(bool state) { fEditMode = state; } + void SetEditMode(bool state) + { fEditMode = state; } virtual void FrameResized(float width, float height); - virtual void ScrollTo(BPoint pt); - virtual void MouseDown(BPoint); - virtual void MouseMoved(BPoint, uint32, const BMessage*); - virtual void MouseUp(BPoint); - virtual void MessageReceived(BMessage*); + virtual void ScrollTo(BPoint where); + virtual void MouseDown(BPoint where); + virtual void MouseMoved(BPoint where, uint32 transit, + const BMessage* dragMessage); + virtual void MouseUp(BPoint where); + virtual void MessageReceived(BMessage* message); private: - bool SortList(BRowContainer *list, bool isVisible); - static int32 DeepSortThreadEntry(void *outlineView); + bool SortList(BRowContainer* list, bool isVisible); + static int32 DeepSortThreadEntry(void* outlineView); void DeepSort(); - void SelectRange(BRow *start, BRow *end); - int32 CompareRows(BRow *row1, BRow *row2); - void AddSorted(BRowContainer *list, BRow *row); - void RecursiveDeleteRows(BRowContainer *list, bool owner); + void SelectRange(BRow* start, BRow* end); + int32 CompareRows(BRow* row1, BRow* row2); + void AddSorted(BRowContainer* list, BRow* row); + void RecursiveDeleteRows(BRowContainer* list, + bool owner); void InvalidateCachedPositions(); - bool FindVisibleRect(BRow *row, BRect *out_rect); + bool FindVisibleRect(BRow* row, BRect* _rect); - BList* fColumns; - BList* fSortColumns; - float fItemsHeight; - BRowContainer fRows; - BRect fVisibleRect; + BList* fColumns; + BList* fSortColumns; + float fItemsHeight; + BRowContainer fRows; + BRect fVisibleRect; #if DOUBLE_BUFFERED_COLUMN_RESIZE - BBitmap* fDrawBuffer; - BView* fDrawBufferView; + BBitmap* fDrawBuffer; + BView* fDrawBufferView; #endif - BRow* fFocusRow; - BRect fFocusRowRect; - BRow* fRollOverRow; + BRow* fFocusRow; + BRect fFocusRowRect; + BRow* fRollOverRow; - BRow fSelectionListDummyHead; - BRow* fLastSelectedItem; - BRow* fFirstSelectedItem; + BRow fSelectionListDummyHead; + BRow* fLastSelectedItem; + BRow* fFirstSelectedItem; - thread_id fSortThread; - int32 fNumSorted; - bool fSortCancelled; + thread_id fSortThread; + int32 fNumSorted; + bool fSortCancelled; - enum CurrentState - { - INACTIVE, - LATCH_CLICKED, - ROW_CLICKED, - DRAGGING_ROWS - }; - - CurrentState fCurrentState; - + enum CurrentState { + INACTIVE, + LATCH_CLICKED, + ROW_CLICKED, + DRAGGING_ROWS + }; - BColumnListView* fMasterView; - list_view_type fSelectionMode; - bool fTrackMouse; - BField* fCurrentField; - BRow* fCurrentRow; - BColumn* fCurrentColumn; - bool fMouseDown; - BRect fFieldRect; - int32 fCurrentCode; - bool fEditMode; + CurrentState fCurrentState; + + BColumnListView* fMasterView; + list_view_type fSelectionMode; + bool fTrackMouse; + BField* fCurrentField; + BRow* fCurrentRow; + BColumn* fCurrentColumn; + bool fMouseDown; + BRect fFieldRect; + int32 fCurrentCode; + bool fEditMode; + // State information for mouse/keyboard interaction - BPoint fClickPoint; - bool fDragging; - int32 fClickCount; - BRow *fTargetRow; - float fTargetRowTop; - BRect fLatchRect; - float fDropHighlightY; + BPoint fClickPoint; + bool fDragging; + int32 fClickCount; + BRow* fTargetRow; + float fTargetRowTop; + BRect fLatchRect; + float fDropHighlightY; friend class RecursiveOutlineIterator; - typedef BView _inherited; }; class RecursiveOutlineIterator { public: - RecursiveOutlineIterator(BRowContainer*, bool openBranchesOnly = true); - BRow *CurrentRow() const; - int32 CurrentLevel() const; - void GoToNext(); + RecursiveOutlineIterator( + BRowContainer* container, + bool openBranchesOnly = true); + BRow* CurrentRow() const; + int32 CurrentLevel() const; + void GoToNext(); + private: - struct { - BRowContainer *fRowSet; - int32 fIndex; - int32 fDepth; - } fStack[kMaxDepth]; + struct { + BRowContainer* fRowSet; + int32 fIndex; + int32 fDepth; + } fStack[kMaxDepth]; - int32 fStackIndex; - BRowContainer *fCurrentList; - int32 fCurrentListIndex; - int32 fCurrentListDepth; - bool fOpenBranchesOnly; + int32 fStackIndex; + BRowContainer* fCurrentList; + int32 fCurrentListIndex; + int32 fCurrentListDepth; + bool fOpenBranchesOnly; }; } // namespace BPrivate + using namespace BPrivate; + BField::BField() { } + BField::~BField() { } + // #pragma mark - -void BColumn::MouseMoved(BColumnListView */*parent*/, BRow */*row*/, BField */*field*/, - BRect /*field_rect*/, BPoint/*point*/, uint32 /*buttons*/, int32 /*code*/) + +void +BColumn::MouseMoved(BColumnListView* /*parent*/, BRow* /*row*/, + BField* /*field*/, BRect /*field_rect*/, BPoint/*point*/, + uint32 /*buttons*/, int32 /*code*/) { } -void BColumn::MouseDown( BColumnListView */*parent*/, BRow */*row*/, BField */*field*/, - BRect /*field_rect*/, BPoint /*point*/, uint32 /*buttons*/) + +void +BColumn::MouseDown(BColumnListView* /*parent*/, BRow* /*row*/, + BField* /*field*/, BRect /*field_rect*/, BPoint /*point*/, + uint32 /*buttons*/) { } -void BColumn::MouseUp(BColumnListView */*parent*/, BRow */*row*/, BField */*field*/) + +void +BColumn::MouseUp(BColumnListView* /*parent*/, BRow* /*row*/, BField* /*field*/) { } + // #pragma mark - + BRow::BRow(float height) - : fChildList(NULL), - fIsExpanded(false), - fHeight(height), - fNextSelected(NULL), - fPrevSelected(NULL), - fParent(NULL), - fList(NULL) + : + fChildList(NULL), + fIsExpanded(false), + fHeight(height), + fNextSelected(NULL), + fPrevSelected(NULL), + fParent(NULL), + fList(NULL) { } + BRow::~BRow() { while (true) { - BField *field = (BField*) fFields.RemoveItem(0L); + BField* field = (BField*) fFields.RemoveItem((int32)0); if (field == 0) break; - + delete field; - } + } } -bool BRow::HasLatch() const + +bool +BRow::HasLatch() const { return fChildList != 0; } -int32 BRow::CountFields() const + +int32 +BRow::CountFields() const { return fFields.CountItems(); } -BField* BRow::GetField(int32 index) + +BField* +BRow::GetField(int32 index) { - return (BField*) fFields.ItemAt(index); + return (BField*)fFields.ItemAt(index); } -const BField* BRow::GetField(int32 index) const + +const BField* +BRow::GetField(int32 index) const { - return (const BField*) fFields.ItemAt(index); + return (const BField*)fFields.ItemAt(index); } -void BRow::SetField(BField *field, int32 logicalFieldIndex) + +void +BRow::SetField(BField* field, int32 logicalFieldIndex) { if (fFields.ItemAt(logicalFieldIndex) != 0) - delete (BField*) fFields.RemoveItem(logicalFieldIndex); - - if( NULL != fList ) { + delete (BField*)fFields.RemoveItem(logicalFieldIndex); + + if (NULL != fList) { ValidateField(field, logicalFieldIndex); BRect inv; fList->GetRowRect(this, &inv); fList->Invalidate(inv); } - + fFields.AddItem(field, logicalFieldIndex); } -float BRow::Height() const + +float +BRow::Height() const { return fHeight; } -bool BRow::IsExpanded() const + +bool +BRow::IsExpanded() const { return fIsExpanded; } -void + +bool +BRow::IsSelected() const +{ + return fPrevSelected != NULL; +} + + +void BRow::ValidateFields() const { - for( int32 i = 0; i < CountFields(); i++ ) - { + for (int32 i = 0; i < CountFields(); i++) ValidateField(GetField(i), i); - } } -void -BRow::ValidateField(const BField *field, int32 logicalFieldIndex) const + +void +BRow::ValidateField(const BField* field, int32 logicalFieldIndex) const { // The Fields may be moved by the user, but the logicalFieldIndexes // do not change, so we need to map them over when checking the // Field types. BColumn* col = NULL; int32 items = fList->CountColumns(); - for( int32 i = 0 ; i < items; ++i ) - { + for (int32 i = 0 ; i < items; ++i) { col = fList->ColumnAt(i); if( col->LogicalFieldNum() == logicalFieldIndex ) break; } - - if( NULL == col ) - { + + if (NULL == col) { BString dbmessage("\n\n\tThe parent BColumnListView does not have " "\n\ta BColumn at the logical field index "); dbmessage << logicalFieldIndex << ".\n\n"; printf(dbmessage.String()); - } - else - { - if( false == col->AcceptsField(field) ) - { + } else { + if (!col->AcceptsField(field)) { BString dbmessage("\n\n\tThe BColumn of type "); dbmessage << typeid(*col).name() << "\n\tat logical field index " - << logicalFieldIndex << "\n\tdoes not support the field type " + << logicalFieldIndex << "\n\tdoes not support the " + "field type " << typeid(*field).name() << ".\n\n"; debugger(dbmessage.String()); } @@ -566,111 +572,151 @@ // #pragma mark - + BColumn::BColumn(float width, float minWidth, float maxWidth, alignment align) - : fWidth(width), - fMinWidth(minWidth), - fMaxWidth(maxWidth), - fVisible(true), - fList(0), - fShowHeading(true), - fAlignment(align) + : + fWidth(width), + fMinWidth(minWidth), + fMaxWidth(maxWidth), + fVisible(true), + fList(0), + fShowHeading(true), + fAlignment(align) { } + BColumn::~BColumn() { } -float BColumn::Width() const + +float +BColumn::Width() const { return fWidth; } -void BColumn::SetWidth(float width) + +void +BColumn::SetWidth(float width) { fWidth = width; } -float BColumn::MinWidth() const + +float +BColumn::MinWidth() const { return fMinWidth; } -float BColumn::MaxWidth() const + +float +BColumn::MaxWidth() const { return fMaxWidth; } -void BColumn::DrawTitle(BRect, BView*) + +void +BColumn::DrawTitle(BRect, BView*) { } -void BColumn::DrawField(BField*, BRect, BView*) + +void +BColumn::DrawField(BField*, BRect, BView*) { } -int BColumn::CompareFields(BField *, BField *) + +int +BColumn::CompareFields(BField*, BField*) { return 0; } -void BColumn::GetColumnName(BString* into) const + +void +BColumn::GetColumnName(BString* into) const { *into = "(Unnamed)"; } -float BColumn::GetPreferredWidth(BField *field, BView *parent) const + +float +BColumn::GetPreferredWidth(BField* field, BView* parent) const { return fWidth; } -bool BColumn::IsVisible() const + +bool +BColumn::IsVisible() const { return fVisible; } -void BColumn::SetVisible(bool visible) + +void +BColumn::SetVisible(bool visible) { if (fList && (fVisible != visible)) fList->SetColumnVisible(this, visible); } -bool BColumn::ShowHeading() const + +bool +BColumn::ShowHeading() const { return fShowHeading; } -void BColumn::SetShowHeading(bool state) + +void +BColumn::SetShowHeading(bool state) { fShowHeading = state; } -alignment BColumn::Alignment() const + +alignment +BColumn::Alignment() const { return fAlignment; } -void BColumn::SetAlignment(alignment align) + +void +BColumn::SetAlignment(alignment align) { fAlignment = align; } -bool BColumn::WantsEvents() const + +bool +BColumn::WantsEvents() const { return fWantsEvents; } -void BColumn::SetWantsEvents(bool state) + +void +BColumn::SetWantsEvents(bool state) { fWantsEvents = state; } -int32 BColumn::LogicalFieldNum() const + +int32 +BColumn::LogicalFieldNum() const { return fFieldID; } -bool + +bool BColumn::AcceptsField(const BField*) const { return true; @@ -679,128 +725,68 @@ // #pragma mark - -BColumnListView::BColumnListView(BRect rect, const char *name, uint32 resizingMode, - uint32 drawFlags, border_style border, bool showHorizontalScrollbar) - : BView(rect, name, resizingMode, drawFlags | B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE), - fStatusView(0), - fSelectionMessage(0), - fSortingEnabled(true), - fLatchWidth(kLatchWidth), - fBorderStyle(border) + +BColumnListView::BColumnListView(BRect rect, const char* name, + uint32 resizingMode, uint32 flags, border_style border, + bool showHorizontalScrollbar) + : + BView(rect, name, resizingMode, + flags | B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE), + fStatusView(NULL), + fSelectionMessage(NULL), + fSortingEnabled(true), + fLatchWidth(kLatchWidth), + fBorderStyle(border), + fShowingHorizontalScrollBar(showHorizontalScrollbar) { - SetViewColor(B_TRANSPARENT_32_BIT); + _Init(); +} - BRect bounds(rect); - bounds.OffsetTo(0, 0); - - for (int i = 0; i < (int)B_COLOR_TOTAL; i++) - fColorList[i] = kColor[i]; - - BRect titleRect(bounds); - titleRect.bottom = titleRect.top + kTitleHeight; -#if !LOWER_SCROLLBAR - titleRect.right -= B_V_SCROLL_BAR_WIDTH + 1; -#endif - BRect outlineRect(bounds); - outlineRect.top = titleRect.bottom + 1.0; - outlineRect.right -= B_V_SCROLL_BAR_WIDTH + 1; - if(showHorizontalScrollbar) - outlineRect.bottom -= B_H_SCROLL_BAR_HEIGHT + 1; +BColumnListView::BColumnListView(const char* name, uint32 flags, + border_style border, bool showHorizontalScrollbar) + : + BView(name, flags | B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE), + fStatusView(NULL), + fSelectionMessage(NULL), + fSortingEnabled(true), + fLatchWidth(kLatchWidth), + fBorderStyle(border), + fShowingHorizontalScrollBar(showHorizontalScrollbar) +{ + _Init(); +} - BRect vScrollBarRect(bounds); -#if LOWER_SCROLLBAR - vScrollBarRect.top += kTitleHeight; -#endif - vScrollBarRect.left = vScrollBarRect.right - B_V_SCROLL_BAR_WIDTH; - if(showHorizontalScrollbar) - vScrollBarRect.bottom -= B_H_SCROLL_BAR_HEIGHT; - - BRect hScrollBarRect(bounds); - hScrollBarRect.top = hScrollBarRect.bottom - B_H_SCROLL_BAR_HEIGHT; - hScrollBarRect.right -= B_V_SCROLL_BAR_WIDTH; - - // Adjust stuff so the border will fit. - if (fBorderStyle == B_PLAIN_BORDER) { - titleRect.InsetBy(1, 0); - titleRect.top++; - outlineRect.InsetBy(1, 0); - outlineRect.bottom--; - - vScrollBarRect.OffsetBy(-1, 0); - vScrollBarRect.InsetBy(0, 1); - hScrollBarRect.OffsetBy(0, -1); - hScrollBarRect.InsetBy(1, 0); - } else if (fBorderStyle == B_FANCY_BORDER) { - titleRect.InsetBy(2, 0); - titleRect.top += 2; - outlineRect.InsetBy(2, 0); - outlineRect.bottom -= 2; - - vScrollBarRect.OffsetBy(-2, 0); - vScrollBarRect.InsetBy(0, 2); - hScrollBarRect.OffsetBy(0, -2); - hScrollBarRect.InsetBy(2, 0); - } - - fOutlineView = new OutlineView(outlineRect, &fColumns, &fSortColumns, this); - AddChild(fOutlineView); - - - // Adapt to correct resizing mode - uint32 fParentFlags = resizingMode; - // Always follow LEFT_RIGHT - uint32 fTitleFlags = B_FOLLOW_LEFT_RIGHT; - - if ((fParentFlags & B_FOLLOW_TOP) && (fParentFlags & ~B_FOLLOW_BOTTOM)) { - fTitleFlags |= B_FOLLOW_TOP; - } - else if ((fParentFlags & B_FOLLOW_BOTTOM) && (fParentFlags & ~B_FOLLOW_TOP)) { - fTitleFlags |= B_FOLLOW_BOTTOM; - } - - fTitleView = new TitleView(titleRect, fOutlineView, &fColumns, &fSortColumns, this, fTitleFlags); - - - AddChild(fTitleView); - fVerticalScrollBar = new BScrollBar(vScrollBarRect, "vertical_scroll_bar", - fOutlineView, 0.0, bounds.Height(), B_VERTICAL); - AddChild(fVerticalScrollBar); - fHorizontalScrollBar = new BScrollBar(hScrollBarRect, "horizontal_scroll_bar", - fTitleView, 0.0, bounds.Width(), B_HORIZONTAL); - AddChild(fHorizontalScrollBar); - if(!showHorizontalScrollbar) - fHorizontalScrollBar->Hide(); - fOutlineView->FixScrollBar(true); -} - BColumnListView::~BColumnListView() { - while (true) { - BColumn *column = (BColumn*) fColumns.RemoveItem(0L); - if (column == 0) - break; - + while (BColumn* column = (BColumn*)fColumns.RemoveItem((int32)0)) delete column; - } } -bool BColumnListView::InitiateDrag(BPoint, bool) + +bool +BColumnListView::InitiateDrag(BPoint, bool) { return false; } -void BColumnListView::MessageDropped(BMessage*, BPoint) + +void +BColumnListView::MessageDropped(BMessage*, BPoint) { } -void BColumnListView::ExpandOrCollapse(BRow* Row, bool Open) + +void +BColumnListView::ExpandOrCollapse(BRow* row, bool Open) { - fOutlineView->ExpandOrCollapse(Row, Open); + fOutlineView->ExpandOrCollapse(row, Open); } -status_t BColumnListView::Invoke(BMessage *message) + +status_t +BColumnListView::Invoke(BMessage* message) { if (message == 0) message = Message(); @@ -808,117 +794,159 @@ return BInvoker::Invoke(message); } -void BColumnListView::ItemInvoked() + +void +BColumnListView::ItemInvoked() { Invoke(); } -void BColumnListView::SetInvocationMessage(BMessage *message) + +void +BColumnListView::SetInvocationMessage(BMessage* message) { SetMessage(message); } -BMessage* BColumnListView::InvocationMessage() const + +BMessage* +BColumnListView::InvocationMessage() const { return Message(); } -uint32 BColumnListView::InvocationCommand() const + +uint32 +BColumnListView::InvocationCommand() const { return Command(); } -BRow* BColumnListView::FocusRow() const + +BRow* +BColumnListView::FocusRow() const { return fOutlineView->FocusRow(); } -void BColumnListView::SetFocusRow(int32 Index, bool Select) + +void +BColumnListView::SetFocusRow(int32 Index, bool Select) { SetFocusRow(RowAt(Index), Select); } -void BColumnListView::SetFocusRow(BRow* Row, bool Select) + +void +BColumnListView::SetFocusRow(BRow* row, bool Select) { - fOutlineView->SetFocusRow(Row, Select); + fOutlineView->SetFocusRow(row, Select); } -void BColumnListView::SetMouseTrackingEnabled(bool Enabled) + +void +BColumnListView::SetMouseTrackingEnabled(bool Enabled) { - fOutlineView->SetMouseTrackingEnabled(Enabled); + fOutlineView->SetMouseTrackingEnabled(Enabled); } -list_view_type BColumnListView::SelectionMode() const + +list_view_type +BColumnListView::SelectionMode() const { return fOutlineView->SelectionMode(); } -void BColumnListView::Deselect(BRow *row) + +void +BColumnListView::Deselect(BRow* row) { fOutlineView->Deselect(row); } -void BColumnListView::AddToSelection(BRow *row) + +void +BColumnListView::AddToSelection(BRow* row) { fOutlineView->AddToSelection(row); } -void BColumnListView::DeselectAll() + +void +BColumnListView::DeselectAll() { fOutlineView->DeselectAll(); } -BRow* BColumnListView::CurrentSelection(BRow *lastSelected) const + +BRow* +BColumnListView::CurrentSelection(BRow* lastSelected) const { return fOutlineView->CurrentSelection(lastSelected); } -void BColumnListView::SelectionChanged() + +void +BColumnListView::SelectionChanged() { if (fSelectionMessage) Invoke(fSelectionMessage); } -void BColumnListView::SetSelectionMessage(BMessage *message) + +void +BColumnListView::SetSelectionMessage(BMessage* message) { if (fSelectionMessage == message) return; - + delete fSelectionMessage; fSelectionMessage = message; } -BMessage* BColumnListView::SelectionMessage() + +BMessage* +BColumnListView::SelectionMessage() { return fSelectionMessage; } -uint32 BColumnListView::SelectionCommand() const + +uint32 +BColumnListView::SelectionCommand() const { if (fSelectionMessage) return fSelectionMessage->what; - + return 0; } -void BColumnListView::SetSelectionMode(list_view_type mode) + +void +BColumnListView::SetSelectionMode(list_view_type mode) { fOutlineView->SetSelectionMode(mode); } -void BColumnListView::SetSortingEnabled(bool enabled) + +void +BColumnListView::SetSortingEnabled(bool enabled) { fSortingEnabled = enabled; fSortColumns.MakeEmpty(); fTitleView->Invalidate(); // Erase sort indicators } -bool BColumnListView::SortingEnabled() const + +bool +BColumnListView::SortingEnabled() const { return fSortingEnabled; } -void BColumnListView::SetSortColumn(BColumn *column, bool add, bool ascending) + +void +BColumnListView::SetSortColumn(BColumn* column, bool add, bool ascending) { if (!SortingEnabled()) return; @@ -930,17 +958,21 @@ fSortColumns.AddItem(column); column->fSortAscending = ascending; - fTitleView->Invalidate(); + fTitleView->Invalidate(); fOutlineView->StartSorting(); } -void BColumnListView::ClearSortColumns() + +void +BColumnListView::ClearSortColumns() { fSortColumns.MakeEmpty(); fTitleView->Invalidate(); // Erase sort indicators } -void BColumnListView::AddStatusView(BView *view) + +void +BColumnListView::AddStatusView(BView* view) { BRect bounds = Bounds(); float width = view->Bounds().Width(); @@ -961,14 +993,16 @@ viewRect.OffsetBy(1, -1); else if (fBorderStyle == B_FANCY_BORDER) viewRect.OffsetBy(2, -2); - + view->SetResizingMode(B_FOLLOW_LEFT | B_FOLLOW_BOTTOM); view->ResizeTo(viewRect.Width(), viewRect.Height()); view->MoveTo(viewRect.left, viewRect.top); Window()->EndViewTransaction(); } -BView* BColumnListView::RemoveStatusView() + +BView* +BColumnListView::RemoveStatusView() { if (fStatusView) { float width = fStatusView->Bounds().Width(); @@ -979,20 +1013,23 @@ Window()->EndViewTransaction(); } - BView *view = fStatusView; + BView* view = fStatusView; fStatusView = 0; return view; } -void BColumnListView::AddColumn(BColumn *column, int32 logicalFieldIndex) + + +void +BColumnListView::AddColumn(BColumn* column, int32 logicalFieldIndex) { - ASSERT(column != 0); + ASSERT(column != NULL); column->fList = this; column->fFieldID = logicalFieldIndex; // sanity check. If there is already a field with this ID, remove it. for (int32 index = 0; index < fColumns.CountItems(); index++) { - BColumn *existingColumn = (BColumn*) fColumns.ItemAt(index); + BColumn* existingColumn = (BColumn*) fColumns.ItemAt(index); if (existingColumn && existingColumn->fFieldID == logicalFieldIndex) { RemoveColumn(existingColumn); break; @@ -1008,227 +1045,385 @@ fTitleView->ColumnAdded(column); } -void BColumnListView::MoveColumn(BColumn *column, int32 index) + +void +BColumnListView::MoveColumn(BColumn* column, int32 index) { - ASSERT(column != 0); + ASSERT(column != NULL); fTitleView->MoveColumn(column, index); } -void BColumnListView::RemoveColumn(BColumn *column) + +void +BColumnListView::RemoveColumn(BColumn* column) { if (fColumns.HasItem(column)) { SetColumnVisible(column, false); - Window()->UpdateIfNeeded(); + if (Window() != NULL) + Window()->UpdateIfNeeded(); fColumns.RemoveItem(column); } } -int32 BColumnListView::CountColumns() const + +int32 +BColumnListView::CountColumns() const { return fColumns.CountItems(); } -BColumn* BColumnListView::ColumnAt(int32 field) const + +BColumn* +BColumnListView::ColumnAt(int32 field) const { return (BColumn*) fColumns.ItemAt(field); } -void BColumnListView::SetColumnVisible(BColumn *column, bool visible) + +BColumn* +BColumnListView::ColumnAt(BPoint point) const { + float left = MAX(kLeftMargin, LatchWidth()); + + for (int i = 0; BColumn* column = (BColumn*)fColumns.ItemAt(i); i++) { + if (!column->IsVisible()) + continue; + + float right = left + column->Width(); + if (point.x >= left && point.x <= right) + return column; + + left = right + 1; + } + + return NULL; +} + + +void +BColumnListView::SetColumnVisible(BColumn* column, bool visible) +{ fTitleView->SetColumnVisible(column, visible); } -void BColumnListView::SetColumnVisible(int32 index, bool isVisible) + +void +BColumnListView::SetColumnVisible(int32 index, bool isVisible) { - BColumn *column = ColumnAt(index); + BColumn* column = ColumnAt(index); if (column) column->SetVisible(isVisible); } -bool BColumnListView::IsColumnVisible(int32 index) const + +bool +BColumnListView::IsColumnVisible(int32 index) const { - BColumn *column = ColumnAt(index); + BColumn* column = ColumnAt(index); if (column) return column->IsVisible(); return false; } -void BColumnListView::SetColumnFlags(column_flags flags) + +void +BColumnListView::SetColumnFlags(column_flags flags) { fTitleView->SetColumnFlags(flags); } -const BRow* BColumnListView::RowAt(int32 Index, BRow* ParentRow) const + +void +BColumnListView::ResizeColumnToPreferred(int32 index) { - if (ParentRow == 0) - return fOutlineView->RowList()->ItemAt(Index); + BColumn* column = ColumnAt(index); + if (column == NULL) + return; - return ParentRow->fChildList ? ParentRow->fChildList->ItemAt(Index) : NULL; + // get the preferred column width + float width = fOutlineView->GetColumnPreferredWidth(column); + + // set it + float oldWidth = column->Width(); + column->SetWidth(width); + + fTitleView->ColumnResized(column, oldWidth); + fOutlineView->Invalidate(); } -BRow* BColumnListView::RowAt(int32 Index, BRow* ParentRow) + +void +BColumnListView::ResizeAllColumnsToPreferred() { - if (ParentRow == 0) - return fOutlineView->RowList()->ItemAt(Index); + int32 count = CountColumns(); + for (int32 i = 0; i < count; i++) + ResizeColumnToPreferred(i); +} - return ParentRow->fChildList ? ParentRow->fChildList->ItemAt(Index) : 0; + +const BRow* +BColumnListView::RowAt(int32 Index, BRow* parentRow) const +{ + if (parentRow == 0) + return fOutlineView->RowList()->ItemAt(Index); + + return parentRow->fChildList ? parentRow->fChildList->ItemAt(Index) : NULL; } -const BRow* BColumnListView::RowAt(BPoint point) const + +BRow* +BColumnListView::RowAt(int32 Index, BRow* parentRow) { + if (parentRow == 0) + return fOutlineView->RowList()->ItemAt(Index); + + return parentRow->fChildList ? parentRow->fChildList->ItemAt(Index) : 0; +} + + +const BRow* +BColumnListView::RowAt(BPoint point) const +{ float top; int32 indent; return fOutlineView->FindRow(point.y, &indent, &top); } -BRow* BColumnListView::RowAt(BPoint point) + +BRow* +BColumnListView::RowAt(BPoint point) { float top; int32 indent; return fOutlineView->FindRow(point.y, &indent, &top); } -bool BColumnListView::GetRowRect(const BRow *row, BRect *outRect) const + +bool +BColumnListView::GetRowRect(const BRow* row, BRect* outRect) const { return fOutlineView->FindRect(row, outRect); } -bool BColumnListView::FindParent(BRow *row, BRow **out_parent, bool *out_isVisible) const + +bool +BColumnListView::FindParent(BRow* row, BRow** _parent, bool* _isVisible) const { - return fOutlineView->FindParent(row, out_parent, out_isVisible); + return fOutlineView->FindParent(row, _parent, _isVisible); } -int32 BColumnListView::IndexOf(BRow *row) + +int32 +BColumnListView::IndexOf(BRow* row) { return fOutlineView->IndexOf(row); } -int32 BColumnListView::CountRows(BRow* ParentRow) const + +int32 +BColumnListView::CountRows(BRow* parentRow) const { - if (ParentRow == 0) - return fOutlineView->RowList()->CountItems(); - if (ParentRow->fChildList) - return ParentRow->fChildList->CountItems(); + if (parentRow == 0) + return fOutlineView->RowList()->CountItems(); + if (parentRow->fChildList) + return parentRow->fChildList->CountItems(); else return 0; } -void BColumnListView::AddRow(BRow *row, BRow* ParentRow) + +void +BColumnListView::AddRow(BRow* row, BRow* parentRow) { - AddRow(row, -1, ParentRow); + AddRow(row, -1, parentRow); } -void BColumnListView::AddRow(BRow *row, int32 index, BRow* ParentRow) + +void +BColumnListView::AddRow(BRow* row, int32 index, BRow* parentRow) { row->fChildList = 0; row->fList = this; row->ValidateFields(); - fOutlineView->AddRow(row, index, ParentRow); + fOutlineView->AddRow(row, index, parentRow); } -void BColumnListView::RemoveRow(BRow *row) + +void +BColumnListView::RemoveRow(BRow* row) { fOutlineView->RemoveRow(row); row->fList = NULL; } -void BColumnListView::UpdateRow(BRow *row) + +void +BColumnListView::UpdateRow(BRow* row) { fOutlineView->UpdateRow(row); } -void BColumnListView::ScrollTo(const BRow* Row) + +bool +BColumnListView::SwapRows(int32 index1, int32 index2, BRow* parentRow1, + BRow* parentRow2) { - fOutlineView->ScrollTo(Row); + BRow* row1 = NULL; + BRow* row2 = NULL; + + BRowContainer* container1 = NULL; + BRowContainer* container2 = NULL; + + if (parentRow1 == NULL) + container1 = fOutlineView->RowList(); + else + container1 = parentRow1->fChildList; + + if (container1 == NULL) + return false; + + if (parentRow2 == NULL) + container2 = fOutlineView->RowList(); + else + container2 = parentRow1->fChildList; + + if (container2 == NULL) + return false; + + row1 = container1->ItemAt(index1); + + if (row1 == NULL) + return false; + + row2 = container2->ItemAt(index2); + + if (row2 == NULL) + return false; + + container1->ReplaceItem(index2, row1); + container2->ReplaceItem(index1, row2); + + BRect rect1; + BRect rect2; + BRect rect; + + fOutlineView->FindRect(row1, &rect1); + fOutlineView->FindRect(row2, &rect2); + + rect = rect1 | rect2; + + fOutlineView->Invalidate(rect); + + return true; } -void BColumnListView::ScrollTo(BPoint point) + +void +BColumnListView::ScrollTo(const BRow* row) { + fOutlineView->ScrollTo(row); +} + + +void +BColumnListView::ScrollTo(BPoint point) +{ fOutlineView->ScrollTo(point); } -void BColumnListView::Clear() + +void +BColumnListView::Clear() { fOutlineView->Clear(); } -void BColumnListView::SetFont(const BFont *font, uint32 mask) + +void +BColumnListView::SetFont(const BFont* font, uint32 mask) { // This method is deprecated. fOutlineView->SetFont(font, mask); fTitleView->SetFont(font, mask); } -void BColumnListView::SetFont(ColumnListViewFont font_num, const BFont* font, uint32 mask) + +void +BColumnListView::SetFont(ColumnListViewFont font_num, const BFont* font, + uint32 mask) { switch (font_num) { case B_FONT_ROW: fOutlineView->SetFont(font, mask); break; - + case B_FONT_HEADER: fTitleView->SetFont(font, mask); break; - + default: ASSERT(false); - break; - }; + break; + } } -void BColumnListView::GetFont(ColumnListViewFont font_num, BFont* font) const + +void +BColumnListView::GetFont(ColumnListViewFont font_num, BFont* font) const { switch (font_num) { case B_FONT_ROW: fOutlineView->GetFont(font); break; - + case B_FONT_HEADER: fTitleView->GetFont(font); break; - + default: ASSERT(false); - break; - }; + break; + } } -void BColumnListView::SetColor(ColumnListViewColor color_num, const rgb_color color) + +void +BColumnListView::SetColor(ColumnListViewColor color_num, const rgb_color color) { - if ((int)color_num < 0) - { + if ((int)color_num < 0) { ASSERT(false); color_num = (ColumnListViewColor) 0; - } - - if ((int)color_num >= (int)B_COLOR_TOTAL) - { + } + + if ((int)color_num >= (int)B_COLOR_TOTAL) { ASSERT(false); color_num = (ColumnListViewColor) (B_COLOR_TOTAL - 1); } - + fColorList[color_num] = color; } -rgb_color BColumnListView::Color(ColumnListViewColor color_num) const + +rgb_color +BColumnListView::Color(ColumnListViewColor color_num) const { - if ((int)color_num < 0) - { + if ((int)color_num < 0) { ASSERT(false); color_num = (ColumnListViewColor) 0; - } - - if ((int)color_num >= (int)B_COLOR_TOTAL) - { + } + + if ((int)color_num >= (int)B_COLOR_TOTAL) { ASSERT(false); color_num = (ColumnListViewColor) (B_COLOR_TOTAL - 1); } - + return fColorList[color_num]; } -void BColumnListView::SetHighColor(rgb_color color) + +void +BColumnListView::SetHighColor(rgb_color color) { BView::SetHighColor(color); // fOutlineView->Invalidate(); // Redraw things with the new color @@ -1237,58 +1432,73 @@ // A better solution is needed. } -void BColumnListView::SetSelectionColor(rgb_color color) + +void +BColumnListView::SetSelectionColor(rgb_color color) { fColorList[B_COLOR_SELECTION] = color; } -void BColumnListView::SetBackgroundColor(rgb_color color) + +void +BColumnListView::SetBackgroundColor(rgb_color color) { fColorList[B_COLOR_BACKGROUND] = color; fOutlineView->Invalidate(); // Repaint with new color } -void BColumnListView::SetEditColor(rgb_color color) + +void +BColumnListView::SetEditColor(rgb_color color) { fColorList[B_COLOR_EDIT_BACKGROUND] = color; } -const rgb_color BColumnListView::SelectionColor() const + +const rgb_color +BColumnListView::SelectionColor() const { return fColorList[B_COLOR_SELECTION]; } -const rgb_color BColumnListView::BackgroundColor() const + +const rgb_color +BColumnListView::BackgroundColor() const { return fColorList[B_COLOR_BACKGROUND]; } -const rgb_color BColumnListView::EditColor() const + +const rgb_color +BColumnListView::EditColor() const { return fColorList[B_COLOR_EDIT_BACKGROUND]; } -BPoint BColumnListView::SuggestTextPosition(const BRow* row, const BColumn* inColumn) const + +BPoint +BColumnListView::SuggestTextPosition(const BRow* row, + const BColumn* inColumn) const { BRect rect; GetRowRect(row, &rect); if (inColumn) { float leftEdge = MAX(kLeftMargin, LatchWidth()); for (int index = 0; index < fColumns.CountItems(); index++) { - BColumn *column = (BColumn*) fColumns.ItemAt(index); + BColumn* column = (BColumn*) fColumns.ItemAt(index); if (!column->IsVisible()) continue; - + if (column == inColumn) { rect.left = leftEdge; rect.right = rect.left + column->Width(); break; } - + leftEdge += column->Width() + 1; } } - + font_height fh; fOutlineView->GetFontHeight(&fh); float baseline = floor(rect.top + fh.ascent @@ -1296,89 +1506,116 @@ return BPoint(rect.left + 8, baseline); } -void BColumnListView::SetLatchWidth(float width) + +void +BColumnListView::SetLatchWidth(float width) { fLatchWidth = width; Invalidate(); } -float BColumnListView::LatchWidth() const + +float +BColumnListView::LatchWidth() const { return fLatchWidth; } -void BColumnListView::DrawLatch(BView *view, BRect rect, LatchType position, BRow *) +void +BColumnListView::DrawLatch(BView* view, BRect rect, LatchType position, BRow*) { const int32 rectInset = 4; - + view->SetHighColor(0, 0, 0); - + // Make Square int32 sideLen = rect.IntegerWidth(); - if( sideLen > rect.IntegerHeight() ) - { + if (sideLen > rect.IntegerHeight()) sideLen = rect.IntegerHeight(); - } - + // Make Center int32 halfWidth = rect.IntegerWidth() / 2; int32 halfHeight = rect.IntegerHeight() / 2; int32 halfSide = sideLen / 2; - + float left = rect.left + halfWidth - halfSide; float top = rect.top + halfHeight - halfSide; - + BRect itemRect(left, top, left + sideLen, top + sideLen); - + // Why it is a pixel high? I don't know. itemRect.OffsetBy(0, -1); - + itemRect.InsetBy(rectInset, rectInset); // Make it an odd number of pixels wide, the latch looks better this way - if (1 == (itemRect.IntegerWidth() % 2)) - { - itemRect.right += 1; + if ((itemRect.IntegerWidth() % 2) == 1) { + itemRect.right += 1; itemRect.bottom += 1; } - + switch (position) { case B_OPEN_LATCH: view->StrokeRect(itemRect); - view->StrokeLine(BPoint(itemRect.left + 2, (itemRect.top + itemRect.bottom) / 2), - BPoint(itemRect.right - 2, (itemRect.top + itemRect.bottom) / 2)); + view->StrokeLine( + BPoint(itemRect.left + 2, + (itemRect.top + itemRect.bottom) / 2), + BPoint(itemRect.right - 2, + (itemRect.top + itemRect.bottom) / 2)); break; - + case B_PRESSED_LATCH: view->StrokeRect(itemRect); - view->StrokeLine(BPoint(itemRect.left + 2, (itemRect.top + itemRect.bottom) / 2), - BPoint(itemRect.right - 2, (itemRect.top + itemRect.bottom) / 2)); - view->StrokeLine(BPoint((itemRect.left + itemRect.right) / 2, itemRect.top + 2), - BPoint((itemRect.left + itemRect.right) / 2, itemRect.bottom - 2)); + view->StrokeLine( + BPoint(itemRect.left + 2, + (itemRect.top + itemRect.bottom) / 2), + BPoint(itemRect.right - 2, + (itemRect.top + itemRect.bottom) / 2)); + view->StrokeLine( + BPoint((itemRect.left + itemRect.right) / 2, + itemRect.top + 2), + BPoint((itemRect.left + itemRect.right) / 2, + itemRect.bottom - 2)); view->InvertRect(itemRect); break; - + case B_CLOSED_LATCH: view->StrokeRect(itemRect); - view->StrokeLine(BPoint(itemRect.left + 2, (itemRect.top + itemRect.bottom) / 2), - BPoint(itemRect.right - 2, (itemRect.top + itemRect.bottom) / 2)); - view->StrokeLine(BPoint((itemRect.left + itemRect.right) / 2, itemRect.top + 2), - BPoint((itemRect.left + itemRect.right) / 2, itemRect.bottom - 2)); + view->StrokeLine( + BPoint(itemRect.left + 2, + (itemRect.top + itemRect.bottom) / 2), + BPoint(itemRect.right - 2, + (itemRect.top + itemRect.bottom) / 2)); + view->StrokeLine( + BPoint((itemRect.left + itemRect.right) / 2, + itemRect.top + 2), + BPoint((itemRect.left + itemRect.right) / 2, + itemRect.bottom - 2)); break; - + case B_NO_LATCH: // No drawing break; } } -void BColumnListView::MakeFocus(bool isFocus) + +void +BColumnListView::MakeFocus(bool isFocus) { - Invalidate(); // Redraw focus marks around view + if (fBorderStyle != B_NO_BORDER) { + // Redraw focus marks around view + Invalidate(); + fHorizontalScrollBar->SetBorderHighlighted(isFocus); + fVerticalScrollBar->SetBorderHighlighted(isFocus); + } + BView::MakeFocus(isFocus); } -void BColumnListView::MessageReceived(BMessage *message) + +void +BColumnListView::MessageReceived(BMessage* message) { // Propagate mouse wheel messages down to child, so that it can // scroll. Note we have done so, so we don't go into infinite @@ -1391,15 +1628,19 @@ return; } } + BView::MessageReceived(message); } -void BColumnListView::KeyDown(const char *bytes, int32 numBytes) + +void +BColumnListView::KeyDown(const char* bytes, int32 numBytes) { char c = bytes[0]; switch (c) { - case B_RIGHT_ARROW: - case B_LEFT_ARROW: { + case B_RIGHT_ARROW: + case B_LEFT_ARROW: + { float minVal, maxVal; fHorizontalScrollBar->GetRange(&minVal, &maxVal); float smallStep, largeStep; @@ -1422,53 +1663,57 @@ } case B_DOWN_ARROW: - fOutlineView->ChangeFocusRow(false, (modifiers() & B_CONTROL_KEY) == 0, + fOutlineView->ChangeFocusRow(false, + (modifiers() & B_CONTROL_KEY) == 0, (modifiers() & B_SHIFT_KEY) != 0); break; case B_UP_ARROW: - fOutlineView->ChangeFocusRow(true, (modifiers() & B_CONTROL_KEY) == 0, + fOutlineView->ChangeFocusRow(true, + (modifiers() & B_CONTROL_KEY) == 0, (modifiers() & B_SHIFT_KEY) != 0); break; - + case B_PAGE_UP: - case B_PAGE_DOWN: { + case B_PAGE_DOWN: + { float minValue, maxValue; fVerticalScrollBar->GetRange(&minValue, &maxValue); float smallStep, largeStep; fVerticalScrollBar->GetSteps(&smallStep, &largeStep); float currentValue = fVerticalScrollBar->Value(); float newValue = currentValue; - + if (c == B_PAGE_UP) newValue -= largeStep; else newValue += largeStep; - + if (newValue > maxValue) newValue = maxValue; else if (newValue < minValue) newValue = minValue; - + fVerticalScrollBar->SetValue(newValue); // Option + pgup or pgdn scrolls and changes the selection. if (modifiers() & B_OPTION_KEY) fOutlineView->MoveFocusToVisibleRect(); - + break; } - + case B_ENTER: Invoke(); break; case B_SPACE: - fOutlineView->ToggleFocusRowSelection((modifiers() & B_SHIFT_KEY) != 0); + fOutlineView->ToggleFocusRowSelection( + (modifiers() & B_SHIFT_KEY) != 0); break; case '+': - fOutlineView->ToggleFocusRowOpen(); + fOutlineView->ToggleFocusRowOpen(); break; default: @@ -1476,15 +1721,19 @@ } } -void BColumnListView::AttachedToWindow() + +void +BColumnListView::AttachedToWindow() { if (!Messenger().IsValid()) SetTarget(Window()); - - if (SortingEnabled()) fOutlineView->StartSorting(); + + if (SortingEnabled()) fOutlineView->StartSorting(); } -void BColumnListView::WindowActivated(bool active) + +void +BColumnListView::WindowActivated(bool active) { fOutlineView->Invalidate(); // Focus and selection appearance changes with focus @@ -1493,23 +1742,59 @@ BView::WindowActivated(active); } -void BColumnListView::Draw(BRect) + +void +BColumnListView::Draw(BRect updateRect) { BRect rect = Bounds(); - PushState(); - BRect cornerRect(rect.right - B_V_SCROLL_BAR_WIDTH, rect.bottom - B_H_SCROLL_BAR_HEIGHT, - rect.right, rect.bottom); + if (be_control_look != NULL) { + uint32 flags = 0; + if (IsFocus() && Window()->IsActive()) + flags |= BControlLook::B_FOCUSED; + + rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); + + BRect verticalScrollBarFrame; + if (!fVerticalScrollBar->IsHidden()) + verticalScrollBarFrame = fVerticalScrollBar->Frame(); + BRect horizontalScrollBarFrame; + if (!fHorizontalScrollBar->IsHidden()) + horizontalScrollBarFrame = fHorizontalScrollBar->Frame(); + + if (fBorderStyle == B_NO_BORDER) { + // We still draw the left/top border, but not focused. + // The scrollbars cannot be displayed without frame and + // it looks bad to have no frame only along the left/top + // side. + rgb_color borderColor = tint_color(base, B_DARKEN_2_TINT); + SetHighColor(borderColor); + StrokeLine(BPoint(rect.left, rect.bottom), + BPoint(rect.left, rect.top)); + StrokeLine(BPoint(rect.left + 1, rect.top), + BPoint(rect.right, rect.top)); + } + + be_control_look->DrawScrollViewFrame(this, rect, updateRect, + verticalScrollBarFrame, horizontalScrollBarFrame, + base, fBorderStyle, flags); + + return; + } + + BRect cornerRect(rect.right - B_V_SCROLL_BAR_WIDTH, + rect.bottom - B_H_SCROLL_BAR_HEIGHT, rect.right, rect.bottom); if (fBorderStyle == B_PLAIN_BORDER) { - BView::SetHighColor(0, 0, 0); + BView::SetHighColor(0, 0, 0); StrokeRect(rect); - cornerRect.OffsetBy(-1, -1); + cornerRect.OffsetBy(-1, -1); } else if (fBorderStyle == B_FANCY_BORDER) { bool isFocus = IsFocus() && Window()->IsActive(); - if (isFocus) - BView::SetHighColor(0, 0, 190); // Need to find focus color programatically - else + if (isFocus) { + // TODO: Need to find focus color programatically + BView::SetHighColor(0, 0, 190); + } else BView::SetHighColor(255, 255, 255); StrokeRect(rect); @@ -1517,22 +1802,24 @@ BView::SetHighColor(184, 184, 184); else BView::SetHighColor(152, 152, 152); - + rect.InsetBy(1,1); StrokeRect(rect); cornerRect.OffsetBy(-2, -2); } - - BView::SetHighColor(215, 215, 215); // fills lower right rect between scroll bars + + BView::SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + // fills lower right rect between scroll bars FillRect(cornerRect); - PopState(); } -void BColumnListView::SaveState(BMessage *msg) + +void +BColumnListView::SaveState(BMessage* msg) { msg->MakeEmpty(); - for (int32 i = 0; BColumn *col = (BColumn*)fColumns.ItemAt(i); i++) { + for (int32 i = 0; BColumn* col = (BColumn*)fColumns.ItemAt(i); i++) { msg->AddInt32("ID",col->fFieldID); msg->AddFloat("width", col->fWidth); msg->AddBool("visible", col->fVisible); @@ -1541,7 +1828,7 @@ msg->AddBool("sortingenabled", fSortingEnabled); if (fSortingEnabled) { - for (int32 i = 0; BColumn *col = (BColumn*)fSortColumns.ItemAt(i); + for (int32 i = 0; BColumn* col = (BColumn*)fSortColumns.ItemAt(i); i++) { msg->AddInt32("sortID", col->fFieldID); msg->AddBool("sortascending", col->fSortAscending); @@ -1549,7 +1836,9 @@ } } -void BColumnListView::LoadState(BMessage *msg) + +void +BColumnListView::LoadState(BMessage* msg) { int32 id; for (int i = 0; msg->FindInt32("ID", i, &id) == B_OK; i++) { @@ -1583,13 +1872,17 @@ } } -void BColumnListView::SetEditMode(bool state) + +void +BColumnListView::SetEditMode(bool state) { fOutlineView->SetEditMode(state); fTitleView->SetEditMode(state); } -void BColumnListView::Refresh() + +void +BColumnListView::Refresh() { if (L... [truncated message content] |
From: <ane...@us...> - 2013-06-05 00:25:26
|
Revision: 944 http://sourceforge.net/p/vision/code/944 Author: anevilyak Date: 2013-06-05 00:25:23 +0000 (Wed, 05 Jun 2013) Log Message: ----------- Change how settings are loaded. - If the main settings file has not yet been created, we now look for InitialSettings in the app directory, and use that as a starting point. Modified Paths: -------------- branches/0.9.7/src/Vision.cpp branches/0.9.7/src/Vision.h Modified: branches/0.9.7/src/Vision.cpp =================================================================== --- branches/0.9.7/src/Vision.cpp 2013-06-04 23:48:57 UTC (rev 943) +++ branches/0.9.7/src/Vision.cpp 2013-06-05 00:25:23 UTC (rev 944) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * * The Original Code is Vision. - * + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -115,7 +115,7 @@ fStartupTime = system_time(); app_info info; - if (GetAppInfo(&info) == B_OK) fAppRef = info.ref; + if (GetAppInfo(&info) == B_OK) fAppRef = info.ref; URLCrunch::UpdateTagList(); } @@ -156,7 +156,7 @@ break; } } - + if (fDebugShutdown) { buffer += "thread: "; @@ -170,27 +170,27 @@ case B_THREAD_RUNNING: buffer += "running\n"; break; - + case B_THREAD_READY: buffer += "ready\n"; break; - + case B_THREAD_RECEIVING: buffer += "receiving\n"; break; - + case B_THREAD_ASLEEP: buffer += "asleep\n"; break; - + case B_THREAD_SUSPENDED: buffer += "suspended\n"; break; - + case B_THREAD_WAITING: buffer += "waiting\n"; break; - + default: buffer += "???\n"; } @@ -214,7 +214,7 @@ #endif } - return t_count; + return t_count; } void @@ -314,7 +314,7 @@ fColors[C_NOTIFY_OFF] = myBlack; fColors[C_NOTIFYLIST_BACKGROUND] = WINLIST_BG_COLOR; fColors[C_NOTIFYLIST_SELECTION] = WINLIST_SEL_COLOR; - + fClientFont[F_TEXT] = new BFont (be_plain_font); fClientFont[F_SERVER] = new BFont (be_plain_font); fClientFont[F_URL] = new BFont (be_plain_font); @@ -323,7 +323,7 @@ fClientFont[F_WINLIST] = new BFont (be_plain_font); fClientFont[F_LISTAGENT] = new BFont (be_plain_font); fClientFont[F_TIMESTAMP] = new BFont (be_plain_font); - + fEvents[E_JOIN] = "*** $N ($I@$A) has joined the channel."; fEvents[E_PART] = "*** $N has left the channel."; fEvents[E_NICK] = "*** $N is now known as $n."; @@ -347,7 +347,7 @@ fCommands[CMD_UPTIME] = "OS Uptime [BeOS]: $U"; #endif uint32 i = 0; - + for( const char* eventName = kSoundEventNames[i]; eventName != NULL; i++, eventName = kSoundEventNames[i] ) add_system_beep_event(eventName); @@ -358,7 +358,7 @@ { // initialize arrays with Vision's default settings in case of new user InitDefaults(); - + Theme::TimestampFore = C_TIMESTAMP; Theme::TimestampBack = C_TIMESTAMP; Theme::TimespaceFore = MAX_COLORS; @@ -369,12 +369,12 @@ Theme::NormalBack = C_TEXT; Theme::NormalFont = F_TEXT; Theme::SelectionBack = C_SELECTION; - + if (fDebugSettings) printf (":SETTINGS: loading...\n"); - + fVisionSettings = new SettingsFile ("VisionSettings", "Vision"); - + if (fVisionSettings->InitCheck() == B_OK) { fVisionSettings->Load(); @@ -382,10 +382,15 @@ else printf(":ERROR: Error Loading /Vision/VisionSettings\n"); + if (fVisionSettings->IsEmpty()) + { + LoadInitialSettings(); + } + LoadAliases(); int32 i (0); - + LoadDefaults (SET_SERVER); LoadDefaults (SET_GENERAL); LoadDefaults (SET_WINDOW); @@ -394,11 +399,11 @@ LoadDefaults (SET_COLOR); LoadDefaults (SET_STRINGS); LoadDefaults (SET_DCC); - + // initialize theme, TODO: move to separate function - + fActiveTheme->WriteLock(); - + for (i = 0; i < MAX_COLORS; i++) { fActiveTheme->SetForeground (i, fColors[i]); @@ -406,8 +411,8 @@ } for (i = C_MIRC_WHITE; i < MAX_COLORS; i++) fActiveTheme->SetBackground (i, fColors[i]); - - fActiveTheme->SetBackground (C_SELECTION, fColors [C_SELECTION]); + + fActiveTheme->SetBackground (C_SELECTION, fColors [C_SELECTION]); fActiveTheme->SetBackground (C_TIMESTAMP, fColors[C_TIMESTAMP_BACKGROUND]); fActiveTheme->SetBackground (MAX_COLORS, fColors[C_BACKGROUND]); fActiveTheme->SetForeground (MAX_COLORS, fColors[C_TEXT]); @@ -418,7 +423,7 @@ fActiveTheme->WriteUnlock(); - fSettingsLoaded = true; + fSettingsLoaded = true; if (fDebugSettings) printf (":SETTINGS: done loading\n"); } @@ -427,12 +432,12 @@ VisionApp::SaveSettings (void) { BAutolock saveLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!saveLock.IsLocked()) return false; - SaveAliases(); - + SaveAliases(); + if ((fVisionSettings->Save() == B_OK) && fDebugSettings) { printf (":SETTINGS: saved to file\n"); @@ -442,6 +447,35 @@ } void +VisionApp::LoadInitialSettings (void) +{ + image_info info; + int32 cookie = 0; + while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) + { + if (info.type == B_APP_IMAGE) + { + BPath path(info.name); + if (path.InitCheck() != B_OK) + return; + + path.GetParent(&path); + path.Append("InitialSettings"); + BFile file(path.Path(), B_READ_ONLY); + if (file.InitCheck() != B_OK) + return; + + BMessage message; + if (message.Unflatten(&file) != B_OK) + return; + + fVisionSettings->Append(message); + break; + } + } +} + +void VisionApp::LoadDefaults (int32 section) { // sets defaults for various states in vision @@ -462,7 +496,7 @@ } } break; - + case SET_GENERAL: { if (!fVisionSettings->HasBool ("versionParanoid")) @@ -470,36 +504,36 @@ if (!fVisionSettings->HasBool ("timestamp")) fVisionSettings->AddBool ("timestamp", false); - + if (!fVisionSettings->HasString ("timestamp_format")) fVisionSettings->AddString ("timestamp_format", "[%H:%M]"); - + if (!fVisionSettings->HasBool ("log_enabled")) fVisionSettings->AddBool ("log_enabled", false); if (!fVisionSettings->HasBool ("log_filetimestamp")) fVisionSettings->AddBool ("log_filetimestamp", false); - + if (!fVisionSettings->HasBool ("stripcolors")) fVisionSettings->AddBool ("stripcolors", true); - + if (!fVisionSettings->HasBool ("Newbie Spam Mode")) fVisionSettings->AddBool("Newbie Spam Mode", true); - + if (!fVisionSettings->HasBool ("queryOnMsg")) fVisionSettings->AddBool ("queryOnMsg", false); - + if (!fVisionSettings->HasBool ("notifyExpanded")) fVisionSettings->AddBool("notifyExpanded", true); - + if (!fVisionSettings->HasString ("logBaseDir")) fVisionSettings->AddString("logBaseDir", "logs"); - + if (!fVisionSettings->HasInt32 ("encoding")) fVisionSettings->AddInt32("encoding", B_ISO1_CONVERSION); } break; - + case SET_WINDOW: { if (!fVisionSettings->HasBool ("catchAltW")) @@ -507,16 +541,16 @@ if (!fVisionSettings->HasRect ("clientWinRect")) fVisionSettings->AddRect ("clientWinRect", BRect (100, 100, 600, 460)); - + if (!fVisionSettings->HasRect ("windowDockRect")) fVisionSettings->AddRect ("windowDockRect", BRect (0, 0, 0, 0)); - + if (!fVisionSettings->HasRect ("NetPrefWinRect")) fVisionSettings->AddRect ("NetPrefWinRect", BRect (0, 0, 0, 0)); - + if (!fVisionSettings->HasRect ("namesListRect")) fVisionSettings->AddRect ("namesListRect", BRect (0, 0, 100, 0)); - + if (!fVisionSettings->HasRect ("GenPrefWinRect")) fVisionSettings->AddRect ("GenPrefWinRect", BRect (0,0,0,0)); } @@ -528,7 +562,7 @@ fVisionSettings->AddString ("alsoKnownAs", "-9y99"); } break; - + case SET_FONT: { font_family default_family; @@ -537,7 +571,7 @@ be_plain_font->GetFamilyAndStyle (&default_family, &default_style); size = be_plain_font->Size(); int32 i (0); - + for (i = 0; i < MAX_FONTS; i++) { BString fontStr, styleStr; @@ -556,18 +590,18 @@ BString family; BString style; size = 0.0; - + fVisionSettings->FindString (fontStr.String(), &family); fVisionSettings->FindString (styleStr.String(), &style); fVisionSettings->FindFloat ("size", i, &size); - + ClientFontFamilyAndStyle (i, family.String(), style.String()); - ClientFontSize (i, size); + ClientFontSize (i, size); } } } break; - + case SET_COLOR: { // load defaults from color array into settings file @@ -585,7 +619,7 @@ } } break; - + case SET_STRINGS: { BString eventStr, commandStr; @@ -599,7 +633,7 @@ else fVisionSettings->FindString (eventStr.String(), &fEvents[i]); } - + // fCommands for (i = 0; i < MAX_COMMANDS; i++) { @@ -612,7 +646,7 @@ } } break; - + case SET_DCC: { if (!fVisionSettings->HasString ("dccDefPath")) @@ -628,7 +662,7 @@ if (!fVisionSettings->HasString ("dccMaxPort")) fVisionSettings->AddString ("dccMaxPort", "45000"); } - break; + break; } } @@ -639,20 +673,20 @@ if (fIdentSocket >= 0) close (fIdentSocket); - + BMessenger msgr(fClientWin); if (msgr.IsValid()) msgr.SendMessage(B_QUIT_REQUESTED); - + if (fSetupWin) BMessenger(fSetupWin).SendMessage(B_QUIT_REQUESTED); - + if (fPrefsWin) BMessenger(fPrefsWin).SendMessage(B_QUIT_REQUESTED); if (fNetWin) BMessenger(fPrefsWin).SendMessage(B_QUIT_REQUESTED); - + // give our child threads a chance to die gracefully while (ThreadStates() > 2) snooze (100000); @@ -688,7 +722,7 @@ { for (int32 i = 1; i < ac; ++i) { - + if (strcmp (av[i], "-!") == 0) { fDebugRecv = true; @@ -697,25 +731,25 @@ fNumBench = true; fDebugShutdown = true; } - + else if (strcmp (av[i], "-r") == 0) fDebugRecv = true; else if (strcmp (av[i], "-s") == 0) fDebugSend = true; - + else if (strcmp (av[i], "-S") == 0) fDebugSettings = true; - + else if (strcmp (av[i], "-u") == 0) fDebugShutdown = true; - + else if (strcmp (av[i], "-n") == 0) fNumBench = true; - + else if (strcmp (av[i], "-a") == 0) fDisableAutostart = true; - + else if (strcmp (av[i], "-T") == 0) { #if 0 @@ -725,7 +759,7 @@ if (IsLaunching()) Quit(); } - + else if (strcmp (av[i], "--help") == 0) { printf ("Vision command line switches:\n"); @@ -742,7 +776,7 @@ if (IsLaunching()) Quit(); } - + } } @@ -784,13 +818,13 @@ { const ServerData *data (NULL); int32 size; - for (int32 i = 0; netData.FindData ("server", B_RAW_TYPE, i, + for (int32 i = 0; netData.FindData ("server", B_RAW_TYPE, i, reinterpret_cast<const void **>(&data), &size) == B_OK; i++) { // look for a primary server if (data->state == SERVER_PRIMARY) return true; - } + } } return false; } @@ -805,7 +839,7 @@ resume_thread (fIdentThread); if (!CheckStartupNetworks()) - { + { fSetupWin = new SetupWindow (); fSetupWin->Show(); } @@ -829,13 +863,13 @@ if (argument.IFindFirst ("www") == 0) argument.Prepend ("http://"); - + else if (argument.IFindFirst ("ftp") == 0) argument.Prepend ("ftp://"); } const char *args[] = { argument.String(), 0 }; - + if (argument.IFindFirst ("file:") == 0) { // The URL is guaranteed to be at least "file:/" @@ -870,9 +904,9 @@ fAboutWin = 0; if (fShuttingDown) PostMessage (B_QUIT_REQUESTED); - } + } break; - + case M_SETUP_SHOW: { if (fSetupWin) @@ -893,7 +927,7 @@ PostMessage (B_QUIT_REQUESTED); } break; - + case M_PREFS_SHOW: { if (fPrefsWin) @@ -903,16 +937,16 @@ fPrefsWin = new PrefsWindow(); fPrefsWin->Show(); } - } + } break; - + case M_PREFS_CLOSE: { SaveSettings(); fPrefsWin = 0; } break; - + case M_NETWORK_SHOW: { if (fNetWin) @@ -921,9 +955,9 @@ { fNetWin = new NetworkWindow(); fNetWin->Show(); - + } - } + } break; case M_NETWORK_CLOSE: @@ -932,7 +966,7 @@ fNetWin = 0; } break; - + case M_CONNECT_NETWORK: { BRect clientWinRect (GetRect("clientWinRect")); @@ -970,7 +1004,7 @@ { if (fClientWin == NULL) break; - + fClientWin->PostMessage (msg); } break; @@ -984,14 +1018,14 @@ else { DCCConnect *view; - + msg->FindPointer ("view", reinterpret_cast<void **>(&view)); fDccFileWin = new DCCFileWindow (view); fDccFileWin->Show(); } } break; - + case M_DCC_MESSENGER: if (msg->IsSourceWaiting()) { @@ -1013,7 +1047,7 @@ Broadcast(msg); } break; - + case M_LOAD_URL: { BString url (msg->FindString("url")); @@ -1023,7 +1057,7 @@ } } break; - + default: BApplication::MessageReceived (msg); } @@ -1058,7 +1092,7 @@ case VERSION_VERSION: result = VERSION_STRING; break; - + case VERSION_DATE: result = BUILD_DATE; result.ReplaceAll ("_", " "); @@ -1066,7 +1100,7 @@ } } -const char * +const char * VisionApp::GetString (const char *stringName) const { BAutolock stringLock (const_cast<BLocker *>(&fSettingsLock)); @@ -1077,14 +1111,14 @@ { if (fDebugSettings) printf (":SETTINGS: looking up String \"%s\"... ", stringName); - + if ((fVisionSettings->FindString (stringName, &value)) == B_OK) - if (fDebugSettings) + if (fDebugSettings) printf ("found; returning %s\n", value); else if (fDebugSettings) printf (" not found; returning NULL\n"); - } + } return value; } @@ -1093,7 +1127,7 @@ VisionApp::SetString (const char *stringName, int32 index, const char *value) { BAutolock stringLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!stringLock.IsLocked()) return; @@ -1104,10 +1138,10 @@ msg.AddString ("which", stringName); Broadcast (&msg); } - + BString tmp; tmp = value; - + fVisionSettings->ReplaceString (stringName, index, tmp); } @@ -1117,13 +1151,13 @@ BRect rect (0.0, 0.0, 0.0, 0.0); BAutolock rectLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!rectLock.IsLocked()) return rect; - + if (fVisionSettings->HasRect (settingName)) fVisionSettings->FindRect (settingName, &rect); - + return rect; } @@ -1131,10 +1165,10 @@ VisionApp::SetRect (const char *settingName, BRect value) { BAutolock rectLock(const_cast<BLocker *>(&fSettingsLock)); - + if (!rectLock.IsLocked()) return; - + fVisionSettings->ReplaceRect (settingName, value); } @@ -1145,11 +1179,11 @@ rgb_color color = {0, 0, 0, 255}; BAutolock colorLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!colorLock.IsLocked()) return color; - - + + if (which < MAX_COLORS && which >= 0) color = fColors[which]; @@ -1162,10 +1196,10 @@ { BAutolock colorLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!colorLock.IsLocked()) return; - + if (which < MAX_COLORS && which >= 0 && (fColors[which].red != color.red || fColors[which].green != color.green @@ -1175,7 +1209,7 @@ fColors[which] = color; fVisionSettings->ReplaceData ("color", B_RGB_COLOR_TYPE, which, reinterpret_cast<void * const *>(&color), sizeof(rgb_color)); - fActiveTheme->WriteLock(); + fActiveTheme->WriteLock(); if (which == C_BACKGROUND) { // update regular background color on all other text @@ -1183,7 +1217,7 @@ fActiveTheme->SetBackground (i , color); fActiveTheme->SetBackground (MAX_COLORS, color); } - + // update timestamp bg color else if (which == C_TIMESTAMP_BACKGROUND) fActiveTheme->SetBackground (C_TIMESTAMP, color); @@ -1197,7 +1231,7 @@ } else fActiveTheme->SetForeground (which, color); - fActiveTheme->WriteUnlock(); + fActiveTheme->WriteUnlock(); } } @@ -1211,10 +1245,10 @@ { BAutolock fontLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!fontLock.IsLocked()) return; - + if (which < MAX_FONTS && which >= 0) { BString fontStr; @@ -1230,7 +1264,7 @@ if (which == F_TEXT) fActiveTheme->SetFont (MAX_FONTS, fClientFont[which]); fActiveTheme->WriteUnlock(); - + SetString (fontStr.String(), 0, family); SetString (styleStr.String(), 0, style); } @@ -1241,18 +1275,18 @@ VisionApp::ClientFontSize (int32 which, float size) { BAutolock fontLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!fontLock.IsLocked()) return; if (which < MAX_FONTS && which >= 0) { fClientFont[which]->SetSize (size); - + fActiveTheme->WriteLock(); fActiveTheme->SetFont (which, fClientFont[which]); fActiveTheme->WriteUnlock(); - + if (fVisionSettings->ReplaceFloat ("size", which, size) != B_OK) printf("error, could not set font size\n"); } @@ -1262,11 +1296,11 @@ VisionApp::GetClientFont (int32 which) const { BAutolock fontLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!fontLock.IsLocked()) return NULL; - return which < MAX_FONTS && which >= 0 + return which < MAX_FONTS && which >= 0 ? fClientFont[which] : be_plain_font; } /// end font prefs /// @@ -1276,9 +1310,9 @@ VisionApp::GetEvent (int32 which) const { BAutolock eventLock (const_cast<BLocker *>(&fSettingsLock)); - + BString value; - + if (eventLock.IsLocked()) { if (which < MAX_EVENTS && which >= 0) @@ -1294,7 +1328,7 @@ VisionApp::SetEvent (int32 which, const char *event) { BAutolock eventLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!eventLock.IsLocked()) return; @@ -1316,9 +1350,9 @@ VisionApp::GetCommand (int32 which) { BAutolock commandLock (const_cast<BLocker *>(&fSettingsLock)); - + BString value; - + if (commandLock.IsLocked()) { if (which < MAX_COMMANDS && which >= 0) @@ -1334,7 +1368,7 @@ VisionApp::SetCommand (int32 which, const char *command) { BAutolock commandLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!commandLock.IsLocked()) return; @@ -1345,7 +1379,7 @@ if (which < MAX_COMMANDS && which >= 0) { fCommands[which] = command; - + SetString (commandStr.String(), 0, command); } } @@ -1355,22 +1389,22 @@ VisionApp::GetBool (const char *settingName) { BAutolock boolLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!boolLock.IsLocked()) return B_ERROR; if (fDebugSettings) printf (":SETTINGS: looking up bool \"%s\"... ", settingName); - + bool value (false); - + if (fVisionSettings->FindBool (settingName, &value) == B_OK) if (fDebugSettings) printf ("found; returning %s\n", (value)? "true" : "false"); else if (fDebugSettings) printf (" not found; returning false\n"); - + return value; } @@ -1379,12 +1413,12 @@ VisionApp::SetBool (const char *settingName, bool value) { BAutolock boolLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!boolLock.IsLocked()) return B_ERROR; - + status_t result (B_OK); - + if ((result = fVisionSettings->ReplaceBool (settingName, value)) == B_OK) { BMessage msg (M_STATE_CHANGE); @@ -1399,10 +1433,10 @@ VisionApp::GetInt32 (const char *settingName) { BAutolock intLock (const_cast<BLocker *>(&fSettingsLock)); - + if (!intLock.IsLocked()) return B_ERROR; - + return fVisionSettings->FindInt32(settingName); } @@ -1413,9 +1447,9 @@ if (!intLock.IsLocked()) return B_ERROR; - + status_t result = fVisionSettings->ReplaceInt32 (settingName, value); - + return result; } @@ -1425,7 +1459,7 @@ BMessage msg (VIS_NETWORK_DATA); BAutolock netLock (const_cast<BLocker *>(&fSettingsLock)); - + if (netLock.IsLocked()) { if (!strcmp (network, "defaults")) @@ -1470,7 +1504,7 @@ if (!netLock.IsLocked()) return B_ERROR; - + if (!strcmp (network, "defaults")) { fVisionSettings->ReplaceMessage ("defaults", data); @@ -1536,7 +1570,7 @@ static const char *tnames[] = { /* 0 */ "gummi_bear_orgy", /* 1 */ "complimentary_tote_bag", - /* 2 */ "cheating_at_solitaire", + /* 2 */ "cheating_at_solitaire", /* 3 */ "impatient", /* 4 */ "personal_info_uploader", /* 5 */ "keystroke_logger", @@ -1557,7 +1591,7 @@ /* 20 */ "peer_reset_thread", /* 21 */ "chocoak_is_my_hero", /* 22 */ "blossom", // commander and the leader - /* 23 */ "bubbles", // the joy and the laughter + /* 23 */ "bubbles", // the joy and the laughter /* 24 */ "buttercup", // shes the toughest fighter // Powerpuffs save the day! /* 25 */ "youlooklikeyouneedamonkey", @@ -1590,20 +1624,20 @@ /* 52 */ "daydreaming", /* 53 */ "BEWARE OF THE DUCK!" // this one's for you freston :-) }; - + int rnd (rand() % 54); - + switch (thread_type) { case THREAD_S: output = "s>"; break; - + case THREAD_L: output = "l>"; break; } - + output += tnames[rnd]; } @@ -1616,7 +1650,7 @@ int32 bench0; bench0 = fBench2 - fBench1; bench0 = bench0 / 100; - + printf ("%s: 0.%04lds\n", ts, bench0); } @@ -1651,28 +1685,28 @@ // Unlock(); } -int32 -VisionApp::Identity (void *) +int32 +VisionApp::Identity (void *) { int32 identSock (0), accepted (0); - BString ident; + BString ident; char received[64]; - + struct sockaddr_in localAddr; localAddr.sin_family = AF_INET; localAddr.sin_port = htons (113); localAddr.sin_addr.s_addr = INADDR_ANY; - - if ((identSock = socket (AF_INET, SOCK_STREAM, 0)) >= 0 - && bind (identSock, (struct sockaddr *)&localAddr, sizeof (localAddr)) == 0) + + if ((identSock = socket (AF_INET, SOCK_STREAM, 0)) >= 0 + && bind (identSock, (struct sockaddr *)&localAddr, sizeof (localAddr)) == 0) { vision_app->fIdentSocket = identSock; - struct linger lng = { 0, 0 }; + struct linger lng = { 0, 0 }; setsockopt (identSock, SOL_SOCKET, SO_LINGER, &lng, sizeof (linger)); listen (identSock, 1); - while (!vision_app->fShuttingDown) + while (!vision_app->fShuttingDown) { struct fd_set rset, eset; struct sockaddr_in remoteSock; @@ -1692,11 +1726,11 @@ { FD_ZERO (&rset); FD_ZERO (&eset); - + BString remoteIP (inet_ntoa (remoteSock.sin_addr)); ident = vision_app->GetIdent (remoteIP.String()); - if (ident.Length() > 0) + if (ident.Length() > 0) { memset (received, 0, 64); FD_SET (accepted, &rset); @@ -1704,30 +1738,30 @@ if (select (accepted + 1, &rset, 0, &eset, &tv) > 0 && FD_ISSET (accepted, &rset) && !FD_ISSET (accepted, &eset)) { - + recv (accepted, received, 64, 0); - int32 len (0); - - received[63] = 0; - while ((len = strlen (received)) - && isspace (received[len - 1])) + int32 len (0); + + received[63] = 0; + while ((len = strlen (received)) + && isspace (received[len - 1])) received[len - 1] = 0; - - BString string; - - string.Append (received); - string.Append (" : USERID : BeOS : "); - string.Append (ident); - string.Append ("\r\n"); - - send (accepted, string.String(), string.Length(), 0); + + BString string; + + string.Append (received); + string.Append (" : USERID : BeOS : "); + string.Append (ident); + string.Append ("\r\n"); + + send (accepted, string.String(), string.Length(), 0); } - } - else - { + } + else + { BString string ("0 , 0 : UNKNOWN : UNKNOWN-ERROR"); send (accepted, string.String(), string.Length(), 0); - } + } close (accepted); } } @@ -1735,35 +1769,35 @@ } close (identSock); - return 0; -} - -void -VisionApp::AddIdent (const char *server, const char *serverIdent) -{ - fIdentLock.Lock(); - fIdents.AddString (server, serverIdent); + return 0; +} + +void +VisionApp::AddIdent (const char *server, const char *serverIdent) +{ + fIdentLock.Lock(); + fIdents.AddString (server, serverIdent); fIdentLock.Unlock(); -} - -void -VisionApp::RemoveIdent (const char *server) -{ - fIdentLock.Lock(); - fIdents.RemoveName (server); - fIdentLock.Unlock(); -} - -BString +} + +void +VisionApp::RemoveIdent (const char *server) +{ + fIdentLock.Lock(); + fIdents.RemoveName (server); + fIdentLock.Unlock(); +} + +BString VisionApp::GetIdent (const char *server) { BString ident; - fIdentLock.Lock(); - if (fIdents.HasString (server)) - ident = fIdents.FindString (server); + fIdentLock.Lock(); + if (fIdents.HasString (server)) + ident = fIdents.FindString (server); fIdentLock.Unlock(); - - return ident; + + return ident; } void @@ -1773,10 +1807,10 @@ BMessage netMsg (GetNetwork (network)); if (!netMsg.HasString("name")) return; - + type_code type; int32 attrCount; - + // make sure this nick hasn't already been added netMsg.GetInfo ("notify", &type, &attrCount); for (int32 i = 0; i < attrCount; i++) @@ -1806,7 +1840,7 @@ } } if (i < attrCount) - SetNetwork (network, &netMsg); + SetNetwork (network, &netMsg); } void @@ -1816,7 +1850,7 @@ BMessage netMsg (GetNetwork (network)); if (!netMsg.HasString("name")) return; - + char optype[8]; memset(optype, 0, sizeof(optype)); if (exclude) @@ -1827,10 +1861,10 @@ { strcpy(optype, "ignore"); } - + type_code type; int32 attrCount; - + // make sure this nick hasn't already been added netMsg.GetInfo (optype, &type, &attrCount); for (int32 i = 0; i < attrCount; i++) @@ -1871,7 +1905,7 @@ } } if (i < attrCount) - SetNetwork (network, &netMsg); + SetNetwork (network, &netMsg); } @@ -1905,12 +1939,12 @@ BString command(GetWord(cmd, 1).ToUpper()); BString newcmd = fAliases[command]; const char *parse = newcmd.String(); - + int32 replidx (0); int32 varidx (0); newcmd.ReplaceAll("$C", channel.String()); - + while (*parse != '\0') { if (*parse != '$') @@ -1954,7 +1988,7 @@ { result = B_ERROR; } - + return result; } Modified: branches/0.9.7/src/Vision.h =================================================================== --- branches/0.9.7/src/Vision.h 2013-06-04 23:48:57 UTC (rev 943) +++ branches/0.9.7/src/Vision.h 2013-06-05 00:25:23 UTC (rev 944) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -61,26 +61,28 @@ virtual bool QuitRequested (void); virtual void ArgvReceived (int32, char **); virtual void ReadyToRun (void); - + void LoadURL (const char *); void VisionVersion (int, BString &); - + + void LoadInitialSettings (void); + void InitDefaults (void); - + void LoadDefaults (int32); void ClientFontFamilyAndStyle (int32, const char *, const char *); void ClientFontSize (int32, float); const BFont *GetClientFont (int32) const; - + const BRect GetRect (const char *); void SetRect (const char *, BRect); - - const char *GetString (const char *) const; - void SetString (const char *, int32 index, const char *); - + + const char *GetString (const char *) const; + void SetString (const char *, int32 index, const char *); + rgb_color GetColor (int32) const; void SetColor (int32, const rgb_color); @@ -92,10 +94,10 @@ bool GetBool (const char *); status_t SetBool (const char *, bool); - + int32 GetInt32 (const char *); status_t SetInt32 (const char *, int32); - + BMessage GetNetwork (const char *); BMessage GetNetwork (int32); status_t SetNetwork (const char *, BMessage *); @@ -103,41 +105,41 @@ bool CheckNetworkValid (const char *); Theme * ActiveTheme(void); - + void GetThreadName (int, BString &); - + void BenchOut (const char *); void Broadcast (BMessage *); void Broadcast (BMessage *, const char *, bool = false); - + void AddIdent (const char *, const char *); void RemoveIdent (const char *); BString GetIdent (const char *); static int32 Identity (void *); - + void AddNotifyNick(const char *, const char *); void RemoveNotifyNick (const char *, const char *); void AddIgnoreNick(const char *, const char *, bool = false); void RemoveIgnoreNick (const char *, const char *, bool = false); - + void AcquireDCCLock (void); void ReleaseDCCLock (void); bool SaveSettings (void); - + bigtime_t VisionUptime (void); - + bool HasAlias(const BString &) const; BString ParseAlias(const char *, const BString &); status_t AddAlias(const BString &, const BString &); void RemoveAlias(const BString &); void LoadAliases(); void SaveAliases(); - + int32 CountAliases() const; bool GetNextAlias(void **, BString &, BString &); - + BString fEvents[MAX_EVENTS]; bool fDebugSettings; @@ -151,7 +153,7 @@ // used for benchmarking int32 fBench1; int32 fBench2; - + ClientWindow *pClientWin (void) const; entry_ref AppRef(void) const; @@ -160,7 +162,7 @@ void InitSettings (void); int32 ThreadStates (void); bool CheckStartupNetworks (void); - + volatile bool fShuttingDown; AboutWindow *fAboutWin; @@ -169,9 +171,9 @@ PrefsWindow *fPrefsWin; NetworkWindow *fNetWin; DCCFileWindow *fDccFileWin; - + SettingsFile *fVisionSettings; - + rgb_color fColors[MAX_COLORS]; BFont *fClientFont[MAX_FONTS]; BString fCommands[MAX_COMMANDS]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ane...@us...> - 2013-06-04 23:49:00
|
Revision: 943 http://sourceforge.net/p/vision/code/943 Author: anevilyak Date: 2013-06-04 23:48:57 +0000 (Tue, 04 Jun 2013) Log Message: ----------- - Remove obsolete InfoPopper support. - Backport support for Haiku's notifications. Modified Paths: -------------- branches/0.9.7/Makefile branches/0.9.7/src/ChannelAgent.cpp branches/0.9.7/src/MessageAgent.cpp branches/0.9.7/src/ParseENums.cpp Modified: branches/0.9.7/Makefile =================================================================== --- branches/0.9.7/Makefile 2013-05-31 01:34:17 UTC (rev 942) +++ branches/0.9.7/Makefile 2013-06-04 23:48:57 UTC (rev 943) @@ -16,7 +16,7 @@ # the file name, ... BINARY := Vision -VERSION := 0.9.7-H-130530 +VERSION := 0.9.7-H-130604 BUILDDATE := $(shell date +%b_%d_%Y) BUILD_TYPE := Release Modified: branches/0.9.7/src/ChannelAgent.cpp =================================================================== --- branches/0.9.7/src/ChannelAgent.cpp 2013-05-31 01:34:17 UTC (rev 942) +++ branches/0.9.7/src/ChannelAgent.cpp 2013-06-04 23:48:57 UTC (rev 943) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing + * implied. See the License for the specific language governing * rights and limitations under the License. - * - * The Original Code is Vision. - * + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -27,6 +27,7 @@ #include <Beep.h> #include <FilePanel.h> #include <MenuItem.h> +#include <Notification.h> #include <PopUpMenu.h> #include <Roster.h> #include <ScrollView.h> @@ -44,10 +45,6 @@ #include "ChannelOptions.h" #include "ResizeView.h" -#ifdef USE_INFOPOPPER -#include <infopopper/InfoPopper.h> -#endif - ChannelAgent::ChannelAgent ( const char *id_, const char *serverName_, @@ -76,7 +73,7 @@ { /* * Function purpose: Consctruct - */ + */ } ChannelAgent::~ChannelAgent (void) @@ -84,13 +81,13 @@ /* * Function purpose: Clean up */ - + fNamesList->ClearList(); - + // empty recent nick list while (fRecentNicks.CountItems() > 0) delete fRecentNicks.RemoveItemAt(0L); - + // empty nick completion list while (fCompletionNicks.CountItems() > 0) delete fCompletionNicks.RemoveItemAt(0L); @@ -103,7 +100,7 @@ * Function purpose: Once the BView has been successfully attached, call Init() */ - + Init(); ClientAgent::AttachedToWindow(); } @@ -114,20 +111,20 @@ /* * Function purpose: Setup everything */ - + const BRect namesRect (vision_app->GetRect ("nameListRect")); fTextScroll->ResizeTo ( Frame().Width() - ((namesRect.Width() == 0.0) ? 100 : namesRect.Width()), fTextScroll->Frame().Height()); - + fFrame = Bounds(); fFrame.left = fTextScroll->Frame().right + 6; fFrame.right -= B_V_SCROLL_BAR_WIDTH + 1; fFrame.bottom = fTextScroll->Frame().bottom - 1; - + fNamesList = new NamesView (fFrame); - + fNamesScroll = new BScrollView( "scroll_names", fNamesList, @@ -164,7 +161,7 @@ fNamesScroll->MoveBy (difference, 0.0); Sync(); } - + ClientAgent::Show(); } @@ -176,19 +173,19 @@ * Function purpose: Find the index of nickname {data} in the * ChannelAgent's NamesView */ - + if (fNamesList == NULL) return -1; - + int32 count (fNamesList->CountItems()); for (int32 i = 0; i < count; ++i) { NameItem *item (static_cast<NameItem *>(fNamesList->ItemAt (i))); - + if (item == NULL) continue; - + BString nick (item->Name()); if ((nick[0] == '@' || nick[0] == '+' || nick[0] == '%') @@ -230,7 +227,7 @@ ChannelAgent::AddUser (const char *nick, const int32 status) { NameItem *compareItem (NULL); - + // make sure this nick doesn't already exist in the list // can happen since some ircds allow stealth quits that don't // broadcast a quit message @@ -241,7 +238,7 @@ if (compareItem && compareItem->Name().ICompare(nick) == 0) return; } - + fNamesList->AddItem (new NameItem (nick, status)); fNamesList->SortItems (SortNames); @@ -249,7 +246,7 @@ BString buffer; buffer << fUserCount; BString *comparator (NULL); - + // check if new nickname matches against tab completion sequence and update nick list // if so if (fLastExpansion.Length() > 0 && fLastExpansion.ICompare(nick, fLastExpansion.Length()) == 0) @@ -259,14 +256,14 @@ { comparator = fCompletionNicks.ItemAt (i); if (comparator && comparator->ICompare (nick) < 0) - { + { BString *string (new BString (nick)); fCompletionNicks.AddItem (string, i+1); break; } } } - + if (!IsHidden()) vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_USERS, buffer.String()); } @@ -279,15 +276,15 @@ * Function purpose: Remove nickname {data} from the ChannelAgent's * NamesView and update the status counts */ - - + + if (fNamesList == NULL) return false; - + // if nickname is present in tab completion lists, remove RemoveNickFromList(fRecentNicks, data); RemoveNickFromList(fCompletionNicks, data); - + int32 myIndex (FindPosition (data)); if (myIndex >= 0) @@ -303,7 +300,7 @@ { --fOpsCount; buffer << fOpsCount; - + if (!IsHidden()) vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_OPS, buffer.String()); @@ -314,12 +311,12 @@ buffer << fUserCount; if (!IsHidden()) vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_USERS, buffer.String()); - + delete item; return true; } } - + return false; } @@ -353,9 +350,9 @@ * * uses strict lexicographic order, ignores the op/voice bits */ - + // clunky way to get around C++ warnings re casting from const void * to NameItem * - + // Not sure if this can happen, and we // are assuming that if one is NULL // we return them as equal. What if one @@ -380,9 +377,9 @@ * Voiced * Normal User */ - + // clunky way to get around C++ warnings re casting from const void * to NameItem * - + const NameItem *firstPtr (*((NameItem * const *)name1)); const NameItem *secondPtr (*((NameItem * const *)name2)); @@ -412,9 +409,9 @@ /* * Function purpose: Get the characters before the caret's current position, * and update the fInput VTextControl with a relevant match - * from the ChannelAgent's NamesView + * from the ChannelAgent's NamesView */ - + int32 start, finish; static int32 lastindex; static BString lastNick; @@ -444,10 +441,10 @@ while (!fCompletionNicks.IsEmpty()) delete fCompletionNicks.RemoveItemAt(0L); - + int32 count (fNamesList->CountItems()), i (0); - + for (i = 0; i < count ; i++) { BString *name (new BString(static_cast<NameItem *>(fNamesList->ItemAt(i))->Name())); @@ -458,7 +455,7 @@ } // sort items alphabetically fCompletionNicks.SortItems (AlphaSortNames); - + count = fRecentNicks.CountItems(); // parse recent nicks in reverse to ensure that they're pushed onto the completion // list in the correct order @@ -482,7 +479,7 @@ delete name; } } - + // We first check if what the user typed matches the channel // If that doesn't match, we check the names BString insertion; @@ -495,7 +492,7 @@ if (count > 0) { insertion = *(fCompletionNicks.ItemAt(lastindex++)); - + if (lastindex == count) lastindex = 0; lastNick = insertion; } @@ -544,7 +541,7 @@ ChannelAgent::MessageReceived (BMessage *msg) { int32 i (0); - + switch (msg->what) { case M_USER_QUIT: @@ -552,11 +549,11 @@ const char *nick (NULL); msg->FindString ("nick", &nick); - + if (RemoveUser (nick)) { BMessage display; - + if (msg->FindMessage ("display", &display) == B_NO_ERROR) ClientAgent::MessageReceived (&display); } @@ -567,7 +564,7 @@ { const char *nick (NULL); bool ignore (false); - + int32 iStatus (STATUS_NORMAL_BIT); msg->FindString ("nick", &nick); @@ -579,7 +576,7 @@ } if (ignore) iStatus |= STATUS_IGNORE_BIT; - + AddUser (nick, iStatus); BMessage display; @@ -613,7 +610,7 @@ { int32 count (fRecentNicks.CountItems()); BString *name (NULL); - + for (i = 0; i < count ; i++) if ((name = fRecentNicks.ItemAt (i))->ICompare (oldNick) == 0) { @@ -637,7 +634,7 @@ } else break; - + ClientAgent::MessageReceived (msg); } break; @@ -661,11 +658,11 @@ msg->FindBool ("voice", i, &voice); msg->FindBool ("helper", i, &helper); msg->FindBool ("ignored", i, &ignored); - + if (FindPosition (nick) < 0) { int32 iStatus (ignored ? STATUS_IGNORE_BIT : 0); - + if (founder) { ++nick; @@ -696,13 +693,13 @@ } else iStatus |= STATUS_NORMAL_BIT; - + fUserCount++; - + fNamesList->AddItem (new NameItem (nick, iStatus)); } } - + fNamesList->SortItems (SortNames); if (!IsHidden()) @@ -717,7 +714,7 @@ } } break; - + case M_RESIZE_VIEW: { BPoint point; @@ -739,20 +736,20 @@ fNamesList->ClearList(); fOpsCount = 0; fUserCount = 0; - + // clear heuristics completion list - this ensures that no stale nicks are left // over in it after reconnect -- list will quickly be rebuilt anyhow if there // is any conversation whatsoever going on while (fRecentNicks.CountItems() > 0) delete fRecentNicks.RemoveItemAt(0L); - + } break; - + case M_REJOIN: { const char *newNick (NULL); - + if (msg->FindString ("nickname", &newNick) != B_OK) { printf("Error: ChannelAgent::MessageReceived, M_REJOIN: invalid pointer\n"); @@ -760,16 +757,16 @@ } fMyNick = newNick; // update nickname (might have changed on reconnect) - + if (!IsHidden()) vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_NICK, fMyNick.String()); - + Display (S_CHANNEL_RECON_REJOIN B_UTF8_ELLIPSIS "\n", C_ERROR, C_BACKGROUND, F_SERVER); - // send join cmd - BMessage send (M_SERVER_SEND); + // send join cmd + BMessage send (M_SERVER_SEND); AddSend (&send, "JOIN "); - AddSend (&send, fId); + AddSend (&send, fId); if (fChanKey != "") { AddSend (&send, " "); @@ -778,7 +775,7 @@ AddSend (&send, endl); } break; - + case M_CHANNEL_TOPIC: { const char *theTopic (NULL); @@ -790,12 +787,12 @@ break; } fTopic = theTopic; - + if (!IsHidden()) vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_META, FilterCrap(theTopic, true).String()); BMessage display; - + if (msg->FindMessage ("display", &display) == B_NO_ERROR) ClientAgent::MessageReceived (&display); } @@ -805,7 +802,7 @@ { const char *theNick (NULL); msg->FindString("nick", &theNick); - + if (theNick == NULL) { NameItem *myUser; @@ -817,7 +814,7 @@ msg->AddString ("nick", targetNick.String()); } } - + fSMsgr.SendMessage (msg); } break; @@ -826,14 +823,14 @@ { const char *theChannel (NULL), *kicker (NULL), *rest (NULL); - + if ((msg->FindString ("channel", &theChannel) != B_OK) || - (msg->FindString ("kicker", &kicker) != B_OK) || + (msg->FindString ("kicker", &kicker) != B_OK) || (msg->FindString ("rest", &rest) != B_OK)) { printf("Error: ClientAgent::MessageReceived, M_CHANNEL_GOT_KICKED, invalid pointer\n"); break; - } + } BMessage wegotkicked (M_DISPLAY); // "you were kicked" BString buffer; @@ -850,7 +847,7 @@ fNamesList->ClearList(); fOpsCount = 0; fUserCount = 0; - + fMsgr.SendMessage (&wegotkicked); BMessage attemptrejoin (M_DISPLAY); // "you were kicked" @@ -867,7 +864,7 @@ { AddSend (&send, " "); AddSend (&send, fChanKey); - } + } AddSend (&send, endl); } break; @@ -877,7 +874,7 @@ ModeEvent (msg); } break; - + case M_CHANNEL_MSG: { bool hasNick (false); @@ -888,38 +885,30 @@ msg->FindString ("nick", &theNick); if (theNick != fMyNick) FirstKnownAs (tempString, knownAs, &hasNick); - + if (IsHidden()) { UpdateStatus((hasNick) ? WIN_NICK_BIT : WIN_NEWS_BIT); -#ifdef USE_INFOPOPPER + if (hasNick) { - if (tempString[0] == '\1') - { - tempString.RemoveFirst("\1ACTION "); - tempString.RemoveLast ("\1"); - } + if (tempString[0] == '\1') + { + tempString.RemoveFirst("\1ACTION "); + tempString.RemoveLast ("\1"); + } - if (be_roster->IsRunning(InfoPopperAppSig) == true) { - entry_ref ref = vision_app->AppRef(); - BMessage infoMsg(InfoPopper::AddMessage); - infoMsg.AddString("appTitle", S_INFOPOPPER_TITLE); - infoMsg.AddString("title", fServerName.String()); - infoMsg.AddInt8("type", (int8)InfoPopper::Important); - - infoMsg.AddInt32("iconType", InfoPopper::Attribute); - infoMsg.AddRef("iconRef", &ref); - - BString content; - content << fId << " - " << theNick << " said: " << tempString; - infoMsg.AddString("content", content); - - BMessenger(InfoPopperAppSig).SendMessage(&infoMsg); - }; + BNotification notification(B_INFORMATION_NOTIFICATION); + notification.SetGroup(BString("Vision")); + entry_ref ref = vision_app->AppRef(); + notification.SetOnClickFile(&ref); + notification.SetTitle(fServerName.String()); + BString content; + content.SetToFormat("%s - %s said: %s", + fId.String(), theNick.String(), tempString.String()); + notification.SetContent(content); + notification.Send(); } -#endif - } else if (hasNick) system_beep(kSoundEventNames[(uint32)seNickMentioned]); @@ -933,7 +922,7 @@ const char *mode (NULL), *chan (NULL), *msgz (NULL); - + if ((msg->FindString ("mode", &mode) != B_OK) || (msg->FindString ("chan", &chan) != B_OK) || (msg->FindString ("msgz", &msgz) != B_OK)) @@ -946,21 +935,21 @@ { BString realMode (GetWord (mode, 1)); int32 place (2); - + if (realMode.FindFirst ("l") >= 0) fChanLimit = GetWord (mode, place++); if (realMode.FindFirst ("k") >= 0) { fChanKey = GetWord (mode, place++); - + // u2 may not send the channel key, thats why we stored the /join cmd // in a string in ParseCmd if (fChanKey == "*" && fIrcdtype == IRCD_UNDERNET) { BString tempId (fId); tempId.Remove (0, 1); // remove any #, &, !, blah. - + if (vision_app->pClientWin()->joinStrings.FindFirst (tempId) < 1) { // can't find the join cmd for this channel in joinStrings! @@ -968,23 +957,23 @@ else { BString joinStringsL (vision_app->pClientWin()->joinStrings); - + // FindLast to make sure we get the last attempt (user might have // tried several keys) - int32 idPos (joinStringsL.FindLast (tempId)); + int32 idPos (joinStringsL.FindLast (tempId)); BString tempKeyString; joinStringsL.MoveInto (tempKeyString, idPos, joinStringsL.Length()); - + fChanKey = GetWord (tempKeyString.String(), 2); } } // end u2-kludge stuff - + } fChanMode = mode; if (!IsHidden()) - vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_MODES, fChanMode.String()); + vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_MODES, fChanMode.String()); } - + BMessage dispMsg (M_DISPLAY); PackDisplay (&dispMsg, msgz, C_OP, C_BACKGROUND, F_TEXT); BMessenger display (this); @@ -995,17 +984,17 @@ case M_NAMES_POPUP_MODE: { const char *inaction (NULL); - + msg->FindString ("action", &inaction); int32 count (0), index (0); - + BString victims, targetNick, action (inaction), modechar, polarity; - + NameItem *myUser (NULL); /// action /// @@ -1024,7 +1013,7 @@ /// iterate /// while ((i = fNamesList->CurrentSelection (index++)) >= 0) - { + { myUser = static_cast<NameItem *>(fNamesList->ItemAt (i)); targetNick = myUser->Name(); @@ -1042,7 +1031,7 @@ command += modechar; command += victims; - + ParseCmd (command.String()); } break; @@ -1050,7 +1039,7 @@ case M_NAMES_POPUP_CTCP: { const char *inaction (NULL); - + msg->FindString ("action", &inaction); int32 index (0); @@ -1062,14 +1051,14 @@ /// iterate /// while ((i = fNamesList->CurrentSelection (index++)) >= 0) - { + { myUser = static_cast<NameItem *>(fNamesList->ItemAt (i)); targetNick = myUser->Name(); victims += targetNick; victims += ","; } - + victims.RemoveLast (","); BString command ("/ctcp "); @@ -1090,7 +1079,7 @@ /// iterate /// while ((i = fNamesList->CurrentSelection (index++)) >= 0) - { + { myUser = static_cast<NameItem *>(fNamesList->ItemAt (i)); targetNick = myUser->Name(); @@ -1099,14 +1088,14 @@ } victims.RemoveLast (","); - + BString command ("/whois "); command += victims; ParseCmd (command.String()); } break; - + case M_NAMES_POPUP_NOTIFY: { int32 index (0); @@ -1116,7 +1105,7 @@ /// iterate /// while ((i = fNamesList->CurrentSelection (index++)) >= 0) - { + { myUser = static_cast<NameItem *>(fNamesList->ItemAt (i)); targetNick = myUser->Name(); @@ -1125,7 +1114,7 @@ } victims.RemoveLast (","); - + BString command ("/notify "); command += victims; @@ -1134,43 +1123,43 @@ } break; - case M_NAMES_POPUP_DCCCHAT: - { - int32 index (0); - BString targetNick; - NameItem *myUser (NULL); + case M_NAMES_POPUP_DCCCHAT: + { + int32 index (0); + BString targetNick; + NameItem *myUser (NULL); - /// iterate /// - while ((i = fNamesList->CurrentSelection(index++)) >= 0) - { - myUser = static_cast<NameItem *>(fNamesList->ItemAt(i)); - targetNick = myUser->Name(); - - BString command ("/dcc chat "); - command += targetNick; + /// iterate /// + while ((i = fNamesList->CurrentSelection(index++)) >= 0) + { + myUser = static_cast<NameItem *>(fNamesList->ItemAt(i)); + targetNick = myUser->Name(); - ParseCmd (command.String()); - } - } + BString command ("/dcc chat "); + command += targetNick; + + ParseCmd (command.String()); + } + } break; - + case M_NAMES_POPUP_DCCSEND: { - int32 index (0); - BString targetNick; - NameItem *myUser (NULL); + int32 index (0); + BString targetNick; + NameItem *myUser (NULL); - /// iterate /// - while ((i = fNamesList->CurrentSelection(index++)) >= 0) - { - myUser = static_cast<NameItem *>(fNamesList->ItemAt(i)); - targetNick = myUser->Name(); - - BString command ("/dcc send "); - command += targetNick; + /// iterate /// + while ((i = fNamesList->CurrentSelection(index++)) >= 0) + { + myUser = static_cast<NameItem *>(fNamesList->ItemAt(i)); + targetNick = myUser->Name(); - ParseCmd (command.String()); - } + BString command ("/dcc send "); + command += targetNick; + + ParseCmd (command.String()); + } } break; @@ -1179,14 +1168,14 @@ int32 index (0); BString targetNick, kickMsg (vision_app->GetCommand (CMD_KICK)); - NameItem *myUser (NULL); + NameItem *myUser (NULL); /// iterate /// while ((i = fNamesList->CurrentSelection(index++)) >= 0) - { + { myUser = static_cast<NameItem *>(fNamesList->ItemAt(i)); targetNick = myUser->Name(); - + BString command ("/kick "); command += targetNick; command += " "; @@ -1201,7 +1190,7 @@ { vision_app->pClientWin()->pStatusView()->AddItem (new StatusItem ( 0, ""), true); - + vision_app->pClientWin()->pStatusView()->AddItem (new StatusItem ( S_STATUS_LAG, "", STATUS_ALIGN_LEFT), true); @@ -1270,7 +1259,7 @@ AddSend (&send, msg->FindString("vision:partmsg")); } AddSend (&send, endl); - } + } ClientAgent::MessageReceived(msg); } break; @@ -1286,7 +1275,7 @@ /* * Function purpose: Send the text in {buffer} to the server */ - + fLastExpansion = ""; // used by ChannelAgent::TabExpansion() BMessage send (M_SERVER_SEND); @@ -1297,13 +1286,13 @@ Display ("<", C_MYNICK); Display (fMyNick.String(), C_NICKDISPLAY); - Display ("> ", C_MYNICK); - + Display ("> ", C_MYNICK); + BString sBuffer (buffer); - + AddSend (&send, sBuffer.String()); AddSend (&send, endl); - + Display (sBuffer.String()); Display ("\n"); } @@ -1315,7 +1304,7 @@ memset(modeString, 0, sizeof(modeString)); sprintf (modeString, "%c", theMode); BString myTemp; - + if (theSign == '-') { switch (theMode) @@ -1344,7 +1333,7 @@ } break; } - + fChanMode.RemoveFirst (modeString); } else @@ -1368,7 +1357,7 @@ theOld += fChanLimitOld; tempString.RemoveFirst (theOld); } - + tempString.Append (" "); tempString.Append (fChanLimit); fChanLimitOld = fChanLimit; @@ -1381,12 +1370,12 @@ theOld += fChanKeyOld; tempString.RemoveFirst (theOld); } - + tempString.Append (" "); tempString.Append (fChanKey); fChanKeyOld = fChanKey; } - + fChanMode = tempString; } @@ -1485,7 +1474,7 @@ buffer = ""; buffer << fOpsCount; - + if (!IsHidden()) vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_OPS, buffer.String()); } @@ -1510,13 +1499,13 @@ if (theOperator == '+' && theModifier == 'h') { hit = true; - + item->SetStatus ((iStatus & ~STATUS_NORMAL_BIT) | STATUS_HELPER_BIT); } else if (theModifier == 'h') { hit = true; - + iStatus &= ~STATUS_HELPER_BIT; if ((iStatus & STATUS_HELPER_BIT) == 0) iStatus |= STATUS_NORMAL_BIT; @@ -1548,7 +1537,7 @@ fChanKey = myTarget; UpdateMode ('+', 'k'); } - else if (theModifier == 'b' || theModifier == 'a' || theModifier == 'q') + else if (theModifier == 'b' || theModifier == 'a' || theModifier == 'q') { // dont do anything else } @@ -1562,7 +1551,7 @@ || mode[modPos] == '-') theOperator = mode[modPos++]; } - + if (hit) { fNamesList->SortItems (SortNames); Modified: branches/0.9.7/src/MessageAgent.cpp =================================================================== --- branches/0.9.7/src/MessageAgent.cpp 2013-05-31 01:34:17 UTC (rev 942) +++ branches/0.9.7/src/MessageAgent.cpp 2013-06-04 23:48:57 UTC (rev 943) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * * The Original Code is Vision. - * + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -26,10 +26,11 @@ #include <Beep.h> #include <Entry.h> #include <MenuItem.h> +#include <Notification.h> #include <PopUpMenu.h> #include <Roster.h> #include <UTF8.h> - + #include "MessageAgent.h" #include "WindowList.h" #include "ClientWindow.h" @@ -45,10 +46,6 @@ #include <sys/select.h> #include <arpa/inet.h> -#ifdef USE_INFOPOPPER -#include <infopopper/InfoPopper.h> -#endif - MessageAgent::MessageAgent ( BRect &frame_, const char *id_, @@ -103,7 +100,7 @@ fDataThread = spawn_thread(DCCIn, "DCC Chat(I)", B_NORMAL_PRIORITY, this); else fDataThread = spawn_thread(DCCOut, "DCC Chat(O)", B_NORMAL_PRIORITY, this); - + resume_thread (fDataThread); } ClientAgent::AllAttached(); @@ -143,22 +140,22 @@ int32 diff (atoi(vision_app->GetString ("dccMaxPort")) - myPort); if (diff > 0) myPort += rand() % diff; - + BString outNick (fChatee); outNick.RemoveFirst (" [DCC]"); struct sockaddr_in sa; - + BMessage reply; fSMsgr.SendMessage (M_GET_IP, &reply); - + BString address; reply.FindString ("ip", &address); - + if (fDPort != "") myPort = atoi (fDPort.String()); fMySocket = socket (AF_INET, SOCK_STREAM, 0); - + BMessage statMsg (M_DISPLAY); if (fMySocket < 0) @@ -171,35 +168,35 @@ sa.sin_family = AF_INET; sa.sin_addr.s_addr = INADDR_ANY; - + sa.sin_port = htons(myPort); - + if (bind (fMySocket, (struct sockaddr*)&sa, sizeof(sa)) == -1) { ClientAgent::PackDisplay (&statMsg, S_DCC_BIND_ERROR, C_ERROR); fMsgr.SendMessage (&statMsg); return; } - + BMessage sendMsg (M_SERVER_SEND); BString buffer; - + sa.sin_addr.s_addr = inet_addr (address.String()); - + buffer << "PRIVMSG " << outNick << " :\1DCC CHAT chat "; buffer << htonl(sa.sin_addr.s_addr) << " "; buffer << myPort << "\1"; sendMsg.AddString ("data", buffer.String()); fSMsgr.SendMessage (&sendMsg); - - vision_app->AcquireDCCLock(); + + vision_app->AcquireDCCLock(); listen (fMySocket, 1); BString dataBuffer; struct in_addr addr; - + addr.s_addr = inet_addr (address.String()); - dataBuffer << S_DCC_CHAT_LISTEN + dataBuffer << S_DCC_CHAT_LISTEN << address.String() << S_DCC_CHAT_PORT << myPort << "\n"; ClientAgent::PackDisplay (&statMsg, dataBuffer.String(), C_TEXT); fMsgr.SendMessage (&statMsg); @@ -213,23 +210,23 @@ BMessenger fSMsgrE (agent->fSMsgr); BMessenger mMsgr (agent); agent->DCCServerSetup(); - + int dccSocket (agent->fMySocket); int dccAcceptSocket (0); - + struct sockaddr_in remoteAddy; int theLen (sizeof (struct sockaddr_in)); dccAcceptSocket = accept(dccSocket, (struct sockaddr*)&remoteAddy, (socklen_t *)&theLen); - + vision_app->ReleaseDCCLock(); - + if (dccAcceptSocket < 0) return B_ERROR; - + agent->fAcceptSocket = dccAcceptSocket; agent->fDConnected = true; - + BMessage msg (M_DISPLAY); ClientAgent::PackDisplay (&msg, S_DCC_CHAT_CONNECTED); @@ -238,13 +235,13 @@ char tempBuffer[2]; BString inputBuffer; int32 recvReturn (0); - + struct fd_set rset, eset; FD_ZERO (&rset); FD_ZERO (&eset); FD_SET (dccAcceptSocket, &rset); FD_SET (dccAcceptSocket, &eset); - + while (mMsgr.IsValid() && agent->fDConnected) { if (select (dccAcceptSocket + 1, &rset, NULL, &eset, NULL) > 0) @@ -272,17 +269,17 @@ destLength (sizeof(convBuffer)), state (0); int32 encoding = vision_app->GetInt32("encoding"); - if (encoding != B_UNICODE_CONVERSION) + if (encoding != B_UNICODE_CONVERSION) { convert_to_utf8 ( encoding, - inputBuffer.String(), + inputBuffer.String(), &length, convBuffer, &destLength, &state); - } - else + } + else { if (IsValidUTF8(inputBuffer.String(), length)) { @@ -293,7 +290,7 @@ { convert_to_utf8 ( B_ISO1_CONVERSION, - inputBuffer.String(), + inputBuffer.String(), &length, convBuffer, &destLength, @@ -322,7 +319,7 @@ FD_SET (dccAcceptSocket, &rset); FD_SET (dccAcceptSocket, &eset); } - + return 0; } @@ -330,13 +327,13 @@ MessageAgent::DCCOut (void *arg) { MessageAgent *agent ((MessageAgent *)arg); - + BMessenger mMsgr (agent); struct sockaddr_in sa; int status; int dccAcceptSocket (0); char *endpoint; - + uint32 realIP = strtoul (agent->fDIP.String(), &endpoint, 10); if ((dccAcceptSocket = socket(AF_INET, SOCK_STREAM, 0)) < 0) @@ -347,9 +344,9 @@ mMsgr.SendMessage (&msg); return false; } - + agent->fAcceptSocket = dccAcceptSocket; - + sa.sin_family = AF_INET; sa.sin_port = htons (atoi (agent->fDPort.String())); sa.sin_addr.s_addr = ntohl (realIP); @@ -365,7 +362,7 @@ buffer << S_DCC_CHAT_TRY << inet_ntoa (addr) << S_DCC_CHAT_PORT << agent->fDPort << "\n"; - + ClientAgent::PackDisplay (&msg, buffer.String()); mMsgr.SendMessage (&msg); } @@ -398,7 +395,7 @@ FD_ZERO (&eset); FD_SET (dccAcceptSocket, &rset); FD_SET (dccAcceptSocket, &eset); - + while (mMsgr.IsValid() && agent->fDConnected) { if (select (dccAcceptSocket + 1, &rset, NULL, &eset, &tv) > 0) @@ -424,14 +421,14 @@ int32 length (inputBuffer.Length()), destLength (sizeof(convBuffer)), state (0); - + convert_to_utf8 ( - vision_app->GetInt32("encoding"), inputBuffer.String(), + vision_app->GetInt32("encoding"), inputBuffer.String(), &length, convBuffer, &destLength, &state); - + BMessage dispMsg (M_CHANNEL_MSG); dispMsg.AddString ("msgz", inputBuffer.String()); mMsgr.SendMessage (&dispMsg); @@ -454,7 +451,7 @@ FD_SET (dccAcceptSocket, &rset); FD_SET (dccAcceptSocket, &eset); } - + return 0; } @@ -466,7 +463,7 @@ const char *address) { // fAgentWinItem->SetName (nick); - + ClientAgent::ChannelMessage (msgz, nick, ident, address); } @@ -483,26 +480,26 @@ // and update DCC send logic to figure that out too entry_ref ref; msg->FindRef("refs", &ref); - + BMessage dccmsg(M_CHOSE_FILE); dccmsg.AddString("nick", fChatee.String()); dccmsg.AddRef("refs", &ref); - fSMsgr.SendMessage(&dccmsg); + fSMsgr.SendMessage(&dccmsg); } } break; - + case M_CHANNEL_MSG: { const char *nick (NULL); - + if (msg->HasString ("nick")) { msg->FindString ("nick", &nick); BString outNick (nick); outNick.RemoveFirst (" [DCC]"); if (fMyNick.ICompare (outNick) != 0 && !fDChat) - fAgentWinItem->SetName (outNick.String()); + fAgentWinItem->SetName (outNick.String()); msg->ReplaceString ("nick", outNick.String()); } else @@ -516,34 +513,25 @@ if (IsHidden()) UpdateStatus (WIN_NICK_BIT); - + if (IsHidden() || (window && !window->IsActive())) { -#ifdef USE_INFOPOPPER - if (be_roster->IsRunning(InfoPopperAppSig) == true) { - entry_ref ref = vision_app->AppRef(); - BMessage infoMsg(InfoPopper::AddMessage); - infoMsg.AddString("appTitle", S_INFOPOPPER_TITLE); - infoMsg.AddString("title", fServerName.String()); - infoMsg.AddInt8("type", (int8)InfoPopper::Important); - - infoMsg.AddInt32("iconType", InfoPopper::Attribute); - infoMsg.AddRef("iconRef", &ref); + BNotification notification(B_INFORMATION_NOTIFICATION); + notification.SetGroup(BString("Vision")); + entry_ref ref = vision_app->AppRef(); + notification.SetOnClickFile(&ref); + notification.SetTitle(fServerName.String()); + BString tempString(msg->FindString("msgz")); + if (tempString[0] == '\1') + { + tempString.RemoveFirst("\1ACTION "); + tempString.RemoveLast ("\1"); + } - BString tempString(msg->FindString("msgz")); - if (tempString[0] == '\1') - { - tempString.RemoveFirst("\1ACTION "); - tempString.RemoveLast ("\1"); - } - - BString content; - content << nick << " said: " << tempString.String(); - infoMsg.AddString("content", content); - - BMessenger(InfoPopperAppSig).SendMessage(&infoMsg); - }; -#endif + BString content; + content.SetToFormat("%s said: %s", nick, tempString.String()); + notification.SetContent(content); + notification.Send(); } if (window != NULL && !window->IsActive()) @@ -553,7 +541,7 @@ ClientAgent::MessageReceived (msg); } break; - + case M_MSG_WHOIS: { BMessage dataSend (M_SERVER_SEND); @@ -562,7 +550,7 @@ AddSend (&dataSend, fChatee.String()); AddSend (&dataSend, " "); AddSend (&dataSend, fChatee.String()); - AddSend (&dataSend, endl); + AddSend (&dataSend, endl); } case M_CHANGE_NICK: @@ -585,7 +573,7 @@ if (fDChat) fId.Append(" [DCC]"); - + // set up new logging file for new nick BMessage logMsg (M_UNREGISTER_LOGGER); logMsg.AddString("name", oldId.String()); @@ -594,13 +582,13 @@ logMsg.what = M_REGISTER_LOGGER; logMsg.AddString("name", fId.String()); fSMsgr.SendMessage(&logMsg); - + fAgentWinItem->SetName (fId.String()); - + ClientAgent::MessageReceived (msg); } - + else if (fMyNick.ICompare (oldNick) == 0) { if (!IsHidden()) @@ -615,13 +603,13 @@ vision_app->pClientWin()->pStatusView()->AddItem (new StatusItem ( 0, ""), true); - + vision_app->pClientWin()->pStatusView()->AddItem (new StatusItem ( "Lag: ", "", STATUS_ALIGN_LEFT), true); - + vision_app->pClientWin()->pStatusView()->AddItem (new StatusItem ( 0, "", @@ -633,9 +621,9 @@ vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_SERVER, fServerName.String(), false); vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_LAG, fMyLag.String(), false); vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_NICK, fMyNick.String(), true); - } + } break; - + default: ClientAgent::MessageReceived (msg); } @@ -663,7 +651,7 @@ convert_from_utf8 ( vision_app->GetInt32("encoding"), - outTemp.String(), + outTemp.String(), &length, convBuffer, &destLength, @@ -679,7 +667,7 @@ outTemp.RemoveLast ("\n"); ChannelMessage (outTemp.String(), nick); } - + } void MessageAgent::Parser (const char *buffer) @@ -709,13 +697,13 @@ convert_from_utf8 ( vision_app->GetInt32("encoding"), - outTemp.String(), + outTemp.String(), &length, convBuffer, &destLength, &state); - - + + if (send(fAcceptSocket, convBuffer, destLength, 0) < 0) { fDConnected = false; @@ -732,8 +720,8 @@ BString sBuffer (buffer); Display (sBuffer.String()); - + Display ("\n"); } Modified: branches/0.9.7/src/ParseENums.cpp =================================================================== --- branches/0.9.7/src/ParseENums.cpp 2013-05-31 01:34:17 UTC (rev 942) +++ branches/0.9.7/src/ParseENums.cpp 2013-06-04 23:48:57 UTC (rev 943) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -26,6 +26,7 @@ #include <Entry.h> #include <Menu.h> +#include <Notification.h> #include <Roster.h> #include "ClientWindow.h" @@ -45,16 +46,11 @@ #include <stdlib.h> #include <sys/socket.h> - -#ifdef USE_INFOPOPPER -#include <infopopper/InfoPopper.h> -#endif - bool ServerAgent::ParseENums (const char *data, const char *sWord) { int num (atoi (sWord)); - + switch (num) { case ZERO: // 0 @@ -62,12 +58,12 @@ // wasn't a numeric, or the server is playing tricks on us } return false; - + case ERR_UNKNOWNCOMMAND: // 421 - { + { BString tempString (RestOfString (data, 4)), badCmd (GetWord (data, 4)); - + if (badCmd == "VISION_LAG_CHECK") { int32 difference (system_time() - fLagCheck); @@ -81,18 +77,18 @@ fLagCount = 0; fCheckingLag = false; fMsgr.SendMessage (M_LAG_CHANGED); - } + } } else { tempString.RemoveFirst (":"); tempString.Append ("\n"); Display (tempString.String()); - } + } } return true; - - + + case RPL_WELCOME: // 001 case RPL_YOURHOST: // 002 case RPL_CREATED: // 003 @@ -103,7 +99,7 @@ fSMsgr.SendMessage (M_CONNECTED); fInitialMotd = true; fRetry = 0; - + if (fNetworkData.FindBool ("lagCheck")) { fMyLag = "0.000"; @@ -111,7 +107,7 @@ } BString theNick (GetWord (data, 3)); fMyNick = theNick; - + if (!IsHidden()) vision_app->pClientWin()->pStatusView()->SetItemValue (STATUS_NICK, theNick.String()); @@ -121,8 +117,8 @@ theMsg.Prepend ("* "); theMsg.Append ("\n"); Display (theMsg.String()); - - + + if (num == RPL_MYINFO) { // set "real" hostname @@ -133,10 +129,10 @@ hostName += fServerHostName.String(); hostName += "]"; fAgentWinItem->SetName (hostName.String()); - + // detect IRCd fIrcdtype = IRCD_STANDARD; - + if (theMsg.FindFirst("hybrid") > 0) fIrcdtype = IRCD_HYBRID; // ultimate and unreal share the same numerics, so treat them with the same @@ -153,40 +149,40 @@ fIrcdtype = IRCD_CONFERENCEROOM; else if (theMsg.FindFirst ("nn-") > 0) fIrcdtype = IRCD_NEWNET; - } + } } return true; - - + + case RPL_PROTOCTL: // 005 { // this numeric also serves as RPL_NNMAP on Newnet BString theMsg (RestOfString (data, 4)); theMsg.RemoveFirst (":"); - theMsg.Append ("\n"); - + theMsg.Append ("\n"); + switch (fIrcdtype) { case IRCD_NEWNET: { // RPL_NNMAP - Display (theMsg.String()); + Display (theMsg.String()); } break; - + default: { - // RPL_PROTOCTL + // RPL_PROTOCTL theMsg.Prepend ("* "); Display (theMsg.String()); } - } + } } return true; - - - + + + case RPL_LUSERHIGHESTCONN: // 250 case RPL_LUSERCLIENT: // 251 case RPL_LUSEROP: // 252 @@ -203,8 +199,8 @@ Display (theMsg.String()); } return true; - - + + /// strip and send to server agent /// case RPL_ULMAP: // 006 case RPL_ULMAPEND: // 007 @@ -301,20 +297,20 @@ Display (tempString.String()); } return true; - + case RPL_UMODEIS: // 221 { BString theMode (GetWord (data, 4)), tempString (S_PENUM_CURMODE); tempString += theMode; tempString += '\n'; - + BMessage msg (M_DISPLAY); PackDisplay (&msg, tempString.String(), C_WHOIS); PostActive (&msg); } return true; - + /// strip and send to active agent /// case RPL_TRYAGAIN: // 263 case RPL_UNAWAY: // 305 @@ -337,7 +333,7 @@ tempString += RestOfString (data, 4); tempString.RemoveFirst (":"); tempString.Append ("\n"); - + BMessage msg (M_DISPLAY); PackDisplay (&msg, tempString.String(), C_WHOIS, C_BACKGROUND, F_SERVER); PostActive (&msg); @@ -353,7 +349,7 @@ tempString += "Away: "; tempString += theReason; tempString += '\n'; - + if (fRemoteAwayMessages.find(theNick) != fRemoteAwayMessages.end()) { if (fRemoteAwayMessages[theNick] == theReason) @@ -367,7 +363,7 @@ PostActive (&msg); } return true; - + case RPL_USERHOST: // 302 { BString theHost (GetWord (data, 4)), @@ -378,7 +374,7 @@ tempString.RemoveFirst (":"); tempString.Append ("\n"); Display (tempString.String()); - + if (fGetLocalIP && (tempString.IFindFirst (fMyNick.String()) == 0)) { fGetLocalIP = false; @@ -409,18 +405,18 @@ } #endif } - + if (theHost != "-9z99" && theHost != "") { BMessage *dnsmsg (new BMessage); dnsmsg->AddString ("lookup", theHostname.String()); ClientAgent *client (ActiveClient()); - + if (client) dnsmsg->AddPointer("agent", client); else dnsmsg->AddPointer("agent", this); - + thread_id lookupThread = spawn_thread ( DNSLookup, "dns_lookup", @@ -429,19 +425,20 @@ resume_thread (lookupThread); } - } + } return true; - + case RPL_ISON: // 303 { BString nicks (RestOfString (data, 4)); - + BString onlined, offlined; + nicks.RemoveFirst (":"); - + int hasChanged (0); - + BMessage msg (M_NOTIFYLIST_UPDATE); - + for (int32 i = 0; i < fNotifyNicks.CountItems(); i++) { NotifyListItem *item (((NotifyListItem *)fNotifyNicks.ItemAt(i))); @@ -456,25 +453,10 @@ { item->SetState (true); hasChanged = 1; -#ifdef USE_INFOPOPPER - if (be_roster->IsRunning(InfoPopperAppSig) == true) { - entry_ref ref = vision_app->AppRef(); - BMessage infoMsg(InfoPopper::AddMessage); - infoMsg.AddString("appTitle", S_INFOPOPPER_TITLE); - infoMsg.AddString("title", fId.String()); - infoMsg.AddInt8("type", (int8)InfoPopper::Information); - - infoMsg.AddInt32("iconType", InfoPopper::Attribute); - infoMsg.AddRef("iconRef", &ref); - - BString content; - content << item->Text() << " is online"; - infoMsg.AddString("content", content); - - BMessenger(InfoPopperAppSig).SendMessage(&infoMsg); - }; -#endif + if (onlined.Length()) + onlined << ", "; + onlined << item->Text(); } } else @@ -483,27 +465,48 @@ { item->SetState (false); hasChanged = 2; -#ifdef USE_INFOPOPPER - if (be_roster->IsRunning(InfoPopperAppSig) == true) { - entry_ref ref = vision_app->AppRef(); - BMessage infoMsg(InfoPopper::AddMessage); - infoMsg.AddString("appTitle", S_INFOPOPPER_TITLE); - infoMsg.AddString("title", fId.String()); - infoMsg.AddInt8("type", (int8)InfoPopper::Information); - - infoMsg.AddInt32("iconType", InfoPopper::Attribute); - infoMsg.AddRef("iconRef", &ref); - - BString content; - content << item->Text() << " is offline"; - infoMsg.AddString("content", content); - - BMessenger(InfoPopperAppSig).SendMessage(&infoMsg); - }; -#endif + if (offlined.Length()) + offlined << ", "; + offlined << item->Text(); } } + + if (offlined.Length()) + { + BNotification notification(B_INFORMATION_NOTIFICATION); + notification.SetGroup(BString("Vision")); + entry_ref ref = vision_app->AppRef(); + notification.SetOnClickFile(&ref); + notification.SetTitle(fServerName.String()); + BString content; + content << offlined; + if (offlined.FindFirst(' ') > -1) + content << " are offline"; + else + content << " is offline"; + + notification.SetContent(content); + notification.Send(); + } + if (onlined.Length()) + { + BNotification notification(B_INFORMATION_NOTIFICATION); + notification.SetGroup(BString("Vision")); + entry_ref ref = vision_app->AppRef(); + notification.SetOnClickFile(&ref); + notification.SetTitle(fServerName.String()); + BString content; + content << onlined; + if (onlined.FindFirst(' ') > -1) + content << " are online"; + else + content << " is online"; + + notification.SetContent(content); + notification.Send(); + } + } fNotifyNicks.SortItems(SortNotifyItems); msg.AddPointer ("list", &fNotifyNicks); @@ -512,25 +515,25 @@ Window()->PostMessage (&msg); } return true; - + case RPL_WHOISIDENTIFIED: // 307 { BString theInfo (RestOfString (data, 5)); theInfo.RemoveFirst (":"); - + if (theInfo == "-9z99") { // USERIP reply? (RPL_U2USERIP) BString tempString (RestOfString (data, 4)); tempString.RemoveFirst (":"); tempString.Append ("\n"); - Display (tempString.String()); + Display (tempString.String()); return true; } - + BMessage display (M_DISPLAY); BString buffer; - + buffer += "[x] "; buffer += theInfo; buffer += "\n"; @@ -538,7 +541,7 @@ PostActive (&display); } return true; - + case RPL_WHOISADMIN: // 308 case RPL_WHOISSERVICESADMIN: // 309 case RPL_WHOISHELPOP: // 310 @@ -556,7 +559,7 @@ BMessage display (M_DISPLAY); BString buffer; - + buffer += "[x] "; buffer += theInfo; buffer += "\n"; @@ -564,7 +567,7 @@ PostActive (&display); } return true; - + case RPL_WHOISUSER: // 311 { BString theNick (GetWord (data, 4)), @@ -572,7 +575,7 @@ theAddress (GetWord (data, 6)), theName (RestOfString (data, 8)); theName.RemoveFirst (":"); - + BMessage display (M_DISPLAY); BString buffer; @@ -586,19 +589,19 @@ buffer += "[x] "; buffer += theName; buffer += "\n"; - + PackDisplay (&display, buffer.String(), C_WHOIS, C_BACKGROUND, F_SERVER); PostActive (&display); } return true; - + case RPL_WHOISSERVER: // 312 { BString theNick (GetWord (data, 4)), theServer (GetWord (data, 5)), theInfo (RestOfString (data, 6)); theInfo.RemoveFirst (":"); - + BMessage display (M_DISPLAY); BString buffer; @@ -611,7 +614,7 @@ PostActive (&display); } return true; - + case RPL_WHOWASUSER: // 314 { BString theNick (GetWord (data, 4)), @@ -632,7 +635,7 @@ PostActive (&msg); } return true; - + case RPL_WHOISIDLE: // 317 { BString theNick (GetWord (data, 4)), @@ -640,26 +643,26 @@ tempString2 ("[x] "), theTime (GetWord (data, 5)), signOnTime (GetWord (data, 6)); - + int64 idleTime (strtoul(theTime.String(), NULL, 0)); tempString += S_PENUM_IDLE; tempString += DurationString(idleTime * 1000 * 1000); tempString += "\n"; - + int32 serverTime = strtoul(signOnTime.String(), NULL, 0); - struct tm ptr; + struct tm ptr; time_t st; - char str[80]; - st = serverTime; + char str[80]; + st = serverTime; localtime_r (&st, &ptr); strftime (str,80,"%A %b %d %Y %I:%M %p %Z", &ptr); BString signOnTimeParsed (str); signOnTimeParsed.RemoveAll ("\n"); - + tempString2 += S_PENUM_SIGNON; tempString2 += signOnTimeParsed; tempString2 += "\n"; - + BMessage msg (M_DISPLAY); PackDisplay (&msg, tempString.String(), C_WHOIS, C_BACKGROUND, F_SERVER); PostActive (&msg); @@ -667,7 +670,7 @@ PostActive (&msg); } return true; - + case RPL_ENDOFWHOIS: // 318 case RPL_ENDOFNAMES: // 366 case RPL_ENDOFWHOWAS: // 369 @@ -675,7 +678,7 @@ // nothing } return true; - + case RPL_WHOISCHANNELS: // 319 { BString theChannels (RestOfString (data, 5)); @@ -691,7 +694,7 @@ PostActive (&display); } return true; - + case RPL_LISTSTART: // 321 { BMessage msg (M_LIST_BEGIN); @@ -699,7 +702,7 @@ vision_app->pClientWin()->DispatchMessage(&msg, (BView *)fListAgent); } return true; - + case RPL_LIST: // 322 { BMessage msg (M_LIST_EVENT); @@ -707,7 +710,7 @@ users (GetWord (data, 5)), topic (RestOfString (data, 6)); topic.RemoveFirst (":"); - + msg.AddString ("channel", channel.String()); msg.AddString ("users", users.String()); msg.AddString ("topic", topic.String()); @@ -715,8 +718,8 @@ if (fListAgent) vision_app->pClientWin()->DispatchMessage(&msg, (BView *)fListAgent); } - return true; - + return true; + case RPL_LISTEND: // 323 { BMessage msg (M_LIST_DONE); @@ -725,7 +728,7 @@ vision_app->pClientWin()->DispatchMessage(&msg, (BView *)fListAgent); } return true; - + case RPL_CHANNELMODEIS: // 324 { BString theChan (GetWord (data, 4)), @@ -738,15 +741,15 @@ theMode.Append(tempStuff); // avoid extra space w/o params } - ClientAgent *aClient (ActiveClient()), - *theClient (Client (theChan.String())); - + ClientAgent *aClient (ActiveClient()), + *theClient (Client (theChan.String())); + BString tempString(S_PENUM_CHANMODE); tempString += theChan; tempString += ": "; tempString += theMode; tempString += '\n'; - + BMessage msg (M_CHANNEL_MODES); msg.AddString ("msgz", tempString.String()); @@ -761,7 +764,7 @@ Display (tempString.String(), C_OP); } return true; - + case RPL_CHANNELMLOCK: // 325 { BString theChan (GetWord (data, 4)), @@ -771,9 +774,9 @@ lockMessage += ": "; lockMessage += mLock; lockMessage += "\n"; - + BMessage display (M_DISPLAY); - + PackDisplay (&display, lockMessage.String(), C_OP, C_BACKGROUND, F_TEXT); ClientAgent *theClient (Client (theChan.String())); if (theClient) @@ -782,23 +785,23 @@ fMsgr.SendMessage (&display); } return true; - + case RPL_CHANNELCREATED: // 329 { BString theChan (GetWord (data, 4)), theTime (GetWord (data, 5)), tempString; - + int32 serverTime (strtoul(theTime.String(), NULL, 0)); - struct tm ptr; + struct tm ptr; time_t st; - char str[80]; - st = serverTime; + char str[80]; + st = serverTime; localtime_r (&st, &ptr); strftime (str,80,"%a %b %d %Y %I:%M %p %Z",&ptr); BString theTimeParsed (str); theTimeParsed.RemoveAll ("\n"); - + tempString += theChan; tempString += " " S_PENUM_CHANCREATED " "; tempString += theTimeParsed; @@ -806,7 +809,7 @@ Display (tempString.String()); } return true; - + case RPL_NOTOPIC: // 331 { BString theChan (GetWord (data, 4)), @@ -819,7 +822,7 @@ PostActive (&msg); } return true; - + case RPL_TOPIC: // 332 { BString theChannel (GetWord (data, 4)), @@ -847,23 +850,23 @@ } } return true; - + case RPL_TOPICSET: // 333 { BString channel (GetWord (data, 4)), user (GetWord (data, 5)), theTime (GetWord (data, 6)); - + int32 serverTime (strtoul(theTime.String(), NULL, 0)); - struct tm ptr; + struct tm ptr; time_t st; - char str[80]; - st = serverTime; + char str[80]; + st = serverTime; localtime_r (&st, &ptr); strftime (str,80,"%A %b %d %Y %I:%M %p %Z",&ptr); BString theTimeParsed (str); theTimeParsed.RemoveAll ("\n"); - + ClientAgent *client (Client (channel.String())); if (client) @@ -882,27 +885,27 @@ } } return true; - + case RPL_INVITING: // 341 { BString channel (GetWord (data, 5)), theNick (GetWord (data, 4)), tempString; - + tempString += "*** "; tempString += theNick; tempString += S_PENUM_INVITING; tempString += channel; tempString += ".\n"; - + BMessage display (M_DISPLAY); - + PackDisplay (&display, tempString.Str... [truncated message content] |
From: Lance K. <kw...@ho...> - 2013-06-01 00:13:34
|
Unfortunately I am unable to make sense of this email. ^^^^^^^^^^^^^^^^^^^^^ Stephen Kwok, Ph.D. [e] kw...@ho... ^^^^^^^^^^^^^^^^^^^^^^ > From: vis...@li... > Subject: Vision-list Digest, Vol 13, Issue 1 > To: vis...@li... > Date: Fri, 31 May 2013 01:34:21 +0000 > > Send Vision-list mailing list submissions to > vis...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/vision-list > or, via email, send a message with subject or body 'help' to > vis...@li... > > You can reach the person managing the list at > vis...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Vision-list digest..." > > > Today's Topics: > > 1. SF.net SVN: vision:[941] branches/0.9.7/ > (ane...@us...) > 2. SF.net SVN: vision:[942] branches/0.9.7 > (ane...@us...) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 31 May 2013 01:25:49 +0000 > From: ane...@us... > Subject: [Vision] SF.net SVN: vision:[941] branches/0.9.7/ > To: vis...@li... > Message-ID: > <mai...@li...> > Content-Type: text/plain; charset=UTF-8 > > Revision: 941 > http://sourceforge.net/p/vision/code/941 > Author: anevilyak > Date: 2013-05-31 01:25:49 +0000 (Fri, 31 May 2013) > Log Message: > ----------- > Create stable branch. > > Added Paths: > ----------- > branches/0.9.7/ > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > > > > ------------------------------ > > Message: 2 > Date: Fri, 31 May 2013 01:34:18 +0000 > From: ane...@us... > Subject: [Vision] SF.net SVN: vision:[942] branches/0.9.7 > To: vis...@li... > Message-ID: > <mai...@li...> > Content-Type: text/plain; charset=UTF-8 > > Revision: 942 > http://sourceforge.net/p/vision/code/942 > Author: anevilyak > Date: 2013-05-31 01:34:17 +0000 (Fri, 31 May 2013) > Log Message: > ----------- > 0.9.7-H-130530: Apply patch by Humdinger to sentence case the UI. > Thanks! > > Modified Paths: > -------------- > branches/0.9.7/Makefile > branches/0.9.7/src/AboutWindow.cpp > branches/0.9.7/src/ClientAgentInputFilter.cpp > branches/0.9.7/src/DCCHandler.cpp > branches/0.9.7/src/MessageAgent.cpp > branches/0.9.7/src/NamesView.cpp > branches/0.9.7/src/NotifyList.cpp > branches/0.9.7/src/PrefApp.cpp > branches/0.9.7/src/RunView.cpp > branches/0.9.7/src/VTextControl.cpp > branches/0.9.7/src/VisionStrings.h > branches/0.9.7/src/VisionStrings.h.en > > Modified: branches/0.9.7/Makefile > =================================================================== > --- branches/0.9.7/Makefile 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/Makefile 2013-05-31 01:34:17 UTC (rev 942) > @@ -16,7 +16,7 @@ > > # the file name, ... > BINARY := Vision > -VERSION := 0.9.7-H-090423 > +VERSION := 0.9.7-H-130530 > BUILDDATE := $(shell date +%b_%d_%Y) > BUILD_TYPE := Release > > > Modified: branches/0.9.7/src/AboutWindow.cpp > =================================================================== > --- branches/0.9.7/src/AboutWindow.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/AboutWindow.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -1,21 +1,21 @@ > -/* > - * The contents of this file are subject to the Mozilla Public > - * License Version 1.1 (the "License"); you may not use this file > - * except in compliance with the License. You may obtain a copy of > - * the License at http://www.mozilla.org/MPL/ > - * > - * Software distributed under the License is distributed on an "AS > - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or > - * implied. See the License for the specific language governing > - * rights and limitations under the License. > - * > - * The Original Code is Vision. > - * > +/* > + * The contents of this file are subject to the Mozilla Public > + * License Version 1.1 (the "License"); you may not use this file > + * except in compliance with the License. You may obtain a copy of > + * the License at http://www.mozilla.org/MPL/ > + * > + * Software distributed under the License is distributed on an "AS > + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or > + * implied. See the License for the specific language governing > + * rights and limitations under the License. > + * > + * The Original Code is Vision. > + * > * The Initial Developer of the Original Code is The Vision Team. > * Portions created by The Vision Team are > * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights > * Reserved. > - * > + * > * Contributor(s): Wade Majors <wa...@ez...> > * Brian Luft > * Todd Lair > @@ -45,7 +45,7 @@ > * Function purpose: Construct > */ > > - > + > BRect bounds (Bounds()); > BBitmap *bmp (NULL); > > @@ -74,7 +74,7 @@ > > bounds.Set ( > 0.0, > - fLogo->Frame().bottom + 12, > + fLogo->Frame().bottom + 12, > Bounds().right, > Bounds().bottom); > } > @@ -84,7 +84,7 @@ > "credits", > bounds.OffsetToCopy (B_ORIGIN).InsetByCopy (20, 0), > B_FOLLOW_LEFT | B_FOLLOW_TOP, > - B_WILL_DRAW); > + B_WILL_DRAW); > > fCredits->MakeSelectable (false); > fCredits->MakeEditable (false); > @@ -110,8 +110,8 @@ > "Brian Luft (Electroly)\n" > "Wade Majors (kurros)\n" > "Jamie Wilkinson (project)\n\n\n\n" > - > - "\n\n\n\nBrought To You In Part By Contributions From\n" > + > + "\n\n\n\nBrought to you in part by contributions from\n" > "{A-Z}\n" > "Seth Flaxman (Flax)\n" > "Joshua Jensen\n" > @@ -119,6 +119,7 @@ > "John Robinson ([geo])\n" > "Bjorn Oksholen (GuinnessM)\n" > "Jean-Baptiste M. Qu?ru (jbq)\n" > + "Humdinger\n" > "\n\n\n" > > "\n\n\n\nUnit C\n[Support Crew]\n" > @@ -130,7 +131,7 @@ > "Counselors: regurg and helix\n\n\n" > "No animals were injured during the production of this IRC client\n\n\n" > "Soundtrack available on Catastrophe Records\n\n\n\n" > - > + > "\n\n\n\nSpecial Thanks\n\n" > "Olathe\n" > "Terminus\n" > @@ -142,7 +143,7 @@ > "Kristine Gouveia\n" > "Be, Inc., Menlo Park, CA\n" > "Pizza Hut, Winter Haven, FL (now give me that free pizza Mike)\n\n\n" > - > + > "send all complaints and nipple pictures to kaye\n\n\n" > > "\n\n\n\n\n" > @@ -191,7 +192,7 @@ > */ > delete fScrollRunner; > vision_app->PostMessage (M_ABOUT_CLOSE); > - > + > return true; > } > > @@ -202,7 +203,7 @@ > * Function purpose: Read image resource bits::{eggName} and display > */ > > -/* TODO : get this working > +/* TODO : get this working > BBitmap *bmp; > > if ((bmp = BTranslationUtils::GetBitmap ('bits', eggName)) != 0) > @@ -225,7 +226,7 @@ > { > case M_ABOUT_SCROLL: > { > -#if B_BEOS_VERSION_DANO > +#if B_BEOS_VERSION_DANO > fCredits->SetDoubleBuffering(0xf); > #endif > > @@ -236,7 +237,7 @@ > fCredits->ScrollTo (0, 0); > } > break; > - > + > default: > BWindow::MessageReceived (msg); > break; > > Modified: branches/0.9.7/src/ClientAgentInputFilter.cpp > =================================================================== > --- branches/0.9.7/src/ClientAgentInputFilter.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/ClientAgentInputFilter.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -570,7 +570,7 @@ > str.String(), > "Cancel", > "Spam!", > - "Single Line", > + "Single line", > B_WIDTH_FROM_WIDEST, > B_OFFSET_SPACING, > B_WARNING_ALERT)); > > Modified: branches/0.9.7/src/DCCHandler.cpp > =================================================================== > --- branches/0.9.7/src/DCCHandler.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/DCCHandler.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -59,7 +59,7 @@ > { > BString theText(theNick); > theText << S_SERVER_DCC_CHAT_PROMPT; > - BAlert *myAlert = new BAlert("DCC Request", theText.String(), "Accept", > + BAlert *myAlert = new BAlert("DCC request", theText.String(), "Accept", > "Refuse"); > myAlert->SetFeel (B_FLOATING_APP_WINDOW_FEEL); > BMessage *myMessage = new BMessage(M_CHAT_ACCEPT); > > Modified: branches/0.9.7/src/MessageAgent.cpp > =================================================================== > --- branches/0.9.7/src/MessageAgent.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/MessageAgent.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -122,7 +122,7 @@ > BString command ("/dcc send "); > command += fId; > msg->AddString ("input", command.String()); > - item = new BMenuItem("DCC Send", msg); > + item = new BMenuItem("DCC send", msg); > item->SetTarget (this); > if (Id().FindFirst (" [DCC]") >= 0) // dont enable for dcc sessions > item->SetEnabled (false); > > Modified: branches/0.9.7/src/NamesView.cpp > =================================================================== > --- branches/0.9.7/src/NamesView.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/NamesView.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -83,15 +83,15 @@ > fMyPopUp->AddItem(new BMenuItem("Query", myMessage)); > > myMessage = new BMessage (M_NAMES_POPUP_NOTIFY); > - fMyPopUp->AddItem(new BMenuItem("Add To Notify", myMessage)); > + fMyPopUp->AddItem(new BMenuItem("Add to notify", myMessage)); > > fMyPopUp->AddSeparatorItem(); > > myMessage = new BMessage(M_NAMES_POPUP_DCCSEND); > - fMyPopUp->AddItem(new BMenuItem("DCC Send", myMessage)); > + fMyPopUp->AddItem(new BMenuItem("DCC send", myMessage)); > > myMessage = new BMessage(M_NAMES_POPUP_DCCCHAT); > - fMyPopUp->AddItem(new BMenuItem("DCC Chat", myMessage)); > + fMyPopUp->AddItem(new BMenuItem("DCC chat", myMessage)); > > fCTCPPopUp = new BMenu("CTCP"); > fMyPopUp->AddItem( fCTCPPopUp ); > > Modified: branches/0.9.7/src/NotifyList.cpp > =================================================================== > --- branches/0.9.7/src/NotifyList.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/NotifyList.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -164,7 +164,7 @@ > NotifyList::BuildPopUp(void) > { > delete fMyPopUp; > - fMyPopUp = new BPopUpMenu("Notify Selection", false, false); > + fMyPopUp = new BPopUpMenu("Notify selection", false, false); > > int index (CurrentSelection()); > if (index < 0) > > Modified: branches/0.9.7/src/PrefApp.cpp > =================================================================== > --- branches/0.9.7/src/PrefApp.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/PrefApp.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -79,7 +79,7 @@ > AddChild (fStripColors); > > checkboxRect.OffsetBy(0.0, fStripColors->Bounds().Height() * 1.2); > - msg.ReplaceString ("setting", "Newbie Spam Mode"); > + msg.ReplaceString ("setting", "Newbie spam mode"); > fSpamMode = new BCheckBox (checkboxRect, "newbiespammode", > S_PREFAPP_WARN_MULTILINE, > new BMessage (msg)); > > Modified: branches/0.9.7/src/RunView.cpp > =================================================================== > --- branches/0.9.7/src/RunView.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/RunView.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -593,7 +593,7 @@ > BMessage *lookup; > lookup = new BMessage (M_LOOKUP_WEBSTER); > lookup->AddString ("string", querystring); > - item = new BMenuItem("Lookup (Dictionary)", lookup); > + item = new BMenuItem("Lookup (dictionary)", lookup); > item->SetEnabled (enablelookup); > item->SetTarget (Parent()); > fMyPopUp->AddItem (item); > @@ -607,7 +607,7 @@ > > lookup = new BMessage (M_LOOKUP_ACRONYM); > lookup->AddString ("string", querystring); > - item = new BMenuItem("Lookup (Acronym Finder)", lookup); > + item = new BMenuItem("Lookup (acronym finder)", lookup); > item->SetEnabled (enablelookup); > item->SetTarget (Parent()); > fMyPopUp->AddItem (item); > @@ -619,7 +619,7 @@ > item->SetTarget (this); > fMyPopUp->AddItem (item); > > - item = new BMenuItem("Select All", new BMessage (B_SELECT_ALL), 'A'); > + item = new BMenuItem("Select all", new BMessage (B_SELECT_ALL), 'A'); > item->SetEnabled (enableselectall); > item->SetTarget (this); > fMyPopUp->AddItem (item); > > Modified: branches/0.9.7/src/VTextControl.cpp > =================================================================== > --- branches/0.9.7/src/VTextControl.cpp 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/VTextControl.cpp 2013-05-31 01:34:17 UTC (rev 942) > @@ -117,7 +117,7 @@ > > myPopUp->AddSeparatorItem(); > > - item = new BMenuItem("Select All", new BMessage (B_SELECT_ALL), 'A'); > + item = new BMenuItem("Select all", new BMessage (B_SELECT_ALL), 'A'); > item->SetEnabled (enableselectall); > myPopUp->AddItem (item); > > > Modified: branches/0.9.7/src/VisionStrings.h > =================================================================== > --- branches/0.9.7/src/VisionStrings.h 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/VisionStrings.h 2013-05-31 01:34:17 UTC (rev 942) > @@ -56,8 +56,8 @@ > > #define S_CW_APP_ABOUT "About" > #define S_CW_APP_PREFS "Preferences" > -#define S_CW_APP_CHANLIST "List Channels" > -#define S_CW_APP_TERMINAL "New Terminal" > +#define S_CW_APP_CHANLIST "List channels" > +#define S_CW_APP_TERMINAL "New terminal" > #define S_CW_APP_QUIT "Quit" > #define S_CW_SERVER_MENU "Server" > #define S_CW_SERVER_CONNECT "Connect to" > @@ -66,24 +66,24 @@ > #define S_CW_EDIT_CUT "Cut" > #define S_CW_EDIT_COPY "Copy" > #define S_CW_EDIT_PASTE "Paste" > -#define S_CW_EDIT_SELECT_ALL "Select All" > +#define S_CW_EDIT_SELECT_ALL "Select all" > #define S_CW_WINDOW_MENU "Window" > -#define S_CW_WINDOW_PART "Close Subwindow" > +#define S_CW_WINDOW_PART "Close subwindow" > #define S_CW_WINDOW_UP "Up" > #define S_CW_WINDOW_DOWN "Down" > -#define S_CW_WINDOW_SM_UP "Smart Up" > -#define S_CW_WINDOW_SM_DOWN "Smart Down" > -#define S_CW_WINDOW_NETWORK "Network Window" > -#define S_CW_WINDOW_PREVIOUS "Previous Window" > -#define S_CW_WINDOW_NET_UP "Move Network Up" > -#define S_CW_WINDOW_NET_DOWN "Move Network Down" > -#define S_CW_WINDOW_COLLAPSE "Collapse Network" > -#define S_CW_WINDOW_EXPAND "Expand Network" > +#define S_CW_WINDOW_SM_UP "Smart up" > +#define S_CW_WINDOW_SM_DOWN "Smart down" > +#define S_CW_WINDOW_NETWORK "Network window" > +#define S_CW_WINDOW_PREVIOUS "Previous window" > +#define S_CW_WINDOW_NET_UP "Move network up" > +#define S_CW_WINDOW_NET_DOWN "Move network down" > +#define S_CW_WINDOW_COLLAPSE "Collapse network" > +#define S_CW_WINDOW_EXPAND "Expand network" > > // client window dock > > -#define S_CWD_WINLIST_HEADER "Window List" > -#define S_CWD_NOTIFY_HEADER "Notify List" > +#define S_CWD_WINLIST_HEADER "Window list" > +#define S_CWD_NOTIFY_HEADER "Notify list" > > // DCC messages > > @@ -107,13 +107,13 @@ > #define S_DCC_CHAT_TRY "Trying to connect to address " > #define S_DCC_CHAT_PORT ", port " > #define S_DCC_CHAT_CONNECTED "Connected!\n" > -#define S_DCC_CHAT_TERM "DCC Chat Terminated.\n" > +#define S_DCC_CHAT_TERM "DCC chat terminated.\n" > > // list agent > > #define S_LIST_MENU "Channels" > #define S_LIST_MENU_FIND "Find" > -#define S_LIST_MENU_FINDNEXT "Find Next" > +#define S_LIST_MENU_FINDNEXT "Find next" > #define S_LIST_MENU_FILTER "Filter" > #define S_LIST_COLUMN_CHAN "Channel" > #define S_LIST_COLUMN_USER "Users" > @@ -142,19 +142,19 @@ > > #define S_NETPREFS_NETMENU "Networks" > #define S_NETPREFS_DEFAULTS_ITEM "Defaults" > -#define S_NETPREFS_ADD_NEW "Add New" > +#define S_NETPREFS_ADD_NEW "Add new" > #define S_NETPREFS_REMOVE "Remove current" > #define S_NETPREFS_DUPE "Duplicate current" > -#define S_NETPREFS_NET_BOX "Network Details" > -#define S_NETPREFS_PERSONAL_BOX "Personal Details" > +#define S_NETPREFS_NET_BOX "Network details" > +#define S_NETPREFS_PERSONAL_BOX "Personal details" > #define S_NETPREFS_CONN1 "Will connect to" > #define S_NETPREFS_CONN2 "falling back to 9 others." > #define S_NETPREFS_CHANGE_SERVER "Change servers" > #define S_NETPREFS_AUTOEXEC "Autoexec:" > #define S_NETPREFS_LAG_CHECK "Enable lag checking" > #define S_NETPREFS_STARTUP_CONN "Connect to this network when Vision starts up" > -#define S_NETPREFS_USE_DEFAULTS "Use Defaults" > -#define S_NETPREFS_PREFNICK "Preferred Nicks:" > +#define S_NETPREFS_USE_DEFAULTS "Use defaults" > +#define S_NETPREFS_PREFNICK "Preferred nicks:" > #define S_NETPREFS_ADD_BUTTON "Add" > #define S_NETPREFS_REMOVE_BUTTON "Remove" > #define S_NETPREFS_IDENT "Ident: " > @@ -162,15 +162,15 @@ > #define S_NETPREFS_FALLBACK1 "falling back to " > #define S_NETPREFS_FALLBACK2 " other" > #define S_NETPREFS_FALLBACK2_PLURAL "s" > -#define S_NETPREFS_ADDNET_TITLE "Add Network" > -#define S_NETPREFS_DUPENET_TITLE "Duplicate Network" > -#define S_NETPREFS_NET_PROMPT "Network Name: " > -#define S_NETPREFS_ADDNICK_TITLE "Add Nickname" > +#define S_NETPREFS_ADDNET_TITLE "Add network" > +#define S_NETPREFS_DUPENET_TITLE "Duplicate network" > +#define S_NETPREFS_NET_PROMPT "Network name: " > +#define S_NETPREFS_ADDNICK_TITLE "Add nickname" > #define S_NETPREFS_ADDNICK_PROMPT "Nickname: " > > // network windows > > -#define S_NETWORK_WINDOW_TITLE "Network Setup" > +#define S_NETWORK_WINDOW_TITLE "Network setup" > #define S_SERVERPREFS_TITLE "Servers" > > // notify list > @@ -178,7 +178,7 @@ > #define S_NOTIFYLIST_QUERY_ITEM "Query" > #define S_NOTIFYLIST_WHOIS_ITEM "Whois" > #define S_NOTIFYLIST_REMOVE_ITEM "Remove" > -#define S_NOTIFYLIST_DCC_ITEM "DCC Chat" > +#define S_NOTIFYLIST_DCC_ITEM "DCC chat" > // command parser > > #define S_PCMD_PARAMETER_ERROR "Error: Invalid parameters" > @@ -249,8 +249,8 @@ > // app prefs > > #define S_PREFAPP_VERSION_PARANOID "Show OS information in version reply" > -#define S_PREFAPP_CMDW "Require double Cmd+Q/W to close" > -#define S_PREFAPP_STRIP_MIRC "Strip mIRC Colors" > +#define S_PREFAPP_CMDW "Require double CMD+Q/W to close" > +#define S_PREFAPP_STRIP_MIRC "Strip mIRC colors" > #define S_PREFAPP_WARN_MULTILINE "Warn when multiline pasting" > #define S_PREFAPP_QUERY_MSG "Open new query on message" > > @@ -259,7 +259,7 @@ > #define S_PREFCOLOR_TEXT "Text" > #define S_PREFCOLOR_BACKGROUND "Background" > #define S_PREFCOLOR_URL "URL" > -#define S_PREFCOLOR_SERVERTEXT "Server Text" > +#define S_PREFCOLOR_SERVERTEXT "Server text" > #define S_PREFCOLOR_NOTICE "Notice" > #define S_PREFCOLOR_ACTION "Action" > #define S_PREFCOLOR_QUIT "Quit" > @@ -270,14 +270,14 @@ > #define S_PREFCOLOR_JOIN "Join" > #define S_PREFCOLOR_KICK "Kick" > #define S_PREFCOLOR_WHOIS "Whois" > -#define S_PREFCOLOR_NAMES_NORM "Names (Normal)" > -#define S_PREFCOLOR_NAMES_OP "Names (Op)" > -#define S_PREFCOLOR_NAMES_HELP "Names (Helper)" > -#define S_PREFCOLOR_NAMES_VOICE "Names (Voice)" > +#define S_PREFCOLOR_NAMES_NORM "Names (normal)" > +#define S_PREFCOLOR_NAMES_OP "Names (OP)" > +#define S_PREFCOLOR_NAMES_HELP "Names (helper)" > +#define S_PREFCOLOR_NAMES_VOICE "Names (voice)" > #define S_PREFCOLOR_NAMES_SEL "Names selection" > -#define S_PREFCOLOR_NAMES_BG "Names Background" > -#define S_PREFCOLOR_CTCP_REQ "CTCP Request" > -#define S_PREFCOLOR_CTCP_RPY "CTCP Reply" > +#define S_PREFCOLOR_NAMES_BG "Names background" > +#define S_PREFCOLOR_CTCP_REQ "CTCP request" > +#define S_PREFCOLOR_CTCP_RPY "CTCP reply" > #define S_PREFCOLOR_IGNORE "Ignore" > #define S_PREFCOLOR_INPUT_TXT "Input text" > #define S_PREFCOLOR_INPUT_BG "Input background" > @@ -291,26 +291,26 @@ > #define S_PREFCOLOR_TIMESTAMP "Timestamp" > #define S_PREFCOLOR_TIMESTAMP_BG "Timestamp background" > #define S_PREFCOLOR_SELECTION "Selection" > -#define S_PREFCOLOR_MIRCWHITE "mIRC White" > -#define S_PREFCOLOR_MIRCBLACK "mIRC Black" > -#define S_PREFCOLOR_MIRCDBLUE "mIRC Dark Blue" > -#define S_PREFCOLOR_MIRCGREEN "mIRC Green" > -#define S_PREFCOLOR_MIRCRED "mIRC Red" > -#define S_PREFCOLOR_MIRCBROWN "mIRC Brown" > -#define S_PREFCOLOR_MIRCPURPLE "mIRC Purple" > -#define S_PREFCOLOR_MIRCORANGE "mIRC Orange" > -#define S_PREFCOLOR_MIRCYELLOW "mIRC Yellow" > -#define S_PREFCOLOR_MIRCLIME "mIRC Lime" > -#define S_PREFCOLOR_MIRCTEAL "mIRC Teal" > -#define S_PREFCOLOR_MIRCAQUA "mIRC Aqua" > -#define S_PREFCOLOR_MIRCLBLUE "mIRC Light Blue" > -#define S_PREFCOLOR_MIRCPINK "mIRC Pink" > -#define S_PREFCOLOR_MIRCGREY "mIRC Grey" > -#define S_PREFCOLOR_MIRCSILVER "mIRC Silver" > -#define S_PREFCOLOR_NOTIFY_ON "Notify Online" > -#define S_PREFCOLOR_NOTIFY_OFF "Notify Offline" > -#define S_PREFCOLOR_NOTIFY_BG "Notify List background" > -#define S_PREFCOLOR_NOTIFY_SEL "Notify List selection" > +#define S_PREFCOLOR_MIRCWHITE "mIRC white" > +#define S_PREFCOLOR_MIRCBLACK "mIRC black" > +#define S_PREFCOLOR_MIRCDBLUE "mIRC dark blue" > +#define S_PREFCOLOR_MIRCGREEN "mIRC green" > +#define S_PREFCOLOR_MIRCRED "mIRC red" > +#define S_PREFCOLOR_MIRCBROWN "mIRC brown" > +#define S_PREFCOLOR_MIRCPURPLE "mIRC purple" > +#define S_PREFCOLOR_MIRCORANGE "mIRC orange" > +#define S_PREFCOLOR_MIRCYELLOW "mIRC yellow" > +#define S_PREFCOLOR_MIRCLIME "mIRC lime" > +#define S_PREFCOLOR_MIRCTEAL "mIRC teal" > +#define S_PREFCOLOR_MIRCAQUA "mIRC aqua" > +#define S_PREFCOLOR_MIRCLBLUE "mIRC light blue" > +#define S_PREFCOLOR_MIRCPINK "mIRC pink" > +#define S_PREFCOLOR_MIRCGREY "mIRC grey" > +#define S_PREFCOLOR_MIRCSILVER "mIRC silver" > +#define S_PREFCOLOR_NOTIFY_ON "Notify online" > +#define S_PREFCOLOR_NOTIFY_OFF "Notify offline" > +#define S_PREFCOLOR_NOTIFY_BG "Notify list background" > +#define S_PREFCOLOR_NOTIFY_SEL "Notify list selection" > #define S_PREFCOLOR_REVERT "Revert" > > // command prefs > @@ -325,11 +325,11 @@ > > // dcc prefs > > -#define S_PREFDCC_BLOCK_SIZE "DCC Block Size: " > +#define S_PREFDCC_BLOCK_SIZE "DCC block size: " > #define S_PREFDCC_AUTOACK "Automatically accept incoming sends" > #define S_PREFDCC_PRIVATE "Automatically check for NAT IP" > #define S_PREFDCC_DEFPATH "Default path: " > -#define S_PREFDCC_PORTRANGE "DCC Port Range" > +#define S_PREFDCC_PORTRANGE "DCC port range" > #define S_PREFDCC_PORTMIN "Min: " > #define S_PREFDCC_PORTMAX "Max: " > > @@ -341,20 +341,20 @@ > #define S_PREFEVENT_QUIT "Quit:" > #define S_PREFEVENT_KICK "Kick:" > #define S_PREFEVENT_TOPIC "Topic:" > -#define S_PREFEVENT_SNOTICE "Server Notice:" > -#define S_PREFEVENT_UNOTICE "User Notice:" > -#define S_PREFEVENT_NOTIFYON "Notify On:" > -#define S_PREFEVENT_NOTIFYOFF "Notify Off:" > +#define S_PREFEVENT_SNOTICE "Server notice:" > +#define S_PREFEVENT_UNOTICE "User notice:" > +#define S_PREFEVENT_NOTIFYON "Notify on:" > +#define S_PREFEVENT_NOTIFYOFF "Notify off:" > > // font prefs > > #define S_PREFFONT_TEXT "Text" > -#define S_PREFFONT_SMESSAGES "Server Messages" > +#define S_PREFFONT_SMESSAGES "Server messages" > #define S_PREFFONT_URLS "URLs" > #define S_PREFFONT_NAMESLIST "Names list" > #define S_PREFFONT_INPUT_TEXT "Input text" > -#define S_PREFFONT_WINLIST "Window List" > -#define S_PREFFONT_CHANLIST "Channel List" > +#define S_PREFFONT_WINLIST "Window list" > +#define S_PREFFONT_CHANLIST "Channel list" > #define S_PREFFONT_TSTAMP "Timestamp" > #define S_PREFFONT_FONTLABEL "Font: " > #define S_PREFFONT_SIZELABEL "Size: " > @@ -392,13 +392,13 @@ > #define S_SERVER_ATTEMPT3 "connect (attempt " > #define S_SERVER_ATTEMPT4 " of " > #define S_SERVER_ATTEMPT5 "[@] Attempting a connection to " > -#define S_SERVER_CONN_ERROR1 "[@] Could not create connection to address and port. Make sure your Internet connection is operational." > +#define S_SERVER_CONN_ERROR1 "[@] Could not create connection to address and port. Make sure your internet connection is operational." > #define S_SERVER_CONN_ERROR2 "[@] Could not establish a connection to the server. Sorry." > #define S_SERVER_CONN_OPEN "[@] Connection open, waiting for reply from server" > -#define S_SERVER_LOCALIP_ERROR "[@] Error getting Local IP" > +#define S_SERVER_LOCALIP_ERROR "[@] Error getting local IP" > #define S_SERVER_LOCALIP "[@] Local IP: " > -#define S_SERVER_PROXY_MSG "[@] (It looks like you are behind an Internet gateway. Vision will query the IRC server upon successful connection for your gateway's Internet address. This will be used for DCC communication.)" > -#define S_SERVER_PASS_MSG "[@] Sending Password" > +#define S_SERVER_PROXY_MSG "[@] (It looks like you are behind an internet gateway. Vision will query the IRC server upon successful connection for your gateway's internet address. This will be used for DCC communication.)" > +#define S_SERVER_PASS_MSG "[@] Sending password" > #define S_SERVER_HANDSHAKE "[@] Handshaking" > #define S_SERVER_ESTABLISH "[@] Established" > #define S_SERVER_RETRY_LIMIT "[@] Retry limit reached; giving up. Type /reconnect if you want to give it another go." > @@ -414,7 +414,7 @@ > > // server entry window > > -#define S_SERVERWIN_TITLE "Add Server" > +#define S_SERVERWIN_TITLE "Add server" > #define S_SERVERWIN_SERVER "Server: " > #define S_SERVERWIN_PORT "Port: " > #define S_SERVERWIN_MENU1 "Choose status" > @@ -424,15 +424,15 @@ > #define S_SERVERWIN_STATE "State: " > #define S_SERVERWIN_DONE_BUTTON "Done" > #define S_SERVERWIN_CANCEL_BUTTON "Cancel" > -#define S_SERVERWIN_PASS_CHECK "Use Password: " > +#define S_SERVERWIN_PASS_CHECK "Use password: " > > // setup window > > -#define S_SETUP_TITLE "Setup Window" > +#define S_SETUP_TITLE "Setup window" > #define S_SETUP_CONNECT_BUTTON "Connect" > -#define S_SETUP_NETPREFS "Network Setup" > +#define S_SETUP_NETPREFS "Network setup" > #define S_SETUP_GENPREFS "Preferences" > -#define S_SETUP_CHOOSENET "Choose Network" > +#define S_SETUP_CHOOSENET "Choose network" > #define S_SETUP_CHOOSELABEL "Network: " > > // status bar > > Modified: branches/0.9.7/src/VisionStrings.h.en > =================================================================== > --- branches/0.9.7/src/VisionStrings.h.en 2013-05-31 01:25:49 UTC (rev 941) > +++ branches/0.9.7/src/VisionStrings.h.en 2013-05-31 01:34:17 UTC (rev 942) > @@ -56,8 +56,8 @@ > > #define S_CW_APP_ABOUT "About" > #define S_CW_APP_PREFS "Preferences" > -#define S_CW_APP_CHANLIST "List Channels" > -#define S_CW_APP_TERMINAL "New Terminal" > +#define S_CW_APP_CHANLIST "List channels" > +#define S_CW_APP_TERMINAL "New terminal" > #define S_CW_APP_QUIT "Quit" > #define S_CW_SERVER_MENU "Server" > #define S_CW_SERVER_CONNECT "Connect to" > @@ -66,24 +66,24 @@ > #define S_CW_EDIT_CUT "Cut" > #define S_CW_EDIT_COPY "Copy" > #define S_CW_EDIT_PASTE "Paste" > -#define S_CW_EDIT_SELECT_ALL "Select All" > +#define S_CW_EDIT_SELECT_ALL "Select all" > #define S_CW_WINDOW_MENU "Window" > -#define S_CW_WINDOW_PART "Close Subwindow" > +#define S_CW_WINDOW_PART "Close subwindow" > #define S_CW_WINDOW_UP "Up" > #define S_CW_WINDOW_DOWN "Down" > -#define S_CW_WINDOW_SM_UP "Smart Up" > -#define S_CW_WINDOW_SM_DOWN "Smart Down" > -#define S_CW_WINDOW_NETWORK "Network Window" > -#define S_CW_WINDOW_PREVIOUS "Previous Window" > -#define S_CW_WINDOW_NET_UP "Move Network Up" > -#define S_CW_WINDOW_NET_DOWN "Move Network Down" > -#define S_CW_WINDOW_COLLAPSE "Collapse Network" > -#define S_CW_WINDOW_EXPAND "Expand Network" > +#define S_CW_WINDOW_SM_UP "Smart up" > +#define S_CW_WINDOW_SM_DOWN "Smart down" > +#define S_CW_WINDOW_NETWORK "Network window" > +#define S_CW_WINDOW_PREVIOUS "Previous window" > +#define S_CW_WINDOW_NET_UP "Move network up" > +#define S_CW_WINDOW_NET_DOWN "Move network down" > +#define S_CW_WINDOW_COLLAPSE "Collapse network" > +#define S_CW_WINDOW_EXPAND "Expand network" > > // client window dock > > -#define S_CWD_WINLIST_HEADER "Window List" > -#define S_CWD_NOTIFY_HEADER "Notify List" > +#define S_CWD_WINLIST_HEADER "Window list" > +#define S_CWD_NOTIFY_HEADER "Notify list" > > // DCC messages > > @@ -107,13 +107,13 @@ > #define S_DCC_CHAT_TRY "Trying to connect to address " > #define S_DCC_CHAT_PORT ", port " > #define S_DCC_CHAT_CONNECTED "Connected!\n" > -#define S_DCC_CHAT_TERM "DCC Chat Terminated.\n" > +#define S_DCC_CHAT_TERM "DCC chat terminated.\n" > > // list agent > > #define S_LIST_MENU "Channels" > #define S_LIST_MENU_FIND "Find" > -#define S_LIST_MENU_FINDNEXT "Find Next" > +#define S_LIST_MENU_FINDNEXT "Find next" > #define S_LIST_MENU_FILTER "Filter" > #define S_LIST_COLUMN_CHAN "Channel" > #define S_LIST_COLUMN_USER "Users" > @@ -142,19 +142,19 @@ > > #define S_NETPREFS_NETMENU "Networks" > #define S_NETPREFS_DEFAULTS_ITEM "Defaults" > -#define S_NETPREFS_ADD_NEW "Add New" > +#define S_NETPREFS_ADD_NEW "Add new" > #define S_NETPREFS_REMOVE "Remove current" > #define S_NETPREFS_DUPE "Duplicate current" > -#define S_NETPREFS_NET_BOX "Network Details" > -#define S_NETPREFS_PERSONAL_BOX "Personal Details" > +#define S_NETPREFS_NET_BOX "Network details" > +#define S_NETPREFS_PERSONAL_BOX "Personal details" > #define S_NETPREFS_CONN1 "Will connect to" > #define S_NETPREFS_CONN2 "falling back to 9 others." > #define S_NETPREFS_CHANGE_SERVER "Change servers" > #define S_NETPREFS_AUTOEXEC "Autoexec:" > #define S_NETPREFS_LAG_CHECK "Enable lag checking" > #define S_NETPREFS_STARTUP_CONN "Connect to this network when Vision starts up" > -#define S_NETPREFS_USE_DEFAULTS "Use Defaults" > -#define S_NETPREFS_PREFNICK "Preferred Nicks:" > +#define S_NETPREFS_USE_DEFAULTS "Use defaults" > +#define S_NETPREFS_PREFNICK "Preferred nicks:" > #define S_NETPREFS_ADD_BUTTON "Add" > #define S_NETPREFS_REMOVE_BUTTON "Remove" > #define S_NETPREFS_IDENT "Ident: " > @@ -162,15 +162,15 @@ > #define S_NETPREFS_FALLBACK1 "falling back to " > #define S_NETPREFS_FALLBACK2 " other" > #define S_NETPREFS_FALLBACK2_PLURAL "s" > -#define S_NETPREFS_ADDNET_TITLE "Add Network" > -#define S_NETPREFS_DUPENET_TITLE "Duplicate Network" > -#define S_NETPREFS_NET_PROMPT "Network Name: " > -#define S_NETPREFS_ADDNICK_TITLE "Add Nickname" > +#define S_NETPREFS_ADDNET_TITLE "Add network" > +#define S_NETPREFS_DUPENET_TITLE "Duplicate network" > +#define S_NETPREFS_NET_PROMPT "Network name: " > +#define S_NETPREFS_ADDNICK_TITLE "Add nickname" > #define S_NETPREFS_ADDNICK_PROMPT "Nickname: " > > // network windows > > -#define S_NETWORK_WINDOW_TITLE "Network Setup" > +#define S_NETWORK_WINDOW_TITLE "Network setup" > #define S_SERVERPREFS_TITLE "Servers" > > // notify list > @@ -178,7 +178,7 @@ > #define S_NOTIFYLIST_QUERY_ITEM "Query" > #define S_NOTIFYLIST_WHOIS_ITEM "Whois" > #define S_NOTIFYLIST_REMOVE_ITEM "Remove" > -#define S_NOTIFYLIST_DCC_ITEM "DCC Chat" > +#define S_NOTIFYLIST_DCC_ITEM "DCC chat" > // command parser > > #define S_PCMD_PARAMETER_ERROR "Error: Invalid parameters" > @@ -242,8 +242,8 @@ > // app prefs > > #define S_PREFAPP_VERSION_PARANOID "Show OS information in version reply" > -#define S_PREFAPP_CMDW "Require double Cmd+Q/W to close" > -#define S_PREFAPP_STRIP_MIRC "Strip mIRC Colors" > +#define S_PREFAPP_CMDW "Require double CMD+Q/W to close" > +#define S_PREFAPP_STRIP_MIRC "Strip mIRC colors" > #define S_PREFAPP_WARN_MULTILINE "Warn when multiline pasting" > #define S_PREFAPP_QUERY_MSG "Open new query on message" > > @@ -252,7 +252,7 @@ > #define S_PREFCOLOR_TEXT "Text" > #define S_PREFCOLOR_BACKGROUND "Background" > #define S_PREFCOLOR_URL "URL" > -#define S_PREFCOLOR_SERVERTEXT "Server Text" > +#define S_PREFCOLOR_SERVERTEXT "Server text" > #define S_PREFCOLOR_NOTICE "Notice" > #define S_PREFCOLOR_ACTION "Action" > #define S_PREFCOLOR_QUIT "Quit" > @@ -263,14 +263,14 @@ > #define S_PREFCOLOR_JOIN "Join" > #define S_PREFCOLOR_KICK "Kick" > #define S_PREFCOLOR_WHOIS "Whois" > -#define S_PREFCOLOR_NAMES_NORM "Names (Normal)" > -#define S_PREFCOLOR_NAMES_OP "Names (Op)" > -#define S_PREFCOLOR_NAMES_HELP "Names (Helper)" > -#define S_PREFCOLOR_NAMES_VOICE "Names (Voice)" > +#define S_PREFCOLOR_NAMES_NORM "Names (normal)" > +#define S_PREFCOLOR_NAMES_OP "Names (OP)" > +#define S_PREFCOLOR_NAMES_HELP "Names (helper)" > +#define S_PREFCOLOR_NAMES_VOICE "Names (voice)" > #define S_PREFCOLOR_NAMES_SEL "Names selection" > -#define S_PREFCOLOR_NAMES_BG "Names Background" > -#define S_PREFCOLOR_CTCP_REQ "CTCP Request" > -#define S_PREFCOLOR_CTCP_RPY "CTCP Reply" > +#define S_PREFCOLOR_NAMES_BG "Names background" > +#define S_PREFCOLOR_CTCP_REQ "CTCP request" > +#define S_PREFCOLOR_CTCP_RPY "CTCP reply" > #define S_PREFCOLOR_IGNORE "Ignore" > #define S_PREFCOLOR_INPUT_TXT "Input text" > #define S_PREFCOLOR_INPUT_BG "Input background" > @@ -284,26 +284,26 @@ > #define S_PREFCOLOR_TIMESTAMP "Timestamp" > #define S_PREFCOLOR_TIMESTAMP_BG "Timestamp background" > #define S_PREFCOLOR_SELECTION "Selection" > -#define S_PREFCOLOR_MIRCWHITE "mIRC White" > -#define S_PREFCOLOR_MIRCBLACK "mIRC Black" > -#define S_PREFCOLOR_MIRCDBLUE "mIRC Dark Blue" > -#define S_PREFCOLOR_MIRCGREEN "mIRC Green" > -#define S_PREFCOLOR_MIRCRED "mIRC Red" > -#define S_PREFCOLOR_MIRCBROWN "mIRC Brown" > -#define S_PREFCOLOR_MIRCPURPLE "mIRC Purple" > -#define S_PREFCOLOR_MIRCORANGE "mIRC Orange" > -#define S_PREFCOLOR_MIRCYELLOW "mIRC Yellow" > -#define S_PREFCOLOR_MIRCLIME "mIRC Lime" > -#define S_PREFCOLOR_MIRCTEAL "mIRC Teal" > -#define S_PREFCOLOR_MIRCAQUA "mIRC Aqua" > -#define S_PREFCOLOR_MIRCLBLUE "mIRC Light Blue" > -#define S_PREFCOLOR_MIRCPINK "mIRC Pink" > -#define S_PREFCOLOR_MIRCGREY "mIRC Grey" > -#define S_PREFCOLOR_MIRCSILVER "mIRC Silver" > -#define S_PREFCOLOR_NOTIFY_ON "Notify Online" > -#define S_PREFCOLOR_NOTIFY_OFF "Notify Offline" > -#define S_PREFCOLOR_NOTIFY_BG "Notify List background" > -#define S_PREFCOLOR_NOTIFY_SEL "Notify List selection" > +#define S_PREFCOLOR_MIRCWHITE "mIRC white" > +#define S_PREFCOLOR_MIRCBLACK "mIRC black" > +#define S_PREFCOLOR_MIRCDBLUE "mIRC dark blue" > +#define S_PREFCOLOR_MIRCGREEN "mIRC green" > +#define S_PREFCOLOR_MIRCRED "mIRC red" > +#define S_PREFCOLOR_MIRCBROWN "mIRC brown" > +#define S_PREFCOLOR_MIRCPURPLE "mIRC purple" > +#define S_PREFCOLOR_MIRCORANGE "mIRC orange" > +#define S_PREFCOLOR_MIRCYELLOW "mIRC yellow" > +#define S_PREFCOLOR_MIRCLIME "mIRC lime" > +#define S_PREFCOLOR_MIRCTEAL "mIRC teal" > +#define S_PREFCOLOR_MIRCAQUA "mIRC aqua" > +#define S_PREFCOLOR_MIRCLBLUE "mIRC light blue" > +#define S_PREFCOLOR_MIRCPINK "mIRC pink" > +#define S_PREFCOLOR_MIRCGREY "mIRC grey" > +#define S_PREFCOLOR_MIRCSILVER "mIRC silver" > +#define S_PREFCOLOR_NOTIFY_ON "Notify online" > +#define S_PREFCOLOR_NOTIFY_OFF "Notify offline" > +#define S_PREFCOLOR_NOTIFY_BG "Notify list background" > +#define S_PREFCOLOR_NOTIFY_SEL "Notify list selection" > #define S_PREFCOLOR_REVERT "Revert" > > // command prefs > @@ -318,11 +318,11 @@ > > // dcc prefs > > -#define S_PREFDCC_BLOCK_SIZE "DCC Block Size: " > +#define S_PREFDCC_BLOCK_SIZE "DCC block size: " > #define S_PREFDCC_AUTOACK "Automatically accept incoming sends" > #define S_PREFDCC_PRIVATE "Automatically check for NAT IP" > #define S_PREFDCC_DEFPATH "Default path: " > -#define S_PREFDCC_PORTRANGE "DCC Port Range" > +#define S_PREFDCC_PORTRANGE "DCC port range" > #define S_PREFDCC_PORTMIN "Min: " > #define S_PREFDCC_PORTMAX "Max: " > > @@ -334,20 +334,20 @@ > #define S_PREFEVENT_QUIT "Quit:" > #define S_PREFEVENT_KICK "Kick:" > #define S_PREFEVENT_TOPIC "Topic:" > -#define S_PREFEVENT_SNOTICE "Server Notice:" > -#define S_PREFEVENT_UNOTICE "User Notice:" > -#define S_PREFEVENT_NOTIFYON "Notify On:" > -#define S_PREFEVENT_NOTIFYOFF "Notify Off:" > +#define S_PREFEVENT_SNOTICE "Server notice:" > +#define S_PREFEVENT_UNOTICE "User notice:" > +#define S_PREFEVENT_NOTIFYON "Notify on:" > +#define S_PREFEVENT_NOTIFYOFF "Notify off:" > > // font prefs > > #define S_PREFFONT_TEXT "Text" > -#define S_PREFFONT_SMESSAGES "Server Messages" > +#define S_PREFFONT_SMESSAGES "Server messages" > #define S_PREFFONT_URLS "URLs" > #define S_PREFFONT_NAMESLIST "Names list" > #define S_PREFFONT_INPUT_TEXT "Input text" > -#define S_PREFFONT_WINLIST "Window List" > -#define S_PREFFONT_CHANLIST "Channel List" > +#define S_PREFFONT_WINLIST "Window list" > +#define S_PREFFONT_CHANLIST "Channel list" > #define S_PREFFONT_TSTAMP "Timestamp" > #define S_PREFFONT_FONTLABEL "Font: " > #define S_PREFFONT_SIZELABEL "Size: " > @@ -384,13 +384,13 @@ > #define S_SERVER_ATTEMPT3 "connect (attempt " > #define S_SERVER_ATTEMPT4 " of " > #define S_SERVER_ATTEMPT5 "[@] Attempting a connection to " > -#define S_SERVER_CONN_ERROR1 "[@] Could not create connection to address and port. Make sure your Internet connection is operational." > +#define S_SERVER_CONN_ERROR1 "[@] Could not create connection to address and port. Make sure your internet connection is operational." > #define S_SERVER_CONN_ERROR2 "[@] Could not establish a connection to the server. Sorry." > #define S_SERVER_CONN_OPEN "[@] Connection open, waiting for reply from server" > -#define S_SERVER_LOCALIP_ERROR "[@] Error getting Local IP" > +#define S_SERVER_LOCALIP_ERROR "[@] Error getting local IP" > #define S_SERVER_LOCALIP "[@] Local IP: " > -#define S_SERVER_PROXY_MSG "[@] (It looks like you are behind an Internet gateway. Vision will query the IRC server upon successful connection for your gateway's Internet address. This will be used for DCC communication.)" > -#define S_SERVER_PASS_MSG "[@] Sending Password" > +#define S_SERVER_PROXY_MSG "[@] (It looks like you are behind an internet gateway. Vision will query the IRC server upon successful connection for your gateway's internet address. This will be used for DCC communication.)" > +#define S_SERVER_PASS_MSG "[@] Sending password" > #define S_SERVER_HANDSHAKE "[@] Handshaking" > #define S_SERVER_ESTABLISH "[@] Established" > #define S_SERVER_RETRY_LIMIT "[@] Retry limit reached; giving up. Type /reconnect if you want to give it another go." > @@ -406,7 +406,7 @@ > > // server entry window > > -#define S_SERVERWIN_TITLE "Add Server" > +#define S_SERVERWIN_TITLE "Add server" > #define S_SERVERWIN_SERVER "Server: " > #define S_SERVERWIN_PORT "Port: " > #define S_SERVERWIN_MENU1 "Choose status" > @@ -416,15 +416,15 @@ > #define S_SERVERWIN_STATE "State: " > #define S_SERVERWIN_DONE_BUTTON "Done" > #define S_SERVERWIN_CANCEL_BUTTON "Cancel" > -#define S_SERVERWIN_PASS_CHECK "Use Password: " > +#define S_SERVERWIN_PASS_CHECK "Use password: " > > // setup window > > -#define S_SETUP_TITLE "Setup Window" > +#define S_SETUP_TITLE "Setup window" > #define S_SETUP_CONNECT_BUTTON "Connect" > -#define S_SETUP_NETPREFS "Network Setup" > +#define S_SETUP_NETPREFS "Network setup" > #define S_SETUP_GENPREFS "Preferences" > -#define S_SETUP_CHOOSENET "Choose Network" > +#define S_SETUP_CHOOSENET "Choose network" > #define S_SETUP_CHOOSELABEL "Network: " > > // status bar > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > > > > ------------------------------ > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > > ------------------------------ > > _______________________________________________ > Vision-list mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/vision-list > > > End of Vision-list Digest, Vol 13, Issue 1 > ****************************************** |
From: <ane...@us...> - 2013-05-31 01:34:20
|
Revision: 942 http://sourceforge.net/p/vision/code/942 Author: anevilyak Date: 2013-05-31 01:34:17 +0000 (Fri, 31 May 2013) Log Message: ----------- 0.9.7-H-130530: Apply patch by Humdinger to sentence case the UI. Thanks! Modified Paths: -------------- branches/0.9.7/Makefile branches/0.9.7/src/AboutWindow.cpp branches/0.9.7/src/ClientAgentInputFilter.cpp branches/0.9.7/src/DCCHandler.cpp branches/0.9.7/src/MessageAgent.cpp branches/0.9.7/src/NamesView.cpp branches/0.9.7/src/NotifyList.cpp branches/0.9.7/src/PrefApp.cpp branches/0.9.7/src/RunView.cpp branches/0.9.7/src/VTextControl.cpp branches/0.9.7/src/VisionStrings.h branches/0.9.7/src/VisionStrings.h.en Modified: branches/0.9.7/Makefile =================================================================== --- branches/0.9.7/Makefile 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/Makefile 2013-05-31 01:34:17 UTC (rev 942) @@ -16,7 +16,7 @@ # the file name, ... BINARY := Vision -VERSION := 0.9.7-H-090423 +VERSION := 0.9.7-H-130530 BUILDDATE := $(shell date +%b_%d_%Y) BUILD_TYPE := Release Modified: branches/0.9.7/src/AboutWindow.cpp =================================================================== --- branches/0.9.7/src/AboutWindow.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/AboutWindow.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Brian Luft * Todd Lair @@ -45,7 +45,7 @@ * Function purpose: Construct */ - + BRect bounds (Bounds()); BBitmap *bmp (NULL); @@ -74,7 +74,7 @@ bounds.Set ( 0.0, - fLogo->Frame().bottom + 12, + fLogo->Frame().bottom + 12, Bounds().right, Bounds().bottom); } @@ -84,7 +84,7 @@ "credits", bounds.OffsetToCopy (B_ORIGIN).InsetByCopy (20, 0), B_FOLLOW_LEFT | B_FOLLOW_TOP, - B_WILL_DRAW); + B_WILL_DRAW); fCredits->MakeSelectable (false); fCredits->MakeEditable (false); @@ -110,8 +110,8 @@ "Brian Luft (Electroly)\n" "Wade Majors (kurros)\n" "Jamie Wilkinson (project)\n\n\n\n" - - "\n\n\n\nBrought To You In Part By Contributions From\n" + + "\n\n\n\nBrought to you in part by contributions from\n" "{A-Z}\n" "Seth Flaxman (Flax)\n" "Joshua Jensen\n" @@ -119,6 +119,7 @@ "John Robinson ([geo])\n" "Bjorn Oksholen (GuinnessM)\n" "Jean-Baptiste M. Quéru (jbq)\n" + "Humdinger\n" "\n\n\n" "\n\n\n\nUnit C\n[Support Crew]\n" @@ -130,7 +131,7 @@ "Counselors: regurg and helix\n\n\n" "No animals were injured during the production of this IRC client\n\n\n" "Soundtrack available on Catastrophe Records\n\n\n\n" - + "\n\n\n\nSpecial Thanks\n\n" "Olathe\n" "Terminus\n" @@ -142,7 +143,7 @@ "Kristine Gouveia\n" "Be, Inc., Menlo Park, CA\n" "Pizza Hut, Winter Haven, FL (now give me that free pizza Mike)\n\n\n" - + "send all complaints and nipple pictures to kaye\n\n\n" "\n\n\n\n\n" @@ -191,7 +192,7 @@ */ delete fScrollRunner; vision_app->PostMessage (M_ABOUT_CLOSE); - + return true; } @@ -202,7 +203,7 @@ * Function purpose: Read image resource bits::{eggName} and display */ -/* TODO : get this working +/* TODO : get this working BBitmap *bmp; if ((bmp = BTranslationUtils::GetBitmap ('bits', eggName)) != 0) @@ -225,7 +226,7 @@ { case M_ABOUT_SCROLL: { -#if B_BEOS_VERSION_DANO +#if B_BEOS_VERSION_DANO fCredits->SetDoubleBuffering(0xf); #endif @@ -236,7 +237,7 @@ fCredits->ScrollTo (0, 0); } break; - + default: BWindow::MessageReceived (msg); break; Modified: branches/0.9.7/src/ClientAgentInputFilter.cpp =================================================================== --- branches/0.9.7/src/ClientAgentInputFilter.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/ClientAgentInputFilter.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -570,7 +570,7 @@ str.String(), "Cancel", "Spam!", - "Single Line", + "Single line", B_WIDTH_FROM_WIDEST, B_OFFSET_SPACING, B_WARNING_ALERT)); Modified: branches/0.9.7/src/DCCHandler.cpp =================================================================== --- branches/0.9.7/src/DCCHandler.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/DCCHandler.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -59,7 +59,7 @@ { BString theText(theNick); theText << S_SERVER_DCC_CHAT_PROMPT; - BAlert *myAlert = new BAlert("DCC Request", theText.String(), "Accept", + BAlert *myAlert = new BAlert("DCC request", theText.String(), "Accept", "Refuse"); myAlert->SetFeel (B_FLOATING_APP_WINDOW_FEEL); BMessage *myMessage = new BMessage(M_CHAT_ACCEPT); Modified: branches/0.9.7/src/MessageAgent.cpp =================================================================== --- branches/0.9.7/src/MessageAgent.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/MessageAgent.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -122,7 +122,7 @@ BString command ("/dcc send "); command += fId; msg->AddString ("input", command.String()); - item = new BMenuItem("DCC Send", msg); + item = new BMenuItem("DCC send", msg); item->SetTarget (this); if (Id().FindFirst (" [DCC]") >= 0) // dont enable for dcc sessions item->SetEnabled (false); Modified: branches/0.9.7/src/NamesView.cpp =================================================================== --- branches/0.9.7/src/NamesView.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/NamesView.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -83,15 +83,15 @@ fMyPopUp->AddItem(new BMenuItem("Query", myMessage)); myMessage = new BMessage (M_NAMES_POPUP_NOTIFY); - fMyPopUp->AddItem(new BMenuItem("Add To Notify", myMessage)); + fMyPopUp->AddItem(new BMenuItem("Add to notify", myMessage)); fMyPopUp->AddSeparatorItem(); myMessage = new BMessage(M_NAMES_POPUP_DCCSEND); - fMyPopUp->AddItem(new BMenuItem("DCC Send", myMessage)); + fMyPopUp->AddItem(new BMenuItem("DCC send", myMessage)); myMessage = new BMessage(M_NAMES_POPUP_DCCCHAT); - fMyPopUp->AddItem(new BMenuItem("DCC Chat", myMessage)); + fMyPopUp->AddItem(new BMenuItem("DCC chat", myMessage)); fCTCPPopUp = new BMenu("CTCP"); fMyPopUp->AddItem( fCTCPPopUp ); Modified: branches/0.9.7/src/NotifyList.cpp =================================================================== --- branches/0.9.7/src/NotifyList.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/NotifyList.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -164,7 +164,7 @@ NotifyList::BuildPopUp(void) { delete fMyPopUp; - fMyPopUp = new BPopUpMenu("Notify Selection", false, false); + fMyPopUp = new BPopUpMenu("Notify selection", false, false); int index (CurrentSelection()); if (index < 0) Modified: branches/0.9.7/src/PrefApp.cpp =================================================================== --- branches/0.9.7/src/PrefApp.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/PrefApp.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -79,7 +79,7 @@ AddChild (fStripColors); checkboxRect.OffsetBy(0.0, fStripColors->Bounds().Height() * 1.2); - msg.ReplaceString ("setting", "Newbie Spam Mode"); + msg.ReplaceString ("setting", "Newbie spam mode"); fSpamMode = new BCheckBox (checkboxRect, "newbiespammode", S_PREFAPP_WARN_MULTILINE, new BMessage (msg)); Modified: branches/0.9.7/src/RunView.cpp =================================================================== --- branches/0.9.7/src/RunView.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/RunView.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -593,7 +593,7 @@ BMessage *lookup; lookup = new BMessage (M_LOOKUP_WEBSTER); lookup->AddString ("string", querystring); - item = new BMenuItem("Lookup (Dictionary)", lookup); + item = new BMenuItem("Lookup (dictionary)", lookup); item->SetEnabled (enablelookup); item->SetTarget (Parent()); fMyPopUp->AddItem (item); @@ -607,7 +607,7 @@ lookup = new BMessage (M_LOOKUP_ACRONYM); lookup->AddString ("string", querystring); - item = new BMenuItem("Lookup (Acronym Finder)", lookup); + item = new BMenuItem("Lookup (acronym finder)", lookup); item->SetEnabled (enablelookup); item->SetTarget (Parent()); fMyPopUp->AddItem (item); @@ -619,7 +619,7 @@ item->SetTarget (this); fMyPopUp->AddItem (item); - item = new BMenuItem("Select All", new BMessage (B_SELECT_ALL), 'A'); + item = new BMenuItem("Select all", new BMessage (B_SELECT_ALL), 'A'); item->SetEnabled (enableselectall); item->SetTarget (this); fMyPopUp->AddItem (item); Modified: branches/0.9.7/src/VTextControl.cpp =================================================================== --- branches/0.9.7/src/VTextControl.cpp 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/VTextControl.cpp 2013-05-31 01:34:17 UTC (rev 942) @@ -117,7 +117,7 @@ myPopUp->AddSeparatorItem(); - item = new BMenuItem("Select All", new BMessage (B_SELECT_ALL), 'A'); + item = new BMenuItem("Select all", new BMessage (B_SELECT_ALL), 'A'); item->SetEnabled (enableselectall); myPopUp->AddItem (item); Modified: branches/0.9.7/src/VisionStrings.h =================================================================== --- branches/0.9.7/src/VisionStrings.h 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/VisionStrings.h 2013-05-31 01:34:17 UTC (rev 942) @@ -56,8 +56,8 @@ #define S_CW_APP_ABOUT "About" #define S_CW_APP_PREFS "Preferences" -#define S_CW_APP_CHANLIST "List Channels" -#define S_CW_APP_TERMINAL "New Terminal" +#define S_CW_APP_CHANLIST "List channels" +#define S_CW_APP_TERMINAL "New terminal" #define S_CW_APP_QUIT "Quit" #define S_CW_SERVER_MENU "Server" #define S_CW_SERVER_CONNECT "Connect to" @@ -66,24 +66,24 @@ #define S_CW_EDIT_CUT "Cut" #define S_CW_EDIT_COPY "Copy" #define S_CW_EDIT_PASTE "Paste" -#define S_CW_EDIT_SELECT_ALL "Select All" +#define S_CW_EDIT_SELECT_ALL "Select all" #define S_CW_WINDOW_MENU "Window" -#define S_CW_WINDOW_PART "Close Subwindow" +#define S_CW_WINDOW_PART "Close subwindow" #define S_CW_WINDOW_UP "Up" #define S_CW_WINDOW_DOWN "Down" -#define S_CW_WINDOW_SM_UP "Smart Up" -#define S_CW_WINDOW_SM_DOWN "Smart Down" -#define S_CW_WINDOW_NETWORK "Network Window" -#define S_CW_WINDOW_PREVIOUS "Previous Window" -#define S_CW_WINDOW_NET_UP "Move Network Up" -#define S_CW_WINDOW_NET_DOWN "Move Network Down" -#define S_CW_WINDOW_COLLAPSE "Collapse Network" -#define S_CW_WINDOW_EXPAND "Expand Network" +#define S_CW_WINDOW_SM_UP "Smart up" +#define S_CW_WINDOW_SM_DOWN "Smart down" +#define S_CW_WINDOW_NETWORK "Network window" +#define S_CW_WINDOW_PREVIOUS "Previous window" +#define S_CW_WINDOW_NET_UP "Move network up" +#define S_CW_WINDOW_NET_DOWN "Move network down" +#define S_CW_WINDOW_COLLAPSE "Collapse network" +#define S_CW_WINDOW_EXPAND "Expand network" // client window dock -#define S_CWD_WINLIST_HEADER "Window List" -#define S_CWD_NOTIFY_HEADER "Notify List" +#define S_CWD_WINLIST_HEADER "Window list" +#define S_CWD_NOTIFY_HEADER "Notify list" // DCC messages @@ -107,13 +107,13 @@ #define S_DCC_CHAT_TRY "Trying to connect to address " #define S_DCC_CHAT_PORT ", port " #define S_DCC_CHAT_CONNECTED "Connected!\n" -#define S_DCC_CHAT_TERM "DCC Chat Terminated.\n" +#define S_DCC_CHAT_TERM "DCC chat terminated.\n" // list agent #define S_LIST_MENU "Channels" #define S_LIST_MENU_FIND "Find" -#define S_LIST_MENU_FINDNEXT "Find Next" +#define S_LIST_MENU_FINDNEXT "Find next" #define S_LIST_MENU_FILTER "Filter" #define S_LIST_COLUMN_CHAN "Channel" #define S_LIST_COLUMN_USER "Users" @@ -142,19 +142,19 @@ #define S_NETPREFS_NETMENU "Networks" #define S_NETPREFS_DEFAULTS_ITEM "Defaults" -#define S_NETPREFS_ADD_NEW "Add New" +#define S_NETPREFS_ADD_NEW "Add new" #define S_NETPREFS_REMOVE "Remove current" #define S_NETPREFS_DUPE "Duplicate current" -#define S_NETPREFS_NET_BOX "Network Details" -#define S_NETPREFS_PERSONAL_BOX "Personal Details" +#define S_NETPREFS_NET_BOX "Network details" +#define S_NETPREFS_PERSONAL_BOX "Personal details" #define S_NETPREFS_CONN1 "Will connect to" #define S_NETPREFS_CONN2 "falling back to 9 others." #define S_NETPREFS_CHANGE_SERVER "Change servers" #define S_NETPREFS_AUTOEXEC "Autoexec:" #define S_NETPREFS_LAG_CHECK "Enable lag checking" #define S_NETPREFS_STARTUP_CONN "Connect to this network when Vision starts up" -#define S_NETPREFS_USE_DEFAULTS "Use Defaults" -#define S_NETPREFS_PREFNICK "Preferred Nicks:" +#define S_NETPREFS_USE_DEFAULTS "Use defaults" +#define S_NETPREFS_PREFNICK "Preferred nicks:" #define S_NETPREFS_ADD_BUTTON "Add" #define S_NETPREFS_REMOVE_BUTTON "Remove" #define S_NETPREFS_IDENT "Ident: " @@ -162,15 +162,15 @@ #define S_NETPREFS_FALLBACK1 "falling back to " #define S_NETPREFS_FALLBACK2 " other" #define S_NETPREFS_FALLBACK2_PLURAL "s" -#define S_NETPREFS_ADDNET_TITLE "Add Network" -#define S_NETPREFS_DUPENET_TITLE "Duplicate Network" -#define S_NETPREFS_NET_PROMPT "Network Name: " -#define S_NETPREFS_ADDNICK_TITLE "Add Nickname" +#define S_NETPREFS_ADDNET_TITLE "Add network" +#define S_NETPREFS_DUPENET_TITLE "Duplicate network" +#define S_NETPREFS_NET_PROMPT "Network name: " +#define S_NETPREFS_ADDNICK_TITLE "Add nickname" #define S_NETPREFS_ADDNICK_PROMPT "Nickname: " // network windows -#define S_NETWORK_WINDOW_TITLE "Network Setup" +#define S_NETWORK_WINDOW_TITLE "Network setup" #define S_SERVERPREFS_TITLE "Servers" // notify list @@ -178,7 +178,7 @@ #define S_NOTIFYLIST_QUERY_ITEM "Query" #define S_NOTIFYLIST_WHOIS_ITEM "Whois" #define S_NOTIFYLIST_REMOVE_ITEM "Remove" -#define S_NOTIFYLIST_DCC_ITEM "DCC Chat" +#define S_NOTIFYLIST_DCC_ITEM "DCC chat" // command parser #define S_PCMD_PARAMETER_ERROR "Error: Invalid parameters" @@ -249,8 +249,8 @@ // app prefs #define S_PREFAPP_VERSION_PARANOID "Show OS information in version reply" -#define S_PREFAPP_CMDW "Require double Cmd+Q/W to close" -#define S_PREFAPP_STRIP_MIRC "Strip mIRC Colors" +#define S_PREFAPP_CMDW "Require double CMD+Q/W to close" +#define S_PREFAPP_STRIP_MIRC "Strip mIRC colors" #define S_PREFAPP_WARN_MULTILINE "Warn when multiline pasting" #define S_PREFAPP_QUERY_MSG "Open new query on message" @@ -259,7 +259,7 @@ #define S_PREFCOLOR_TEXT "Text" #define S_PREFCOLOR_BACKGROUND "Background" #define S_PREFCOLOR_URL "URL" -#define S_PREFCOLOR_SERVERTEXT "Server Text" +#define S_PREFCOLOR_SERVERTEXT "Server text" #define S_PREFCOLOR_NOTICE "Notice" #define S_PREFCOLOR_ACTION "Action" #define S_PREFCOLOR_QUIT "Quit" @@ -270,14 +270,14 @@ #define S_PREFCOLOR_JOIN "Join" #define S_PREFCOLOR_KICK "Kick" #define S_PREFCOLOR_WHOIS "Whois" -#define S_PREFCOLOR_NAMES_NORM "Names (Normal)" -#define S_PREFCOLOR_NAMES_OP "Names (Op)" -#define S_PREFCOLOR_NAMES_HELP "Names (Helper)" -#define S_PREFCOLOR_NAMES_VOICE "Names (Voice)" +#define S_PREFCOLOR_NAMES_NORM "Names (normal)" +#define S_PREFCOLOR_NAMES_OP "Names (OP)" +#define S_PREFCOLOR_NAMES_HELP "Names (helper)" +#define S_PREFCOLOR_NAMES_VOICE "Names (voice)" #define S_PREFCOLOR_NAMES_SEL "Names selection" -#define S_PREFCOLOR_NAMES_BG "Names Background" -#define S_PREFCOLOR_CTCP_REQ "CTCP Request" -#define S_PREFCOLOR_CTCP_RPY "CTCP Reply" +#define S_PREFCOLOR_NAMES_BG "Names background" +#define S_PREFCOLOR_CTCP_REQ "CTCP request" +#define S_PREFCOLOR_CTCP_RPY "CTCP reply" #define S_PREFCOLOR_IGNORE "Ignore" #define S_PREFCOLOR_INPUT_TXT "Input text" #define S_PREFCOLOR_INPUT_BG "Input background" @@ -291,26 +291,26 @@ #define S_PREFCOLOR_TIMESTAMP "Timestamp" #define S_PREFCOLOR_TIMESTAMP_BG "Timestamp background" #define S_PREFCOLOR_SELECTION "Selection" -#define S_PREFCOLOR_MIRCWHITE "mIRC White" -#define S_PREFCOLOR_MIRCBLACK "mIRC Black" -#define S_PREFCOLOR_MIRCDBLUE "mIRC Dark Blue" -#define S_PREFCOLOR_MIRCGREEN "mIRC Green" -#define S_PREFCOLOR_MIRCRED "mIRC Red" -#define S_PREFCOLOR_MIRCBROWN "mIRC Brown" -#define S_PREFCOLOR_MIRCPURPLE "mIRC Purple" -#define S_PREFCOLOR_MIRCORANGE "mIRC Orange" -#define S_PREFCOLOR_MIRCYELLOW "mIRC Yellow" -#define S_PREFCOLOR_MIRCLIME "mIRC Lime" -#define S_PREFCOLOR_MIRCTEAL "mIRC Teal" -#define S_PREFCOLOR_MIRCAQUA "mIRC Aqua" -#define S_PREFCOLOR_MIRCLBLUE "mIRC Light Blue" -#define S_PREFCOLOR_MIRCPINK "mIRC Pink" -#define S_PREFCOLOR_MIRCGREY "mIRC Grey" -#define S_PREFCOLOR_MIRCSILVER "mIRC Silver" -#define S_PREFCOLOR_NOTIFY_ON "Notify Online" -#define S_PREFCOLOR_NOTIFY_OFF "Notify Offline" -#define S_PREFCOLOR_NOTIFY_BG "Notify List background" -#define S_PREFCOLOR_NOTIFY_SEL "Notify List selection" +#define S_PREFCOLOR_MIRCWHITE "mIRC white" +#define S_PREFCOLOR_MIRCBLACK "mIRC black" +#define S_PREFCOLOR_MIRCDBLUE "mIRC dark blue" +#define S_PREFCOLOR_MIRCGREEN "mIRC green" +#define S_PREFCOLOR_MIRCRED "mIRC red" +#define S_PREFCOLOR_MIRCBROWN "mIRC brown" +#define S_PREFCOLOR_MIRCPURPLE "mIRC purple" +#define S_PREFCOLOR_MIRCORANGE "mIRC orange" +#define S_PREFCOLOR_MIRCYELLOW "mIRC yellow" +#define S_PREFCOLOR_MIRCLIME "mIRC lime" +#define S_PREFCOLOR_MIRCTEAL "mIRC teal" +#define S_PREFCOLOR_MIRCAQUA "mIRC aqua" +#define S_PREFCOLOR_MIRCLBLUE "mIRC light blue" +#define S_PREFCOLOR_MIRCPINK "mIRC pink" +#define S_PREFCOLOR_MIRCGREY "mIRC grey" +#define S_PREFCOLOR_MIRCSILVER "mIRC silver" +#define S_PREFCOLOR_NOTIFY_ON "Notify online" +#define S_PREFCOLOR_NOTIFY_OFF "Notify offline" +#define S_PREFCOLOR_NOTIFY_BG "Notify list background" +#define S_PREFCOLOR_NOTIFY_SEL "Notify list selection" #define S_PREFCOLOR_REVERT "Revert" // command prefs @@ -325,11 +325,11 @@ // dcc prefs -#define S_PREFDCC_BLOCK_SIZE "DCC Block Size: " +#define S_PREFDCC_BLOCK_SIZE "DCC block size: " #define S_PREFDCC_AUTOACK "Automatically accept incoming sends" #define S_PREFDCC_PRIVATE "Automatically check for NAT IP" #define S_PREFDCC_DEFPATH "Default path: " -#define S_PREFDCC_PORTRANGE "DCC Port Range" +#define S_PREFDCC_PORTRANGE "DCC port range" #define S_PREFDCC_PORTMIN "Min: " #define S_PREFDCC_PORTMAX "Max: " @@ -341,20 +341,20 @@ #define S_PREFEVENT_QUIT "Quit:" #define S_PREFEVENT_KICK "Kick:" #define S_PREFEVENT_TOPIC "Topic:" -#define S_PREFEVENT_SNOTICE "Server Notice:" -#define S_PREFEVENT_UNOTICE "User Notice:" -#define S_PREFEVENT_NOTIFYON "Notify On:" -#define S_PREFEVENT_NOTIFYOFF "Notify Off:" +#define S_PREFEVENT_SNOTICE "Server notice:" +#define S_PREFEVENT_UNOTICE "User notice:" +#define S_PREFEVENT_NOTIFYON "Notify on:" +#define S_PREFEVENT_NOTIFYOFF "Notify off:" // font prefs #define S_PREFFONT_TEXT "Text" -#define S_PREFFONT_SMESSAGES "Server Messages" +#define S_PREFFONT_SMESSAGES "Server messages" #define S_PREFFONT_URLS "URLs" #define S_PREFFONT_NAMESLIST "Names list" #define S_PREFFONT_INPUT_TEXT "Input text" -#define S_PREFFONT_WINLIST "Window List" -#define S_PREFFONT_CHANLIST "Channel List" +#define S_PREFFONT_WINLIST "Window list" +#define S_PREFFONT_CHANLIST "Channel list" #define S_PREFFONT_TSTAMP "Timestamp" #define S_PREFFONT_FONTLABEL "Font: " #define S_PREFFONT_SIZELABEL "Size: " @@ -392,13 +392,13 @@ #define S_SERVER_ATTEMPT3 "connect (attempt " #define S_SERVER_ATTEMPT4 " of " #define S_SERVER_ATTEMPT5 "[@] Attempting a connection to " -#define S_SERVER_CONN_ERROR1 "[@] Could not create connection to address and port. Make sure your Internet connection is operational." +#define S_SERVER_CONN_ERROR1 "[@] Could not create connection to address and port. Make sure your internet connection is operational." #define S_SERVER_CONN_ERROR2 "[@] Could not establish a connection to the server. Sorry." #define S_SERVER_CONN_OPEN "[@] Connection open, waiting for reply from server" -#define S_SERVER_LOCALIP_ERROR "[@] Error getting Local IP" +#define S_SERVER_LOCALIP_ERROR "[@] Error getting local IP" #define S_SERVER_LOCALIP "[@] Local IP: " -#define S_SERVER_PROXY_MSG "[@] (It looks like you are behind an Internet gateway. Vision will query the IRC server upon successful connection for your gateway's Internet address. This will be used for DCC communication.)" -#define S_SERVER_PASS_MSG "[@] Sending Password" +#define S_SERVER_PROXY_MSG "[@] (It looks like you are behind an internet gateway. Vision will query the IRC server upon successful connection for your gateway's internet address. This will be used for DCC communication.)" +#define S_SERVER_PASS_MSG "[@] Sending password" #define S_SERVER_HANDSHAKE "[@] Handshaking" #define S_SERVER_ESTABLISH "[@] Established" #define S_SERVER_RETRY_LIMIT "[@] Retry limit reached; giving up. Type /reconnect if you want to give it another go." @@ -414,7 +414,7 @@ // server entry window -#define S_SERVERWIN_TITLE "Add Server" +#define S_SERVERWIN_TITLE "Add server" #define S_SERVERWIN_SERVER "Server: " #define S_SERVERWIN_PORT "Port: " #define S_SERVERWIN_MENU1 "Choose status" @@ -424,15 +424,15 @@ #define S_SERVERWIN_STATE "State: " #define S_SERVERWIN_DONE_BUTTON "Done" #define S_SERVERWIN_CANCEL_BUTTON "Cancel" -#define S_SERVERWIN_PASS_CHECK "Use Password: " +#define S_SERVERWIN_PASS_CHECK "Use password: " // setup window -#define S_SETUP_TITLE "Setup Window" +#define S_SETUP_TITLE "Setup window" #define S_SETUP_CONNECT_BUTTON "Connect" -#define S_SETUP_NETPREFS "Network Setup" +#define S_SETUP_NETPREFS "Network setup" #define S_SETUP_GENPREFS "Preferences" -#define S_SETUP_CHOOSENET "Choose Network" +#define S_SETUP_CHOOSENET "Choose network" #define S_SETUP_CHOOSELABEL "Network: " // status bar Modified: branches/0.9.7/src/VisionStrings.h.en =================================================================== --- branches/0.9.7/src/VisionStrings.h.en 2013-05-31 01:25:49 UTC (rev 941) +++ branches/0.9.7/src/VisionStrings.h.en 2013-05-31 01:34:17 UTC (rev 942) @@ -56,8 +56,8 @@ #define S_CW_APP_ABOUT "About" #define S_CW_APP_PREFS "Preferences" -#define S_CW_APP_CHANLIST "List Channels" -#define S_CW_APP_TERMINAL "New Terminal" +#define S_CW_APP_CHANLIST "List channels" +#define S_CW_APP_TERMINAL "New terminal" #define S_CW_APP_QUIT "Quit" #define S_CW_SERVER_MENU "Server" #define S_CW_SERVER_CONNECT "Connect to" @@ -66,24 +66,24 @@ #define S_CW_EDIT_CUT "Cut" #define S_CW_EDIT_COPY "Copy" #define S_CW_EDIT_PASTE "Paste" -#define S_CW_EDIT_SELECT_ALL "Select All" +#define S_CW_EDIT_SELECT_ALL "Select all" #define S_CW_WINDOW_MENU "Window" -#define S_CW_WINDOW_PART "Close Subwindow" +#define S_CW_WINDOW_PART "Close subwindow" #define S_CW_WINDOW_UP "Up" #define S_CW_WINDOW_DOWN "Down" -#define S_CW_WINDOW_SM_UP "Smart Up" -#define S_CW_WINDOW_SM_DOWN "Smart Down" -#define S_CW_WINDOW_NETWORK "Network Window" -#define S_CW_WINDOW_PREVIOUS "Previous Window" -#define S_CW_WINDOW_NET_UP "Move Network Up" -#define S_CW_WINDOW_NET_DOWN "Move Network Down" -#define S_CW_WINDOW_COLLAPSE "Collapse Network" -#define S_CW_WINDOW_EXPAND "Expand Network" +#define S_CW_WINDOW_SM_UP "Smart up" +#define S_CW_WINDOW_SM_DOWN "Smart down" +#define S_CW_WINDOW_NETWORK "Network window" +#define S_CW_WINDOW_PREVIOUS "Previous window" +#define S_CW_WINDOW_NET_UP "Move network up" +#define S_CW_WINDOW_NET_DOWN "Move network down" +#define S_CW_WINDOW_COLLAPSE "Collapse network" +#define S_CW_WINDOW_EXPAND "Expand network" // client window dock -#define S_CWD_WINLIST_HEADER "Window List" -#define S_CWD_NOTIFY_HEADER "Notify List" +#define S_CWD_WINLIST_HEADER "Window list" +#define S_CWD_NOTIFY_HEADER "Notify list" // DCC messages @@ -107,13 +107,13 @@ #define S_DCC_CHAT_TRY "Trying to connect to address " #define S_DCC_CHAT_PORT ", port " #define S_DCC_CHAT_CONNECTED "Connected!\n" -#define S_DCC_CHAT_TERM "DCC Chat Terminated.\n" +#define S_DCC_CHAT_TERM "DCC chat terminated.\n" // list agent #define S_LIST_MENU "Channels" #define S_LIST_MENU_FIND "Find" -#define S_LIST_MENU_FINDNEXT "Find Next" +#define S_LIST_MENU_FINDNEXT "Find next" #define S_LIST_MENU_FILTER "Filter" #define S_LIST_COLUMN_CHAN "Channel" #define S_LIST_COLUMN_USER "Users" @@ -142,19 +142,19 @@ #define S_NETPREFS_NETMENU "Networks" #define S_NETPREFS_DEFAULTS_ITEM "Defaults" -#define S_NETPREFS_ADD_NEW "Add New" +#define S_NETPREFS_ADD_NEW "Add new" #define S_NETPREFS_REMOVE "Remove current" #define S_NETPREFS_DUPE "Duplicate current" -#define S_NETPREFS_NET_BOX "Network Details" -#define S_NETPREFS_PERSONAL_BOX "Personal Details" +#define S_NETPREFS_NET_BOX "Network details" +#define S_NETPREFS_PERSONAL_BOX "Personal details" #define S_NETPREFS_CONN1 "Will connect to" #define S_NETPREFS_CONN2 "falling back to 9 others." #define S_NETPREFS_CHANGE_SERVER "Change servers" #define S_NETPREFS_AUTOEXEC "Autoexec:" #define S_NETPREFS_LAG_CHECK "Enable lag checking" #define S_NETPREFS_STARTUP_CONN "Connect to this network when Vision starts up" -#define S_NETPREFS_USE_DEFAULTS "Use Defaults" -#define S_NETPREFS_PREFNICK "Preferred Nicks:" +#define S_NETPREFS_USE_DEFAULTS "Use defaults" +#define S_NETPREFS_PREFNICK "Preferred nicks:" #define S_NETPREFS_ADD_BUTTON "Add" #define S_NETPREFS_REMOVE_BUTTON "Remove" #define S_NETPREFS_IDENT "Ident: " @@ -162,15 +162,15 @@ #define S_NETPREFS_FALLBACK1 "falling back to " #define S_NETPREFS_FALLBACK2 " other" #define S_NETPREFS_FALLBACK2_PLURAL "s" -#define S_NETPREFS_ADDNET_TITLE "Add Network" -#define S_NETPREFS_DUPENET_TITLE "Duplicate Network" -#define S_NETPREFS_NET_PROMPT "Network Name: " -#define S_NETPREFS_ADDNICK_TITLE "Add Nickname" +#define S_NETPREFS_ADDNET_TITLE "Add network" +#define S_NETPREFS_DUPENET_TITLE "Duplicate network" +#define S_NETPREFS_NET_PROMPT "Network name: " +#define S_NETPREFS_ADDNICK_TITLE "Add nickname" #define S_NETPREFS_ADDNICK_PROMPT "Nickname: " // network windows -#define S_NETWORK_WINDOW_TITLE "Network Setup" +#define S_NETWORK_WINDOW_TITLE "Network setup" #define S_SERVERPREFS_TITLE "Servers" // notify list @@ -178,7 +178,7 @@ #define S_NOTIFYLIST_QUERY_ITEM "Query" #define S_NOTIFYLIST_WHOIS_ITEM "Whois" #define S_NOTIFYLIST_REMOVE_ITEM "Remove" -#define S_NOTIFYLIST_DCC_ITEM "DCC Chat" +#define S_NOTIFYLIST_DCC_ITEM "DCC chat" // command parser #define S_PCMD_PARAMETER_ERROR "Error: Invalid parameters" @@ -242,8 +242,8 @@ // app prefs #define S_PREFAPP_VERSION_PARANOID "Show OS information in version reply" -#define S_PREFAPP_CMDW "Require double Cmd+Q/W to close" -#define S_PREFAPP_STRIP_MIRC "Strip mIRC Colors" +#define S_PREFAPP_CMDW "Require double CMD+Q/W to close" +#define S_PREFAPP_STRIP_MIRC "Strip mIRC colors" #define S_PREFAPP_WARN_MULTILINE "Warn when multiline pasting" #define S_PREFAPP_QUERY_MSG "Open new query on message" @@ -252,7 +252,7 @@ #define S_PREFCOLOR_TEXT "Text" #define S_PREFCOLOR_BACKGROUND "Background" #define S_PREFCOLOR_URL "URL" -#define S_PREFCOLOR_SERVERTEXT "Server Text" +#define S_PREFCOLOR_SERVERTEXT "Server text" #define S_PREFCOLOR_NOTICE "Notice" #define S_PREFCOLOR_ACTION "Action" #define S_PREFCOLOR_QUIT "Quit" @@ -263,14 +263,14 @@ #define S_PREFCOLOR_JOIN "Join" #define S_PREFCOLOR_KICK "Kick" #define S_PREFCOLOR_WHOIS "Whois" -#define S_PREFCOLOR_NAMES_NORM "Names (Normal)" -#define S_PREFCOLOR_NAMES_OP "Names (Op)" -#define S_PREFCOLOR_NAMES_HELP "Names (Helper)" -#define S_PREFCOLOR_NAMES_VOICE "Names (Voice)" +#define S_PREFCOLOR_NAMES_NORM "Names (normal)" +#define S_PREFCOLOR_NAMES_OP "Names (OP)" +#define S_PREFCOLOR_NAMES_HELP "Names (helper)" +#define S_PREFCOLOR_NAMES_VOICE "Names (voice)" #define S_PREFCOLOR_NAMES_SEL "Names selection" -#define S_PREFCOLOR_NAMES_BG "Names Background" -#define S_PREFCOLOR_CTCP_REQ "CTCP Request" -#define S_PREFCOLOR_CTCP_RPY "CTCP Reply" +#define S_PREFCOLOR_NAMES_BG "Names background" +#define S_PREFCOLOR_CTCP_REQ "CTCP request" +#define S_PREFCOLOR_CTCP_RPY "CTCP reply" #define S_PREFCOLOR_IGNORE "Ignore" #define S_PREFCOLOR_INPUT_TXT "Input text" #define S_PREFCOLOR_INPUT_BG "Input background" @@ -284,26 +284,26 @@ #define S_PREFCOLOR_TIMESTAMP "Timestamp" #define S_PREFCOLOR_TIMESTAMP_BG "Timestamp background" #define S_PREFCOLOR_SELECTION "Selection" -#define S_PREFCOLOR_MIRCWHITE "mIRC White" -#define S_PREFCOLOR_MIRCBLACK "mIRC Black" -#define S_PREFCOLOR_MIRCDBLUE "mIRC Dark Blue" -#define S_PREFCOLOR_MIRCGREEN "mIRC Green" -#define S_PREFCOLOR_MIRCRED "mIRC Red" -#define S_PREFCOLOR_MIRCBROWN "mIRC Brown" -#define S_PREFCOLOR_MIRCPURPLE "mIRC Purple" -#define S_PREFCOLOR_MIRCORANGE "mIRC Orange" -#define S_PREFCOLOR_MIRCYELLOW "mIRC Yellow" -#define S_PREFCOLOR_MIRCLIME "mIRC Lime" -#define S_PREFCOLOR_MIRCTEAL "mIRC Teal" -#define S_PREFCOLOR_MIRCAQUA "mIRC Aqua" -#define S_PREFCOLOR_MIRCLBLUE "mIRC Light Blue" -#define S_PREFCOLOR_MIRCPINK "mIRC Pink" -#define S_PREFCOLOR_MIRCGREY "mIRC Grey" -#define S_PREFCOLOR_MIRCSILVER "mIRC Silver" -#define S_PREFCOLOR_NOTIFY_ON "Notify Online" -#define S_PREFCOLOR_NOTIFY_OFF "Notify Offline" -#define S_PREFCOLOR_NOTIFY_BG "Notify List background" -#define S_PREFCOLOR_NOTIFY_SEL "Notify List selection" +#define S_PREFCOLOR_MIRCWHITE "mIRC white" +#define S_PREFCOLOR_MIRCBLACK "mIRC black" +#define S_PREFCOLOR_MIRCDBLUE "mIRC dark blue" +#define S_PREFCOLOR_MIRCGREEN "mIRC green" +#define S_PREFCOLOR_MIRCRED "mIRC red" +#define S_PREFCOLOR_MIRCBROWN "mIRC brown" +#define S_PREFCOLOR_MIRCPURPLE "mIRC purple" +#define S_PREFCOLOR_MIRCORANGE "mIRC orange" +#define S_PREFCOLOR_MIRCYELLOW "mIRC yellow" +#define S_PREFCOLOR_MIRCLIME "mIRC lime" +#define S_PREFCOLOR_MIRCTEAL "mIRC teal" +#define S_PREFCOLOR_MIRCAQUA "mIRC aqua" +#define S_PREFCOLOR_MIRCLBLUE "mIRC light blue" +#define S_PREFCOLOR_MIRCPINK "mIRC pink" +#define S_PREFCOLOR_MIRCGREY "mIRC grey" +#define S_PREFCOLOR_MIRCSILVER "mIRC silver" +#define S_PREFCOLOR_NOTIFY_ON "Notify online" +#define S_PREFCOLOR_NOTIFY_OFF "Notify offline" +#define S_PREFCOLOR_NOTIFY_BG "Notify list background" +#define S_PREFCOLOR_NOTIFY_SEL "Notify list selection" #define S_PREFCOLOR_REVERT "Revert" // command prefs @@ -318,11 +318,11 @@ // dcc prefs -#define S_PREFDCC_BLOCK_SIZE "DCC Block Size: " +#define S_PREFDCC_BLOCK_SIZE "DCC block size: " #define S_PREFDCC_AUTOACK "Automatically accept incoming sends" #define S_PREFDCC_PRIVATE "Automatically check for NAT IP" #define S_PREFDCC_DEFPATH "Default path: " -#define S_PREFDCC_PORTRANGE "DCC Port Range" +#define S_PREFDCC_PORTRANGE "DCC port range" #define S_PREFDCC_PORTMIN "Min: " #define S_PREFDCC_PORTMAX "Max: " @@ -334,20 +334,20 @@ #define S_PREFEVENT_QUIT "Quit:" #define S_PREFEVENT_KICK "Kick:" #define S_PREFEVENT_TOPIC "Topic:" -#define S_PREFEVENT_SNOTICE "Server Notice:" -#define S_PREFEVENT_UNOTICE "User Notice:" -#define S_PREFEVENT_NOTIFYON "Notify On:" -#define S_PREFEVENT_NOTIFYOFF "Notify Off:" +#define S_PREFEVENT_SNOTICE "Server notice:" +#define S_PREFEVENT_UNOTICE "User notice:" +#define S_PREFEVENT_NOTIFYON "Notify on:" +#define S_PREFEVENT_NOTIFYOFF "Notify off:" // font prefs #define S_PREFFONT_TEXT "Text" -#define S_PREFFONT_SMESSAGES "Server Messages" +#define S_PREFFONT_SMESSAGES "Server messages" #define S_PREFFONT_URLS "URLs" #define S_PREFFONT_NAMESLIST "Names list" #define S_PREFFONT_INPUT_TEXT "Input text" -#define S_PREFFONT_WINLIST "Window List" -#define S_PREFFONT_CHANLIST "Channel List" +#define S_PREFFONT_WINLIST "Window list" +#define S_PREFFONT_CHANLIST "Channel list" #define S_PREFFONT_TSTAMP "Timestamp" #define S_PREFFONT_FONTLABEL "Font: " #define S_PREFFONT_SIZELABEL "Size: " @@ -384,13 +384,13 @@ #define S_SERVER_ATTEMPT3 "connect (attempt " #define S_SERVER_ATTEMPT4 " of " #define S_SERVER_ATTEMPT5 "[@] Attempting a connection to " -#define S_SERVER_CONN_ERROR1 "[@] Could not create connection to address and port. Make sure your Internet connection is operational." +#define S_SERVER_CONN_ERROR1 "[@] Could not create connection to address and port. Make sure your internet connection is operational." #define S_SERVER_CONN_ERROR2 "[@] Could not establish a connection to the server. Sorry." #define S_SERVER_CONN_OPEN "[@] Connection open, waiting for reply from server" -#define S_SERVER_LOCALIP_ERROR "[@] Error getting Local IP" +#define S_SERVER_LOCALIP_ERROR "[@] Error getting local IP" #define S_SERVER_LOCALIP "[@] Local IP: " -#define S_SERVER_PROXY_MSG "[@] (It looks like you are behind an Internet gateway. Vision will query the IRC server upon successful connection for your gateway's Internet address. This will be used for DCC communication.)" -#define S_SERVER_PASS_MSG "[@] Sending Password" +#define S_SERVER_PROXY_MSG "[@] (It looks like you are behind an internet gateway. Vision will query the IRC server upon successful connection for your gateway's internet address. This will be used for DCC communication.)" +#define S_SERVER_PASS_MSG "[@] Sending password" #define S_SERVER_HANDSHAKE "[@] Handshaking" #define S_SERVER_ESTABLISH "[@] Established" #define S_SERVER_RETRY_LIMIT "[@] Retry limit reached; giving up. Type /reconnect if you want to give it another go." @@ -406,7 +406,7 @@ // server entry window -#define S_SERVERWIN_TITLE "Add Server" +#define S_SERVERWIN_TITLE "Add server" #define S_SERVERWIN_SERVER "Server: " #define S_SERVERWIN_PORT "Port: " #define S_SERVERWIN_MENU1 "Choose status" @@ -416,15 +416,15 @@ #define S_SERVERWIN_STATE "State: " #define S_SERVERWIN_DONE_BUTTON "Done" #define S_SERVERWIN_CANCEL_BUTTON "Cancel" -#define S_SERVERWIN_PASS_CHECK "Use Password: " +#define S_SERVERWIN_PASS_CHECK "Use password: " // setup window -#define S_SETUP_TITLE "Setup Window" +#define S_SETUP_TITLE "Setup window" #define S_SETUP_CONNECT_BUTTON "Connect" -#define S_SETUP_NETPREFS "Network Setup" +#define S_SETUP_NETPREFS "Network setup" #define S_SETUP_GENPREFS "Preferences" -#define S_SETUP_CHOOSENET "Choose Network" +#define S_SETUP_CHOOSENET "Choose network" #define S_SETUP_CHOOSELABEL "Network: " // status bar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ane...@us...> - 2013-05-31 01:25:50
|
Revision: 941 http://sourceforge.net/p/vision/code/941 Author: anevilyak Date: 2013-05-31 01:25:49 +0000 (Fri, 31 May 2013) Log Message: ----------- Create stable branch. Added Paths: ----------- branches/0.9.7/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ane...@us...> - 2012-08-21 22:48:07
|
Revision: 940 http://vision.svn.sourceforge.net/vision/?rev=940&view=rev Author: anevilyak Date: 2012-08-21 22:47:56 +0000 (Tue, 21 Aug 2012) Log Message: ----------- Various minor changes to get things building on Haiku x86_64. Modified Paths: -------------- trunk/Vision/Jamfile trunk/Vision/src/ChannelAgent.cpp trunk/Vision/src/ChannelOptions.cpp trunk/Vision/src/ClientAgent.cpp trunk/Vision/src/ClientAgentInputFilter.cpp trunk/Vision/src/ClientAgentLogger.cpp trunk/Vision/src/ClientWindow.cpp trunk/Vision/src/ClientWindowDock.cpp trunk/Vision/src/ColorSelector.cpp trunk/Vision/src/ColorSwatch.cpp trunk/Vision/src/DCCConnect.cpp trunk/Vision/src/DCCHandler.cpp trunk/Vision/src/ListAgent.cpp trunk/Vision/src/MessageAgent.cpp trunk/Vision/src/NamesView.cpp trunk/Vision/src/NetPrefsServerView.cpp trunk/Vision/src/NetworkManager.cpp trunk/Vision/src/NetworkMenu.cpp trunk/Vision/src/NetworkPrefsView.cpp trunk/Vision/src/NetworkWindow.cpp trunk/Vision/src/NotifyList.cpp trunk/Vision/src/ParseCTCP.cpp trunk/Vision/src/ParseCmd.cpp trunk/Vision/src/ParseENums.cpp trunk/Vision/src/ParseEvents.cpp trunk/Vision/src/PrefAliases.cpp trunk/Vision/src/PrefApp.cpp trunk/Vision/src/PrefColor.cpp trunk/Vision/src/PrefCommand.cpp trunk/Vision/src/PrefDCC.cpp trunk/Vision/src/PrefEvent.cpp trunk/Vision/src/PrefFont.cpp trunk/Vision/src/PrefGeneral.cpp trunk/Vision/src/PrefLog.cpp trunk/Vision/src/PrefsWindow.cpp trunk/Vision/src/RunView.cpp trunk/Vision/src/ServerAgent.cpp trunk/Vision/src/ServerEntryWindow.cpp trunk/Vision/src/SettingsFile.cpp trunk/Vision/src/SetupWindow.cpp trunk/Vision/src/StatusView.cpp trunk/Vision/src/Utilities.cpp trunk/Vision/src/Vision.cpp trunk/Vision/src/WindowList.cpp Modified: trunk/Vision/Jamfile =================================================================== --- trunk/Vision/Jamfile 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/Jamfile 2012-08-21 22:47:56 UTC (rev 940) @@ -1,13 +1,11 @@ -SubDir HAIKU_TOP 3rdparty anevilyak Vision ; +SubDir HAIKU_TOP src apps vision ; -SetSubDirSupportedPlatformsBeOSCompatible ; UsePrivateHeaders interface ; #SubDirC++Flags -DSINGLE_BINARY -DDEBUG=1 ; -SubDirC++Flags -DVERSION_STRING=\\\"0.9.8-01092008\\\" -DBUILD_DATE=\\\"Sep_01_2008\\\" ; +SubDirC++Flags -DVERSION_STRING=\\\"0.9.8-08192012\\\" -DBUILD_DATE=\\\"Aug_19_2012\\\" ; +SEARCH_SOURCE += [ FDirName $(SUBDIR) src ] ; -SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) 3rdparty anevilyak Vision src ] ; - -Application <3rdparty>Vision : +Application Vision : AboutWindow.cpp ChannelAgent.cpp ChannelOptions.cpp @@ -19,7 +17,6 @@ ClientWindowDock.cpp ColorSelector.cpp ColorSwatch.cpp - ColorTools.cpp DCCConnect.cpp DCCFileWindow.cpp DCCHandler.cpp @@ -30,6 +27,7 @@ NameItem.cpp NamesView.cpp NetPrefsServerView.cpp + NetworkManager.cpp NetworkMenu.cpp NetworkPrefsView.cpp NetworkWindow.cpp @@ -51,6 +49,7 @@ PrefLog.cpp PrefsWindow.cpp Prompt.cpp + ResizeView.cpp RunView.cpp ServerAgent.cpp ServerEntryWindow.cpp @@ -64,7 +63,7 @@ VTextControl.cpp Vision.cpp WindowList.cpp - : libcolumnlistview.a be translation textencoding tracker $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++) + : be libcolumnlistview.a translation textencoding tracker $(TARGET_NETWORK_LIBS) $(TARGET_LIBSUPC++) $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS) : Vision.rsrc ; Modified: trunk/Vision/src/ChannelAgent.cpp =================================================================== --- trunk/Vision/src/ChannelAgent.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ChannelAgent.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -52,8 +52,8 @@ #include <infopopper/InfoPopper.h> #endif -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ChannelWindow" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ChannelWindow" ChannelAgent::ChannelAgent ( const char *id_, @@ -96,11 +96,11 @@ // empty recent nick list while (fRecentNicks.CountItems() > 0) - delete fRecentNicks.RemoveItemAt(0L); + delete fRecentNicks.RemoveItemAt((int32)0); // empty nick completion list while (fCompletionNicks.CountItems() > 0) - delete fCompletionNicks.RemoveItemAt(0L); + delete fCompletionNicks.RemoveItemAt((int32)0); } void @@ -344,7 +344,7 @@ int32 count (fRecentNicks.CountItems()); if (count > MAX_RECENT_NICKS) { - delete fRecentNicks.RemoveItemAt (0L); + delete fRecentNicks.RemoveItemAt ((int32)0); } // scan for presence of nick in list, and remove duplicate if found RemoveNickFromList (fRecentNicks, nick); @@ -452,7 +452,7 @@ fLastExpansion = place; while (!fCompletionNicks.IsEmpty()) - delete fCompletionNicks.RemoveItemAt(0L); + delete fCompletionNicks.RemoveItemAt((int32)0); int32 count (fNamesList->CountItems()), i (0); @@ -753,7 +753,7 @@ // over in it after reconnect -- list will quickly be rebuilt anyhow if there // is any conversation whatsoever going on while (fRecentNicks.CountItems() > 0) - delete fRecentNicks.RemoveItemAt(0L); + delete fRecentNicks.RemoveItemAt((int32)0); } break; @@ -1230,8 +1230,8 @@ } break; -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "StatusBar" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "StatusBar" case M_STATUS_ADDITEMS: { Modified: trunk/Vision/src/ChannelOptions.cpp =================================================================== --- trunk/Vision/src/ChannelOptions.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ChannelOptions.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -29,8 +29,8 @@ #include <stdio.h> -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ChannelOptions" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ChannelOptions" ChannelOptions::ChannelOptions (const char *chan_name_, ChannelAgent *parent_) : BWindow ( Modified: trunk/Vision/src/ClientAgent.cpp =================================================================== --- trunk/Vision/src/ClientAgent.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ClientAgent.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -115,7 +115,7 @@ BView::AttachedToWindow(); fActiveTheme->WriteLock(); fActiveTheme->AddView (this); - fActiveTheme->WriteUnlock(); + fActiveTheme->WriteUnlock(); } void @@ -124,7 +124,7 @@ BView::DetachedFromWindow (); fActiveTheme->WriteLock(); fActiveTheme->RemoveView (this); - fActiveTheme->WriteUnlock(); + fActiveTheme->WriteUnlock(); } void @@ -161,9 +161,9 @@ statusMsg.AddInt32 ("status", WIN_NORMAL_BIT); statusMsg.AddBool ("hidden", false); Window()->PostMessage (&statusMsg); - + const BRect *agentRect (dynamic_cast<ClientWindow *>(Window())->AgentRect()); - + if (*agentRect != Frame()) { ResizeTo (agentRect->Width(), agentRect->Height()); @@ -190,7 +190,7 @@ "Input", 0, 0, 0, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM); - + fInput->SetDivider (0); fInput->ResizeToPreferred(); fInput->MoveTo ( @@ -199,26 +199,26 @@ AddChild (fInput); fInput->TextView()->AddFilter (new ClientAgentInputFilter (this)); fInput->Invalidate(); - + fHistory = new HistoryList (); - + BRect textrect ( 2, fFrame.top, fFrame.right - fFrame.left - 1 - B_V_SCROLL_BAR_WIDTH, fFrame.bottom - fInput->Frame().Height() - 8); - + fText = new RunView ( textrect, fId.String(), fActiveTheme, B_FOLLOW_ALL); - + fText->SetClippingName (fId.String()); - + if (vision_app->GetBool ("timestamp")) fText->SetTimeStampFormat (vision_app->GetString ("timestamp_format")); - + fTextScroll = new BScrollView ( "textscroll", fText, @@ -227,7 +227,7 @@ false, true, B_PLAIN_BORDER); - + AddChild (fTextScroll); } @@ -257,8 +257,8 @@ fServerName = name; } -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "EditMenu" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "EditMenu" void ClientAgent::SetEditStates (BMenu *menu, bool targetonly) @@ -309,7 +309,7 @@ BClipboard clipboard("system"); BMessage *clip ((BMessage *)NULL); if (clipboard.Lock()) { - if ((clip = clipboard.Data())) + if ((clip = clipboard.Data())) { if (clip->HasData ("text/plain", B_MIME_TYPE)) menuItem->SetEnabled(true); @@ -326,8 +326,8 @@ } } -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ClientWindow" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ClientWindow" BString ClientAgent::FilterCrap (const char *data, bool force) @@ -349,7 +349,7 @@ outData << "[0x03]{"; ++i; - + // filter foreground for (j = 0; j < 2; j++) if (data[i] >= '0' && data[i] <= '9') @@ -359,7 +359,7 @@ ++i; } else break; - + if (data[i] == ',') { if (ViewCodes) @@ -376,7 +376,7 @@ } --i; - + if (ViewCodes) outData << "}"; } @@ -401,7 +401,7 @@ bool fHistoryAdd) { BString cmd; - + if (fHistoryAdd) cmd = fHistory->Submit (buffer); else @@ -456,18 +456,18 @@ BMessage submitMsg (M_SUBMIT); submitMsg.AddBool ("history", addtofHistory); submitMsg.AddBool ("clear", false); - + for (i = 0; (msg->HasString ("data", i)) && (agentMsgr.IsValid()) && (false == agent->CancelMultilineTextPaste()); ++i) { BString data; msg->FindString ("data", i, &data); - + // add a space so /'s don't get triggered as commands if (!autoexec) data.Prepend (" "); - + if (!submitMsg.HasString ("input")) submitMsg.AddString ("input", data); else @@ -496,13 +496,13 @@ int16 font) { BMessage packed; - + packed.AddString ("msgz", buffer); packed.AddInt16 ("fore", fore); packed.AddInt16 ("back", back); packed.AddInt16 ("font", font); - + if (msg->HasMessage ("packed")) msg->ReplaceMessage ("packed", &packed); else @@ -551,7 +551,7 @@ mircFont (font), i (0); const char *start (NULL); - + while (buffer && *buffer) { start = buffer; @@ -585,7 +585,7 @@ mircFore += (*buffer++ - '0'); } mircFore = (mircFore % 16) + C_MIRC_WHITE; - + if (*buffer == ',') { ++buffer; @@ -681,7 +681,7 @@ logMessage.AddString ("name", fId.String()); fSMsgr.SendMessage(&logMessage); } - + BMessage deathchant (M_CLIENT_SHUTDOWN); deathchant.AddPointer("agent", this); fSMsgr.SendMessage (&deathchant); @@ -704,7 +704,7 @@ } } break; - + case M_THEME_FONT_CHANGE: { int16 which (msg->FindInt16 ("which")); @@ -718,7 +718,7 @@ Invalidate(); } } - break; + break; case M_STATE_CHANGE: { @@ -732,9 +732,9 @@ else fText->SetTimeStampFormat (NULL); } - + bool shouldLog = vision_app->GetBool ("log_enabled"); - + if (fIsLogging != shouldLog) { if ((fIsLogging = shouldLog)) @@ -742,7 +742,7 @@ BMessage logMessage (M_REGISTER_LOGGER); logMessage.AddString ("name", fId.String()); fSMsgr.SendMessage (&logMessage); - } + } else { BMessage logMessage (M_UNREGISTER_LOGGER); @@ -759,7 +759,7 @@ } } break; - + case M_SUBMIT_INPUT: { fCancelMLPaste = false; @@ -773,18 +773,18 @@ msg->FindPointer ("invoker", reinterpret_cast<void **>(&invoker)); delete invoker; } - + switch (which) { case PASTE_CANCEL: break; - + case PASTE_MULTI: case PASTE_MULTI_NODELAY: { BMessage *buffer (new BMessage (*msg)); thread_id tid; - + // if there is some text in the input control already, submit it before // starting the timed paste if (fInput->TextView()->TextLength() != 0) @@ -805,7 +805,7 @@ resume_thread (tid); } break; - + case PASTE_SINGLE: { BString buffer; @@ -816,9 +816,9 @@ buffer += (i ? " " : ""); buffer += data; } - + int32 start, finish; - + if (msg->FindInt32 ("selstart", &start) == B_OK) { msg->FindInt32 ("selend", &finish); @@ -848,7 +848,7 @@ fInput->TextView()->ScrollToSelection(); } break; - + default: break; } @@ -922,17 +922,17 @@ BString tempString; BString nickString; - + if (theMessage[0] == '\1') { - BString aMessage (theMessage); + BString aMessage (theMessage); aMessage.RemoveFirst ("\1ACTION "); aMessage.RemoveLast ("\1"); - + tempString = " "; tempString += aMessage; tempString += "\n"; - + nickString = "* "; nickString += theNick; isAction = true; @@ -952,7 +952,7 @@ FirstKnownAs (tempString, knownAs, &hasNick); tempString.Prepend (nickString); - + int32 dispColor = C_TEXT; if (hasNick) { @@ -960,10 +960,10 @@ dispColor = C_MYNICK; if ((window = Window()) != NULL && !window->IsActive()) system_beep(kSoundEventNames[(uint32)seNickMentioned]); - } + } else if (isAction) dispColor = C_ACTION; - + Display (tempString.String(), dispColor); } break; @@ -976,7 +976,7 @@ if (fMyNick.ICompare (oldNick) == 0) fMyNick = msg->FindString ("newnick"); - + BMessage display; if (msg->FindMessage ("display", &display) == B_NO_ERROR) ClientAgent::MessageReceived (&display); @@ -1014,7 +1014,7 @@ vision_app->LoadURL (lookup.String()); } break; - + case M_LOOKUP_ACRONYM: { BString lookup; @@ -1025,14 +1025,14 @@ vision_app->LoadURL (lookup.String()); } break; - + case B_ESCAPE: fCancelMLPaste = true; break; - -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "DCCStatus" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "DCCStatus" + case M_DCC_COMPLETE: { /// set up /// @@ -1052,16 +1052,16 @@ msg->FindString ("type", &type); msg->FindInt32 ("transferred", &xfersize); msg->FindFloat ("transferRate", &rate); - + BPath pFile (file.String()); fAck << xfersize; - + if (size.ICompare (fAck)) completed = false; - /// send mesage /// + /// send mesage /// if (type == "SEND") { if (completed) @@ -1075,7 +1075,7 @@ completionMsg += B_TRANSLATE("Completed receive of %1 from %2 (%3), %4 KB/sec"); else completionMsg += B_TRANSLATE("Failed receive of %1 from %2 (%3/%4), %5 KB/sec"); - + } completionMsg.ReplaceFirst("%1", pFile.Leaf()); completionMsg.ReplaceFirst("%2", nick); @@ -1100,7 +1100,7 @@ completionMsg.ReplaceFirst("%5", temp.String()); } completionMsg += "\n"; - + Display (completionMsg.String(), C_CTCP_RPY); } break; @@ -1129,7 +1129,7 @@ i, place; BString target; - + if ((place = FirstSingleKnownAs (data, fMyNick)) != B_ERROR) { result = fMyNick; Modified: trunk/Vision/src/ClientAgentInputFilter.cpp =================================================================== --- trunk/Vision/src/ClientAgentInputFilter.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ClientAgentInputFilter.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -1,21 +1,21 @@ /* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999-2010 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -165,8 +165,8 @@ // we have our own pasting code so we can catch multiple lines BClipboard clipboard ("system"); const char *fText; - int32 textLen; - BMessage *clip ((BMessage *)NULL); + ssize_t textLen; + BMessage *clip (NULL); if (clipboard.Lock()) { @@ -213,7 +213,7 @@ filter_result result (B_DISPATCH_MESSAGE); const char *keyStroke; int32 keymodifiers; - + BMessenger msgr (fWindow); WindowList *winList (vision_app->pClientWin()->pWindowList()); @@ -225,7 +225,7 @@ { return result; } - + switch (keyStroke[0]) { ///////////////// @@ -279,26 +279,26 @@ winList->SelectLast(); result = B_SKIP_MESSAGE; break; - + case B_UP_ARROW: case B_LEFT_ARROW: // baxter muscle memory case ',': // bowser muscle memory winList->ContextSelectUp(); result = B_SKIP_MESSAGE; break; - + case B_DOWN_ARROW: // case B_RIGHT_ARROW: // baxter muscle memory case '.': // bowser muscle memory winList->ContextSelectDown(); result = B_SKIP_MESSAGE; break; - + case 'U': winList->MoveCurrentUp(); result = B_SKIP_MESSAGE; break; - + case 'D': winList->MoveCurrentDown(); result = B_SKIP_MESSAGE; @@ -335,7 +335,7 @@ result = B_SKIP_MESSAGE; } break; - + case B_LEFT_ARROW: // collapse current server (if expanded) { winList->CollapseCurrentServer(); @@ -349,7 +349,7 @@ result = B_SKIP_MESSAGE; } break; - + case '/': // bowser muscle memory // move to the agents parent ServerAgent // XXX move to WindowList ? Modified: trunk/Vision/src/ClientAgentLogger.cpp =================================================================== --- trunk/Vision/src/ClientAgentLogger.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ClientAgentLogger.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -282,8 +282,8 @@ if (!myLogBuffer->IsEmpty()) { // grab next string from list and write to file - currentLogger = myLogBuffer->RemoveItemAt (0L); - currentString = myLogBuffer->RemoveItemAt (0L); + currentLogger = myLogBuffer->RemoveItemAt ((int32)0); + currentString = myLogBuffer->RemoveItemAt ((int32)0); myLogBufferLock->Unlock(); myLogFile = &logger->fLogFiles[*currentLogger]; if (myLogFile->InitCheck() != B_NO_INIT) @@ -297,8 +297,8 @@ // on shutdown empty out all remaining data (if any) and write to file while (!myLogBuffer->IsEmpty()) { - currentLogger = (BString *)(myLogBuffer->RemoveItemAt (0L)); - currentString = (BString *)(myLogBuffer->RemoveItemAt (0L)); + currentLogger = (BString *)(myLogBuffer->RemoveItemAt ((int32)0)); + currentString = (BString *)(myLogBuffer->RemoveItemAt ((int32)0)); myLogFile = &logger->fLogFiles[*currentLogger]; if (myLogFile->InitCheck() != B_NO_INIT) myLogFile->Write (currentString->String(), currentString->Length()); Modified: trunk/Vision/src/ClientWindow.cpp =================================================================== --- trunk/Vision/src/ClientWindow.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ClientWindow.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -62,8 +62,8 @@ <Brazilian> I have a monkey who draws on my wall really fast */ -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ClientWindow" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ClientWindow" static const char *skTermSig = "application/x-vnd.Haiku-Terminal"; @@ -648,16 +648,16 @@ // Edit menu fEdit = new DynamicEditMenu (); -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "EditMenu" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "EditMenu" fEdit->AddItem (item = new BMenuItem (B_TRANSLATE("Cut"), new BMessage (B_CUT), 'X')); fEdit->AddItem (item = new BMenuItem (B_TRANSLATE("Copy"), new BMessage (B_COPY), 'C')); fEdit->AddItem (item = new BMenuItem (B_TRANSLATE("Paste"), new BMessage (B_PASTE), 'V')); fEdit->AddItem (item = new BMenuItem (B_TRANSLATE("Select All"), new BMessage (B_SELECT_ALL), 'A', B_OPTION_KEY)); fMenuBar->AddItem (fEdit); -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "WindowMenu" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "WindowMenu" // Window menu fWindow = new BMenu (B_TRANSLATE("Window")); Modified: trunk/Vision/src/ClientWindowDock.cpp =================================================================== --- trunk/Vision/src/ClientWindowDock.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ClientWindowDock.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -39,8 +39,8 @@ return 8 + ceilf(be_plain_font->Size()); } -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "Window List" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "Window List" ////////////////////////////////////////////////////////////////////////////// /// Begin AgentDock functions Modified: trunk/Vision/src/ColorSelector.cpp =================================================================== --- trunk/Vision/src/ColorSelector.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ColorSelector.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -46,7 +46,7 @@ fColor = color; fInitialColor = initial_color; } - + void ResetColors(rgb_color col, rgb_color initial) { if (!CompareColors(fColor, col) || !CompareColors (fInitialColor, initial)) { @@ -56,7 +56,7 @@ if (parent) parent->Invalidate(Frame()); } } - + void SetColor(rgb_color col) { if (!CompareColors (fColor, col)) { @@ -65,23 +65,23 @@ if (parent) parent->Invalidate(Frame()); } } - + rgb_color Color() const { return fColor; } - + rgb_color InitialColor() const { return fInitialColor; } - + virtual void DrawContent() { BRect b = Frame(); BMenu *parent = Menu(); BPoint loc = parent->PenLocation(); - + enum { W_CHAR = 0, A_CHAR = 1, @@ -97,18 +97,18 @@ for (int32 i=0; i<NUM_CHARS; i++) { escapements[i] *= font.Size(); } - + const float blockWidth = escapements[W_CHAR]+escapements[A_CHAR]; - + const rgb_color old_col = parent->HighColor(); font_height fh; - + const bool showInitial = !CompareColors(fInitialColor, fColor); - + b.InsetBy(1, 1); b.bottom -= 1; b.left = loc.x; - + if (showInitial) { parent->GetFontHeight(&fh); parent->DrawString("(", BPoint(b.left, loc.y+fh.ascent)); @@ -130,27 +130,27 @@ parent->DrawString(")", BPoint(b.right+1, loc.y+fh.ascent)); } b.right += escapements[CLOSE_CHAR] + 1; - + b.left = b.right + escapements[SPACE_CHAR]; b.right = b.left + blockWidth; - + parent->SetHighColor(fColor); parent->FillRect(b); parent->SetHighColor(old_col); b.InsetBy(-1, -1); parent->StrokeRect(b); - + parent->MovePenTo(b.right + escapements[SPACE_CHAR]*2 + 2, loc.y); - + BMenuItem::DrawContent(); } - + virtual void GetContentSize(float *w, float *h) { BMenuItem::GetContentSize(w, h); *w += Menu()->StringWidth("(W) WA ")+4 + 2; } - + private: rgb_color fColor, fInitialColor; }; @@ -187,9 +187,9 @@ break; } } - + if (found) continue; - + // This color doesn't currently exist; add it in. BMessage* msg = new BMessage(CMD_CHOOSE_UI_COLOR); msg->AddString("field", name); @@ -203,7 +203,7 @@ break; } rgb_color *init_col; - if (!initial || initial->FindData ("color", B_RGB_COLOR_TYPE, j, + if (!initial || initial->FindData ("color", B_RGB_COLOR_TYPE, j, (const void **)&init_col, &size) != B_OK) *init_col = *col; @@ -226,7 +226,7 @@ fNames(names), fInitColors(colors), fColors(colors), fSizeValid(false) { const BRect dummyRect(-100, -100, -10, -10); - + fColorMenu = new BPopUpMenu("Colors"); populate_colors(fColorMenu, fColors, fNames, &fInitColors); fColorField = new BMenuField(dummyRect, "Color", "Color: ", fColorMenu, @@ -234,7 +234,7 @@ B_WILL_DRAW|B_FRAME_EVENTS|B_NAVIGABLE); AddChild(fColorField); fColorField->SetFont(be_bold_font); - + fColorPalette = new BColorControl(dummyRect.LeftTop(), B_CELLS_32x8, 8, "Palette", new BMessage(CMD_SET_UI_COLOR), true); @@ -243,7 +243,7 @@ fColorPalette->SetDoubleBuffering (B_UPDATE_INVALIDATED | B_UPDATE_RESIZED | B_UPDATE_EXPOSED); #else rgb_color *color (NULL); - int32 size (0); + ssize_t size (0); fColors.FindData ("color", B_RGB_COLOR_TYPE, 0, (const void **)(&color), &size); swatch = new ColorSwatch (dummyRect, "swatch", *color); AddChild (swatch); @@ -274,7 +274,7 @@ void ColorSelector::AttachedToWindow() { BControl::AttachedToWindow(); - + BMessenger me(this); fColorPalette->SetTarget(me); fColorMenu->SetTargetForItems(me); @@ -301,7 +301,7 @@ fColorField->SetDivider(fColorField->StringWidth(fColorField->Label()) + 5); fColorField->GetPreferredSize(&mw, &mh); fColorPalette->GetPreferredSize(&cw, &ch); - + if (really) { BRect b(Bounds()); if (Window()) Window()->BeginViewTransaction(); @@ -319,7 +319,7 @@ if (Window()) Window()->EndViewTransaction(); } -#if B_BEOS_VERSION_DANO +#if B_BEOS_VERSION_DANO fPrefWidth = (mw > cw ? mw : cw); #else fPrefWidth = (mw > cw ? mw : cw) + 5 + swatch->Bounds().Width(); @@ -332,7 +332,7 @@ { if (msg->WasDropped()) { rgb_color *color; - int32 size; + ssize_t size; if (msg->FindData ("RGBColor", B_RGB_COLOR_TYPE, (const void **)&color, &size) == B_OK) { if (fColorPalette) { @@ -347,12 +347,12 @@ } return; } - + switch (msg->what) { case CMD_CHOOSE_UI_COLOR: { const char* field; int32 index (0); - int32 size; + ssize_t size; if (msg->FindString("field", &field) == B_OK) { msg->FindInt32 ("index", &index); fCurrentField = field; @@ -366,7 +366,7 @@ } } } break; - + case CMD_SET_UI_COLOR: { if (Message()) { BMessage upd(*Message()); @@ -390,7 +390,7 @@ Invoke(&upd); } } break; - + default: BControl::MessageReceived(msg); break; @@ -439,17 +439,17 @@ fInitColors.MakeEmpty(); ExtractColors(&fInitColors, colors); fColors = fInitColors; - + fColorMenu->RemoveItems(0, fColorMenu->CountItems(), true); populate_colors(fColorMenu, fColors, fNames, &fInitColors); - + if (Window()) ColorSelector::AttachedToWindow(); } void ColorSelector::Update(const BMessage& changes) { int32 index (0); - int32 size (0); + ssize_t size (0); rgb_color *color; changes.FindInt32 ("index", &index); changes.FindData ("color", B_RGB_COLOR_TYPE, (const void **)(&color), &size); @@ -461,7 +461,7 @@ BMessage *curMsg (item->Message()); curMsg->FindInt32 ("index", &index); } - + if (fColors.FindData ("color", B_RGB_COLOR_TYPE, index, (const void **)(&color), &size) == B_OK) { fColorPalette->SetValue(*color); @@ -477,7 +477,7 @@ BMessage OriginalColors = fInitColors; SetTo (OriginalColors); rgb_color *color; - int32 size (0); + ssize_t size (0); for (int32 i = 0; i < MAX_COLORS; i++) if (fInitColors.FindData ("color", B_RGB_COLOR_TYPE, i, (const void **)(&color), &size) == B_OK) Modified: trunk/Vision/src/ColorSwatch.cpp =================================================================== --- trunk/Vision/src/ColorSwatch.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ColorSwatch.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999-2010 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent */ @@ -77,7 +77,7 @@ PushState(); SetDrawingMode (B_OP_COPY); - + rgb_color high (HighColor()); BRect colorPad (Bounds()); SetHighColor (ValueAsColor()); @@ -102,7 +102,7 @@ colorPad.RightTop() + BPoint (0, 1), colorPad.RightBottom(), dark); - + AddLine ( colorPad.RightBottom(), colorPad.LeftBottom() + BPoint (1, 0), @@ -136,7 +136,7 @@ ViewColor()); } - AddLine ( + AddLine ( colorPad.LeftTop(), colorPad.RightTop() + hless, dark); @@ -150,7 +150,7 @@ colorPad.RightTop() + vmore, colorPad.RightBottom(), light); - + AddLine ( colorPad.RightBottom(), colorPad.LeftBottom() + hmore, @@ -203,5 +203,5 @@ baseColor.blue = 255 - value.blue; baseColor.alpha = value.alpha; - return fColor; + return baseColor; } Modified: trunk/Vision/src/DCCConnect.cpp =================================================================== --- trunk/Vision/src/DCCConnect.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/DCCConnect.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -41,8 +41,8 @@ #include "PlayButton.h" #include "Vision.h" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "DCCMessages" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "DCCMessages" static const uint32 M_SEND_NEXT_BLOCK = 'msnb'; @@ -350,7 +350,7 @@ const char *sz, const BMessenger &c) : DCCConnect (n, fn, sz, "", "", c), - fPos (0LL) + fPos ((int32)0L) { int32 dccPort (atoi (vision_app->GetString ("dccMinPort"))); int32 diff (atoi (vision_app->GetString ("dccMaxPort")) - dccPort); Modified: trunk/Vision/src/DCCHandler.cpp =================================================================== --- trunk/Vision/src/DCCHandler.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/DCCHandler.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -40,8 +40,8 @@ #include "Vision.h" #include "VTextControl.h" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "DCCMessages" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "DCCMessages" class DCCFileFilter : public BMessageFilter { Modified: trunk/Vision/src/ListAgent.cpp =================================================================== --- trunk/Vision/src/ListAgent.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ListAgent.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -78,8 +78,8 @@ { frame = Bounds(); -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ChannelListMenu" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ChannelListMenu" listMenu = new BMenu (B_TRANSLATE("Channels")); @@ -99,8 +99,8 @@ mFindAgain->SetEnabled (false); mFilter->SetEnabled (false); -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ChannelListWindow" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ChannelListWindow" BView *bgView (new BView ( frame, @@ -159,7 +159,7 @@ } while (hiddenItems.CountItems() > 0) - delete hiddenItems.RemoveItemAt (0L); + delete hiddenItems.RemoveItemAt ((int32)0); delete fSMsgr; delete fAgentWinItem; @@ -207,7 +207,7 @@ // make sure you call this from a locked looper BRow *row (NULL); Window()->DisableUpdates(); - while ((row = fBuildList.RemoveItemAt (0L)) != NULL) + while ((row = fBuildList.RemoveItemAt ((int32)0)) != NULL) listView->AddRow (row); Window()->EnableUpdates(); @@ -272,8 +272,8 @@ case M_STATUS_ADDITEMS: { -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ChannelListStatusBarItems" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ChannelListStatusBarItems" BString statusLabel = B_TRANSLATE("Count"); statusLabel += ": "; vision_app->pClientWin()->pStatusView()->AddItem (new StatusItem (statusLabel.String(), ""), true); @@ -411,7 +411,7 @@ while (hiddenItems.CountItems() != 0) { - currentRow = hiddenItems.RemoveItemAt (0L); + currentRow = hiddenItems.RemoveItemAt ((int32)0); listView->AddRow (currentRow); } Modified: trunk/Vision/src/MessageAgent.cpp =================================================================== --- trunk/Vision/src/MessageAgent.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/MessageAgent.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -52,8 +52,8 @@ #include <infopopper/InfoPopper.h> #endif -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "DCCMessages" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "DCCMessages" MessageAgent::MessageAgent ( BRect &frame_, Modified: trunk/Vision/src/NamesView.cpp =================================================================== --- trunk/Vision/src/NamesView.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/NamesView.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999-2010 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair @@ -59,15 +59,15 @@ delete fMyPopUp; } -void -NamesView::KeyDown (const char * bytes, int32 numBytes) +void +NamesView::KeyDown (const char * bytes, int32 numBytes) { - BMessage inputMsg (M_INPUT_FOCUS); - BString buffer; + BMessage inputMsg (M_INPUT_FOCUS); + BString buffer; - buffer.Append (bytes, numBytes); - inputMsg.AddString ("text", buffer.String()); - + buffer.Append (bytes, numBytes); + inputMsg.AddString ("text", buffer.String()); + reinterpret_cast<ChannelAgent *>(Parent()->Parent())->fMsgr.SendMessage (&inputMsg); } @@ -81,7 +81,7 @@ myMessage = new BMessage (M_OPEN_MSGAGENT); fMyPopUp->AddItem(new BMenuItem("Query", myMessage)); - + myMessage = new BMessage (M_NAMES_POPUP_NOTIFY); fMyPopUp->AddItem(new BMenuItem("Add To Notify", myMessage)); @@ -150,7 +150,7 @@ fMyPopUp->SetTargetForItems (this); fCTCPPopUp->SetTargetForItems (this); - + fActiveTheme->WriteLock(); fActiveTheme->AddView (this); fActiveTheme->WriteUnlock(); @@ -170,13 +170,13 @@ { int32 selected (IndexOf (myPoint)); bool handled (false); - + if (selected < 0) { DeselectAll(); return; } - + BMessage *inputMsg (Window()->CurrentMessage()); int32 mousebuttons (0), keymodifiers (0), @@ -195,7 +195,7 @@ && (keymodifiers & B_CONTROL_KEY) == 0) { // user double clicked - + BListItem *item (ItemAt (IndexOf(myPoint))); if (item && !item->IsSelected()) { @@ -214,10 +214,10 @@ msg.AddString ("nick", theNick.String()); reinterpret_cast<ChannelAgent *>(Parent()->Parent())->fMsgr.SendMessage (&msg); } - + handled = true; } - + if (mouseclicks == 1 && CurrentSelection(1) <= 0 && mousebuttons == B_PRIMARY_MOUSE_BUTTON @@ -230,12 +230,12 @@ BListItem *item (ItemAt (IndexOf(myPoint))); if (item && !item->IsSelected()) Select (IndexOf (myPoint), false); - + fTracking = true; fCurrentindex = IndexOf (myPoint); handled = true; } - + if (mouseclicks >= 1 && CurrentSelection(1) >= 0 && mousebuttons == B_PRIMARY_MOUSE_BUTTON @@ -248,7 +248,7 @@ BListItem *item (ItemAt (IndexOf(myPoint))); if (item) Select (IndexOf (myPoint), false); - + fTracking = true; fCurrentindex = IndexOf (myPoint); handled = true; @@ -275,7 +275,7 @@ if (mousebuttons == B_TERTIARY_MOUSE_BUTTON) BListView::MouseDown (myPoint); - fLastSelected = selected; + fLastSelected = selected; if (!handled) BListView::MouseDown (myPoint); } @@ -285,7 +285,7 @@ { if (fTracking) fTracking = false; - + BListView::MouseUp (myPoint); } @@ -338,7 +338,7 @@ } else if (fCurrentindex > current) { - // backtrack up + // backtrack up DeselectExcept (first, current); } else if (fCurrentindex < current) @@ -359,7 +359,7 @@ NamesView::ClearList (void) { while (CountItems() > 0) - delete RemoveItem (0L); + delete RemoveItem ((int32)0); } void @@ -379,14 +379,14 @@ refresh = true; fActiveTheme->ReadUnlock(); break; - + case C_OP: case C_VOICE: case C_HELPER: case C_NAMES_SELECTION: refresh = true; break; - + default: break; } @@ -394,7 +394,7 @@ Invalidate(); } break; - + case M_THEME_FONT_CHANGE: { int16 which (msg->FindInt16 ("which")); @@ -410,7 +410,7 @@ } } break; - + case B_SIMPLE_DATA: { if (msg->HasRef("refs")) @@ -437,7 +437,7 @@ } } break; - + default: { BListView::MessageReceived (msg); Modified: trunk/Vision/src/NetPrefsServerView.cpp =================================================================== --- trunk/Vision/src/NetPrefsServerView.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/NetPrefsServerView.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -17,8 +17,8 @@ #include "ColumnTypes.h" #include "Vision.h" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ServerListView" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ServerListView" const rgb_color serverItemNormalColor = {0, 0, 0, 255}; const rgb_color serverItemDefaultColor = {0, 127, 0, 255}; @@ -273,7 +273,8 @@ { BStringField *field ((BStringField *) row->GetField (1)); - int32 count, size; + int32 count; + ssize_t size; type_code type; fActiveNetwork->GetInfo ("server", &type, &count); @@ -300,7 +301,8 @@ if (newServer == NULL) return; type_code type; - int32 count, size; + int32 count; + ssize_t size; fActiveNetwork->GetInfo ("server", &type, &count); const ServerData *data (NULL); for (int32 i = 0; i < count; i++) @@ -322,7 +324,7 @@ BLooper *looper (Looper()); if (looper == NULL) return; - + BAutolock lock (Looper ()); if (!lock.IsLocked ()) return; @@ -338,7 +340,8 @@ netString.ReplaceFirst("%1", msg->FindString("name")); netString += ":"; type_code type; - int32 count, size; + int32 count; + ssize_t size; const ServerData *data; msg->GetInfo ("server", &type, &count); for (int32 i = 0; i < count; i++) @@ -395,7 +398,8 @@ BRow *row (fServerList->CurrentSelection ()); if (!row) break; - int32 count (0), size (0); + int32 count (0); + ssize_t size (0); type_code type; fActiveNetwork->GetInfo ("server", &type, &count); const ServerData *compData; @@ -424,7 +428,7 @@ case M_SERVER_RECV_DATA: { const ServerData *data; - int32 size; + ssize_t size; Window ()->DisableUpdates (); msg->FindData ("server", B_RAW_TYPE, reinterpret_cast < const void **>(&data), &size); if (msg->HasBool ("edit")) Modified: trunk/Vision/src/NetworkManager.cpp =================================================================== --- trunk/Vision/src/NetworkManager.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/NetworkManager.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -1,28 +1,28 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999-2010 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Wade Majors <wa...@ez...> * Rene Gollent * Todd Lair * Andrew Bazan */ - + #include "NetworkManager.h" #include "VisionMessages.h" #include "Vision.h" @@ -42,7 +42,7 @@ { fPollFDs[i].fd = -1; } - + fPollThread = spawn_thread(Overlord, "Overlord", B_LOW_PRIORITY, this); if (fPollThread >= B_OK) { @@ -50,7 +50,7 @@ } else { - printf("Thread error: %ld\n", fPollThread); + printf("Thread error: %" B_PRId32 "\n", fPollThread); } } @@ -71,7 +71,7 @@ _HandleDisconnect(fSockets.begin()->first, index); } _SocketUnlock(); - + return true; } @@ -85,13 +85,13 @@ _HandleConnect(message); } break; - + case M_CREATE_LISTENER: { _HandleBind(message); } break; - + case M_DESTROY_CONNECTION: { int32 sock = -1; @@ -105,14 +105,14 @@ } } break; - - + + case M_SEND_CONNECTION_DATA: { _HandleSend(message); } break; - + default: BLooper::MessageReceived(message); break; @@ -121,7 +121,7 @@ int32 NetworkManager::Overlord(void *data) -{ +{ NetworkManager *manager = reinterpret_cast<NetworkManager *>(data); while (!manager->fShuttingDown) { @@ -147,10 +147,10 @@ manager->_HandleReceive(manager->fPollFDs[i].fd, i); } } - else if (manager->fPollFDs[i].revents & + else if (manager->fPollFDs[i].revents & (POLLERR | POLLHUP | POLLNVAL)) { - manager->_HandleDisconnect(manager->fPollFDs[i].fd, i); + manager->_HandleDisconnect(manager->fPollFDs[i].fd, i); } else if (manager->fPollFDs[i].revents != 0) { @@ -171,9 +171,9 @@ BMessenger target; message->FindMessenger("target", &target); - + BMessenger msgr(network_manager); - + bigtime_t timeout = 0; if (message->FindInt64("timeout", &timeout) == B_OK && timeout > 0) { @@ -227,7 +227,7 @@ } freeaddrinfo(info); } - + reply.AddInt32("status", result); if (result == 0 && sock >= 0) { @@ -254,10 +254,10 @@ reply.AddInt32("status", B_BAD_DATA); } target.SendMessage(&reply); - + delete message; - - return B_OK; + + return B_OK; } void @@ -265,8 +265,8 @@ { int32 sock = -1; const void *sendBuffer = NULL; - int32 size = -1; - if (data->FindInt32("connection", &sock) == B_OK + ssize_t size = -1; + if (data->FindInt32("connection", &sock) == B_OK && data->FindData("data", B_RAW_TYPE, &sendBuffer, &size) == B_OK) { int result = send(sock, sendBuffer, size, 0); @@ -299,7 +299,7 @@ BMessage msg(M_CONNECTION_DATA_RECEIVED); msg.AddInt32("connection", sock); msg.AddData("data", B_RAW_TYPE, recvbuffer, result); - + it->second.SendMessage(&msg); } @@ -322,10 +322,10 @@ char ipbuf[100]; memset(namebuf, 0, sizeof(namebuf)); memset(ipbuf, 0, sizeof(ipbuf)); - getnameinfo((sockaddr *)&data, datasize, namebuf, sizeof(namebuf), + getnameinfo((sockaddr *)&data, datasize, namebuf, sizeof(namebuf), NULL, 0, 0); - getnameinfo((sockaddr *)&data, datasize, ipbuf, sizeof(ipbuf), - NULL, 0, NI_NUMERICHOST); + getnameinfo((sockaddr *)&data, datasize, ipbuf, sizeof(ipbuf), + NULL, 0, NI_NUMERICHOST); _SocketLock(); int32 index = fSockets.size(); fSockets[client] = it->second; @@ -340,7 +340,7 @@ { msg.AddString("name", namebuf); } - it->second.SendMessage(&msg); + it->second.SendMessage(&msg); } } @@ -348,12 +348,12 @@ NetworkManager::_HandleBind(const BMessage *message) { BMessenger target; - + if (message->FindMessenger("target", &target) != B_OK) { return; } - + BMessage reply(M_LISTENER_CREATED); BString interface, port; if (message->FindString("port", &port) != B_OK) @@ -368,9 +368,9 @@ memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; hints.ai_socktype = SOCK_STREAM; - + int32 sock = -1; - + int result = getaddrinfo(NULL, port.String(), &hints, &info); if (result == 0) { @@ -384,7 +384,7 @@ } int opt = 1; setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); - + result = bind(sock, current->ai_addr, current->ai_addrlen); if (result < 0) { @@ -415,9 +415,9 @@ fPollFDs[index].events = POLLIN | POLLERR; fListeners.insert(sock); _SocketUnlock(); - reply.AddInt32("connection", sock); + reply.AddInt32("connection", sock); } - + target.SendMessage(&reply); } @@ -425,17 +425,17 @@ NetworkManager::_HandleConnect(const BMessage *message) { BMessenger target; - + if (message->FindMessenger("target", &target) != B_OK) { return; } - + BString threadName; vision_app->GetThreadName(THREAD_S, threadName); - thread_id connector = spawn_thread(ConnectionHandler, threadName.String(), + thread_id connector = spawn_thread(ConnectionHandler, threadName.String(), B_LOW_PRIORITY, new BMessage(*message)); - + if (connector < B_OK) { BMessage reply(M_CONNECTION_CREATED); @@ -479,7 +479,7 @@ } if (index < fSockets.size() - 1) { - memmove(&fPollFDs[index], &fPollFDs[index + 1], + memmove(&fPollFDs[index], &fPollFDs[index + 1], sizeof(pollfd) * (fSockets.size() - index)); } close(sock); Modified: trunk/Vision/src/NetworkMenu.cpp =================================================================== --- trunk/Vision/src/NetworkMenu.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/NetworkMenu.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999-2010 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Rene Gollent */ @@ -42,7 +42,7 @@ if (CountItems()) { BMenuItem *item (NULL); - while ((item = RemoveItem(0L)) != NULL) + while ((item = RemoveItem((int32)0)) != NULL) delete item; } Modified: trunk/Vision/src/NetworkPrefsView.cpp =================================================================== --- trunk/Vision/src/NetworkPrefsView.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/NetworkPrefsView.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999-2010 The Vision Team. All Rights * Reserved. - * + * * Contributor(s): Rene Gollent * Alan Ellis */ @@ -45,8 +45,8 @@ #include "SpeedButton.h" #include "Vision.h" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "NetworkPrefView" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "NetworkPrefView" class InvokingTextView : public BTextView, public BInvoker @@ -318,11 +318,11 @@ fTextView->SetText (autoexec); else fTextView->SetText (""); - + uint32 altCount(0); - int32 size; + ssize_t size; const ServerData *data (NULL); - for (int32 i = 0; msg.FindData("server", B_ANY_TYPE, i, + for (int32 i = 0; msg.FindData("server", B_ANY_TYPE, i, reinterpret_cast<const void **>(&data), &size) == B_OK; i++) { if (data->state == 0) @@ -342,7 +342,7 @@ int32 count (fListView->CountItems ()), i (0); for (i = 0; i < count; i++) - delete (fListView->RemoveItem (0L)); + delete (fListView->RemoveItem ((int32)0)); if ((msg.HasBool ("useDefaults") && msg.FindBool ("useDefaults"))) { @@ -614,7 +614,7 @@ fActiveNetwork.AddBool ("lagCheck", value); } break; - + case M_CONNECT_ON_STARTUP: { bool value = msg->FindInt32 ("be:value"); Modified: trunk/Vision/src/NetworkWindow.cpp =================================================================== --- trunk/Vision/src/NetworkWindow.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/NetworkWindow.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -31,8 +31,8 @@ #include <stdio.h> -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "NetworkSetupWindow" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "NetworkSetupWindow" NetworkWindow::NetworkWindow (void) : BWindow ( Modified: trunk/Vision/src/NotifyList.cpp =================================================================== --- trunk/Vision/src/NotifyList.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/NotifyList.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -1,16 +1,16 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is Vision. + * * The Initial Developer of the Original Code is The Vision Team. * Portions created by The Vision Team are * Copyright (C) 1999-2010 The Vision Team. All Rights @@ -33,8 +33,8 @@ #include "Vision.h" #include "WindowList.h" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "NotifyList" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "NotifyList" NotifyList::NotifyList (BRect _frame) : BListView (_frame, @@ -53,11 +53,11 @@ SetViewColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_BACKGROUND)); fActiveTheme->ReadUnlock(); } - + NotifyList::~NotifyList (void) { while (CountItems() > 0) - delete RemoveItem (0L); + delete RemoveItem((int32)0); delete fMyPopUp; } @@ -65,7 +65,7 @@ NotifyList::UpdateList(BObjectList<NotifyListItem> *newList) { while (CountItems() > 0) - delete RemoveItem (0L); + delete RemoveItem ((int32)0); BList updateList; // make private copy of list items otherwise things go bad for (int32 i = 0; i < newList->CountItems(); i++) @@ -97,18 +97,18 @@ BMessage *inputMsg (Window()->CurrentMessage()); int32 mousebuttons (0), keymodifiers (0); - + NotifyListItem *item ((NotifyListItem *)ItemAt(selected)); if (!item) return; - + inputMsg->FindInt32 ("buttons", &mousebuttons); inputMsg->FindInt32 ("modifiers", &keymodifiers); - + bigtime_t sysTime; msg->FindInt64 ("when", &sysTime); uint16 clicks = CheckClickCount (myPoint, fLastClick, sysTime, fLastClickTime, fClickCount) % 3; - + // slight kludge to make sure the expand/collapse triangles behave how they should // -- needed since OutlineListView's Expand/Collapse-related functions are not virtual if (mousebuttons == B_PRIMARY_MOUSE_BUTTON) @@ -136,7 +136,7 @@ else Select (selected); } - + if ((keymodifiers & B_SHIFT_KEY) == 0 && (keymodifiers & B_OPTION_KEY) == 0 && (keymodifiers & B_COMMAND_KEY) == 0 @@ -173,7 +173,7 @@ int index (CurrentSelection()); if (index < 0) return; - + NotifyListItem *item (dynamic_cast<NotifyListItem *>(ItemAt(index))); if (item) { @@ -227,7 +227,7 @@ cWin->DispatchMessage (msg, cWin->pCwDock()); break; } - + case M_THEME_FOREGROUND_CHANGE: { int16 which (msg->FindInt16 ("which")); @@ -240,7 +240,7 @@ fActiveTheme->ReadUnlock(); refresh = true; break; - + case C_NOTIFY_ON: case C_NOTIFY_OFF: case C_NOTIFYLIST_SELECTION: @@ -264,7 +264,7 @@ } } break; - + default: BListView::MessageReceived (msg); } @@ -305,13 +305,13 @@ NotifyListItem::DrawItem (BView *father, BRect frame, bool complete) { Theme *fActiveTheme (vision_app->ActiveTheme()); - + fActiveTheme->ReadLock(); if (IsSelected()) { father->SetHighColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_SELECTION)); - father->SetLowColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_BACKGROUND)); + father->SetLowColor (fActiveTheme->ForegroundAt (C_NOTIFYLIST_BACKGROUND)); father->FillRect (frame); } else if (complete) @@ -332,7 +332,7 @@ BString drawString (Text()); fActiveTheme->ReadUnlock(); - + father->SetHighColor (color); father->SetDrawingMode (B_OP_OVER); Modified: trunk/Vision/src/ParseCTCP.cpp =================================================================== --- trunk/Vision/src/ParseCTCP.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ParseCTCP.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -32,8 +32,8 @@ #include "Utilities.h" #include "ServerAgent.h" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "ServerMessages" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ServerMessages" void ServerAgent::ParseCTCP (BString theNick, BString theTarget, BString theMsg) @@ -214,7 +214,7 @@ poss (GetWord (theMsg.String(), 5)); poss.RemoveLast("\1"); - off_t pos (0LL); + off_t pos ((int32)0L); int32 i (0); for (i = 0; i < poss.Length(); ++i) pos = pos * 10 + poss[i] - '0'; @@ -251,7 +251,7 @@ port (GetWord (theMsg.String(), 4)), poss (GetWord (theMsg.String(), 5)); poss.RemoveLast("\1"); - off_t pos (0LL); + off_t pos ((int32)0L); for (int32 i = 0; i < poss.Length(); ++i) pos = pos * 10 + poss[i] - '0'; Modified: trunk/Vision/src/ParseCmd.cpp =================================================================== --- trunk/Vision/src/ParseCmd.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ParseCmd.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -53,8 +53,8 @@ #include "RunView.h" #include "WindowList.h" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "CommandParser" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "CommandParser" static void DisplayCommandError(ClientAgent *agent, const char *commandName) Modified: trunk/Vision/src/ParseENums.cpp =================================================================== --- trunk/Vision/src/ParseENums.cpp 2011-11-12 03:20:28 UTC (rev 939) +++ trunk/Vision/src/ParseENums.cpp 2012-08-21 22:47:56 UTC (rev 940) @@ -1,21 +1,21 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Vision. - * +/* + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND... [truncated message content] |
From: <ane...@us...> - 2011-11-12 03:20:35
|
Revision: 939 http://vision.svn.sourceforge.net/vision/?rev=939&view=rev Author: anevilyak Date: 2011-11-12 03:20:28 +0000 (Sat, 12 Nov 2011) Log Message: ----------- Fix some gcc4 build issues + update notifications to take into account recent API changes. Modified Paths: -------------- trunk/Vision/Makefile.gcc4 trunk/Vision/src/ChannelAgent.cpp trunk/Vision/src/MessageAgent.cpp trunk/Vision/src/ParseCmd.cpp trunk/Vision/src/ParseENums.cpp trunk/Vision/src/ServerAgent.cpp Modified: trunk/Vision/Makefile.gcc4 =================================================================== --- trunk/Vision/Makefile.gcc4 2011-11-02 16:44:20 UTC (rev 938) +++ trunk/Vision/Makefile.gcc4 2011-11-12 03:20:28 UTC (rev 939) @@ -16,7 +16,7 @@ # the file name, ... BINARY := Vision -VERSION := 0.9.8-20100726 +VERSION := 0.9.8-20111111 BUILDDATE := $(shell date +%b_%d_%Y) BUILD_TYPE := Release Modified: trunk/Vision/src/ChannelAgent.cpp =================================================================== --- trunk/Vision/src/ChannelAgent.cpp 2011-11-02 16:44:20 UTC (rev 938) +++ trunk/Vision/src/ChannelAgent.cpp 2011-11-12 03:20:28 UTC (rev 939) @@ -915,14 +915,14 @@ } BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetApplication(BString("Vision")); + notification.SetGroup(BString("Vision")); entry_ref ref = vision_app->AppRef(); notification.SetOnClickFile(&ref); notification.SetTitle(fServerName.String()); BString content; content << fId << " - " << theNick << " said: " << tempString; notification.SetContent(content); - be_roster->Notify(notification); + notification.Send(); } #endif #ifdef USE_INFOPOPPER Modified: trunk/Vision/src/MessageAgent.cpp =================================================================== --- trunk/Vision/src/MessageAgent.cpp 2011-11-02 16:44:20 UTC (rev 938) +++ trunk/Vision/src/MessageAgent.cpp 2011-11-12 03:20:28 UTC (rev 939) @@ -343,7 +343,7 @@ { #ifdef __HAIKU__ BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetApplication(BString("Vision")); + notification.SetGroup(BString("Vision")); entry_ref ref = vision_app->AppRef(); notification.SetOnClickFile(&ref); notification.SetTitle(fServerName.String()); @@ -358,7 +358,7 @@ content << nick << " said: " << tempString.String(); notification.SetContent(content); - be_roster->Notify(notification); + notification.Send(); #endif #ifdef USE_INFOPOPPER if (be_roster->IsRunning(InfoPopperAppSig) == true) { Modified: trunk/Vision/src/ParseCmd.cpp =================================================================== --- trunk/Vision/src/ParseCmd.cpp 2011-11-02 16:44:20 UTC (rev 938) +++ trunk/Vision/src/ParseCmd.cpp 2011-11-12 03:20:28 UTC (rev 939) @@ -1360,7 +1360,7 @@ if (result == 0) { result = getnameinfo(info->ai_addr, info->ai_addrlen, addr_buf, - sizeof(addr_buf), NULL, NULL, reverse ? NI_NAMEREQD : NI_NUMERICHOST); + sizeof(addr_buf), NULL, 0, reverse ? NI_NAMEREQD : NI_NUMERICHOST); freeaddrinfo(info); } Modified: trunk/Vision/src/ParseENums.cpp =================================================================== --- trunk/Vision/src/ParseENums.cpp 2011-11-02 16:44:20 UTC (rev 938) +++ trunk/Vision/src/ParseENums.cpp 2011-11-12 03:20:28 UTC (rev 939) @@ -407,7 +407,7 @@ { char addr_buf[INET6_ADDRSTRLEN]; getnameinfo(info->ai_addr, info->ai_addrlen, addr_buf, sizeof(addr_buf), - NULL, NULL, NI_NUMERICHOST); + NULL, 0, NI_NUMERICHOST); fLocalip = addr_buf; printf("Got address: %s\n", fLocalip.String()); freeaddrinfo(info); @@ -502,7 +502,7 @@ if (offlined.Length()) { BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetApplication(BString("Vision")); + notification.SetGroup(BString("Vision")); entry_ref ref = vision_app->AppRef(); notification.SetOnClickFile(&ref); notification.SetTitle(fServerName.String()); @@ -515,12 +515,12 @@ notification.SetContent(content); - be_roster->Notify(notification); + notification.Send(); } if (onlined.Length()) { BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetApplication(BString("Vision")); + notification.SetGroup(BString("Vision")); entry_ref ref = vision_app->AppRef(); notification.SetOnClickFile(&ref); notification.SetTitle(fServerName.String()); @@ -533,7 +533,7 @@ notification.SetContent(content); - be_roster->Notify(notification); + notification.Send(); } #endif } Modified: trunk/Vision/src/ServerAgent.cpp =================================================================== --- trunk/Vision/src/ServerAgent.cpp 2011-11-02 16:44:20 UTC (rev 938) +++ trunk/Vision/src/ServerAgent.cpp 2011-11-12 03:20:28 UTC (rev 939) @@ -784,7 +784,7 @@ socklen_t slen = sizeof(storage); getsockname(fConnectionID, (struct sockaddr *)&storage, &slen); char buf[128]; - getnameinfo(reinterpret_cast<sockaddr *>(&storage), slen, buf, sizeof(buf), NULL, NULL, NI_NUMERICHOST); + getnameinfo(reinterpret_cast<sockaddr *>(&storage), slen, buf, sizeof(buf), NULL, 0, NI_NUMERICHOST); fLocalip = buf; fLocalip_private = PrivateIPCheck(buf); if (fLocalip_private && vision_app->GetBool("dccPrivateCheck")) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: J. S. S. <sa...@uj...> - 2011-09-12 10:58:49
|
Call for Participation (apologies for multiple copies) _____________________________________________________ INIT Autumn School on 3D Imaging Technologies Benicàssim, October 3-7, 2011 URL:http://www.init.uji.es/school2011 E-mail:in...@in... DESCRIPTION The INIT International Autumn School 2011 is organized by the Institute of New Imaging Technologies (INIT) of the University Jaume I of Castellón, and co-sponsored by the Spanish Association of Pattern Recognition and Image Analysis (AERFAI) and the Spanish Section of Eurographics. The focus of this year Autumn School is to study the most relevant approaches to 3D Imaging Technologies and discover new challenges and trends for this scientific area. This event is open to any researcher or PhD-student who is interested in learning or refreshing their knowledge about the most successful approaches in the fields of 3D data modelling, processing and visualization, GPU computation, digital holography, auto-stereoscopic displays, human 3D vision, among others. The Autumn School 2011 is organized as a five-days intensive course to be held October 3-7 in Benicàssim (Spain). Leading experts in the field shall present each tutorial, followed by a practice session with demos and/or specific software in order for participants to gain a better understanding of the theory. A non-formal poster session will also be organized for the participants to present their current research and interact with their scientific peers. ORGANIZATION CO-CHAIRS Prof. J. Salvador Sánchez, Local Chair,sa...@uj... Prof. Filiberto Pla, Director of the INIT,pl...@uj... ADVISORY COMMITTEE Prof. J. Joaquín Gual Dr. Miguel Chover Dr. Enrique Tajahuerce Dr. Joaquín Huerta Dr. José M. Martínez-Montiel LIST OF LECTURERS GPU paradigms for rendering and computation Dr. László Szécsi, Budapest University of Technology and Economics (Hungary) Digital holography for 3D imaging Dr. Thomas J. Naughton, National University of Ireland, Maynooth (Ireland) Representations underlying human 3D vision Dr. Andrew Glennerster, University of Reading (UK) Light-field displays. The HoloVizio system Eng. Péter T. Kovács, Holografika, Budapest (Hungary) 3D mapping and localization techniques using computer vision Dr. Walterio Mayol-Cuevas, University of Bristol (UK) 3D geospatial data Prof. Alexander Zipf, University of Heidelberg (Germany) REGISTRATION Fees for the INIT School 2011 are as follows: AERFAI, AGILE, CEA or EUROGRAPHICS, s.e. members - Early registration (by Sept. 14, 2011): Full ... 520 Euros / Single lecture ... 120 Euros AERFAI, AGILE, CEA or EUROGRAPHICS, s.e. members - Late registration (after Sept. 14, 2011): Full ... 570 Euros / Single lecture ... 130 Euros Non-members - Early registration (by Sept. 14, 2011): Full ... 620 Euros / Single lecture ... 140 Euros Non-members - Late registration (after Sept. 14, 2011): Full ... 670 Euros / Single lecture ... 150 Euros Each full registration covers attendance to all lectures, handling material, coffee breaks, lunches and gala dinner. The single lecture registration allows access to the lecture chosen, handling material, coffee break and lunch. Payment should be done by bank transfer (more information at the web site). VENUE INIT School 2011 will be held at Hotel Intur Bonaire in Benicàssim. The hotel is located 150 meters from one of the best fine sandy beaches in Benicàssim at the Mediterranean coast. It is 10 minutes from the city of Castellón and the train station, while the Valencia airport is 45 minutes by car. ACCOMMODATION Participants will have a special group rate at Hotel Intur Bonaire and other hotels very close to the INIT School'2011 venue. More information about reservation is available on the web site. CONTACT INIT School 2011 Dept. Llenguatges i Sistemes Informàtics Universitat Jaume I Av. Vicent Sos Baynat, s/n 12071 Castellón de la Plana (Spain) Tel. +34 964728348 / +34 964728350 / +34 964728359 Fax +34 964728435 E-mail:in...@in... |
From: J. S. S. <sa...@uj...> - 2011-09-08 14:36:57
|
Call for Participation (apologies for multiple copies) _____________________________________________________ INIT Autumn School on 3D Imaging Technologies Benicàssim, October 3-7, 2011 URL:http://www.init.uji.es/school2011 E-mail:in...@in... DESCRIPTION The INIT International Autumn School 2011 is organized by the Institute of New Imaging Technologies (INIT) of the University Jaume I of Castellón, and co-sponsored by the Spanish Association of Pattern Recognition and Image Analysis (AERFAI) and the Spanish Section of Eurographics. The focus of this year Autumn School is to study the most relevant approaches to 3D Imaging Technologies and discover new challenges and trends for this scientific area. This event is open to any researcher or PhD-student who is interested in learning or refreshing their knowledge about the most successful approaches in the fields of 3D data modelling, processing and visualization, GPU computation, digital holography, auto-stereoscopic displays, human 3D vision, among others. The Autumn School 2011 is organized as a five-days intensive course to be held October 3-7 in Benicàssim (Spain). Leading experts in the field shall present each tutorial, followed by a practice session with demos and/or specific software in order for participants to gain a better understanding of the theory. A non-formal poster session will also be organized for the participants to present their current research and interact with their scientific peers. ORGANIZATION CO-CHAIRS Prof. J. Salvador Sánchez, Local Chair,sa...@uj... Prof. Filiberto Pla, Director of the INIT,pl...@uj... ADVISORY COMMITTEE Prof. J. Joaquín Gual Dr. Miguel Chover Dr. Enrique Tajahuerce Dr. Joaquín Huerta Dr. José M. Martínez-Montiel LIST OF LECTURERS GPU paradigms for rendering and computation Dr. László Szécsi, Budapest University of Technology and Economics (Hungary) Digital holography for 3D imaging Dr. Thomas J. Naughton, National University of Ireland, Maynooth (Ireland) Representations underlying human 3D vision Dr. Andrew Glennerster, University of Reading (UK) Light-field displays. The HoloVizio system Eng. Péter T. Kovács, Holografika, Budapest (Hungary) 3D mapping and localization techniques using computer vision Dr. Walterio Mayol-Cuevas, University of Bristol (UK) 3D geospatial data Prof. Alexander Zipf, University of Heidelberg (Germany) REGISTRATION Fees for the INIT School 2011 are as follows: AERFAI, AGILE, CEA or EUROGRAPHICS, s.e. members - Early registration (by Sept. 14, 2011): Full ... 520 Euros / Single lecture ... 120 Euros AERFAI, AGILE, CEA or EUROGRAPHICS, s.e. members - Late registration (after Sept. 14, 2011): Full ... 570 Euros / Single lecture ... 130 Euros Non-members - Early registration (by Sept. 14, 2011): Full ... 620 Euros / Single lecture ... 140 Euros Non-members - Late registration (after Sept. 14, 2011): Full ... 670 Euros / Single lecture ... 150 Euros Each full registration covers attendance to all lectures, handling material, coffee breaks, lunches and gala dinner. The single lecture registration allows access to the lecture chosen, handling material, coffee break and lunch. Payment should be done by bank transfer (more information at the web site). VENUE INIT School 2011 will be held at Hotel Intur Bonaire in Benicàssim. The hotel is located 150 meters from one of the best fine sandy beaches in Benicàssim at the Mediterranean coast. It is 10 minutes from the city of Castellón and the train station, while the Valencia airport is 45 minutes by car. ACCOMMODATION Participants will have a special group rate at Hotel Intur Bonaire and other hotels very close to the INIT School'2011 venue. More information about reservation is available on the web site. CONTACT INIT School 2011 Dept. Llenguatges i Sistemes Informàtics Universitat Jaume I Av. Vicent Sos Baynat, s/n 12071 Castellón de la Plana (Spain) Tel. +34 964728348 / +34 964728350 / +34 964728359 Fax +34 964728435 E-mail:in...@in... |
From: J. S. S. <sa...@uj...> - 2011-07-06 07:57:31
|
Call for Participation (apologies for multiple copies) _____________________________________________________ INIT Autumn School on 3D Imaging Technologies Benicàssim, October 3-7, 2011 URL: http://www.init.uji.es/school2011 E-mail: in...@in... DESCRIPTION The INIT International Autumn School 2011 is organized by the Institute of New Imaging Technologies (INIT) of the University Jaume I of Castellón, and co-sponsored by the Spanish Association of Pattern Recognition and Image Analysis (AERFAI) and the Spanish Section of Eurographics. The focus of this year Autumn School is to study the most relevant approaches to 3D Imaging Technologies and discover new challenges and trends for this scientific area. This event is open to any researcher or PhD-student who is interested in learning or refreshing their knowledge about the most successful approaches in the fields of 3D data modelling, processing and visualization, GPU computation, digital holography, auto-stereoscopic displays, human 3D vision, among others. The Autumn School 2011 is organized as a five-days intensive course to be held October 3-7 in Benicàssim (Spain). Leading experts in the field shall present each tutorial, followed by a practice session with demos and/or specific software in order for participants to gain a better understanding of the theory. A non-formal poster session will also be organized for the participants to present their current research and interact with their scientific peers. ORGANIZATION CO-CHAIRS Prof. J. Salvador Sánchez, Local Chair, sa...@uj... Prof. Filiberto Pla, Director of the INIT, pl...@uj... ADVISORY COMMITTEE Prof. J. Joaquín Gual Dr. Miguel Chover Dr. Enrique Tajahuerce Dr. Joaquín Huerta Dr. José M. Martínez-Montiel LIST OF LECTURERS GPU paradigms for rendering and computation Dr. László Szécsi, Budapest University of Technology and Economics (Hungary) Digital holography for 3D imaging Dr. Thomas J. Naughton, National University of Ireland, Maynooth (Ireland) Representations underlying human 3D vision Dr. Andrew Glennerster, University of Reading (UK) Light-field displays. The HoloVizio system Eng. Péter T. Kovács, Holografika, Budapest (Hungary) 3D mapping and localization techniques using computer vision Dr. Walterio Mayol-Cuevas, University of Bristol (UK) 3D geospatial data Prof. Alexander Zipf, University of Heidelberg (Germany) REGISTRATION Fees for the INIT School 2011 are as follows: AERFAI, CEA or EUROGRAPHICS, s.e. members - Early registration (by Sept. 14, 2011): Full ... 520 Euros / Single lecture ... 120 Euros AERFAI, CEA or EUROGRAPHICS, s.e. members - Late registration (after Sept. 14, 2011): Full ... 570 Euros / Single lecture ... 130 Euros Non-members - Early registration (by Sept. 14, 2011): Full ... 620 Euros / Single lecture ... 140 Euros Non-members - Late registration (after Sept. 14, 2011): Full ... 670 Euros / Single lecture ... 150 Euros Each full registration covers attendance to all lectures, handling material, coffee breaks, lunches and gala dinner. The single lecture registration allows access to the lecture chosen, handling material, coffee break and lunch. Payment should be done by bank transfer (more information at the web site). VENUE INIT School 2011 will be held at Hotel Intur Bonaire in Benicàssim. The hotel is located 150 meters from one of the best fine sandy beaches in Benicàssim at the Mediterranean coast. It is 10 minutes from the city of Castellón and the train station, while the Valencia airport is 45 minutes by car. ACCOMMODATION Participants will have a special group rate at Hotel Intur Bonaire and other hotels very close to the INIT School'2011 venue. More information about reservation is available on the web site. CONTACT INIT School 2011 Dept. Llenguatges i Sistemes Informàtics Universitat Jaume I Av. Vicent Sos Baynat, s/n 12071 Castellón de la Plana (Spain) Tel. +34 964728348 / +34 964728350 / +34 964728359 Fax +34 964728435 E-mail: in...@in... |