I'm following the tuto:
http://zetcode.com/tutorials/gtktutorial/firstprograms/
It works but each time I double click on the executable,there is a console which I don't want it there.
How do I get rid of that console?
I tried this:
add_executable(Cmd WIN32 cmd.c)
But got this fatal error:
MSVCRTD.lib(crtexew.obj) : error LNK2019:...
GtkWidget *textview;
...
textview = gtk_text_view_new ();
...
buffer = gtk_text_view_get_buffer (textview);
At the last line I pasted I got this warning:
warning C4133: 'function' : incompatible types - from 'GtkWidget *' to 'GtkTextView *'
How can I fix that?
...
From this tuto:
#include <gtk/gtk.h>
int main( int argc, char *argv[])
{
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
gtk_main();
return 0;
}
I run the executable and right click on the icon,then infinite warnings(the same) reported:
GLib-WARNING **...
#include <gtk/gtk.h>
int main( int argc, char *argv[])
{
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
gtk_main();
return 0;
}
The above can pop up a window and a corresponding icon on taskbar.
I googled a lot but can't find any article that...
I am creating builder pointer as follows.
GtkBuilder *builder_ptr;
builder_ptr = gtk_builder_new();
if( ! gtk_builder_add_from_file(builder_ptr, "Test.glade", &error ) )
printf("\n Error Builder, Exit!\n");
and i am deleting this builder pointer as follows:
g_object_unref(G_OBJECT(m_builder));
this builder pointer contains 2-3 ...
I'd like build a GUI where every single pixel is under my control (i.e. not using the standard widgets that something like GTK+ provides). Renoise is a good example of what I'm looking to produce.
Is getting down to the Xlib or XCB level the best way to go, or is it possible to achieve this with higher level frameworks like GTK+ (maybe ...
Do GTK apps look native in those environments?
...
I am using g_object_set_data to set user name with event_box so in call back i can get it with in event_box pointer.
g_object_set_data(G_OBJECT(event_box), "user_name", (gpointer)(user_name) );
but problem is that i am setting user_name which is not an pointer allocated string.
It is an local string (not allocated on hip) which gets d...
Hi All,
I'm trying to compile libjingle on Mac OSX Snow Leopard. The INSTALL file said to './configure', 'make' and 'make install', as usual. But make fails for me. Initially it gave some messages indicating that I didn't have pkg-config installed (I guess OSX doesn't come with it installed?), so I downloaded pkg-config from http://pkgco...
I have one GtkWindow with one GtkVBox and GtkEntry.
Some times it happens that i am unable to access buttons Buttons, lists, entries.
But i am able to add widgets to GtkVBox and it gets updated with new widgets too.
Looks like it loses Focus. i tries with setting focus but it does not helps.
What might be wrong.
...
I want to be able to change the label of a GtkButton after the widget has been shown
char *ButtonStance == "Connect";
GtkWidget *EntryButton = gtk_button_new_with_label(ButtonStance);
gtk_box_pack_start(GTK_BOX(ButtonVbox), EntryButton, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(TopVbox), ButtonVbox, TRUE, TRUE, 0);
gtk_widget_show_a...
I have an application and I want to show a tooltip every time a user set the focus on a entry widget. Do you know a way to force a gtk Tooltip to be shown?, because right now it only shows when the user puts the mouse pointer over the entry, but the application in production will have no mouse at all.
...
I am looking for tool that can convert .Glade (or xml) file to C source.
I have tried g2c (Glade To C Translator) but i am looking for windows binary.
Any one does know any good tool for window.
Thanks,
PP.
...
I'm using pygtk then i used gtk.Combobox when i try to connect on chenged event its working but when i try to select an item that is already selected the changed method does not triggered since the selection does not changed..
so my question is how to connect the changed event even thought the selection does not changed tnx in advance...
How do I find if a GTKBuilder Checkbutton is checked?
...
How to make it behave like a prompt,
say,if too much text overflows the buffer limit,the previous should be overwritten.
Is it possible for gtk_text_view?
...
These two functions are both infinite loops,
and the programe hangs once called in the same thread.
gtk_main();
...
pcap_loop(adhandle, 0, packet_handler, NULL);
When I click the "start" button,I want pcap to start working;And if I press the "stop" button,pcap stop.
How do I create a child thread and run pcap_loop(adhandle, 0, pack...
g_timeout_add (100, (GSourceFunc) read_next_packets, NULL);
I can feel the GUI response is slow because of the above statement.
How can I make it work asynchronously so that it doesn't affect the GUI response?
...
void forloop2()
{
int i = 0;
while(TRUE)
{
printf("forloop2\n");
}
}
int main() {
GtkWidget *window;
g_thread_init(NULL);
gdk_threads_init();
g_thread_create((GThreadFunc)forloop2, NULL, FALSE, NULL);
gtk_init(NULL, NULL);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show_a...
void forloop2()
{
int i = 0;
while(TRUE)
{
printf("forloop2\n");
}
}
int main() {
GThread *Thread1;
GtkWidget *window;
g_thread_init(NULL);
gdk_threads_init();
gdk_threads_enter ();
Thread1 = g_thread_create((GThreadFunc)forloop2, NULL, TRUE, NULL);
gtk_init(NULL, NULL);
w...