Window used as a Menu in Gtk .
Hello people . Sorry for the question . I need a window with the properties of a menu . When the pointer is clicked on the screen , the window popup will dissapear. I am develop an applet for gnome . Also . How i open a directory with a button ? Thanks , Sorry for the question Best regards . Mariano . ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GtkEntry ... change size
¿ how I disable expansion ? I used the sentences . gtk_widget_set_vexpand (GTK_WIDGET(entry ) , FALSE ) ; gtk_widget_set_hexpand (GTK_WIDGET(entry ) , FALSE ) ; But these sentencesdon't run . 2013/10/28 Michael Cronenworth m...@cchtml.com Mariano Gaudix wrote: I can not change the size to GtkEntry . I am using Gtk 3.6 . I need a GtkEntry small , for my graphic interface . GTK expands widgets to fill space by default so setting widget size has no visible effect. You need to disable expansion. I'll add a general disclaimer that you should not hard-code widget size unless you absolutely must. Allowing widgets to expand helps your app work on different screen sizes and shapes. __**_ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/**mailman/listinfo/gtk-app-**devel-listhttps://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GtkEntry ... change size
Hello I can not change the size to GtkEntry . I am using Gtk 3.6 . I need a GtkEntry small , for my graphic interface . GtkWidget *entry = gtk_entry_new (); gtk_widget_set_size_request( entry , 20 , -1); ///code /// #include stdio.h #include stdlib.h #include gtk/gtk.h #include string.h /* for css */ int main( int argc, char *argv[] ) { gtk_init (argc, argv); GtkWidget *window; GtkWidget *vbox, *hbox; GtkWidget *toolbar; GtkWidget *button ,*boton ; GtkWidget *grid; gchar *nodo; char *str ; GdkColor color; GdkColor color2; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request (GTK_WIDGET (window), 300, 100); gtk_window_set_title (GTK_WINDOW (window), GTK Entry); g_signal_connect (window, destroy, G_CALLBACK (gtk_main_quit), NULL); g_signal_connect_swapped (window, delete-event, G_CALLBACK (gtk_widget_destroy), window); /*-*/ toolbar = gtk_toolbar_new(); gtk_container_add (GTK_CONTAINER (window), toolbar); gtk_widget_set_size_request( toolbar, 50 , 60); gtk_toolbar_set_icon_size (GTK_TOOLBAR(toolbar), GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_toolbar_set_show_arrow (GTK_TOOLBAR(toolbar) ,TRUE ); /*-*/ GtkToolItem *ka ; ka = gtk_tool_item_new () ; gtk_toolbar_insert (GTK_TOOLBAR (toolbar), ka , -1); /*-*/ grid =gtk_grid_new () ; gtk_container_add (GTK_CONTAINER (ka), grid); /*-*/ GtkWidget *entry = gtk_entry_new (); gtk_grid_attach (GTK_GRID (grid), entry, 0, 0, 1, 1); gtk_widget_set_size_request( entry , 20 , -1); // boton =gtk_toggle_button_new_with_label ( nodo ); gtk_grid_attach (GTK_GRID (grid), boton, 1, 0, 1, 1) ; // gtk_widget_show_all (window); gtk_main(); return 0; } ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Zoom in and Zoom out with GTK
How i achieve theeffect zoom in and zoom out with gtk ? I need code . Best regards . Mariano ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Pathbar Gtk 3.6 window on moving
hello I m creating a simple pathbar . https://www.youtube.com/watch?v=qStNhwkZg90 ¿ How i can achieve thata window atchange the size hide a button quickly ? I need , that thebutton be hide immediatelywhen the window changed of sizeand the window is moving . ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: window-popup = menu
Hello . Is not a menu-popup . I use a window-popup . GTK_WINDOW_POPUP is used to implement widgets such as GtkMenu or tooltips . https://developer.gnome.org/gtk3/stable/GtkWindow.html I am creating a mockupwith window-popup thatcontains scrollbar , and other widgets this is my mockup http://www.youtube.com/watch?v=9ckRn_sx8CE 2013/3/13 jcup...@gmail.com Hi Mariano, Just call gtk_menu_popup() and it'll position the menu away from the screen edges for you. https://developer.gnome.org/gtk3/stable/GtkMenu.html#gtk-menu-popup John On 13 March 2013 04:05, Mariano Gaudix marianocordobar...@gmail.comwrote: Hello how i can determine the size of a window-popup hidden ? ¿ Or how i can make window-popup behaves as a menu. I have a problem. if the botton to activate the window is in the low position of the screen , the window-popup , is not shown above of the botton .. see the code and video of the widget http://depositfiles.org/files/4e2ip0pfw ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
window-popup = menu
Hello how i can determine the size of a window-popup hidden ? ¿ Or how i can make window-popup behaves as a menu. I have a problem. if the botton to activate the window is in the low position of the screen , the window-popup , is not shown above of the botton .. see the code and video of the widget http://depositfiles.org/files/4e2ip0pfw ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
cursor in GtkTextView (Text )
can I change the style ofcursor in the widget GtkTextView ? http://developer.gnome.org/gdk3/stable/gdk3-Cursors.html or I can not. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
PATHBAR written using GTK 3
Hello . Excuse me . For my the question .. someone have or seen a PATHBAR written with gtk 3 . You can tell me the page address where you can download the code for this widget . I need to know how to make a PATHBAR with GTK3 . Best regards Mariano ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GRAPHICS INTERFACE with GTK 3 - VIDEO
Hello ... How I can that make a window always appears in the display as a MENU? . I am creating a GRAPHICS INTERFACE with GTK 3 and VALA .I am using WINDOW-POPUP as menu .. and i need that this always appears in the display . See video http://www.youtube.com/watch?v=4FxRx84lid8 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GRAPHICS INTERFACE with GTK 3 - VIDEO
Hello ... How I can that make a window always appears in the display as a MENU? . I am creating a GRAPHICS INTERFACE with GTK 3 and VALA .I am using WINDOW-POPUP as menu .. and i need that this always appears in the display . See video http://www.youtube.com/watch?v=4FxRx84lid8 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GTK 3.0 .....Menu=Window-Popup
Hello ...Excuse me for my question I am creating a combo-box with scrollbar with GTK 3.0 and VALA (gtk) . .as the COMBO-BOX in LibreOffice that have in the list of FONTS .. I have been able to create something like a MENU ... I use a WINDOW-POPUP ( gtk_window_new(GTK_WINDOW_POPUP); ) ..the only problem is I need two CLIX to hide MENU .If the pointer is inside the button. ¿ How i can transfer the grab to the popup window ? Best regards . Mariano. Code example http://www.mediafire.com/?xk9s3owv5ioauhb widget image http://fotos.subefotos.com/99fc8a169bccf1ec0d64e6f20f28bceao.png ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: multiple GTKentry inside a GTKnotebook
Rudra can see the example . I uploaded a new code .downloads in .. MEDIAFIRE .. http://www.mediafire.com/?4l8qo1wtk35dcqb Rudra , let me know if you will download , the example. 2012/6/24 Rudra Banerjee bnrj.ru...@yahoo.com Friends, Plz show me how to do that. On Mon, 2012-06-18 at 23:28 +0530, Rudra Banerjee wrote: Friends, pasted is a minimal layout of my trial to create a bibliography maker. The problem is, in Authors tab inside notebook, I want to edit 3 more entry, as Editor an example. But its taking only the first entry. Please show me where I am making the error. (NB. I am neither a C programmer nor GTK. I am creating this via reading various tutorials. So please don't get too irritated) #include gtk/gtk.h #include stdio.h #include string.h #include gdk/gdk.h GtkWidget *window; GtkWidget *vbox, *hbox, *combo; GtkWidget *entry1; GtkWidget *entryAuth; GtkWidget *entryEdit; GtkWidget *window; #include menubar.c int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *button; GtkWidget *table; GtkWidget *frame; GtkWidget *notebook; GtkWidget *label; GtkWidget *checkbutton; int i; char bufferf[32]; char bufferl[32]; gtk_init(argc, argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), BibMk); gtk_container_set_border_width(GTK_CONTAINER(window), 20); g_signal_connect(window, delete-event, G_CALLBACK(gtk_main_quit), NULL); vbox = gtk_vbox_new(FALSE, 0); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); frame = gtk_frame_new(Properties); combo = gtk_combo_box_new_text(); gtk_combo_box_append_text(GTK_COMBO_BOX(combo), Book); gtk_combo_box_append_text(GTK_COMBO_BOX(combo), Article); gtk_box_pack_start(GTK_BOX(vbox), combo, TRUE, TRUE, 0); gtk_widget_show(combo); entry1 = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry1), bibKey); gtk_box_pack_start(GTK_BOX(hbox), entry1, TRUE, TRUE, 0); gtk_widget_show(entry1); /* * CREATE THE NOTEBOOK PAN */ table = gtk_table_new(3,6,FALSE); /* Create a new notebook, place the position of the tabs */ notebook = gtk_notebook_new (); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP); gtk_table_attach_defaults(GTK_TABLE(table), notebook, 0,6,0,1); gtk_widget_show(notebook); /* * CREATE BASIC NOTEBOOK */ /* * Authors Tab */ frame = gtk_frame_new (Authors); gtk_container_set_border_width (GTK_CONTAINER (frame), 10); gtk_widget_set_usize (frame, 400, 175); entryAuth = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryAuth), Author); gtk_container_add (GTK_CONTAINER (frame), entryAuth); gtk_widget_show (entryAuth); entryAuth = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryEdit), Editor); gtk_container_add (GTK_CONTAINER (frame), entryEdit); gtk_widget_show (entryEdit); label = gtk_label_new (Authors/Title); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame, label); gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); gtk_widget_show(table); gtk_widget_show_all(window); gtk_main(); return 0; } ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK 3.0 inactive buttons (Buttons : maximize , minimize , close )
In thePOPUP MENUand COMBOBOX ... has these effects ... If you activate a combo-box or menu ..and then you clicked the button maximize or minimize of the window ... this always happens 1). First .Clicking the maximize or minimize button of the window ... . The COMBO-BOXis disabled ... and her menu option . 2)Second . Then recently . I can close the window. this always happens // View Example /// /***THE CODE/ #include gtk/gtk.h int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *combo; GtkWidget *widget; GtkWidget *vbox; GtkWidget *hbox; gtk_init(argc, argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), BibMk); gtk_container_set_border_width(GTK_CONTAINER(window), 20); g_signal_connect(window, delete-event, G_CALLBACK(gtk_main_quit), NULL); vbox = gtk_vbox_new(FALSE, 0); hbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); combo = gtk_combo_box_text_new (); gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(combo), NULL, Loco ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Book ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Ladron ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Anibal Bigoton ); gtk_widget_show(combo); gtk_box_pack_start(GTK_BOX(hbox), combo, TRUE, TRUE, 0); gtk_widget_show_all(window); gtk_main(); return 0; } /***CODE END**/ // /// // I am creating a combo-box with scrollbar with GTK 3.0 and VALA (gtk) . .as the COMBO-BOX in LibreOffice that have in the list of FONTS. I wrote an in GTK 3.0 widgets. If . I active aPOPUP WINDOW (POPUP WINDOW=MENU ) with a TOGGLEBUTTON... when you clicked the button to close the window. 1). First . The TOGGLEBUTTON is off. the POPUP WINDOW is hidden . 2) Then recently . I can close the window. To here all works fine. But I can not do the same with the buttons on the maximize and minimize WINDOW .. I must achieve the same effect as the widgets , POPUP MENU and COMBO-BOX , with these events . If I you can help , I'll be grateful . When , you have a time. you can constestarme. Best regards . Mariano. this isthe code I've written in GTK 3.0. / // #include gtk/gtk.h enum { LIST_ITEM = 0, N_COLUMNS }; static void init_list(GtkWidget *list) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(List Items, renderer, text, LIST_ITEM, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(list), column); store = gtk_list_store_new(N_COLUMNS, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(list), GTK_TREE_MODEL(store)); g_object_unref(store); } static void add_to_list(GtkWidget *list, const gchar *str) { GtkListStore *store; GtkTreeIter iter; store = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(list))); gtk_list_store_append(store, iter); gtk_list_store_set(store, iter, LIST_ITEM, str, -1); } static void text( GtkWidget *widget , GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } static void clicked1(GtkWindow *window, GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } static void loc1(GtkWindow *window, GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } static void ponja2(GtkWindow *window, GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } /
Re: GTK 3.0 inactive buttons (Buttons : maximize , minimize , close )
http://fotos.subefotos.com/db2e5a8be0a21c26f620bd4adde20c5fo.png 2012/6/22 Mariano Gaudix marianocordobar...@gmail.com In thePOPUP MENUand COMBOBOX ... has these effects ... If you activate a combo-box or menu ..and then you clicked the button maximize or minimize of the window ... this always happens 1). First .Clicking the maximize or minimize button of the window ... . The COMBO-BOXis disabled ... and her menu option . 2)Second . Then recently . I can close the window. this always happens // View Example /// /***THE CODE/ #include gtk/gtk.h int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *combo; GtkWidget *widget; GtkWidget *vbox; GtkWidget *hbox; gtk_init(argc, argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), BibMk); gtk_container_set_border_width(GTK_CONTAINER(window), 20); g_signal_connect(window, delete-event, G_CALLBACK(gtk_main_quit), NULL); vbox = gtk_vbox_new(FALSE, 0); hbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); combo = gtk_combo_box_text_new (); gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(combo), NULL, Loco ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Book ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Ladron ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Anibal Bigoton ); gtk_widget_show(combo); gtk_box_pack_start(GTK_BOX(hbox), combo, TRUE, TRUE, 0); gtk_widget_show_all(window); gtk_main(); return 0; } /***CODE END**/ // /// // I am creating a combo-box with scrollbar with GTK 3.0 and VALA (gtk) . .as the COMBO-BOX in LibreOffice that have in the list of FONTS. I wrote an in GTK 3.0 widgets. If . I active aPOPUP WINDOW (POPUP WINDOW=MENU ) with a TOGGLEBUTTON... when you clicked the button to close the window. 1). First . The TOGGLEBUTTON is off. the POPUP WINDOW is hidden . 2) Then recently . I can close the window. To here all works fine. But I can not do the same with the buttons on the maximize and minimize WINDOW .. I must achieve the same effect as the widgets , POPUP MENU and COMBO-BOX , with these events . If I you can help , I'll be grateful . When , you have a time. you can constestarme. Best regards . Mariano. this isthe code I've written in GTK 3.0. / // #include gtk/gtk.h enum { LIST_ITEM = 0, N_COLUMNS }; static void init_list(GtkWidget *list) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(List Items, renderer, text, LIST_ITEM, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(list), column); store = gtk_list_store_new(N_COLUMNS, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(list), GTK_TREE_MODEL(store)); g_object_unref(store); } static void add_to_list(GtkWidget *list, const gchar *str) { GtkListStore *store; GtkTreeIter iter; store = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(list))); gtk_list_store_append(store, iter); gtk_list_store_set(store, iter, LIST_ITEM, str, -1); } static void text( GtkWidget *widget , GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } static void clicked1(GtkWindow *window, GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } static void loc1(GtkWindow *window, GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE
Re: multiple GTKentry inside a GTKnotebook
How is the program you want to do? Can you explain? 2012/6/21 Rudra Banerjee bnrj.ru...@yahoo.com Thanks, but its not solving the main problem. / 2012/6/20 Rudra Banerjee bnrj.ru...@yahoo.com Olivier, Thanks for your interest. Pasted just below is the complete code. What I want to do with that is, as a raw commented snip by line number 106-116 that according to my selection of Book/Article in combobox, some entry will be hidden. But, for that, I need to get the data from the combo box, which I have tried in line number 53-54. Please help. NB. Olivier, I got your reply in CC as well as a group post. So, I am replying you also(reply to all). Please don't get offended if it was not your intention. /***THE CODE/ #include gtk/gtk.h #include stdio.h #include string.h #include gdk/gdk.h GtkWidget *window; GtkWidget *vbox, *hbox, *combo; GtkWidget *vbox1, *hbox1, *combo1; GtkWidget *entry1; GtkWidget *entryAuth; GtkWidget *entryEditor; GtkWidget *entryTitle; GtkWidget *window; int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *button; GtkWidget *table; GtkWidget *frame; GtkWidget *notebook; GtkWidget *label; GtkWidget *checkbutton; GtkWidget *widget; int i; char bufferf[32]; char bufferl[32]; //char bibtype; gtk_init(argc, argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), BibMk); gtk_container_set_border_width(GTK_CONTAINER(window), 20); g_signal_connect(window, delete-event, G_CALLBACK(gtk_main_quit), NULL); //gtk_window_set_default_size(GTK_WINDOW(window), 200, 150); vbox = gtk_vbox_new(FALSE, 0); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); frame = gtk_frame_new(Properties); combo = gtk_combo_box_text_new(); gtk_combo_box_append_text(GTK_COMBO_BOX(combo), Book); gtk_combo_box_append_text(GTK_COMBO_BOX(combo), Article); gtk_box_pack_start(GTK_BOX(vbox), combo, TRUE, TRUE, 0); gtk_widget_show(combo); gchar *bibtype = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo)); printf(%s, gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo))); entry1 = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry1), bibKey); gtk_box_pack_start(GTK_BOX(hbox), entry1, TRUE, TRUE, 0); gtk_widget_show(entry1); /* * CREATE THE NOTEBOOK PAN */ table = gtk_table_new(3, 6, FALSE); /* Create a new notebook, place the position of the tabs */ notebook = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); gtk_table_attach_defaults(GTK_TABLE(table), notebook, 0, 6, 0, 1); gtk_widget_show(notebook); /* * CREATE BASIC NOTEBOOK */ /* * Authors Tab */ frame = gtk_frame_new(Authors); gtk_widget_set_usize(frame, 400, 175); vbox1 = gtk_vbox_new(FALSE, 0); hbox1 = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), vbox1); entryAuth = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryAuth), Author); gtk_container_add (GTK_CONTAINER (vbox1), entryAuth); gtk_widget_show(entryAuth); entryEditor = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryEditor), Editor); gtk_container_add (GTK_CONTAINER (vbox1), entryEditor); gtk_widget_show(entryEditor); entryTitle = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryTitle), Title); gtk_container_add (GTK_CONTAINER (vbox1), entryTitle); gtk_widget_show(entryTitle); label = gtk_label_new(Authors/Title); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); /*switch (bibtype) { case book:
GTK 3.0 inactive buttons (Buttons : maximize , minimize , close )
Hello How I can make the buttons are inactive , the buttons of the window (Buttons : maximize , minimize , close ) or without focus when the pointer isover them ? I need to get the effect . Caso 2 . View image http://fotos.subefotos.com/607c3fb8e19de4ed18357b85a33b3ab5o.png ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: multiple GTKentry inside a GTKnotebook
I cleaned the code a bit watching the GTK API 3 http://developer.gnome.org/gtk3/3.0/GtkComboBoxText.html /***THE CODE/ #include gtk/gtk.h #include stdio.h #include string.h #include gdk/gdk.h GtkWidget *window; GtkWidget *vbox, *hbox, *combo; GtkWidget *vbox1, *hbox1, *combo1; GtkWidget *entry1; GtkWidget *entryAuth; GtkWidget *entryEditor; GtkWidget *entryTitle; GtkWidget *window; int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *button; GtkWidget *table; GtkWidget *frame; GtkWidget *notebook; GtkWidget *label; GtkWidget *checkbutton; GtkWidget *widget; int i; char bufferf[32]; char bufferl[32]; //char bibtype; gtk_init(argc, argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), BibMk); gtk_container_set_border_width(GTK_CONTAINER(window), 20); g_signal_connect(window, delete-event, G_CALLBACK(gtk_main_quit), NULL); vbox = gtk_vbox_new(FALSE, 0); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); frame = gtk_frame_new(Properties); combo = gtk_combo_box_text_new (); gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT(combo), NULL, Loco ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Book ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Ladron ); gtk_combo_box_text_append_text ( GTK_COMBO_BOX_TEXT(combo), Anibal Bigoton ); gtk_widget_show(combo); gchar *text= gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(combo)); printf(%s, gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(combo)) ); entry1 = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry1), bibKey); gtk_box_pack_start(GTK_BOX(hbox), entry1, TRUE, TRUE, 0); gtk_widget_show(entry1); /* * CREATE THE NOTEBOOK PAN */ table = gtk_table_new(3, 6, FALSE); /* Create a new notebook, place the position of the tabs */ notebook = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP); gtk_table_attach_defaults(GTK_TABLE(table), notebook, 0, 6, 0, 1); gtk_widget_show(notebook); /* * CREATE BASIC NOTEBOOK */ /* * Authors Tab */ frame = gtk_frame_new(Authors); gtk_widget_set_size_request(frame, 400, 175); vbox1 = gtk_vbox_new(FALSE, 0); hbox1 = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(frame), vbox1); entryAuth = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryAuth), Author); gtk_container_add (GTK_CONTAINER (vbox1), entryAuth); gtk_widget_show(entryAuth); entryEditor = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryEditor), Editor); gtk_container_add (GTK_CONTAINER (vbox1), entryEditor); gtk_widget_show(entryEditor); entryTitle = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entryTitle), Title); gtk_container_add (GTK_CONTAINER (vbox1), entryTitle); gtk_widget_show(entryTitle); label = gtk_label_new(Authors/Title); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), frame, label); gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); gtk_widget_show(table); gtk_widget_show_all(window); gtk_main(); return 0; } /***CODE END**/ /// 2012/6/20 Rudra Banerjee bnrj.ru...@yahoo.com Olivier, Thanks for your interest. Pasted just below is the complete code. What I want to do with that is, as a raw commented snip by line number 106-116 that according to my selection of Book/Article in combobox, some entry will be hidden. But, for that, I need to get the data from the combo box, which I have tried in line number 53-54. Please help. NB. Olivier, I got your reply in CC as well as a group post. So, I am replying you also(reply to all). Please don't get offended if it was not your intention. /***THE CODE/ #include gtk/gtk.h #include stdio.h #include string.h #include gdk/gdk.h GtkWidget *window; GtkWidget *vbox, *hbox, *combo; GtkWidget *vbox1, *hbox1, *combo1; GtkWidget *entry1; GtkWidget *entryAuth; GtkWidget *entryEditor; GtkWidget *entryTitle; GtkWidget *window; int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *button; GtkWidget *table; GtkWidget *frame; GtkWidget *notebook; GtkWidget *label; GtkWidget *checkbutton; GtkWidget *widget; int i; char bufferf[32]; char bufferl[32]; //char bibtype; gtk_init(argc, argv); window =
Combo-box with scrollbar as the COMBO-BOX in LibreOffice that have in the list of FONTS
COMBOBOX with SCROLLBAR Excuse me for my question I am creating a combo-box with scrollbar with GTK 3.0 and VALA (gtk) . .as the COMBO-BOX in LibreOffice that have in the list of FONTS .. GTK 3.0 have not a COMBO-BOX with scrollbar ... You .. I could give an example of CODE written in GTK 3.0 or VALA (gtk) or a PyGtk 3.0 . a example COMBO-BOX with SCROLLBAR . or spend a link of a website , where I can get an example of COMBO-BOX with SCROLLBAR I wrote an in GTK 3.0 widgets. If . I active aPOPUP WINDOW (POPUP WINDOW=MENU ) with a TOGGLEBUTTON... when you clicked the button to close the window. 1). First . The TOGGLEBUTTON is off. the POPUP WINDOW is hidden . 2) Then recently . I can close the window. To here all works fine. But I can not do the same with the buttons on the maximize and minimize WINDOW .. I must achieve the same effect as the widgets , POPUP MENU and COMBO-BOX , with these events . If I you can help , I'll be grateful . When , you have a time. you can constestarme. Best regards . Mariano. I show . the code I've written in GTK 3.0. /// #include gtk/gtk.h enum { LIST_ITEM = 0, N_COLUMNS }; static void init_list(GtkWidget *list) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkListStore *store; renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(List Items, renderer, text, LIST_ITEM, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(list), column); store = gtk_list_store_new(N_COLUMNS, G_TYPE_STRING); gtk_tree_view_set_model(GTK_TREE_VIEW(list), GTK_TREE_MODEL(store)); g_object_unref(store); } static void add_to_list(GtkWidget *list, const gchar *str) { GtkListStore *store; GtkTreeIter iter; store = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(list))); gtk_list_store_append(store, iter); gtk_list_store_set(store, iter, LIST_ITEM, str, -1); } static void clicked1(GtkWindow *window, GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } static void loc1(GtkWindow *window, GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } static void ponja2(GtkWindow *window, GdkEventButton *event, gpointer buttonf) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttonf),FALSE); } / void activado(GtkWidget *widget, gpointer window3) { if ( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) { gtk_widget_hide(window3); gtk_widget_show_all(window3); } else { gtk_window_iconify (GTK_WINDOW (window3) ); gtk_widget_hide(window3); } } /// void ventana_p(GtkWindow *window, GdkEvent *event, gpointer window3 ) { int x, y; char buf[10]; x = event-configure.x; y = event-configure.y; sprintf(buf, %d, %d, x, y); gtk_window_set_title(window3, buf); gtk_window_move ( GTK_WINDOW(window3), x+30, y+35 ); } // int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *vbox2 ; GtkWidget *vbox11; GtkWidget *fixed; GtkWidget *buttonf; GtkWidget *vboxtext; GtkWidget *viewarea; GtkWidget *textview; GtkTextBuffer *buffer; GtkWidget *window3; GtkWidget *vboxw; GtkWidget *vboxs; GtkWidget *scrolled_window ; GtkWidget *list; GtkTreeSelection *selection; GtkWidget *label; gtk_init(argc, argv); // Ventana Popup / Window Popup /// window3 = gtk_window_new(GTK_WINDOW_POPUP); gtk_window_set_title(GTK_WINDOW(window3), enter signal); gtk_widget_hide(window3); vboxw = gtk_hbox_new(FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vboxw), 3); gtk_container_add(GTK_CONTAINER(window3), vboxw); gtk_widget_show (vboxw); /* This is the scrolled window to put the List widget inside */ scrolled_window=gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_set_size_request(scrolled_window,120, 300); gtk_box_pack_start(GTK_BOX(vboxw), scrolled_window , FALSE, FALSE, 0); gtk_widget_show(scrolled_window); //