Re: Row number in TreeView

2007-09-17 Thread Lukasz Gromotowicz
Thanks for the response. I still have a problem. Maybe because I use GTKmm.
I have signal_row_activated connected to the  function:
void TMainWindow::on_TreeView1_dblclick(
const Gtk::TreeModel::Path path, Gtk::TreeViewColumn*
tvcolumn)

I have taken it from GTKmm documentation.
in this function I put what you suggested:

gint* i = gtk_tree_path_get_indices (path);

Compilation returns an error:
cannot convert 'const Gtk::TreePath' to 'GtkTreePath*' for argument '1' to
'gint* gtk_tree_path_get_indices(GtkTreePath*)'

What should I change? Where to find the clear explanation of the TreeView
widget (gtk.org and gtkmm.org are the best places?)

Does GTKmm defines EVERYTHING from the GTK+ or sometimes I will have to use
functions from the GTK+?

Best regards,
LUK

2007/9/16, Claudio Saavedra [EMAIL PROTECTED]:


 El dom, 16-09-2007 a las 00:32 +0100, Lukasz Gromotowicz escribió:
  Hi all,
 
  I know it is probably something simple, but I am new to the gtk. I have
 a
  TreeView and associated ListStore. I am trying to get the row number
 after I
  double-click on it. I have a path which I think I should use, but I do
 not
  know how.

 With gtk_tree_path_get_indices ().

 Claudio

 --
 Claudio Saavedra  [EMAIL PROTECTED]

 Día del Software Libre, Curicó  http://curico.diadelsoftwarelibre.cl


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


Window with no maximize button

2007-09-17 Thread aniket ray
Hi,
I wanted to create a Window with only the minimize and close decoration
buttons (and no maximize button).

The code of what I basically did was:
windowPointer = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_realize(windowPointer);
mainWindow = windowPointer-window;
gdk_window_set_decorations(mainWindow, GDK_DECOR_BORDER | GDK_DECOR_RESIZEH
| GDK_DECOR_TITLE | GDK_DECOR_MENU | GDK_DECOR_MINIMIZE); //everything but
maximize
gtk_widget_show(windowPointer);


This does not seem to work as I still get the maximize button on the window.
I am using an FC6, with default GNOME installation (and its Metacity WM).
On the other hand, if I give a DIALOG hint to the window with
gtk_window_set_type_hint(), I am able to remove the maximize and minimize
buttons.
Is there a difference in which the 2 methods send hints to the WM? How can I
get this to work?


Thanks in advance,
Aniket

PS: On an unrelated note, is there an active mailing list for application
programming directly using Xlib calls?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Window with no maximize button

2007-09-17 Thread Yeti
On Mon, Sep 17, 2007 at 05:01:05PM +0530, aniket ray wrote:
 I wanted to create a Window with only the minimize and close decoration
 buttons (and no maximize button).
 
 The code of what I basically did was:
 windowPointer = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 gtk_widget_realize(windowPointer);
 mainWindow = windowPointer-window;
 gdk_window_set_decorations(mainWindow, GDK_DECOR_BORDER | GDK_DECOR_RESIZEH
 | GDK_DECOR_TITLE | GDK_DECOR_MENU | GDK_DECOR_MINIMIZE); //everything but
 maximize
 gtk_widget_show(windowPointer);
 
 
 This does not seem to work as I still get the maximize button on the window.
 I am using an FC6, with default GNOME installation (and its Metacity WM).
 On the other hand, if I give a DIALOG hint to the window with
 gtk_window_set_type_hint(), I am able to remove the maximize and minimize
 buttons.
 Is there a difference in which the 2 methods send hints to the WM?

The DIALOG hint (_NET_WM_WINDOW_TYPE_DIALOG) is an
independent hit.  So it can influence the window manager
decisions independently.

Hints are just hints.  The window manager decides how to
decorate the windows.  Apparently, Metacity thinks it's
a good idea to remove the two buttons from dialogs.  Whatever.
My window manager always shows the buttons I told it and
only them.  Someone else's window manager never shows any
window frame at all.  You cannot rely on window managers
following the hints, some do not even have any meaning with
some window management styles.

Just set the hints logicaally, i.e. do not randomly choose
hints that happen to make your particular window manager
behave as you wish.

 How can I
 get this to work?

You cannot ultimately control the window decorations.  And
let me immediately add, it's a good thing.

Yeti

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


Re: Row number in TreeView

2007-09-17 Thread James Scott Jr
LUK,

This link answers your original double-click question!  Read the
Tutorial!
http://scentric.net/tutorial/sec-selections-double-click.html

James ,

On Mon, 2007-09-17 at 09:29 +0100, Lukasz Gromotowicz wrote:

 Thanks for the response. I still have a problem. Maybe because I use GTKmm.
 I have signal_row_activated connected to the  function:
 void TMainWindow::on_TreeView1_dblclick(
 const Gtk::TreeModel::Path path, Gtk::TreeViewColumn*
 tvcolumn)
 
 I have taken it from GTKmm documentation.
 in this function I put what you suggested:
 
 gint* i = gtk_tree_path_get_indices (path);
 
 Compilation returns an error:
 cannot convert 'const Gtk::TreePath' to 'GtkTreePath*' for argument '1' to
 'gint* gtk_tree_path_get_indices(GtkTreePath*)'
 
 What should I change? Where to find the clear explanation of the TreeView
 widget (gtk.org and gtkmm.org are the best places?)
 
 Does GTKmm defines EVERYTHING from the GTK+ or sometimes I will have to use
 functions from the GTK+?
 
 Best regards,
 LUK
 
 2007/9/16, Claudio Saavedra [EMAIL PROTECTED]:
 
 
  El dom, 16-09-2007 a las 00:32 +0100, Lukasz Gromotowicz escribió:
   Hi all,
  
   I know it is probably something simple, but I am new to the gtk. I have
  a
   TreeView and associated ListStore. I am trying to get the row number
  after I
   double-click on it. I have a path which I think I should use, but I do
  not
   know how.
 
  With gtk_tree_path_get_indices ().
 
  Claudio
 
  --
  Claudio Saavedra  [EMAIL PROTECTED]
 
  Día del Software Libre, Curicó  http://curico.diadelsoftwarelibre.cl
 
 
 ___
 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