forked from andreagrandi/andreagrandi.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex43.html
More file actions
247 lines (231 loc) · 14.6 KB
/
index43.html
File metadata and controls
247 lines (231 loc) · 14.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Andrea Grandi</title>
<link rel="stylesheet" href="https://www.andreagrandi.it/theme/css/main.css" />
<link rel="stylesheet" href="https://www.andreagrandi.it/theme/tipuesearch/css/tipuesearch.css">
<link href="https://www.andreagrandi.it/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Andrea Grandi RSS Feed" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="https://www.andreagrandi.it/">Andrea Grandi </a></h1>
<nav><ul>
<li><a href="https://www.andreagrandi.it/about/">About</a></li>
<li><a href="https://www.andreagrandi.it/curriculum/">Curriculum</a></li>
<li><a href="https://www.andreagrandi.it/pgp-key/">PGP Key</a></li>
</ul>
<form id="search" action="https://www.andreagrandi.it/search.html" onsubmit="return validateForm(this.elements['q'].value);">
<input type="text" class="search-query" placeholder="" name="q" id="tipue_search_input">
</form>
</nav>
</header><!-- /#banner -->
<section id="content" class="body">
<ol id="posts-list" class="hfeed" start="3">
<li><article class="hentry">
<header>
<h1><a href="https://www.andreagrandi.it/2008/04/21/scratchbox-on-ubuntu-hardy-troubleshooting/" rel="bookmark"
title="Permalink to Scratchbox on Ubuntu Hardy troubleshooting">Scratchbox on Ubuntu Hardy troubleshooting</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<span>Mon 21 April 2008</span>
<span>| in <a href="https://www.andreagrandi.it/category/maemo-en.html">Maemo (EN)</a></span>
<span>| tags: <a href="https://www.andreagrandi.it/tag/maemo.html">maemo</a><a href="https://www.andreagrandi.it/tag/nokia.html">nokia</a><a href="https://www.andreagrandi.it/tag/scratchbox.html">scratchbox</a><a href="https://www.andreagrandi.it/tag/sdk.html">SDK</a><a href="https://www.andreagrandi.it/tag/tablet.html">tablet</a></span>
</footer><!-- /.post-info --> <p>Yesterday I <strong>upgraded</strong> from <strong>Ubuntu 7.10</strong> to the new <strong>8.04 RC</strong> and
I "broke" my Scratchbox installation. I tried to install it again and I
had still some problems logging into <strong>Scratchbox</strong> and installing the
<strong>SDK</strong>.</p>
<p>The I found this page:
<a href="http://suppressingfire.livejournal.com/35277.html">http://suppressingfire.livejournal.com/35277.html</a></p>
<p>that explain how to fix these problems. In particular if you get this
kind of error trying to log into Scratchbox:</p>
<p><code>Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!</code></p>
<p>You can fix it in this way:</p>
<p><code>echo 0 | sudo tee /proc/sys/vm/vdso_enabled</code></p>
<p>You can read the complete fix in my updated wiki:
<a href="http://www.ptlug.org/wiki/Howto_Installing_Maemo_SDK_4">http://www.ptlug.org/wiki/Howto_Installing_Maemo_SDK_4</a></p>
<a class="readmore" href="https://www.andreagrandi.it/2008/04/21/scratchbox-on-ubuntu-hardy-troubleshooting/">read more</a>
<p><a href="https://www.andreagrandi.it/2008/04/21/scratchbox-on-ubuntu-hardy-troubleshooting/#disqus_thread">comments</a></p> </div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="https://www.andreagrandi.it/2008/04/17/installing-maemo-sdk-4-howto-updated/" rel="bookmark"
title="Permalink to Installing Maemo SDK 4 HowTo Updated">Installing Maemo SDK 4 HowTo Updated</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<span>Thu 17 April 2008</span>
<span>| in <a href="https://www.andreagrandi.it/category/maemo-en.html">Maemo (EN)</a></span>
<span>| tags: <a href="https://www.andreagrandi.it/tag/chinook.html">chinook</a><a href="https://www.andreagrandi.it/tag/howto.html">HowTo</a><a href="https://www.andreagrandi.it/tag/maemo.html">maemo</a><a href="https://www.andreagrandi.it/tag/nokia.html">nokia</a><a href="https://www.andreagrandi.it/tag/sdk.html">SDK</a></span>
</footer><!-- /.post-info --> <p>I've updated my previous howto that explain how to install [Maemo SDK 4
(Chinook)]{style="font-weight: bold;"}. The other howto was written when
Maemo SDK 4 Beta was out, now it's updated to
[4.0.1]{style="font-weight: bold;"} version of the SDK.</p>
<p>You can find it, as usual, on this wiki:
<a href="http://www.ptlug.org/wiki/Howto_Installing_Maemo_SDK_4">http://www.ptlug.org/wiki/Howto_Installing_Maemo_SDK_4</a></p>
<p>If you have any suggestion or if you want to give me any idea to improve
this howto, please leave me a comment.</p>
<a class="readmore" href="https://www.andreagrandi.it/2008/04/17/installing-maemo-sdk-4-howto-updated/">read more</a>
<p><a href="https://www.andreagrandi.it/2008/04/17/installing-maemo-sdk-4-howto-updated/#disqus_thread">comments</a></p> </div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="https://www.andreagrandi.it/2008/04/15/using-gtkiconview-in-python-a-small-tutorial/" rel="bookmark"
title="Permalink to Using GtkIconView in Python: a small tutorial">Using GtkIconView in Python: a small tutorial</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<span>Tue 15 April 2008</span>
<span>| in <a href="https://www.andreagrandi.it/category/linux-programmazione-python.html">Linux, Programmazione, Python</a></span>
<span>| tags: <a href="https://www.andreagrandi.it/tag/gtk.html">gtk</a><a href="https://www.andreagrandi.it/tag/gtkiconview.html">gtkiconview</a><a href="https://www.andreagrandi.it/tag/gtkliststore.html">gtkliststore</a><a href="https://www.andreagrandi.it/tag/howto.html">HowTo</a><a href="https://www.andreagrandi.it/tag/programming.html">programming</a><a href="https://www.andreagrandi.it/tag/python.html">Python</a><a href="https://www.andreagrandi.it/tag/tutorial.html">tutorial</a></span>
</footer><!-- /.post-info --> <p>In these days I was looking for a simple tutorial to understand how to
use <strong>GtkIconView</strong>, but the only thing I was able to find was an
example in PHP-Gtk. So I decided to translate it in <strong>Python</strong> language,
thinking it would be useful for other people trying to use that Gtk
control. You can find the code here:</p>
<p>[sourcecode language='python']<br>
import gtk<br>
import gobject</p>
<p>DEFAULT_IMAGE_WIDTH = 100</p>
<p># Main Window setup<br>
window = gtk.Window(gtk.WINDOW_TOPLEVEL)<br>
window.set_size_request(400, 240)<br>
window.connect("destroy", gtk.main_quit)<br>
window.set_title("Python GtkIconView Test")</p>
<p># Add a VBox<br>
vbox = gtk.VBox()<br>
window.add(vbox)</p>
<p># Setup Scrolled Window<br>
scrolled_win = gtk.ScrolledWindow()<br>
scrolled_win.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)</p>
<p># Setup ListStore to contain images and description<br>
model = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING)</p>
<p># Create a tuple with image files<br>
immagini = ("BD786-TFR.jpg", "guido_sottozero.jpg", "IMG_0056.JPG",
"movies_card.jpg")</p>
<p>for im in immagini:<br>
try:<br>
pixbuf = gtk.gdk.pixbuf_new_from_file(im)<br>
pix_w = pixbuf.get_width()<br>
pix_h = pixbuf.get_height()<br>
new_h = (pix_h * DEFAULT_IMAGE_WIDTH) / pix_w # Calculate the
scaled height before resizing image<br>
scaled_pix = pixbuf.scale_simple(DEFAULT_IMAGE_WIDTH, new_h,
gtk.gdk.INTERP_TILES)<br>
model.append((scaled_pix, im))<br>
except:<br>
pass</p>
<p># Setup GtkIconView<br>
view = gtk.IconView(model) # Pass the model stored in a ListStore to
the GtkIconView<br>
view.set_pixbuf_column(0)<br>
view.set_text_column(1)<br>
view.set_selection_mode(gtk.SELECTION_MULTIPLE)<br>
view.set_columns(0)<br>
view.set_item_width(150)</p>
<p># Pack objects and show them all<br>
scrolled_win.add(view)<br>
vbox.pack_start(scrolled_win)<br>
window.show_all()</p>
<p>gtk.main()<br>
[/sourcecode]</p>
<p>The important thing to notice is that you have to store all the images
in a <strong>GtkListStore</strong> and pass it to the <strong>GtkIconView</strong> as <em>"model"</em>
parameter. I hope this example is clear. If you have any question,
please comment this post and I'll try to answer.</p>
<p>This is a screenshot of this example:</p>
<p><img alt="gtkiconview" src="http://www.andreagrandi.it/wp-content/uploads/2008/04/gtkiconview_sample.png"></p>
<a class="readmore" href="https://www.andreagrandi.it/2008/04/15/using-gtkiconview-in-python-a-small-tutorial/">read more</a>
<p><a href="https://www.andreagrandi.it/2008/04/15/using-gtkiconview-in-python-a-small-tutorial/#disqus_thread">comments</a></p> </div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="https://www.andreagrandi.it/2008/04/09/pymaemo-talk-on-may-10th-in-florence-at-pycon2-conference/" rel="bookmark"
title="Permalink to PyMaemo Talk on May 10th in Florence at PyCon2 Conference">PyMaemo Talk on May 10th in Florence at PyCon2 Conference</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<span>Wed 09 April 2008</span>
<span>| in <a href="https://www.andreagrandi.it/category/linux-maemo-en-python.html">Linux, Maemo (EN), Python</a></span>
<span>| tags: <a href="https://www.andreagrandi.it/tag/conference.html">conference</a><a href="https://www.andreagrandi.it/tag/maemo.html">maemo</a><a href="https://www.andreagrandi.it/tag/nokia.html">nokia</a><a href="https://www.andreagrandi.it/tag/pycon.html">pycon</a><a href="https://www.andreagrandi.it/tag/python.html">Python</a></span>
</footer><!-- /.post-info --> <p>[PyCon2]{style="font-weight: bold;"} is the second edition of the
<a href="http://www.pycon.it/">[Italian Python
Conference]{style="font-weight: bold;"}</a> and will
take place on [May 9/10/11]{style="font-weight: bold;"}, 2008 in
[Florence]{style="font-weight: bold;"}.</p>
<p>The conference is organized by [Python
Italia]{style="font-weight: bold;"} and more than
[300]{style="font-weight: bold;"} developers, students and researchers
will be present for three days of tutorials and other important events.</p>
<p>PyCon 2008 edition will be opened by [Richard
Stallman]{style="font-weight: bold;"} with a keynote on [Free
Software]{style="font-style: italic;"} and [Free
Ethics]{style="font-style: italic;"}. Other famous developers will be
presento too: [Alex Martelli]{style="font-weight: bold;"}, [Samuele
Pedroni]{style="font-weight: bold;"}, [Brian
Fitzpatrick]{style="font-weight: bold;"} and many other.</p>
<p>I'll partecipate at the conference as speaker on May 10, with a talk on
"[PyMaemo: Python for Nokia Internet
Tablets]{style="font-weight: bold;"}". In particular I'll talk about
Maemo platform, Maemo SDK (how to install and configure it) and I'll
explain how to use the two Eclipse plugins
<a href="http://esbox.garage.maemo.org/">ESBox</a> and
<a href="http://pluthon.garage.maemo.org/">Pluthon</a>.</p>
<p>If you want to give me any suggestion or idea for this talk, please
leave me a comment on this post, so I'll integrate it with my slides.</p>
<a class="readmore" href="https://www.andreagrandi.it/2008/04/09/pymaemo-talk-on-may-10th-in-florence-at-pycon2-conference/">read more</a>
<p><a href="https://www.andreagrandi.it/2008/04/09/pymaemo-talk-on-may-10th-in-florence-at-pycon2-conference/#disqus_thread">comments</a></p> </div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="https://www.andreagrandi.it/index42.html">«</a>
Page 43 / 50
<a href="https://www.andreagrandi.it/index44.html">»</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
<div class="social">
<h2>social</h2>
<ul>
<li><a href="https://www.andreagrandi.it/feeds/all.rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>
<li><a href="https://twitter.com/andreagrandi">twitter</a></li>
<li><a href="https://github.com/andreagrandi">github</a></li>
</ul>
</div><!-- /.social -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<p>
Powered by <a href="http://getpelican.com/">Pelican</a> and Python -
Source code available on <a href="https://github.com/andreagrandi/andreagrandi.it">GitHub</a>
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/80x15.png" />
</a>
</p>
</footer><!-- /#contentinfo -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2140684-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
var disqus_shortname = 'andrea-grandi-it';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>