Re: How to set the font's size of the GtkLabel?

2008-08-28 Thread Tomas Carnecky
Dov Grobgeld wrote: Hi Lazy (great name), The way to do it is to set the name of the label through: gtk_widget_set_name(label, foo); and then define a style for the name foo, that includes a font specification: gtk_rc_parse_string(style \foo\ {\n

Re: returning a string to d-bus

2008-08-06 Thread Tomas Carnecky
Luka Napotnik wrote: Hello. I have a D-BUS listener with a GObject method which should send a string back to D-BUS. My d-bus listener method is: gboolean some_object_get_name(GObject *object, gchar *str, GError **error) { str = g_strdup(Hello); return TRUE; } But when the

Re: Finding a widget in a Glade interface

2008-07-31 Thread Tomas Carnecky
dhk wrote: Tristan Van Berkom wrote: On Wed, Jul 30, 2008 at 3:40 PM, Tristan Van Berkom [EMAIL PROTECTED] wrote: for future reference, this could easily have been pulled out of the docs/header files: glade_xml_get_widget() type libglade and feel lucky its right there. oops, I obviously

Re: Profiler for GTK+

2008-07-21 Thread Tomas Carnecky
Vinod Alat wrote: Can anyone suggest me a profiler that shows the CPU time used by functions in code accumulating the time used in the functions that it calls (from GTK+ or application), which will help determine what functions of code take the most time to fulfill, I want to see what functions

Re: Callback Parameters are Switched

2008-07-21 Thread Tomas Carnecky
dhk wrote: I'm using glade for a front end which has a button that when clicked passes a notebook as the user_data to the callback. I'm using the gdb debugger to look at the two parameters in the callback and they are switched. The first parameter, the button, is the notebook object and the

Re: Callback Parameters are Switched

2008-07-21 Thread Tomas Carnecky
dhk wrote: Tomas Carnecky wrote: dhk wrote: I'm using glade for a front end which has a button that when clicked passes a notebook as the user_data to the callback. I'm using the gdb debugger to look at the two parameters in the callback and they are switched. The first parameter

Re: newbie Question

2008-07-16 Thread Tomas Carnecky
to list available wireless networks and create a custom widget? --- On Tue, 7/15/08, Tomas Carnecky [EMAIL PROTECTED] wrote: From: Tomas Carnecky [EMAIL PROTECTED] Subject: Re: newbie Question To: [EMAIL PROTECTED] Cc: gtk-app-devel-list@gnome.org Date: Tuesday, July 15, 2008, 11:40 AM Craig Petty

Re: newbie Question

2008-07-15 Thread Tomas Carnecky
Craig Petty wrote: How would i make a gtk+ for a wireless networking? First read gtk tutorials. Then compile, run and modify some gtk samples, just so you get into how gtk works. Then you can read the sourcecode of other gtk applications to understand how a 'big' application is structured.

Re: font size gtk_*_new_with_label

2008-07-13 Thread Tomas Carnecky
Luis Ariel Lecca wrote: Hi All ! I will appreciate very much any help :) I'm using gtk_widget_modify_font() and style = gtk_rc_style_new(); pango_font_description_free( style-font_desc ); style-font_desc = pfont; gtk_widget_modify_style( widget, style ); to change the font size of my

Re: glib and Xlib

2008-06-06 Thread Tomas Carnecky
jaafar EL GONNOUNI wrote: Hello; What is *glib *adding that the GTK + compared to *Xlib *? All what is possible with glib with Xlib is feasible, then why create a new library. From http://library.gnome.org/devel/glib/stable/glib.html : GLib is a general-purpose utility library, which

Re: The core of GTK++

2008-05-29 Thread Tomas Carnecky
jaafar EL GONNOUNI wrote: Good morning; What are the source files that formed the *core *of GTK++ ? How do you define the core? What belongs to your 'core'? *According to my research I found the following files : * gtkobject.c / gtkobject.h gtkwidget.c / gtkwidget.h

Re: GtkContainer problems

2008-04-29 Thread Tomas Carnecky
AlannY wrote: Hello. I'm writing a custom widget. It's inherits from GtkContainer. So: typedef struct _MyWidgetMyWidget; typedef struct _MyWidgetClass MyWidgetClass; struct _MyWidget { GtkContainer parent; }; struct _MyWidgetClass { GtkContainerClass

Re: How to put widget in CUSTOM GtkContainer

2008-04-29 Thread Tomas Carnecky
AlannY wrote: Hi there, my name is Alan and I have some troubles with GtkContainer. It's about 2 days, I already have spent trying to solve it, but I (i guess) can't. I'm writing a program, which looks like: +-+ | Main Window (GtkWindow) | |

Re: How to put widget in CUSTOM GtkContainer

2008-04-29 Thread Tomas Carnecky
AlannY wrote: Tomas Carnecky wrote: AlannY wrote: That still isn't the whole code! What does grid_class_init() do? Attach both the whole grid header and source file to the email. /* ** */ static void grid_class_init (GridClass *class

Re: How to put widget in CUSTOM GtkContainer

2008-04-29 Thread Tomas Carnecky
AlannY wrote: Tomas Carnecky wrote: here you have to set GtkContainerClass-add, remove, forall and child_type. See http://svn.gnome.org/viewvc/gtk%2B/trunk/gtk/gtkbin.c?revision=19491view=markup as an example of a widget that derives from GtkContainer. Since now, Yes ;-) I have

Re: Simple Questions.

2008-04-19 Thread Tomas Carnecky
Schumi Imor wrote: I'm thinking of using GTK+ for one of my projects and I'm really impressed with the level of support and example code out there. But what I haven't been able to find is how to create an application without a frame (no name, no close, no maximize, no edges). Any help or

Re: How can I find out what is the gtk development version?

2008-04-10 Thread Tomas Carnecky
ying lcs wrote: On Thu, Apr 10, 2008 at 11:12 AM, Kevin DeKorte [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ying lcs wrote: | Hi, | | How can I find out what is the gtk development version that I am using on linux? ~ pkg-config --modversion gtk+-2.0

Re: How can I find out what is the gtk development version?

2008-04-10 Thread Tomas Carnecky
ying lcs wrote: On Thu, Apr 10, 2008 at 11:12 AM, Kevin DeKorte [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ying lcs wrote: | Hi, | | How can I find out what is the gtk development version that I am using on linux? ~ pkg-config --modversion gtk+-2.0

Re: GTK app to change pic on click

2008-03-18 Thread Tomas Carnecky
Midhun A wrote: Hi All, I am very new to GTK+ (started out yesterday). I am writing a simple application which will show pictures one by one on button click. Although I am able to get my first picture, the picture does not change on click of the button (next or previous). The full code is

Re: Does libX11 use shared memory between several clients?

2008-01-29 Thread Tomas Carnecky
Bin Chen wrote: Currently I am looking at libX11's source code, I am curios many libX11 doesn't send the message to the server but only modify some structure in the local memory, such as: This is the gtk-app-devel list, not the place where you'd discuss libX11 issues! You'll have more luck

widgets in cell renderer

2008-01-25 Thread Tomas Carnecky
I'm working on a fairly complex cell renderer, with text, progress bars, buttons, etc. Since th cell renderer is not a widget, but only a simple renderer, I have to paint it all by myself, using gtk_paint_box(), gdk_draw_pixbuf(), gtk_paint_layout() etc. Now it's getting ugly and I thought

Re: XF86AudioNext

2008-01-03 Thread Tomas Carnecky
Kevin DeKorte wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm trying to capture the keypress when a user hits a key like XF86AudioNext I have a keyboard handler for my window and I get events for keys like F10 and 'a' and the Ctrl-x keys, but keys like XF86AudioNext don't

Re: gtk.image

2007-12-25 Thread Tomas Carnecky
brad smith wrote: Hello everyone, I am using gtk.Image() and filling it with set_from_file with a random I assume you're using the python bindings.. image in a directory. I am trying to use gtk.get_image() to get the name of the image currently being displayed but I get: gImage =

Re: gtk.image

2007-12-25 Thread Tomas Carnecky
another function. On Dec 25, 2007 11:33 AM, Tomas Carnecky [EMAIL PROTECTED] wrote: brad smith wrote: Hello everyone, I am using gtk.Image() and filling it with set_from_file with a random I assume you're using the python bindings.. image in a directory. I am trying to use gtk.get_image

Re: gtk.image

2007-12-25 Thread Tomas Carnecky
find out from the link I gave you and my experience with gtk+. On Dec 25, 2007 1:03 PM, Tomas Carnecky [EMAIL PROTECTED] wrote: brad smith wrote: thanks for the reply, I tried everything I can think of, but still get the error. Your problem is that get_image() does _not_ return the filename

Re: Button Callbacks

2007-12-19 Thread Tomas Carnecky
Vroni wrote: Hi guys, I have this really dumb problem, but I canĀ“t get my head around it. My program should do the following: - When a button is pressed, a specific playlist[m3u]-file should be opened in the media player. Sure, the first part is to add a callback for the buttons, but

Re: [n00b] what's a smooth_draw_box?

2007-12-18 Thread Tomas Carnecky
Daniel Fetchinson wrote: Hi list, I've just started with GTK and been going through the tutorial and examples. My first small application is working all right but the following (I guess) warning keeps being written to the console: CRITICAL **: smooth_draw_box: assertion `width = -1'

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Tomas Carnecky
Michael McCann wrote: Michael R. Head wrote: On Tue, 2007-12-18 at 17:14 -0500, Michael R. Head wrote: I assume you meant g_threads_init(); gdk_threads_init(); gtk_init(); gdk_threads_enter(); gtk_main(); gdk_threads_leave(); right? Yes, that is

Re: I can't understand the difference output of only a line differ

2007-12-06 Thread Tomas Carnecky
Binary Chen wrote: You don't know my situation. I am writing a media player which need to copy the decoded bitmap into screen. I am using gdk_draw_image to draw a GdkImage to the drawing area. g_timeout_add is too slow because it need to update the screen 20 times/sec. So I need to use a

Re: C vs C++ for GTK

2007-11-25 Thread Tomas Carnecky
Allin Cottrell wrote: One reason for going with C is that the great bulk of free software is in C, including GLib and GTK. The main exception is Qt, the basis for KDE. So if you might want to get into KDE programming, maybe learning C++ would be better. You can use gtk in C++, there's

Re: C vs C++ for GTK

2007-11-25 Thread Tomas Carnecky
Tomas Carnecky wrote: Allin Cottrell wrote: One reason for going with C is that the great bulk of free software is in C, including GLib and GTK. The main exception is Qt, the basis for KDE. So if you might want to get into KDE programming, maybe learning C++ would be better. You can

Re: C vs C++ for GTK

2007-11-24 Thread Tomas Carnecky
Patrick wrote: is C++ to complicated? C++ is more complex than C, and thus harder to fully understand. Is C going out of date? No, it's still being used for lots of projects. Am I limited with C? No, there are very few features in C++ that are hard/impossible to imitate in C, but you usually

Re: exec application in windows

2007-11-20 Thread Tomas Carnecky
Michael Lamothe wrote: gboolean ii=g_spawn_comand_line_async (C:/Archivos de programa/GlobalMapper8/global_mapper8.exe,error); gboolean ii=g_spawn_comand_line_async (C:/Archivos de programa/GlobalMapper8/global_mapper8.exe,error); The two are exactly the same, C (preprocessor?)

Re: How to get stuff out of a GValue?

2007-11-19 Thread Tomas Carnecky
Dan H wrote: OK, I've got something in the form of a GValue (in this case, integer numeric data obtained with gtk_container_child_get()), and I'd like to get access to the actual number inside. How is this done? I've looked into GValue's documentation, but all I see is stuff that deals

embedding widgets

2007-10-24 Thread Tomas Carnecky
I have created a modification to transmission that changes the look: http://dbservice.com/ftpdir/tom/screenshot19.png each line is one custom widget, with a few pango text layouts and the progressbar in the background. That was quite easy, but how would I go about embedding for example a whole