gtk assistant any good?
Hello, I am writing an UI for my application and I thought I could use the gtk assistant window. However, testing the UI reveals serious issues with the pre-made assistant. It's quite hard to make the assistant advance when the user selects something. So far I have some 2-3 pages and start with all pages incomplete. My page with buttons works OK when visited for the first time. I added a function to manually advance to the next page when a button is pressed. When returning to the page it is already completed and one of the buttons pressed. Pressing a different button advances to the next page again but pressing enter on the already depressed button does nothing. The Forward button is now enabled but not the default. On a page with combobox (actually a dropdown selection, not sure why it is named such) I turn on the forward button by completing the page when the selection changes. Now even on the first visit the assistant is stuck unless the user painstakingly presses Alt+F. It is not possible to leave the combobox neither with arrows nor tab nor enter. My only page that is more or less working is one with file chooser widget. The widget fires lots of superfluous events every time it is displayed so I only need to check that the file selected is suitable. It has a special event for activating a file with enter or doubleclick which I can use to advance to the next page manually without using the forward button. It has one unfortunate side effect, though. It uses Alt+b for browse so the back button is not easily accessible anymore. Any tips on using the gtk built-in assistant or should I just roll my own when I want some at least half-usable UI? Thanks Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk assistant any good?
On 19 August 2011 11:11, Bill Czermak wrote: > Hi Michal > > A day since you posted your question and noone has replied. > > I have not used (or heard of) GTK assistant. > > Generally I used GTK2 programming in C with no problems, and you might try > the same. > > However, have not used GTK now for a year or more, so things might have > changed with GTK3. > > GTK2 was an excellent product. Try PyGTK if you dont use C. I found it > easy to use, but I already knew GTK when I tried it a few months ago. > > I find most IDEs more trouble than they are worth; others disagree. > It's not that the assistant widget or the Glade IDE is broken (beyond the bugs which are present in all GTK applications). The problem is that about half of the basic GTK widgets are broken and hence any UI that includes them breaks. I can easily reproduce the issue with a mockup of an assistant created using the basic widgets. I am using gtk2 too. Most of the issues can be seen in glade or glade-previewer which uses gtk3 now. Thanks Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk assistant any good?
On 19 August 2011 14:55, Bill Czermak wrote: > "About half the GTK2 widgets are broken" > > Not my experience. If you post some code which shows a problem... > Preferably a simplified case, but a complete program, which demonstrates > where you have a problem, then maybe someone can sort it out. If the above > is your experience, then likely you are new to GTK and misunderstanding how > to use it. > > I have used GTK2 with C and also pyGtk (with python) and had no problems, > except the mistakes I made myself. I have not tried using GTK with C++; > neither have I used GTK3... Possibly there are problems with other > development environments. I leave it for others to comment about things I > know nothing about. > > The statement "50% of GTK widgets are broken" above is unlikely to get > anyone, other than Bill Gates interested. > https://bugzilla.gnome.org/show_bug.cgi?id=600421 https://bugzilla.gnome.org/show_bug.cgi?id=656816 https://bugzilla.gnome.org/show_bug.cgi?id=314926 SpinButton and TextEntry have "activates default" property which sadly defaults to false meaning that in may applications we get bugs like this: https://bugzilla.gnome.org/show_bug.cgi?id=589337 Regards Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk assistant any good?
On 19 August 2011 17:43, wrote: > On 19 August 2011 16:13, Michal Suchanek wrote: >> https://bugzilla.gnome.org/show_bug.cgi?id=656816 > > Could you explain the combobox navigation bug a little more? It seems > to work for me. > > If I open GIMP preferences (for example) and tab to one of the > comboxboxes there I can use up/down arrows to change the value (or the > scroll wheel, which I don't like, but that's another question) or > left/right to move to other widgets. > > If I pop the combo open with space or enter I can change the value > again with up/down (though not with scroll, confusingly). Pressing > space or enter accepts my change, esc cancels it. Once the popup is > closed I can again use tab and arrows to navigate the dialog. > The tab key works for me in gtk3 but not gtk2. The Enter key should not pop up the menu but confirm dialog as it does with radio buttons, checkboxes, and what not. In textedits and spinboxes it is optionally possible to make Enter confirm dialog (but sadly defaults to off). Combobox does not even have the option. Together with the broken tab navigation it gives awesome user experience. The Up/Down arrows do, of course, change the value. I don't happen to have any other control to the left/right of the combobox so I did not try these keys. I wonder if they would work in this case. Thanks Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk assistant any good?
On 19 August 2011 18:44, Michal Suchanek wrote: > On 19 August 2011 17:43, wrote: >> On 19 August 2011 16:13, Michal Suchanek wrote: >>> https://bugzilla.gnome.org/show_bug.cgi?id=656816 >> >> Could you explain the combobox navigation bug a little more? It seems >> to work for me. >> >> If I open GIMP preferences (for example) and tab to one of the >> comboxboxes there I can use up/down arrows to change the value (or the >> scroll wheel, which I don't like, but that's another question) or >> left/right to move to other widgets. >> >> If I pop the combo open with space or enter I can change the value >> again with up/down (though not with scroll, confusingly). Pressing >> space or enter accepts my change, esc cancels it. Once the popup is >> closed I can again use tab and arrows to navigate the dialog. >> > The tab key works for me in gtk3 but not gtk2. > Actually, I cannot reproduce the tab key failing anymore. I tried to reconstruct the layout in which it would fail and while I have something looking the same it would not fail. So either I did something wrong when testing my layout previously or I hit some very rare and elusive corner case. I recall hitting some key that would bring me from my radio selection to the combo and would not allow me to get anywhere else but I can't get to the combo with arrows, either up/down and left/right navigate between radios and Tab gives me the combo, then the buttons at the bottom and then the radios again, eventually. Left/Right arrows on the combo also connect to the buttons at the bottom. Thanks Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Using the same model in two treeview and prevent selecting the same item?
Hello, I have a list which I want to display in two treeviews and prevent selecting the same item in both. The idea is that the user selects an item in the first list, then the second list is shown, and it should not contain the item selected in the first list (or the item should be inactive or whatever). I tried using a model filter to this end. It has an option to set custom filter callback and in this callback I fetch the selection of the first list (if any) and return false if the filtered item is the same as selected. The problem is that I have to call refilter whenever the selection changes in the first list. Otherwise, the second list contains everything from the model. Since the second list is hidden in my application I could call refilter on showing it but a more dynamic solution that allows showing both lists would be welcome. O course, my list of about dozen items can be refiltered on every selection change just fine but it does not look like the right solution. I could possibly use a filter column in the list but setting it would be tedious. AFAIK the selection change signal only gives current selection so I would have to save the previous selection so that I could flip the filter column on both. I am not sure that it would resolve the automatic update issue either. Thanks Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Detecting Ctrl Esc in GTK app
On 30 August 2011 16:50, wrote: > On 30 August 2011 15:22, Andrew Wood wrote: >> How would you link it directly to the window then rather than to a widget? > > You can link a GClosure to a key press with this: > > http://developer.gnome.org/gtk3/stable/gtk3-Keyboard-Accelerators.html#gtk-accel-group-connect > > Parse "esc" to key/mod with > > gtk_accelerator_parse( "esc", &key, &mods ); > > (I've not actually done this, I always use a widget, but I think it should > work) > You have the key name wrong (the example is not in C but anyway): Gtk::Accelerator.to_name *(Gtk::Accelerator.parse "esc") => "" Gtk::Accelerator.to_name *(Gtk::Accelerator.parse "Escape") => "Escape" Gtk::Accelerator.parse "Escape" => [65307, #] HTH Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Notebooks and GLists
On 30 August 2011 23:08, Neil Munro wrote: > Hi folks > Not a very descript title, but I fail to come up with a better > one. Anyway my problem is as follows. > > I have a notebook with reorderable tabs which each displays a sourceview > widget. > Each sourceview widget represents a document where a document is an instance > of an object/struct. > When the tabs are re-ordered the glist becomes out of order with the tabs > and needs to be updated to reflect the new page positions. > > Using the page-reordered signal and callback I can get the new page position > but not the old position. > > If there is a better way to go about implementing a system like this, I > would be willing to hear it and any help is appreciated. > > Finally you can get the code here: https://gitorious.org/x2 You did not implement any Reorder. In absence of any code to comment on I suggest you save the old order (= the last order known to your code) in another GList and when you receive a reorder event you can compare the new position with the saved position. You need these two GLists to hold the same (or convertible) unique values. eg. pointer to tab is one sufficiently unique value. Pointer to tab and pointer a struct containing a pointer to tab is an example of trivially convertible (and often very useful) unique values. HTH Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Open a file in a GTK application (over network)
Hello, I tried to add a file chooser widget into my application and open a file on a samba share. After some fiddling around and collecting some GTK patches I got to a state when it would work. However, when I killed my gnome-keyring-daemon (could not find an UI for managing the stored credentials) there is no possibility to connect to the samba share any more. I can open Gigolo and connect to the share manually and then everything works again. I can browse the share and bookmarks pointing to the share are visible again. Without connecting to the share in a separate application, though, I can't enter the location in the location entry - it says it's not mounted. And the bookmarks pointing there are not visible, either. What use is gvfs then if you have to mount your shares in advance anyway? I could use smbfs then. An I would have the option to *not* enter a domain when connecting to the share then, too. Thanks Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GtkBuilder bugs
On 4 September 2011 12:32, Tristan Van Berkom wrote: > Its a bug that needs to be fixed in Glade. > > You can remove the line that says n-rows safely fwiw I don't think that an extra property would break the widget, the warning should be harmless. > > On Sun, Sep 4, 2011 at 1:41 AM, Bernhard Schuster > wrote: >> I am using a gtk-builder file for my application, which uses a Grid >> widget for layouting. When I run the application, I read this: >> >> Gtk-WARNING **: Unknown property: GtkGrid.n-rows >> >> and the grid is not shown (nor its contents) Are you by any chance using glade 3.10? That won't work. HTH Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GtkBuilder bugs
On 5 September 2011 11:29, Tristan Van Berkom wrote: > On Mon, Sep 5, 2011 at 10:49 AM, Michal Suchanek wrote: >> On 4 September 2011 12:32, Tristan Van Berkom wrote: >>> Its a bug that needs to be fixed in Glade. >>> >>> You can remove the line that says n-rows safely fwiw >> >> I don't think that an extra property would break the widget, the >> warning should be harmless. >> > > Anything that GtkBuilder encounters that is unrecognized (unrecognized > xml tags, properties and even unknown/inexistant GObject properties) cause > GtkBuilder to either abort or fail to parse. For me unknown properties are just ignored, at least in gtk 2. > >>> >>> On Sun, Sep 4, 2011 at 1:41 AM, Bernhard Schuster >>> wrote: >>>> I am using a gtk-builder file for my application, which uses a Grid >>>> widget for layouting. When I run the application, I read this: >>>> >>>> Gtk-WARNING **: Unknown property: GtkGrid.n-rows >>>> >>>> and the grid is not shown (nor its contents) >> >> Are you by any chance using glade 3.10? >> >> That won't work. >> With Gtk 2 which does not know about Grid. > > No Glade earlier than 3.10 allows you to edit a GtkGrid, however > the Grid implementation is based on the old GtkTable implementation. > > To remove the erronously serialized n-rows/n-columns properties from > GtkGrid in Glade we first need to add some code to the GtkGrid deserialization > routine to "guess" the span in row/columns based on the span of all children > and number/position of added placeholders. If gtk3 cannot display the glade files made for it with glade 3.10 that's quite odd. I can see them in glade-previewer just fine but that's the only gtk3 app which I use with these. Thanks Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Open a file in a GTK application (over network)
Obviously, all file choosers are broken in one way or another. No way to open a file in GTK yet. Maybe it will be possible in GTK4 or if you roll your own widget :-S ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GtkTreeView with 2 Columns
On 10 September 2011 15:45, Paolo wrote: > Hi at all! I have a problem about a tree with two columns. The first one is > a column that shows an icon and the second one shows a text. All works fine, > but between the columns I see an ugly vertical sperator. I know that there > are the style properties for each gtkWidget and in particular the > vertical-separator style property for my gtktreeview, but how can I set the > vertical-sperator? Is that not property of your theme? I have no separator between columns. HTH Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GtkTreeView with 2 Columns
On 10 September 2011 15:45, Paolo wrote: > Hi at all! I have a problem about a tree with two columns. The first one is > a column that shows an icon and the second one shows a text. All works fine, > but between the columns I see an ugly vertical sperator. I know that there > are the style properties for each gtkWidget and in particular the > vertical-separator style property for my gtktreeview, but how can I set the > vertical-sperator? In Glade it's vertical|horizontal|both HTH Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: multiple filters in GtkFileChooser
On 14 September 2011 15:20, Allin Cottrell wrote: > On Wed, 14 Sep 2011, Bernhard Schuster wrote: > >> 2011/9/14 Allin Cottrell : >>> >>> On Tue, 13 Sep 2011, Allin Cottrell wrote: >>> I have found the relevant difference between gtk 2.24.5 and 2.24.6, which has the effect -- on my system at least -- that the filter selection combo box is not displayed correctly in the gtk file chooser when using 2.24.6. It's the added material in the function filter_create(), in gtkfilechooserdefault.c. I'm attaching a diff (simply commenting out the new stuff), which if applied to 2.24.6 makes it work correctly for me. >>> >>> One further point: I've now tried compiling the same code against GTK >>> 3.0.12, and I'm not seeing the problem with the wrongly ellipsized >>> strings >>> in the filechooser filter combo. >>> GTK 2.24.6 is the only release which exhibits this problem. >>> >>> I have been able to work around the issue with 2.24.6 with a hack: locate >>> the filter combo among the children of the file chooser dialog by >>> recursing >>> gtk_container_foreach(), and use gtk_widget_set_size_request() to set its >>> width to something sensible. >>> >>> I might mention that the installed pango is 1.29.3, in case that makes >>> any >>> difference. >> >> You should really file a bug report. It's the right thing to do > > Right enough. It's now in bugzilla. > It should be fixed in one of the commits after 2.24.6 release. In 2.24.6 file chooser is just broken. Don't use that release if you want to open files ;-) HTH Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: CSS on gtk3 is cosuming lot of memory, how to reduce it???
On 7 October 2011 12:34, sunil agrawal wrote: > Hi, > > I implemented an application which is based on gtk+-3.0. > I am facing an issue related to memory the gtk+-3.0 css theming is > consuming. > Intial css takes 5 MB extra, then when I load other css in run time, it > takes extar 5MB each. > So each time a css loaded, it takes eaxtra 5MB. > The memory is not reduced even if a particular css goes outof scope. It > should remove previos css. > I use GTK+3.0.6 and tried with GTK+3.2.0( which says about optimization of > css ) > > > If anybody can share their view and suggestions to reduce the memory, It > would be really helpful. > > I used the css using import method. I also tried to put a css using dynamic > loading method through cssprovider but memory did not reduce and its > consuming almost same memory. > Please Let me know if anyone is using the css by any other methods. > You can always try running your application valgrind to figure out what to blame for the memory consumption. HTH Michal ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list