Re: Theme not affecting titlebar on windows xp... help needed
Hi To do Resize ,First Make Border of Window lets say north,north-west,north-east,east,east-south,south,south-west .. add events to each widegts and connect to callback functions which do resizing .. g_signal_connect(G_OBJECT(event_north_east]),"button-press-event",G_CALLBACK(Resize_Window_North_East),(gpointer)window) ** bool Resize_Window_North_East(GtkWidget *widget,GdkEventButton *event,gpointer data) { gtk_window_begin_resize_drag(GTK_WINDOW(data),GDK_WINDOW_EDGE_NORTH_EAST,event->button,event->x_root,event->y_root,event->time); return false; } *** Cheers ! Amitesh Singh (AMI) Final Year, B.Tech. ISM Dhanbad India On 3/18/06, Michael L Torrie <[EMAIL PROTECTED]> wrote: > > On Sat, 2006-03-18 at 00:38 +0100, Gus Koppel wrote: > > However, then you would have to manage all tasks the window manager > > takes care of by yourself, i.e. minimizing and maximizing the window on > > request and providing correct drag behaviour. For resizability of your > > windows you would still have to rely on the real window manager, since > > the resizing borders don't (and can't) belong to the interior of a > > window. > > To do resize, you can just detect a mouse drag that starts in, say the > lower right-hand corner, and then give the real window manager hints to > resize the window. This would work on linux and windows. This is how > xmms does it (gtk1 app, though). So you could simulate all aspects of > the real window manager from within a decoration-less window as you have > mentioned, but it would be a lot of work and the usability would be > questionable. > > Michael > > > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Hide focus border
Hannes Mayr wrote: Hello, is there a way to hide or to make invisible the dotted focus border? I'm developing an application for a small display on an embedded board and there is no mouse pointer, just a keyboard with several buttons to move the selection up and down in a treeview. If I set the selection to the first row of the treeview (with gtk_tree_view_set_cursor) the focus border is on the first column. What I want to achieve is to have an entire selection of the first row without that focus border. Maybe someone can give me a hint. Hi Hannes, H, not 100% sure of the dotted focus border you mean. When I set the selection to the first row of a TreeView widget, it selects the entire row with nothing graphically different about the first column: // Temporary GtkPath GtkTreePath *tmp_path; // Select the top row in the TreeView widget tmp_path = gtk_tree_path_new_first(); gtk_tree_view_set_cursor(GTK_TREE_VIEW(treeview_widget), tmp_path, NULL, FALSE); Is there a chance the way you're setting the path, or the value you're using for the focus_column parameter (NULL in code above), might be giving you a problem? Regards and best wishes, Justin Clift Thanks, Hannes ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Theme not affecting titlebar on windows xp... help needed
On Sat, 2006-03-18 at 00:38 +0100, Gus Koppel wrote: > However, then you would have to manage all tasks the window manager > takes care of by yourself, i.e. minimizing and maximizing the window on > request and providing correct drag behaviour. For resizability of your > windows you would still have to rely on the real window manager, since > the resizing borders don't (and can't) belong to the interior of a > window. To do resize, you can just detect a mouse drag that starts in, say the lower right-hand corner, and then give the real window manager hints to resize the window. This would work on linux and windows. This is how xmms does it (gtk1 app, though). So you could simulate all aspects of the real window manager from within a decoration-less window as you have mentioned, but it would be a lot of work and the usability would be questionable. Michael ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
RE: Theme not affecting titlebar on windows xp... help needed
You all are probably right. That blue titlebar is just so boring compared to my cool linux desktop. Windows can do the cool themes with tools like windowblinds, but that costs money. And I was just thinking if spicing up my apps from within the app itself. -Original Message- From: Michael L Torrie [mailto:[EMAIL PROTECTED] Sent: Friday, March 17, 2006 4:21 PM To: Plummer, Jeff-P56711; gtk-app-devel-list@gnome.org Subject: Re: Theme not affecting titlebar on windows xp... help needed On Fri, 2006-03-17 at 23:48 +0100, David Necas (Yeti) wrote: > Boring is not the word I would use, what about familiar, > consistent, predictable, or integrated? Agreed. The problem with GTK on windows always used to be it looked like a horrible, out-of-place motif app. Now with the WIMP theme things look a lot better. GTK apps actually now fit on windows. The WIMP look is what users expect. Applications that totally theme themselves differently from other, standard, windows apps suffer from usability issues. Programs like Symantec Antivirus are some of the worst offenders. Horrid user interface. What's wrong with the standard UI look? Microsoft itself is a bad offender. Every Office version has its own theme that usually doesn't look like all the rest of the windows apps. > > Anyway, I do not know how or if decorations of individual > windows can be themed on Microsoft Windows, but Gtk+ has > nothing to do with it, you have to talk to the windowing > system. GTK indeed cannot influence this directly. The only way you could simulate what you are looking for is to request that the window be drawn without any decorations at all. Then use gtk drawing routines to draw in a title bar at the top of the window. Of course you'd have to take care of everything (resizing the window, moving the window, etc) yourself. An example of this is the old xmms app on linux. So it can be done if you really really want. > > Yeti > > > -- > That's enough. > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Theme not affecting titlebar on windows xp... help needed
"Plummer, Jeff-P56711" wrote: > An application looks strange if the inside boxes have one theme, and the > outsides window has a different theme (i.e. default windows titlebar, > close, minimize, maximize buttons). > > There has to be a way to make a windows application look like something > other than a boring looking windows app. In fact, GTK+ (as well as QT and other toolkits btw) deal with the interior of a window only. Title bar, min+max buttons etc. don't belong to the interior of a window but to its decoration. Windows decorations are controlled by window managers. This control extends to both behaviour and appearance. Nowadays, most window managers support themes as well as GTK+ does, but they're completely independent from each other. Neither can a GTK+ application reliably determine under which window manager it's running or what its capabilities are or what theme it is using or what this theme is looking like, nor does the window manager know anything about the application(s) inside its windows, whether they're GTK+-based, QT-based, native Window-widgets-based, Motif-based or whether they're based on something completely different. In fact, window managers don't know anything about GTK+ widgets like labels, buttons, images or others. Window managers simply don't care what is going on inside their windows and by what toolkit and how the contents are controlled. The same is true the other way round for toolkits. Especially on X11 this results in the freedom of optionally having i.e. three different applications running concurrently, one basing on GTK+, another one basing on QT and the third one basing on Java Swing. The interiors of such three windows will usually look quite different from each other, as all of those toolkits uses different sorts of themes. But window decorations look identical for all of them (regarding the theme). On X11 there is a choice between dozenillions of different window managers, from simplicistic (ugly) to very sophisticated ones. On MS-Windows there's just one windows manager available, namely the built-in one of MS-Windows. The only way to make the decorations of your windows look like the interior would be to create your own pseudo window manager. Using GTK+, you can certainly create a title bar that contains typical system, minimize and maximize buttons and a window caption and looks the same way your GTK+ theme looks like. You would request a window without its builtin decorations from the window manager to accomplish this. (This is possible by gdk_window_set_decorations() for instance). However, then you would have to manage all tasks the window manager takes care of by yourself, i.e. minimizing and maximizing the window on request and providing correct drag behaviour. For resizability of your windows you would still have to rely on the real window manager, since the resizing borders don't (and can't) belong to the interior of a window. In fact, many bloated Windows programs (especially drivers and games) use this technique to provide their windows with an entirely custom (usually strange) look. Take into account that likely the vast majority of users doesn't appreciate every application (and its windows) having their own, nonstandard, nonchangeable look. In short: don't waste your time with such efforts! Users won't appreciate it. Especially not brand-conscious GTK+ application users. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Theme not affecting titlebar on windows xp... help needed
On Fri, 2006-03-17 at 23:48 +0100, David Necas (Yeti) wrote: > Boring is not the word I would use, what about familiar, > consistent, predictable, or integrated? Agreed. The problem with GTK on windows always used to be it looked like a horrible, out-of-place motif app. Now with the WIMP theme things look a lot better. GTK apps actually now fit on windows. The WIMP look is what users expect. Applications that totally theme themselves differently from other, standard, windows apps suffer from usability issues. Programs like Symantec Antivirus are some of the worst offenders. Horrid user interface. What's wrong with the standard UI look? Microsoft itself is a bad offender. Every Office version has its own theme that usually doesn't look like all the rest of the windows apps. > > Anyway, I do not know how or if decorations of individual > windows can be themed on Microsoft Windows, but Gtk+ has > nothing to do with it, you have to talk to the windowing > system. GTK indeed cannot influence this directly. The only way you could simulate what you are looking for is to request that the window be drawn without any decorations at all. Then use gtk drawing routines to draw in a title bar at the top of the window. Of course you'd have to take care of everything (resizing the window, moving the window, etc) yourself. An example of this is the old xmms app on linux. So it can be done if you really really want. > > Yeti > > > -- > That's enough. > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Theme not affecting titlebar on windows xp... help needed
On Fri, 2006-03-17 at 15:05 -0800, Wallace Owen wrote: > Maybe he remembers the cool looking themes that Enlightenment did, or > the various themes that Gnome's manager provides, confusing window > decoration themability that's the domain of window managers with the > button/label/etc. gui element themability of gtk. Well that has nothing to do with GTK. If you want fancy themed windows in XP you need to use the xp themeui.dll stuff. I think litestep uses this now, as does windowblinds. Michaek > > > // Wally > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Theme not affecting titlebar on windows xp... help needed
On Fri, 2006-03-17 at 15:29 -0700, Michael L Torrie wrote: > On Fri, 2006-03-17 at 14:26 -0700, Plummer, Jeff-P56711 wrote: > > I am using the C# port of GTK+ on Windows XP, and I'm trying to write an > > app that is skinnable. Below is my simple test code that attempts to > > set the theme of the window. It sets the theme for all the widgets > > inside the main window, but it doesn't set the theme of the main window > > (titlebar). Does anyone have any ideas on how to setup the application > > such that the entire application is in a given theme, including the > > titlebar? > > I think we've been here before. > > Window decorations are, on X11, a function of the window manager. On > windows, they are a function of, well, windows. GTK has nothing > directly to do with window decorations, other than to request a > particular type of window. > > Why do you want your titlebar to be themed by GTK? Maybe he remembers the cool looking themes that Enlightenment did, or the various themes that Gnome's manager provides, confusing window decoration themability that's the domain of window managers with the button/label/etc. gui element themability of gtk. // Wally -- Your eyes are weary from staring at the CRT. You feel sleepy. Notice how restful it is to watch the cursor blink. Close your eyes. The opinions stated above are yours. You cannot imagine why you ever felt otherwise. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Theme not affecting titlebar on windows xp... help needed
On Fri, Mar 17, 2006 at 03:37:11PM -0700, Plummer, Jeff-P56711 wrote: > An application looks strange if the inside boxes have one theme, and the > outsides window has a different theme (i.e. default windows titlebar, > close, minimize, maximize buttons). > > There has to be a way to make a windows application look like something > other than a boring looking windows app. Boring is not the word I would use, what about familiar, consistent, predictable, or integrated? Anyway, I do not know how or if decorations of individual windows can be themed on Microsoft Windows, but Gtk+ has nothing to do with it, you have to talk to the windowing system. Yeti -- That's enough. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
RE: Theme not affecting titlebar on windows xp... help needed
An application looks strange if the inside boxes have one theme, and the outsides window has a different theme (i.e. default windows titlebar, close, minimize, maximize buttons). There has to be a way to make a windows application look like something other than a boring looking windows app. -Original Message- From: Michael L Torrie [mailto:[EMAIL PROTECTED] Sent: Friday, March 17, 2006 3:30 PM To: Plummer, Jeff-P56711 Cc: gtk-app-devel-list@gnome.org Subject: Re: Theme not affecting titlebar on windows xp... help needed On Fri, 2006-03-17 at 14:26 -0700, Plummer, Jeff-P56711 wrote: > I am using the C# port of GTK+ on Windows XP, and I'm trying to write an > app that is skinnable. Below is my simple test code that attempts to > set the theme of the window. It sets the theme for all the widgets > inside the main window, but it doesn't set the theme of the main window > (titlebar). Does anyone have any ideas on how to setup the application > such that the entire application is in a given theme, including the > titlebar? I think we've been here before. Window decorations are, on X11, a function of the window manager. On windows, they are a function of, well, windows. GTK has nothing directly to do with window decorations, other than to request a particular type of window. Why do you want your titlebar to be themed by GTK? > > \ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Theme not affecting titlebar on windows xp... help needed
On Fri, 2006-03-17 at 14:26 -0700, Plummer, Jeff-P56711 wrote: > I am using the C# port of GTK+ on Windows XP, and I'm trying to write an > app that is skinnable. Below is my simple test code that attempts to > set the theme of the window. It sets the theme for all the widgets > inside the main window, but it doesn't set the theme of the main window > (titlebar). Does anyone have any ideas on how to setup the application > such that the entire application is in a given theme, including the > titlebar? I think we've been here before. Window decorations are, on X11, a function of the window manager. On windows, they are a function of, well, windows. GTK has nothing directly to do with window decorations, other than to request a particular type of window. Why do you want your titlebar to be themed by GTK? > > \ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Theme not affecting titlebar on windows xp... help needed
I am using the C# port of GTK+ on Windows XP, and I'm trying to write an app that is skinnable. Below is my simple test code that attempts to set the theme of the window. It sets the theme for all the widgets inside the main window, but it doesn't set the theme of the main window (titlebar). Does anyone have any ideas on how to setup the application such that the entire application is in a given theme, including the titlebar? public static void Main(string[] args) { Gtk.Rc.AddDefaultFile(".\\Yattacier3\\gtk-2.0\\gtkrc"); Application.Init(); // create a new window Window window = new Window("helloworld"); window.ShowAll(); Application.Run(); } Thanks, Jeff ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Handling Unix signals in a GTK+ application
Freddie Unpenstein wrote: You are absolutely right; mutexes /are/ useless from signal handlers. It seems the only reasonable way is to use a pipe(). How about GAsyncQueue's? They're supposed to be thread safe without the need of locking... How about within a single thread? Add a unix signal number in the signal handler, and suck it out again in a custom event source's prepare method. The prepare method can return -1 for its timeout contribution, and true/false if there's something in the queue. So... poll *will* exit because of the signal... but will it check its event sources and everything... if no file descriptor is ready and timeout isnt reached ? you'll have to test it out with an idle main loop... because for the same reasons... you cant call g_main_context_wakeup(). Cheers, -Tristan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Hide focus border
Hello, is there a way to hide or to make invisible the dotted focus border? I'm developing an application for a small display on an embedded board and there is no mouse pointer, just a keyboard with several buttons to move the selection up and down in a treeview. If I set the selection to the first row of the treeview (with gtk_tree_view_set_cursor) the focus border is on the first column. What I want to achieve is to have an entire selection of the first row without that focus border. Maybe someone can give me a hint. Thanks, Hannes ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Need your help on the widget's width and height
Le Vendredi 17 Mars 2006 13:17, yeajchao a écrit : > Hello everyone > I am writing my own gtk widget > and i want my own widget's height and width ratio is 0.8, like this: > >widget->allocation.height / widget->allocation.width == 0.8 > > and my gtk_mywidget_size_allocate() function like this: > > Start of my code > --- > static void > gtk_mywidget_size_allocate(GtkWidget *widget, >GtkAllocation *allocation) > { > ?? > > if (allocation->height >= allocation->width * 0.8) > allocation->height = allocation->width; > else > allocation->width = allocation->height/0.8; > > widget->allocation = *allocation; > > ?? > } > End of my code - > >But ,i found ,in my test application,my own widget's size didn't change >Who can tell my what's wrroy ? >And who can tell my how to maintain my widget's height, width ratio to a > constant value ? > >Any help would be much appreciated ! The GtkAspectFrame widget seems to be what you are looking for. You can probably use it or at least have a look at its source code. It looks like you already read it, but just in case there is a chapter 'Creating your own widget' in the Gtk tutorial which explains the size negotiation process. Bye, -- Cédric Lucantis ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
subscribe
subscribe ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Question about GdkColor
Le Vendredi 17 Mars 2006 13:43, Eduardo M KALINOWSKI a écrit : > yeajchao wrote: > >Hello all > > I am chinese,I am sorry for my terriblly poor English ! > > > > I have confused about GdkColor > > > > In general,the RGB color mode ,the red or green or blue's value is > > from 0 to 255 > >But ,the GdkColor ,the value is from 0 to 65535 > > > > My question is ,how to map (0--255) to (0--65535) > > > > For example ,i have a general color (245,222,179) > >map it to GdkColor ,what is the value ? > > Let's use some basic maths: > > 245 x > --- = - > 255 65535 > > Solving for x, we discover that > > x = 245*65535 / 255 = 62965 > > And that's the value for red. Similar calculations will provide the values > for green and blue. > > BTW, using hexadecimal base this "conversion" gets simpler. Try for > yourself. A range of [0-255] is stored on 8 bits, and [0-65535] on 16 bits. So a bit shift is simpler and faster: chan_16bits = chan_8bits << 8 chan_8bits = chan16bits >> 8 Note this is not absolutely correct because the 8 bit value 0xff (255) will become 0xff00 (and should be 0x), but this won't probably be noticiable (because most video cards are limited to 8 bits channels, and anyway most human people wouldn't see the difference:). If you want a perfect mapping, you can do this: chan_16bits = (chan_8bits << 8) | chan_8bits I'm not sure it's really 'perfect', but I use it and it works ;) Bye -- Cédric Lucantis ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Question about GdkColor
yeajchao wrote: >Hello all > I am chinese,I am sorry for my terriblly poor English ! > > I have confused about GdkColor > > In general,the RGB color mode ,the red or green or blue's value is from 0 >to 255 >But ,the GdkColor ,the value is from 0 to 65535 > > My question is ,how to map (0--255) to (0--65535) > > For example ,i have a general color (245,222,179) >map it to GdkColor ,what is the value ? > > Let's use some basic maths: 245 x --- = - 255 65535 Solving for x, we discover that x = 245*65535 / 255 = 62965 And that's the value for red. Similar calculations will provide the values for green and blue. BTW, using hexadecimal base this "conversion" gets simpler. Try for yourself. -- Never trust anybody whose arm is bigger than your leg. Eduardo M KALINOWSKI [EMAIL PROTECTED] http://move.to/hpkb ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Question about GdkColor
Hello all I am chinese,I am sorry for my terriblly poor English ! I have confused about GdkColor In general,the RGB color mode ,the red or green or blue's value is from 0 to 255 But ,the GdkColor ,the value is from 0 to 65535 My question is ,how to map (0--255) to (0--65535) For example ,i have a general color (245,222,179) map it to GdkColor ,what is the value ? At any time ,your advice for gtk or English is welcome! Any help would be much appricated ! ___ 无限容量雅虎相册,原图等大下载,超快速度,赶快抢注! http://cn.photos.yahoo.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Need your help on the widget's width and height
Hello everyone I am writing my own gtk widget and i want my own widget's height and width ratio is 0.8, like this: widget->allocation.height / widget->allocation.width == 0.8 and my gtk_mywidget_size_allocate() function like this: Start of my code --- static void gtk_mywidget_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { …… if (allocation->height >= allocation->width * 0.8) allocation->height = allocation->width; else allocation->width = allocation->height/0.8; widget->allocation = *allocation; …… } End of my code - But ,i found ,in my test application,my own widget's size didn't change Who can tell my what's wrroy ? And who can tell my how to maintain my widget's height, width ratio to a constant value ? Any help would be much appreciated ! ___ 雅虎1G免费邮箱百分百防垃圾信 http://cn.mail.yahoo.com/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How to get the GtkTreeStore from a GtkTreeView object
Michele Bendazzoli ha scritto: Hi all, This is the first time I write in this list, I'm a novice with GTK library and linux development enviroment so excuse me if the questions I will ask are trivial. I made a new libglade project with anjuta, I design my interface with glade and I'm at the point I'm able to open a source file and display it in the first page of a GtkNoteBook, where I put my GtkTextView widget. I have also placed a button on bottom of my form to populate a GtkTreeView that I put on the second page of my notebook, to represent the flow chart of the source code that I have load in the source page. I read the manual and I see that any GtkTreeView is alway associated with a model, i.e., for me, with a GtkTreeStore. I see also that in the examples they usually firstr create GtkTreeStore and then the TreeView from the GtkTreeStore, so that one can first populate the store and then render it with the GtkTreeView. The problem for me is this: since I don't have to create the GtkTreeView because this seems to be automatically manage by the libglade middleware (I get the GtkTreeView directly by the xml made by glade), how can I get the store associated with the TreeView so that I can insert the row that I need? Thank you in advance for any advice Ok, I'm distract: it seems that gtk_tree_view_get_model is what I need ;-) ciao, Michele ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Handling Unix signals in a GTK+ application
> You are absolutely right; mutexes /are/ useless from signal > handlers. It seems the only reasonable way is to use a pipe(). How about GAsyncQueue's? They're supposed to be thread safe without the need of locking... How about within a single thread? Add a unix signal number in the signal handler, and suck it out again in a custom event source's prepare method. The prepare method can return -1 for its timeout contribution, and true/false if there's something in the queue. Fredderic ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How to get the GtkTreeStore from a GtkTreeView object
Hi all, This is the first time I write in this list, I'm a novice with GTK library and linux development enviroment so excuse me if the questions I will ask are trivial. I made a new libglade project with anjuta, I design my interface with glade and I'm at the point I'm able to open a source file and display it in the first page of a GtkNoteBook, where I put my GtkTextView widget. I have also placed a button on bottom of my form to populate a GtkTreeView that I put on the second page of my notebook, to represent the flow chart of the source code that I have load in the source page. I read the manual and I see that any GtkTreeView is alway associated with a model, i.e., for me, with a GtkTreeStore. I see also that in the examples they usually firstr create GtkTreeStore and then the TreeView from the GtkTreeStore, so that one can first populate the store and then render it with the GtkTreeView. The problem for me is this: since I don't have to create the GtkTreeView because this seems to be automatically manage by the libglade middleware (I get the GtkTreeView directly by the xml made by glade), how can I get the store associated with the TreeView so that I can insert the row that I need? Thank you in advance for any advice ciao, Michele ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: what's the best way to handle variables and objects?
John (J5) Palmieri wrote: Yes. It depends on your application. Some people will subclass a GObject and add the window object plus all of the other widgets as aggregates. If you are feeling more daring you can subclass your main window where your app class would inherit from GtkWindow. However if you do not want to get into the intricacies of GObject inheritance simply creating a struct would be fine: I agree. Usually it don't make sense to create a whole GObject descendant just to pass some data. On the other hand it really make sense if we want to use OOP/GObject mechanisms like subclassing, (virtual) methods and reference counting. It depends on the complexity of the application. Cheers, Andy ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list