~ubuntu-branches/debian/jessie/3depict/jessie

« back to all changes in this revision

Viewing changes to debian/patches/wx3-startup

  • Committer: Package Import Robot
  • Author(s): D Haley
  • Date: 2014-06-09 22:54:00 UTC
  • Revision ID: package-import@ubuntu.com-20140609225400-mxteq4a0xq9cfws3
Tags: 0.0.16-2
Add wx 3.0 startup patch (Closes: #746609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Origin: upstream
 
2
Forwarded: not-needed
 
3
Index: 3depict-0.0.16/src/3Depict.cpp
 
4
===================================================================
 
5
--- 3depict-0.0.16.orig/src/3Depict.cpp 2014-06-03 04:15:59.421246388 +0200
 
6
+++ 3depict-0.0.16/src/3Depict.cpp      2014-06-03 04:16:03.689192733 +0200
 
7
@@ -457,11 +457,17 @@
 
8
 
 
9
 
 
10
     MainFrame->Show();
 
11
-    
 
12
+   
 
13
+    MainFrame->checkShowTips();
 
14
+    MainFrame->checkReloadAutosave();
 
15
+
 
16
+
 
17
     if(commandLineFiles.GetCount())
 
18
        MainFrame->SetCommandLineFiles(commandLineFiles);
 
19
 
 
20
     MainFrame->fixSplitterWindow();
 
21
+
 
22
+    MainFrame->finaliseStartup();
 
23
     return true;
 
24
 }
 
25
 
 
26
Index: 3depict-0.0.16/src/gui/mainFrame.cpp
 
27
===================================================================
 
28
--- 3depict-0.0.16.orig/src/gui/mainFrame.cpp   2014-06-03 04:15:59.421246388 +0200
 
29
+++ 3depict-0.0.16/src/gui/mainFrame.cpp        2014-06-03 04:16:03.693192682 +0200
 
30
@@ -727,12 +727,6 @@
 
31
            restoreConfigDefaults();
 
32
        
 
33
        
 
34
-       
 
35
-       //Attempt to load the auto-save file, if it exists
 
36
-       //-----------------
 
37
-       checkReloadAutosave();
 
38
-       //-----------------
 
39
-
 
40
        //Try to set the window size to a nice size
 
41
        SetSize(getNiceWindowSize());
 
42
 
 
43
@@ -742,8 +736,6 @@
 
44
 
 
45
 
 
46
 
 
47
-       updateTimer->Start(UPDATE_TIMER_DELAY,wxTIMER_CONTINUOUS);
 
48
-       autoSaveTimer->Start(AUTOSAVE_DELAY*1000,wxTIMER_CONTINUOUS);
 
49
 
 
50
 #ifndef DISABLE_ONLINE_UPDATE
 
51
         wxDateTime datetime = wxDateTime::Today();     
 
52
@@ -808,6 +800,12 @@
 
53
 }
 
54
 
 
55
 
 
56
+void MainWindowFrame::finaliseStartup()
 
57
+{
 
58
+       updateTimer->Start(UPDATE_TIMER_DELAY,wxTIMER_CONTINUOUS);
 
59
+       autoSaveTimer->Start(AUTOSAVE_DELAY*1000,wxTIMER_CONTINUOUS);
 
60
+}
 
61
+
 
62
 BEGIN_EVENT_TABLE(MainWindowFrame, wxFrame)
 
63
     EVT_GRID_CMD_EDITOR_SHOWN(ID_GRID_FILTER_PROPERTY,MainWindowFrame::OnFilterGridCellEditorShow)
 
64
     EVT_GRID_CMD_EDITOR_HIDDEN(ID_GRID_FILTER_PROPERTY,MainWindowFrame::OnFilterGridCellEditorHide)
 
65
@@ -5376,6 +5374,16 @@
 
66
                visControl.setIonDisplayLimit(configFile.getMaxPoints());
 
67
        }
 
68
 
 
69
+       
 
70
+       if(configFile.getWantStartupOrthoCam())
 
71
+       {
 
72
+               visControl.setCamProperties(visControl.getActiveCamId(), 
 
73
+                                       CAMERA_KEY_LOOKAT_PROJECTIONMODE,TRANS("Orthogonal"));
 
74
+       }
 
75
+}
 
76
+
 
77
+void MainWindowFrame::checkShowTips()
 
78
+{
 
79
        //Show startup tip dialog as needed
 
80
        if(configFile.wantStartupTips())
 
81
        {
 
82
@@ -5402,12 +5410,6 @@
 
83
                        WARN(false,"Tip file not found at startup, but user wanted it...");
 
84
                }
 
85
        }
 
86
-       
 
87
-       if(configFile.getWantStartupOrthoCam())
 
88
-       {
 
89
-               visControl.setCamProperties(visControl.getActiveCamId(), 
 
90
-                                       CAMERA_KEY_LOOKAT_PROJECTIONMODE,TRANS("Orthogonal"));
 
91
-       }
 
92
 }
 
93
 
 
94
 void MainWindowFrame::restoreConfigPanelDefaults()
 
95
Index: 3depict-0.0.16/src/gui/mainFrame.h
 
96
===================================================================
 
97
--- 3depict-0.0.16.orig/src/gui/mainFrame.h     2014-06-03 04:15:59.421246388 +0200
 
98
+++ 3depict-0.0.16/src/gui/mainFrame.h  2014-06-03 04:16:03.693192682 +0200
 
99
@@ -382,6 +382,10 @@
 
100
     //return type of file, based upon heuristic check
 
101
     static unsigned int guessFileType(const std::string &file);
 
102
 
 
103
+
 
104
+    //Check to see if the user wants a tip file
 
105
+    void checkShowTips();
 
106
+
 
107
     //See if the user wants to save the current state
 
108
     void checkAskSaveState();
 
109
     
 
110
@@ -397,6 +401,8 @@
 
111
     void onPanelSpectraUpdate() {plotUpdates=true;} ;
 
112
 
 
113
     bool initOK() const {return initedOK;}
 
114
+    
 
115
+    void finaliseStartup();
 
116
 
 
117
     //This is isolated from the layout code, due to "bug" 4815 in wx. The splitter window
 
118
     //does not know how to choose a good size until the window is shown