glade

Store Gtk.Textbuffer in SQL database. Encoding troubles

纵饮孤独 提交于 2021-02-08 11:51:34
问题 I'm working on a note taking app using python2/Gtk3/Glade . The notes are stored in a MySQL Database and displayed in a TextView widget . I can load/store/display plain text fine. However I want the ability to add images to the note page, and store them in the Database.so the data has to be serialised and I'm having some trouble figuring out how to encode/decode the serialised data going in and out of the Database. I'm getting unicode start byte errors. If was working with files I could just

Create popover that can overpass window area

爱⌒轻易说出口 提交于 2021-02-08 11:00:28
问题 There is a small window application (50x50px) with only one image inside of it. When you click the image, a popover(GtkPopover) appears, but it cannot overpass the window borders and only part of it is shown. How could I solve this issue without resizing the window? 回答1: Popovers in GTK under X11 cannot extend outside of the top-level window they belong to, because they do not use a separate windowing system surface; if they did, like menus, they would not be able to remain open even when

Create popover that can overpass window area

有些话、适合烂在心里 提交于 2021-02-08 10:59:58
问题 There is a small window application (50x50px) with only one image inside of it. When you click the image, a popover(GtkPopover) appears, but it cannot overpass the window borders and only part of it is shown. How could I solve this issue without resizing the window? 回答1: Popovers in GTK under X11 cannot extend outside of the top-level window they belong to, because they do not use a separate windowing system surface; if they did, like menus, they would not be able to remain open even when

gtk_list_store_clear() function raises Segmentation Fault in C

北城以北 提交于 2021-01-29 03:00:20
问题 I am writing a program using GTK in C. I am using GtkListStore to display some data coming from a database. After a particular signal I want to remove all the rows in the GtkListStore. I used gtk_list_store_clear() function, but it raises Segmentation Fault. What is wrong with my code? //Globally declared GtkListStore *liststore2; //Inside main() function liststore2 = GTK_LIST_STORE(gtk_builder_get_object(builder, "liststore2")); //Inside signal handler function gtk_list_store_clear

Passing user data with glade/gtkbuilder

独自空忆成欢 提交于 2021-01-28 04:03:03
问题 I am a newbie of glade/pygtk. I am doing with some radio menu items. I created a signal handler on the signals tab, handler: on_group_menu_change user data: 7 what I expected is pass the int(or str) value 7 as user param to the handler. However, at startup, I found such warning: Could not lookup object 0 on signal group_changed of object radiomenuitem1 I know gtkBuilder treat 7 as an object reference. So how can I just pass an int/str to the handler ? 回答1: It seems this is still on the Glade

glade: How to edit pages in a GtkAssistant

孤街浪徒 提交于 2021-01-27 06:46:26
问题 I would like to add content to the pages of an Assistant window (GtkAssistant) in Glade. When I add a new assistant, no children appear under the GtkAssistant. Further I cannot select (or delete or change) the contents of the 3 default pages Glade produces -- I can only select the assistant itself. So, I try increasing the number of pages to 5 and then adding a widget to one of the new pages. It gives me the error message: "Widgets of type Assistant need placeholders to add children." Is this

glade: How to edit pages in a GtkAssistant

非 Y 不嫁゛ 提交于 2021-01-27 06:44:17
问题 I would like to add content to the pages of an Assistant window (GtkAssistant) in Glade. When I add a new assistant, no children appear under the GtkAssistant. Further I cannot select (or delete or change) the contents of the 3 default pages Glade produces -- I can only select the assistant itself. So, I try increasing the number of pages to 5 and then adding a widget to one of the new pages. It gives me the error message: "Widgets of type Assistant need placeholders to add children." Is this

Linking glade file with program g++

空扰寡人 提交于 2020-12-27 06:07:44
问题 Glade files and the program files can get a bit messy, this becomes a problem when you want your program to be portable. Is there any way to bind your program with your glade files? Source code (unfinished but working project): https://github.com/caelwithcats/valuator 回答1: You can use Gio Resources to include the contents of your .glade files in the application, and then use GtkBuilder's add_from_resource() to load them: https://developer.gnome.org/gtkmm-tutorial/stable/sec-gio-resource.html

Linking glade file with program g++

喜夏-厌秋 提交于 2020-12-27 06:07:39
问题 Glade files and the program files can get a bit messy, this becomes a problem when you want your program to be portable. Is there any way to bind your program with your glade files? Source code (unfinished but working project): https://github.com/caelwithcats/valuator 回答1: You can use Gio Resources to include the contents of your .glade files in the application, and then use GtkBuilder's add_from_resource() to load them: https://developer.gnome.org/gtkmm-tutorial/stable/sec-gio-resource.html

Linking glade file with program g++

杀马特。学长 韩版系。学妹 提交于 2020-12-27 06:07:38
问题 Glade files and the program files can get a bit messy, this becomes a problem when you want your program to be portable. Is there any way to bind your program with your glade files? Source code (unfinished but working project): https://github.com/caelwithcats/valuator 回答1: You can use Gio Resources to include the contents of your .glade files in the application, and then use GtkBuilder's add_from_resource() to load them: https://developer.gnome.org/gtkmm-tutorial/stable/sec-gio-resource.html