Problems with demos
I biult gtk+-2.10.13 with DirectFB1.1.1. Examples of DirectFB work well. Gtk demos also work, but the image on the display is wrong. It seems like width of image doesn't fit screen width and lines are shifting. But for all that testpixbuf-drawable demo also works well. Any suggestions about correcting it? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
question on using GtkCellRendererProgress
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I've got a gtk_list_store, and one of the columns I want to make a progress meter. I'm gathering that I use teh cell rendered GtkCellRendererProgress for this column. But I have 2 points of confusion. 1) When I create the table (gtk_list_store_new()), what is the G_TYPE I use for this particular column defn ? 2) How do I refer to this column in a gtk_list_store_set() (i.e. yes, I know I refer to the column number, but what do I pass in for a value ?) Many thanks, and kind regards, - -Greg Hosler - -- +-+ Please also check the log file at /dev/null for additional information. (from /var/log/Xorg.setup.log) | Greg Hosler [EMAIL PROTECTED]| +-+ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHuYgz404fl/0CV/QRAjlhAJ96ppkA0y9Yn409ZBsZBEWXefXcrwCfZUtz pELWyEtKVCc44NNBh/oNU+s= =yKbS -END PGP SIGNATURE- ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: question on using GtkCellRendererProgress
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Massonnet wrote: | On Mon, Feb 18, 2008 at 09:29:26PM +0800, Gregory Hosler wrote: | -BEGIN PGP SIGNED MESSAGE- | Hash: SHA1 | | Hi all, | | I've got a gtk_list_store, and one of the columns I want to make a progress meter. | | I'm gathering that I use teh cell rendered GtkCellRendererProgress for this column. But I | have 2 points of confusion. | | 1) When I create the table (gtk_list_store_new()), what is the G_TYPE I use for this | particular column defn ? | | 2) How do I refer to this column in a gtk_list_store_set() (i.e. yes, I know I refer to | the column number, but what do I pass in for a value ?) | | Progress bars have two properties: value and text. value should be of | G_TYPE_INT, while text is STRING and can print text onto the progress | bar. | | You can then set the values with: | gtk_list_store_set (..., COLUMN_PERCENT, new_value, COLUMN_TEXT, new_text); confusion again... :( COLUMN_PERCENT, and COLUMN_TEXT -- would these be the same column or different columns. The progress bar is only 1 column, as I understand. With your above example, what would my gtk_list_store_new() look like ? 2 columns for the progress bar ? any code snippets for the column(s) creation ? (or code / projects that you know use this ? (I can look it up if I know the project... :) I looked at Pidghin, but they created their own custom cell render class. I really prefer not to do that. :( thx, and best rgds, - -Greg | Many thanks, and kind regards, | | - -Greg Hosler | | HTH, | mike - -- +-+ Please also check the log file at /dev/null for additional information. (from /var/log/Xorg.setup.log) | Greg Hosler [EMAIL PROTECTED]| +-+ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHuZW1404fl/0CV/QRAiiFAJ0YeqvnKtwF9TQ8zU246FP8gSm3jQCeJjSn bhEeA5Qgknh4ubPjEGJHtkI= =XCSx -END PGP SIGNATURE- ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: question on using GtkCellRendererProgress
On Mon, Feb 18, 2008 at 10:27:03PM +0800, Gregory Hosler wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Massonnet wrote: | On Mon, Feb 18, 2008 at 09:29:26PM +0800, Gregory Hosler wrote: | -BEGIN PGP SIGNED MESSAGE- | Hash: SHA1 | | Hi all, | | I've got a gtk_list_store, and one of the columns I want to make a progress meter. | | I'm gathering that I use teh cell rendered GtkCellRendererProgress for this column. But I | have 2 points of confusion. | | 1) When I create the table (gtk_list_store_new()), what is the G_TYPE I use for this | particular column defn ? | | 2) How do I refer to this column in a gtk_list_store_set() (i.e. yes, I know I refer to | the column number, but what do I pass in for a value ?) | | Progress bars have two properties: value and text. value should be of | G_TYPE_INT, while text is STRING and can print text onto the progress | bar. | | You can then set the values with: | gtk_list_store_set (..., COLUMN_PERCENT, new_value, COLUMN_TEXT, new_text); confusion again... :( COLUMN_PERCENT, and COLUMN_TEXT -- would these be the same column or different columns. The progress bar is only 1 column, as I understand. There can be several columns just for a single cell renderer. Those are the column numbers, I use the next enum for a gtk list store: With your above example, what would my gtk_list_store_new() look like ? 2 columns for the progress bar ? any code snippets for the column(s) creation ? (or code / projects that you know use this ? (I can look it up if I know the project... :) I looked at Pidghin, but they created their own custom cell render class. I really prefer not to do that. :( enum { COLUMN_VALUE, COLUMN_TEXT, N_COLUMNS, }; store = gtk_list_store_new (N_COLUMNS, G_TYPE_INT, G_TYPE_STRING); cell = gtk_cell_renderer_progress_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview), -1, progress, cell, value, COLUMN_VALUE, text, COLUMN_TEXT, NULL); GtkTreeIter iter; gtk_list_store_append (store, iter); gtk_list_store_set (store, iter, COLUMN_VALUE, 40, COLUMN_TEXT, blah, /* see http://library.gnome.org/devel/gtk/unstable/GtkCellRendererProgress.html#GtkCellRendererProgress--text */ -1); VoilĂ , something that uses these function. thx, and best rgds, - -Greg mike ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: question on using GtkCellRendererProgress
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike Massonnet wrote: | On Mon, Feb 18, 2008 at 10:27:03PM +0800, Gregory Hosler wrote: | -BEGIN PGP SIGNED MESSAGE- | Hash: SHA1 | | Mike Massonnet wrote: | | On Mon, Feb 18, 2008 at 09:29:26PM +0800, Gregory Hosler wrote: | | -BEGIN PGP SIGNED MESSAGE- | | Hash: SHA1 | | | | Hi all, | | | | I've got a gtk_list_store, and one of the columns I want to make a progress meter. | | | | I'm gathering that I use teh cell rendered GtkCellRendererProgress for this column. But I | | have 2 points of confusion. | | | | 1) When I create the table (gtk_list_store_new()), what is the G_TYPE I use for this | | particular column defn ? | | | | 2) How do I refer to this column in a gtk_list_store_set() (i.e. yes, I know I refer to | | the column number, but what do I pass in for a value ?) | | | | Progress bars have two properties: value and text. value should be of | | G_TYPE_INT, while text is STRING and can print text onto the progress | | bar. | | | | You can then set the values with: | | gtk_list_store_set (..., COLUMN_PERCENT, new_value, COLUMN_TEXT, new_text); | | confusion again... :( COLUMN_PERCENT, and COLUMN_TEXT -- would these be the same column or | different columns. The progress bar is only 1 column, as I understand. | | There can be several columns just for a single cell renderer. | Those are the column numbers, I use the next enum for a gtk list store: | | With your above example, what would my gtk_list_store_new() look like ? 2 columns for the | progress bar ? | | any code snippets for the column(s) creation ? | | (or code / projects that you know use this ? (I can look it up if I know the project... :) | | I looked at Pidghin, but they created their own custom cell render class. I really prefer | not to do that. :( | | enum | { | COLUMN_VALUE, | COLUMN_TEXT, | N_COLUMNS, | }; | | store = gtk_list_store_new (N_COLUMNS, | G_TYPE_INT, | G_TYPE_STRING); | | cell = gtk_cell_renderer_progress_new (); | gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview), | -1, progress, cell, | value, COLUMN_VALUE, | text, COLUMN_TEXT, | NULL); Ahh. This was the part I was missing. | GtkTreeIter iter; | gtk_list_store_append (store, iter); | gtk_list_store_set (store, iter, | COLUMN_VALUE, 40, | COLUMN_TEXT, blah, /* see http://library.gnome.org/devel/gtk/unstable/GtkCellRendererProgress.html#GtkCellRendererProgress--text */ | -1); | And thanks for the reference above! best rgds, - -Greg | VoilĂ , something that uses these function. | | thx, and best rgds, | | - -Greg | | mike - -- +-+ Please also check the log file at /dev/null for additional information. (from /var/log/Xorg.setup.log) | Greg Hosler [EMAIL PROTECTED]| +-+ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHuaGz404fl/0CV/QRAqryAJ9P6qb+2RV3kDn5QKeQF6YDmcesdACeO3IU KXfS+HgzQuMqiCThwhZ/t5s= =hkY4 -END PGP SIGNATURE- ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
how to tell if to GtkTreeIter's point to the same row, or not?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have an application, where, to facilitate looks deep inside callbacks, I store the Iter of a row as and when I gtk_list_store_append() it. This allows me to gtk_list_store_set() using the saved iter, and it works quite well. Now, I have a case, where I want to popup a popup-menu when the user clicks on a row. So I attached a button-press-event to the gtk_tree_view. In my callback I do a gtk_tree_view_get_path_at_pos(), and then I map the path to a row/iter using gtk_tree_model_get_iter(). This appears to work fine, except that the iter I get returned is not identical to the iter that was earlier saved when row was first gtk_list_store_append()'ed (the stamp, and user_data are the same, the other fields differ). I am using the saved iter to locate a private data structure relating to the row. I suppose that I could g_object_set_data() a pointer to my private data structure insize the iter, but that seems otherwise unnecessary. (My list private data structures have the saved iter in them, so was just comparing the saved iter against the one from the model_get_iter() returned iter.) Is there a way to compare iter's, or am i better to store a g_object_set_data() inside the iter to point to my private data structure ? thanks and best rgds, - -Greg - -- +-+ Please also check the log file at /dev/null for additional information. (from /var/log/Xorg.setup.log) | Greg Hosler [EMAIL PROTECTED]| +-+ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHumQo404fl/0CV/QRAnl3AJ4//YPUp7vcIel+4GLEDrxzEM6hXwCgwyp9 bxs/c6YQMQpFGplYRUO4GzY= =+V6b -END PGP SIGNATURE- ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: [Proposal] Helper functions in GTK+ for showing help and URIs
On Sun, 2008-02-17 at 14:00 +0100, Jaap A. Haitsma wrote: Hi, Currently applications need quite some code to show help or to show an URI, if you don't want to depend on the deprecated libgnomeui and gnome-vfs. My proposal is to add to function to gtk+: gtk_show_help and gtk_show_uri I attached gtk_show.c with these functions implemented. Comments? you probably want to add g_return_if_fail() in both functions. in gtk_show_help(): if (section) uri = g_strdup_printf (ghelp:%s?%s, application_name, section); else uri = g_strdup (ghelp:%s, application_name); I'd use g_strconcat(): if (section *section != '\0') uri = g_strconcat (ghelp:, application_name, ?, section, NULL); else uri = g_strconcat (ghelp:, application_name, NULL); in gtk_show_uri(): context = gdk_app_launch_context_new (); screen = gtk_widget_get_screen (parent); should be: context = gdk_app_launch_context_new (); if (parent) screen = gtk_widget_get_screen (parent); if (!screen) screen = gdk_screen_get_default (); ciao, Emmanuele. -- Emmanuele Bassi, W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: [Proposal] Helper functions in GTK+ for showing help and URIs
On Sun, 2008-02-17 at 14:00 +0100, Jaap A. Haitsma wrote: Hi, Currently applications need quite some code to show help or to show an URI, if you don't want to depend on the deprecated libgnomeui and gnome-vfs. My proposal is to add to function to gtk+: gtk_show_help and gtk_show_uri I attached gtk_show.c with these functions implemented. Comments? If gtk_show_uri doesn't take an (optional) event timestamp, then all users of it will be unable to use focus stealing prevention. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: GTK+ Website Review - Final Draft
Murray Cumming wrote: what is most unfortunate is that library.g.o only has glib development docs, but not gtk development docs. That's probably because there are no tarball releases of GTK+ from svn trunk at the moment. library.gnome.org can only use tarballs, I believe. That is the main issue; the other one would be this version wouldn't be in any GNOME module set as published by the release team but this is easy to work around. Frederic ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: GTK+ Website Review - Final Draft
Nice! Having SVG allows to produce nearly all other formats so that's OK. One possible addition could be some icon sized PNGs (tweaked for small size). If I have some time I'll try make them and post them on l.g.o. Christophe On Jan 30, 2008 1:11 PM, Andreas Nilsson [EMAIL PROTECTED] wrote: Andreas Nilsson wrote: Christophe Dehais wrote: Talking about the logo (which is very nice - simple and cool, like gtk :)), what about a page where one's could get it in different formats (svg, png, icon sized, etc.) ? Hi Christophe! Sounds like something that should probably go into the gnome wiki. I'll upload it later today. - Andreas http://live.gnome.org/GTKLogo Shout if you need any other formats. :) - Andreas ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: GTK+ Website Review - Final Draft
On Wed, Jan 30, 2008 at 05:26:33PM +0100, Murray Cumming wrote: This link will have to be kept up to date, if this is the link to use, it would be better to have a more permanent link that doesn't change with new versions of GNOME (which we used to have). Theoretically, http://www.gnome.org/start/unstable/Bindings should do that but it doesn't seem to work for sub-pages. That should work in ~15min. (gnomeweb-wml/trunk/www.gnome.org/htaccess) -- Regards, Olav ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
glib gio win32 directory monitor
Hello list, I don't know if there's any interest / work in progress on this, but noticing that the new Gio implementation lacks a directory monitor for windows I wrote one (patch against 2.15.4 attached, should work on 2.15.5 too) Some mentions: - it is based on the native ReadDirectoryChanges Win32 call. It is only a directory watcher, I saw a polling file watcher exists already - it registers itself as a GSource - it wouldn't have been necessary if the glib main loop would have used MsgWaitForMultipleObjectsEx (see http://weblogs.asp.net/kennykerr/archive/2007/12/12/parallel-programming-with-c-part-2-asynchronous-procedure-calls-and-window-messages.aspx) - it's a GModule, like the fam monitor. Thinking that inotify is compiled-in on linux, I think the same can be said for windows about ReadDirectoryWatcher - it may have bugs / may need code cleanup? it's here to be tested.. Regards, Vlad Grecescu Index: configure.in === --- configure.in(revision 6532) +++ configure.in(working copy) @@ -3216,6 +3216,7 @@ gio/xdgmime/Makefile gio/inotify/Makefile gio/fam/Makefile +gio/win32/Makefile gio/tests/Makefile po/Makefile.in docs/Makefile Index: gio/Makefile.am === --- gio/Makefile.am (revision 6532) +++ gio/Makefile.am (working copy) @@ -8,6 +8,10 @@ SUBDIRS += xdgmime endif +if OS_WIN32 +SUBDIRS += win32 +endif + gio.def: gio.symbols (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - $(srcdir)/gio.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' | sort) gio.def.tmp \ mv gio.def.tmp gio.def Index: gio/win32/gwin32module.c === --- gio/win32/gwin32module.c(revision 0) +++ gio/win32/gwin32module.c(revision 0) @@ -0,0 +1,39 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Vlad Grecescu [EMAIL PROTECTED] + * + */ + + + +#include gwin32directorymonitor.h +#include gfilemonitor.h +#include giomodule.h + +void +g_io_module_load (GIOModule *module) +{ + g_win32_directory_monitor_register (module); +} + +void +g_io_module_unload (GIOModule *module) +{ +} Index: gio/win32/gwin32directorymonitor.c === --- gio/win32/gwin32directorymonitor.c (revision 0) +++ gio/win32/gwin32directorymonitor.c (revision 0) @@ -0,0 +1,235 @@ +/* GIO - GLib Input, Output and Streaming Library + * + * Copyright (C) 2006-2007 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Vlad Grecescu [EMAIL PROTECTED] + * + */ + +#include config.h +#include gwin32directorymonitor.h +#include giomodule.h +#include windows.h + +G_DEFINE_DYNAMIC_TYPE (GWin32DirectoryMonitor, g_win32_directory_monitor, G_TYPE_LOCAL_DIRECTORY_MONITOR) + +struct _GWin32DirectoryMonitorSource { + GSource notify_source; + /** win32 overlapped IO structure; contains a hEvent for the notify_source */ + OVERLAPPED overlapped; + DWORD buffer_allocated_bytes; + gchar* file_notify_buffer; + DWORD buffer_filled_bytes; + HANDLE hDirectory; + GPollFD pollFD; + /** needed in the GSource dispach () where we only have this struct */ + GFileMonitor * self; +}; + +static void g_win32_directory_monitor_finalize
Re: glib gio win32 directory monitor
On 02/18/2008 03:56:59 PM, Vlad Grecescu wrote: Hello list, I don't know if there's any interest / work in progress on this, but noticing that the new Gio implementation lacks a directory monitor for windows I wrote one (patch against 2.15.4 attached, should work on 2.15.5 too) I had to write something along these lines for a proprietary application a few years ago. I found that I needed to track the mapping of short names to long names for MS-Windows since the kernel has a habit of reporting file actions using the names passed in by the application. Thus if an application deletes a file using its short name by the time we get to hear about it, it's too late to ask the kernel what its long name was. I don't see anything in your code to do this. Cheers, Ali. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: glib gio win32 directory monitor
J. Ali Harlow wrote: On 02/18/2008 03:56:59 PM, Vlad Grecescu wrote: Hello list, I don't know if there's any interest / work in progress on this, but noticing that the new Gio implementation lacks a directory monitor for windows I wrote one (patch against 2.15.4 attached, should work on 2.15.5 too) I had to write something along these lines for a proprietary application a few years ago. I found that I needed to track the mapping of short names to long names for MS-Windows since the kernel has a habit of reporting file actions using the names passed in by the application. Thus if an application deletes a file using its short name by the time we get to hear about it, it's too late to ask the kernel what its long name was. I don't see anything in your code to do this. Cheers, Ali. Well, I haven't got the chance to notice that but I suppose you're right. I'll see what I can do to handle it without race conditions :) I suppose there are few old programs that do this by default. Thanks, Vlad ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: glib gio win32 directory monitor
Vlad Grecescu wrote: Hello list, I don't know if there's any interest / work in progress on this, but noticing that the new Gio implementation lacks a directory monitor for windows I wrote one (patch against 2.15.4 attached, should work on 2.15.5 too) Excellent! I am sure win32/gtk developers are going to appreciate this! Normally, the procedure for getting a patch integrated into Gtk+ includes filing a bug against the Gtk+ component on http://bugzilla.gnome.org and adding the patch as an attachment. Johan ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Image saving framework
Hi, Arc and I are writing a GdkPixbuf plugin that wraps Window's GDI+ library. This library supports loading and saving a variety of formats, such as PNG, JPEG, GIF, WMF, EMF, TIFF, ... I'd like to implement saving to PNG/JPEG/whatever from the plugin. GdkPixbuf's architecture allows you to handle multiple formats in the same plugin. Unfortunately, the GDK_PIXBUF_FORMAT_WRITABLE flag means that all of your formats are writable. Worse still, GdkPixbuf assumes that a plugin is only capable of saving to a single format, so it doesn't bother passing that format to the plugin's save function. Is there time to change the plugin API? Otherwise, each format capable of being written to will need its own plugin. Of course, these will be shallow wrappers around shared functionality, but it's annoying to say the least. Dom ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list