3

I am trying to create an application for the Ubuntu App Contest. And I defined image of the design, but I am having problems with it. Principally with the primary-toolbar design, so it would look like Ubuntu Software Center of even rhythmbox.

So my question is. How can I use this visual with MonoDevelop and the Mono/C# language ?

1 Answer 1

3

If you are using Mono/C#, you may be out of luck at the moment, as the GTK+ 3.x bindings are not yet well tested or shipped in Ubuntu, and the primary toolbar setting API requires GTK+ 3.x.

To do this in a language where GTK+ 3.x is available, you can do this:

context = toolbar.get_style_context()
context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
5
  • Is there any way to use it without using python ?
    – aliasbody
    Jun 22, 2012 at 22:30
  • Yes, but not with Mono/C# at the moment, at least, not with the packages on Ubuntu currently. There is a GTK# 3.x port in the works, but it is not yet well tested, not released, and not packaged. The API would be the same though. You can use Vala or C to do it as well.
    – dobey
    Jun 22, 2012 at 22:55
  • The code you showed is to apply into the gtk design file right ? Because with mono I only have the XML gtk design file and the rest is all C# design files :S... (It is the first time I am using Mono, I was about to make the application for QT but since the GTK integration is not that good i just forgot that one :s)
    – aliasbody
    Jun 23, 2012 at 0:58
  • No. It's the code you would use to set the style class on the toolbar. You can't use it in Mono/C# becasue there are no GTK+ 3.x bindings for it. That code is usable basically as-is in Python or Vala, and is only slightly different in C, assuming you have a variable called "toolbar" for the Toolbar widget instance.
    – dobey
    Jun 23, 2012 at 1:13
  • I will try it with python under quickly just to see how it works
    – aliasbody
    Jun 23, 2012 at 1:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .