Re: is this correct way to open file in buffer?

2013-01-30 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/30/2013 07:39 AM, Rudra Banerjee wrote: Dear friends, I am trying hard to get rid of file reading and editing (as evident from my previous post) Here is a small code where I tried to open my file in a buffer and scan. Its small, 50 line code.

Re: is this correct way to open file in buffer?

2013-01-30 Thread Rudra Banerjee
Well, my final goal is to able to edit the file, but not save every time something has changed. So, in irc and other place, i was instructed to use get_contents method. Can you kindly clarify where I went wrong? On Wed, 2013-01-30 at 07:57 +0800, Gregory Hosler wrote: On 01/30/2013 07:39 AM,

Re: open an existing file in buffer and write on it

2013-01-30 Thread zz
On Tuesday 29 January 2013 22:47:57 Rudra Banerjee wrote: I tried a lot(trying to understand the huge GLib as suggested by Andrew), but most of the discussion here went way beyond my capability. So, lets try from fresh. My code for treeview and editing the treeview column (column Id #1). So,

Re: is this correct way to open file in buffer?

2013-01-30 Thread Tristan Van Berkom
On Wed, Jan 30, 2013 at 8:39 AM, Rudra Banerjee rudra.baner...@aol.co.uk wrote: Dear friends, I am trying hard to get rid of file reading and editing (as evident from my previous post) Here is a small code where I tried to open my file in a buffer and scan. Its small, 50 line code. I will be

Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Ferdinand Ramirez
I have encountered a strange error followed by a crash when I add the following object to a GtkTextView by creating a child anchor and call gtk_widget_show_all. The object that is added The object that is added to the child anchor is a GtkFrame inside which is a GtkTable and each cell of the

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Edscott Wilson
The current method for calling gtk_xx instructions is from the main thread only (i.e., that which owns the main loop context). You can do this by means of g_main_context_invoke(). Otherwise you must use the deprecated gdk_threads_enter/gdk_threads_leave mutex method. The deprecated method is

writing to a buffer: help

2013-01-30 Thread Rudra Banerjee
Dear friends, Please have a look at http://fpaste.org/gvF3/ So, I am writing those values to a string and then to a file(for now!) given that, Entries e are a structure, as, typedef struct { GtkWidget *combo, *entry1, *entryAuth, *entryEditor, *entryTitle, *entryPub, *entryVol,

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Edscott Wilson
BTW, g_main_context_invoke() will be erratic if you do not have the main context loop running. This is common at startup, when you do all sort of gtk_xx before entering the main loop. Solution: start the loop as soon as possible in the main thread, and anything else the main thread needs to do,

cannot edit the text entry box when open the window at first time

2013-01-30 Thread Hz
http://www.pygtk.org/pygtk2tutorial/sec-TextEntries.html#entryfig This link is the pygtk's official example. While running on my WIN7 system, the text entry box cannot be edited since the first time opening. But if you move mouse to activate other window, and turn back to this gtk window, the

How to implement a submenu for a GtkAction

2013-01-30 Thread Ma Xiaojun
I'm trying to add a feature to File Roller like this: http://dl.dropbox.com/u/45139465/The%20Archive%20Browser.png However, I can only add a single entry to File Roller's File (Archive) menu. I cannot have a sub menu. I tried adding a menuitem in ui XML, but I cannot have sub menu on it. I also

custom widget with gtk

2013-01-30 Thread Doudieu Siewe Narcisse
Hello every world, I have one suggestion for gnome: Actually there is a tuto on how to make derived class from gobject but in the case of gtk nothing is very clear no ideas of which gtk widget to instantitate, which methods to rewrite etc...another important thing is to tell to developper about

Gonmedate format issue

2013-01-30 Thread Ashok Chauhan
Hi All, I’m using below code to set the date in gnome date dialog box but getting different results in Centos 6 and Ubuntu 11 operating systems. In Ubuntu, it is showing dates in weekday, day, month-name and year (Saturday 01 December 2012) instead of DD/MM/YY (01/12/12). Please

GTK app development for windows.

2013-01-30 Thread Muhammed Fatih BALIN
Hello! I am a student and learned a little about gtk and writing programs using it. On Ubuntu 12.04 I can create, compile and run applications easily but I want to compile them for windows. I have mingw packages installed. But there is no gtk package in ubuntu repositories for cross

color box, hang tag and label

2013-01-30 Thread Jinghao Printing - CHINA
Hi, this is David Wu from Shanghai, China. We are a printing company, we can print color box, corrugated box, label, hang tag etc. Please let me know if you need these. Best regards, David Wu ___ gtk-app-devel-list mailing list

Gnome 3 style tabs

2013-01-30 Thread Satyajit Sahoo
Hi, I'm trying to implement a GUI in vala with tabs like in new Gnome 3 apps. I'm mostly successful, but have a few hiccups. I think perhas this may not be the nicest implementation. And, when you click a active tab, then the togglebutton state changes, which is kinda confusing. I cannot think of

Re: writing to a buffer: help

2013-01-30 Thread Damien Caliste
Hello, Le 30/01/2013, Rudra Banerjee rudra.baner...@aol.co.uk a écrit : My second question in this is that, I have created a buffer from a file in a different function as char* buffer; gsize length; GError* error=NULL; filename =

Re: GTK app development for windows.

2013-01-30 Thread jcupitt
On 24 December 2012 13:16, Muhammed Fatih BALIN catlak.profesor@gmail.com wrote: How can I install necessary packages on ubuntu and compile gtk applications for windows on _ubuntu_? You can download the win32 gtk binaries here: http://www.gtk.org/download/win32.php Just compile and link

Re: writing to a buffer: help

2013-01-30 Thread Rudra Banerjee
On Wed, 2013-01-30 at 16:32 +0100, Damien Caliste wrote: Is it clearer ? Much clearer! So, in a nutshell, as long as it is not free-ed, I can access it from any other function using char buffer and buffer, right? ___ gtk-app-devel-list mailing list

Re: GTK app development for windows.

2013-01-30 Thread Ardhan Madras
One thing you should know that most version of GTK+ in today Linux system is using version 3.x. The latest maintained version of GTK+ for Windows is 2.24, this is pretty old (almost 2 years ago). I don't know when will the GTK+ 3 comes to Windows. Hoperfully someone would tell us what happen on

Re: GTK app development for windows.

2013-01-30 Thread John Stebbins
On 01/30/2013 09:32 AM, Ardhan Madras wrote: One thing you should know that most version of GTK+ in today Linux system is using version 3.x. The latest maintained version of GTK+ for Windows is 2.24, this is pretty old (almost 2 years ago). I don't know when will the GTK+ 3 comes to Windows.

Re: GTK app development for windows.

2013-01-30 Thread David Nečas
On Thu, Jan 31, 2013 at 12:32:48AM +0700, Ardhan Madras wrote: One thing you should know that most version of GTK+ in today Linux system is using version 3.x. This is somewhat inaccurate. All major Linux distributions contain Gtk+3 packages and the number of Gtk+3 programs grows. But if you

Re: GTK app development for windows.

2013-01-30 Thread Ardhan Madras
Yes we know that, they still providing GTK+2 or GTK+ for backward compability. I was mean about version, because there are no stable GTK+ 3 for Windows yet ( at least in official site gtk.org ), so if he want to build his GTK+ app in Windows, the maintained and bundled development release is

Re: GTK app development for windows.

2013-01-30 Thread Andrew Potter
On Wed, Jan 30, 2013 at 10:52 AM, John Stebbins stebb...@jetheaddev.comwrote: Not sure where you are getting your information. I just built HandBrake using the mingw tools on Fedora 18 with gtk+ 3 support. Works spiffy. Presumably he is getting his information from

Re: GTK app development for windows.

2013-01-30 Thread John Stebbins
On 01/30/2013 11:24 AM, Andrew Potter wrote: On Wed, Jan 30, 2013 at 10:52 AM, John Stebbins stebb...@jetheaddev.comwrote: Not sure where you are getting your information. I just built HandBrake using the mingw tools on Fedora 18 with gtk+ 3 support. Works spiffy. Presumably he is

Re: GTK app development for windows.

2013-01-30 Thread John Stebbins
On 01/30/2013 11:24 AM, Andrew Potter wrote: On Wed, Jan 30, 2013 at 10:52 AM, John Stebbins stebb...@jetheaddev.comwrote: Not sure where you are getting your information. I just built HandBrake using the mingw tools on Fedora 18 with gtk+ 3 support. Works spiffy. Presumably he is

Re: GTK app development for windows.

2013-01-30 Thread John Stebbins
On 01/30/2013 01:08 PM, John Stebbins wrote: On 01/30/2013 11:24 AM, Andrew Potter wrote: On Wed, Jan 30, 2013 at 10:52 AM, John Stebbins stebb...@jetheaddev.comwrote: Not sure where you are getting your information. I just built HandBrake using the mingw tools on Fedora 18 with gtk+ 3

Re: GTK app development for windows.

2013-01-30 Thread Andrew Potter
On 01/30/2013 01:08 PM, John Stebbins wrote: I realized I didn't answer your question completely. My installer is just a zip file containing the directory tree of everything needed. I have a simple script that copies everything needed into the directory, then I zip it up. Example

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Ferdinand Ramirez
I used the gdk_threads_enter/gdk_threads_leave pair, but it did not work. It does not work even when the whole creation of the hierarchy is within the gdk_threads_enter/gdk_threads_leave pair. I am able to get it to work without using GtkEntry instead of GtkTextView if I call the function in

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Andrew Potter
On Wed, Jan 30, 2013 at 2:17 PM, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: However, as I pointed out, it works if I replace the GtkTextView with a GtkEntry within each cell of the table. 2013/1/30 Ferdinand Ramirez ramirez.ferdin...@yahoo.com This works fine if it is all done

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Ferdinand Ramirez
--- On Wed, 1/30/13, Andrew Potter agpot...@gmail.com wrote: If you are getting an iterator warning, you may be trying to use an invalidated GtkTextIter. Be sure to read http://developer.gnome.org/gtk3/stable/TextWidget.html I have nothing in there that modifies the buffer. I just create

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Andrew Potter
On Wed, Jan 30, 2013 at 8:11 PM, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: I have nothing in there that modifies the buffer. I just create the view and add it. In fact, the error comes from the line gtk_widget_show_all. If I replace this line with code to traverse the hierarchy and