<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I have put together a quick prototype which allows the Radio class, via the features interface, to expose user defined memory attributes. In a way it extends the memory object allowing the user to generically specify editable columns in the edit view.<BR> <BR>As this is only a prototype, I have only upgraded two radio classes (UV5R and FT60) to utilize this feature and not all portions of the mem edit view support it. You can try it by applying the supplied patch, I would appreciate the feedback.<BR> <BR>Under the current prototype users can define user extensions to the memory class by specifying a tuple in the radio features structure. This tuple defines the caption, type, and choices for each "user" defined memory which is then stored in the memory's "user" dictionary.<BR> <BR>For example,<BR> <BR> def get_features(self):<BR> ...<BR> rf.valid_user_mem = [ ("BCL", TYPE_BOOLEAN, "bcl", False, None), \<br> ("PTT ID", TYPE_STRING, "pttid", PTTID_LIST[0], PTTID_LIST)<BR> <BR> def get_memory(self, number):<BR> ....<BR> mem.user["bcl"] = _mem.bcl<br> mem.user["pttid"] = PTTID_LIST[_mem.pttid]<br><BR> <BR>As a result "BCL" and "PTT ID" will appear in the memory editor as either Text or ComboBox ui elements, depending on whether or not choices are provided. Two values will be added to the dictionary under the keys "blc" and "pttid" each of the respective type defined by the tuple.<BR> <BR>This API is simply a proof of concept, no mention is made to committing the code as is. <BR> <BR> This may allow us to ask the question, does it make sense to allow each radio define its own memory class, rather than a single common class that all radios must adhere too...? While many radios share many similar attributes, it is not uncommon for a particular make/model to deviate from this slightly. This is even more true when it comes to settings.<BR> <BR>We may wish to take this a bit further and help define a method of serializing raw memory into a class object which may then be reflected to appear in the memory editor, settings editor, etc.. thus resulting in a completely radio driven interface... <BR> <BR> <BR>-kosta<br> <BR><div><hr id="stopSpelling">From: kosta@alumni.uvic.ca<br>To: af5mi@yahoo.com; chirp_devel@intrepid.danplanet.com<br>Date: Sat, 24 Jan 2015 13:37:28 -0800<br>Subject: Re: [chirp_devel] accessing channel edit menu on mac<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Hi Jens,<br> <br>I also find it counter intuitive; the mem.extra concept is hidden too deep in the ui so that some users may not necessarily realize it exists. Unfortunately, the TreeView does not support CellRendered buttons that would allow us to directly show to the Edit dialog.<br> <br>Maybe there is another method for exposing custom channel settings.<br> <br> <br>-kosta<br> <br><div><hr id="ecxstopSpelling">Date: Sat, 24 Jan 2015 20:46:09 +0000<br>From: af5mi@yahoo.com<br>To: chirp_devel@intrepid.danplanet.com; kosta@alumni.uvic.ca<br>Subject: Re: [chirp_devel] accessing channel edit menu on mac<br><br><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr">Dan,<br></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span id="ecxyui_3_16_0_1_1422131583051_7624">I sent a separate query - I'm not sure how/when you determine if the radio has extra settings. Seems mem.extra is only populated sometimes for set_memory.</span></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span id="ecxyui_3_16_0_1_1422131583051_7667">Should this be a radio features flag, e.g., rf.has_extra_channel_settings?</span></div><div id="ecxyui_3_16_0_1_1422131583051_7727"><br></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span id="ecxyui_3_16_0_1_1422131583051_7679">Hi Kosta,</span></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span id="ecxyui_3_16_0_1_1422131583051_7619">I noticed you seem to be very comfortable with GTK and UI portions of the code.</span></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span id="ecxyui_3_16_0_1_1422131583051_7620">Do you know what it would take to enable a column in edit table view with an "edit" button when the radio has extended channel settings?</span></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span><br></span></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span id="ecxyui_3_16_0_1_1422131583051_7695">I suspect alot of users aren't even aware that there are extra channel settings for some radios (even in windows world, unless they are handy with right-click, i.e., power-users)</span></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span><br></span></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span>-Jens</span></div><div id="ecxyui_3_16_0_1_1422131583051_7532" dir="ltr"><span><br></span></div> <div id="ecxyui_3_16_0_1_1422131583051_7529" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="ecxyui_3_16_0_1_1422131583051_7528" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="ecxyui_3_16_0_1_1422131583051_7530" dir="ltr"> <hr size="1" id="ecxyui_3_16_0_1_1422131583051_7621"> <font id="ecxyui_3_16_0_1_1422131583051_7531" face="Arial" size="2"> <b><span style="font-weight: bold;">From:</span></b> Dan Smith <dsmith@danplanet.com><br> <b><span style="font-weight: bold;">To:</span></b> chirp_devel@intrepid.danplanet.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, January 22, 2015 9:45 AM<br> <b id="ecxyui_3_16_0_1_1422131583051_7685"><span id="ecxyui_3_16_0_1_1422131583051_7684" style="font-weight: bold;">Subject:</span></b> Re: [chirp_devel] accessing channel edit menu on mac<br> </font> </div> <div class="ecxy_msg_container" id="ecxyui_3_16_0_1_1422131583051_7527"><br>> Besides right-clicking fpr context menu on a channel, is there a way to<br clear="none">> access the channel edit menu, i.e., by keyboard shortcut or other<br clear="none">> combination if user doesnt have right-click mouse setup (I think most<br clear="none">> mac users dont).<br clear="none"><br clear="none">Well, control-click gets you that without any extra settings, but I can<br clear="none">imagine that dyed in the wool mac folks probably wouldn't think of that.<br clear="none"><br clear="none">> I'm wondering how users would even know to look at the extended edit<br clear="none">> menu for channels.<br clear="none"><br clear="none">Well, I right-click on everything looking for more stuff, but... :)<div class="ecxqtdSeparateBR"><br><br></div><div class="ecxyqt4940668302" id="ecxyqtfd99585"><br clear="none"><br clear="none">> Maybe one of the columns (last one?) should contain an edit button which<br clear="none">> has the same functionality (open edit window for that channel).</div><br clear="none"><br clear="none">Yeah, that seems reasonable, as long as we only display that button for<br clear="none">radios that have extra settings in the memories.<br clear="none"><br clear="none">--Dan<div class="ecxyqt4940668302" id="ecxyqtfd90073"><br clear="none"></div><br>_______________________________________________<br clear="none">chirp_devel mailing list<br clear="none"><a href="mailto:chirp_devel@intrepid.danplanet.com" shape="rect">chirp_devel@intrepid.danplanet.com</a><br clear="none"><a href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel" target="_blank" shape="rect">http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a><br clear="none">Developer docs: <a href="http://chirp.danplanet.com/projects/chirp/wiki/Developers" target="_blank" shape="rect">http://chirp.danplanet.com/projects/chirp/wiki/Developers</a><br><br></div> </div> </div> </div></div>                                            </div>
<br>_______________________________________________
chirp_devel mailing list
chirp_devel@intrepid.danplanet.com
http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers</div>                                            </div></body>
</html>