Unable to load stock icons

2008-02-02 Thread Thomas Dybdahl Ahle
Hey, I'm writing an app, using pygtk, looking up icons using
gtk.icon_theme_get_default().load_icon(...).

Now I've got reports from some KDE users which are unable to load even
tango specified icons this way. Also when the gnome-icon-theme is
installed and the icons are easily found in /usr/share/icons/gnome.

I've made sure that the XDG_DATA_DIRS variable was set correct.

I wonder how gtk.icon_theme_get_default().load_icon(...) works. How does
it know where to look up icons?

If there isn't a way to configure gtk to make it find the stock-icons,
do you think it would be possible to fall back on loading icons with
gtk.gdk.pixbuf_new_from_file on the /usr/share/icons/gnome folder?

The report I got was this:
http://code.google.com/p/pychess/issues/detail?id=302

Thanks,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Selecting cells in threeview

2008-02-08 Thread Thomas Dybdahl Ahle

On Fri, 2008-02-08 at 15:40 +0100, Kristian Rietveld wrote:
> Hi,
> 
> On Fri, Feb 08, 2008 at 02:28:16PM +0100, Thomas Dybdahl Ahle wrote:
> > Is there any way to select only a cell - not a row - in a gtk-treeview
> 
> No, GtkTreeView does not support selecting individual cells.  Selections
> can only contain full rows.

Ok. That was what I feared.
In my app I currently use two trees next to each other, but now I need a
tree rather than a table.
Do you think it would be possible to write a cellrendener capable of
recieving mouse events and only paint selection in one side?

-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Selecting cells in threeview

2008-02-08 Thread Thomas Dybdahl Ahle
Is there any way to select only a cell - not a row - in a gtk-treeview
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Flat, expandable treeview

2008-03-10 Thread Thomas Dybdahl Ahle
Hey,
How do you make the treeview expanders flat (no indent) like in pidgin?
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: TreeView indent-expanders style property

2008-03-24 Thread Thomas Dybdahl Ahle
I looked into that a few weeks ago.
I think the style property only worked when you hid the expanders.
Applicatins like pidgin then create custom cellrendeners with expanders
to make up for that.

On Mon, 2008-03-24 at 15:50 -0600, Jeffrey Barish wrote:
> Does anyone know what the indent-expanders style property does?
> 
> I currently see
> 
> | Line 1
> | Line 2
> | >   Line 3
> | Line 4
> 
> What I would like is
> 
> | Line 1
> | Line 2
> | >  Line 3
> | Line 4
> 
> Can I use indent-expanders to achieve this effect?  Is there a way to
> achieve it?  The point is to avoid wasting space on lines that don't
> require an expander arrow.
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Manually refuse/accept notebook tab drop

2008-03-26 Thread Thomas Dybdahl Ahle
Hi, I'm having some problems with the notebook set_tab_detachable from gtk 2.10.

If I set
book.drag_dest_set(gtk.DEST_DEFAULT_MOTION, [("GTK_NOTEBOOK_TAB", 
gtk.TARGET_SAME_APP, 0xbadbeef)], gtk.gdk.ACTION_MOVE)
on my notebook, I don't recieve any "drag-drop" events.

If I set the same group_id on the two notebooks, I do get "drag-drop" events,
but the tab is also moved from the first book the seccond.

I don't want this to happen autoamtically, as I some times need to refuse the
tab drop, or do other things, like but it in a new notebook besides the one
dropped upon.

Even if I connect to drag-drop and drag-data-received and try to stop them with
drag_context.finish, the tab still gets moved.


Do anybody know if such manually decicion making is possible with the current 
API,
or I have to write my own detaching code? (which then probably isn't going to 
look
as good, with a drag icon of the tab, as the built in code)

-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Solved: How to make a gtktreeview column flexible?

2008-04-26 Thread Thomas Dybdahl Ahle
Interesting, and that make the text eclipse correctly as well?

On Sat, 2008-04-26 at 11:16 +0100, Till Harbaum / Lists wrote:
> Hi,
> 
> in have solved this problem. Here's the answer for reference:
> 
> Instead of using gtk_tree_view_insert_column_with_attributes to insert
> a column, one might use seperate calls to  
> gtk_tree_view_column_new_with_attributes
> and gtk_tree_view_insert_column as this give us an explicit reference to
> the column. Thus one can use gtk_tree_view_column_set_expand(TRUE)
> on that column and voila ... the column scales nicely with the window width.
> 
> Till
> 
> Am Freitag 25 April 2008 schrieb Till Harbaum / Lists:
> > Hi,
> > 
> > i have a gtktreeview filling the complete width of a window. Now i want the 
> > view to always use the full width. I therefore want the middle column (a 
> > text
> > column) to be flexible. I want it to be as wide as possible for any given 
> > window
> > width. So if you make the window wider i want this column to become wider.
> > 
> > If i just enable ellipsis in the columns text renderer the column gets very 
> > small and only a fraction of the window width is used. If i make it a fixed 
> > width it's exactly that: fixed width.
> > 
> > How do i make the column always use a much space as possible but never
> > more than available?
> > 
> > Till
> > ___
> > 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
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Solved: How to make a gtktreeview column flexible?

2008-04-26 Thread Thomas Dybdahl Ahle

On Sat, 2008-04-26 at 12:16 +0100, Till Harbaum / Lists wrote:
> Am Samstag 26 April 2008 schrieb Thomas Dybdahl Ahle:
> > Interesting, and that make the text eclipse correctly as well?
> You have to enable ellipsize seperately of course, but then yes, once 
> the window is not wide enough the text in the "flexible" column is being
> ellipsized nicely.

And the trick was setting expand(True). Interesting. In my code I use a
listener on the size-request signal, to change the fixed width of the
column.

> Till
> 
> > 
> > On Sat, 2008-04-26 at 11:16 +0100, Till Harbaum / Lists wrote:
> > > Hi,
> > > 
> > > in have solved this problem. Here's the answer for reference:
> > > 
> > > Instead of using gtk_tree_view_insert_column_with_attributes to insert
> > > a column, one might use seperate calls to  
> > > gtk_tree_view_column_new_with_attributes
> > > and gtk_tree_view_insert_column as this give us an explicit reference to
> > > the column. Thus one can use gtk_tree_view_column_set_expand(TRUE)
> > > on that column and voila ... the column scales nicely with the window 
> > > width.
> > > 
> > > Till
> > > 
> > > Am Freitag 25 April 2008 schrieb Till Harbaum / Lists:
> > > > Hi,
> > > > 
> > > > i have a gtktreeview filling the complete width of a window. Now i want 
> > > > the 
> > > > view to always use the full width. I therefore want the middle column 
> > > > (a text
> > > > column) to be flexible. I want it to be as wide as possible for any 
> > > > given window
> > > > width. So if you make the window wider i want this column to become 
> > > > wider.
> > > > 
> > > > If i just enable ellipsis in the columns text renderer the column gets 
> > > > very 
> > > > small and only a fraction of the window width is used. If i make it a 
> > > > fixed 
> > > > width it's exactly that: fixed width.
> > > > 
> > > > How do i make the column always use a much space as possible but never
> > > > more than available?
> > > > 
> > > > Till
> > > > ___
> > > > 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
> 
> 
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkNotebook: How do you hide a tab?

2008-05-09 Thread Thomas Dybdahl Ahle
On Fri, 2008-05-09 at 05:53 -0400, Gorshkov wrote:
> How do you hide a tab/make it invisible in a GtkNotebook?
Hide the child. You won't see it from glade though.
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Divided notebooks...

2008-08-31 Thread Thomas Dybdahl Ahle
søn, 31 08 2008 kl. 05:23 -0400, skrev Freddie Unpenstein:
> GTK provides the facility to have a GtkNotebook without tabs.  But as
> far as I can tell, it doesn't provide the facility to have tabs
> without the notebook pages.  It seems somehow strange to me, and
> causes people to hack together their own button bars that function
> vaguely like Notebook tabs but nowhere near as functional, consistent,
> or in many cases accessible either.  My question is whether there's a
> better way to achieve the same functionality.

Most of the time I believe that separated tabs and pages are
unintuitive, however for two cases I believe it is currently nessesary
as a hack: When you don't want a border around your pages, and when you
want widgets next to the tabs (like the close button in older firefox).
While the former is being resolved in the latest gtk's using a new
property, I don't see much progress for the latter.
In my app, PyChess, I use one notebook for tabs and 5 for pages, which
switch synchronously. This is done in order to preserve the
VPaned/HPaned layout through pages.

-- 
Best Regards,
Med Venlig Hilsen,
Thomas

Bomb, Riksdagen, Regeringen, Död, Terror, Mord, Planer,
Muslimska brödraskapet, Alluah akbar, Kärnkraft
Stop the Swedish surveillance: stoppafralagen.nu

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Rgba widgets

2008-09-17 Thread Thomas Dybdahl Ahle
Hi,
Can anybody point me to some info on how I implement rgba widgets?
That is widgets with the gdk window being transparent.
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

Bomb, Riksdagen, Regeringen, Död, Terror, Mord, Planer,
Muslimska brödraskapet, Alluah akbar, Kärnkraft
Stop the Swedish surveillance: stoppafralagen.nu

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Transparent Draw Area

2008-09-29 Thread Thomas Dybdahl Ahle
You can not make widgets transparent, other than to the other
windows/desktop. Thus in your case, you need to create a new gtk.Window,
and lay it over the rest of your app. You use the POPUP flag to remove
the window-border and some
set_colormap(self.get_screen().get_rgba_colormap())
If you read python, you can look in the beginning of:
http://code.google.com/p/pychess/source/browse/trunk/lib/pychess/widgets/pydock/OverlayWindow.py

fre, 26 09 2008 kl. 13:41 +0200, skrev michael:
> Hi all,
> 
> I want to create a transparent draw area and using cairo to draw line
> with the window background.
> My backed is directfb and I don't know if it is supported. I want to
> start with an example working on X.
> 
> Is there somenthing attribute or function to do this?
> 
> Regards Michael
> 
> 
> 
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
Best Regards,
Med Venlig Hilsen,
Thomas

Bomb, Riksdagen, Regeringen, Död, Terror, Mord, Planer,
Muslimska brödraskapet, Alluah akbar, Kärnkraft
Stop the Swedish surveillance: stoppafralagen.nu

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list