Changeset 209

Show
Ignore:
Timestamp:
07/15/10 19:45:31 (8 weeks ago)
Author:
Guillaume Mazoyer <respawneral@…>
branch-nick:
gnome-split
revision id:
respawneral@gmail.com-20100715174531-c39aof7vfx8omvg4
Message:

Force actions' signals to be emitted.

Add few methods to force the actions' signals to
be emitted via the actions manager.

Location:
src/org/gnome/split
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • src/org/gnome/split/GnomeSplit.java

    r208 r209  
    151151            if (config.ASSISTANT_ON_START) { 
    152152                // Show the assistant on start if requested 
    153                 actions.getAction(ActionId.ASSISTANT).emitActivate(); 
     153                actions.activateAction(ActionId.ASSISTANT); 
    154154            } 
    155155        } 
     
    181181 
    182182                // Show the merge widget 
    183                 actions.getRadioAction(ActionId.MERGE).emitActivate(); 
     183                actions.activateRadioAction(ActionId.MERGE); 
    184184 
    185185                break; 
     
    190190 
    191191                // Show the split widget 
    192                 actions.getRadioAction(ActionId.SPLIT).emitActivate(); 
     192                actions.activateRadioAction(ActionId.SPLIT); 
    193193 
    194194                break; 
  • src/org/gnome/split/gtk/MainWindow.java

    r202 r209  
    347347        if (view == 1) { 
    348348            // Switch the view 
    349             app.getActionManager().getRadioAction(ActionId.MERGE).emitActivate(); 
     349            app.getActionManager().activateRadioAction(ActionId.MERGE); 
    350350        } 
    351351    } 
  • src/org/gnome/split/gtk/action/ActionManager.java

    r202 r209  
    190190 
    191191    /** 
     192     * Emit the signal connected to the {@link Action} associated the 
     193     * {@link ActionId}. 
     194     */ 
     195    public void activateAction(ActionId id) { 
     196        this.getAction(id).emitActivate(); 
     197    } 
     198 
     199    /** 
     200     * Emit the signal connected to the {@link ToggleAction} associated the 
     201     * {@link ActionId}. 
     202     */ 
     203    public void activateToggleAction(ActionId id) { 
     204        this.getToggleAction(id).emitActivate(); 
     205    } 
     206 
     207    /** 
     208     * Emit the signal connected to the {@link RadioAction} associated the 
     209     * {@link ActionId}. 
     210     */ 
     211    public void activateRadioAction(ActionId id) { 
     212        this.getRadioAction(id).emitActivate(); 
     213    } 
     214 
     215    /** 
    192216     * List of all action IDs. 
    193217     *  
  • src/org/gnome/split/gtk/widget/ActionAssistant.java

    r208 r209  
    147147        if (type == 0) { 
    148148            // Switch to the split view if needed 
    149             app.getActionManager().getRadioAction(ActionId.SPLIT).emitActivate(); 
     149            app.getActionManager().activateRadioAction(ActionId.SPLIT); 
    150150 
    151151            // Update the widget using the info 
     
    153153        } else { 
    154154            // Switch to the merge view if needed 
    155             app.getActionManager().getRadioAction(ActionId.MERGE).emitActivate(); 
     155            app.getActionManager().activateRadioAction(ActionId.MERGE); 
    156156 
    157157            // Update the widget using the filename 
     
    720720 
    721721            // Start the split/merge if requested 
    722             app.getActionManager().getAction(ActionId.START).emitActivate(); 
     722            app.getActionManager().activateAction(ActionId.START); 
    723723 
    724724            // Then hide the assistant 
  • src/org/gnome/split/gtk/widget/AreaStatusIcon.java

    r188 r209  
    2727import org.gnome.split.config.Constants; 
    2828import org.gnome.split.gtk.action.ActionManager; 
    29 import org.gnome.split.gtk.action.ToggleAction; 
    3029import org.gnome.split.gtk.action.ActionManager.ActionId; 
    3130 
     
    8887    @Override 
    8988    public void onActivate(StatusIcon source) { 
    90         ToggleAction action = app.getActionManager().getToggleAction(ActionId.TRAY_WINDOW); 
    91         action.emitActivate(); 
     89        app.getActionManager().activateToggleAction(ActionId.TRAY_WINDOW); 
    9290    } 
    9391