Advertisement
Guest User

Untitled

a guest
Dec 27th, 2015
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.98 KB | None | 0 0
  1. Nick@NICK-PC MINGW64 ~/GCI/sugar
  2. $ git clone https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  3. Cloning into 'sugar-toolkit-gtk3'...
  4. remote: Counting objects: 36123, done.
  5. remote: Total 36123 (delta 0), reused 0 (delta 0), pack-reused 36123
  6. Receiving objects: 100% (36123/36123), 13.58 MiB | 1024.00 KiB/s, done.
  7. Resolving deltas: 100% (20448/20448), done.
  8. Checking connectivity... done.
  9.  
  10. Nick@NICK-PC MINGW64 ~/GCI/sugar
  11. $ git add .
  12. fatal: Not a git repository (or any of the parent directories): .git
  13.  
  14. Nick@NICK-PC MINGW64 ~/GCI/sugar
  15. $ cd sugar-toolkit-gtk3
  16.  
  17. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  18. $ git add .
  19.  
  20. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  21. $ git commit -m "Write documentation for sugar3.graphics.style"
  22. [master 8798b08] Write documentation for sugar3.graphics.style
  23. 1 file changed, 60 insertions(+), 7 deletions(-)
  24.  
  25. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  26. $ git push origin master
  27. Counting objects: 6, done.
  28. Delta compression using up to 8 threads.
  29. Compressing objects: 100% (6/6), done.
  30. Writing objects: 100% (6/6), 1.26 KiB | 0 bytes/s, done.
  31. Total 6 (delta 4), reused 0 (delta 0)
  32. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  33. 7ba120f..8798b08 master -> master
  34.  
  35. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  36. $ git add .
  37.  
  38. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  39. $ git commit -m "Write documentation for sugar3.graphics.style"
  40. [master 986cf22] Write documentation for sugar3.graphics.style
  41. 1 file changed, 31 insertions(+), 31 deletions(-)
  42.  
  43. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  44. $ git rebase -i master
  45. Successfully rebased and updated refs/heads/master.
  46.  
  47. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  48. $ git rebase -i HEAD~2 master
  49. [detached HEAD 95bb3c0] Write documentation for sugar3.graphics.style
  50. Date: Sun Dec 27 18:39:43 2015 -0500
  51. 1 file changed, 60 insertions(+), 7 deletions(-)
  52.  
  53. Successfully rebased and updated refs/heads/master.
  54.  
  55. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  56. $
  57.  
  58. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  59. $ git push origin master
  60. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  61. ! [rejected] master -> master (non-fast-forward)
  62. error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
  63. hint: Updates were rejected because the tip of your current branch is behind
  64. hint: its remote counterpart. Integrate the remote changes (e.g.
  65. hint: 'git pull ...') before pushing again.
  66. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  67.  
  68. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  69. $ git pull
  70. Auto-merging src/sugar3/graphics/style.py
  71. CONFLICT (content): Merge conflict in src/sugar3/graphics/style.py
  72. Automatic merge failed; fix conflicts and then commit the result.
  73.  
  74. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  75. $ git add .
  76.  
  77. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  78. $ git log
  79. commit 95bb3c0979b4db2fed225107b6b1cc333183b853
  80. Author: radicalonion <ndefilippis98@gmail.com>
  81. Date: Sun Dec 27 18:39:43 2015 -0500
  82.  
  83. Write documentation for sugar3.graphics.style
  84.  
  85. commit 7ba120fe25eab020af3e0bd9ff51d3862407e0ac
  86. Author: James Cameron <quozl@laptop.org>
  87. Date: Mon Dec 21 14:18:28 2015 +1100
  88.  
  89. Fix persistent tree view palettes
  90.  
  91. A rework of the TreeViewInvoker used by the journal and activity list.
  92.  
  93. Fixes a persistent journal entry palette that reappears in journal or
  94. home view. https://bugs.sugarlabs.org/ticket/4918
  95.  
  96. Also fixes an over-sensitive journal icon; with the journal mostly
  97. empty, rapidly move the mouse from the bottom of the screen into the
  98. lowest icon and then out again. Before this patch, the palette was
  99. shown. After this patch, the mouse must rest in the icon.
  100.  
  101. Changes made:
  102.  
  103. - override _ensure_palette_exists in parent class Invoker,
  104.  
  105. - remove reference to MouseSpeedDetector, it is no longer required,
  106.  
  107. - remove enter and leave events; they are for the TreeView as a whole,
  108. and are not required,
  109.  
  110. - properly detect that None is returned by get_path_at_pos, when the
  111. coordinates are outside the TreeView cells.
  112.  
  113. Not fixed:
  114.  
  115. - moving the mouse out of the journal icon invoker does not popdown the
  116. palette, but it does when moving the mouse out of the activity icon in
  117. the activity list; so this is a problem beyond the invoker,
  118.  
  119. Tested on Fedora 18 and Ubuntu 15.10.
  120.  
  121. Test cases:
  122.  
  123. - check a click will activate item,
  124.  
  125. - check a right-click will show palette,
  126.  
  127. - check a mouse hover will show palette,
  128.  
  129. - check a brief mouse passing will not show palette,
  130.  
  131. - check if mouse leaving palette will popdown.
  132.  
  133. commit b1386665b11f6e6246963cffbe811bafbfb9bae3
  134. Merge: e3b61a0 c75655a
  135. Author: Sam Parkinson <sam@sam.today>
  136. Date: Sun Dec 20 17:21:01 2015 +1100
  137.  
  138. Merge branch 'master' of https://github.com/mjuvekar7/sugar-toolkit-gtk3
  139.  
  140. commit e3b61a0ee0350ba1454d0d21ac73b8150d78dee4
  141. Merge: 739dacb ae80df7
  142. Author: Gonzalo Odiard <godiard@gmail.com>
  143. Date: Wed Dec 16 06:37:08 2015 -0500
  144.  
  145. Merge pull request #278 from quozl/2015-12-15-icon-size
  146.  
  147. Fix remaining icon_size references
  148.  
  149.  
  150. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  151. $ uit
  152. bash: uit: command not found
  153.  
  154. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  155. $ git log
  156. commit 95bb3c0979b4db2fed225107b6b1cc333183b853
  157. Author: radicalonion <ndefilippis98@gmail.com>
  158. Date: Sun Dec 27 18:39:43 2015 -0500
  159.  
  160. Write documentation for sugar3.graphics.style
  161.  
  162. commit 7ba120fe25eab020af3e0bd9ff51d3862407e0ac
  163. Author: James Cameron <quozl@laptop.org>
  164. Date: Mon Dec 21 14:18:28 2015 +1100
  165.  
  166. Fix persistent tree view palettes
  167.  
  168. A rework of the TreeViewInvoker used by the journal and activity list.
  169.  
  170. Fixes a persistent journal entry palette that reappears in journal or
  171. home view. https://bugs.sugarlabs.org/ticket/4918
  172.  
  173. Also fixes an over-sensitive journal icon; with the journal mostly
  174. empty, rapidly move the mouse from the bottom of the screen into the
  175. lowest icon and then out again. Before this patch, the palette was
  176. shown. After this patch, the mouse must rest in the icon.
  177.  
  178. Changes made:
  179.  
  180. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  181. $ git add .
  182.  
  183. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  184. $ git push origin master
  185. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  186. ! [rejected] master -> master (non-fast-forward)
  187. error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
  188. hint: Updates were rejected because the tip of your current branch is behind
  189. hint: its remote counterpart. Integrate the remote changes (e.g.
  190. hint: 'git pull ...') before pushing again.
  191. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  192.  
  193. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  194. $ git pull origin master
  195. error: You have not concluded your merge (MERGE_HEAD exists).
  196. hint: Please, commit your changes before merging.
  197. fatal: Exiting because of unfinished merge.
  198.  
  199. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  200. $ git merge --abort
  201.  
  202. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  203. $ git push origin master
  204. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  205. ! [rejected] master -> master (non-fast-forward)
  206. error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
  207. hint: Updates were rejected because the tip of your current branch is behind
  208. hint: its remote counterpart. Integrate the remote changes (e.g.
  209. hint: 'git pull ...') before pushing again.
  210. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  211.  
  212. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  213. $ git pull origin master
  214. From https://github.com/ndefilippis/sugar-toolkit-gtk3
  215. * branch master -> FETCH_HEAD
  216. Auto-merging src/sugar3/graphics/style.py
  217. CONFLICT (content): Merge conflict in src/sugar3/graphics/style.py
  218. Automatic merge failed; fix conflicts and then commit the result.
  219.  
  220. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  221. $ git remote -v
  222. origin https://github.com/ndefilippis/sugar-toolkit-gtk3.git (fetch)
  223. origin https://github.com/ndefilippis/sugar-toolkit-gtk3.git (push)
  224.  
  225. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master|MERGING)
  226. $ git merge --abort
  227.  
  228. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  229. $ git add .
  230.  
  231. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  232. $ git commit -m "Write documentation for sugar3.graphics.style"
  233. On branch master
  234. Your branch and 'origin/master' have diverged,
  235. and have 1 and 1 different commit each, respectively.
  236. (use "git pull" to merge the remote branch into yours)
  237. nothing to commit, working directory clean
  238.  
  239. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  240. $ https://github.com/sugarlabs/sugar-toolkit-gtk3.git"
  241. > ^C
  242.  
  243. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  244. $ git remote add sugarlabs https://github.com/sugarlabs/sugar-toolkit-gtk3.git
  245.  
  246. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  247. $ git fetch sugar labs
  248. fatal: 'sugar' does not appear to be a git repository
  249. fatal: Could not read from remote repository.
  250.  
  251. Please make sure you have the correct access rights
  252. and the repository exists.
  253.  
  254. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  255. $ git fetch sugarlabs
  256. remote: Counting objects: 18, done.
  257. remote: Total 18 (delta 12), reused 12 (delta 12), pack-reused 6
  258. Unpacking objects: 100% (18/18), done.
  259. From https://github.com/sugarlabs/sugar-toolkit-gtk3
  260. * [new branch] ActivityDocStrings2 -> sugarlabs/ActivityDocStrings2
  261. * [new branch] html -> sugarlabs/html
  262. * [new branch] html2 -> sugarlabs/html2
  263. * [new branch] master -> sugarlabs/master
  264. * [new branch] po -> sugarlabs/po
  265. * [new branch] revert-276-2015-12-15-icon-size -> sugarlabs/revert-276-2015-12-15-icon-size
  266. * [new branch] review -> sugarlabs/review
  267. * [new branch] silbe-rework-20111122 -> sugarlabs/silbe-rework-20111122
  268. * [new branch] silbe-rework-20111205 -> sugarlabs/silbe-rework-20111205
  269. * [new branch] sucrose-0.100 -> sugarlabs/sucrose-0.100
  270. * [new branch] sucrose-0.102 -> sugarlabs/sucrose-0.102
  271. * [new branch] sucrose-0.104 -> sugarlabs/sucrose-0.104
  272. * [new branch] sucrose-0.106 -> sugarlabs/sucrose-0.106
  273. * [new branch] sucrose-0.96 -> sugarlabs/sucrose-0.96
  274. * [new branch] sucrose-0.98 -> sugarlabs/sucrose-0.98
  275.  
  276. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (master)
  277. $ git checkout -b styledocs sugarlabs/master
  278. Branch styledocs set up to track remote branch master from sugarlabs.
  279. Switched to a new branch 'styledocs'
  280.  
  281. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  282. $ git branch
  283. master
  284. * styledocs
  285.  
  286. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  287. $ git log
  288. commit 51057baef5efe147c00c552f2be42dc77f336ee8
  289. Author: mandarj7 <mjuvekar7@gmail.com>
  290. Date: Wed Dec 23 16:59:26 2015 +0530
  291.  
  292. Add usage example to sugar3.graphics.objectchooser
  293.  
  294. commit c95d74eab4d66eab2c7766eea6c68471223da235
  295. Author: mandarj7 <mjuvekar7@gmail.com>
  296. Date: Wed Dec 23 16:55:25 2015 +0530
  297.  
  298. Improve docstrings in sugar3.graphics.objectchooser
  299.  
  300. commit 264ee2b5a325b166cb8b92d6c1908bad9a1d4ed5
  301. Author: mandarj7 <mjuvekar7@gmail.com>
  302. Date: Wed Dec 23 15:31:58 2015 +0530
  303.  
  304. Add and improve docs for sugar3.graphics.objectchooser
  305.  
  306. commit 7ba120fe25eab020af3e0bd9ff51d3862407e0ac
  307. Author: James Cameron <quozl@laptop.org>
  308. Date: Mon Dec 21 14:18:28 2015 +1100
  309.  
  310. Fix persistent tree view palettes
  311.  
  312.  
  313. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  314. $ git cherry-pick 95bb3c0979b4db2fed225107b6b1cc333183b853
  315. [styledocs 45b18f1] Write documentation for sugar3.graphics.style
  316. Date: Sun Dec 27 18:39:43 2015 -0500
  317. 1 file changed, 60 insertions(+), 7 deletions(-)
  318.  
  319. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  320. $ git log
  321. commit 45b18f1f8dfde56da89fb52b73f99334ee631343
  322. Author: radicalonion <ndefilippis98@gmail.com>
  323. Date: Sun Dec 27 18:39:43 2015 -0500
  324.  
  325. Write documentation for sugar3.graphics.style
  326.  
  327. commit 51057baef5efe147c00c552f2be42dc77f336ee8
  328. Author: mandarj7 <mjuvekar7@gmail.com>
  329. Date: Wed Dec 23 16:59:26 2015 +0530
  330.  
  331. Add usage example to sugar3.graphics.objectchooser
  332.  
  333. commit c95d74eab4d66eab2c7766eea6c68471223da235
  334. Author: mandarj7 <mjuvekar7@gmail.com>
  335. Date: Wed Dec 23 16:55:25 2015 +0530
  336.  
  337. Improve docstrings in sugar3.graphics.objectchooser
  338.  
  339. commit 264ee2b5a325b166cb8b92d6c1908bad9a1d4ed5
  340. Author: mandarj7 <mjuvekar7@gmail.com>
  341. Date: Wed Dec 23 15:31:58 2015 +0530
  342.  
  343. Add and improve docs for sugar3.graphics.objectchooser
  344.  
  345. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  346. $ git reset --soft 51057ba
  347.  
  348. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  349. $ git status
  350. On branch styledocs
  351. Your branch is up-to-date with 'sugarlabs/master'.
  352. Changes to be committed:
  353. (use "git reset HEAD <file>..." to unstage)
  354.  
  355. modified: src/sugar3/graphics/style.py
  356.  
  357.  
  358. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  359. $ git commit -m "Write docs for sugar3.graphics.style"
  360. [styledocs 661ab91] Write docs for sugar3.graphics.style
  361. 1 file changed, 60 insertions(+), 7 deletions(-)
  362.  
  363. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  364. $ git push origin master
  365. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  366. ! [rejected] master -> master (non-fast-forward)
  367. error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
  368. hint: Updates were rejected because a pushed branch tip is behind its remote
  369. hint: counterpart. Check out this branch and integrate the remote changes
  370. hint: (e.g. 'git pull ...') before pushing again.
  371. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  372.  
  373. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  374. $ git pull origin master
  375. From https://github.com/ndefilippis/sugar-toolkit-gtk3
  376. * branch master -> FETCH_HEAD
  377. Auto-merging src/sugar3/graphics/style.py
  378. CONFLICT (content): Merge conflict in src/sugar3/graphics/style.py
  379. Automatic merge failed; fix conflicts and then commit the result.
  380.  
  381. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs|MERGING)
  382. $ git status
  383. On branch styledocs
  384. Your branch is ahead of 'sugarlabs/master' by 1 commit.
  385. (use "git push" to publish your local commits)
  386. You have unmerged paths.
  387. (fix conflicts and run "git commit")
  388.  
  389. Unmerged paths:
  390. (use "git add <file>..." to mark resolution)
  391.  
  392. both modified: src/sugar3/graphics/style.py
  393.  
  394. no changes added to commit (use "git add" and/or "git commit -a")
  395.  
  396. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs|MERGING)
  397. $ git add .
  398.  
  399. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs|MERGING)
  400. $ git commit -m "Write docs for sugar3.graphics.style"
  401. [styledocs 948673d] Write docs for sugar3.graphics.style
  402.  
  403. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  404. $ git push origin master
  405. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  406. ! [rejected] master -> master (non-fast-forward)
  407. error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
  408. hint: Updates were rejected because a pushed branch tip is behind its remote
  409. hint: counterpart. Check out this branch and integrate the remote changes
  410. hint: (e.g. 'git pull ...') before pushing again.
  411. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  412.  
  413. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  414. $ git pull origin master
  415. From https://github.com/ndefilippis/sugar-toolkit-gtk3
  416. * branch master -> FETCH_HEAD
  417. Already up-to-date.
  418.  
  419. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  420. $ git push origin master
  421. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  422. ! [rejected] master -> master (non-fast-forward)
  423. error: failed to push some refs to 'https://github.com/ndefilippis/sugar-toolkit-gtk3.git'
  424. hint: Updates were rejected because a pushed branch tip is behind its remote
  425. hint: counterpart. Check out this branch and integrate the remote changes
  426. hint: (e.g. 'git pull ...') before pushing again.
  427. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  428.  
  429. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  430. $ git push origin styledocs
  431. Counting objects: 30, done.
  432. Delta compression using up to 8 threads.
  433. Compressing objects: 100% (30/30), done.
  434. Writing objects: 100% (30/30), 3.71 KiB | 0 bytes/s, done.
  435. Total 30 (delta 20), reused 0 (delta 0)
  436. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  437. * [new branch] styledocs -> styledocs
  438.  
  439. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  440. $ git reset --soft 51057ba
  441.  
  442. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  443. $ git diff --cached
  444. diff --git a/src/sugar3/graphics/style.py b/src/sugar3/graphics/style.py
  445. index d8d8589..dea88d6 100644
  446. --- a/src/sugar3/graphics/style.py
  447. +++ b/src/sugar3/graphics/style.py
  448. @@ -15,12 +15,14 @@
  449. # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  450. # Boston, MA 02111-1307, USA.
  451.  
  452. -"""
  453. +'''
  454. +The style module defines constants for spacing and sizing, as well as classes for
  455. +Colors and Fonts. Text rendering is handled by Pango and colors are inputted by their
  456. +HTML code (e.g. #FFFFFFFF)
  457. +
  458. All the constants are expressed in pixels. They are defined for the XO screen
  459. and are usually adapted to different resolution by applying a zoom factor.
  460. -
  461. -STABLE.
  462. -"""
  463. +'''
  464.  
  465. import os
  466. import logging
  467. @@ -36,6 +38,17 @@ ELLIPSIZE_MODE_DEFAULT = Pango.EllipsizeMode.END
  468.  
  469.  
  470. def _compute_zoom_factor():
  471. +<<<<<<< HEAD
  472. + '''
  473. + Calculates zoom factor based on size of screen.
  474. + Returns double representing fraction of maximum possible screen size
  475. + '''
  476. +=======
  477. + '''
  478. + Calculates zoom factor based on size of screen.
  479. + Returns double representing fraction of maximum possible screen size
  480. + '''
  481. +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
  482. try:
  483. scaling = int(os.environ.get('SUGAR_SCALING', '100'))
  484. return scaling / 100.0
  485. @@ -46,39 +59,107 @@ def _compute_zoom_factor():
  486.  
  487.  
  488. class Font(object):
  489. -
  490. +<<<<<<< HEAD
  491. + '''
  492. + A font defines the style of how the text should be rendered.
  493. +
  494. + Args:
  495. + desc (str): a description of the Font object
  496. + '''
  497. +=======
  498. + '''
  499. + A font defines the style of how the text should be rendered.
  500. +
  501. + Args:
  502. + desc (str): a description of the Font object
  503. + '''
  504. +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
  505. def __init__(self, desc):
  506. self._desc = desc
  507.  
  508. def __str__(self):
  509. + '''
  510. + Returns description of font
  511. + '''
  512. return self._desc
  513.  
  514. def get_pango_desc(self):
  515. + '''
  516. + Returns Pango description of font
  517. + '''
  518. return Pango.FontDescription(self._desc)
  519.  
  520.  
  521. class Color(object):
  522. -
  523. +<<<<<<< HEAD
  524. + '''
  525. + A Color object defines a specific color.
  526. +
  527. + Args:
  528. + color (str): String in the form #FFFFFF representing the color
  529. +
  530. + alpha (double): transparency of color
  531. + '''
  532. +=======
  533. + '''
  534. + A Color object defines a specific color.
  535. +
  536. + Args:
  537. + color (str): String in the form #FFFFFF representing the color
  538. +
  539. + alpha (double): transparency of color
  540. + '''
  541. +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
  542. def __init__(self, color, alpha=1.0):
  543. self._r, self._g, self._b = self._html_to_rgb(color)
  544. self._a = alpha
  545.  
  546. def get_rgba(self):
  547. + '''
  548. + Returns 4-tuple of red, green, blue, and alpha levels in range 0-1
  549. + '''
  550. return (self._r, self._g, self._b, self._a)
  551.  
  552. def get_int(self):
  553. + '''
  554. + Returns color encoded as an int, in the form rgba
  555. + '''
  556. return int(self._a * 255) + (int(self._b * 255) << 8) + \
  557. (int(self._g * 255) << 16) + (int(self._r * 255) << 24)
  558.  
  559. def get_gdk_color(self):
  560. +<<<<<<< HEAD
  561. + '''
  562. + Returns GDK standard color
  563. + '''
  564. +=======
  565. + '''
  566. + Returns GDK standard color
  567. + '''
  568. +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
  569. return Gdk.Color(int(self._r * 65535), int(self._g * 65535),
  570. int(self._b * 65535))
  571.  
  572. def get_html(self):
  573. +<<<<<<< HEAD
  574. + '''
  575. + Returns string in the standard html Color format (#FFFFFF)
  576. + '''
  577. +=======
  578. + '''
  579. + Returns string in the standard html Color format (#FFFFFF)
  580. + '''
  581. +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
  582. return '#%02x%02x%02x' % (self._r * 255, self._g * 255, self._b * 255)
  583.  
  584. def _html_to_rgb(self, html_color):
  585. - """ #RRGGBB -> (r, g, b) tuple (in float format) """
  586. + '''
  587. + Converts and returns (r, g, b) tuple in float format from standard HTML format (#FFFFFF).
  588. + Colors will be in range 0-1
  589. +
  590. + Args:
  591. + html_color (string): html string in the format #FFFFFF
  592. + '''
  593.  
  594. html_color = html_color.strip()
  595. if html_color[0] == '#':
  596. @@ -93,6 +174,15 @@ class Color(object):
  597. return (r, g, b)
  598.  
  599. def get_svg(self):
  600. + '''
  601. + Returns HTML formatted color, unless the color is completely transparent, in
  602. + which case returns "none"
  603. + '''
  604. +<<<<<<< HEAD
  605. +
  606. +=======
  607. +
  608. +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
  609. if self._a == 0.0:
  610. return 'none'
  611. else:
  612. @@ -100,6 +190,21 @@ class Color(object):
  613.  
  614.  
  615. def zoom(units):
  616. +<<<<<<< HEAD
  617. + '''
  618. + Returns size of units pixels at current zoom level
  619. +
  620. + Args:
  621. + units (int): size of item at full size
  622. + '''
  623. +=======
  624. + '''
  625. + Returns size of units pixels at current zoom level
  626. +
  627. + Args:
  628. + units (int): size of item at full size
  629. + '''
  630. +>>>>>>> 8798b082aa242b7c5db1fcefc7fe444d8d17c7e8
  631. return int(ZOOM_FACTOR * units)
  632.  
  633.  
  634.  
  635. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  636. $ git add .
  637.  
  638. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  639. $ git commit -m "Write docs for sugar3.graphics.style"
  640. [styledocs 60dcdd2] Write docs for sugar3.graphics.style
  641. 1 file changed, 60 insertions(+), 7 deletions(-)
  642.  
  643. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  644. $ git push origin styledocs
  645. error: unable to read askpass response from 'C:/Users/Nick/AppData/Local/Programs/Git/mingw64/libexec/git-core/git-gui--askpass'
  646. Username for 'https://github.com':
  647.  
  648. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  649. $ git push --force origin styledocs
  650. Counting objects: 6, done.
  651. Delta compression using up to 8 threads.
  652. Compressing objects: 100% (6/6), done.
  653. Writing objects: 100% (6/6), 1.26 KiB | 0 bytes/s, done.
  654. Total 6 (delta 4), reused 0 (delta 0)
  655. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  656. + 948673d...60dcdd2 styledocs -> styledocs (forced update)
  657.  
  658. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  659. $ git add .
  660.  
  661. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  662. $ git commit -m "Write docs for sugar3.graphics.style"
  663. [styledocs bcab24e] Write docs for sugar3.graphics.style
  664. 1 file changed, 31 insertions(+), 31 deletions(-)
  665.  
  666. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  667. $ git push --force origin styledocs
  668. Counting objects: 6, done.
  669. Delta compression using up to 8 threads.
  670. Compressing objects: 100% (6/6), done.
  671. Writing objects: 100% (6/6), 669 bytes | 0 bytes/s, done.
  672. Total 6 (delta 4), reused 0 (delta 0)
  673. To https://github.com/ndefilippis/sugar-toolkit-gtk3.git
  674. 60dcdd2..bcab24e styledocs -> styledocs
  675.  
  676. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  677. Rebasing (1/1)i styledocs
  678. Successfully rebased and updated refs/heads/styledocs.
  679.  
  680. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 (styledocs)
  681. $ git rebase -i styledocs HEAD
  682. Successfully rebased and updated detached HEAD.
  683.  
  684. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 ((bcab24e...))
  685. $ git rebase -i styledocs HEAD~2
  686. Successfully rebased and updated detached HEAD.
  687.  
  688. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 ((bcab24e...))
  689. $ git reset --soft HEAD^
  690.  
  691. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 ((60dcdd2...))
  692. $ git commit --amend
  693. [detached HEAD f0c0954] Write docs for sugar3.graphics.style
  694. Date: Sun Dec 27 19:48:14 2015 -0500
  695. 1 file changed, 60 insertions(+), 7 deletions(-)
  696.  
  697. Nick@NICK-PC MINGW64 ~/GCI/sugar/sugar-toolkit-gtk3 ((f0c0954...))
  698. $ git push --force origin styledocs
  699. Everything up-to-date
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement