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 suggestion

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: 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 defa

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 (GTK_C

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 http://mail.gnome.org/mailman/listinfo/gtk-app-dev

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 All

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
P.S I will say though that in all my life I don't think I've ever written a program>where it was either impractical (or too difficult) to fix its leaks. IMHO ignoring>leaks 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: 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 GTK_

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

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 ___

GTK and OpenGL/Mesa

2010-03-10 Thread Carlos Pereira
Hello, I prepared a simple GTK/OpenGL working example that does not use GTKGLExt or GTKGLArea: http://www.gamgi.org/gtk_opengl.tar.gz Currently it only works on X, but I believe it could be easily extended to Mac OS X and Windows. It needs two headers: (distributed with Mesa and available

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 d

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: 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

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) should

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 attacheme

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. Therefore

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 differenc

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 th

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 disable

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 (GTK

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: GtkGLExt (was Re: Gtk 3.0)

2009-12-04 Thread Carlos Pereira
there is no way you are not a niche use case. On 4 Dec 2009 18:13, "Carlos Pereira" 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,

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 : That's why I asked in the first message of this thread, wh

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: 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 /usr/include

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. Shoul

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 me

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 ro

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: 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 & GDK_CONTRO

Ctrl-Click keyboard mouse event

2009-11-10 Thread Carlos Pereira
Hi list, When a button press event is triggered, what is the proper way to know if the user is pressing down the Ctrl key? Tipically I would want to know this inside a button press event callback: int handle_button_press (GtkWidget *widget, GdkEventButton *event, void *data) { mouse button has

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 gtk_tree_s

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 d

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), GT

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

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 early

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 (gtk_text

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 Touzery 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 all, in C, building their d

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/ Carlos #include #include #include #include #i

Re: drawing area and motion hint mask

2009-07-29 Thread Carlos Pereira
is based 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, "moti

Re: getting the requested size of a widget

2009-07-10 Thread Carlos Pereira
Hi, size with gtk_widget_size_request, and then using gtk_widget_set_size_request >each page contains a textview wrapped in a scrolledwindow I use the technique you described in all my notebooks, with a wide range of pages, and it works fine. However I don't have textviews. This is a textvi

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 mo

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 relati

Re: GtkCombo events

2009-05-29 Thread Carlos Pereira
frederico schardong wrote: Hi, I search, but not find the answer of my question.. What event is going on when the string selected of a GtkCombo is chenged? From Gtk documentation: |GtkCombo| has been deprecated since version 2.4 and should not be used in newly-written code. Use GtkComboBo

Re: How to set a window filled the whole screen when we start the window?

2009-05-25 Thread Carlos Pereira
Liam R E Quin wrote: On Mon, 2009-05-25 at 21:15 +0800, donglongchao wrote: Thanks for your advice.Because there are too many widgets in the start window, I think it is necessary to maximize it first.Maybe I should ask my customs for their suggestions. Show fewer widgets in the main w

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: 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 created

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... Ca

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: 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: 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 > http://mail.gnome.org/mailman/listinfo/gtk-a

Re: GTK Links

2008-07-03 Thread Carlos Pereira
Martyn Russell wrote: svalbard colaco wrote: Hi all; I wanted some links/ppts/books in Understanding GTK concepts , describing each of the aspects in brief with examples/snap shots etc.. search results have given me a few ; But wanted suggestion as which are recommended links /ppts , for a b

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 fi

Re: Windows over Windows

2008-06-15 Thread Carlos Pereira
dhk wrote: Gregory Hosler wrote: dhk wrote: | How can a modal window or dialog from a secondary event always and | completely cover the main window? The main window should look like it | was replaced until the second window or dialog is closed. Depending upon the sizes of the two windows... Th

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); Carlo

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

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: Code for placing a XML dock in a GtkTree?

2008-06-10 Thread Carlos Pereira
I totally agree with Greg on this, Expat is a great piece of software, arguably the fastest XML parser on Earth, low memory usage, very elegant, so important in current days that Linux distros as Fedora and Suse store Expat on /lib instead of /usr/lib (with symlinks from /usr/lib), so it can b

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 th

Re: Multi-Color Buttons?

2008-05-15 Thread Carlos Pereira
Schumi Imor wrote: > I have a button (vertically-rectangular shaped with 3 lines = shown below), > line 1: a letter, line 2: a seperator "-" line 3: a letter. What it > the best way to make this button become multicolored where the upper half is > 1 color and the bottom half is another colo

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 http://mail.g

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, En

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 ch

inserting model in a GtkTreeStore

2008-04-27 Thread Carlos Pereira
Hi all! To insert the various nodes in a GtkTreeStore, the code below works for me. The problem is, this should not work, because I am handling a GtkTreeIter as if it was some sort of integer, while it is in fact a structure! The current child node is the next parent node, so I would expect the

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 does

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

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: Location entry in GtkFileChooser

2008-04-15 Thread Carlos Pereira
fortunatly GTK tries to parse 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 > C

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??? >

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 http:/

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 m

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. > _

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 simp

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, w

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 s

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 v

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 se

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 ___ gtk-app-

Re: GtkTextView: inserting text with different styles

2008-03-17 Thread Carlos Pereira
Lance Dillon wrote: > - Original Message > From: Carlos Pereira <[EMAIL PROTECTED]> > To: gtk-app-devel-list@gnome.org > Sent: Monday, March 17, 2008 8:46:02 AM > Subject: GtkTextView: inserting text with different styles > > Hi, > Let's say I have a Gt

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", "for

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) >>

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, bu

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 setti

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 tha

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: 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 +0000, Carlos Pereira wrote: >> >>> 2) change the name, for example to Gtkglarea 2.0*, the legitimate >>> sucessor to Gtkglarea 1 (the last ve

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

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 widge

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 (menu_