<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Gihan&#039;s Blog..</title>
	<atom:link href="https://gihansblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://gihansblog.wordpress.com</link>
	<description>My tech world...</description>
	<lastBuildDate>Tue, 14 Jul 2020 08:15:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<site xmlns="com-wordpress:feed-additions:1">23915658</site><cloud domain='gihansblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/8759f845f276543e117466f88f23625e85093cbe91b1919c5038c4a1bc6bc6cf?s=96&#038;d=https%3A%2F%2Fs2.wp.com%2Fi%2Fwebclip.png</url>
		<title>Gihan&#039;s Blog..</title>
		<link>https://gihansblog.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://gihansblog.wordpress.com/osd.xml" title="Gihan&#039;s Blog.." />
	<atom:link rel='hub' href='https://gihansblog.wordpress.com/?pushpress=hub'/>
	<item>
		<title>Gihan.uk</title>
		<link>https://gihansblog.wordpress.com/2020/07/14/gihan-uk/</link>
					<comments>https://gihansblog.wordpress.com/2020/07/14/gihan-uk/#respond</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Tue, 14 Jul 2020 08:15:46 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=326</guid>

					<description><![CDATA[Hi All, I&#8217;m moving to my blog to a new domain name. Please find latest updates on gihan.uk Thanks Gihan De Silva]]></description>
										<content:encoded><![CDATA[<p>Hi All,</p>
<p>I&#8217;m moving to my blog to a new domain name. Please find latest updates on <a href="https://gihan.uk/">gihan.uk</a></p>
<p>Thanks</p>
<p>Gihan De Silva</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2020/07/14/gihan-uk/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">326</post-id>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>
	</item>
		<item>
		<title>Switching to a third party Domain Name System (DNS)?</title>
		<link>https://gihansblog.wordpress.com/2011/12/31/switching-to-a-third-party-domain-name-system-dns/</link>
					<comments>https://gihansblog.wordpress.com/2011/12/31/switching-to-a-third-party-domain-name-system-dns/#comments</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Sat, 31 Dec 2011 15:08:07 +0000</pubDate>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[BitGravity]]></category>
		<category><![CDATA[CDNetworks]]></category>
		<category><![CDATA[Domain Name System]]></category>
		<category><![CDATA[EdgeCast]]></category>
		<category><![CDATA[gihansblog.com]]></category>
		<category><![CDATA[Google Public DNS]]></category>
		<category><![CDATA[Open DNS]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=311</guid>

					<description><![CDATA[Hi everyone, today we will discuss on Domain Name Systems and usage of them. First lets see what is DNS? DNS stands for Domain Name System. And DNS is actually a database system that handle IP addresses and related domain names. When we type a web address and hit the Enter key, the ISP(Internet Service [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi everyone, today we will discuss on Domain Name Systems and usage of them. First lets see what is DNS? DNS stands for Domain Name System. And DNS is actually a database system that handle IP addresses and related domain names. When we type a web address and hit the Enter key, the ISP(Internet Service Provider) will look up the DNS for requested domain name. Then the DNS will return and direct to the correct IP address. Then we will see the requested web page. <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns.jpg"><img data-attachment-id="312" data-permalink="https://gihansblog.wordpress.com/2011/12/31/switching-to-a-third-party-domain-name-system-dns/dns/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns.jpg" data-orig-size="381,315" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="DNS" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns.jpg?w=381" class="aligncenter size-medium wp-image-312" title="DNS" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns.jpg?w=300&#038;h=248" alt="" width="300" height="248" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns.jpg?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns.jpg?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns.jpg 381w" sizes="(max-width: 300px) 100vw, 300px" /></a>Usually your Internet Service Provider maintains a DNS server for handle the DNS quires, so you don&#8217;t have to worry about that. It hold a list of all the IP addresses and domain names within the network, and a cache of IP addresses which recently accessed computers outside the network.  This DNS servers are also responsible for your Internet speed. But sometimes you may realise your Internet speed is not enough. Most of the time this happens not because of your bandwidth but because of your ISP&#8217;s slow DNS server. Because some IPS&#8217;s don&#8217;t pay much attention for expanding DNS server resources.</p>
<p>As clients we can do something to speed up our Internet speed ourself. That is switching to a third party DNS . Here is list of some great DNS servers.</p>
<ul>
<li>Open DNS                                        <span style="color:#ff0000;">208.67.222.222       208.67.220.220</span></li>
<li>Google Public DNS                      <span style="color:#ff0000;">  8.8.8.8                       8.8.4.4</span></li>
<li><a href="http://www.bitgravity.com/" target="_blank">BitGravity</a></li>
<li><a href="http://www.edgecast.com/" target="_blank">EdgeCast</a></li>
<li><a href="http://http://www.cdnetworks.com/" target="_blank">CDNetworks</a></li>
</ul>
<p>As a example lets see how to configure Open DNS for Ubuntu computer.</p>
<p>First  click on  network icon and go to Edit connections</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/icon.jpg"><img data-attachment-id="313" data-permalink="https://gihansblog.wordpress.com/2011/12/31/switching-to-a-third-party-domain-name-system-dns/icon/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/icon.jpg" data-orig-size="408,344" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="icon" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/icon.jpg?w=408" class="aligncenter size-medium wp-image-313" title="icon" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/icon.jpg?w=300&#038;h=252" alt="" width="300" height="252" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/icon.jpg?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/icon.jpg?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/icon.jpg 408w" sizes="(max-width: 300px) 100vw, 300px" /></a>Then you will see a window like this</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/network-connection-window.jpg"><img data-attachment-id="314" data-permalink="https://gihansblog.wordpress.com/2011/12/31/switching-to-a-third-party-domain-name-system-dns/network-connection-window/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/network-connection-window.jpg" data-orig-size="459,330" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Network connection window" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/network-connection-window.jpg?w=459" class="aligncenter size-medium wp-image-314" title="Network connection window" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/network-connection-window.jpg?w=300&#038;h=215" alt="" width="300" height="215" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/network-connection-window.jpg?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/network-connection-window.jpg?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/network-connection-window.jpg 459w" sizes="(max-width: 300px) 100vw, 300px" /></a>Select your existing connection or you can create a new one. Then click edit</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns-settings.jpg"><img loading="lazy" data-attachment-id="315" data-permalink="https://gihansblog.wordpress.com/2011/12/31/switching-to-a-third-party-domain-name-system-dns/dns-settings/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns-settings.jpg" data-orig-size="483,552" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="DNS settings" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns-settings.jpg?w=483" class="aligncenter size-medium wp-image-315" title="DNS settings" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns-settings.jpg?w=262&#038;h=300" alt="" width="262" height="300" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns-settings.jpg?w=262 262w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns-settings.jpg?w=131 131w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns-settings.jpg 483w" sizes="(max-width: 262px) 100vw, 262px" /></a>In the DNS servers field type these two IP addresses   with comma separated.  <span style="color:#ff0000;"><strong>208.67.222.222     208.67.220.220</strong></span></p>
<p>And follow the same procedure for other DNS service providers if you are interested. And the related IP addresses to configure are in the above list.</p>
<p>After set up the connection, check whether you actually use the Open DNS. So click on network icon and go to Connection Information.</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/test-settings.jpg"><img loading="lazy" data-attachment-id="316" data-permalink="https://gihansblog.wordpress.com/2011/12/31/switching-to-a-third-party-domain-name-system-dns/test-settings/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/test-settings.jpg" data-orig-size="382,516" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="test Settings" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/test-settings.jpg?w=382" class="aligncenter size-medium wp-image-316" title="test Settings" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/test-settings.jpg?w=222&#038;h=300" alt="" width="222" height="300" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/test-settings.jpg?w=222 222w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/test-settings.jpg?w=111 111w, https://gihansblog.wordpress.com/wp-content/uploads/2011/12/test-settings.jpg 382w" sizes="(max-width: 222px) 100vw, 222px" /></a>Now Open firefox and try to load a web page, then you will notice your Internet speed has increased. <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>&nbsp;</p>
<p>Ok, now it&#8217;s all for today and this is the last post for this year and&#8230;.. this is the last day of 2011. And I wish you &#8230;&#8230;&#8230;..</p>
<p>&nbsp;</p>
<h1 style="text-align:center;"><strong><span style="color:#ff0000;">Very Happy New year for All</span></strong></h1>
<h2 style="text-align:center;"><span style="color:#00ff00;"><strong>Happy 2012!</strong></span></h2>
<p>Thank you <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Gihan De Silva</p>
<p><a title="gihansblog.com" href="http://gihansblog.com/" target="_blank">gihansblog.com</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/12/31/switching-to-a-third-party-domain-name-system-dns/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">311</post-id>	<georss:point>6.878075 79.896879</georss:point>
		<geo:lat>6.878075</geo:lat>
		<geo:long>79.896879</geo:long>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns.jpg?w=300" medium="image">
			<media:title type="html">DNS</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/icon.jpg?w=300" medium="image">
			<media:title type="html">icon</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/network-connection-window.jpg?w=300" medium="image">
			<media:title type="html">Network connection window</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/dns-settings.jpg?w=262" medium="image">
			<media:title type="html">DNS settings</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/12/test-settings.jpg?w=222" medium="image">
			<media:title type="html">test Settings</media:title>
		</media:content>
	</item>
		<item>
		<title>Joomla 1.7 installation with XAMPP problem solved</title>
		<link>https://gihansblog.wordpress.com/2011/11/01/joomla-1-7-installation-with-xampp-problem-solved/</link>
					<comments>https://gihansblog.wordpress.com/2011/11/01/joomla-1-7-installation-with-xampp-problem-solved/#comments</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Tue, 01 Nov 2011 13:45:10 +0000</pubDate>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[erorr]]></category>
		<category><![CDATA[gihansblog.com]]></category>
		<category><![CDATA[warning]]></category>
		<category><![CDATA[XAMPP]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=307</guid>

					<description><![CDATA[Hi, Recently Joomla 1.7 was released and obviously that is an excellent product. And new features also added. If you need any guide regarding installation these articles may help you , I think. How to install and configure Joomla 1.6 with XAMPP on Ubuntu 11.04 Though this is Joomla 1.6, there are not different between installation [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi, Recently <a title="Joomla" href="http://www.joomla.org/" target="_blank">Joomla 1.7</a> was released and obviously that is an excellent product. And new features also added. If you need any guide regarding installation these articles may help you , I think.</p>
<p><img loading="lazy" data-attachment-id="114" data-permalink="https://gihansblog.wordpress.com/2011/06/23/how-to-install-and-configure-joomla-1-6-with-xampp-on-ubuntu-11-04/joomla-with-xampp/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/06/joomla-with-xampp.jpg" data-orig-size="500,135" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="joomla with xampp" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/06/joomla-with-xampp.jpg?w=500" class="aligncenter size-medium wp-image-114" title="joomla with xampp" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/06/joomla-with-xampp.jpg?w=300&#038;h=81" alt="" width="300" height="81" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/06/joomla-with-xampp.jpg?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/06/joomla-with-xampp.jpg?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/06/joomla-with-xampp.jpg 500w" sizes="(max-width: 300px) 100vw, 300px" /><a title="Read How to install and configure Joomla 1.6 with XAMPP on Ubuntu 11.04" href="../2011/06/23/how-to-install-and-configure-joomla-1-6-with-xampp-on-ubuntu-11-04/" rel="bookmark">How to install and configure Joomla 1.6 with XAMPP on Ubuntu 11.04</a></p>
<p>Though this is Joomla 1.6, there are not different between installation of 1.6 and 1.7, So thought not to add a new post on it.</p>
<ul>
<li><a title="Read How to install XAMPP on Linux (Ubuntu 11.04)" href="../2011/06/09/how-to-install-xampp-on-linux-ubuntu-11-04/" rel="bookmark">How to install XAMPP on Linux (Ubuntu 11.04)</a></li>
<li><a title="Read How to run XAMPP server on Windows with a flash drive..(portable XAMPP)" href="../2011/06/09/how-to-run-xampp-server-on-windows-with-a-flash-drive-portable-xampp/" rel="bookmark">How to run XAMPP server on Windows with a flash drive..(portable XAMPP)</a></li>
</ul>
<p>In Joomla installation on XAMPP some guys are talking Joomla is giving some errors with XAMPP. Actually they are not errors, they are warnings. Is the nature of the software to give warnings. In standalone software solutions we normally do something called &#8220;error handling&#8221;, right!. We need to care about Errors but we don&#8217;t need to care warnings too much. So simply we can ignore them. Now the problem arises, &#8220;how to turn off the warnings&#8221;, I think now I have entered to our today&#8217;s topic :D.</p>
<p>First you need to find <span style="color:#ff0000;"><strong>php.ini</strong></span> configuration file on your XAMPP installation. It may be located at your</p>
<p>(In windows)<strong> C:\xampp\php\php.ini</strong></p>
<p>(In Ubuntu Linux)<strong> /opt/lampp/etc/php.ini</strong></p>
<p>Then open it on a suitable text editor.</p>
<p>Now find <span style="color:#ff0000;"><strong>error_reporting</strong></span> on php.ini ( Ctrl+F ) and change it&#8217;s value to</p>
<p><span style="color:#ff0000;"><strong>E_ALL | E_STRICT = E_ALL &amp; ~E_DEPRECATED</strong></span></p>
<p>There are three options on <strong>error_reporting</strong>. By default this value may have E_ALL &amp; ~E_NOTICE <strong>or </strong>E_ALL | E_STRICT</p>
<ul>
<li>Default Value: E_ALL &amp; ~E_NOTICE</li>
</ul>
<ul>
<li>Development Value: E_ALL | E_STRICT</li>
</ul>
<ul>
<li>Production Value: E_ALL &amp; ~E_DEPRECATED</li>
</ul>
<p>In first two cases, XAMPP will show errors and Warnings. These things are not good when considering Production Level. That means , a live web site should not give errors for user. But it may useful considering development of web site.</p>
<p>And you need to find <span style="color:#ff0000;"><strong>display_errors</strong></span> on php.ini file and change it&#8217;s value to</p>
<p><span style="color:#ff0000;"><strong>display_errors = off</strong></span>  to make it clearly work! Now save the work and restart the XAMPP server. Joomla will work without any errors. <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>&nbsp;</p>
<p>Thank you</p>
<p>Gihan De Silva</p>
<p>gihansblog.com</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/11/01/joomla-1-7-installation-with-xampp-problem-solved/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">307</post-id>	<georss:point>6.878075 79.896879</georss:point>
		<geo:lat>6.878075</geo:lat>
		<geo:long>79.896879</geo:long>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/06/joomla-with-xampp.jpg?w=300" medium="image">
			<media:title type="html">joomla with xampp</media:title>
		</media:content>
	</item>
		<item>
		<title>A shell script for Renaming large number of files in Linux</title>
		<link>https://gihansblog.wordpress.com/2011/10/29/a-shell-script-for-renaming-large-number-of-file-in-linux/</link>
					<comments>https://gihansblog.wordpress.com/2011/10/29/a-shell-script-for-renaming-large-number-of-file-in-linux/#comments</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Sat, 29 Oct 2011 14:27:05 +0000</pubDate>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell scripts]]></category>
		<category><![CDATA[terminal]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=299</guid>

					<description><![CDATA[Hi, today I&#8217;m going to Blog about a very simple shell script, that may help you guys a lot.NO big deal, its very simple one. It was very helpful to me, once I had to rename a large number of images of Kim Kardashian.  So then I realise it will very easy doing it with [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi, today I&#8217;m going to Blog about a very simple shell script, that may help you guys a lot.NO big deal, its very simple one. It was very helpful to me, once I had to rename a large number of images of Kim Kardashian.  So then I realise it will very easy doing it with a Shell script rather than manually rename it.<img loading="lazy" data-attachment-id="301" data-permalink="https://gihansblog.wordpress.com/2011/10/29/a-shell-script-for-renaming-large-number-of-file-in-linux/icon_cisco_11_rename/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/icon_cisco_11_rename.jpg" data-orig-size="206,205" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="icon_cisco_11_rename" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/icon_cisco_11_rename.jpg?w=206" class="aligncenter size-full wp-image-301" title="icon_cisco_11_rename" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/icon_cisco_11_rename.jpg?w=510" alt=""   srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/icon_cisco_11_rename.jpg 206w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/icon_cisco_11_rename.jpg?w=150&amp;h=150 150w" sizes="(max-width: 206px) 100vw, 206px" /><strong><span style="color:#008000;">#!/bin/bash</span></strong><br />
<strong><span style="color:#008000;">#</span></strong><br />
<strong><span style="color:#008000;"># Author: Gihan De Silva @  gihansblog.com</span></strong><br />
<strong><span style="color:#008000;"># rename script</span></strong><br />
<strong><span style="color:#008000;"># rename.sh</span></strong><br />
<strong><span style="color:#008000;">clear</span></strong><br />
<strong><span style="color:#008000;">x=0</span></strong><br />
<strong><span style="color:#008000;">for i in `ls *.jpg`</span></strong><br />
<strong><span style="color:#008000;">do</span></strong><br />
<strong><span style="color:#008000;">x=`expr $x + 1`</span></strong><br />
<strong><span style="color:#008000;">mv $i Kim_Kardashian$x.jpg</span></strong><br />
<strong><span style="color:#008000;">done</span></strong></p>
<p><strong><span style="color:#008000;">echo &#8220;rename done!&#8221;</span></strong></p>
<p><span style="color:#ff0000;"><strong>Code Explanation!</strong></span></p>
<p><strong>#!/bin/bash  </strong></p>
<p><strong>This is how always a shell script starts.</strong></p>
<p><strong></strong><strong>clear</strong></p>
<p>This line clears all the things already in the terminal window.</p>
<p><strong>x=0</strong></p>
<p>This line define and declare a variable. <strong></strong></p>
<p><strong>for i in `ls *.jpg`</strong></p>
<p>This line starts a loop and, it will list down all the JPEG(jpg) type images.<strong></strong></p>
<p><strong>x=`expr $x + 1`</strong></p>
<p>This line increases the value of <strong>x </strong>by <strong>1</strong>.</p>
<p><strong>mv $i Kim_Kardashian$x.jpg</strong></p>
<p>This line renames all the files according to a sequence like,<strong></strong> <strong>Kim_Kardashian1.jpg , </strong><strong>Kim_Kardashian2.jpg, </strong><strong>Kim_Kardashian3.jpg  &#8230;&#8230;</strong></p>
<p>And you can just make <strong>Kim_Kardashian$x.jpg </strong>like <strong>My_file_name_$x.jpg</strong> ,so that&#8217;s it.</p>
<p>And to run this shell script, put rename.sh shell script into your file folder (directory) .</p>
<p>Then open Terminal window (Ctrl+T).</p>
<p>Go to your file folder through the terminal.</p>
<p>Then type <span style="color:#ff0000;"><strong>chmod 755 rename.sh</strong></span> to get the permission.</p>
<p>Then run it by typing <strong><span style="color:#ff0000;">./rename.sh</span></strong></p>
<p>Now you will see files have renamed :D.</p>
<p>You can <a title="download the rename shell script" href="http://www.box.net/files#/files/0/f/141694344/1/f_1067875212" target="_blank"><strong>DOWNLOAD</strong></a> the shell script from here!</p>
<p>Thank you</p>
<p>Gihan De Silva</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/10/29/a-shell-script-for-renaming-large-number-of-file-in-linux/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">299</post-id>	<georss:point>6.878075 79.896879</georss:point>
		<geo:lat>6.878075</geo:lat>
		<geo:long>79.896879</geo:long>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/icon_cisco_11_rename.jpg" medium="image">
			<media:title type="html">icon_cisco_11_rename</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a GUI(Graphical User Interface) using C programming Language.. (part 5)</title>
		<link>https://gihansblog.wordpress.com/2011/10/28/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-5/</link>
					<comments>https://gihansblog.wordpress.com/2011/10/28/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-5/#comments</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Fri, 28 Oct 2011 08:57:37 +0000</pubDate>
				<category><![CDATA[C programming]]></category>
		<category><![CDATA[Code Blocks]]></category>
		<category><![CDATA[Glade]]></category>
		<category><![CDATA[Graphical User Interface]]></category>
		<category><![CDATA[Gtk]]></category>
		<category><![CDATA[gihan de silva]]></category>
		<category><![CDATA[gihan's blog]]></category>
		<category><![CDATA[GUI]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=285</guid>

					<description><![CDATA[Hi, everyone it&#8217;s been a long time., yes, ok now I&#8217;m back with some Tech things. As promised , today I&#8217;m going to blog about how to create Mini-Calculator with C language GUI. So before get started I thing it&#8217;s better to read past articles on this topic, because some guys informed they didn&#8217;t get [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi, everyone it&#8217;s been a long time., yes, ok now I&#8217;m back with some Tech things. As promised , today I&#8217;m going to blog about how to create Mini-Calculator with C language GUI. So before get started I thing it&#8217;s better to read past articles on this topic, because some guys informed they didn&#8217;t get it very clear. I think that happens because they didn&#8217;t go through the past articles related to this one before read the fresh one <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> .</p>
<div data-shortcode="caption" id="attachment_286" style="width: 310px" class="wp-caption aligncenter"><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com-pic-version.png"><img aria-describedby="caption-attachment-286" loading="lazy" data-attachment-id="286" data-permalink="https://gihansblog.wordpress.com/2011/10/28/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-5/mini-calculator-v-1-0-gihans-blog-com-pic-version/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com-pic-version.png" data-orig-size="412,285" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Mini Calculator v 1.0 Gihan&amp;#8217;s Blog.com pic version" data-image-description="" data-image-caption="&lt;p&gt;Mini Calculator v 1.0&lt;/p&gt;
" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com-pic-version.png?w=412" class="size-medium wp-image-286" title="Mini Calculator v 1.0 Gihan's Blog.com pic version" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com-pic-version.png?w=300&#038;h=207" alt="" width="300" height="207" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com-pic-version.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com-pic-version.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com-pic-version.png 412w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-286" class="wp-caption-text">Mini Calculator v 1.0</p></div>
<p>So here is <span style="color:#ff0000;"><strong>related articles</strong></span> &#8230;. read them first</p>
<p>1) <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.." href="../2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language..</a></p>
<p>2) <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.. (part 2)" href="../2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language.. (part 2)</a></p>
<p>3) <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.. (part 3)" href="../2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language.. (part 3)</a></p>
<p>4) <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.. (part 4)" href="../2011/09/09/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-4/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language.. (part 4)</a></p>
<p><strong><span style="color:#ff0000;">Now open Glade Software and create a user interface with these settings.</span></strong></p>
<ul>
<li>For the main Window<strong><br />
</strong></li>
</ul>
<p>General–&gt; Name= mainWindow<br />
General–&gt;Resizable= No<br />
Common–&gt;Height request = 400<br />
Common–&gt;Width request=250</p>
<ul>
<li>For Display Label</li>
</ul>
<p><strong></strong>General–&gt;Name=displayLabel</p>
<p>General–&gt;Label=Mini-Calculator v1.0 | gihansblog.com</p>
<ul>
<li>For Text Entry</li>
</ul>
<p>General–&gt;Name=textEntry</p>
<ul>
<li>For Exit Button</li>
</ul>
<p><strong></strong>General–&gt;Name=exitButton</p>
<p>General–&gt;Label=Exit</p>
<p>Signals–&gt;Clicked=on_exitButton_clicked</p>
<ul>
<li>For  Button 0 to 9</li>
</ul>
<p><strong></strong>General–&gt;Name=no1Button</p>
<p>General–&gt;Label=1</p>
<p>Signals–&gt;Clicked=on_no1Button_clicked</p>
<p>General–&gt;Name=no2Button</p>
<p>General–&gt;Label=2</p>
<p>Signals–&gt;Clicked=on_no2Button_clicked &#8230;&#8230;&#8230;</p>
<ul>
<li>For + Button</li>
</ul>
<p><strong></strong>General–&gt;Name=addButton</p>
<p>General–&gt;Label=+</p>
<p>Signals–&gt;Clicked=on_addButton_clicked</p>
<ul>
<li>For &#8211; Button</li>
</ul>
<p><strong></strong>General–&gt;Name=subButton</p>
<p>General–&gt;Label= &#8211;</p>
<p>Signals–&gt;Clicked=on_subButton_clicked</p>
<ul>
<li>For x Button</li>
</ul>
<p><strong></strong>General–&gt;Name=mulButton</p>
<p>General–&gt;Label= x</p>
<p>Signals–&gt;Clicked=on_mulButton_clicked</p>
<ul>
<li>For <span style="font-family:Liberation Serif,serif;">÷</span> Button</li>
</ul>
<p><strong></strong>General–&gt;Name=divButton</p>
<p>General–&gt;Label=  ÷</p>
<p>Signals–&gt;Clicked=on_divButton_clicked</p>
<ul>
<li>For √ Button</li>
</ul>
<p><strong></strong>General–&gt;Name=sqrtButton</p>
<p>General–&gt;Label= √</p>
<p>Signals–&gt;Clicked=on_divButton_clicked</p>
<p>After you finish with Glade it should be similar to this..</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com.png"><img loading="lazy" data-attachment-id="289" data-permalink="https://gihansblog.wordpress.com/2011/10/28/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-5/mini-calculator-v-1-0-gihans-blog-com/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com.png" data-orig-size="412,285" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Mini Calculator v 1.0  Gihan&amp;#8217;s Blog.com" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com.png?w=412" class="aligncenter size-medium wp-image-289" title="Mini Calculator v 1.0  Gihan's Blog.com" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com.png?w=300&#038;h=207" alt="Mini Calculator v 1.0  Gihan's Blog.com" width="300" height="207" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com.png 412w" sizes="(max-width: 300px) 100vw, 300px" /></a>Now open Colde Blocks gtk project. Erase the default contents of main.c . Here I have changed the structure of the project like this ..</p>
<p>1) main.c</p>
<p>2) callbacks.c</p>
<p>3) callbacks.h</p>
<p>main.c contains the main method of programm, and callbacks.c contains the rest of methods and callback.h header file contains functions prototypes of methods that contains callback.c</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/project_structure_-gihansblog-com.png"><img loading="lazy" data-attachment-id="290" data-permalink="https://gihansblog.wordpress.com/2011/10/28/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-5/project_structure_-gihansblog-com/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/project_structure_-gihansblog-com.png" data-orig-size="806,469" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="project_structure_ gihansblog.com" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/project_structure_-gihansblog-com.png?w=510" class="aligncenter size-medium wp-image-290" title="project_structure_ gihansblog.com" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/project_structure_-gihansblog-com.png?w=300&#038;h=174" alt="project_structure_ gihansblog.com" width="300" height="174" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/project_structure_-gihansblog-com.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/project_structure_-gihansblog-com.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/project_structure_-gihansblog-com.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><span style="color:#ff0000;"><strong><a title="Mini_Calculator source code" href="http://www.box.net/files#/files/0/f/141694344/1/f_1063041708" target="_blank"><strong>DOWNLOAD</strong></a>  the Source code!<br />
</strong></span></p>
<p><strong>Here I&#8217;m not going to explain all the things, because I&#8217;ve already explained most of it in previous articles.</strong></p>
<h4><span style="color:#ff0000;"><strong>Code Explained&#8230;</strong></span></h4>
<p><span style="color:#008000;">GladeXML *xml;</span><br />
<span style="color:#008000;">GtkWidget *textValue;</span></p>
<p><span style="color:#008000;">gdouble display;</span><br />
<span style="color:#008000;">gdouble primaryTotal=0;//primary total</span><br />
<span style="color:#008000;">gdouble mainTotal=0;</span></p>
<p><span style="color:#008000;">gchar *d_string;</span></p>
<p><span style="color:#008000;">int clickedButton=0;// find the clicked buttton default is zero &#8216;0&#8217;.</span><br />
<span style="color:#008000;">                    /*</span><br />
<span style="color:#008000;">                    Values of &#8216;clickedButton&#8217;</span><br />
<span style="color:#008000;">                    &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br />
<span style="color:#008000;">                    plusButton_clicked &#8211;&gt;1</span><br />
<span style="color:#008000;">                    subButton_clicked  &#8211;&gt;2</span><br />
<span style="color:#008000;">                    mulButton_clicked  &#8211;&gt;3</span><br />
<span style="color:#008000;">                    divButton_clicked  &#8211;&gt;4</span><br />
<span style="color:#008000;">                    */</span></p>
<p>Mainly in here, what we do with a calculator is do some calculation. For example think we are going to do this operation &#8220;1+2&#8221;. So first what we do is hit the &#8220;1&#8221; button and hit &#8220;+&#8221; and &#8220;2&#8221;, then press &#8220;=&#8221; to get the result on the text entry. In this algorithm , when pressing the &#8220;1&#8221; button it gives the &#8220;1&#8221; value to the text entry and when &#8220;+&#8221; button clicked it stores the display value in <strong>display</strong> variable and get the sum with <strong>primaryTotal</strong> variable and put it to again <strong>primaryTotal</strong> . Then we press &#8220;2&#8221;. So now this also displays on the text entry, then &#8220;=&#8221; button clicked ,it should chose the correct operation(at this time, it is &#8220;+&#8221;) in the operation <strong>primaryTotal</strong> value should do the related operation with <strong>display </strong>then should put it again into <strong>mainTotal</strong>. For example in addition it should be</p>
<p><strong>mainTotal=primaryTotal+display;</strong></p>
<p><strong><span style="color:#008000;">G_MODULE_EXPORT void on_no1Button_clicked(GtkWidget *widget, gpointer *data)</span></strong><br />
<span style="color:#008000;">{</span><br />
<span style="color:#008000;">    /* Find the Glade XML tree containing widget. */</span><br />
<span style="color:#008000;">    xml = glade_get_widget_tree(GTK_WIDGET( widget ));</span></p>
<p><span style="color:#008000;">    /* Pull the widgets out of the tree */</span><br />
<span style="color:#008000;">    textValue= glade_xml_get_widget(xml, &#8220;textEntry&#8221;);</span></p>
<p><span style="color:#008000;">    gtk_entry_append_text(GTK_ENTRY(textValue),&#8221;1&#8243;);</span><br />
<span style="color:#008000;">}</span><br />
Here first line gets the widget tree to a GladeXML type variable. Then second line gets the textEntry value to the GtkWidget type variable called textValue. Third line set &#8220;1&#8221; to the textEntry object as append action. Like this all 0-9 button code works.</p>
<p><span style="color:#008000;"><strong>G_MODULE_EXPORT void on_addButton_clicked(GtkWidget *widget, gpointer *data)</strong></span><br />
<span style="color:#008000;">{</span><br />
<span style="color:#008000;">    /* Find the Glade XML tree containing widget. */</span><br />
<span style="color:#008000;">    xml = glade_get_widget_tree(GTK_WIDGET( widget ));</span></p>
<p><span style="color:#008000;">    /* Pull the widgets out of the tree */</span><br />
<span style="color:#008000;">    textValue= glade_xml_get_widget(xml, &#8220;textEntry&#8221;);</span></p>
<p><span style="color:#008000;">    /* Get the string value form the Entry widgets */</span><br />
<span style="color:#008000;">    d_string=gtk_entry_get_text(GTK_ENTRY(textValue));</span></p>
<p><span style="color:#008000;">    /* convert it into the double */</span><br />
<span style="color:#008000;">    display=atof(d_string);</span></p>
<p><span style="color:#008000;">    /* Add it to the primary total */</span><br />
<span style="color:#008000;">    primaryTotal=primaryTotal+display;</span></p>
<p><span style="color:#008000;">    /* Clear the entry*/</span><br />
<span style="color:#008000;">    gtk_entry_set_text(GTK_ENTRY(textValue),&#8221;&#8221;);</span></p>
<p><span style="color:#008000;">    /* Set clicked button as 1 &#8216;plusButton_clicked&#8217; */</span><br />
<span style="color:#008000;">    clickedButton=1;</span><br />
<span style="color:#008000;">}</span><br />
In this method first 3 lines are similar to above explanation. In third line I have used atof() function from math.h header. It converts the string value to double. Because we need double values to calculate the maths. Next line gets the sum of primaryTotal and display variables. Then clearing the textEntry field it sets clickedButton variable to 1, to mention that the operation is set to summation. Like wise, value of clickedButton says the operation to do.<br />
<strong> Values of &#8216;clickedButton&#8217;</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
plusButton_clicked &#8211;&gt;1<br />
subButton_clicked  &#8211;&gt;2<br />
mulButton_clicked  &#8211;&gt;3<br />
divButton_clicked  &#8211;&gt;4</p>
<p><span style="color:#008000;"><strong>G_MODULE_EXPORT void on_equalButton_clicked(GtkWidget *widget, gpointer *data)</strong></span><br />
<span style="color:#008000;">{</span><br />
<span style="color:#008000;">    /* Find the Glade XML tree containing widget. */</span><br />
<span style="color:#008000;">    xml = glade_get_widget_tree(GTK_WIDGET( widget ));</span></p>
<p><span style="color:#008000;">    /* Pull the widgets out of the tree */</span><br />
<span style="color:#008000;">    textValue= glade_xml_get_widget(xml, &#8220;textEntry&#8221;);</span></p>
<p><span style="color:#008000;">    /* Read the entry value and copy it to a char* */</span><br />
<span style="color:#008000;">    d_string=gtk_entry_get_text(GTK_ENTRY(textValue));</span></p>
<p><span style="color:#008000;">    /* convert the string to double*/</span><br />
<span style="color:#008000;">    display=atof(d_string);</span></p>
<p><span style="color:#008000;">    /*Do the oprations according to clicked button*/</span></p>
<p><span style="color:#008000;">        switch(clickedButton)</span><br />
<span style="color:#008000;">        {</span><br />
<span style="color:#008000;">            case 0 :{</span><br />
<span style="color:#008000;">                    break;</span><br />
<span style="color:#008000;">                    }</span></p>
<p><span style="color:#008000;">            case 1 :{</span><br />
<span style="color:#008000;">                    /* Do Addition*/</span><br />
<span style="color:#008000;">                    mainTotal=primaryTotal+display;</span><br />
<span style="color:#008000;">                    break;</span><br />
<span style="color:#008000;">                    }</span></p>
<p><span style="color:#008000;">            case 2 :{</span><br />
<span style="color:#008000;">                    /* Do Substraction*/</span><br />
<span style="color:#008000;">                    mainTotal=primaryTotal-display;</span><br />
<span style="color:#008000;">                    break;</span><br />
<span style="color:#008000;">                    }</span></p>
<p><span style="color:#008000;">            case 3 :{</span><br />
<span style="color:#008000;">                    /* Do Multipication*/</span><br />
<span style="color:#008000;">                    mainTotal=primaryTotal*display;</span><br />
<span style="color:#008000;">                    break;</span><br />
<span style="color:#008000;">                    }</span></p>
<p><span style="color:#008000;">            case 4 :{</span><br />
<span style="color:#008000;">                    /* Do Division*/</span><br />
<span style="color:#008000;">                    mainTotal=primaryTotal/display;</span><br />
<span style="color:#008000;">                    break;</span><br />
<span style="color:#008000;">                    }</span></p>
<p><span style="color:#008000;">        }// end switch</span></p>
<p><span style="color:#008000;">    /*convert double to string and print the value on entry*/</span><br />
<span style="color:#008000;">    gtk_entry_set_text(GTK_ENTRY(textValue),g_strdup_printf(&#8220;%f&#8221;,mainTotal));</span></p>
<p><span style="color:#008000;">    /* set total to zreo &#8216;0&#8217;*/</span><br />
<span style="color:#008000;">    primaryTotal=0;</span></p>
<p><span style="color:#008000;">    /* Set clickedButton value back to the default*/</span><br />
<span style="color:#008000;">}</span></p>
<p>In this method the <strong>switch</strong> structure decides which operation to do. After doing the related calculation in a <strong>case</strong>, it should display the main in text entry. But double values are not allowed in the text entry widget, so we have to convert it to String (char *) type.</p>
<p><span style="color:#008000;">gtk_entry_set_text(GTK_ENTRY(textValue),g_strdup_printf(&#8220;%f&#8221;,mainTotal));</span> this line is responsible for that conversion.</p>
<p>Now I think I&#8217;ve explained all the main things about the program here.</p>
<p>If you want the calculator look like the first image. You should do it with the Glade designer like this.</p>
<p>Open the Glade designer project and click on a button you want to add an image. Think you want to change the image of &#8220;1&#8221; button. Then click on &#8220;<strong>1</strong>&#8221; button then go to General tab under Properties check the radio button &#8220;<strong>Add custom button content</strong>&#8221;  . Now you see the appearance of the button is changed. Then click on image widget under Displays and Controls, after that click the &#8220;1&#8221; Button again.</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/glade-image.png"><img loading="lazy" data-attachment-id="291" data-permalink="https://gihansblog.wordpress.com/2011/10/28/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-5/glade-image/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/glade-image.png" data-orig-size="1280,776" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="glade image" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/glade-image.png?w=510" class="aligncenter size-medium wp-image-291" title="glade image" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/glade-image.png?w=300&#038;h=181" alt="" width="300" height="181" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/glade-image.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/glade-image.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/10/glade-image.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Find some appropriate button image or draw something like this.<a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/1.png"><img loading="lazy" data-attachment-id="292" data-permalink="https://gihansblog.wordpress.com/2011/10/28/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-5/attachment/1/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/1.png" data-orig-size="30,30" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="1" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/1.png?w=30" class="alignnone size-full wp-image-292" title="1" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/1.png?w=510" alt=""   /></a></p>
<p>Then go to General tab under Properties and check radio button <strong>File Name</strong> and set the path for image file. <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> then you will see it at the run time.</p>
<p>Ok that’s all for today <img src="https://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif?m=1263013563g" alt=":D" /> . You can <a title="Mini_Calculator source code" href="http://www.box.net/files#/files/0/f/141694344/1/f_1063041708" target="_blank"><strong>DOWNLOAD</strong></a> my CodeBlock project here!. Good luck.</p>
<p>Thank you</p>
<p>Gihan De Silva</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/10/28/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-5/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">285</post-id>	<georss:point>6.878075 79.896879</georss:point>
		<geo:lat>6.878075</geo:lat>
		<geo:long>79.896879</geo:long>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com-pic-version.png?w=300" medium="image">
			<media:title type="html">Mini Calculator v 1.0 Gihan&#039;s Blog.com pic version</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/mini-calculator-v-1-0-gihans-blog-com.png?w=300" medium="image">
			<media:title type="html">Mini Calculator v 1.0  Gihan&#039;s Blog.com</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/project_structure_-gihansblog-com.png?w=300" medium="image">
			<media:title type="html">project_structure_ gihansblog.com</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/glade-image.png?w=300" medium="image">
			<media:title type="html">glade image</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/10/1.png" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif?m=1263013563g" medium="image">
			<media:title type="html">:D</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a GUI(Graphical User Interface) using C programming Language.. (part 4)</title>
		<link>https://gihansblog.wordpress.com/2011/09/09/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-4/</link>
					<comments>https://gihansblog.wordpress.com/2011/09/09/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-4/#comments</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Fri, 09 Sep 2011 14:40:07 +0000</pubDate>
				<category><![CDATA[C programming]]></category>
		<category><![CDATA[Code Blocks]]></category>
		<category><![CDATA[Glade]]></category>
		<category><![CDATA[Graphical User Interface]]></category>
		<category><![CDATA[Gtk]]></category>
		<category><![CDATA[gihansblog.com]]></category>
		<category><![CDATA[text entry]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=276</guid>

					<description><![CDATA[Hi,  after a long time I was able to find a time to write the blog, because these days I&#8217;m very busy with my exam and it will end 29th  September. So until that I doubt I&#8217;d be able to write much. So sorry for that my all friends who read this. Related articles.. 1) [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi,  after a long time I was able to find a time to write the blog, because these days I&#8217;m very busy with my exam and it will end 29<sup>th</sup>  September. So until that I doubt I&#8217;d be able to write much. So sorry for that my all friends who read this.</p>
<p><span style="color:#ff0000;"><strong>Related articles..</strong></span></p>
<p>1) <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.." href="../2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language..</a></p>
<p>2) <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.. (part 2)" href="../2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language.. (part 2)</a></p>
<p>3) <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.. (part 3)" href="../2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language.. (part 3)</a></p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot.png"><img loading="lazy" data-attachment-id="277" data-permalink="https://gihansblog.wordpress.com/2011/09/09/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-4/screenshot-14/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot.png" data-orig-size="1280,800" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot.png?w=510" class="aligncenter size-medium wp-image-277" title="Screenshot" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot.png?w=300&#038;h=187" alt="" width="300" height="187" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><strong>And this article focus on</strong>  <span style="color:#ff0000;"><strong>how to use a Text Entry with button action signals.</strong></span>  And the purpose of this program is display the string in the label,which user enter in the text entry.</p>
<p><span style="color:#ff0000;"><strong>Contents&#8230;</strong></span></p>
<p>1) Open a Code Blocks projects</p>
<p>2) Open a Glade Project</p>
<p>3) Set properties for the components</p>
<p>4) Code the C Gtk project</p>
<p>5) Run the project</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-1.png"><img loading="lazy" data-attachment-id="279" data-permalink="https://gihansblog.wordpress.com/2011/09/09/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-4/screenshot-1-4/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-1.png" data-orig-size="487,324" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot-1" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-1.png?w=487" class="aligncenter size-medium wp-image-279" title="Screenshot-1" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-1.png?w=300&#038;h=199" alt="" width="300" height="199" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-1.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-1.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-1.png 487w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><span style="color:#ff0000;"><strong>Components</strong></span></p>
<p>1) Window= mainWindow</p>
<p>2) Label= displayLabel</p>
<p>3) Text Entry= textEntry</p>
<p>4) Button= displayButton</p>
<p>5) Button= exitButton</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry-glade.png"><img loading="lazy" data-attachment-id="278" data-permalink="https://gihansblog.wordpress.com/2011/09/09/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-4/screenshot-textentry-glade/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry-glade.png" data-orig-size="1280,776" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot-TextEntry.glade" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry-glade.png?w=510" class="aligncenter size-medium wp-image-278" title="Screenshot-TextEntry.glade" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry-glade.png?w=300&#038;h=181" alt="" width="300" height="181" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry-glade.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry-glade.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry-glade.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><strong><span style="color:#ff0000;">Set properties</span></strong></p>
<ul>
<li>For the main Window<strong><br />
</strong></li>
</ul>
<p>General–&gt; Name= mainWindow<br />
General–&gt;Resizable= No<br />
Common–&gt;Height request = 400<br />
Common–&gt;Width request=200</p>
<ul>
<li>For Display Label</li>
</ul>
<p><strong></strong>General–&gt;Name=displayLabel</p>
<p>General–&gt;Label=Display</p>
<ul>
<li>For Display Button</li>
</ul>
<p>General–&gt;Name=displayButton</p>
<p>General–&gt;Label=Display</p>
<p>Signals–&gt;Clicked=on_displayButton_clicked</p>
<ul>
<li>For Exit Button</li>
</ul>
<p><strong></strong>General–&gt;Name=exitButton</p>
<p>General–&gt;Label=Exit</p>
<p>Signals–&gt;Clicked=on_exitButton_clicked</p>
<ul>
<li>For Text Entry</li>
</ul>
<p>General&#8211;&gt;Name=textEntry</p>
<p><strong><span style="color:#ff0000;">Then save</span></strong> it as <span style="color:#008000;">TextEntry.glade</span> in libglade format in the CodeBlocks project folder.</p>
<p>In this C project I divided the whole project into three files.</p>
<p>1) main.c</p>
<p>2) callback.c</p>
<p>3) callback.h</p>
<p><span style="color:#ff0000;"><strong>The source code of main.c </strong></span></p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;gtk/gtk.h&gt;<br />
#include &lt;glade/glade.h&gt;</p>
<p>/*<br />
Author : Gihan De Silva<br />
gihansblog.com</p>
<p>Purpose: This program displays the string in the label,which user enter in the text entry.<br />
*/<br />
GladeXML *xml;<br />
GtkWidget *widget;</p>
<p>int main(int argc, char *argv[])<br />
{</p>
<p>gtk_init(&amp;argc, &amp;argv);</p>
<p>/*import glade file*/<br />
xml = glade_xml_new(&#8220;TextEntry.glade&#8221;, NULL, NULL);</p>
<p>/* get a widget (useful if you want to change something) */<br />
widget = glade_xml_get_widget(xml, &#8220;mainWindow&#8221;);</p>
<p>/* connect signal handlers */<br />
glade_xml_signal_autoconnect(xml);</p>
<p>/*show widget*/<br />
gtk_widget_show (widget);</p>
<p>gtk_main();</p>
<p>return 0;<br />
}</p>
<p><strong><span style="color:#ff0000;">The source code of callback.c</span></strong></p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;gtk/gtk.h&gt;<br />
#include &lt;glade/glade.h&gt;</p>
<p>GladeXML *xml;<br />
GtkWidget *display;<br />
GtkWidget *textValue;</p>
<p>gchar *d_string;</p>
<p>G_MODULE_EXPORT void on_displayButton_clicked(GtkButton *button,gpointer *data)<br />
{</p>
<p>/* Pull the widgets out of the tree */<br />
display= glade_xml_get_widget(xml, &#8220;displayLabel&#8221;);</p>
<p>textValue= glade_xml_get_widget(xml, &#8220;textEntry&#8221;);</p>
<p>/* Get the string value form the Entry widgets */<br />
d_string=gtk_entry_get_text(GTK_ENTRY(textValue));</p>
<p>gtk_label_set_text(GTK_LABEL(display),d_string);<br />
}</p>
<p>G_MODULE_EXPORT void on_exitButton_clicked(GtkButton *button,gpointer *data)<br />
{<br />
gtk_main_quit();<br />
}</p>
<p><strong><span style="color:#ff0000;"><strong>The source code of callback.h </strong></span><br />
</strong></p>
<p>G_MODULE_EXPORT void on_displayButton_clicked(GtkButton *button,gpointer *data);<br />
G_MODULE_EXPORT void on_exitButton_clicked(GtkButton *button,gpointer *data);</p>
<p>Now run the gtk project and it will look like this.</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry.png"><img loading="lazy" data-attachment-id="280" data-permalink="https://gihansblog.wordpress.com/2011/09/09/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-4/screenshot-textentry/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry.png" data-orig-size="412,235" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot-TextEntry" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry.png?w=412" class="aligncenter size-medium wp-image-280" title="Screenshot-TextEntry" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry.png?w=300&#038;h=171" alt="" width="300" height="171" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry.png 412w" sizes="(max-width: 300px) 100vw, 300px" /></a><br />
And when you hit the Display button, it will display the content in the text entry..</p>
<h4><span style="color:#ff0000;"><strong></strong><strong>Display Button Code Explained…</strong></span></h4>
<p>Here I&#8217;m not going to explain all the code because I already have explained them in previous articles. If you haven&#8217;t read previous article, you&#8217;d better to read them first. But I&#8217;m going to explain the specific things related to this article.</p>
<p>GladeXML *xml;<br />
GtkWidget *display;<br />
GtkWidget *textValue;</p>
<p>gchar *d_string;</p>
<p>G_MODULE_EXPORT void on_displayButton_clicked(GtkButton *button,gpointer *data)<br />
{<br />
/* Pull the widgets out of the tree */<br />
display= glade_xml_get_widget(xml, &#8220;displayLabel&#8221;);</p>
<p>textValue= glade_xml_get_widget(xml, &#8220;textEntry&#8221;);</p>
<p><strong>In these two lines, the program will take glade widgets into Gtk widgets.</strong></p>
<p>/* Get the string value form the Entry widgets */<br />
d_string=gtk_entry_get_text(GTK_ENTRY(textValue));</p>
<p><strong>We can&#8217;t directly use GtkWidgets to set gtk label, because it needs gchar* type data. So in here we convert to into gchar* .</strong></p>
<p>gtk_label_set_text(GTK_LABEL(display),d_string);</p>
<p><strong>Now with above line we can set it to the label.</strong></p>
<p>}</p>
<p>Ok that’s all for today <img src="https://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif?m=1263013563g" alt=":D" /> . If you want, you can <a title="Download Code Blocks Project" href="https://sites.google.com/site/gihansblogfilemanager/file-manager/TextEntry.zip?attredirects=0&amp;d=1"><span style="color:#ff0000;"><strong>DOWNLOAD</strong></span></a> my CodeBlock project here!. In next post I will show you how to create a simple Calculator using Gtk and Glade.</p>
<p>Thank you</p>
<p>Gihan De Silva</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/09/09/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-4/feed/</wfw:commentRss>
			<slash:comments>47</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">276</post-id>	<georss:point>6.878075 79.896879</georss:point>
		<geo:lat>6.878075</geo:lat>
		<geo:long>79.896879</geo:long>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot.png?w=300" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-1.png?w=300" medium="image">
			<media:title type="html">Screenshot-1</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry-glade.png?w=300" medium="image">
			<media:title type="html">Screenshot-TextEntry.glade</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/09/screenshot-textentry.png?w=300" medium="image">
			<media:title type="html">Screenshot-TextEntry</media:title>
		</media:content>

		<media:content url="http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif?m=1263013563g" medium="image">
			<media:title type="html">:D</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a GUI(Graphical User Interface) using C programming Language.. (part 3)</title>
		<link>https://gihansblog.wordpress.com/2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/</link>
					<comments>https://gihansblog.wordpress.com/2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/#comments</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Wed, 17 Aug 2011 14:48:37 +0000</pubDate>
				<category><![CDATA[C programming]]></category>
		<category><![CDATA[Code Blocks]]></category>
		<category><![CDATA[Glade]]></category>
		<category><![CDATA[Graphical User Interface]]></category>
		<category><![CDATA[Gtk]]></category>
		<category><![CDATA[gihan]]></category>
		<category><![CDATA[gihansblog.com]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[GUI programing]]></category>
		<category><![CDATA[widget tree]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=264</guid>

					<description><![CDATA[Hi, this is the third part of the How to create a GUI(Graphical User Interface) using C programming Language.. (part 2) post as I promised. In today’s post I’m going to tell you how to create and run Simple hello world GUI program. And it includes how display a message when click a button. Ok now open [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi, this is the third part of the <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.. (part 2)" href="../2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language.. (part 2)</a> post as I promised. In today’s post I’m going to tell you how to create and run Simple hello world GUI program.</p>
<p>And it includes how display a message when click a button.</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png"><img loading="lazy" data-attachment-id="266" data-permalink="https://gihansblog.wordpress.com/2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/glade-2/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade2.png" data-orig-size="482,320" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="glade" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade2.png?w=482" class="aligncenter size-medium wp-image-266" title="glade" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade2.png?w=300&#038;h=199" alt="" width="300" height="199" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade2.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade2.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade2.png 482w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png"><br />
</a>Ok now open a new glade project and draw a GUI like above image. You have three components one label and two buttons.</p>
<p>Then set properties like this.</p>
<ul>
<li><span style="color:#ff0000;">For the main Window</span><strong><br />
</strong></li>
</ul>
<p>General&#8211;&gt; Name= mainWindow<br />
General&#8211;&gt;Resizable= No<br />
Common&#8211;&gt;Height request = 400<br />
Common&#8211;&gt;Width request=200</p>
<ul>
<li><span style="color:#ff0000;">For Display Label</span></li>
</ul>
<p><strong></strong>General&#8211;&gt;Name=displayLabel</p>
<p>General&#8211;&gt;Label=Display</p>
<ul>
<li><span style="color:#ff0000;">For Display Button</span></li>
</ul>
<p>General&#8211;&gt;Name=displayButton</p>
<p>General&#8211;&gt;Label=Display</p>
<p>Signals&#8211;&gt;Clicked=on_displayButton_clicked</p>
<ul>
<li><span style="color:#ff0000;">For Exit Button</span></li>
</ul>
<p><strong></strong>General&#8211;&gt;Name=exitButton</p>
<p>General&#8211;&gt;Label=Exit</p>
<p>Signals&#8211;&gt;Clicked=on_exitButton_clicked</p>
<p>Then save it as <span style="color:#008000;">hello.glade</span> in libglade format.</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshotofglade.png"><img loading="lazy" data-attachment-id="268" data-permalink="https://gihansblog.wordpress.com/2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/screenshotofglade/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshotofglade.png" data-orig-size="1280,800" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="ScreenshotOfGlade" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshotofglade.png?w=510" class="aligncenter size-medium wp-image-268" title="ScreenshotOfGlade" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshotofglade.png?w=300&#038;h=187" alt="" width="300" height="187" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshotofglade.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshotofglade.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshotofglade.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Now open CodeBlock&#8217;s Gtk+ project. When you open a new it will automatically generates some codes, so erase and clear main.c .Then copy paste this code into your main.c .</p>
<p><strong>Then</strong> <strong>copy your hello.glade file into CodeBlock project folder.</strong></p>
<p><span style="color:#008000;">#include &lt;stdio.h&gt;</span><br />
<span style="color:#008000;">#include &lt;gtk/gtk.h&gt;</span><br />
<span style="color:#008000;">#include &lt;glade/glade.h&gt;</span></p>
<p>/*<br />
Author : Gihan De Silva<br />
gihansblog.com<br />
*/</p>
<p>GladeXML *xml;<br />
GtkWidget *widget;<br />
GtkWidget *display;</p>
<p>G_MODULE_EXPORT <span style="color:#0000ff;"><strong>void</strong></span> on_displayButton_clicked(GtkButton *button,gpointer *data)<br />
{<br />
/* Find the Glade XML tree containing widget. */<br />
xml = glade_get_widget_tree(GTK_WIDGET( widget ));</p>
<p>/* Pull the widgets out of the tree */<br />
display= glade_xml_get_widget(xml, &#8220;displayLabel&#8221;);</p>
<p>gtk_label_set_text(GTK_LABEL(display),&#8221;Hello World!\n gihansblog.com&#8221;);<br />
}</p>
<p>G_MODULE_EXPORT <strong><span style="color:#0000ff;">void</span></strong> on_exitButton_clicked(GtkButton *button,gpointer *data)<br />
{<br />
gtk_main_quit();<br />
}</p>
<p><span style="color:#0000ff;"><strong>int</strong></span> main(int argc, char *argv[])<br />
{</p>
<p>gtk_init(&amp;argc, &amp;argv);</p>
<p>/*import glade file*/<br />
xml = glade_xml_new(&#8220;hello.glade&#8221;, NULL, NULL);</p>
<p>/* get a widget (useful if you want to change something) */<br />
widget = glade_xml_get_widget(xml, &#8220;mainWindow&#8221;);</p>
<p>/* connect signal handlers */<br />
glade_xml_signal_autoconnect(xml);</p>
<p>/*show widget*/<br />
gtk_widget_show (widget);</p>
<p>gtk_main();</p>
<p>return 0;<br />
}</p>
<p>Now run the project. If everything ok it will look like this and will function well :D.</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png"><img loading="lazy" data-attachment-id="265" data-permalink="https://gihansblog.wordpress.com/2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/screenshot-helloworld-2/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png" data-orig-size="405,231" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot-HelloWorld-2" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png?w=405" class="aligncenter size-medium wp-image-265" title="Screenshot-HelloWorld-2" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png?w=300&#038;h=171" alt="" width="300" height="171" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png 405w" sizes="(max-width: 300px) 100vw, 300px" /></a><strong>The program in CodeBlocks&#8230;</strong></p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot1.png"><img loading="lazy" data-attachment-id="269" data-permalink="https://gihansblog.wordpress.com/2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/screenshot-13/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot1.png" data-orig-size="1280,800" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot1.png?w=510" class="aligncenter size-medium wp-image-269" title="Screenshot" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot1.png?w=300&#038;h=187" alt="" width="300" height="187" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot1.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot1.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot1.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<h4><span style="color:#ff0000;"><strong>Main Code Explained&#8230;</strong></span></h4>
<p>First we should initialise gtk in our code.</p>
<p><strong><span style="color:#008000;">gtk_init(&amp;argc, &amp;argv);</span></strong></p>
<p>Then we have to import our .glade file into our program and convert it into xml file format.</p>
<p><strong><span style="color:#008000;">xml = glade_xml_new(&#8220;hello.glade&#8221;, NULL, NULL);</span></strong></p>
<p>Now signals of widgets should be functioning with this line.</p>
<p><strong><span style="color:#008000;"> glade_xml_signal_autoconnect(xml);</span></strong></p>
<p>And with this line, it will show the GUI at run time.</p>
<p><strong><span style="color:#008000;">gtk_widget_show (widget);</span></strong></p>
<p>Then call gtk main method</p>
<p><span style="color:#008000;"><strong>gtk_main();</strong></span></p>
<h4><span style="color:#ff0000;"><strong></strong><strong>Exit Button Code Explained&#8230;</strong></span></h4>
<p>In the exit button we call<br />
<strong><span style="color:#008000;">gtk_main_quit();</span></strong></p>
<p>to quit fro the program.</p>
<h4><span style="color:#ff0000;"><strong></strong><strong></strong><strong></strong><strong>Display Button Code Explained&#8230;</strong></span></h4>
<p>Then find the Glade XML tree containing widget.<br />
<span style="color:#008000;"><strong> xml = glade_get_widget_tree(GTK_WIDGET( widget ));</strong></span></p>
<p>Now pull the label widgets out of the tree<br />
<strong> <span style="color:#008000;">display= glade_xml_get_widget(xml, &#8220;displayLabel&#8221;);</span></strong></p>
<p>Display the message on the label<br />
<strong><span style="color:#008000;">gtk_label_set_text(GTK_LABEL(display),&#8221;Hello World!\n gihansblog.com&#8221;);</span></strong></p>
<p>Ok that&#8217;s all for today :D. If you want, you can <a title="Download Code Blocks Project" href="https://sites.google.com/site/gihansblogfilemanager/file-manager/HelloWorld.zip?attredirects=0&amp;d=1"><span style="color:#ff0000;"><strong>DOWNLOAD</strong></span></a> my CodeBlock project here!. In next post I will show you how to add a Text Entry widget to your application.</p>
<p>Thank you</p>
<p>Gihan De Silva</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/08/17/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-3/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">264</post-id>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade2.png?w=300" medium="image">
			<media:title type="html">glade</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshotofglade.png?w=300" medium="image">
			<media:title type="html">ScreenshotOfGlade</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-helloworld-2.png?w=300" medium="image">
			<media:title type="html">Screenshot-HelloWorld-2</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot1.png?w=300" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a GUI(Graphical User Interface) using C programming Language.. (part 2)</title>
		<link>https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/</link>
					<comments>https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/#respond</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Sat, 13 Aug 2011 13:37:08 +0000</pubDate>
				<category><![CDATA[Glade]]></category>
		<category><![CDATA[Graphical User Interface]]></category>
		<category><![CDATA[Glade3]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[GUI designnig]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=253</guid>

					<description><![CDATA[Hi, this is the second part of the How to create a GUI(Graphical User Interface) using C programming Language..   post. In today&#8217;s post I&#8217;m going to tell you how to use Glade software to design a GUI for a C program. Now I think you have prepared your development environment :D.First we need to recognise [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi, this is the second part of the <a title="Read How to create a GUI(Graphical User Interface) using C programming Language.." href="../2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/" rel="bookmark">How to create a GUI(Graphical User Interface) using C programming Language.. </a>  post. In today&#8217;s post I&#8217;m going to tell you how to use Glade software to design a GUI for a C program. Now I think you have prepared your development environment :D.<img loading="lazy" data-attachment-id="254" data-permalink="https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/glade/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade1.png" data-orig-size="96,96" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="glade" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade1.png?w=96" class="aligncenter size-full wp-image-254" title="glade" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade1.png?w=510" alt=""   />First we need to recognise the Glade environment..</p>
<ul>
<li><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade_interface.png"><img loading="lazy" data-attachment-id="255" data-permalink="https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/glade_interface/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade_interface.png" data-orig-size="1280,776" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="glade_interface" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade_interface.png?w=510" class="aligncenter size-medium wp-image-255" title="glade_interface" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade_interface.png?w=300&#038;h=181" alt="" width="300" height="181" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade_interface.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade_interface.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade_interface.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a>Open glade, then you will a window like this. In the <span style="color:#ff0000;"><strong>Top Levels</strong></span> tab of <strong>Palette</strong> select window and click on <strong>Editor</strong>.Then you will a Gray colour window on it. In the inspector view you can change the name of the window. To change the size and other properties go to properties.  This is not much smiler to Net-beans IDE, aligning component is much difficult. But this is much easier than hard coding :-).</li>
</ul>
<ul>
<li>Now we should add a container for the window to keep the other component on it. In the <strong>Containers</strong> tab of <strong>Palette</strong> select one of containers like Vertical Box then click on the Editor&#8217;s window.</li>
</ul>
<ul>
<li><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/vbox.png"><img loading="lazy" data-attachment-id="256" data-permalink="https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/vbox/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/vbox.png" data-orig-size="506,339" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="vbox" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/vbox.png?w=506" class="aligncenter size-medium wp-image-256" title="vbox" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/vbox.png?w=300&#038;h=200" alt="" width="300" height="200" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/vbox.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/vbox.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/vbox.png 506w" sizes="(max-width: 300px) 100vw, 300px" /></a>Then It will look like this. But for example if you add a button component to one of this cell, it fills all overt the cell. But if you need you can further divide into more cells adding one or more containers. For example here I will add another table container into middle cell. Then it will look like this.</li>
</ul>
<ul>
<li><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid.png"><img loading="lazy" data-attachment-id="257" data-permalink="https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/grid/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid.png" data-orig-size="480,316" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="grid" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid.png?w=480" class="aligncenter size-medium wp-image-257" title="grid" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid.png?w=300&#038;h=197" alt="" width="300" height="197" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid.png 480w" sizes="(max-width: 300px) 100vw, 300px" /></a>Ok now I&#8217;m going to add some component to it. Under <strong>Control and Display</strong> tab of the palette, find <strong>Button</strong> and <strong>Text Entry</strong> widgets(components), so add it the container.</li>
</ul>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid2.png"><img loading="lazy" data-attachment-id="258" data-permalink="https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/grid2/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid2.png" data-orig-size="479,323" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="grid2" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid2.png?w=479" class="aligncenter size-medium wp-image-258" title="grid2" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid2.png?w=300&#038;h=202" alt="" width="300" height="202" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid2.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid2.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid2.png 479w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Ok now Save the GUI you designed. In the Save or Save As menu, there are two options to save.</p>
<ol>
<li><strong>GtkBuilder</strong></li>
<li><strong>Libglade</strong></li>
</ol>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-save-ase280a6.png"><img loading="lazy" data-attachment-id="259" data-permalink="https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/screenshot-save-as%e2%80%a6/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-save-ase280a6.png" data-orig-size="866,647" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot-Save As…" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-save-ase280a6.png?w=510" class="aligncenter size-medium wp-image-259" title="Screenshot-Save As…" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-save-ase280a6.png?w=300&#038;h=224" alt="" width="300" height="224" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-save-ase280a6.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-save-ase280a6.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-save-ase280a6.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a>Choose the File Format Libglade, and save it as <span style="color:#ff0000;"><strong>hello_world.glade</strong></span>, because in this tutorial I work with libglade. If you just look at your .glade file by opening with Texteditor. You will see XML coding there.. Yes! of course .glade is XML file format. GtkBuilder file type also generates the same .glade file. But when taken in the file structure GtkBuilder and Libglage are different from each other.</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot.png"><img loading="lazy" data-attachment-id="260" data-permalink="https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/screenshot-12/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot.png" data-orig-size="1280,800" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot.png?w=510" class="aligncenter size-medium wp-image-260" title="Screenshot" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot.png?w=300&#038;h=187" alt="" width="300" height="187" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a>Now I think you may wondering how to connect this Button signals(Actions) to a C program ??</p>
<p>Now click on the Button of your GUI, then click <strong>Signals</strong> tab under the Properties. Then find <strong>Clicked</strong> and select <strong><span style="color:#ff0000;">on_button1_clicked</span></strong> (Button&#8217;s name property is &#8216;button1&#8217; , so the signal name become on_button1_clicked). Now Save changes.</p>
<p>After we set the signals in our GUI in the glade, we can simply call them (as example) like this.</p>
<p><span style="color:#0000ff;"><strong>void</strong></span> on_button1_clicked(<span style="color:#008000;">GtkWidget</span> *widget,<span style="color:#008000;">gpointer</span> *data){</p>
<p><span style="color:#3366ff;">// your custom code here!</span></p>
<p>}<span style="color:#3366ff;">// end method</span></p>
<p>Ok in next post we will discuss how run a hello_world GUI program using C :D.</p>
<p>&nbsp;</p>
<p>Thank you</p>
<p>Gihan De Silva</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/08/13/how-to-create-a-guigraphical-user-interface-using-c-programming-language-part-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">253</post-id>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade1.png" medium="image">
			<media:title type="html">glade</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/glade_interface.png?w=300" medium="image">
			<media:title type="html">glade_interface</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/vbox.png?w=300" medium="image">
			<media:title type="html">vbox</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid.png?w=300" medium="image">
			<media:title type="html">grid</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/grid2.png?w=300" medium="image">
			<media:title type="html">grid2</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-save-ase280a6.png?w=300" medium="image">
			<media:title type="html">Screenshot-Save As…</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot.png?w=300" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a GUI(Graphical User Interface) using C programming Language..</title>
		<link>https://gihansblog.wordpress.com/2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/</link>
					<comments>https://gihansblog.wordpress.com/2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/#comments</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Fri, 12 Aug 2011 15:46:25 +0000</pubDate>
				<category><![CDATA[C programming]]></category>
		<category><![CDATA[Code Blocks]]></category>
		<category><![CDATA[Glade]]></category>
		<category><![CDATA[Graphical User Interface]]></category>
		<category><![CDATA[Gtk]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Codeblocks]]></category>
		<category><![CDATA[Gth+]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[libglade]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=236</guid>

					<description><![CDATA[How to create a GUI(Graphical User Interface) using C programming Language???  That was a big problem to me when I&#8217;m in the University first year. I knew Java GUI Designing, but couldn&#8217;t find way to do it in C language. I spent many time to learn that. I think now it&#8217;s time to share those [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>How to create a GUI(Graphical User Interface) using C programming Language???  That was a big problem to me when I&#8217;m in the University first year. I knew Java GUI Designing, but couldn&#8217;t find way to do it in C language. I spent many time to learn that. I think now it&#8217;s time to share those knowledge :D. But since there are lot to discuss on that topic, I&#8217;m going to spelt the whole tutorial into several posts.  In this post I&#8217;ll discuss how to set up the development environment.</p>
<p><img loading="lazy" data-attachment-id="242" data-permalink="https://gihansblog.wordpress.com/2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/banner/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/banner.png" data-orig-size="450,150" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="banner" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/banner.png?w=450" class="aligncenter size-full wp-image-242" title="banner" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/banner.png?w=510" alt=""   srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/banner.png 450w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/banner.png?w=150&amp;h=50 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/banner.png?w=300&amp;h=100 300w" sizes="(max-width: 450px) 100vw, 450px" /><span style="color:#ff0000;"><strong>Setting up the development environment for C language GUI designing.</strong></span></p>
<p>Ok let&#8217;s begin. First we need to have several tools for that.</p>
<p>1) <a title="Code Blocks" href="http://www.codeblocks.org/" target="_blank">Code Blocks IDE</a></p>
<p>2) <a title="Glade" href="http://glade.gnome.org/" target="_blank">Glade IDE</a></p>
<p>3) <a title="Gtk+" href="http://www.gtk.org/" target="_blank">Gtk+</a></p>
<p>4) <a title="Libglade" href="http://developer.gnome.org/libglade/" target="_blank">Libglade library</a></p>
<p>So install those things on your computer. I&#8217;ll give a hint to get it much easier. If you are Ubuntu user, go to Ubuntu software center or Synaptic package manager. Find code blocks and install. Then Find for Glade and before install, check all the Add-ons then install. In this way it will automatically install gtk+ and libglade. So you don&#8217;t want to worry about that:D.</p>
<p>A screen shot of Code Blocks IDE..</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-start-here-codeblocks-10-05.png"><img loading="lazy" data-attachment-id="247" data-permalink="https://gihansblog.wordpress.com/2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/screenshot-start-here-codeblocks-10-05/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-start-here-codeblocks-10-05.png" data-orig-size="1280,776" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot-Start here &amp;#8211; Code::Blocks 10.05" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-start-here-codeblocks-10-05.png?w=510" class="aligncenter size-medium wp-image-247" title="Screenshot-Start here - Code::Blocks 10.05" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-start-here-codeblocks-10-05.png?w=300&#038;h=181" alt="" width="300" height="181" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-start-here-codeblocks-10-05.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-start-here-codeblocks-10-05.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-start-here-codeblocks-10-05.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Now you have to configure Compiler and Debugger settings in Codeblocks IDE.</p>
<ul>
<li><strong>Open Code Blocks</strong>&#8211;&gt; goto <span style="color:#ff0000;"><strong>Compiler and Debugger</strong></span> settings</li>
</ul>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings.png"><img loading="lazy" data-attachment-id="244" data-permalink="https://gihansblog.wordpress.com/2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/screenshot-compiler-and-debugger-settings/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings.png" data-orig-size="851,776" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot-Compiler and debugger settings" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings.png?w=510" class="aligncenter size-medium wp-image-244" title="Screenshot-Compiler and debugger settings" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings.png?w=300&#038;h=273" alt="" width="300" height="273" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<ul>
<li>Select <strong><span style="color:#ff0000;">Other options</span></strong> in Compiler settings tab and paste this.</li>
</ul>
<p><span style="color:#008000;"><strong>            `pkg-config &#8211;cflags gtk+-2.0 gmodule-export-2.0`</strong></span><br />
<span style="color:#008000;"><strong>            `pkg-config &#8211;cflags libglade-2.0`</strong></span></p>
<ul>
<li>Then select Other linker options in Linker settings tab and paste this.</li>
</ul>
<p><strong><span style="color:#008000;">           `pkg-config &#8211;libs gtk+-2.0 gmodule-export-2.0`</span></strong><br />
<strong><span style="color:#008000;">           `pkg-config &#8211;libs libglade-2.0`</span></strong></p>
<p>A screen shot of Glade Interface designer&#8230;</p>
<p><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-calculatorgui-glade.png"><img loading="lazy" data-attachment-id="246" data-permalink="https://gihansblog.wordpress.com/2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/screenshot-calculatorgui-glade/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-calculatorgui-glade.png" data-orig-size="1280,776" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Screenshot-calculatorGUI.glade" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-calculatorgui-glade.png?w=510" class="aligncenter size-medium wp-image-246" title="Screenshot-calculatorGUI.glade" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-calculatorgui-glade.png?w=300&#038;h=181" alt="" width="300" height="181" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-calculatorgui-glade.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-calculatorgui-glade.png?w=600 600w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-calculatorgui-glade.png?w=150 150w" sizes="(max-width: 300px) 100vw, 300px" /></a><a href="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings1.png"><br />
</a>But you always free to compile your program on the terminal too. If you wish to do so it should be like this.</p>
<p><strong><span style="color:#008000;">gcc `pkg-config &#8211;cflags libglade-2.0 &#8211;libs gtk+-2.0&#8220;pkg-config &#8211;libs gtk+-2.0 gmodule-export-2.0` main.c</span></strong></p>
<p>Ok thats all for now . In next post I&#8217;ll explain how to Design a GUI using Glade Interface Designer :D.</p>
<p>&nbsp;</p>
<p>Thank you</p>
<p>Gihan Malan De Silva @ gihansblog.com</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/08/12/how-to-create-a-guigraphical-user-interface-using-c-programming-language/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">236</post-id>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/banner.png" medium="image">
			<media:title type="html">banner</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-start-here-codeblocks-10-05.png?w=300" medium="image">
			<media:title type="html">Screenshot-Start here - Code::Blocks 10.05</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-compiler-and-debugger-settings.png?w=300" medium="image">
			<media:title type="html">Screenshot-Compiler and debugger settings</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/screenshot-calculatorgui-glade.png?w=300" medium="image">
			<media:title type="html">Screenshot-calculatorGUI.glade</media:title>
		</media:content>
	</item>
		<item>
		<title>How to change the boot loader</title>
		<link>https://gihansblog.wordpress.com/2011/08/04/how-to-change-the-boot-loader/</link>
					<comments>https://gihansblog.wordpress.com/2011/08/04/how-to-change-the-boot-loader/#comments</comments>
		
		<dc:creator><![CDATA[Gihan]]></dc:creator>
		<pubDate>Thu, 04 Aug 2011 13:50:45 +0000</pubDate>
				<category><![CDATA[Boot Loader]]></category>
		<category><![CDATA[Windows Softwares]]></category>
		<category><![CDATA[Boot]]></category>
		<category><![CDATA[Boot Order]]></category>
		<category><![CDATA[Change Boot Loader]]></category>
		<category><![CDATA[Easy BCD]]></category>
		<category><![CDATA[Ubuntu Boot Loader]]></category>
		<category><![CDATA[Windows Boot Loader]]></category>
		<guid isPermaLink="false">http://gihansblog.wordpress.com/?p=228</guid>

					<description><![CDATA[Hi, today I&#8217;m going to introduce an important windows software . The reason to talk about this software was an personal experience of me. Recently I had to install Win 7 on my Laptop to work with Photoshop CS5 for designing some graphics. So after I install the Win 7 suddenly I realise then my [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi, today I&#8217;m going to introduce an important windows software . The reason to talk about this software was an personal experience of me. Recently I had to install Win 7 on my Laptop to work with Photoshop CS5 for designing some graphics. So after I install the Win 7 suddenly I realise then my Ubuntu is no more functioning. That means Master Boot Record was changed. In that case , I used <a title="Easy BCD" href="http://neosmart.net" target="_blank"><span style="color:#ff0000;">Easy BCD</span></a> software to correct that boot records.</p>
<p><img loading="lazy" data-attachment-id="229" data-permalink="https://gihansblog.wordpress.com/2011/08/04/how-to-change-the-boot-loader/windows-7-ubuntu-linux/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/windows-7-ubuntu-linux.png" data-orig-size="260,260" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Windows-7-Ubuntu-Linux" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/windows-7-ubuntu-linux.png?w=260" class="aligncenter size-full wp-image-229" title="Windows-7-Ubuntu-Linux" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/windows-7-ubuntu-linux.png?w=510" alt=""   srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/windows-7-ubuntu-linux.png 260w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/windows-7-ubuntu-linux.png?w=150&amp;h=150 150w" sizes="(max-width: 260px) 100vw, 260px" /><a title="Download Easy BCD" href="https://sites.google.com/site/gihansblogfilemanager/file-manager/EasyBCD.zip?attredirects=0&amp;d=1"><strong><span style="color:#ff0000;">DOWNLOAD Easy BCD here!</span></strong></a></p>
<p>Installing Win7 after Linux always happens this. So you have to change boot records after installing (only if you don&#8217;t see the boot menu).</p>
<p>To change the boot records with the dual boot system. Open Easy BCD</p>
<p><img loading="lazy" data-attachment-id="230" data-permalink="https://gihansblog.wordpress.com/2011/08/04/how-to-change-the-boot-loader/capture/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture.png" data-orig-size="584,490" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Capture" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture.png?w=510" class="aligncenter size-medium wp-image-230" title="Capture" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture.png?w=300&#038;h=251" alt="" width="300" height="251" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture.png 584w" sizes="(max-width: 300px) 100vw, 300px" />Then click <strong><span style="color:#ff0000;">Add New Entry</span></strong> . Then you will see a window like this.</p>
<p><img loading="lazy" data-attachment-id="231" data-permalink="https://gihansblog.wordpress.com/2011/08/04/how-to-change-the-boot-loader/capture_windows/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_windows.png" data-orig-size="582,487" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Capture_windows" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_windows.png?w=510" class="aligncenter size-medium wp-image-231" title="Capture_windows" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_windows.png?w=300&#038;h=251" alt="" width="300" height="251" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_windows.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_windows.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_windows.png 582w" sizes="(max-width: 300px) 100vw, 300px" />Then click Linux BSD tab, change under type: as GRUB(Legacy)</p>
<p><img loading="lazy" data-attachment-id="232" data-permalink="https://gihansblog.wordpress.com/2011/08/04/how-to-change-the-boot-loader/capture_linux/" data-orig-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_linux.png" data-orig-size="584,489" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Capture_linux" data-image-description="" data-image-caption="" data-large-file="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_linux.png?w=510" class="aligncenter size-medium wp-image-232" title="Capture_linux" src="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_linux.png?w=300&#038;h=251" alt="" width="300" height="251" srcset="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_linux.png?w=300 300w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_linux.png?w=150 150w, https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_linux.png 584w" sizes="(max-width: 300px) 100vw, 300px" />Then reboot the computer, you will see your boot menu. That&#8217;s all <img src="https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>In this post I would like to mention and say thanks to my friend <a title="Panda ගේ සිතුවිලි (අන්තර්)ජංජාලයේ" href="http://pandaslif.blogspot.com/" target="_blank">Buddika</a> for introducing EasyBCD to me.</p>
<p>Thanks</p>
<p>Gihan De Silva @ gihansblog.com</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gihansblog.wordpress.com/2011/08/04/how-to-change-the-boot-loader/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">228</post-id>
		<media:content url="https://1.gravatar.com/avatar/7747741d3f85a9ff6bda7f67e231d71f8370adaacbdef665ac454f222d244682?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gihansblog</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/windows-7-ubuntu-linux.png" medium="image">
			<media:title type="html">Windows-7-Ubuntu-Linux</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture.png?w=300" medium="image">
			<media:title type="html">Capture</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_windows.png?w=300" medium="image">
			<media:title type="html">Capture_windows</media:title>
		</media:content>

		<media:content url="https://gihansblog.wordpress.com/wp-content/uploads/2011/08/capture_linux.png?w=300" medium="image">
			<media:title type="html">Capture_linux</media:title>
		</media:content>
	</item>
	</channel>
</rss>
