GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Dec 20, 2014 1:43 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: how to upgrade/update GTK+ to the latest version?
PostPosted: Fri Oct 14, 2011 7:24 pm 
Offline

Joined: Fri Oct 14, 2011 6:30 am
Posts: 4
hello all, i'm new to gtk+. i'm running on ubuntu 10.04 and my computer has gtk+ but the version is 2.20. the latest version of gtk+ 2 is 2.24. i don't want to upgrade to gtk+ 3 but i do want to upgrade the version to gtk+ 2.24. how can i do this? i read went on the site and read how to install gtk + 2.24 but do i really need to go through all those steps just to update the gtk+ to 2.24? isn't there an easy way to upgrade via terminal or synpatic package manager or something else?

also, someone told me that if i want to use c++, i have to get a c++ binding ? do i really need to? i mean if i use a C++ function like cout instead of C printf, you're telling me that it won't work?

i'm new to this so sorry if i asked stupid questions. please help me.


Top
 Profile  
 
 Post subject: Re: how to upgrade/update GTK+ to the latest version?
PostPosted: Fri Oct 14, 2011 9:08 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 799
Location: UK
Hi, and welcome. what you need to do is find the correct sources for v2.24 of GTK+ and all of its dependences and up grade via synaptic. I do not use Ubuntu, so do not know what the sources contain.

You can use C++ without having to use the Gtkmm bindings, although they do make using GTK much easier. Although C++ and C look very similar there are many differences between them that could cause you problems.First is all functions, classes, members are name mangled, so you can not use the GtkBuilder auto connect to connect signals unless you explicitly declare them as being extern C. There are also many other minor differences such as the way chars and const are handled, there extra keywords.

Also you can mix the standard C library IO functions and the C++ IO classes, but do take care if you are doing this on the same file or io stream, the result may not be what you expect due to buffering.

Please keep asking questions.

E.

_________________
E.


Top
 Profile  
 
 Post subject: Re: how to upgrade/update GTK+ to the latest version?
PostPosted: Fri Oct 14, 2011 10:50 pm 
Offline

Joined: Fri Oct 14, 2011 6:30 am
Posts: 4
errol wrote:
Hi, and welcome. what you need to do is find the correct sources for v2.24 of GTK+ and all of its dependences and up grade via synaptic. I do not use Ubuntu, so do not know what the sources contain.

You can use C++ without having to use the Gtkmm bindings, although they do make using GTK much easier. Although C++ and C look very similar there are many differences between them that could cause you problems.First is all functions, classes, members are name mangled, so you can not use the GtkBuilder auto connect to connect signals unless you explicitly declare them as being extern C. There are also many other minor differences such as the way chars and const are handled, there extra keywords.

Also you can mix the standard C library IO functions and the C++ IO classes, but do take care if you are doing this on the same file or io stream, the result may not be what you expect due to buffering.

Please keep asking questions.

E.

i've tried and it won't upgrade the repository. i think the only way to update the repository is to update ubuntu itself, which i do not want to do. if i do the install as provided on the site, will the new version overwrite the older GTK version or will they both co-exist?? if they both exist, then i don't want that.

so i can use c++ on gtk+ even without the c++ binding huh? i heard that you can't create classes in C, since it's not object oriented and i heard that yo have to use Glib to create objects. but since you said i can just use C++ without the C++ bindings, does this mean i can just create C++ classes and it'll work without using Glib?


Top
 Profile  
 
 Post subject: Re: how to upgrade/update GTK+ to the latest version?
PostPosted: Sat Oct 15, 2011 6:52 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 799
Location: UK
GTK+ 2.24 and 3 and co-exist together. I have that on my Debian Wheezy system. Why exactly do you want to upgrade from GTK+ 2.20 to 2.24. The Differences between the versions is small. Apart from bug and translation fixes, the main differences are the addition of a PDF print back end, a new set of API to aide migration to GTK+ 3 and a lot of deprecations. So you might as well stay with v2.20 or upgrade to v3 as v2.24 is really just a stepping stone. If you really do want 2.24 you can always pick it up from Debian testing (Wheezy) by downloading each component separately, but this could be very tedious and may break your system. The other way is to build from sources and install separately from your current 2.20 so that you can restore if you need to, but again this can be tedious.

You can use C++ with GTK without any problems and even make classes. Just think about it, how else could a binding work! It is just C++ code written to make classes around the C API. Also although C is not an object orientated language, it does not mean that you can not write your code in an object orientated way. GTK/GLib has many parts of it written in an object orientated manner, which has made translation to the C++ bindings fairly simple.

I do not know what you skill in C++ is like, but if it is good then using the gtkmm C++ binds might be helpful as it makes learning GTK easier as the learning curve is less steep.

E.

_________________
E.


Top
 Profile  
 
 Post subject: Re: how to upgrade/update GTK+ to the latest version?
PostPosted: Sat Oct 15, 2011 5:18 pm 
Offline

Joined: Fri Oct 14, 2011 6:30 am
Posts: 4
errol wrote:
GTK+ 2.24 and 3 and co-exist together. I have that on my Debian Wheezy system. Why exactly do you want to upgrade from GTK+ 2.20 to 2.24. The Differences between the versions is small. Apart from bug and translation fixes, the main differences are the addition of a PDF print back end, a new set of API to aide migration to GTK+ 3 and a lot of deprecations. So you might as well stay with v2.20 or upgrade to v3 as v2.24 is really just a stepping stone. If you really do want 2.24 you can always pick it up from Debian testing (Wheezy) by downloading each component separately, but this could be very tedious and may break your system. The other way is to build from sources and install separately from your current 2.20 so that you can restore if you need to, but again this can be tedious.

You can use C++ with GTK without any problems and even make classes. Just think about it, how else could a binding work! It is just C++ code written to make classes around the C API. Also although C is not an object orientated language, it does not mean that you can not write your code in an object orientated way. GTK/GLib has many parts of it written in an object orientated manner, which has made translation to the C++ bindings fairly simple.

I do not know what you skill in C++ is like, but if it is good then using the gtkmm C++ binds might be helpful as it makes learning GTK easier as the learning curve is less steep.

E.

i need 2.24 because i that's what the my class is using and i don't want my program to run on 2.20 and when i hand it in to my teacher and have him run it on gtk 2.24 and find bugs because of the version differences. so the only way to upgrade is basically go through the tedious process?


Top
 Profile  
 
 Post subject: Re: how to upgrade/update GTK+ to the latest version?
PostPosted: Sun Oct 16, 2011 7:55 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 799
Location: UK
Any application written for GTK v2.20 will work on GTK 2.24 as it was made to be API and ABI compatible with its previous version. These are the additions to 2.24 from privious versions.

Index of new symbols in 2.24 from 2.22

A

GtkAboutDialog::activate-link, object signal in GtkAboutDialog
C

GtkComboBox:entry-text-column, object property in GtkComboBox
GtkComboBox:has-entry, object property in GtkComboBox
gtk_combo_box_get_entry_text_column, function in GtkComboBox
gtk_combo_box_get_has_entry, function in GtkComboBox
gtk_combo_box_set_entry_text_column, function in GtkComboBox
gtk_combo_box_text_append_text, function in GtkComboBoxText
gtk_combo_box_text_get_active_text, function in GtkComboBoxText
gtk_combo_box_text_insert_text, function in GtkComboBoxText
gtk_combo_box_text_new, function in GtkComboBoxText
gtk_combo_box_text_new_with_entry, function in GtkComboBoxText
gtk_combo_box_text_prepend_text, function in GtkComboBoxText
N

GtkNotebook:group-name, object property in GtkNotebook
gtk_notebook_get_group_name, function in GtkNotebook
gtk_notebook_set_group_name, function in GtkNotebook
R

GtkRange:round-digits, object property in GtkRange
gtk_range_get_round_digits, function in GtkRange
gtk_range_set_round_digits, function in GtkRange

Index of new symbols in 2.22 from 2.20

A

gtk_accessible_get_widget, function in GtkAccessible
gtk_accessible_set_widget, function in GtkAccessible
gtk_assistant_commit, function in GtkAssistant
B

gtk_button_get_event_window, function in GtkButton
E

gtk_entry_im_context_filter_keypress, function in GtkEntry
gtk_entry_reset_im_context, function in GtkEntry
gtk_expander_get_label_fill, function in GtkExpander
gtk_expander_set_label_fill, function in GtkExpander
F

gtk_font_selection_dialog_get_font_selection, function in GtkFontSelectionDialog
I

GtkIconView:item-orientation, object property in GtkIconView
gtk_icon_view_get_item_column, function in GtkIconView
gtk_icon_view_get_item_orientation, function in GtkIconView
gtk_icon_view_get_item_row, function in GtkIconView
gtk_icon_view_set_item_orientation, function in GtkIconView
M

GtkMessageDialog:message-area, object property in GtkMessageDialog
gtk_message_dialog_get_message_area, function in GtkMessageDialog
N

gtk_notebook_get_tab_hborder, function in GtkNotebook
gtk_notebook_get_tab_vborder, function in GtkNotebook
R

GtkRange:stepper-position-details, object property in GtkRange
S

gtk_statusbar_remove_all, function in GtkStatusbar
T

gtk_table_get_size, function in GtkTable
gtk_text_view_get_hadjustment, function in GtkTextView
gtk_text_view_get_vadjustment, function in GtkTextView
gtk_text_view_im_context_filter_keypress, function in GtkTextView
gtk_text_view_reset_im_context, function in GtkTextView
gtk_tree_path_get_indices_with_depth, function in GtkTreeModel
V

gtk_viewport_get_view_window, function in GtkViewport
W

gtk_widget_send_focus_change, function in GtkWidget

Also I have been looking at the repository list for Natty (11.04) and that has both GTK 3.0.8 and GTK 2.24.4 development libraries and oneiric 11.10 has both GTK 3.2 and GTK 2.24.6. So I can not see why you can not upgrade to one of these versions.

E.

_________________
E.


Top
 Profile  
 
 Post subject: Re: how to upgrade/update GTK+ to the latest version?
PostPosted: Mon Oct 17, 2011 6:42 am 
Offline

Joined: Fri Oct 14, 2011 6:30 am
Posts: 4
errol wrote:
Any application written for GTK v2.20 will work on GTK 2.24 as it was made to be API and ABI compatible with its previous version. These are the additions to 2.24 from privious versions.

Index of new symbols in 2.24 from 2.22

A

GtkAboutDialog::activate-link, object signal in GtkAboutDialog
C

GtkComboBox:entry-text-column, object property in GtkComboBox
GtkComboBox:has-entry, object property in GtkComboBox
gtk_combo_box_get_entry_text_column, function in GtkComboBox
gtk_combo_box_get_has_entry, function in GtkComboBox
gtk_combo_box_set_entry_text_column, function in GtkComboBox
gtk_combo_box_text_append_text, function in GtkComboBoxText
gtk_combo_box_text_get_active_text, function in GtkComboBoxText
gtk_combo_box_text_insert_text, function in GtkComboBoxText
gtk_combo_box_text_new, function in GtkComboBoxText
gtk_combo_box_text_new_with_entry, function in GtkComboBoxText
gtk_combo_box_text_prepend_text, function in GtkComboBoxText
N

GtkNotebook:group-name, object property in GtkNotebook
gtk_notebook_get_group_name, function in GtkNotebook
gtk_notebook_set_group_name, function in GtkNotebook
R

GtkRange:round-digits, object property in GtkRange
gtk_range_get_round_digits, function in GtkRange
gtk_range_set_round_digits, function in GtkRange

Index of new symbols in 2.22 from 2.20

A

gtk_accessible_get_widget, function in GtkAccessible
gtk_accessible_set_widget, function in GtkAccessible
gtk_assistant_commit, function in GtkAssistant
B

gtk_button_get_event_window, function in GtkButton
E

gtk_entry_im_context_filter_keypress, function in GtkEntry
gtk_entry_reset_im_context, function in GtkEntry
gtk_expander_get_label_fill, function in GtkExpander
gtk_expander_set_label_fill, function in GtkExpander
F

gtk_font_selection_dialog_get_font_selection, function in GtkFontSelectionDialog
I

GtkIconView:item-orientation, object property in GtkIconView
gtk_icon_view_get_item_column, function in GtkIconView
gtk_icon_view_get_item_orientation, function in GtkIconView
gtk_icon_view_get_item_row, function in GtkIconView
gtk_icon_view_set_item_orientation, function in GtkIconView
M

GtkMessageDialog:message-area, object property in GtkMessageDialog
gtk_message_dialog_get_message_area, function in GtkMessageDialog
N

gtk_notebook_get_tab_hborder, function in GtkNotebook
gtk_notebook_get_tab_vborder, function in GtkNotebook
R

GtkRange:stepper-position-details, object property in GtkRange
S

gtk_statusbar_remove_all, function in GtkStatusbar
T

gtk_table_get_size, function in GtkTable
gtk_text_view_get_hadjustment, function in GtkTextView
gtk_text_view_get_vadjustment, function in GtkTextView
gtk_text_view_im_context_filter_keypress, function in GtkTextView
gtk_text_view_reset_im_context, function in GtkTextView
gtk_tree_path_get_indices_with_depth, function in GtkTreeModel
V

gtk_viewport_get_view_window, function in GtkViewport
W

gtk_widget_send_focus_change, function in GtkWidget

Also I have been looking at the repository list for Natty (11.04) and that has both GTK 3.0.8 and GTK 2.24.4 development libraries and oneiric 11.10 has both GTK 3.2 and GTK 2.24.6. So I can not see why you can not upgrade to one of these versions.

E.

because natty changes the ubuntu settings completely. it's a complete UI overhaul. i would also have to redo come compiz settings and etc, it'll just be very annoying


Top
 Profile  
 
 Post subject: Re: how to upgrade/update GTK+ to the latest version?
PostPosted: Mon Oct 17, 2011 6:56 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 799
Location: UK
Note you do not need to keep quoting me!!!!!! that is rather annoying to me and to others who might be following this as it is very unnecessary.

Why not use the distribution used in your class, then it should be very similar both in class and at home. If this is not an option then you could try downloading the relevant ".deb" files and install them manually using GDebi, apt or other package installer. This may give you an unstable system. Or you could try installing from source, but this is not for a beginner and I have heard of many others having had troubles trying to do this.

E.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group