Some minor updates to the manual and apidoc

This commit is contained in:
Stephen Boddy 2015-08-26 20:04:39 +02:00
parent a2ce6b7eb8
commit a98c7c4812
16 changed files with 127 additions and 53 deletions

View File

@ -2196,6 +2196,18 @@
<span class="n">out</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">line</span><span class="p">)</span> <span class="n">out</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
<span class="n">indent_string</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">indent_type</span> <span class="o">*</span> <span class="n">section</span><span class="o">.</span><span class="n">depth</span> <span class="n">indent_string</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">indent_type</span> <span class="o">*</span> <span class="n">section</span><span class="o">.</span><span class="n">depth</span>
<span class="c"># Do a little sorting for convenience</span>
<span class="n">section</span><span class="o">.</span><span class="n">scalars</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">section</span><span class="o">.</span><span class="n">scalars</span><span class="p">)</span>
<span class="n">section</span><span class="o">.</span><span class="n">sections</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">section</span><span class="o">.</span><span class="n">sections</span><span class="p">)</span>
<span class="k">if</span> <span class="s">&#39;default&#39;</span> <span class="ow">in</span> <span class="n">section</span><span class="o">.</span><span class="n">scalars</span><span class="p">:</span>
<span class="c"># pop it and move to front</span>
<span class="n">section</span><span class="o">.</span><span class="n">scalars</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="s">&#39;default&#39;</span><span class="p">)</span>
<span class="n">section</span><span class="o">.</span><span class="n">scalars</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s">&#39;default&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="s">&#39;default&#39;</span> <span class="ow">in</span> <span class="n">section</span><span class="o">.</span><span class="n">sections</span><span class="p">:</span>
<span class="n">section</span><span class="o">.</span><span class="n">sections</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="s">&#39;default&#39;</span><span class="p">)</span>
<span class="n">section</span><span class="o">.</span><span class="n">sections</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s">&#39;default&#39;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">entry</span> <span class="ow">in</span> <span class="p">(</span><span class="n">section</span><span class="o">.</span><span class="n">scalars</span> <span class="o">+</span> <span class="n">section</span><span class="o">.</span><span class="n">sections</span><span class="p">):</span> <span class="k">for</span> <span class="n">entry</span> <span class="ow">in</span> <span class="p">(</span><span class="n">section</span><span class="o">.</span><span class="n">scalars</span> <span class="o">+</span> <span class="n">section</span><span class="o">.</span><span class="n">sections</span><span class="p">):</span>
<span class="k">if</span> <span class="n">entry</span> <span class="ow">in</span> <span class="n">section</span><span class="o">.</span><span class="n">defaults</span><span class="p">:</span> <span class="k">if</span> <span class="n">entry</span> <span class="ow">in</span> <span class="n">section</span><span class="o">.</span><span class="n">defaults</span><span class="p">:</span>
<span class="c"># don&#39;t write out default values</span> <span class="c"># don&#39;t write out default values</span>

View File

@ -182,6 +182,13 @@
<span class="kn">import</span> <span class="nn">pwd</span> <span class="kn">import</span> <span class="nn">pwd</span>
<span class="kn">from</span> <span class="nn">util</span> <span class="kn">import</span> <span class="n">dbg</span><span class="p">,</span> <span class="n">err</span> <span class="kn">from</span> <span class="nn">util</span> <span class="kn">import</span> <span class="n">dbg</span><span class="p">,</span> <span class="n">err</span>
<span class="k">try</span><span class="p">:</span>
<span class="kn">import</span> <span class="nn">psutil</span>
<span class="n">psutil_avail</span> <span class="o">=</span> <span class="bp">True</span>
<span class="k">except</span> <span class="p">(</span><span class="ne">ImportError</span><span class="p">):</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;psutil not found&#39;</span><span class="p">)</span>
<span class="n">psutil_avail</span> <span class="o">=</span> <span class="bp">False</span>
<div class="viewcode-block" id="get_default_cwd"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.cwd.get_default_cwd">[docs]</a><span class="k">def</span> <span class="nf">get_default_cwd</span><span class="p">():</span> <div class="viewcode-block" id="get_default_cwd"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.cwd.get_default_cwd">[docs]</a><span class="k">def</span> <span class="nf">get_default_cwd</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;Determine a reasonable default cwd&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Determine a reasonable default cwd&quot;&quot;&quot;</span>
<span class="n">cwd</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">()</span> <span class="n">cwd</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">()</span>
@ -212,6 +219,8 @@
<span class="k">elif</span> <span class="n">system</span> <span class="o">==</span> <span class="s">&#39;SunOS&#39;</span><span class="p">:</span> <span class="k">elif</span> <span class="n">system</span> <span class="o">==</span> <span class="s">&#39;SunOS&#39;</span><span class="p">:</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Using SunOS get_pid_cwd&#39;</span><span class="p">)</span> <span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Using SunOS get_pid_cwd&#39;</span><span class="p">)</span>
<span class="n">func</span> <span class="o">=</span> <span class="n">sunos_get_pid_cwd</span> <span class="n">func</span> <span class="o">=</span> <span class="n">sunos_get_pid_cwd</span>
<span class="k">elif</span> <span class="n">psutil_avail</span><span class="p">:</span>
<span class="n">func</span> <span class="o">=</span> <span class="n">psutil_cwd</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Unable to determine a get_pid_cwd for OS: </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="n">system</span><span class="p">)</span> <span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Unable to determine a get_pid_cwd for OS: </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="n">system</span><span class="p">)</span>
@ -235,6 +244,10 @@
<div class="viewcode-block" id="sunos_get_pid_cwd"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.cwd.sunos_get_pid_cwd">[docs]</a><span class="k">def</span> <span class="nf">sunos_get_pid_cwd</span><span class="p">(</span><span class="n">pid</span><span class="p">):</span> <div class="viewcode-block" id="sunos_get_pid_cwd"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.cwd.sunos_get_pid_cwd">[docs]</a><span class="k">def</span> <span class="nf">sunos_get_pid_cwd</span><span class="p">(</span><span class="n">pid</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Determine the cwd for a given PID on SunOS kernels&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Determine the cwd for a given PID on SunOS kernels&quot;&quot;&quot;</span>
<span class="k">return</span><span class="p">(</span><span class="n">proc_get_pid_cwd</span><span class="p">(</span><span class="n">pid</span><span class="p">,</span> <span class="s">&#39;/proc/</span><span class="si">%s</span><span class="s">/path/cwd&#39;</span><span class="p">))</span> <span class="k">return</span><span class="p">(</span><span class="n">proc_get_pid_cwd</span><span class="p">(</span><span class="n">pid</span><span class="p">,</span> <span class="s">&#39;/proc/</span><span class="si">%s</span><span class="s">/path/cwd&#39;</span><span class="p">))</span>
</div>
<div class="viewcode-block" id="psutil_cwd"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.cwd.psutil_cwd">[docs]</a><span class="k">def</span> <span class="nf">psutil_cwd</span><span class="p">(</span><span class="n">pid</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Determine the cwd using psutil which also supports Darwin&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">psutil</span><span class="o">.</span><span class="n">Process</span><span class="p">(</span><span class="n">pid</span><span class="p">)</span><span class="o">.</span><span class="n">as_dict</span><span class="p">()[</span><span class="s">&#39;cwd&#39;</span><span class="p">]</span>
<span class="c"># vim: set expandtab ts=4 sw=4:</span></div> <span class="c"># vim: set expandtab ts=4 sw=4:</span></div>
</pre></div> </pre></div>

View File

@ -448,17 +448,22 @@
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;inserting page at position: </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="n">tabpos</span><span class="p">)</span> <span class="n">dbg</span><span class="p">(</span><span class="s">&#39;inserting page at position: </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="n">tabpos</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">insert_page</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">tabpos</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">insert_page</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">tabpos</span><span class="p">)</span>
<span class="n">child_widgets</span> <span class="o">=</span> <span class="p">[</span><span class="n">widget</span><span class="p">]</span>
<span class="n">child_widgets</span> <span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">enumerate_descendants</span><span class="p">(</span><span class="n">widget</span><span class="p">))</span> <span class="k">if</span> <span class="n">maker</span><span class="o">.</span><span class="n">isinstance</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="s">&#39;Terminal&#39;</span><span class="p">):</span>
<span class="n">containers</span><span class="p">,</span> <span class="n">objects</span> <span class="o">=</span> <span class="p">([],</span> <span class="p">[</span><span class="n">widget</span><span class="p">])</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">containers</span><span class="p">,</span> <span class="n">objects</span> <span class="o">=</span> <span class="n">enumerate_descendants</span><span class="p">(</span><span class="n">widget</span><span class="p">)</span>
<span class="n">term_widget</span> <span class="o">=</span> <span class="bp">None</span> <span class="n">term_widget</span> <span class="o">=</span> <span class="bp">None</span>
<span class="k">for</span> <span class="n">term_widget</span> <span class="ow">in</span> <span class="n">child_widgets</span><span class="p">:</span> <span class="k">for</span> <span class="n">term_widget</span> <span class="ow">in</span> <span class="n">objects</span><span class="p">:</span>
<span class="k">if</span> <span class="n">maker</span><span class="o">.</span><span class="n">isinstance</span><span class="p">(</span><span class="n">term_widget</span><span class="p">,</span> <span class="s">&#39;Terminal&#39;</span><span class="p">):</span> <span class="k">if</span> <span class="n">maker</span><span class="o">.</span><span class="n">isinstance</span><span class="p">(</span><span class="n">term_widget</span><span class="p">,</span> <span class="s">&#39;Terminal&#39;</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_last_active_term</span><span class="p">(</span><span class="n">term_widget</span><span class="o">.</span><span class="n">uuid</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">set_last_active_term</span><span class="p">(</span><span class="n">term_widget</span><span class="o">.</span><span class="n">uuid</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_tab_label</span><span class="p">(</span><span class="n">term_widget</span><span class="p">,</span> <span class="n">label</span><span class="p">)</span> <span class="k">break</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_tab_label</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="n">label</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_tab_label_packing</span><span class="p">(</span><span class="n">term_widget</span><span class="p">,</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s">&#39;scroll_tabbar&#39;</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">set_tab_label_packing</span><span class="p">(</span><span class="n">term_widget</span><span class="p">,</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s">&#39;scroll_tabbar&#39;</span><span class="p">],</span>
<span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s">&#39;scroll_tabbar&#39;</span><span class="p">],</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s">&#39;scroll_tabbar&#39;</span><span class="p">],</span>
<span class="n">gtk</span><span class="o">.</span><span class="n">PACK_START</span><span class="p">)</span> <span class="n">gtk</span><span class="o">.</span><span class="n">PACK_START</span><span class="p">)</span>
<span class="k">break</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_tab_reorderable</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">set_tab_reorderable</span><span class="p">(</span><span class="n">widget</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_current_page</span><span class="p">(</span><span class="n">tabpos</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">set_current_page</span><span class="p">(</span><span class="n">tabpos</span><span class="p">)</span>

View File

@ -320,6 +320,7 @@
</div> </div>
<div class="viewcode-block" id="Paned.do_redistribute"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.paned.Paned.do_redistribute">[docs]</a> <span class="k">def</span> <span class="nf">do_redistribute</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">recurse_up</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">recurse_down</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span> <div class="viewcode-block" id="Paned.do_redistribute"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.paned.Paned.do_redistribute">[docs]</a> <span class="k">def</span> <span class="nf">do_redistribute</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">recurse_up</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">recurse_down</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Evenly divide available space between sibling panes&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Evenly divide available space between sibling panes&quot;&quot;&quot;</span>
<span class="n">maker</span> <span class="o">=</span> <span class="n">Factory</span><span class="p">()</span>
<span class="c">#1 Find highest ancestor of the same type =&gt; ha</span> <span class="c">#1 Find highest ancestor of the same type =&gt; ha</span>
<span class="n">highest_ancestor</span> <span class="o">=</span> <span class="bp">self</span> <span class="n">highest_ancestor</span> <span class="o">=</span> <span class="bp">self</span>
<span class="k">while</span> <span class="nb">type</span><span class="p">(</span><span class="n">highest_ancestor</span><span class="o">.</span><span class="n">get_parent</span><span class="p">())</span> <span class="o">==</span> <span class="nb">type</span><span class="p">(</span><span class="n">highest_ancestor</span><span class="p">):</span> <span class="k">while</span> <span class="nb">type</span><span class="p">(</span><span class="n">highest_ancestor</span><span class="o">.</span><span class="n">get_parent</span><span class="p">())</span> <span class="o">==</span> <span class="nb">type</span><span class="p">(</span><span class="n">highest_ancestor</span><span class="p">):</span>
@ -328,7 +329,8 @@
<span class="c"># (1b) If Super modifier, redistribute higher sections too</span> <span class="c"># (1b) If Super modifier, redistribute higher sections too</span>
<span class="k">if</span> <span class="n">recurse_up</span><span class="p">:</span> <span class="k">if</span> <span class="n">recurse_up</span><span class="p">:</span>
<span class="n">grandfather</span><span class="o">=</span><span class="n">highest_ancestor</span><span class="o">.</span><span class="n">get_parent</span><span class="p">()</span> <span class="n">grandfather</span><span class="o">=</span><span class="n">highest_ancestor</span><span class="o">.</span><span class="n">get_parent</span><span class="p">()</span>
<span class="k">if</span> <span class="n">grandfather</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_toplevel</span><span class="p">():</span> <span class="k">if</span> <span class="n">maker</span><span class="o">.</span><span class="n">isinstance</span><span class="p">(</span><span class="n">grandfather</span><span class="p">,</span> <span class="s">&#39;VPaned&#39;</span><span class="p">)</span> <span class="ow">or</span> \
<span class="n">maker</span><span class="o">.</span><span class="n">isinstance</span><span class="p">(</span><span class="n">grandfather</span><span class="p">,</span> <span class="s">&#39;HPaned&#39;</span><span class="p">)</span> <span class="p">:</span>
<span class="n">grandfather</span><span class="o">.</span><span class="n">do_redistribute</span><span class="p">(</span><span class="n">recurse_up</span><span class="p">,</span> <span class="n">recurse_down</span><span class="p">)</span> <span class="n">grandfather</span><span class="o">.</span><span class="n">do_redistribute</span><span class="p">(</span><span class="n">recurse_up</span><span class="p">,</span> <span class="n">recurse_down</span><span class="p">)</span>
<span class="n">gobject</span><span class="o">.</span><span class="n">idle_add</span><span class="p">(</span><span class="n">highest_ancestor</span><span class="o">.</span><span class="n">_do_redistribute</span><span class="p">,</span> <span class="n">recurse_up</span><span class="p">,</span> <span class="n">recurse_down</span><span class="p">)</span> <span class="n">gobject</span><span class="o">.</span><span class="n">idle_add</span><span class="p">(</span><span class="n">highest_ancestor</span><span class="o">.</span><span class="n">_do_redistribute</span><span class="p">,</span> <span class="n">recurse_up</span><span class="p">,</span> <span class="n">recurse_down</span><span class="p">)</span>

View File

@ -1291,7 +1291,7 @@
<span class="n">name</span> <span class="o">=</span> <span class="n">_</span><span class="p">(</span><span class="s">&#39;New Layout&#39;</span><span class="p">)</span> <span class="n">name</span> <span class="o">=</span> <span class="n">_</span><span class="p">(</span><span class="s">&#39;New Layout&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">values</span><span class="p">:</span> <span class="k">if</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">values</span><span class="p">:</span>
<span class="n">i</span> <span class="o">=</span> <span class="mi">1</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">while</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">values</span><span class="p">:</span> <span class="k">while</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">values</span><span class="p">:</span>
<span class="n">i</span> <span class="o">=</span> <span class="n">i</span> <span class="o">+</span> <span class="mi">1</span> <span class="n">i</span> <span class="o">=</span> <span class="n">i</span> <span class="o">+</span> <span class="mi">1</span>
<span class="n">name</span> <span class="o">=</span> <span class="s">&#39;</span><span class="si">%s</span><span class="s"> </span><span class="si">%d</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&#39;New Layout&#39;</span><span class="p">),</span> <span class="n">i</span><span class="p">)</span> <span class="n">name</span> <span class="o">=</span> <span class="s">&#39;</span><span class="si">%s</span><span class="s"> </span><span class="si">%d</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s">&#39;New Layout&#39;</span><span class="p">),</span> <span class="n">i</span><span class="p">)</span>
@ -1502,7 +1502,18 @@
</div> </div>
<div class="viewcode-block" id="PrefsEditor.on_profile_name_edited"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.prefseditor.PrefsEditor.on_profile_name_edited">[docs]</a> <span class="k">def</span> <span class="nf">on_profile_name_edited</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cell</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="n">newtext</span><span class="p">):</span> <div class="viewcode-block" id="PrefsEditor.on_profile_name_edited"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.prefseditor.PrefsEditor.on_profile_name_edited">[docs]</a> <span class="k">def</span> <span class="nf">on_profile_name_edited</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cell</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="n">newtext</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Update a profile name&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Update a profile name&quot;&quot;&quot;</span>
<span class="n">oldname</span> <span class="o">=</span> <span class="n">cell</span><span class="o">.</span><span class="n">get_property</span><span class="p">(</span><span class="s">&#39;text&#39;</span><span class="p">)</span> <span class="n">oldname_broken</span> <span class="o">=</span> <span class="n">cell</span><span class="o">.</span><span class="n">get_property</span><span class="p">(</span><span class="s">&#39;text&#39;</span><span class="p">)</span>
<span class="n">guiget</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">builder</span><span class="o">.</span><span class="n">get_object</span>
<span class="n">treeview</span> <span class="o">=</span> <span class="n">guiget</span><span class="p">(</span><span class="s">&#39;profilelist&#39;</span><span class="p">)</span>
<span class="n">treeselection</span> <span class="o">=</span> <span class="n">treeview</span><span class="o">.</span><span class="n">get_selection</span><span class="p">()</span>
<span class="n">treeselection</span><span class="o">.</span><span class="n">select_path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
<span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">pathlist</span><span class="p">)</span> <span class="o">=</span> <span class="n">treeselection</span><span class="o">.</span><span class="n">get_selected_rows</span><span class="p">()</span>
<span class="n">tree_iter</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">get_iter</span><span class="p">(</span><span class="n">pathlist</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">oldname</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">get_value</span><span class="p">(</span><span class="n">tree_iter</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span>
<span class="k">if</span> <span class="n">oldname</span> <span class="o">!=</span> <span class="n">oldname_broken</span><span class="p">:</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;edited signal provides the wrong cell: </span><span class="si">%s</span><span class="s"> != </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span><span class="p">(</span><span class="n">oldname</span><span class="p">,</span> <span class="n">oldname_broken</span><span class="p">))</span>
<span class="k">if</span> <span class="n">oldname</span> <span class="o">==</span> <span class="n">newtext</span> <span class="ow">or</span> <span class="n">oldname</span> <span class="o">==</span> <span class="s">&#39;default&#39;</span><span class="p">:</span> <span class="k">if</span> <span class="n">oldname</span> <span class="o">==</span> <span class="n">newtext</span> <span class="ow">or</span> <span class="n">oldname</span> <span class="o">==</span> <span class="s">&#39;default&#39;</span><span class="p">:</span>
<span class="k">return</span> <span class="k">return</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;PrefsEditor::on_profile_name_edited: Changing </span><span class="si">%s</span><span class="s"> to </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="n">dbg</span><span class="p">(</span><span class="s">&#39;PrefsEditor::on_profile_name_edited: Changing </span><span class="si">%s</span><span class="s"> to </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span>
@ -1540,7 +1551,18 @@
</div> </div>
<div class="viewcode-block" id="PrefsEditor.on_layout_name_edited"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.prefseditor.PrefsEditor.on_layout_name_edited">[docs]</a> <span class="k">def</span> <span class="nf">on_layout_name_edited</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cell</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="n">newtext</span><span class="p">):</span> <div class="viewcode-block" id="PrefsEditor.on_layout_name_edited"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.prefseditor.PrefsEditor.on_layout_name_edited">[docs]</a> <span class="k">def</span> <span class="nf">on_layout_name_edited</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cell</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="n">newtext</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Update a layout name&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Update a layout name&quot;&quot;&quot;</span>
<span class="n">oldname</span> <span class="o">=</span> <span class="n">cell</span><span class="o">.</span><span class="n">get_property</span><span class="p">(</span><span class="s">&#39;text&#39;</span><span class="p">)</span> <span class="n">oldname_broken</span> <span class="o">=</span> <span class="n">cell</span><span class="o">.</span><span class="n">get_property</span><span class="p">(</span><span class="s">&#39;text&#39;</span><span class="p">)</span>
<span class="n">guiget</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">builder</span><span class="o">.</span><span class="n">get_object</span>
<span class="n">treeview</span> <span class="o">=</span> <span class="n">guiget</span><span class="p">(</span><span class="s">&#39;layoutlist&#39;</span><span class="p">)</span>
<span class="n">treeselection</span> <span class="o">=</span> <span class="n">treeview</span><span class="o">.</span><span class="n">get_selection</span><span class="p">()</span>
<span class="n">treeselection</span><span class="o">.</span><span class="n">select_path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
<span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">pathlist</span><span class="p">)</span> <span class="o">=</span> <span class="n">treeselection</span><span class="o">.</span><span class="n">get_selected_rows</span><span class="p">()</span>
<span class="n">tree_iter</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">get_iter</span><span class="p">(</span><span class="n">pathlist</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">oldname</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">get_value</span><span class="p">(</span><span class="n">tree_iter</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span>
<span class="k">if</span> <span class="n">oldname</span> <span class="o">!=</span> <span class="n">oldname_broken</span><span class="p">:</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;edited signal provides the wrong cell: </span><span class="si">%s</span><span class="s"> != </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span><span class="p">(</span><span class="n">oldname</span><span class="p">,</span> <span class="n">oldname_broken</span><span class="p">))</span>
<span class="k">if</span> <span class="n">oldname</span> <span class="o">==</span> <span class="n">newtext</span> <span class="ow">or</span> <span class="n">oldname</span> <span class="o">==</span> <span class="s">&#39;default&#39;</span><span class="p">:</span> <span class="k">if</span> <span class="n">oldname</span> <span class="o">==</span> <span class="n">newtext</span> <span class="ow">or</span> <span class="n">oldname</span> <span class="o">==</span> <span class="s">&#39;default&#39;</span><span class="p">:</span>
<span class="k">return</span> <span class="k">return</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Changing </span><span class="si">%s</span><span class="s"> to </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">oldname</span><span class="p">,</span> <span class="n">newtext</span><span class="p">))</span> <span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Changing </span><span class="si">%s</span><span class="s"> to </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">oldname</span><span class="p">,</span> <span class="n">newtext</span><span class="p">))</span>

View File

@ -1009,6 +1009,13 @@
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Terminal::on_keypress: Called on </span><span class="si">%s</span><span class="s"> with no event&#39;</span> <span class="o">%</span> <span class="n">widget</span><span class="p">)</span> <span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Terminal::on_keypress: Called on </span><span class="si">%s</span><span class="s"> with no event&#39;</span> <span class="o">%</span> <span class="n">widget</span><span class="p">)</span>
<span class="k">return</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span> <span class="k">return</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
<span class="c"># Workaround for IBus intefering with broadcast when using dead keys</span>
<span class="c"># Environment also needs IBUS_DISABLE_SNOOPER=1, or double chars appear</span>
<span class="c"># in the receivers.</span>
<span class="k">if</span> <span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">state</span> <span class="o">|</span> <span class="n">gtk</span><span class="o">.</span><span class="n">gdk</span><span class="o">.</span><span class="n">MODIFIER_MASK</span> <span class="p">)</span> <span class="o">^</span> <span class="n">gtk</span><span class="o">.</span><span class="n">gdk</span><span class="o">.</span><span class="n">MODIFIER_MASK</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Terminal::on_keypress: Ingore processed event with event.state </span><span class="si">%d</span><span class="s">&#39;</span> <span class="o">%</span> <span class="n">event</span><span class="o">.</span><span class="n">state</span><span class="p">)</span>
<span class="k">return</span><span class="p">(</span><span class="bp">False</span><span class="p">)</span>
<span class="c"># FIXME: Does keybindings really want to live in Terminator()?</span> <span class="c"># FIXME: Does keybindings really want to live in Terminator()?</span>
<span class="n">mapping</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">terminator</span><span class="o">.</span><span class="n">keybindings</span><span class="o">.</span><span class="n">lookup</span><span class="p">(</span><span class="n">event</span><span class="p">)</span> <span class="n">mapping</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">terminator</span><span class="o">.</span><span class="n">keybindings</span><span class="o">.</span><span class="n">lookup</span><span class="p">(</span><span class="n">event</span><span class="p">)</span>
@ -1394,7 +1401,6 @@
<span class="n">data</span><span class="p">[</span><span class="s">&#39;old_char_height&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_char_height</span><span class="p">()</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;old_char_height&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_char_height</span><span class="p">()</span>
<span class="n">data</span><span class="p">[</span><span class="s">&#39;old_char_width&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_char_width</span><span class="p">()</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;old_char_width&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_char_width</span><span class="p">()</span>
<span class="n">data</span><span class="p">[</span><span class="s">&#39;old_allocation&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_allocation</span><span class="p">()</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;old_allocation&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_allocation</span><span class="p">()</span>
<span class="n">data</span><span class="p">[</span><span class="s">&#39;old_padding&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_padding</span><span class="p">()</span>
<span class="n">data</span><span class="p">[</span><span class="s">&#39;old_columns&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_column_count</span><span class="p">()</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;old_columns&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_column_count</span><span class="p">()</span>
<span class="n">data</span><span class="p">[</span><span class="s">&#39;old_rows&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_row_count</span><span class="p">()</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;old_rows&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_row_count</span><span class="p">()</span>
<span class="n">data</span><span class="p">[</span><span class="s">&#39;old_parent&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_parent</span><span class="p">()</span> <span class="n">data</span><span class="p">[</span><span class="s">&#39;old_parent&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_parent</span><span class="p">()</span>
@ -1410,13 +1416,6 @@
<span class="n">new_columns</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_column_count</span><span class="p">()</span> <span class="n">new_columns</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_column_count</span><span class="p">()</span>
<span class="n">new_rows</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_row_count</span><span class="p">()</span> <span class="n">new_rows</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_row_count</span><span class="p">()</span>
<span class="n">new_font</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_font</span><span class="p">()</span> <span class="n">new_font</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_font</span><span class="p">()</span>
<span class="n">new_allocation</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vte</span><span class="o">.</span><span class="n">get_allocation</span><span class="p">()</span>
<span class="n">old_alloc</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;x&#39;</span><span class="p">:</span> <span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_allocation&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">width</span> <span class="o">-</span> \
<span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_padding&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span>
<span class="s">&#39;y&#39;</span><span class="p">:</span> <span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_allocation&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">height</span> <span class="o">-</span> \
<span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_padding&#39;</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span>
<span class="p">}</span>
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Terminal::zoom_scale: Resized from </span><span class="si">%d</span><span class="s">x</span><span class="si">%d</span><span class="s"> to </span><span class="si">%d</span><span class="s">x</span><span class="si">%d</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span> <span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Terminal::zoom_scale: Resized from </span><span class="si">%d</span><span class="s">x</span><span class="si">%d</span><span class="s"> to </span><span class="si">%d</span><span class="s">x</span><span class="si">%d</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span>
<span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_columns&#39;</span><span class="p">],</span> <span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_columns&#39;</span><span class="p">],</span>
@ -1429,11 +1428,10 @@
<span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Terminal::zoom_scale: One axis unchanged, not scaling&#39;</span><span class="p">)</span> <span class="n">dbg</span><span class="p">(</span><span class="s">&#39;Terminal::zoom_scale: One axis unchanged, not scaling&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="k">return</span>
<span class="n">old_area</span> <span class="o">=</span> <span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_columns&#39;</span><span class="p">]</span> <span class="o">*</span> <span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_rows&#39;</span><span class="p">]</span> <span class="n">scale_factor</span> <span class="o">=</span> <span class="nb">min</span> <span class="p">(</span> <span class="p">(</span><span class="n">new_columns</span> <span class="o">/</span> <span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_columns&#39;</span><span class="p">]</span> <span class="o">*</span> <span class="mf">0.97</span><span class="p">),</span>
<span class="n">new_area</span> <span class="o">=</span> <span class="n">new_columns</span> <span class="o">*</span> <span class="n">new_rows</span> <span class="p">(</span><span class="n">new_rows</span> <span class="o">/</span> <span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_rows&#39;</span><span class="p">]</span> <span class="o">*</span> <span class="mf">1.05</span><span class="p">)</span> <span class="p">)</span>
<span class="n">area_factor</span> <span class="o">=</span> <span class="p">(</span><span class="n">new_area</span> <span class="o">/</span> <span class="n">old_area</span><span class="p">)</span> <span class="o">/</span> <span class="mi">2</span>
<span class="n">new_size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_font&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get_size</span><span class="p">()</span> <span class="o">*</span> <span class="n">area_factor</span><span class="p">)</span> <span class="n">new_size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">old_data</span><span class="p">[</span><span class="s">&#39;old_font&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get_size</span><span class="p">()</span> <span class="o">*</span> <span class="n">scale_factor</span><span class="p">)</span>
<span class="k">if</span> <span class="n">new_size</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="k">if</span> <span class="n">new_size</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">err</span><span class="p">(</span><span class="s">&#39;refusing to set a zero sized font&#39;</span><span class="p">)</span> <span class="n">err</span><span class="p">(</span><span class="s">&#39;refusing to set a zero sized font&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="k">return</span>
@ -1444,7 +1442,6 @@
<div class="viewcode-block" id="Terminal.is_zoomed"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.terminal.Terminal.is_zoomed">[docs]</a> <span class="k">def</span> <span class="nf">is_zoomed</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <div class="viewcode-block" id="Terminal.is_zoomed"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.terminal.Terminal.is_zoomed">[docs]</a> <span class="k">def</span> <span class="nf">is_zoomed</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Determine if we are a zoomed terminal&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Determine if we are a zoomed terminal&quot;&quot;&quot;</span>
<span class="n">prop</span> <span class="o">=</span> <span class="bp">None</span> <span class="n">prop</span> <span class="o">=</span> <span class="bp">None</span>
<span class="n">parent</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_parent</span><span class="p">()</span>
<span class="n">window</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_toplevel</span><span class="p">()</span> <span class="n">window</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_toplevel</span><span class="p">()</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>

View File

@ -252,6 +252,7 @@
<div class="viewcode-block" id="manual_lookup"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.util.manual_lookup">[docs]</a><span class="k">def</span> <span class="nf">manual_lookup</span><span class="p">():</span> <div class="viewcode-block" id="manual_lookup"><a class="viewcode-back" href="../../terminatorlib.html#terminatorlib.util.manual_lookup">[docs]</a><span class="k">def</span> <span class="nf">manual_lookup</span><span class="p">():</span>
<span class="sd">&#39;&#39;&#39;Choose the manual to open based on LANGUAGE&#39;&#39;&#39;</span> <span class="sd">&#39;&#39;&#39;Choose the manual to open based on LANGUAGE&#39;&#39;&#39;</span>
<span class="n">prefix</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">sep</span><span class="p">,</span> <span class="s">&#39;usr&#39;</span><span class="p">,</span> <span class="s">&#39;share&#39;</span><span class="p">,</span> <span class="s">&#39;doc&#39;</span><span class="p">,</span> <span class="s">&#39;terminator&#39;</span><span class="p">)</span> <span class="n">prefix</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">sep</span><span class="p">,</span> <span class="s">&#39;usr&#39;</span><span class="p">,</span> <span class="s">&#39;share&#39;</span><span class="p">,</span> <span class="s">&#39;doc&#39;</span><span class="p">,</span> <span class="s">&#39;terminator&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="s">&#39;LANGUAGE&#39;</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">:</span>
<span class="n">languages</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s">&#39;LANGUAGE&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39;:&#39;</span><span class="p">)</span> <span class="n">languages</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s">&#39;LANGUAGE&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39;:&#39;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">language</span> <span class="ow">in</span> <span class="n">languages</span><span class="p">:</span> <span class="k">for</span> <span class="n">language</span> <span class="ow">in</span> <span class="n">languages</span><span class="p">:</span>
<span class="n">full_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">prefix</span><span class="p">,</span> <span class="s">&#39;html_</span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">language</span><span class="p">),</span> <span class="s">&#39;index.html&#39;</span><span class="p">)</span> <span class="n">full_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">prefix</span><span class="p">,</span> <span class="s">&#39;html_</span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">language</span><span class="p">),</span> <span class="s">&#39;index.html&#39;</span><span class="p">)</span>

View File

@ -3629,6 +3629,10 @@
</dt> </dt>
<dt><a href="terminatorlib.html#terminatorlib.cwd.psutil_cwd">psutil_cwd() (in module terminatorlib.cwd)</a>
</dt>
<dt><a href="terminatorlib.html#terminatorlib.debugserver.PythonConsoleServer">PythonConsoleServer (class in terminatorlib.debugserver)</a> <dt><a href="terminatorlib.html#terminatorlib.debugserver.PythonConsoleServer">PythonConsoleServer (class in terminatorlib.debugserver)</a>
</dt> </dt>

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -546,7 +546,7 @@ displaying meaningful error messages.</p>
<dl class="attribute"> <dl class="attribute">
<dt id="terminatorlib.configobj.configobj.ConfigObj._sectionmarker"> <dt id="terminatorlib.configobj.configobj.ConfigObj._sectionmarker">
<code class="descname">_sectionmarker</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x8f8c8b0&gt;</em><a class="headerlink" href="#terminatorlib.configobj.configobj.ConfigObj._sectionmarker" title="Permalink to this definition"></a></dt> <code class="descname">_sectionmarker</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x9cb2d18&gt;</em><a class="headerlink" href="#terminatorlib.configobj.configobj.ConfigObj._sectionmarker" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="attribute"> <dl class="attribute">
@ -561,12 +561,12 @@ displaying meaningful error messages.</p>
<dl class="attribute"> <dl class="attribute">
<dt id="terminatorlib.configobj.configobj.ConfigObj._triple_quote"> <dt id="terminatorlib.configobj.configobj.ConfigObj._triple_quote">
<code class="descname">_triple_quote</code><em class="property"> = {&quot;'''&quot;: (&lt;_sre.SRE_Pattern object at 0x42de2138&gt;, &lt;_sre.SRE_Pattern object at 0x42ab4e20&gt;), '&quot;&quot;&quot;': (&lt;_sre.SRE_Pattern object at 0x42de2250&gt;, &lt;_sre.SRE_Pattern object at 0x42ab4c20&gt;)}</em><a class="headerlink" href="#terminatorlib.configobj.configobj.ConfigObj._triple_quote" title="Permalink to this definition"></a></dt> <code class="descname">_triple_quote</code><em class="property"> = {&quot;'''&quot;: (&lt;_sre.SRE_Pattern object at 0x42e8a480&gt;, &lt;_sre.SRE_Pattern object at 0x42c34d20&gt;), '&quot;&quot;&quot;': (&lt;_sre.SRE_Pattern object at 0x42e8a138&gt;, &lt;_sre.SRE_Pattern object at 0x42e54020&gt;)}</em><a class="headerlink" href="#terminatorlib.configobj.configobj.ConfigObj._triple_quote" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="attribute"> <dl class="attribute">
<dt id="terminatorlib.configobj.configobj.ConfigObj._valueexp"> <dt id="terminatorlib.configobj.configobj.ConfigObj._valueexp">
<code class="descname">_valueexp</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x8fef6f8&gt;</em><a class="headerlink" href="#terminatorlib.configobj.configobj.ConfigObj._valueexp" title="Permalink to this definition"></a></dt> <code class="descname">_valueexp</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x9c9e758&gt;</em><a class="headerlink" href="#terminatorlib.configobj.configobj.ConfigObj._valueexp" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>
@ -1114,7 +1114,7 @@ value: object to be checked</dd>
<dl class="attribute"> <dl class="attribute">
<dt id="terminatorlib.configobj.validate.Validator._list_arg"> <dt id="terminatorlib.configobj.validate.Validator._list_arg">
<code class="descname">_list_arg</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x8f72290&gt;</em><a class="headerlink" href="#terminatorlib.configobj.validate.Validator._list_arg" title="Permalink to this definition"></a></dt> <code class="descname">_list_arg</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x9cc0830&gt;</em><a class="headerlink" href="#terminatorlib.configobj.validate.Validator._list_arg" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="attribute"> <dl class="attribute">
@ -1124,12 +1124,12 @@ value: object to be checked</dd>
<dl class="attribute"> <dl class="attribute">
<dt id="terminatorlib.configobj.validate.Validator._matchfinder"> <dt id="terminatorlib.configobj.validate.Validator._matchfinder">
<code class="descname">_matchfinder</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x8f96278&gt;</em><a class="headerlink" href="#terminatorlib.configobj.validate.Validator._matchfinder" title="Permalink to this definition"></a></dt> <code class="descname">_matchfinder</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x9cc2db8&gt;</em><a class="headerlink" href="#terminatorlib.configobj.validate.Validator._matchfinder" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="attribute"> <dl class="attribute">
<dt id="terminatorlib.configobj.validate.Validator._paramfinder"> <dt id="terminatorlib.configobj.validate.Validator._paramfinder">
<code class="descname">_paramfinder</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x8ff51d0&gt;</em><a class="headerlink" href="#terminatorlib.configobj.validate.Validator._paramfinder" title="Permalink to this definition"></a></dt> <code class="descname">_paramfinder</code><em class="property"> = &lt;_sre.SRE_Pattern object at 0x9cc1f08&gt;</em><a class="headerlink" href="#terminatorlib.configobj.validate.Validator._paramfinder" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
</dd></dl> </dd></dl>

View File

@ -905,6 +905,12 @@ more complex requirements</p>
insert it into, e.g. /proc/%s/cwd</p> insert it into, e.g. /proc/%s/cwd</p>
</dd></dl> </dd></dl>
<dl class="function">
<dt id="terminatorlib.cwd.psutil_cwd">
<code class="descclassname">terminatorlib.cwd.</code><code class="descname">psutil_cwd</code><span class="sig-paren">(</span><em>pid</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/terminatorlib/cwd.html#psutil_cwd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#terminatorlib.cwd.psutil_cwd" title="Permalink to this definition"></a></dt>
<dd><p>Determine the cwd using psutil which also supports Darwin</p>
</dd></dl>
<dl class="function"> <dl class="function">
<dt id="terminatorlib.cwd.sunos_get_pid_cwd"> <dt id="terminatorlib.cwd.sunos_get_pid_cwd">
<code class="descclassname">terminatorlib.cwd.</code><code class="descname">sunos_get_pid_cwd</code><span class="sig-paren">(</span><em>pid</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/terminatorlib/cwd.html#sunos_get_pid_cwd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#terminatorlib.cwd.sunos_get_pid_cwd" title="Permalink to this definition"></a></dt> <code class="descclassname">terminatorlib.cwd.</code><code class="descname">sunos_get_pid_cwd</code><span class="sig-paren">(</span><em>pid</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/terminatorlib/cwd.html#sunos_get_pid_cwd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#terminatorlib.cwd.sunos_get_pid_cwd" title="Permalink to this definition"></a></dt>
@ -1464,7 +1470,7 @@ or None on failure.</p>
<dl class="attribute"> <dl class="attribute">
<dt id="terminatorlib.ipc.DBusService._dbus_class_table"> <dt id="terminatorlib.ipc.DBusService._dbus_class_table">
<code class="descname">_dbus_class_table</code><em class="property"> = {'dbus.service.Interface': {}, 'dbus.service.FallbackObject': {'org.freedesktop.DBus.Introspectable': {'Introspect': &lt;function Introspect at 0x4330cb8c&gt;}}, 'dbus.service.Object': {'org.freedesktop.DBus.Introspectable': {'Introspect': &lt;function Introspect at 0x4330cb8c&gt;}}, 'terminatorlib.ipc.DBusService': {'org.freedesktop.DBus.Introspectable': {'Introspect': &lt;function Introspect at 0x4330cb8c&gt;}, 'net.tenshu.Terminator_0x3bcbf226': {'get_terminal_tab': &lt;function get_terminal_tab at 0x4334448c&gt;, 'terminal_hsplit': &lt;function terminal_hsplit at 0x4334456c&gt;, 'terminal_vsplit': &lt;function terminal_vsplit at 0x43344534&gt;, 'new_window': &lt;function new_window at 0x433445dc&gt;, 'get_terminals': &lt;function get_terminals at 0x433444c4&gt;, 'new_tab': &lt;function new_tab at 0x433445a4&gt;, 'get_terminal_tab_title': &lt;function get_terminal_tab_title at 0x433446bc&gt;}}}</em><a class="headerlink" href="#terminatorlib.ipc.DBusService._dbus_class_table" title="Permalink to this definition"></a></dt> <code class="descname">_dbus_class_table</code><em class="property"> = {'dbus.service.Interface': {}, 'dbus.service.FallbackObject': {'org.freedesktop.DBus.Introspectable': {'Introspect': &lt;function Introspect at 0x43533534&gt;}}, 'dbus.service.Object': {'org.freedesktop.DBus.Introspectable': {'Introspect': &lt;function Introspect at 0x43533534&gt;}}, 'terminatorlib.ipc.DBusService': {'org.freedesktop.DBus.Introspectable': {'Introspect': &lt;function Introspect at 0x43533534&gt;}, 'net.tenshu.Terminator_0x3bcad31e': {'get_terminal_tab': &lt;function get_terminal_tab at 0x436f1144&gt;, 'terminal_hsplit': &lt;function terminal_hsplit at 0x436f1064&gt;, 'terminal_vsplit': &lt;function terminal_vsplit at 0x436f109c&gt;, 'new_window': &lt;function new_window at 0x43519fb4&gt;, 'get_terminals': &lt;function get_terminals at 0x436f110c&gt;, 'new_tab': &lt;function new_tab at 0x436f102c&gt;, 'get_terminal_tab_title': &lt;function get_terminal_tab_title at 0x436f117c&gt;}}}</em><a class="headerlink" href="#terminatorlib.ipc.DBusService._dbus_class_table" title="Permalink to this definition"></a></dt>
<dd></dd></dl> <dd></dd></dl>
<dl class="attribute"> <dl class="attribute">

View File

@ -12,7 +12,7 @@
Getting Started Getting Started
=============== ===============
This page is an introduction and tutorial, that will get you familiar This page is an introduction and tutorial that will get you familiar
with Terminator's features. Additional functional areas are explored with Terminator's features. Additional functional areas are explored
in other pages, but at the end of this page you'll be getting a good in other pages, but at the end of this page you'll be getting a good
idea of the power of Terminator. idea of the power of Terminator.
@ -319,15 +319,19 @@ The above action results in the following:
The other way to drag a terminal can be done from within the terminal with The other way to drag a terminal can be done from within the terminal with
``Ctrl``\ +\ ``right-click-drag``\ . With this method once you start the ``Ctrl``\ +\ ``right-click-drag``\ . With this method once you start the
grag, you *must* release the ``Ctrl`` key *before* releasing the drag, you *must* release the ``Ctrl`` key *before* releasing the
``right-mouse-button``. If you do not the drag will cancel. ``right-mouse-button``. If you do not the drag will cancel.
You can drag between tabs by initiating a drag and hovering over the tab. You can drag between tabs by initiating a drag and hovering over the tab.
Terminator will switch to the tab under the cursor, and the terminal can be Terminator will switch to the tab under the cursor, you can then drag to the
dropped. desired position, and the terminal can be dropped.
You can also drag between Terminator windows *provided the windows are part You can also drag between Terminator windows *provided the windows are part
of the same process*. By default all windows will be part of the same process. of the same process*. By default all windows will be part of the same process.
Windows will not be part of the same process if you deliberately turn off
the :ref:`DBus` interface with the :ref:`Preferences <preferences>` or the
:ref:`command-line-options` when starting Terminator up. :ref:`Layouts <layouts>`
are also currently isolated at a process level for technical reasons.
.. _layout-shortcuts: .. _layout-shortcuts:

View File

@ -257,7 +257,7 @@
<img alt="Because this is the symbol learner drivers use in the UK." class="align-right" src="_images/icon_gettingstarted.png" /> <img alt="Because this is the symbol learner drivers use in the UK." class="align-right" src="_images/icon_gettingstarted.png" />
<div class="section" id="getting-started"> <div class="section" id="getting-started">
<span id="id1"></span><h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h1> <span id="id1"></span><h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h1>
<p>This page is an introduction and tutorial, that will get you familiar <p>This page is an introduction and tutorial that will get you familiar
with Terminator&#8217;s features. Additional functional areas are explored with Terminator&#8217;s features. Additional functional areas are explored
in other pages, but at the end of this page you&#8217;ll be getting a good in other pages, but at the end of this page you&#8217;ll be getting a good
idea of the power of Terminator.</p> idea of the power of Terminator.</p>
@ -604,13 +604,17 @@ an existing terminal.</p>
<img alt="_images/dragterminal_02.png" src="_images/dragterminal_02.png" /> <img alt="_images/dragterminal_02.png" src="_images/dragterminal_02.png" />
<p>The other way to drag a terminal can be done from within the terminal with <p>The other way to drag a terminal can be done from within the terminal with
<code class="docutils literal"><span class="pre">Ctrl</span></code>+<code class="docutils literal"><span class="pre">right-click-drag</span></code>. With this method once you start the <code class="docutils literal"><span class="pre">Ctrl</span></code>+<code class="docutils literal"><span class="pre">right-click-drag</span></code>. With this method once you start the
grag, you <em>must</em> release the <code class="docutils literal"><span class="pre">Ctrl</span></code> key <em>before</em> releasing the drag, you <em>must</em> release the <code class="docutils literal"><span class="pre">Ctrl</span></code> key <em>before</em> releasing the
<code class="docutils literal"><span class="pre">right-mouse-button</span></code>. If you do not the drag will cancel.</p> <code class="docutils literal"><span class="pre">right-mouse-button</span></code>. If you do not the drag will cancel.</p>
<p>You can drag between tabs by initiating a drag and hovering over the tab. <p>You can drag between tabs by initiating a drag and hovering over the tab.
Terminator will switch to the tab under the cursor, and the terminal can be Terminator will switch to the tab under the cursor, you can then drag to the
dropped.</p> desired position, and the terminal can be dropped.</p>
<p>You can also drag between Terminator windows <em>provided the windows are part <p>You can also drag between Terminator windows <em>provided the windows are part
of the same process</em>. By default all windows will be part of the same process.</p> of the same process</em>. By default all windows will be part of the same process.
Windows will not be part of the same process if you deliberately turn off
the <a class="reference internal" href="advancedusage.html#dbus"><span>DBus</span></a> interface with the <a class="reference internal" href="preferences.html#preferences"><span>Preferences</span></a> or the
<a class="reference internal" href="advancedusage.html#command-line-options"><span>Command line options</span></a> when starting Terminator up. <a class="reference internal" href="layouts.html#layouts"><span>Layouts</span></a>
are also currently isolated at a process level for technical reasons.</p>
</div> </div>
<div class="section" id="using-the-keyboard"> <div class="section" id="using-the-keyboard">
<span id="layout-shortcuts"></span><h3>Using the keyboard<a class="headerlink" href="#using-the-keyboard" title="Permalink to this headline"></a></h3> <span id="layout-shortcuts"></span><h3>Using the keyboard<a class="headerlink" href="#using-the-keyboard" title="Permalink to this headline"></a></h3>

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
Getting Started Getting Started
=============== ===============
This page is an introduction and tutorial, that will get you familiar This page is an introduction and tutorial that will get you familiar
with Terminator's features. Additional functional areas are explored with Terminator's features. Additional functional areas are explored
in other pages, but at the end of this page you'll be getting a good in other pages, but at the end of this page you'll be getting a good
idea of the power of Terminator. idea of the power of Terminator.
@ -319,15 +319,19 @@ The above action results in the following:
The other way to drag a terminal can be done from within the terminal with The other way to drag a terminal can be done from within the terminal with
``Ctrl``\ +\ ``right-click-drag``\ . With this method once you start the ``Ctrl``\ +\ ``right-click-drag``\ . With this method once you start the
grag, you *must* release the ``Ctrl`` key *before* releasing the drag, you *must* release the ``Ctrl`` key *before* releasing the
``right-mouse-button``. If you do not the drag will cancel. ``right-mouse-button``. If you do not the drag will cancel.
You can drag between tabs by initiating a drag and hovering over the tab. You can drag between tabs by initiating a drag and hovering over the tab.
Terminator will switch to the tab under the cursor, and the terminal can be Terminator will switch to the tab under the cursor, you can then drag to the
dropped. desired position, and the terminal can be dropped.
You can also drag between Terminator windows *provided the windows are part You can also drag between Terminator windows *provided the windows are part
of the same process*. By default all windows will be part of the same process. of the same process*. By default all windows will be part of the same process.
Windows will not be part of the same process if you deliberately turn off
the :ref:`DBus` interface with the :ref:`Preferences <preferences>` or the
:ref:`command-line-options` when starting Terminator up. :ref:`Layouts <layouts>`
are also currently isolated at a process level for technical reasons.
.. _layout-shortcuts: .. _layout-shortcuts: