Author: jerome
Date: 2008-08-22 00:08:29 +0200 (Fri, 22 Aug 2008)
New Revision: 1567
Modified:
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/TuxDropTarget.java
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/languages/LanguagesSet/languages_fr_FR.properties
Log:
* Fixed dancing trash bug when deleting gadget/attitune/remote/alert datas.
* Mask properties panel when users are on "online" cc part.
* Removed selected properties panel when something has been deleted.
Modified:
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
===================================================================
---
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
2008-08-21 16:31:36 UTC (rev 1566)
+++
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
2008-08-21 22:08:29 UTC (rev 1567)
@@ -167,7 +167,8 @@
protected static final int BOTH = 2;
protected static final int ALERT_ACTION = 0;
protected static final int ADD_REMOTE_ACTION = 1;
- protected String IP = "127.0.0.1";
+ protected String IP = "127.0.0.1";
+ public int leftSize;
/** CcInterface specifics variables **/
public byte view = CcInterface.VIEW_LIST;
@@ -1421,7 +1422,8 @@
jLeftPanel.add(jLabelPlaylists, null);
jLeftPanel.add(getJListPlaylists(), null);
jLeftPanel.add(separator, null);
- jLeftPanel.add(getTrash(), null);
+ jLeftPanel.add(getTrash(), null);
+ this.leftSize = jLeftPanel.getHeight();
}
return jLeftPanel;
}
@@ -1431,7 +1433,10 @@
* @param index let choose between gadgets or attitunes components.
*/
private void showFileBrowser(int index){
-
+ this.jTabbedPane.setVisible(true); //FIXME
+ this.getTrash().setVisible(true);
+ this.getLeftPanel().setSize(this.getLeftPanel().getWidth(),
+ this.leftSize);
if(pWebBrowser != null){
pWebBrowser.scrollpane.setVisible(false);
jContentPane.remove(pWebBrowser);
@@ -1519,7 +1524,11 @@
protected void showWebBrowser(int index){
if (index <= 1){
this.showFileBrowser(0);
- this.maskPlaylists();
+ this.maskPlaylists();
+ this.jTabbedPane.setVisible(false);
+ this.getTrash().setVisible(false);
+
this.getLeftPanel().setSize(this.getLeftPanel().getWidth(),
+
this.getLeftPanel().getHeight() + 122);
scroll_fileBrowser_gadgets.setVisible(false);
scroll_fileBrowser_attitunes.setVisible(false);
scroll_fileBrowser_thumbnailGadgets.setVisible(false);
@@ -1587,7 +1596,11 @@
}
- protected void showPlaylist(int index){
+ protected void showPlaylist(int index){
+ this.jTabbedPane.setVisible(true); //FIXME
+ this.getTrash().setVisible(true);
+ this.getLeftPanel().setSize(this.getLeftPanel().getWidth(),
+ this.leftSize);
fileBrowserOldDim = scroll_fileBrowser_gadgets.getSize();
this.showFileBrowser(1);
jFrame.repaint();
@@ -1698,18 +1711,45 @@
if((this.type != CcInterface.TYPE_REMOTELIST) && (this.type !=
CcInterface.TYPE_ALERT)){
file_browser.delete_current(this.type, this.view);
remotePlaylist.checkForCorruption(file_browser.AttitunesDatas,
file_browser.GadgetsDatas);
+
+ if(this.type == CcInterface.TYPE_ATTITUNES){
+
if(this.savedProperties.containsKey("attitune")){
+ this.savedProperties.put("attitune",
new JPanel[]{new TuxDegradeePanel()});
+ }
+ }
+ else if(this.type == CcInterface.TYPE_GADGETS){
+ if(this.savedProperties.containsKey("gadget")){
+ this.savedProperties.put("gadget", new
JPanel[]{new TuxDegradeePanel(),
+
new TuxDegradeePanel()});
+ }
+ }
+ else{
+ System.out.println("nowhere");
+ }
+
}
else if(this.type == CcInterface.TYPE_REMOTELIST){
Object[] datas =
remotePlaylist.getDatasAtSelectedIndex();
settings.removeFromRemoteList(datas);
this.remotePlaylist.setDatas(settings.getRemoteListDatas());
+ if(this.savedProperties.containsKey("alert")){
+ this.savedProperties.put("remote", new
Object[]{new TuxDegradeePanel()});
+ }
}
else if(this.type == CcInterface.TYPE_ALERT){
Object[] datas =
alertPlaylist.getDatasAtSelectedIndex();
+
+ if(this.savedProperties.containsKey("alert")){
+ this.savedProperties.put("alert", new
Object[]{new TuxDegradeePanel()});
+ }
+
+ //this.jTabbedPane.addTab("", new TuxDegradeePanel());
settings.removeFromAlertList(datas);
this.alertPlaylist.setDatas(settings.getAlertListDatas());
-
- }
+ jFrame.repaint();
+ }
+ this.maskAllTabs();
+ this.jTabbedPane.addTab("", new TuxDegradeePanel());
}
/**
Modified:
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/TuxDropTarget.java
===================================================================
---
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/TuxDropTarget.java
2008-08-21 16:31:36 UTC (rev 1566)
+++
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/TuxDropTarget.java
2008-08-21 22:08:29 UTC (rev 1567)
@@ -58,11 +58,11 @@
*/
public void dragEnter(DropTargetDragEvent dtde) {
if(this.pMethodEnter != null){
- Class<?> targetClass = pSender.getClass();
+ Class targetClass = pSender.getClass();
try
{
- Method targetMethod =
targetClass.getDeclaredMethod(pMethodEnter, (Class<?>[])null);
- targetMethod.invoke(pSender, (Object[])null);
+ Method targetMethod =
targetClass.getDeclaredMethod(pMethodEnter, null);
+ targetMethod.invoke(pSender, null);
}
catch(Exception e)
{
@@ -77,11 +77,11 @@
*/
public void dragExit(DropTargetEvent dte) {
if(this.pMethodExit != null){
- Class<?> targetClass = pSender.getClass();
+ Class targetClass = pSender.getClass();
try
{
- Method targetMethod =
targetClass.getDeclaredMethod(pMethodExit, (Class<?>)null);
- targetMethod.invoke(pSender,
(Object[])null);
+ Method targetMethod =
targetClass.getDeclaredMethod(pMethodExit, null);
+ targetMethod.invoke(pSender, null);
}
catch(Exception e)
{
@@ -100,17 +100,17 @@
* Drop received
*/
public void drop(DropTargetDropEvent dtde) {
- Class<?> targetClass = pSender.getClass();
+ Class targetClass = pSender.getClass();
try
{
if(this.pMethod != null){
- Method targetMethod =
targetClass.getDeclaredMethod(pMethod, (Class<?>)null);
- targetMethod.invoke(pSender, (Object[])null);
+ Method targetMethod =
targetClass.getDeclaredMethod(pMethod, null);
+ targetMethod.invoke(pSender, null);
}
if(this.pMethodExit != null){
- Method targetMethod2 =
targetClass.getDeclaredMethod(pMethodExit, (Class<?>)null);
- targetMethod2.invoke(pSender, (Object[])null);
+ Method targetMethod2 =
targetClass.getDeclaredMethod(pMethodExit, null);
+ targetMethod2.invoke(pSender, null);
}
}
catch(Exception e)
@@ -125,11 +125,11 @@
* Drop action changed received
*/
public void dropActionChanged(DropTargetDragEvent dtde) {
- Class<?> targetClass = pSender.getClass();
+ Class targetClass = pSender.getClass();
try
{
- Method targetMethod =
targetClass.getDeclaredMethod(pMethodExit, (Class<?>)null);
- targetMethod.invoke(pSender, (Object[])null);
+ Method targetMethod =
targetClass.getDeclaredMethod(pMethodExit, null);
+ targetMethod.invoke(pSender, null);
}
catch(Exception e)
{
Modified:
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/languages/LanguagesSet/languages_fr_FR.properties
===================================================================
---
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/languages/LanguagesSet/languages_fr_FR.properties
2008-08-21 16:31:36 UTC (rev 1566)
+++
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/Utils/languages/LanguagesSet/languages_fr_FR.properties
2008-08-21 22:08:29 UTC (rev 1567)
@@ -23,7 +23,7 @@
panelSummary=Sommaire
panelConfiguration=Configuration
panelHelp=Aide
-panelAttitune=Alarme configuration
+panelAttitune=Configuration d'alarme
gdgAttNameHeader=Nom
gdgAttDescriptionHeader=Description
gdgInPlaylistHeader=Dans playliste
@@ -37,7 +37,7 @@
menuViewPosX=60
ipSelection=Se connecter � un ami
ipSelectionEnter=Entrer l'ip � utiliser.
-showDebugger=Voir le debugger
+showDebugger=Debugger
executionModelCommand=t�l�commande
executionModelUI=visuel
executionModelService=service
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn