Re: Farewell

2016-05-09 Thread Ardhan Madras
Its been long time since I've posted to gtk-app-devel-list, this is the best joke ever! I'd eat my cheap keyboard for other post like this. Ardhan On Sunday, April 17, 2016, Andrew Robinson wrote: > To all my fellow developers, > > I can see that I am not going to get

Re: Advanced Gtk+ Sequencer 0.4.2-34

2015-02-02 Thread Ardhan Madras
Hi Joel, This is a cool application that AFAIK not much available especially in GTK+ toolkit. Musician-Hacker might be tempted to work with you, I hope its me ;) Keep up the motivation. Cheers, Ardhan On Sat, Jan 17, 2015 at 11:06 PM, Joël Krähemann weedli...@gmail.com wrote: Hi all This

Re: a question about g_strconcat()

2013-02-28 Thread Ardhan Madras
g_strconcat() ALWAYS returns newly allocated memory on each call. Most likely you will have leak when you code like that, because you lost reference. You have to assign it to a new pointer such as: gchar *ptr1 = g_strconcat (ptr1, NULL); gchar *ptr2 = g_strconcat (ptr1, ptr2, NULL); gchar *ptr3 =

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 Ardhan Madras
is available, that is version 2.24. So, for less effort, Its better for him to use GTK+ 2 in Linux too, unless he want to distiguish between GTK+3 and GTK+2 calls in the code. Regards. 2013/1/31 David Nečas y...@physics.muni.cz: On Thu, Jan 31, 2013 at 12:32:48AM +0700, Ardhan Madras wrote: One thing

Re: GTK+ 3.6 threading?

2012-10-23 Thread Ardhan Madras
Hi, Now that from GTK+ 3.6, thread functions are deprecated. Is there any new rules to do threading with the gtk+ 3.6 version? Are you talking about Glib? yes, there are many changes since 2.32 (for now stable version is 2.34), from high level view, the changes such as new thread creation

Re: Event propagation question.

2012-10-10 Thread Ardhan Madras
Can you share the source? so we can see why it is not working. Regards. On Wed, Oct 10, 2012 at 1:59 PM, Yury Alyaev muta...@rambler.ru wrote: Hello all, I'm porting an application from Gtk+-1 to Gtk+-2 and one problem has appeared. I have the following object: toggle button containing vbox

Re: Event propagation question.

2012-10-10 Thread Ardhan Madras
it to GTK+ 2. Ardhan On Wed, Oct 10, 2012 at 8:55 PM, Yury Alyaev muta...@rambler.ru wrote: On 10/10/2012 02:33 AM, Ardhan Madras wrote: Can you share the source? so we can see why it is not working. Of course, it is Soundtracker project: git://soundtracker.git.sourceforge.net/gitroot

Re: gtk apps on iOS/Android?

2012-09-10 Thread Ardhan Madras
On Mon, Sep 10, 2012 at 8:42 PM, Michael Cronenworth m...@cchtml.com wrote: Michael Torrie wrote: Not to mention Android does NOT use X11. You will also have to port Glib, Pango, etc. to Android. Actually, there is a Java based X11 Server running on Android and was available in Play Store

Re: glib array help

2012-09-10 Thread Ardhan Madras
statement with no effect [-Wunused-value]: for (i==0;i=100;i++){ format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char **’ [-Wformat]: fscanf(finp, %s, alst[i]); And in this case, you need to allocate char *arls[100] before using it. As I already told you, this is a

Re: Why doesn't my label show up in the window

2012-08-26 Thread Ardhan Madras
() are not intended to work with your case. That's ugly to call sleep() between gtk_main(), because you will mess with GUI interaction (unresponsive) , widget update, event signal's etc. So avoid using it. I have read up on the use of timeouts as suggested by Ardhan Madras and while it appears

Re: Why doesn't my label show up in the window

2012-08-25 Thread Ardhan Madras
You call sleep() in mainloop causes it block, you can use g_timeout_*() functions to create event in mainloop in timely manner. Below I modify your code to implement g_timeout_*() functions. Note, you must care with subwindow creation, user may still create the subwindow (by clicking the OK

Re: write to a file using g_print

2012-08-22 Thread Ardhan Madras
How I can transfer the filename from open_file to activate_func? When the activate_func() will be invoked? is it a callback function or something?. I don't know why and how you implemented that, but you already retrieved filename in open_file(), if you supposed to call activate_func() here, you

Re: write to a file using g_print

2012-08-21 Thread Ardhan Madras
g_open() is wrapper to open() syscall, not the standard libc's fopen(). mkbib.c:114:15: warning: initialization makes pointer from integer without a cast [enabled by default] You got this because g_open() returning a int (file descriptor) not a FILE pointer. You must distinguish each I/O

Re: GList strange behavior

2012-08-16 Thread Ardhan Madras
Hi, Seem you did not read my reply clearly. I told you the behaviour of g_list_append() and g_list_last() there. Okay, so your question is ( So, why g_list_append() dont' return me newly created list??? If you pass NULL pointer to first arg of g_list_append() it will returns a newly created

Re: GList strange behavior

2012-08-14 Thread Ardhan Madras
Hi, In button_cb()... Did you mean Last list element: 0x832c610 is differ from INIT list prt: 0x830f080? It's clear because 0x830f080 was the location of first list and 0x832c610 is the last appended list. g_list_prepend() return to the start of the list, g_list_last() return the last of the

Re: SDL and GTK?

2012-08-06 Thread Ardhan Madras
Hi, Can you share for what purposes? games or any 2D graphics project? Not to help with sdl, but have you hear about clutter? http://clutter-project.org It has good relationship with GTK+ and also based on GObject system. It's integrated well with GTK+ application and actively maintained.

Re: glib and relative file names

2011-10-16 Thread Ardhan Madras
I have tried making the argument and converting it to an absolute path by getting the output of g_get_current_dir () which I understand to return the current working directory but it only returns the name of my home directory, which is unusual Why did you manage to build the file path with

Re: Forcing a G Timeout to be handled by a specific thread

2011-10-11 Thread Ardhan Madras
Hi Andrew, I wrote some Glib programming example in the past, this code is about creating GMainContext, GMainLoop and GSources (that g_timeout_add() function and friends did) into separate thread, hope this will be usefull for you. #include glib.h typedef struct { GMainLoop *loop;

Re: Forcing a G Timeout to be handled by a specific thread

2011-10-11 Thread Ardhan Madras
Hi Andrew, I wrote some Glib programming example in the past, this code is about creating GMainContext, GMainLoop and GSources (that g_timeout_add() function and friends did) into separate thread, hope this will be usefull for you. #include glib.h typedef struct { GMainLoop *loop;

Re: gobject and gtk_widget_set_sensitive

2011-07-12 Thread Ardhan Madras
Depends on the custom widget implementation, normally when we set_sensitive() to parent widget then the childs inherit this, but I can't say this is a bug!, so what is the custom library?. Ardhan --- jwm.art@gmail.com wrote: From: James Morris jwm.art@gmail.com To:

Compile time GTK+ 3 version check

2011-04-23 Thread Ardhan Madras
Hi All, What is the best way to determine GTK+ 3 version in compile time? Does ... #if GTK_MAJOR_VERSION == 3 ... enough for this?, Because I want this code should compiled also in GTK+ 2 environment. Thanks, Ardhan _

Compile time GTK+ 3 version check

2011-04-23 Thread Ardhan Madras
Hi All, I want to port my application to GTK+ 3, but I don't want to broke with GTK+ 2 API and ABI, what is the best way to determine GTK+ 3 version in compile time? Does #if GTK_MAJOR_VERSION == 3 enough for it? Thanks, Ardhan

Re: Example of GtkSourceCompletion

2011-01-18 Thread Ardhan Madras
Hi, The GtkSourceCompletion is obsolete, what do you want to use it for? Ardhan, --- craigbakal...@verizon.net wrote: From: craigbakalian craigbakal...@verizon.net To: gtk-app-devel-list@gnome.org Subject: Example of GtkSourceCompletion Date: Mon, 17 Jan 2011 04:23:33 -0500

Re: Example of GtkSourceCompletion

2011-01-18 Thread Ardhan Madras
, if GtkSourceCompletion is obsolete what has replaced it? Craig Bakalian On Tue, 2011-01-18 at 02:40 -0800, Ardhan Madras wrote: Hi, The GtkSourceCompletion is obsolete, what do you want to use it for? Ardhan, --- craigbakal...@verizon.net wrote: From

Re: Problem with GSource and polling

2010-11-20 Thread Ardhan Madras
Hi Jannis, I'm sorry but what `kernel module' you are talkin' about?, is it the application's module? Ardhan, --- jan...@xfce.org wrote: From: Jannis Pohlmann jan...@xfce.org To: gtk-app-devel-list@gnome.org Subject: Re: Problem with GSource and polling Date: Thu, 18 Nov 2010

Re: Take part in gkt+ development

2010-09-23 Thread Ardhan Madras
Developer start to dig into development in many ways, find your own way. First thing is to follow their schedule, their job and lists. This also may interesting for you, a census[1] about who develop GNOME (also the GTK+ developer) [1]

Re: g_io_scheduler_job_send_to_mainloop in another thread

2010-08-25 Thread Ardhan Madras
Based on my review at gioscheduler.c, I assume that the g_io_scheduler_job_send_to_mainloop() can be called in another thread, notice that this function wait for job completion in the main loop (main thread), in this case blocking the calling thread. If you call

Re: Some questions about Gtk+3.0 2.90

2010-08-25 Thread Ardhan Madras
Why the application need to move to GTK+ 3 which still in development progress? Ardhan --- eba...@gmail.com wrote: From: Emmanuele Bassi eba...@gmail.com To: gtk-app-devel-list@gnome.org Subject: Re: Some questions about Gtk+3.0 2.90 Date: Mon, 23 Aug 2010 13:28:25 +0100 On Mon,

Re: GIOScheduler example need

2010-06-27 Thread Ardhan Madras
Hi, Where Win: typedef struct _Win { typedef struct _MainWin { GtkWindow parent; GtkWidget* scroll; GtkWidget* box; }Win; I'm not quite sure how you defined your data type here, but if you are just typedef-ing a structure of course you can pass it to the function just

Re: GIOScheduler example need

2010-06-25 Thread Ardhan Madras
Hi, GIOSchedulerJob uses GThreadPool to run it's jobs if thread system is supported, otherwise it use g_idle_add*(), using GThreadPool maybe the best choice for handling some blocking operations such as I/O related call. Here an example for using GSchedulerJob. As you can see the main loop

Re: How to make GtkLabel fills like GtkTextView?

2010-06-20 Thread Ardhan Madras
: Sat, 19 Jun 2010 10:31:15 -0400 On Sat, Jun 19, 2010 at 3:58 AM, Ardhan Madras aj...@knac.com wrote: Can anyone tell me what is the case to use 'GtkTextView' instead of 'GtkLabel' to display a text with several sentences( 100 words) in not editable way? Maybe for `beauty' looks, the author

Re: Global GList in gtk+ application

2010-06-19 Thread Ardhan Madras
Then how global variable `Data' was declared in your code? --- kuleshovm...@gmail.com wrote: From: Alexander Kuleshov kuleshovm...@gmail.com To: gtk-app-devel-list@gnome.org Subject: Global GList in gtk+ application Date: Sat, 12 Jun 2010 12:03:40 +0600 Hello, I need in global list in my gtk+

Re: How to make GtkLabel fills like GtkTextView?

2010-06-19 Thread Ardhan Madras
Can anyone tell me what is the case to use 'GtkTextView' instead of 'GtkLabel' to display a text with several sentences( 100 words) in not editable way? Maybe for `beauty' looks, the author want the text wrapped as it's parent container width that GtkLabel can't do. How to make GtkLabel fill

Re: How to make GtkLabel fills like GtkTextView?

2010-06-19 Thread Ardhan Madras
: From: Ardhan Madras aj...@knac.com To: Tao Wang dancef...@gmail.com Cc: gtk-app-devel-list@gnome.org Subject: Re: How to make GtkLabel fills like GtkTextView? Date: Sat, 19 Jun 2010 00:58:26 -0700 Can anyone tell me what is the case to use 'GtkTextView' instead of 'GtkLabel' to display a text

Re: gint and gchar data types

2010-05-01 Thread Ardhan Madras
Hi, You don't have to use gint, gchar or any Glib re-defined C data types in your code. I think it's just a naming convention and hints for GTK+ related projets. If you are writing a projects intended for free software then it's better for using this naming convention. Ardhan

Re: How to handle GIO channel when the other side kills the connection

2010-04-29 Thread Ardhan Madras
Hi, Do you keep reading channel's data although the other side close connection? maybe you have to check every read call (g_io_channel_read_chars()) for errors. GIOChannel is a wrapper of system related I/O such as socket, this will be more clear if you try socket API related calls than using

Re: Glade3: Setting TreeModel in GtkComboBox

2010-03-12 Thread Ardhan Madras
From: Tristan Van Berkom t...@gnome.org To: aj...@knac.com Cc: gtk-app-devel-list@gnome.org Subject: Re: Glade3: Setting TreeModel in GtkComboBox Date: Tue, 9 Mar 2010 10:13:59 -0500 As the combo box implements GtkCellLayout, you can use that interface to add renderers (but you should be able

Glade3: Setting TreeModel in GtkComboBox

2010-03-09 Thread Ardhan Madras
Im using Glade 3.6.7 and GTK+ 2.18.7, build UI with Glade and save as GtkBuilder format. I don't understand how GtkBuilder implements GtkComboBox's TreeModel, in Glade i already add it's model, create a column and append some entries. But i didn't see anything listed in that combo box (empty).

Re: multithreaded gtk app

2010-01-24 Thread Ardhan Madras
Hi, I rare to use GDK locks method on another thread, as it's described in GTK+ FAQ that X server receive command in batch mode, that's means command or request will not be send immediately, if you do GTK+ call on another thread except the main thread, GTK+ will now know how to send that

Re: GtkItemFactory stuff troubles

2010-01-24 Thread Ardhan Madras
Hi, At first as a standard procedure of course ;p, you may want to try to debug it, just enable debugging information when compiling, sometime with nicely gdb tell you which part making that mess. - Ardhan --- manutm...@gmail.com wrote: From: Manu TM manutm...@gmail.com To:

Re: Coding a console program frontend

2009-10-13 Thread Ardhan Madras
Hi, However the child proccess (the GUI) when tries to read data from the pipe it hangs. If you run this program you can see that the printf( BEFORE READ LINE\n ) is printed but the printf( AFTER READ LINE\n ) is not.. What I'm doing wrong? What do you means with *hang*? or it's being

Re: Default dir for application data

2009-10-10 Thread Ardhan Madras
Hi, In general GTK+ applications use GNU build system, user can configure and install it on it's specified directory. Usually there is a a file named config.h and can be override by configure script parameters. The config.h will be generated upon configure based on config.h.in, then use the

Re: Is there a general signal a-la text-edited for GtkEntry

2009-10-06 Thread Ardhan Madras
Hi Todor, GtkEditable is implemented by GtkEntry, so you can pass a GtkEditable's changed signal to the GtkEntry widget. - Ardhan --- ttodo...@gmx.net wrote: From: Todor Todorov ttodo...@gmx.net To: Gtk App Devel List gtk-app-devel-list@gnome.org Subject: Is there a general signal

Re: GTK runtime error

2009-10-01 Thread Ardhan Madras
Hi Dutta, If you installing from source then you will have a mutiple library GTK+ version, depends on how you configure the builds. Does your system has already GTK+ development files shipped or installed from the Fedora 9 repository?, i guess you are compiling the helloworld example in the

Re: Close GTK Main window

2009-09-24 Thread Ardhan Madras
Hi, GTK+ application should use at least one main loop, once you have called gtk_main() then the loop is running, your main window keep showing because this loop, you can exit from the main loop (or your main window) anytime by calling gtk_main_quit() or use standard function exit() to just

GStaticMutex operation: compiler warning

2009-08-26 Thread Ardhan Madras
Hi all, given a piece of codes: GStaticMutex mutex = G_STATIC_MUTEX_INIT; func() { g_static_mutex_lock (mutex); } gcc give me a warning like this: --- deferencing type punned pointer will break strict-aliasing rules this warning mostly on g_static_mutex*() operation It's on gcc-4.3.2,

Re: usb plug/unplug notifications

2009-07-09 Thread Ardhan Madras
For desktop application (because we are GTK+ forum) there is HAL (Hardware Abstraction Layer) http://www.freedesktop.org/wiki/Software/hal to receive events and informations from devices and the kernel, gnome-volume-manager use HAL to know when a device has been attached then do some task that

Re: GTK threads

2009-07-08 Thread Ardhan Madras
Hi, You should be aware when call GTK+ function in another thread, if you do this from another thread, GTK+ is likely not send commands to the X server. When you run a dialog in the main thread, main loop is blocked, so the dialog's window remain displayed until a response was given (eg.

Re:Re: Can I set background image for GtkTextView

2009-07-08 Thread Ardhan Madras
fine, thanks. 在2009-07-02?23:32:21,Ardhan?Madras?aj...@knac.com?写道: Hi, I?already?wrote?a?simple?demo?in?the?past?when?working?on?my?project,?this?may?help?you,?feel?free?to?explore?the?codes?because?this?is?a?really?simple?one: #include?gtk/gtk.h int? main?(intargc, ??char?**argv

Re: GTK threads

2009-07-08 Thread Ardhan Madras
(When you reply, please add CC to devel mailing list, so other peoples know it's progress and may help you more). --- ml...@mlake.net wrote: From: Marshall Lake ml...@mlake.net To: Ardhan Madras aj...@knac.com Subject: Re: GTK threads Date: Wed, 8 Jul 2009 12:21:34 -0400 (EDT) Thanks

Re: Can I set background image for GtkTextView

2009-07-02 Thread Ardhan Madras
Hi, I already wrote a simple demo in the past when working on my project, this may help you, feel free to explore the codes because this is a really simple one: #include gtk/gtk.h int main (intargc, char **argv) { GtkWidget *window; GtkWidget *textv; GdkWindow *textv_window;

Re: Do I need to use rwlock?

2009-06-13 Thread Ardhan Madras
Hi, I don't know why you should have RWLOCK mechanism on your problem, but it is not 'safe' to update widget in other thread except the main thread, g_idle_add() may suitable for you. This called in the main thread and you can safely update any widget in this function. Please note the

Re: Gio library on Debian Lenny

2009-05-16 Thread Ardhan Madras
Have you try GNet? http://www.gnetlibrary.org/ it has support for http protocol object (GConnHttp) and also based on GLib. --- ajhwb --- richard.sh...@virgin.net wrote: From: Richard Shann richard.sh...@virgin.net To: gtk-app-devel-list@gnome.org Subject: Gio library on Debian Lenny Date: Fri,

Re: Executing external process goes into infinite loop

2009-05-04 Thread Ardhan Madras
In execute_input() i can't see a code to make a infinite loop, If you are curious, see codes of gdk_input_add() and find out why the GdkInputFunction recalled, btw have you try g_io_add_watch() instead by making a call to gdk_input_add() the deprecated one?. --- ajhwb --- rga...@gmail.com

Re: g_spawn and files left locked on windows.

2009-04-28 Thread Ardhan Madras
As far i know in win32, if a process is opening a new file, then normally another process couldn't write or remove it. It's maybe a synchronization method offered by win32 by automatically locking a file descriptor. Linux doesn't automatically provide such a file locking mechanism to a file

Re: Porting UIs to GtkBuilder

2009-04-15 Thread Ardhan Madras
I ever have this situation (in glade 3.4.5), my solution is: by copying it's parent window into a new window, let say you copy main_window into a new window named main_window1... delete the old one (main_window), rename main_window1 to main_window. save and try to convert it again... working

Re: locking widgit sizes

2009-04-07 Thread Ardhan Madras
button? for example gtk_widget_set_size_request() ? --- mickh...@bigpond.net.au wrote: From: mick mickh...@bigpond.net.au To: aj...@knac.com Subject: Re: locking widgit sizes Date: Tue, 7 Apr 2009 16:40:42 +1000 On Mon, 6 Apr 2009 16:37:13 Ardhan Madras wrote: Glade2 was deprecated!, therefore

Re: locking widgit sizes

2009-04-06 Thread Ardhan Madras
Glade2 was deprecated!, therefore some GTK+ functions in glade2 generated code also deprecated. You better not to set child widget size properties (weight, height, etc.) directly, because user's theme fonts can make your interface look crap. You can use GtkBox (vbox, hbox) to set your widget

Re: Problem with continuous image updation

2009-03-23 Thread Ardhan Madras
there is a while loop in the callback function. Since current approach is not working, can I use threads in this case. Adeel --- On Fri, 3/20/09, Ardhan Madras aj...@knac.com wrote: From: Ardhan Madras aj...@knac.com Subject: Re: Problem with continuous image updation To: adeelmali...@yahoo.com Cc

Re: Problem with continuous image updation

2009-03-23 Thread Ardhan Madras
way around or I need to upgrade to GTK+2.0 version. Adeel --- On Mon, 3/23/09, Ardhan Madras aj...@knac.com wrote: From: Ardhan Madras aj...@knac.com Subject: Re: Problem with continuous image updation To: adeelmali...@yahoo.com Cc: gtk-app-devel-list@gnome.org Date: Monday, March 23, 2009, 2

Re: Problem with continuous image updation

2009-03-19 Thread Ardhan Madras
() { if (STATUS) hide(RED) show(GREEN) else hide(GREEN) show(RED) } Regards, Adeel --- On Wed, 3/18/09, Ardhan Madras aj...@knac.com wrote: From: Ardhan Madras aj...@knac.com Subject: Re: Problem with continuous image updation To: adeelmali...@yahoo.com Cc: gtk-app-devel-list@gnome.org Date

Re: Problem with continuous image updation

2009-03-18 Thread Ardhan Madras
g_source_remove and add a new idle event. This way, the most recent update is shown on screen the next time my program goes idle. The idle function then marks the source as free, by setting it to zero. -Jim Ardhan Madras wrote: So you will need call textbox insertion (update) 1000 times per

Re: Popup window for alert

2009-03-18 Thread Ardhan Madras
You can use GdkWindowTypeHint value to set window decoration, the gtk_window_set_type_hint(). If you want to the window is not deletable, use gtk_window_set_deletable(). For example: ... gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_deletable (window, FALSE);

Re: widget destroyed: need to disconnect handlers?

2009-03-10 Thread Ardhan Madras
The signal is automatically removed when the widget destroyed. So you don't have to call g_signal_handler*() manually. --- ajhwb --- fka...@googlemail.com wrote: From: fka...@googlemail.com fka...@googlemail.com To: gtk-app-devel-list@gnome.org Subject: widget destroyed: need to disconnect

Re: How to make a simple beep?

2009-03-10 Thread Ardhan Madras
Maybe here is not right place to ask such question. Basically, you will need to open /dev/console, call ioctl to the device with KIOCSOUND request (see linux/kd.h) and a integer that describes the freq. Use delay (usleep, nanosleep, etc.), then use 0 as freq to stop the beep. --- ajhwb ---

Re: Continuous variable updation in a text box

2009-03-10 Thread Ardhan Madras
So you will need call textbox insertion (update) 1000 times per second or the textbox get updated every 1ms, my question is: Can you see it changes correctly with given cycle? --- adeelmali...@yahoo.com wrote: From: Adeel Malik adeelmali...@yahoo.com To: gtk-app-devel-list@gnome.org Subject: