<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10900027</id><updated>2012-02-17T12:32:34.992+08:00</updated><category term='popup menu'/><category term='C++'/><category term='gtk'/><category term='gtk_builder_connect_signals'/><category term='Editable Treeview Cell'/><category term='signal'/><category term='right click'/><category term='gtk_builder'/><category term='GTK_IS_MENU'/><category term='gtk+'/><title type='text'>ManPT's Technical Blog</title><subtitle type='html'>PT's Technical Blog, about Ubuntu, Linux or C/C++, Java, Python or whatever geek, for PT's detemined to be a real geek......</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10900027.post-7411758437041781765</id><published>2009-01-21T10:36:00.002+08:00</published><updated>2009-01-21T10:44:27.637+08:00</updated><title type='text'>推荐一电视软件：LiveStation</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;在PCWorld一篇&lt;a href="http://www.pcworld.com/article/157962/where_to_watch_obamas_inauguration_online.html?tk=rss_main"&gt;推荐怎么在线看奥巴马宣誓仪式的文章&lt;/a&gt;中，留意到LiveStation，一跨平台的在线电视软件。&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh5.ggpht.com/_3GR7psarwbg/SXaIOLZewxI/AAAAAAAAA0Y/jWGP1vCqP_s/%5BUNSET%5D.jpg?imgmax=800" style="max-width: 800px; width: 335px; height: 399px;" /&gt;&lt;br /&gt;&lt;br /&gt;到其网站&lt;a href="http://www.livestation.com/"&gt;&lt;span style="font-weight: bold;"&gt;http://www.livestation.com&lt;/span&gt;&lt;/a&gt;下载了Linux版，是传统的run文件安装方式，安装还是挺简单的，虽然安装文件有点大。程序界面比较漂亮，打开配置窗口可以看出是用QT的。&lt;br /&gt;&lt;br /&gt;虽然是国外的软件，但发现缓冲速度很快，当然，节目主要还是外语台，CNN、Fox这些不会少，不过细心一搜，还是有凤凰、TVB这些华语台的，虽然没PPStream那么丰富，清晰度还可以。&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-7411758437041781765?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/7411758437041781765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=7411758437041781765' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/7411758437041781765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/7411758437041781765'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2009/01/livestation.html' title='推荐一电视软件：LiveStation'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_3GR7psarwbg/SXaIOLZewxI/AAAAAAAAA0Y/jWGP1vCqP_s/s72-c/%5BUNSET%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-2214768535815221416</id><published>2009-01-15T12:45:00.001+08:00</published><updated>2009-01-15T12:45:56.751+08:00</updated><title type='text'>整顿低俗的本质意义在此：</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;2009年1月9日下午3时许，牛博网的域名注册商中国万网停止了域名“bullog.cn”的访问权限，牛博网在中国国内的服务器亦被关闭，牛博国际也无法登陆，官方的理由是“大量登载时政类有害信息”。此前，牛博网的一些博客作者如冉云飞、梁文道、艾未未、王小山、莫之许、五岳散人、十年砍柴、阿丁等参与了《零八宪章》的联名签署；而中国政府竭力阻止零八宪章在国内传播后，在牛博网的一些博客中仍能找到有关的讯息。2009年1月5日中国政府以“全国整治互联网低俗之风”的名义，启动了大规模整顿与限制网络言论的系列行动，部份人士认为此次关闭牛博与这项整顿运动有关，亦标志着中国政治气候向“左”转。&lt;br/&gt;&lt;br/&gt;&lt;a href='http://zh.wikipedia.org/w/index.php?title=%E7%89%9B%E5%8D%9A%E7%BD%91&amp;amp;variant=zh-cn'&gt;http://zh.wikipedia.org/w/index.php?title=%E7%89%9B%E5%8D%9A%E7%BD%91&amp;amp;variant=zh-cn&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-2214768535815221416?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/2214768535815221416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=2214768535815221416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/2214768535815221416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/2214768535815221416'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2009/01/blog-post.html' title='整顿低俗的本质意义在此：'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-5634309917778035573</id><published>2009-01-01T00:58:00.001+08:00</published><updated>2009-01-01T00:58:28.257+08:00</updated><title type='text'>迎接2009……</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;C：printf("新年快乐!")&lt;br/&gt;C++：cout&amp;lt;&amp;lt;"新年快乐!"&lt;br/&gt;VC：MessageBox("新年快乐!")&lt;br/&gt;C#：System.Console.WriteLine("新年快乐!") &lt;br/&gt;Java：System.out.println("新年快乐!")&lt;br/&gt;JScript：alert("新年快乐!")&lt;br/&gt;ASP：Response.Write "新年快乐!"&lt;br/&gt;PHP：echo "新年快乐!"&lt;br/&gt;VB：Msg("新年快乐!")&lt;br/&gt;VBScript：MsgBox "新年快乐!"&lt;br/&gt;Delphi：ShowMessage('新年快乐!')&lt;br/&gt;Shell：echo 新年快乐!&lt;br/&gt;Perl：print '新年快乐!'&lt;br/&gt;PowerBuilder：messagebox("新年快乐!") &lt;br/&gt;COBOL:DISPLAY '新年快乐！'.  &lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-5634309917778035573?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/5634309917778035573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=5634309917778035573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/5634309917778035573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/5634309917778035573'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2009/01/2009.html' title='迎接2009……'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-8501155472153810004</id><published>2008-12-29T21:10:00.001+08:00</published><updated>2008-12-29T21:10:17.730+08:00</updated><title type='text'>ScribeFire 无痛使用Blogger</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;img height='45' width='148' src='http://lh5.ggpht.com/_J26k2-pTE9U/STyv4WXTPmI/AAAAAAAAA24/8Sm_TgdquPg/%5BUNSET%5D.png?imgmax=800' style='float: left;'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;ScribeFire是很不错的一款firefox插件，通过调用标准博客的API来快速发博文。然而今天才知道“ScribeFire 无痛使用Blogger”的方法……&lt;br/&gt;   &lt;br/&gt;何为无痛？哦，云防火是也……&lt;br/&gt;&lt;br/&gt;blogger的API地址不知为何会触发云防火的神经，如果按默认的设置添加blogger的账户，一连接就会发现整个blogspot不能用了……&lt;br/&gt;&lt;br/&gt;解决办法很简单&lt;br/&gt;&lt;br/&gt;把API调用的地址http://改成&lt;span style='color: rgb(255, 0, 0);'&gt;https://&lt;/span&gt; &lt;br/&gt;&lt;br/&gt;&lt;img src='http://lh6.ggpht.com/_J26k2-pTE9U/ST0g2-iJeYI/AAAAAAAAA28/yUDOMn44frA/%5BUNSET%5D.png?imgmax=800' style='max-width: 800px; width: 426px; height: 295px;'/&gt;&lt;br/&gt;&lt;br/&gt;好了，这篇文章就是在Scribefire下发的……这下不用请教刘翔也能用blogspot了。&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-8501155472153810004?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/8501155472153810004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=8501155472153810004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/8501155472153810004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/8501155472153810004'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/12/scribefire-blogger.html' title='ScribeFire 无痛使用Blogger'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_J26k2-pTE9U/STyv4WXTPmI/AAAAAAAAA24/8Sm_TgdquPg/s72-c/%5BUNSET%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-4306480567234232732</id><published>2008-12-18T19:55:00.001+08:00</published><updated>2008-12-18T19:57:48.500+08:00</updated><title type='text'>什么是代码？什么是程序？</title><content type='html'>什么是代码？什么是程序？&lt;br&gt;&lt;br&gt;上了两年多的大学计算机专业，现在看这问题，实在感慨。&lt;br&gt;&lt;br&gt;代码也许是书上的一段文字，程序也许是磁盘上的一个文件，老师们在给你讲述它的原理，它的结构，却从未提及它的本质。程序怎么出来的？从代码编译出来的。代码怎么出来的？人写出来的。人怎么会写代码？想出来的。思想是怎么出来的？这......&lt;br&gt;&lt;br&gt;程序的本质，是人的创造力，也就是那所谓1%的灵感。这里有个很哲学的问题，貌似课本的说法是，量变会引起质变，而我得提醒，“引起”的意思是“可能会，可能不会，并不一定会”。“程序 = 算法 + 数据结构”这个说法，很明显地低估了等号左边的重量。&lt;br&gt;&lt;br&gt;然而反观我们的高等教育，从一段代码里面挖掉几行，让你填空，瞧一瞧上下文，哦，有些地方差不多的，把语句抄过来，好，编译通过，实验课完了，回去写实验报告吧，下星期交。&lt;br&gt;&lt;br&gt;原来现在的大学教育就是低能儿童智力开发。&lt;br&gt;&lt;br&gt;我想，即使让学生们自己去开发个人品计算器、人名打架器，学生们的收获也要比啃上那几本砖头书多，至少他们知道自己能够创造东西，而不是只会学东西。&lt;br&gt;&lt;br&gt;PS：《偷天换日》（The Italian Job）电影里有这么一个人，他抢了别人的金子，却不知道如何去构造自己的梦想，买到了别人想要的一切，却不知道自己想要什么，我想，这是一个人最大的悲剧。不是说，知识也是财富么，如果缺乏创造能力，即使占有再多的知识，又有何用呢？&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-4306480567234232732?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/4306480567234232732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=4306480567234232732' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/4306480567234232732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/4306480567234232732'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/12/blog-post.html' title='什么是代码？什么是程序？'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-2782199099832778487</id><published>2008-12-07T22:40:00.003+08:00</published><updated>2008-12-18T19:59:34.212+08:00</updated><title type='text'>Create a exe file with icon in Mingw gcc</title><content type='html'>1. get a icon file name "logo.ico"&lt;br /&gt;2. create an file name "logo.rc", contain a line:&lt;br /&gt;&lt;blockquote&gt;1 ICON "icon.ico"&lt;/blockquote&gt;3. run : (windres was include in Mingw)&lt;br /&gt;&lt;blockquote&gt;windres logo.rc logo.o&lt;/blockquote&gt;4. link the "logo.o" file together with other object files to the final exe file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-2782199099832778487?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/2782199099832778487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=2782199099832778487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/2782199099832778487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/2782199099832778487'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/12/create-exe-file-in-mingw-gcc.html' title='Create a exe file with icon in Mingw gcc'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-7371704946576937199</id><published>2008-12-04T20:59:00.003+08:00</published><updated>2008-12-04T21:17:30.824+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk+'/><category scheme='http://www.blogger.com/atom/ns#' term='Editable Treeview Cell'/><title type='text'>编程笔记：Editable Treeview Cell</title><content type='html'>I found that programming gtk+ plays a lot of tricks. I implemented "editable treeview cells" today in my program, after spending quite a while looking up for examples on Google. The most I wanted to say is that, the Gtk manual was detailed enough, but it never tells you how to do, which makes me so desperate sometimes......&lt;br /&gt;&lt;br /&gt;The solution was written in a tutorial, &lt;a href="http://scentric.net/tutorial/sec-editable-cells.html"&gt;http://scentric.net/tutorial/sec-editable-cells.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;there seems quite several GTK tutorials, but most of their contents were duplicated, though I always learn the tricks from them... ^_^&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;&lt;blockquote&gt;&lt;pre class="programlisting"&gt;  renderer = gtk_cell_renderer_text_new();&lt;br /&gt;...&lt;br /&gt;g_object_set_data(G_OBJECT(renderer), "my_column_num", GUINT_TO_POINTER(COLUMN_NAME));&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;renderer = gtk_cell_renderer_text_new();&lt;br /&gt;...&lt;br /&gt;g_object_set_data(G_OBJECT(renderer), "my_column_num", GUINT_TO_POINTER(COLUMN_YEAR_OF_BIRTH));&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;the "renderer" must be create several times in this trick, for a object couldn't carry the same property in different value twice, itn's it？&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-7371704946576937199?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/7371704946576937199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=7371704946576937199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/7371704946576937199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/7371704946576937199'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/12/editable-treeview-cell.html' title='编程笔记：Editable Treeview Cell'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-2650062380365693</id><published>2008-12-02T23:04:00.005+08:00</published><updated>2008-12-04T21:14:35.590+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='right click'/><category scheme='http://www.blogger.com/atom/ns#' term='gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='popup menu'/><category scheme='http://www.blogger.com/atom/ns#' term='GTK_IS_MENU'/><category scheme='http://www.blogger.com/atom/ns#' term='gtk_builder'/><title type='text'>编程笔记：GtkBuilder和popup menu</title><content type='html'>今天又奋战gtk的文档，看着别人写的旧版example代码，用GtkBuilder的方法重写，实现了一个自己想要的TreeView List。最后想在TreeView中加入一个右键菜单，却想不到小小的popup menu就给我设了两大难关。&lt;br /&gt;&lt;br /&gt;首先找来找去没有见到有right-click的signal，Google了一下，从Maillist里面的解答找到头绪，由GtkWidget的button_press_event来实现。GTK+ Reference Manual里面一点都没提到这个信号，原来这个button指鼠标的button，键盘的键叫做key……&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mail.gnome.org/archives/gtk-list/2002-August/msg00119.html"&gt;http://mail.gnome.org/archives/gtk-list/2002-August/msg00119.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;button_press_event emits when any mouse button pressed, when handling with this signal, use a callback prototype in this way:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;blockquote&gt;gboolean callback (GtkWidget *widget,&lt;br /&gt;   GdkEventButton *event,&lt;br /&gt;   gpointer data);&lt;/blockquote&gt;&lt;/pre&gt;and you can determine which button was press with &lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;event-&gt;button&lt;/span&gt; (values 1,2,3...3 stands for the right button, 1 for left and 2 for middle), and if you want give this signal back to the widget, just return FALSE.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;另外一个问题是popup menu, 在glade3里面添加了一个popup menu, 照搬老方法，初始化程序的时候&lt;br /&gt;&lt;blockquote&gt;tree-&gt;menu = GTK_WIDGET ( gtk_builder_get_object (builder,  "menu1") );&lt;/blockquote&gt;弹出窗口：&lt;br /&gt;&lt;blockquote&gt;gtk_menu_popup (GTK_MENU(user_data-&gt;menu), NULL, NULL, NULL, NULL, event-&gt;button, event-&gt;time);&lt;br /&gt;&lt;/blockquote&gt;郁闷的事情来了，程序运行的时候提示：&lt;br /&gt;&lt;blockquote&gt;(tree:28254): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkMenu'&lt;br /&gt;&lt;br /&gt;(tree:28254): Gtk-CRITICAL **: gtk_menu_popup: assertion `GTK_IS_MENU (menu)' failed&lt;/blockquote&gt;在Reference里面看了半天，注意到GtkBuilder Description的一段话：&lt;br /&gt;&lt;blockquote&gt;A GtkBuilder holds a reference to all objects that it has constructed and drops these references when it is finalized. &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;This finalization can cause the destruction of non-widget objects or widgets which are not contained in a toplevel window. &lt;/span&gt;For toplevel windows constructed by a builder, it is the responsibility of the user to call gtk_widget_destroy() to get rid of them and all the widgets they contain. &lt;/blockquote&gt;在Glade3里面看到，popup menu不属于toplevel的window，看来小menu在g_object_unref (G_OBJECT (builder));的时候被收回去了……可是怎么解决呢？总不能不收了builder吧，builder占的内存可不小的，很容易造成内存泄漏……&lt;br /&gt;&lt;br /&gt;It's obvious that the menu allocation was released after initialing the application, I have to solve this problem.&lt;br /&gt;&lt;br /&gt;In the Reference Manual, I found a function.&lt;br /&gt;&lt;h3&gt;&lt;/h3&gt;&lt;blockquote&gt;&lt;h3&gt;g_object_ref ()&lt;/h3&gt; &lt;pre class="programlisting"&gt;gpointer g_object_ref (gpointer object);&lt;/pre&gt; &lt;p&gt; Increases the reference count of &lt;em class="parameter"&gt;&lt;code&gt;object&lt;/code&gt;&lt;/em&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt;  &lt;/p&gt;  The &lt;span style="color: rgb(255, 0, 0); font-style: italic; font-weight: bold;"&gt;reference count&lt;/span&gt; really mean something, worth to read about it carefully. I just add one more statement after getting the menu widget:&lt;br /&gt;&lt;br /&gt;这个reference count大有来头。在gtk_builder_get_object (builder,  "menu1")后，加了一句:&lt;br /&gt;&lt;blockquote style="color: rgb(255, 0, 0);"&gt;g_object_ref ((gpointer)tree-&gt;menu);&lt;/blockquote&gt;Yes，the whole world goes the right way now!!!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-2650062380365693?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/2650062380365693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=2650062380365693' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/2650062380365693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/2650062380365693'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/12/gtkbuilderpopup-menu.html' title='编程笔记：GtkBuilder和popup menu'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-4621934227803666830</id><published>2008-12-01T19:11:00.004+08:00</published><updated>2008-12-01T19:57:13.847+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk+'/><category scheme='http://www.blogger.com/atom/ns#' term='gtk_builder_connect_signals'/><category scheme='http://www.blogger.com/atom/ns#' term='signal'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='gtk_builder'/><title type='text'>编程笔记：gtk+与C++</title><content type='html'>最近在做一个个人项目，打算用gtk+来做UI。程序的主体是用C++写的，而gtk+却是原生的C程序，不过据官方的说法，在n多语言里面都可以用gtk，别说是C的近亲C++了。&lt;br /&gt;&lt;br /&gt;Gtk+才刚刚接触，是从Micah Carrick的tutorial开始的&lt;a href="http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html"&gt;http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html&lt;/a&gt;。（该网站被云防火了）&lt;br /&gt;&lt;br /&gt;这次自己写了个简单的例子，Micah Carrick教程里面那个例子的简化版，示范了gtk_builder和glade3的应用。当然，最好还是参照原版教程那个，注释齐全，格式漂亮，只是稍复杂了点。有需要的朋友可以在这里下载：&lt;a href="http://w1.uploadmb.com/dw.php?id=1228048659"&gt;entry.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;这篇教程使用了很新的方法：gtk_builder和glade3。然而，当我把教程的代码搬到C++中时，却出了问题，程序运行的时候死活找不到signal handler。&lt;br /&gt;&lt;br /&gt;经过中午连续5个小时的埋头苦读文档和代码，皱着眉头喝了n杯浓茶（有点夸张了....），终于找到了原因，想不到原来这么简单。&lt;br /&gt;&lt;br /&gt;（具体看上一篇博文：&lt;a href="http://manpt.blogspot.com/2008/12/solution-for-using-gtkbuilder-in-c.html"&gt;http://manpt.blogspot.com/2008/12/solution-for-using-gtkbuilder-in-c.html&lt;/a&gt;）&lt;br /&gt;&lt;br /&gt;不过这个过程也很多收获的，从svn的代码里面摸清了gtk_builder_connect_signals、gtk_builder_connect_signals_full这些函数，了解了能够动态加载函数的GModule（使用动态库的时候很有用），进一步学习了gtk风格的C编程（怎么有点像在给gcd做思想报告......），开源的好处啊 ^_^ ........&lt;br /&gt;&lt;br /&gt;还有发现了svn上面代码的一个小错误：&lt;br /&gt;gtkbuilder.c Line 970, 其中(gpointer)&amp;amp;func应该为(gpointer*)&amp;amp;func，不然编译不通过……不知道是不是总编译的时候另外处理了？&lt;br /&gt;&lt;br /&gt;还有就是很乌龙地往gtk的maillist写了两封mail：&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Hi, all:&lt;br /&gt;&lt;br /&gt;I knew gtk+ was a C builded technic, but now i have to use it in C++ codes, and the problem i encountered is that, i use gtk_builder_connect_signals to connect all the widgets from the xml to the handler function, just as what micahcarrick's tutorial do in C, and complied and link it with -export-dynamic,&lt;br /&gt;&lt;br /&gt;$ g++ entry.cpp `pkg-config --libs --cflags gtk+-2.0` -export-dynamic&lt;br /&gt;&lt;br /&gt;no problem happens.&lt;br /&gt;&lt;br /&gt;But when i run it, the program just couldn't find the handler function, reporting :&lt;br /&gt;&lt;br /&gt;pentie@pentie-desktop:~/Programming/linux/entry$ ./a.out&lt;br /&gt;&lt;br /&gt;(a.out:12605): Gtk-WARNING **: Could not find signal handler 'on_window_destroy'&lt;br /&gt;&lt;br /&gt;(a.out:12605): Gtk-WARNING **: Could not find signal handler 'on_exit_clicked'&lt;br /&gt;&lt;br /&gt;(a.out:12605): Gtk-WARNING **: Could not find signal handler 'on_add_clicked'&lt;br /&gt;^C&lt;br /&gt;&lt;br /&gt;I knew there must be something different with the g++ linker and the -export-dynamic, but i have no clue how to solve this.&lt;br /&gt;&lt;br /&gt;Thanks so much if anyone could give me a hand on this. thanks&lt;br /&gt;&lt;br /&gt;ps: a simple test code was in the attach file. you will find that the c_style code works very well, but not the cpp one.........&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------&lt;br /&gt;***********           2 hours later   ***************&lt;br /&gt;---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Hi!&lt;br /&gt;&lt;br /&gt;I asked a question about &lt;b&gt;gtk_builder_connect_signals &lt;/b&gt;in&lt;b&gt; &lt;/b&gt;c++ , and finally i found the reason.&lt;br /&gt;&lt;br /&gt;as explaned in &lt;a href="http://www.cs.indiana.edu/%7Ewelu/notes/node36.html" target="_blank"&gt;http://www.cs.indiana.edu/~&lt;wbr&gt;welu/notes/node36.html&lt;/a&gt; , c++ complier change the function name symbol, whereas the GModule couldn't find the handler function through the original name from the xml file.&lt;br /&gt;&lt;br /&gt;the solution is simple , embrace all the handler functions with &lt;b&gt;extern "C" {}, that's all.&lt;br /&gt;&lt;br /&gt;Sorry if mails disturbed.........&lt;img goomoji="360" style="margin: 0pt 0.2ex; vertical-align: middle;" src="https://mail.google.com/mail/e/360" /&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-4621934227803666830?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/4621934227803666830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=4621934227803666830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/4621934227803666830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/4621934227803666830'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/12/gtkc.html' title='编程笔记：gtk+与C++'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-3201664933195448277</id><published>2008-12-01T18:31:00.006+08:00</published><updated>2008-12-31T08:47:06.654+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gtk+'/><category scheme='http://www.blogger.com/atom/ns#' term='gtk_builder_connect_signals'/><category scheme='http://www.blogger.com/atom/ns#' term='signal'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='gtk_builder'/><title type='text'>Solution for using gtk_builder in C++</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Gtk+ is a C-based library, the official document says it's bindings include C++(of course), but when I try to use the new API gtk_builder, it just wouldn't work the right well(say, could not find the signal handlaer).&lt;br/&gt;&lt;br/&gt;But at last I found the reason.&lt;br/&gt;&lt;br/&gt;The "gtk_builder_connect_signals" function use GModule to load the handler function dynamically from the program with the function name from the xml file. But with g++ linker, function symbol would be mangled for the some sakes ..(overriding for example), and the GModule can never find them by the original name.&lt;br/&gt;&lt;br/&gt;explained detailly here:&lt;br/&gt;&lt;a href='http://http//www.cs.indiana.edu/%7Ewelu/notes/node36.html'&gt;http://www.cs.indiana.edu/~welu/notes/node&lt;/a&gt;&lt;a href='http://http//www.cs.indiana.edu/%7Ewelu/notes/node36.html'&gt;36.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Solving this is simple, add &lt;span style='color: rgb(255, 0, 0); font-style: italic;'&gt;extern "C" {}&lt;/span&gt; round the handler function prototypes, everything goes right again:&lt;br/&gt;&lt;br/&gt;&lt;blockquote style='color: rgb(0, 102, 0);'&gt;extern "C"  {&lt;br/&gt; void on_add_clicked (GtkObject *object, EntryExam *exam);&lt;br/&gt; void on_window_destroy (GtkObject *object, EntryExam *exam);&lt;br/&gt; void on_exit_clicked (GtkObject *object, EntryExam *exam);&lt;br/&gt;}&lt;a href='http://3.bp.blogspot.com/_3GR7psarwbg/STPFDkijw1I/AAAAAAAAAY8/ElNQjOb01fQ/s1600-h/Screenshot.png' onblur='try {parent.deselectBloggerImageGracefully();} catch(e) {}'&gt;&lt;br/&gt;&lt;br/&gt;&lt;img border='0' id='BLOGGER_PHOTO_ID_5274776253719888722' alt='' src='http://3.bp.blogspot.com/_3GR7psarwbg/STPFDkijw1I/AAAAAAAAAY8/ElNQjOb01fQ/s400/Screenshot.png' style='margin: 0pt 0pt 10px 10px; cursor: pointer; width: 332px; height: 239px;'/&gt;&lt;/a&gt;&lt;/blockquote&gt;I have a simple example to show about this, download it :&lt;a href='http://w1.uploadmb.com/dw.php?id=1228048659'&gt; entry.tar.gz&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-3201664933195448277?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/3201664933195448277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=3201664933195448277' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/3201664933195448277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/3201664933195448277'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/12/solution-for-using-gtkbuilder-in-c.html' title='Solution for using gtk_builder in C++'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3GR7psarwbg/STPFDkijw1I/AAAAAAAAAY8/ElNQjOb01fQ/s72-c/Screenshot.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-7907784030211903343</id><published>2008-11-24T13:02:00.002+08:00</published><updated>2008-11-24T13:10:20.875+08:00</updated><title type='text'>几个Linux相关的资料网站</title><content type='html'>最近查资料常上的几个网站：&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;http://www.micahcarrick.com/&lt;/span&gt;&lt;br /&gt;提供非常简单明了的tutorial，其中对GTK+/Glade3的入门那篇tutorial不错。网站覆盖的内容有：&lt;br /&gt;    *  AVR Microcontrollers (10)&lt;br /&gt;    * C Programming (9)&lt;br /&gt;    * GTK+ (14)&lt;br /&gt;    * Linux (29)&lt;br /&gt;    * PHP (6)&lt;br /&gt;    * PIC Microcontrollers (4)&lt;br /&gt;    * Robotics/Electronics (15)&lt;br /&gt;    * Web Development (11)&lt;br /&gt;&lt;br /&gt;不多，但重在“精”！&lt;br /&gt;不过这几天好像因为某“云防火”技术的更新，好像访问有问题（广州电信）。&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;http://www.yolinux.com/&lt;/span&gt;&lt;br /&gt;大杂烩的Linux资料网站，提供不少的外链，但也有不少自创的资料。多为编程技术，而且通常介绍不会很详细，或者给个例子，然后在后面推荐几本书.......&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;http://www.codeproject.com/&lt;/span&gt;&lt;br /&gt;提供很多免费的代码工程例子。不过Win方面的例子相对多一些。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-7907784030211903343?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/7907784030211903343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=7907784030211903343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/7907784030211903343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/7907784030211903343'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/11/linux.html' title='几个Linux相关的资料网站'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-4078128311148716452</id><published>2008-11-23T18:04:00.000+08:00</published><updated>2008-11-23T18:05:48.774+08:00</updated><title type='text'>Howto ：为英文界面下的Ubuntu 设置默认的中文字体</title><content type='html'>&lt;p&gt;前言：&lt;/p&gt;  &lt;p&gt;为了熟悉更多Linux 的英语词汇，希望把Ubuntu 的界面换成英文的。使用System-&gt;Administration-&gt;Language Suport( 系统－&gt; 管理－&gt; 语言支持) ，将Default Language 改成English(United States) 。由于使用iBus 输入法，即使不安装一些中文输入包，也影响不大。（参照： &lt;a href="http://forum.ubuntu.org.cn/viewtopic.php?f=8&amp;amp;t=157492&amp;amp;start=0&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a" mce_href="http://forum.ubuntu.org.cn/viewtopic.php?f=8&amp;amp;t=157492&amp;amp;start=0&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a" target="_blank"&gt;[Howto] 英文环境下使用 ibus 输入中文，不需要 scim 和中文支持&lt;/a&gt; ）&lt;/p&gt; &lt;p&gt;重启系统之后系统变成英文的了，但是显示中文文件名、Firefox 里面的中文网页时候，字体全部变成了Bitmap 的wqy ，看起来很丑很费力。&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;解决方法很简单：&lt;/p&gt;  &lt;p&gt;在/etc/fonts/conf.d 里面加上3 个文件的链接：&lt;br /&gt;&lt;code&gt;cd /etc/fonts/conf.d/&lt;br /&gt;sudo ln -s /etc/fonts/conf.avail/29-language-selector-zh.conf&lt;br /&gt;sudo ln -s /etc/fonts/conf.avail/69-language-selector-zh-cn.conf&lt;br /&gt;sudo ln -s /etc/fonts/conf.avail/99-language-selector-zh.conf&lt;/code&gt;&lt;br /&gt;好，搞定！重启看看效果吧（系统默认是正黑）！&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;背景：&lt;/p&gt;  &lt;p&gt;这三个连接在使用中文界面的时候是存在的，在切换到英文界面后就被删掉。&lt;/p&gt; &lt;p&gt;/etc/fonts 下面有两个目录，conf.avail 和conf.d 。真正配置系统的文件全部放在conf.d ，但是里面的文件多数是链接到conf.avail 里面的相应文件。conf.avail 里面的文件可是大杂烩，中文简体繁体、日文韩文那些的配置都在。&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-4078128311148716452?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/4078128311148716452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=4078128311148716452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/4078128311148716452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/4078128311148716452'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/11/howto-ubuntu.html' title='Howto ：为英文界面下的Ubuntu 设置默认的中文字体'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10900027.post-3317874407189886629</id><published>2008-11-23T17:41:00.000+08:00</published><updated>2008-11-23T17:45:05.305+08:00</updated><title type='text'>IT视角：Why Linux ？开源决定成败</title><content type='html'>&lt;p&gt;Here's an article I wrote several  days before, posted in seo-dic.com.cn, and now posted here as the first writings.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;作者：PT SWing  from  pentie＃gmail.com&lt;/p&gt; &lt;p&gt;近年来Linux逐渐流行，不论是IT职场要求，还是前沿IT新闻，都逐渐把Linux作为关键词。N多在自己电脑上尝试过Linux系统的小白们 很郁 闷，这么复杂这么难用的操作系统何以热得起来？易用性、可用性拍马都比不上Windows……都说外行看热闹，内行看门道。&lt;/p&gt; &lt;p&gt;Linux热起来的原因？开源。&lt;/p&gt; &lt;p&gt;2008年数码产品市场的焦点，是MID。NetBook、Tablet这些的流行，甚至是Intel这样的厂商都始料不及的，华硕的Eee系列产 品因此 大赚一翻，N多别的厂商下半年才开始屁颠屁颠的跟着来分一杯羹。而微软的Vista因为对硬件要求过高，大失NetBook市场而成为最失败的产品 （Vista的改进很多是好的，可惜在市场上输给了XP，反遭娘家的遗弃）。相反，Eee PC中预装的Ubuntu Linux火热起来。&lt;/p&gt; &lt;p&gt;在 这一切的背后，是“开源”。开源不意味着劳动成果拱手让人，这是小农思想，相反，开源意味着更大的利润，更大的市场。07年以来，MID的市场打开，新概 念的硬件层出不穷，面对巨大市场的需求，硬件市场的潜力就像无底洞。然而硬件的变化意味着软件必须要跟随，如果软件跟不上，硬件的发展会受到非常尴的束 缚。&lt;/p&gt; &lt;p&gt;微软凭着Windows在个人PC上的绝对地位，对这些似乎不为所动，虽然有Win CE，但由于所依赖的硬件方案缺乏灵活性，市场占有率多年来一直有限。与其说微软不屑于MID市场，不如说他太笨重，为了保持兼容性，一系列的庞大的产品 线使他难以动弹，没法迅速开发出产品来适应瞬间万变的硬件需求。&lt;/p&gt; &lt;p&gt;果然，市场也没有选择微软。&lt;/p&gt; &lt;p&gt;苹果iPhone从07年6 月上市至今，凭着多点触摸的概念席卷全球，在一年的时间内把在手机操作系统市场把混了多年的Win CE踢了下去。我们可以看到微软在Windows产品线上是多么的走投无路了。从长远的眼光来看，微软的选择只有两个，一是开源，二是死去。现在来看两个 选择似乎都不可能，虽然很多10年前看来不可能的事情今天都发生了。所有这些有待时间去考证了。&lt;/p&gt; &lt;p&gt;而Linux则钻了这个空档，因为开源， 硬件厂商完全掌握自主开发权，不论硬件怎么变，只需要组织一个团队来开发，就可以适时推出适应市场需求的产品。Google更是开了这个头，通过自己的网 络服务，开发出的Android的前端服务，并开源出去，厂商只需构建好硬件虚拟层，将Android装入自己的硬件，便可借Google的大牌子去销售 了。&lt;/p&gt; &lt;p&gt;另外一个例子就是，Nokia花了4亿美元收购Symbian。难道就是为了把开发权把握在自己手中？那Nokia花的钱也可够冤枉 的，Nokia作为老客户，Psion对Nokia一直都千依百顺，哪用多掏钱。而Nokia心里则精着，在今后强烈的硬件需求下，操作系统的开发如果依 然掌握在一两家公司手里，只会阻挡硬件行业的发展，挡住自己发展的路线，趁早把Symbian平台买回来，待时机成熟，一码放出去，开源，让兴高采烈的追 随者跟着自己的屁股走，自己就搭上硬件发展的趋势，继续当老大。&lt;/p&gt; &lt;p&gt;操作系统作为联系硬件和软件的关键纽带，IT业界内，谁得了操作系统，谁就得到市场。10多年以来，在个人电脑上微软为我们充分演绎了这个结论。然而，如今市场显示，个人电脑市场早已饱和，甚至开始萎缩，而微软，成也桌面，败也桌面，即使技术再宏厚，失了市场就得死去。&lt;/p&gt; &lt;p&gt;把Linux看作一个操作系统，一般桌面用户对其“一大堆杂乱的发行版”颇为诟病，但如果把Linux看成一堆等着各个厂商来做开发的代码，那它有 再多的 版本都不奇怪了。一出生就混在开源界的Linux，已经拥有了最广泛的硬件支持，一旦开源的行规在IT界形成，Linux必将是领头羊，即使是开源的 Windows、Symbian，都会是望尘莫及的了。&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10900027-3317874407189886629?l=manpt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://manpt.blogspot.com/feeds/3317874407189886629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10900027&amp;postID=3317874407189886629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/3317874407189886629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10900027/posts/default/3317874407189886629'/><link rel='alternate' type='text/html' href='http://manpt.blogspot.com/2008/11/itwhy-linux.html' title='IT视角：Why Linux ？开源决定成败'/><author><name>ManPT</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
