I have a PangoFontDescription and I want to know whether it describes a monospace font.
I have seen the function pango_font_family_is_monospace() in the Pango API documentation but after several hours of puzzling it is still not clear to me what the relationships are between PangoFontFamily, PangoFontMap, PangoFont, PangoFontset, Pango...
I am using glibs functions to convert epoch time to string as follows.
But each time it is giving me some random time.
//Convert Time in string.
GDate *date = g_date_new_julian(timestampsecs);
gchar date_string[50];
g_date_strftime(date_string, 50, (const gchar*)"%a, %I:%M %p", (const GDate*)date);
printf("Date String [%s]\n", date_st...
| menu |<=titlebar
the layout is above ,how can i put the menu in the middle of the titlebar of the gtkwindow?
...
This is the FindGTK.cmake:
# don't even bother under WIN32
IF(UNIX)
...
ENDIF(UNIX)
So it's not intended to work in windows at all,even though I've already installed the gtk+-bundle_2.20.0-20100406_win32 days ago.
How should I properly use gtk with cmake now?
...
Hi Guys,
Pretty straight foward question, I have a GtkEntry widget that i want to set to be editable. I know the function i should use is:
gtk_editable_set_editable
But i dont know how to make it take a GtkEntry widget as an arguement
Can anyone help me?
Regards
Paul
UPDATE:
Ok, so here is the code im using:
GtkWidget *TextEnt...
Hey,
I want to create a dialog using Glade 3 (or gtk and Python). In Glade 2 if you wanted to create a dialog box there was an option to set a "standard button layout" which would automatically create an Ok button and a Cancel button which return either gtk.RESPONSE_OK or gtk.REPONSE_CANCEL. This feature has not been reimplmented in Gla...
Hello,
How to set GtkComboBox default selectio?
How to Adjust X, Y location of Drop Down menu of GtkComboBox?
I want to display Drop Down menu at the lower edge of GtkComoBox.
Also I want to set text color of Selected text in combo box to white.
Thank,
PP.
...
I'm now doing it in a very ugly way by manually including all the required path(the gtk bundle is at D:/Tools/gtk+-bundle_2.20.0-20100406_win32):
include_directories(D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/gtk-2.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/glib-2.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/lib/glib-2...
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 is just a empty winform,I want to output dynamic information in it(not editable),
how should I do that?
...
vbox = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(window), vbox);
...
frame = gtk_fixed_new();
gtk_container_add(GTK_CONTAINER(window), frame);
...
The above code will generate the warning below:
Gtk-WARNING **: Attempting to add a
widget with type GtkFixed to a
GtkWindow, but as a GtkBin subclass a
GtkWindow can...
I tried this one and it generates a textview window:
http://zetcode.com/tutorials/gtktutorial/gtktextview/
But I don't want it to be editable.
BTW,how can I show the scroll bar when the text overflows?
...
I'm just getting started with gtk,anyone knows what this means?
GTK_WINDOW(window)->allow_shrink = TRUE;
...
EDIT: For anyone coming to this question through searching, you can install a Gnome Theme called Clearlooks Compact to shorten your tabs in Eclipse. This will free up a lot of screen space. You can also check out the answer below to learn how to make the tabs more horizontally compact.
Short version: How do I make a short version of E...
They are located under:
share\gtk-2.0\demo
But none of them contains a main function, how can I make the following textscroll.c actually work:
/* Text Widget/Automatic scrolling
*
* This example demonstrates how to use the gravity of
* GtkTextMarks to keep a text view scrolled to the bottom
* while appending text.
*/
#include ...
It seems to me that both functions can be used to add some widget to the container.
What's the difference?
...
Quoted from here:
The standard left-to-right cursor is a
mark with right gravity (when you
type, the cursor stays on the right
side of the text you're typing).
Now I see what's an mark with right gravity.
But I still don't have an idea what's a mark with left gravity like,is there an example of left gravity mark?
...
Quoted from here:
if (to_end)
{
/* If we want to scroll to the end, including horizontal scrolling,
* then we just create a mark with right gravity at the end of the
* buffer. It will stay at the end unless explicitely moved with
* gtk_text_buffer_move_mark.
*/
gtk_text_buffer_create_mark (buffer...
The question is simply in the title, if I have a function I want to use via a g_timeout_add(), but this function is a class member function, is there any way I can use it with g_timeout_add()?
...
func1();
func2();
...
In func1 there is a button widget,and in func2 a textview widget.(Both calls gtk_box_pack_start to add widgets to the window, so the order can't be changed.)
I want to operate textview when I click on button widget.
But at the time I define the callback,textview is not available yet.
How can I work around this?...
I'm following the tutorial:
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?
Platform: windows XP.
BTW I also have this trouble when right click on the icon:
GLib-WARNING **: g_main_contex...