gtk#

Package prebuild binaries using snapcraft (mono and gtk-sharp2)

耗尽温柔 提交于 2019-12-11 06:05:24
问题 I'm trying to package my project using snapcraft. I think it is easiest to package the prebuild binaries, which are available here: https://sourceforge.net/p/audiocuesheet This is a mono and gtk-sharp2 project, so I thought of using snapcraft to bundle my application. But I fight currently getting this to run. My snapcraft.yml: name: audiocuesheeteditor version: '2.4.2' summary: Write audio cue sheets fast and efficient description: | Annoyed of writing your audio cue sheets via text editor?

How do I improve performance of winforms application in Mono?

走远了吗. 提交于 2019-12-11 05:15:30
问题 I have a remoting application (2 player Magic the Gathering Game) using windows form in C# and I am seeing very poor performance in mono. One thing I can think of that might affect the performance is that I have custom images for button background and form backgrounds(.png). Moreover I heavily use card images (.jpg). Lastly I have stuck very strictly to .NET 2.0. What can I look for to improve windows Form performance in mono? If this is not possible is there a quick winforms to gtk#

System.AccessViolationException occurs on TextView.Buffer

可紊 提交于 2019-12-11 04:58:51
问题 I am trying to show some text on C#, one line per second, using Gtk# GUI. the text is on .txt file, and it has 4 integers at every line. but when I compiled it at DragonFly BSD, the first one or two lines are showed perfectly on textbox but the program halts, and I've got SIGABRT and SIGSEGV errors. so I've compiled same code at Windows, and it has this error: Exception of 'System.AccessViolationException' or something like that. I've checked "Allow unsafe codes", but the result was same.

Get Pixel Position of Item or Cell Height in Treeview

醉酒当歌 提交于 2019-12-11 02:49:17
问题 In a GTK# application, I am using a TreeView inside a ScrolledWindow, and try to find the position of an item inside the TreeStore to draw lines starting from that item in Cairo. For now, I am using a hard coded value for cell height, which works for few items, but when other font sizes are used or the item list gets longer, there is a visible offset. Is there a method to get the cell height of a TreeView, or another way to get the vertical position of an item in the TreeStore? Here is the

In Gtk, how do I make a Button with just a stock icon?

↘锁芯ラ 提交于 2019-12-11 02:28:37
问题 I want to create a button with the stock "Remove" icon on it, but without the text "Remove". If I use Button button = new Button(Stock.Remove); , I get the opposite: just the text, and no icon. I will have many of these buttons, and the text makes it look cluttered. How do I get just the icon? Note: these are regular buttons, not toolbar buttons. Edit: This is how it currently looks: I want to replace these buttons with small, unobtrusive, icon-only buttons. 回答1: First create a stock Gtk

learning monodevelop and am having trouble getting a messgae box to appear

断了今生、忘了曾经 提交于 2019-12-11 02:12:12
问题 I am working in monodevelop and learning c#.... I am trying to get a message box to appear but I can't get it to function correctly ... Here is my code: using System; using Gtk; using GtkSharp; public partial class MainWindow : Gtk.Window { public MainWindow () : base(Gtk.WindowType.Toplevel) { Build (); } protected void OnDeleteEvent (object sender, DeleteEventArgs a) { Application.Quit (); a.RetVal = true; } protected virtual void OnButton11ResizeChecked (object sender, System.EventArgs e)

In Gtk, how do I search a ListStore for the row containing a particular value?

不羁岁月 提交于 2019-12-10 23:07:02
问题 I have a ListStore modeling a list of Tag s. This list may change apart from the ListStore . What I'd like to do is listen to the TagRemoved event in my TagList class, and remove the Tag from the ListStore when the event is triggered. However, I can't seem to find a way to search a ListStore for the row containing a given Tag , so that I can remove it. Is there any way to do this? 回答1: A GtkListStore implements the GtkTreeModel interface, which contains the tree traversal operations you want.

How do I connect glade signals using GtkBuilder in C#?

懵懂的女人 提交于 2019-12-10 22:57:49
问题 In python, I could just do builder.connect_signals(self) . It doesn't seem like this method exists in C#, and after looking at the GtkBuilder documentation, it looks like python is the exception, rather than the rule. How would I accomplish the same thing in C#? 回答1: Right now Gtk.Builder is not fully implemented in the current version of Gtk# (2.12). This thread explains the current situation. So once Gtk# 2.14 is released, you can just do: builder.Autoconnect (this); In the meantime you

Changing Gtk.Label.Text does not always work

谁都会走 提交于 2019-12-10 22:39:31
问题 I have a Gtk.Menu with 4 MenuItems. The following code is executed every second to change the Label.Text of each MenuItem: double d = new Random().NextDouble(); for (int i = 0; i < 4; i++) { ((Label)((MenuItem)menu.Children[i]).Child).Text = d.ToString(); } I am using mono 2.10.8.1 with monodevelop 3.0.3.2 on ubuntu linux. the issue The problem is that not all Labels are getting updated (sometimes only the first and the second, sometimes only the first and the last). my quick hack I can

Monodevelop .Net cross platform custom drawing application

北战南征 提交于 2019-12-10 20:17:41
问题 I'm looking for good suggestions on where to start with an educational application I am designing. I want my application to be compatible with Windows and OSX - my research seems to suggest that about 40% of the audience would be using a mac. I'm keen to stick to .net/c sharp and the Mono framework. The application is reasonably simple - it would be graphical, containing a tool bar with a menu and a few buttons. The main area on screen will contain custom graphics - I would draw onto an area