short-cut accelerators

2008-03-02 Thread Carlos Pereira
Hi, Could someone show me how to create a shortcurt to a menuitem, using an accelerator group? on GTK 1.2* I used the code below. What is the equivalent in GTK 2.12? accel_group = gtk_accel_group_new (); gtk_accel_group_attach (accel_group, GTK_OBJECT (window)); gtk_widget_add_accelerator

OpenGL, GtkGlArea, GtkGLExt

2008-03-03 Thread Carlos Pereira
Hi, What is the currently recommended way to link GTK with OpenGL graphic areas? GtkGLarea? GtkGLext? other? What are the future plans for GTK regarding OpenGL? is GTK planning to support OpenGL directly without need for another library? I am not particularly interested in fancy arbitrary

Re: OpenGL, GtkGlArea, GtkGLExt

2008-03-04 Thread Carlos Pereira
Mikael Hallendal wrote: 3 mar 2008 kl. 22.48 skrev Carlos Pereira: Hi Carlos, GtkGLext seems to be the most popular GL Area to use these days. You might also want to look at Clutter [1] or Pigment [2] which are canvases offering some higher level abstractions for 2D/3D usages

Re: OpenGL, GtkGlArea, GtkGLExt

2008-03-05 Thread Carlos Pereira
Jon Harrop wrote: On Tuesday 04 March 2008 18:14:39 Behdad Esfahbod wrote: On Tue, 2008-03-04 at 17:04 +, Carlos Pereira wrote: 2) change the name, for example to Gtkglarea 2.0*, the legitimate sucessor to Gtkglarea 1 (the last version of Gtkglarea that I downloaded last week

Locale definitions, dots and commas

2008-03-11 Thread Carlos Pereira
Hi, I received a message (see below) complaining about using dots instead of commas in decimal numbers. What are the best solutions for this, from the gtk point of view? What happens is that in my French locale, the decimal symbol is ',' not '.' ! Have a nice day, (and good luck with the bug).

Re: Locale definitions, dots and commas

2008-03-12 Thread Carlos Pereira
Tomas Carnecky wrote: Carlos Pereira wrote: Hi, I received a message (see below) complaining about using dots instead of commas in decimal numbers. What are the best solutions for this, from the gtk point of view? What happens is that in my French locale, the decimal symbol

Re: Locale definitions, dots and commas

2008-03-12 Thread Carlos Pereira
Andrew W. Nosenko wrote: On Wed, Mar 12, 2008 at 6:09 PM, Carlos Pereira [EMAIL PROTECTED] wrote: Thanks for your answers, I realize this is not Gtk stuff, but certainly affects every GTK app involving decimal numbers... After setting in my .bashrc, for example (the same

Re: Locale definitions, dots and commas

2008-03-13 Thread Carlos Pereira
Andrew W. Nosenko wrote: What you need to do indeed: 1. use locale-dependent formatting in the UI (both for input and output) 2. use locale-INDEPENDENT formatting when you read and save your data files. So you are saying that interfaces should use dots, commas, whatever is locally defined, but

Re: Locale definitions, dots and commas

2008-03-13 Thread Carlos Pereira
Andrew W. Nosenko wrote: On Thu, Mar 13, 2008 at 5:12 PM, Carlos Pereira [EMAIL PROTECTED] wrote: Andrew W. Nosenko wrote: What you need to do indeed: 1. use locale-dependent formatting in the UI (both for input and output) 2. use locale-INDEPENDENT formatting when you read

GtkTextView: inserting text with different styles

2008-03-17 Thread Carlos Pereira
Hi, Let's say I have a GtkTextView, with two color tags, red and blue: text_view = gtk_text_view_new (); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view)); gtk_text_buffer_create_tag (buffer, my_red, foreground, #ff, NULL); gtk_text_buffer_create_tag (buffer, my_blue, foreground,

Gtktextview: sharing text tags

2008-03-19 Thread Carlos Pereira
Hi, Is it possible to share text tags between different GtkTextviews? Is it worth the increase in complexity? My Help dialogs are notebooks, each page has a GtkTextview, covering a different topic, but the styles are the same Thanks, Carlos ___

GtkTreeView: GTK_SELECTION_SINGLE not working?

2008-03-25 Thread Carlos Pereira
Hi, For some strange reason GtkTreeview is not working in GTK_SELECTION_SINGLE mode, here (Fedora 8, Gtk 2.10, I believe). GTK_SELECTION_NONE, GTK_SELECTION_BROWSE, GTK_SELECTION_MULTIPLE work as expected, but GTK_SELECTION_SINGLE always behaves as GTK_SELECTION_BROWSE... so one row is always

GtkGlext pedantic warning

2008-03-31 Thread Carlos Pereira
When compiling with -pedantic, gtkglext produces this warning (all the other libraries come clean): /usr/include/gtkglext-1.0/gdk/gdkgltokens.h:146: warning: ISO C restricts enumerator values to range of ‘int’ /usr/include/gtkglext-1.0/gdk/gdkgltokens.h:158: warning: ISO C restricts enumerator

GtkTextView issue

2008-03-31 Thread Carlos Pereira
Hi, This is to report an issue with gtk_text_buffer_create_tag, affecting Gtk 2.10.0 (Fedora 8, amd64): gtk_text_buffer_create_tag (buffer, my_tag, scale, 1, NULL); When the scaling factor is 1.0 (or 2.0 or PANGO_SCALE_MEDIUM or PANGO_SCALE_LARGE, etc.) everything works fine. However, when

Re: GtkTreeView: GTK_SELECTION_SINGLE not working?

2008-04-04 Thread Carlos Pereira
Thanks for replying! I certainly would be glad if proved wrong, but I see three problems here, two are human interface issues, the other is a technical issue. 1) In GtkTreeview with GtkListStore, show always the first item as default,

GtkTreeView Size Issue

2008-04-10 Thread Carlos Pereira
Hi, The working code below shows a two-column list, where the second title, Pages, is partially overwritten by the scrolled window: http://www.gamgi.org/treeview.png When the scrolled window is inactive, or when gtk_widget_set_size_request is commented out, the title Pages looks fine. A simple

Re: Preventing Multiple instance of GTK application

2008-04-12 Thread Carlos Pereira
Ajax John wrote: Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of my application. how can I modify my code such that at a time only one instance of my application is running on my system. Regards, Ajax.

Re: Preventing Multiple instance of GTK application

2008-04-14 Thread Carlos Pereira
Liam R E Quin wrote: On Sat, 2008-04-12 at 15:16 +0100, Carlos Pereira wrote: I agree with everything you said. But in some cases lock files can be useful... this is the way vim checks if other instances of the same file are open, so the new instance is open in read-only mode... of course

Location entry in GtkFileChooser

2008-04-14 Thread Carlos Pereira
Hullo, In a GTkFilechooser, how can I acess the information on the Location entry? I only find functions to get the full filename and uri but not the actual short filename... Carlos ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: Location entry in GtkFileChooser

2008-04-15 Thread Carlos Pereira
Martin (OPENGeoMap) wrote: Hullo, In a GTkFilechooser, how can I acess the information on the Location entry? I only find functions to get the full filename and uri but not the actual short filename... I don´t understand well?? are you talking about filters??? No, I am talking

Re: Location entry in GtkFileChooser

2008-04-15 Thread Carlos Pereira
the GtkEntry before sending it to me, and gtk_file_chooser_get_filename returns NULL when the shortname starts with http:// or ftp:// which in turn makes it impossible to use g_path_get_basename :-( So I really must have access to the Location GtkEntry, Carlos Cheers, Luis Carlos Pereira a écrit

Re: Location entry in GtkFileChooser

2008-04-16 Thread Carlos Pereira
Hi, You were right, gtk_file_chooser_get_uri () gives me correctly the contents in the Location GtkEntry. Sort off: If I write http://www.app.org/, I get the same. However, if I write http://www.app.org (without the final slash) I get: http%3A%2F%2Fwww.app.org Other problems still remain. When

Re: Learning Glade

2008-04-26 Thread Carlos Pereira
However, I feel it will be easier for me to write graphical applications with an interface designer. The GNOME Library (http://library.gnome.org/ ) wasn't very useful and I haven't been able to find any decent, up-to-date tutorials on Glade. GTK Forums have several examples with C and

sensitive state in ComboBox menus

2008-04-27 Thread Carlos Pereira
Hi! How can I set a row in a combobox menu as insensitive/sensitive and know the current sensitive state, for: 1) a combo box created with gtk_combo_box_new_text 2) a more general combo box created with a tree model In option menus, I used: gtk_widget_set_sensitive (item, FALSE); but this

Going fullscreen and back

2008-04-27 Thread Carlos Pereira
Hi there, The small working code below shows how my app goes fullscreen and back. 1) Is there a better way of doing this? 2) This code works fine in Enlightenment, KDE, BlackBox, IceWM, etc. In Gnome and XFCE it works, but the desktop bars are still visible (I suppose it should be possible to

Re: Going fullscreen and back

2008-04-27 Thread Carlos Pereira
Jim George, Kevin DeKorte wrote: Why not use gtk_window_fullscreen? I've only tried it on a Gnome desktop, it works well. Why don't you just use gtk_window_fullscreen / gtk_window_unfullscreen? Jim, Kevin, Thanks! It works fantastically well, I just tried it on GNOME, XFCE, KDE,

Re: gtk_combo_box with a specialized top line

2008-05-06 Thread Carlos Pereira
Is it possible to retrieve the entry widget of the combo box so I can call gtk_entry_set_text with it? entry = GTK_ENTRY (GTK_BIN (combo_box)-child; Carlos ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

changing properties in a Treemodel in a Combobox

2008-06-09 Thread Carlos Pereira
Hullo, Is there a way to easily change a property in a GtkTreeModel, when something else changes in the interface? I need to disable/enable specific rows (change the sensitivity) in a GtkComboBox, depending on users actions. gtk-demo shows how to set the sensitivity of a specific row, when

Re: How do I use the fullscreen in a gtkmm app?

2008-06-11 Thread Carlos Pereira
Garth's KidStuff wrote: Hi All, I notice that quite a few apps (firefox, gimp, terminal, etc. -- but not gedit, huh?) have the option to toggle fullscreen mode in their view menu using the F11 key. How would I implement this in my Gtkmm app? Connect the key_press_event to your top

Re: Windows verses Dialogs

2008-06-15 Thread Carlos Pereira
dhk wrote: When should a dialog be used instead of a window? Can't a window always be used? Do you give anything up when using a dialog? What's the difference? I have more than 100 task dialogs in my app. I NEVER use dialogs... always windows! you have much more flexibility, your code is

g_signal_connect

2008-06-15 Thread Carlos Pereira
For the sake of elegance, which version people like more? 1) g_signal_connect (widget, signal, G_CALLBACK (callback), data); 2) g_signal_connect (G_OBJECT (widget), signal, G_CALLBACK (callback), data); 3) g_signal_connect (GTK_OBJECT (widget), signal, G_CALLBACK (callback), data); Carlos

Re: g_signal_connect

2008-06-15 Thread Carlos Pereira
Brian J. Tarricone wrote: On Sun, 15 Jun 2008 19:40:22 +0100 Carlos Pereira wrote: For the sake of elegance, which version people like more? 1) g_signal_connect (widget, signal, G_CALLBACK (callback), data); I think this was the intended use -- the first param is of type gpointer so

Re: grep

2008-10-03 Thread Carlos Pereira
Well, the list yes... the posts, aparently not... :-) Best regards carlos 2008/10/2 Ruben Safir [EMAIL PROTECTED]: is this working? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: gtkmm and autoconf

2008-10-03 Thread Carlos Pereira
Hello Ruben, I cannot help with this issue, sorry. But I suggest you post it on the main list at [EMAIL PROTECTED] In this list there are allways many messagens, I think it will be easier to find someone to help you. Best regards1 Carlos On Thu, Oct 2, 2008 at 1:31 PM, Ruben Safir [EMAIL

Re: Full Screen mode behaves differently on two identical systems

2009-01-27 Thread Carlos Pereira
I have found myself some weird behaviour with fullscreen mode and modal windows in Gnome. I would suggest: 1) try a decent window manager, such as Enlightenment. This solved my issues. Of course this is not a good solution, but at least tells you where the problem is. 2) I guess you are using

Re: An 'oldie' question... GtkCList anyone?

2009-01-27 Thread Carlos Pereira
I have changed recently my CList widgets to TreeView. I suggest you implement a small test case, learn everything you need to your own purposes, and then (and only then) replace everything. I am almost in the end of replacing 119 option menus to combo boxes, so I understand how you feel...

Re: MenuItem activate signal

2009-02-06 Thread Carlos Pereira
I am fairly experienced with sensitive/insensitive states in Menuitems in old Option Menus and new Combo Boxes, but I am not sure in which context your Menuitem appears... Could you explain what is the parent of your MenuItems? perhaps with a very small bit of code showing how they are

Re: Treeview CRITICAL Error

2009-04-27 Thread Carlos Pereira
dhk wrote: only seems to compile when the -O (Optimization) option is present. However the options is set as -O0 (that's Dash-Oh-Zero) which should turn optimization off. I'd like to be able to compile the program without optimization, but so far this has just been an annoyance. In my opinion

Re: GtkCombo events

2009-05-29 Thread Carlos Pereira
Actually it is a ComboBoxEntry that you need, which is derived from a ComboBox: http://library.gnome.org/devel/gtk/stable/GtkComboBoxEntry.html This is just a combination of a Entry with a ComboBox, so if you know how Entry and ComBox works, changing a Combo to a ComboBoxEntry should be

Re: gtk gis

2009-06-11 Thread Carlos Pereira
Andrea Zagli wrote: do you know some widget that can display maps (from shp or postgis) and also allows very simple editing? Perhaps GtkDrawingArea? http://library.gnome.org/devel/gtk/stable/GtkDrawingArea.html I use myself OpenGL areas, with GtkGLExt and Mesa, it works great. If you need

Re: drawing area and motion hint mask

2009-07-29 Thread Carlos Pereira
in GtkGlArea / GtkGLExt examples and discussions in this list with Havoc Pennington years ago) I strongly suggest you to have a look in the examples coming with GtkGlExt, Carlos Pereira - g_signal_connect (area, motion_notify_event

Re: GDK + GLib main loop

2009-08-12 Thread Carlos Pereira
Mihai Draghicioiu wrote: I have found the way. Here is my code. Any idea where I can post it as a tutorial? Gtk Forums? they have a section specifically for Gtk example code: http://www.gtkforums.com/forum-15.html http://www.gtkforums.com/ Carlos #include stdlib.h #include glib.h #include

Re: why do constructors return GtkWidget?

2009-09-09 Thread Carlos Pereira
Tristan Van Berkom wrote: On Wed, Sep 9, 2009 at 2:53 AM, Emmanuel Touzeryemmanuel.touz...@free.fr wrote: Hi, [...] You know what I'm thinking... I think that this is from times where people used to build GUIs in the code... When they were writing all the container embedding and

GtkTextView padding

2009-10-31 Thread Carlos Pereira
Hi all, what is the standard, simple, way to add some padding inside a GtkTextView? These functions work nice: gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text), 10); gtk_text_view_set_right_margin (GTK_TEXT_VIEW (text), 10); but no equivalent functions seem to exist for top, bottom

GtkTreeView: g_signal_handlers_unblock_by_func

2009-10-31 Thread Carlos Pereira
Hi all, To avoid some reentrant callbacks, in a few cases I have to use code such as: g_signal_handlers_block_by_func (widget, func, data); do_stuff; g_signal_handlers_unblock_by_func (widget, func, data); Usually this works fine, but I have a Treeview where unblock seems to be done too

Re: GtkTreeView: g_signal_handlers_unblock_by_func

2009-10-31 Thread Carlos Pereira
Tadej Borovšak wrote: Hello. Only situation that comes to my mind that would cause g_signal_handlers_block_by_func to misbehave is if you do something inside blocked part of code that installs idle handler to do the real work. What are you doing inside do_stuff part? Essentially adding a

Re: GtkTreeView: g_signal_handlers_unblock_by_func

2009-11-01 Thread Carlos Pereira
Tadej Borovšak wrote: Hello. Essentially adding a simple store model: store = gtk_list_store_new (1, G_TYPE_STRING); while (foo_bar != NULL) { gtk_list_store_append (store, iter); gtk_list_store_set (store, iter, 0, my_name, -1); } gtk_tree_view_set_model (GTK_TREE_VIEW (treeview),

Problem with gtk_tree_selection_select_path: background color does not change

2009-11-05 Thread Carlos Pereira
Hi list, I need to select multiple rows in a treeview, directly from my code, in MULTIPLE selection mode. This is a very simple treemodel, only one column with a string. Unfortunately, although gtk_tree_selection_select_path() seems to select the indicated rows, the background color of the rows

SOLVED: Re: Problem with gtk_tree_selection_select_path: background color does not change

2009-11-10 Thread Carlos Pereira
This is nicely working for me now, I should have been doing something wrong before, Carlos Hi list, I need to select multiple rows in a treeview, directly from my code, in MULTIPLE selection mode. This is a very simple treemodel, only one column with a string. Unfortunately, although

Re: Ctrl-Click keyboard mouse event

2009-11-11 Thread Carlos Pereira
Hi Emmanuel, thank you very much, that's exactly what I needed, Best regards, Carlos When a button press event is triggered, what is the proper way to know if the user is pressing down the Ctrl key? I think that this is what you need: if (event-button == 1 (event-state

Re: code work wrong when i put it in gtk+ application

2009-11-12 Thread Carlos Pereira
As Tor already said, you can disable locale settings (and then everything will work as 15.00 in every country, not 15,00) with gtk_disable_setlocale (), before starting gtk: gtk_disable_setlocale (); gtk_init (argc, argv); Carlos After i updated my system my previously working gtk+

Re: how to browse values from a GtkListStore ?

2009-11-15 Thread Carlos Pereira
Let's say you would like to retrieve some information for the selected row, not just the string name. You could add a (hidden) column to your store, with that information, and then get it back with gtk_tree_model_get. Let's say you would like to have a pointer to a function, for each of your

Gtk 3.0

2009-11-30 Thread Carlos Pereira
Dear all, 1) My app is currently compiling without warnings, with Gtk 2.18.3 I believe (Ubuntu 9.10), at the compilation level: CFLAGS = -g -O3 -Wall -ansi override CFLAGS += -DG_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGTK_DISABLE_DEPRECATED This

Re: Gtk 3.0

2009-12-02 Thread Carlos Pereira
Thanks Javier, thanks David, Compiling with -DGSEAL_ENABLE these macros are flagged as errors: 1) GTK_WIDGET_SET_FLAGS (removed) 2) GTK_WIDGET_SENSITIVE (replaced by gtk_widget_is_sensitive or gtk_widget_get_sensitive) However, apparently they are not in the list of deprecated symbols.

Re: Gtk 3.0

2009-12-03 Thread Carlos Pereira
Thanks David, It seems gtkglext does not work yet with SINGLE_INCLUDES. When I compile my app I get the following error message (gtkgkext is including gdkgltypes.h and this is flagged down): In file included from /usr/include/gtkglext-1.0/gdk/gdkgltypes.h:22, from

Re: Gtk 3.0

2009-12-03 Thread Carlos Pereira
That's why I asked in the first message of this thread, what are the plans regarding GtkGLExt. To the best of my knowledge, GtkGLExt is still the official way to bridge GTK and OpenGL: http://gtkglext.sourceforge.net/ are there plans to integrate this via Cairo and discard GtkGLExt? that was

Re: GtkGLExt (was Re: Gtk 3.0)

2009-12-04 Thread Carlos Pereira
Thanks Javier, it's good to know that EmmanueleBassi http://live.gnome.org/EmmanueleBassi is now taking care of GtkGLExt integration with GTK... Regards, Carlos Hello Carlos, 2009/12/3 Carlos Pereira jose.carlos.pere...@ist.utl.pt: That's why I asked in the first message of this thread

Re: GtkGLExt (was Re: Gtk 3.0)

2009-12-04 Thread Carlos Pereira
use case. On 4 Dec 2009 18:13, Carlos Pereira jose.carlos.pere...@ist.utl.pt wrote: Thanks Javier, it's good to know that EmmanueleBassi http://live.gnome.org/EmmanueleBassi is now taking care of GtkGLExt integration with GTK... Regards, Carlos Hello Carlos, 2009/12/3 Carlos Pereira

Re: GtkGLExt (was Re: Gtk 3.0)

2009-12-05 Thread Carlos Pereira
Dear Emmanuele, yes. and that, apart from games and scientific/technical applications, it's not at all common. the amount of code using OpenGL is relatively limited (hence niche) compared to the rest of applications in the GNOME stack (or even in the whole Linux ecosystem); it's *usage*

Re: Clearing GtkComboBoxEntry

2009-12-08 Thread Carlos Pereira
David is right, you should get the entry pointer with gtk_bin_get_child, and after that you handle this entry as any other entry: entry = gtk_bin_get_child (GTK_BIN (combo_entry)); gtk_entry_set_text (GTK_ENTRY (entry), ); In GTK 2.0 you can also use this: gtk_entry_set_text (GTK_ENTRY

GtkComboBox submenus

2009-12-17 Thread Carlos Pereira
Is there a way to create GtkComboBox menus with submenus? The logical way to achieve this would be to use a GtkTreeStore model, and indeed it works as expected, except that each first level item appears also as a second level title, that can be selected... disabling a first level item

Re: GtkNotebook switch-page Signal

2010-01-09 Thread Carlos Pereira
This is a typical callback for the switch-page signal: void my_callback (GtkNotebook *notebook, GtkNotebookPage *notebook_page, int page, void *data) { GtkWidget* vbox_page; vbox_page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page); 1) page is the number (0 = first page, etc.) of

Re: Forcing GtkScrolledWindow to sroll

2010-01-11 Thread Carlos Pereira
Then I want to implement a drag scrolling. The user will click and drag the image to make it scroll. To write drag code in GTK you basically need to handle signals button_press_event and motion_notify_event, as exemplified below. Essentially drag operations depend of the difference

ComboBox submenus

2010-01-19 Thread Carlos Pereira
My ComboBox submenus are working fine. There are however a couple of visual details that could be improved, in my opinion. I am sending as attachement a small (70 lines) working example (C + makefile) showing my points: 1) Submenus should look the same in ComboBox and Popup menus.

Re: ComboBox submenus

2010-01-19 Thread Carlos Pereira
It seems the mailling list is filtering even small tar.gz files as mine, so I posted it here: http://www.gamgi.org/combo.tar.gz Regards, Carlos My ComboBox submenus are working fine. There are however a couple of visual details that could be improved, in my opinion. I am sending as

Re: ComboBox submenus

2010-01-19 Thread Carlos Pereira
Hi Tadej, many thanks for responding! I saw your bug report, will study gtk-demo to understand how this can be achieved Best regards, Carlos Hello. 1) Submenus should look the same in ComboBox and Popup menus. Therefore Main 1 and Main 2 (see working example or tree store below)

Re: ComboBox submenus

2010-01-20 Thread Carlos Pereira
Hi Tadej, 1) you were right, titles in combobox submenus can be easily removed calling gtk_cell_layout_set_cell_data_func, as demonstrated in gtk-demo. 2) I also found that the width of submenus can be easily set, with the property width-chars, applied to the cell_renderer. I posted the

Re: tree view question / hightlighting rows

2010-01-24 Thread Carlos Pereira
Alexander Nagel wrote: Hi, i have a treeview which displays a list of filenames in one column and other things in other columns. I can iterate successfully through the list. How can I highlight the current row? With highlight I mean that the row looks like selected by the user. For example,

Re: How I can do Double Buffer whether OpenGl Ext?

2010-02-10 Thread Carlos Pereira
And then you will have a expose callback similar to this: int my_expose (GtkWidget *widget, GdkEventExpose *event, void *data) { GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget); GdkGLContext *glcontext = gtk_widget_get_gl_context (widget); app_window *my_window = APP_CAST_WINDOW

DGSEAL_ENABLE: replace direct addressing in statusbar

2010-07-03 Thread Carlos Pereira
Hi, How can I rewrite the following code, to be GTK 3.0 ready (without addressing directly the label, forbidden by the -DGSEAL_ENABLE mechanism)? statusbar = gtk_statusbar_new (); gtk_misc_set_alignment (GTK_MISC (GTK_STATUSBAR (statusbar)-label), 0.5, 0.5); Cheers, Carlos

Re: DGSEAL_ENABLE: replace direct addressing in statusbar

2010-07-03 Thread Carlos Pereira
On 07/04/10 06:17, Nader Morshed wrote: statusbar = gtk_statusbar_new (); label = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar)); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); Thanks Nader, I believe you are in the right path (although the documentation actually says this

Re: Porting a GTK 1.x application to current version

2010-07-14 Thread Carlos Pereira
Hi Fabian, 1) In the beginning, you may wish to use: #define GTK_ENABLE_BROKEN to allow GTK 1* widgets to run with GTK 2* libs. This makes the transition much easier, because you can port all your GTK 1* widgets little by little, until one fine day you will be able to get rid of #define

Re: Memory leaks

2011-02-09 Thread Carlos Pereira
P.S I will say though that in all my life I don't think I've ever written a programwhere it was either impractical (or too difficult) to fix its leaks. IMHO ignoringleaks is a bad habit to get into and one whose consequences usually get worse over time. I could not agree more with this. It

Re: Memory leaks

2011-02-09 Thread Carlos Pereira
something), but aside from that it's a pure waste of CPU cycles. Dear Allin, I am sorry, I totally disagree. I can only see two cases. Either fixing these hundreds and hundreds of mem leaks is easy or difficult. In the first case, is just a question of plain laziness and bad programming

Re: Memory leaks

2011-02-09 Thread Carlos Pereira
I think Allin's point is that even though I deleted the object in my example app, the gtk shared library code is still technically available to be used by some other part of my program (without needing to be re-initialized). In my example, I just happened to not use it. Yes, I accept

GTK 3.0 / OpenGL

2011-02-20 Thread Carlos Pereira
Hi all, Are there significant changes regarding OpenGL integration with GTK 3.* and Cairo, when compared with GTK 2.*? Regards, Carlos ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

GtkStatusbar and DGSEAL_ENABLE

2011-04-09 Thread Carlos Pereira
Hi there, In order to conform with -DGSEAL_ENABLE, I replaced this old code: gtk_misc_set_alignment (GTK_MISC (GTK_STATUSBAR (statusbar)-label), 0.5, 0.5); by this new one: hbox = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar)); label = GTK_WIDGET (gtk_container_get_children

Re: button background color in gtk3

2012-08-29 Thread Carlos Pereira
Quite often widget colors are just a question of style but sometimes this is not the case. I can think of medical applications, for example, where colors can be critical. In my case, I have a chemical periodic table made with GTK buttons, each one representing a chemical element, with its

Re: button background color in gtk3

2012-08-29 Thread Carlos Pereira
Thanks Olivier, ugly as hell, but definitely an improvement... :-( Carlos On 08/29/2012 05:17 PM, Carlos Pereira wrote: Quite often widget colors are just a question of style but sometimes this is not the case. I can think of medical applications, for example, where colors can be critical

Re: Ruler Class in GTK+ 3

2015-01-09 Thread Carlos Pereira
This is really unfortunate, my application also has a ruler... GTK is really moving away from its users, C none. GtkRuler was deprecated in GTK+ 2.x and removed in GTK+ 3.x. it's a*very* niche widget, and most applications that use one in their UI ended up having their own class. my