The Following User Says Thank You to Mentalist Traceur For This Useful Post: | ||
|
2010-10-01
, 20:41
|
Posts: 462 |
Thanked: 550 times |
Joined on Sep 2008
@ Moscow
|
#52
|
I would like to suggest the following: Make every one of the buttons on the Advanced Switcher have two functions: Normal press, which simply does the switching on/off, for each of the three icons, and then long-press, which brings up a submenu just like the stock Profile, Bluetooth, Wifi, and FM Transmitter status menu applets do. (Just for clarity's sake - I use applet to mean the stuff that gets added to the drop down menu; I use widget to mean the things that get placed on the desktops that are not just shortcuts to launching something else.)
Anyway, my thinking is this: The WiFi button, when long-pressed, brings up the same menu the current stock WiFi applet does - brings up list of connections that the WiFi detects, and the one you are currently connected to. Basically, same thing as normal-pressing the current "Internet connection"/"Интернет-соединение" button does. So, short press just toggles WiFi, long-press lets you connect/disconnect like you could normally.
Then, long-pressing the Bluetooth button in your Interface Switcher could do the same: Bring up the same sub-menu that the stock Bluetooth button does. Normal press would just toggle it, as it does now.
And finally, to get the zerocool2k request covered (which I agree with), long pressing the phone connectivity button would bring up a submenu that is basically the 2G/3G/Dual mode switcher. Also, if the current GSM button puts the device in flight mode, IE, kills WiFi and GSM (don't have it installed yet, so I can't test this to figure this out for myself), and toggling the WiFi will make it revive the GSM connectivity as well, then the Tablet Mode button can be added as a fourth button to this submenu.
If you can implement this, it would be great, because it means that I can basically uninstall the 2G/3G switcher, and hide/remove the stock WiFi and Bluetooth buttons from my menu, freeing up room in the status menu (mine's getting crowded).
If you are familiar with qwerty12's work, one of his versions of the FM Transmitter status menu applet has normal press and long-press functionality, so you could look at the source code of that. (I will edit a link in here to the post where he links to it shortly.) Since the other applets involved (2G/3G/Dual switcher and Tablet/Phone mode switchers are both open source as I understand it, it should be easy to find out how to code those options into the submenus if you don't already know how to do that).
- Edit (Links) -
Post where qwerty12 posted the version of fmtx_status_menu_item.so that has long-press functionality: http://talk.maemo.org/showpost.php?p...1&postcount=44
Page of that thread this came from: http://talk.maemo.org/showthread.php?t=43395&page=5
He links to an earlier fmtx_status_menu_item.so at the beginning of that thread - this is not the one that can do long-press as I understood it. My N900 isn't loading the www.freemoe.org link where qwerty12 had this stuff posted, not sure if it's an N900, college wifi, or website problem.
- End Edit -
Naturally, I would contribute myself, but currently my coding knowledge is minimal.
The Following User Says Thank You to 412b For This Useful Post: | ||
|
2010-10-01
, 22:15
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#53
|
|
2010-10-27
, 21:12
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#55
|
The Following User Says Thank You to Mentalist Traceur For This Useful Post: | ||
|
2010-10-27
, 21:38
|
Posts: 462 |
Thanked: 550 times |
Joined on Sep 2008
@ Moscow
|
#56
|
412b: Do you still have any intention to release what you said you had almost-finished as of your last post? If not, don't worry, I'm slowly getting to the point where I'll feel comfortable enough to look at the code and start messing around with stuff (though with college it'll probably be another month before I can actually get any serious work done, but I'll keep you updated). Now, how long it will take me to get to being able to figure out how to put any improvements I am able to think of into the autobuilder is another matter.
The Following User Says Thank You to 412b For This Useful Post: | ||
|
2010-10-29
, 21:34
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#57
|
from advpowcommon.ui.Config import ConfigUIMaemo5 from advpowcommon.ui.Gtk import * from advpowcommon.ui.Notebook import NotebookMaemo5
The Following User Says Thank You to Mentalist Traceur For This Useful Post: | ||
|
2010-10-30
, 13:02
|
Posts: 462 |
Thanked: 550 times |
Joined on Sep 2008
@ Moscow
|
#58
|
I am currently going through the various python files by hand. I noticed this:
That's something new, in the opt/maemo/usr/lib/hildon-desktop/advifswlib/core/maemo5.py file. I am currently editing the files for each of these by hand on the device with Vi, to make them match the latest ones. I was going to just test the Interface Switcher before updating Advanced Power and Advanced Power Monitor - but does this mean that you added something to Advanced Power Monitor that I should update in that first for this to work? Or is it already in Advanced Power Monitor, just being used now in Interface Switcher?Code:from advpowcommon.ui.Config import ConfigUIMaemo5 from advpowcommon.ui.Gtk import * from advpowcommon.ui.Notebook import NotebookMaemo5
Anyway, I am assuming everything should still update correctly whenever you push this to extras devel, even if I edit this stuff manually now, right?
As for your N900 purchasing - I wish you luck with that. I hope they are still on sale in Russia, and all goes well in that regard.
Alright, so I got to /opt/maemo/usr/lib/hildon-desktop/advifswlib/interfaces/BT.py
In the latest version in SVN, it says (in line 22):
'images': ('ifsw_statusarea_bluetooth_off', 'ifsw_statusarea_bluetooth_on', 'ifsw_statusarea_bluetooth_on', 'ifsw_statusarea_bluetooth_on', 'ifsw_statusarea_bluetooth_online'),
Is there a reason ifws_statusarea_bluetooth_on is repeated thrice? It's not repeated at all in the previous version? I'm copying it as-is right now, but just wondering.
Anyway, whenever I finish making all the changes correlating to the SVN latest version (using vi to manually type everything, so that I learn better, so it's taking me a while, lol - and lots of wrist pain ), I shall let you know how it works with PR1.3 (stock kernel for now).
The Following User Says Thank You to 412b For This Useful Post: | ||
|
2010-10-30
, 19:19
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#59
|
|
2010-11-01
, 13:00
|
Posts: 462 |
Thanked: 550 times |
Joined on Sep 2008
@ Moscow
|
#60
|
Quick question - every one of my .py files related to Advance(either one of your apps) has a larger-file-sized copy ending with .pyc. They all have later last-modified dates than the original last-modified dates for the .py ending ones. Is there any reason to remove them or overwrite them with copies of the latest .py files? And is this created by your own apps or is it a behavior of python?
The only thing I'm worried about is accidentally committing stuff back to the SVN. I'm hoping anonymous checkout doesn't let changes be immediately merged, if at all, just in case I manage to type the command during some moment of zealously using the tab key.
I am unsure about /etc/event.d/apmonitord - but I think not, because almost nothing in event.d is.
Because apmonitord executes /opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py I think that should be given exec permissions.
Right now (after noticing I had accidentally copied the of the directories slightly in the wrong path [advpowlib inside advpowlib instead of overwriting advpowlib's contents, and the same mistake in two other places], and fixing that), I enabled execute rights for apmdaemon.py, did killall hildon-status-menu, and Advanced Power works again. However, for all I know there's some other component that does need to be made executable, that I just don't know about, and don't notice not running.
I like the new pop-up dialogs. Nothing appears in the Preferences tab for the time being though. (But if I press the "about" tab it shows your name and info, so that works. I'm guessing the preferences part just needs to be developed still.)
Also, I have managed to find some bugs, linked to the order of pressing things.
Basically, if your WiFi is on, and you press the Off button, then after the WLAN: Off banner pops out, but without closing out of the dialog try to turn it on using either the On or <> buttons (say, user opens dialog, presses off, then remembers they needed to do something with internet so try to press on before closing the dialog), the banner for "on" pops up, but the actual WiFi doesn't seem to turn on (connection list doesn't try to load - no loading animated circle, just straight to "No connections available" just as it does in cases when the wifi is off. But the Interface Switcher's icon continues to show "On". I find that in those cases the only way to turn it on is with the <> button, instead of the "On" button. Unsure how/why that is, because my actual understanding of the code is only semi complete, and largely vague logical guesses, rather than technical understanding. I'm guessing that perhaps the boolean variable with which Interface Switcher tracks whether the WiFi is off is set upon dialog exit, and the icon/text changing is not completely tied to the actual modprobe/rmmod of the WLAN driver. So press off, if-wlan-on then wlan-rmmod, and vice versa, but icons change in response to the click of the button (if-off-clicked, WLAN off banner, off-icon - and vice-versa). So if the state of the WLAN isn't directly queried, and set in a way similar to the above, then clicking on before the WiFi on/off variable is set to off would result in wifi-off?->No->Do-nothing.->on-button-pressed?->Yes->Switch-image-and-text-to-'on'. (If I was truly diligent I would go check if this is the case now, but I've been looking at python code and/or doing technical N900 stuff for approx. an entire waking day now, so I'm taking a brake.)
Anyway, my thinking is this: The WiFi button, when long-pressed, brings up the same menu the current stock WiFi applet does - brings up list of connections that the WiFi detects, and the one you are currently connected to. Basically, same thing as normal-pressing the current "Internet connection"/"Интернет-соединение" button does. So, short press just toggles WiFi, long-press lets you connect/disconnect like you could normally.
Then, long-pressing the Bluetooth button in your Interface Switcher could do the same: Bring up the same sub-menu that the stock Bluetooth button does. Normal press would just toggle it, as it does now.
And finally, to get the zerocool2k request covered (which I agree with), long pressing the phone connectivity button would bring up a submenu that is basically the 2G/3G/Dual mode switcher. Also, if the current GSM button puts the device in flight mode, IE, kills WiFi and GSM (don't have it installed yet, so I can't test this to figure this out for myself), and toggling the WiFi will make it revive the GSM connectivity as well, then the Tablet Mode button can be added as a fourth button to this submenu.
If you can implement this, it would be great, because it means that I can basically uninstall the 2G/3G switcher, and hide/remove the stock WiFi and Bluetooth buttons from my menu, freeing up room in the status menu (mine's getting crowded).
If you are familiar with qwerty12's work, one of his versions of the FM Transmitter status menu applet has normal press and long-press functionality, so you could look at the source code of that. (I will edit a link in here to the post where he links to it shortly.) Since the other applets involved (2G/3G/Dual switcher and Tablet/Phone mode switchers are both open source as I understand it, it should be easy to find out how to code those options into the submenus if you don't already know how to do that).
- Edit (Links) -
Post where qwerty12 posted the version of fmtx_status_menu_item.so that has long-press functionality: http://talk.maemo.org/showpost.php?p...1&postcount=44
Page of that thread this came from: http://talk.maemo.org/showthread.php?t=43395&page=5
He links to an earlier fmtx_status_menu_item.so at the beginning of that thread - this is not the one that can do long-press as I understood it. My N900 isn't loading the www.freemoe.org link where qwerty12 had this stuff posted, not sure if it's an N900, college wifi, or website problem.
- End Edit -
Naturally, I would contribute myself, but currently my coding knowledge is minimal.
Last edited by Mentalist Traceur; 2010-10-01 at 17:09. Reason: Links as Promised