Saturday, 2012-01-14

*** tpb has joined #freeorion00:00
*** JohnSGalt has quit IRC01:33
CIA-32FreeOrion: geoffthemedio * r4583 /trunk/FreeOrion/ (3 files in 2 dirs): Slightly tweaked patch by fixIt to add an options screen toggle for showing planet renders on sidepanel.01:34
fixItfor the function DesignWnd::MainPanel::AddPart() how exactly do you want it to intelligently find an open slot? So right now it just loops through all the slots and puts the part in the first open slot that can mount the part type01:42
GeofftheMedioup to you to figure out01:42
GeofftheMediomaybe move a part if doing so would open a slot for the new part?01:42
GeofftheMedioalso: from yesterday: fixit: you might add an options screen ui toggle, defaulting to on, to hide the ERROR sitreps01:43
fixItAh okay so by intelligently you just mean find an open slot faster? I wasn't sure if there was some specific better way to order the parts01:43
fixItAlright I'll put that on the todo list01:44
GeofftheMediono, I mean alter the existing design to make room for a part by moving an already-placed part around01:44
GeofftheMedioeg from an internal to an external slot01:44
GeofftheMedioor the other way01:44
GeofftheMediofor a part that can only go in one or the other01:45
fixItHmm okay thanks I think I just don't know enough about ship design. I'll have to play around with it01:46
fixItfirst01:46
fixItAnd when you say hide the ERROR sitreps do you mean toggle the code that makes an ERROR sitrep not display?01:47
GeofftheMediothere's one or two lines that skips a sitrep if it doesn't validate01:49
GeofftheMedioturn that skipping on or off as appropriate, so that ERROR sitreps will still display if the user wants them01:50
GeofftheMediowhere in this case, user is probably programmer01:50
fixItOkay sounds good. Should that go in the UI tab under Content Descriptions?01:51
GeofftheMedioat the bottom, yeah01:54
*** StrangerDanger has joined #freeorion02:09
*** STalKer-Y has joined #freeorion04:37
*** STalKer-X has quit IRC04:37
CIA-32FreeOrion: geoffthemedio * r4584 /trunk/FreeOrion/ (3 files in 2 dirs): Slightly tweaked patch by fixIt to add an optionsWnd toggle for showing / hiding sitrep messages with errors in them.04:41
*** _Maru_ has joined #freeorion04:42
CIA-32FreeOrion: geoffthemedio * r4585 /trunk/FreeOrion/universe/Condition.cpp: Fix for GCC compile error due to "and" being sort-of a C++ keyword.05:06
*** Digit01 has quit IRC06:17
*** Digit_01 has joined #freeorion06:17
*** Digit01 has joined #freeorion06:34
*** Digit_01 has quit IRC06:35
*** StrangerDanger has quit IRC08:13
*** neoneurone has joined #freeorion09:07
*** neoneurone has quit IRC10:18
*** VargaD has joined #freeorion10:54
*** Digit_01 has joined #freeorion11:40
*** Digit01 has quit IRC11:40
*** neoneurone has joined #freeorion12:21
*** neoneurone has quit IRC12:51
*** Digit_01 has quit IRC13:34
*** VargaD has quit IRC15:40
*** fdfdfd has joined #freeorion16:22
*** Digit01 has joined #freeorion17:49
fixItare file scope functions supposed to be inside of the anonymous namespace?18:27
GeofftheMediousually18:37
fixItHey Geoff so I redid the AddPart patch and broke the logic into functions AddingPartAnySlot() and AddingPartSwapSlots() which both take a parttype and a bool indicating whether to actually set the part. They both also return a bool of a result19:14
fixItAs of now they are apart of DesignWnd::MainPanel() class19:14
fixItSo it would be better though to make them static "file scoped" functions in the anonymous namespace?19:15
fixItI don't really know much about anonymous namespaces and their purpose/design advantages and was hoping you could clue me in on them19:15
GeofftheMedioRename those to something like CanPartBeAddedAnyEmptySlot and CanPartBeAddedWithSwapping19:26
GeofftheMedioAnd have a separate function to do that actual adding19:27
GeofftheMediolike AddPartEmptySlot and AddPartWithSwapping19:27
GeofftheMedioor at least those should be the functions that are publically available19:28
GeofftheMedioif you want to have those functions you wrote as the internal implementation, then put them in the .cpp file and not in the header19:28
GeofftheMedioand stick them in an anonymous namespace, just to avoid any potential name collisions with other functions in other namespaces19:29
*** StrangerDanger has joined #freeorion19:30
GeofftheMedioprobably not an issue for these function names, but a good habit, I gather...19:31
fixItSo are AddPartEmptySlot and AddPartWithSwaping supposed to be static functions but still apart of the DesignWnd::MainPanel() class? And DesignWnd::MainPanel() I guess is already totally internal implementation since its declaration and defintions are both in the cpp.19:52
fixItAs of right now I have the logic broken down into those 2 functions and then the AddPart() and CanBeAddedToHull() use them, addpart with the set_part as true and false when calling from CanBeAddedToHull()19:53
fixItSo by adding something to an anonymous namespace in the .cpp and public, it just makes it publically avaliable only to things implemented in the .cpp?19:54
GeofftheMediono, I think the AddPart functions would be member functions of MainPanel just like the existing AddPart function19:55
GeofftheMedioyes, things in anonymous namespaces in cpp files are only callable from that cpp19:56
fixItOkay. And so the original AddPart() which is hooked up to the signal would use those two new static AddPart() functions to add the part if possible?19:58
fixItWhat would the reasons be for making the original AddPart() not static?19:58
GeofftheMediowhy are you making anything static?  I said the addpart stuff should all be member functions19:58
GeofftheMedioit doesn't make sense to make them static; they're modifying a particular instance of mainpanel19:59
fixItOh alright sorry for some reason I associated file scope with static, so file scope just means in the .cpp then19:59
GeofftheMediofile scope means only visible within that file20:00
GeofftheMedioso not declared in a header file, just declared / defined in the cpp20:00
fixItOkay. So isn't everything already file scope then? Since that whole class's declaration/definition is in the .cpp. Would that imply that since the whole class is file scope it all should go into the anonymous namespace?20:02
GeofftheMedioMainPanel and a few other classes are forward declared in DesignWnd20:04
GeofftheMedioin the header20:04
fixItAhhh okay I think I understand now. Thus making the class not file scope since DesignWnd needs a ptr to them. However all of the functions are file scope and could be defined in the anonymous namespace if you wanted to?20:08
GeofftheMediodefine "the functions" ?20:10
fixItany of DesignWnd::MainPanel's function definitions could go into the anonymous namespace. However not the class declaration/function declarations?20:11
GeofftheMediothe mainpanel functions are in the mainpanel class namespace20:13
fixItYea I get that, so this would be the definition of a mainpanel function:  const std::string& DesignWnd::MainPanel::FunctionName(){}. I guess is what I am confused about is the anonymouse namespace's use in relation to the mainPanel functions.. So the MainPanel class is NOT file scope. Therefore the class declaration although in the cpp cannot be inside of the anonymous namespace. All of MainPanels functions would however be file sc20:20
fixItope is this correct? Meaning that you could define all of MainPanel()s functions within the anonymous namespace?20:20
GeofftheMediothe mainpanel's functions are all declared in the mainpanel class, so they can't be put into an anonymous namespace20:24
GeofftheMedio(their definitions)20:24
fixItAh alright. So basically anonymous namespace is irrelevant to what I am doing at the moment since I am dealing with file scope functions within a class. Thanks for the explanations. I'll just finish up the patch then and post it so you can take a look and see if I set things up the way you were looking for...that will probably be faster20:36
*** em3 has joined #freeorion21:38
fixItOkay I just submitted a new version of the patch21:40
fixItAlso just to let you know under UI improvements from the programming wiki:21:40
fixItRename those to something like CanPartBeAddedAnyEmptySlot and CanPartBeAddedWithSwapping21:40
fixIt<GeofftheMedio> And have a separate function to do that actual adding21:40
fixIt<GeofftheMedio> like AddPartEmptySlot and AddPartWithSwapping21:40
fixIt<GeofftheMedio> or at least those should be the functions that are publically available21:40
fixIt<GeofftheMedio> if you want to have those functions you wrote as the i21:40
fixItoops wrong copy and paste lol, from the programming wiki: The sitrep message for a ship being produced just says the name of the ship and its location. It would be good to add an indication of the ship's design to that message. This would require modifying CreateShipBuiltSitRep in C++ and the corresponding stringtable entry.21:41
fixItcan be removed21:41
*** VargaD has joined #freeorion21:50
GeofftheMedioreplied22:09
*** Digit_01 has joined #freeorion22:19
*** guini_ has joined #freeorion22:22
CIA-32FreeOrion: geoffthemedio * r4586 /trunk/FreeOrion/UI/ (ClientUI.cpp ClientUI.h): (log message trimmed)22:28
CIA-32FreeOrion: -Added ZoomToObject functions to ClientUI which take the id or name and look for an object with that id or name, and then show that object in the GUI.22:28
CIA-32FreeOrion: -Added ZoomToContent function to ClientUI which takes a string and looks up22:28
CIA-32FreeOrion: anything it can find that has that name. An optional parameter specifies22:28
CIA-32FreeOrion: whether the string is user-readable (eg. The Physical Brain, rather than the22:28
CIA-32FreeOrion: internal untranslated tech name and stringtable index like LRN_PHYS_BRAIN). If22:28
CIA-32FreeOrion: reverse lookup is true, various types of content are scanned through in order to22:28
CIA-32FreeOrion: geoffthemedio * r4587 /trunk/FreeOrion/UI/ChatWnd.cpp: Added basic text command parser for messages window entered text, with a / prefix indicating a command (as opposed to chat). Just zooming to content or objects is implemented so far.22:38
*** StrangerDanger has quit IRC22:38
*** Digit01 has quit IRC22:38
*** guini has quit IRC22:38
CIA-32FreeOrion: eleazzaar * r4588 /trunk/FreeOrion/default/eng_stringtable.txt: reworded ship production message to: A %shipdesign%,'%ship%' has been produced at %system%.22:49
*** VargaD has quit IRC22:56
*** StrangerDanger has joined #freeorion22:56
CIA-32FreeOrion: geoffthemedio * r4589 /trunk/FreeOrion/ (AI/AIInterface.cpp UI/DesignWnd.cpp):23:03
CIA-32FreeOrion: -Patch by fixIt to make automatically adding parts to designs more flexible23:03
CIA-32FreeOrion: -Line ending tweak (?) to AIInterface.cpp23:03
CIA-32FreeOrion: geoffthemedio * r4590 /trunk/FreeOrion/ (UI/DesignWnd.cpp changelog.txt):23:15
CIA-32FreeOrion: -Minor grooming23:15
CIA-32FreeOrion: -changelog.txt update23:15
*** em3 has quit IRC23:17
*** GeofftheMedio has quit IRC23:21
*** GeofftheMedio has joined #freeorion23:24
*** dansan has joined #freeorion23:41
*** dansan_ has quit IRC23:42
*** dansan has quit IRC23:48
*** dansan_ has joined #freeorion23:48
*** dansan has joined #freeorion23:54
*** dansan_ has quit IRC23:54

Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!