UIManager errors
I'm trying to create a simple menu for my app with the new UIManager functions under GTK+ 2.6. I've copied most of my code for it from the the gtk-demo.exe app and I still can't get it to work. Compiles fine, but I get a long list of errors, all of which are like these (same error for similar code fragments): Gtk-WARNING **: FileMenu: missing action Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER(container)' failed Gtk-CRITICAL **: gtk_menu_shell_insert: assertion 'GTK_IS_MENU_SHELL(menu_shell)' failed Gtk-CRITICAL **: find_menu_position: assertion 'GTK_IS_MENU_SHELL(menushell)' failed Glib-GObject-WARNING **: invalid (NULL) pointer instance Glib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE(instance)' failed I've been over the example and the API docs and I can't work out why this is happening. My code is below. If anyone can help I'd be very appreciative. -Nick ** static GtkActionEntry entries[] = { { "Filemenu", NULL, "_File" }, { "Editmenu", NULL, "_Edit" }, { "Helpmenu", NULL, "_Help" }, { "New", GTK_STOCK_NEW, "_New", "n", "Create New File", G_CALLBACK(function_pendingm) }, { "Open", GTK_STOCK_OPEN, "_Open", "o", "Open File", G_CALLBACK(function_pendingm) }, { "Save", GTK_STOCK_SAVE, "_Save", "s", "Save File", G_CALLBACK(function_pendingm) }, { "SaveAs", GTK_STOCK_SAVE, "Save As", NULL, "Save a Copy", G_CALLBACK(function_pendingm) }, { "Quit", GTK_STOCK_QUIT, "_Quit", "q", "Quit ClearSky", G_CALLBACK(function_pendingm) }, { "Cut", GTK_STOCK_CUT, "Cut", "x", "Cut Text", G_CALLBACK(function_pendingm) }, { "Copy", GTK_STOCK_COPY, "Copy", "c", "Copy Text", G_CALLBACK(function_pendingm) }, { "Paste", GTK_STOCK_PASTE, "Paste", "v", "Paste Text", G_CALLBACK(function_pendingm) }, { "SelectAll", NULL, "Select _All", "a", "Select All Text", G_CALLBACK(function_pendingm) }, { "Find", GTK_STOCK_FIND_AND_REPLACE, "_Find and Replace", "f", "Find and Replace Text", G_CALLBACK(function_pendingm) }, { "Preferences", GTK_STOCK_PREFERENCES, "Preferences", NULL, "Set Viewing Preferences", G_CALLBACK(function_pendingm) }, { "HelpContents", GTK_STOCK_HELP, "_Help Contents", "h", "View Help File Contents", G_CALLBACK(function_pendingm) }, { "About", GTK_STOCK_ABOUT, "_About", "a", "About ClearSky", G_CALLBACK(function_pendingm) } }; static guint n_entries = G_N_ELEMENTS (entries); static const gchar *ui_info = "" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " ""; GtkUIManager *ui; GtkActionGroup *actions; GError *error = NULL; actions = gtk_action_group_new ("Actions"); gtk_action_group_add_actions (actions, entries, n_entries, NULL); ui = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui, actions, 0); gtk_window_add_accel_group (GTK_WINDOW (window), gtk_ui_manager_get_accel_group (ui)); if (!gtk_ui_manager_add_ui_from_string (ui, ui_info, -1, &error)) { g_message ("building menus failed: %s", error->message); g_error_free (error); } gtk_box_pack_start (GTK_BOX(mainbox), gtk_ui_manager_get_widget(ui, "/MenuBar"), FALSE, FALSE, 0); ** ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Ring Buffer
Does anyone know if glib has a generic ring buffer mechanism? I would hate to re-invent the wheel. Thanks, Bryan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: WinXP & MSSQL & C & GTK+
On Tue, 06 Sep 2005 18:36:25 +0200 Alf Stockton <[EMAIL PROTECTED]> wrote: > Can someone please give me, preferably source, but at least hints on how > to call MSSQL Stored Procedurers via ODBC from a C program written using > Glade & GTK+. > > All this is, of course, being developed under Windows. maybe this site could help you http://www.firstsql.com/iodbc/ regards -- HuamiSoft Hubert Sokolowski http://www.huamisoft.com/ tel. 501456743 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
WinXP & MSSQL & C & GTK+
Can someone please give me, preferably source, but at least hints on how to call MSSQL Stored Procedurers via ODBC from a C program written using Glade & GTK+. All this is, of course, being developed under Windows. -- Regards, Alf Stocktonwww.stockton.co.za You love peace. My email disclaimer is available at www.stockton.co.za/disclaimer.html ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: another magnificant display of GTK software
On Tue, 2005-09-06 at 12:18 -0400, Matthew Yaconis wrote: > Perhaps I'm the only one to follow the link in this email and not be > suspicious but the site has a virus which it attempts to download on your > system. (VBS Soraci B). In other words, "Best^h^h^h^hSafest if viewed with Linux". // Wally ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: another magnificant display of GTK software
Perhaps I'm the only one to follow the link in this email and not be suspicious but the site has a virus which it attempts to download on your system. (VBS Soraci B). Have a nice day... - Original Message - From: "Yogesh M" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 06, 2005 12:11 PM Subject: another magnificant display of GTK software May be this is not the list I should have posted this message. It is not a question in gtk I am proud of GTK, Inspite of being free it allows to make magnificant commercial apps. works fine under windows and linux. you can look the screenshot of the software gsudoku demo release (its not free) in www.yzonesoft.com. Is it magnificant? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
another magnificant display of GTK software
May be this is not the list I should have posted this message. It is not a question in gtk I am proud of GTK, Inspite of being free it allows to make magnificant commercial apps. works fine under windows and linux. you can look the screenshot of the software gsudoku demo release (its not free) in www.yzonesoft.com. Is it magnificant? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GtkList question
Faria, Sydney C wrote: ... which is from 2.0 API for Tree Widgets. Eric Harlow's book gives an example that uses gtk_widget_set_usize(list, 250, 250) which is now deprecated. What to I use to set a minumum size for the displayed list since I am going to be starting out with an empty list box and would like to set some sort of minimum size to this widget even though it is empty. gtk_widget_set_size_request(). gtk_widget_set_usize() API reference points to it, by the way. Olexiy ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GtkList question
I have set the following code to form a list of text items called SPN: enum { SPN_COLUMN, N_COLUMNS } GtkListStore *listModel = gtk_list_store_new(N_COLUMNS, G_TYPE_STRING); GtkTreeIter *iter; gtk_list_store_append(listModel, &iter, NULL); gtk_list_store_set(listModel, &iter, SPN_COLUMN, "1st SPN", -1); gtk_list_store_set(listModel, &iter, SPN_COLUMN, "2nd SPN", -1); gtk_list_store_set(listModel, &iter, SPN_COLUMN, "3rd SPN", -1); GtkWidget *list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(listModel)); GtkCellRendererText *renderer = gtk_cell_renderer_text_new(); GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes("SPN", renderer, "text", SPN_COLUMN, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(list), column); gtk_box_pack_start(GTK_BOX(vbox), list, FALSE, FALSE, 0); which is from 2.0 API for Tree Widgets. Eric Harlow's book gives an example that uses gtk_widget_set_usize(list, 250, 250) which is now deprecated. What to I use to set a minumum size for the displayed list since I am going to be starting out with an empty list box and would like to set some sort of minimum size to this widget even though it is empty. Sydney ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: simple question: are const gchar* arguments hold as copies internally?
Felix Kater wrote: Hi, these two functions take const gchar pointers: void gtk_label_set_text([...] const gchar *str); void g_key_file_set_value([...] const gchar *group_name, [...]) Does that mean that the arguments are *not* hold as copies internally so that I have to care for the allocated memory -- or can I savely pass a temporary character string as an argument to the functions which make a copy of the strings internally and also release their memory when necessary automatically? Generally, if a function takes `const gchar *' as an argument it just means that the said function garauntees that your string will not be modified by that function (whereas a `gchar *' argument is generally a return location for a single char). Here are some examples in GTK+ that do use static strings: http://developer.gnome.org/doc/API/2.0/gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-set-static-string http://developer.gnome.org/doc/API/2.0/glib/glib-Quarks.html#g-quark-from-static-string Usualy this behaviour is quite explicit :) Cheers, -Tristan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
signal after form is built
It sounds like you are generating changed signals when you do not want to (ie when you are changing the text). I used the following to get rid of this problem: g_signal_handler_block_by_func(entryWidget, cb_function, data); gtk_entry_set_text(entryWidget, "newtext"); g_signal_handlers_unblock_by_func(entryWidget, cb_function, data); g_signal_stap_emissiona_by_name(entryWidget, "changed"); Sydney ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: disabling a widget when no rows are selected problem
Colossus wrote: This is what I did but why does the function gtk_tree_selection_count_selected_rows ( selection ) keep on returning 1 ? Solved by connecting the selection and not the treeview to the changed signal. -- Colossus Cpsed, a Linux OpenGL 3D scene editor http://cpsed.sourceforge.net/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
gtk 2.8.3
I have recently updated to Gtk+ 2.8.3 and I have noticed that each time I open a GtkFileChooserDialog in my application, I got this message: Gtk-CRITICAL **: gtk_file_system_path_is_local: assertion `path != NULL' failed With previous version of Gtk+, I was not getting this. What am I missing? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Image display without window
Nick Watts wrote: I've seen applications (eg. mozilla and blender) display an image at startup without any (visible) container such as a window or dialog. I would like to add this touch of class to my app, anyone know the easiest way? I tried just adding a GtkImage to a GtkWindow, removing window decorations with gtk_window_set_decorated() and setting the container border width to 0, but there is still a grey border. 1. gtk_window_new (GTK_WINDOW_POPUP) 2. gtk_window_set_position (window, GTK_WIN_POS_CENTER_ALWAYS) The first tells window manager to skip any decorations, the second places it at center. It's strange that gtk_window_set_decorated() didn't help... Olexiy ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Hide the Border of Notebook and scrolled window widget
Hi, sadhees kumar wrote: hi Friends, I want to hide the border of notebook and scrolled window. For that i tried with the following function, gtk_notebook_set_show_border(notebook,FALSE); but, i didn't get the success. Is there any possibility to hide those borders? Thanks in advance Regards, K.Sadheeskumar try gtk_scrolled_window_set_shadow_type() http://developer.gnome.org/doc/API/2.0/gtk/GtkScrolledWindow.html#gtk-scrolled-window-set-shadow-type Stefan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Gtk treeview use with large data sources
I have been searching for some time now to figure out how to approach using gtk treeview ( with a list model) with a sql database. I am using odbc on multiple platforms , hence gnomedb is not appropriate. Ideally the scrollwindow will behave as per using the standard list model. My questions: (1) should I write a custom list model that I can connect an odbc dsn & query to the treeview (2) should I disect gnome-db to find out the professionals approach it (3) should I give up and page the resultset into pages of 500 row that can be scrolled easily without Appreciate any sensible ideas Thanks Kim ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Image display without window
I've seen applications (eg. mozilla and blender) display an image at startup without any (visible) container such as a window or dialog. I would like to add this touch of class to my app, anyone know the easiest way? I tried just adding a GtkImage to a GtkWindow, removing window decorations with gtk_window_set_decorated() and setting the container border width to 0, but there is still a grey border. thanks. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list