]> Pileus Git - ~andy/gtk/commitdiff
Make path arg const, #75653
authorJonathan Blandford <jrb@redhat.com>
Mon, 25 Mar 2002 04:10:49 +0000 (04:10 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Mon, 25 Mar 2002 04:10:49 +0000 (04:10 +0000)
Sun Mar 24 10:32:38 2002  Jonathan Blandford  <jrb@redhat.com>

* gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653

* gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
a warning

* gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
when we emit row_activated so that listeners of this signal can
grab the mouse, #75629

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkfontsel.c
gtk/gtktreemodel.c
gtk/gtktreemodel.h
gtk/gtktreeview.c

index 661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4..c004df72234f619ab025c5107503f98d76972585 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Sun Mar 24 10:32:38 2002  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
+
+       * gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
+       a warning
+
+       * gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
+       when we emit row_activated so that listeners of this signal can
+       grab the mouse, #75629
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
index 661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4..c004df72234f619ab025c5107503f98d76972585 100644 (file)
@@ -1,3 +1,14 @@
+Sun Mar 24 10:32:38 2002  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
+
+       * gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
+       a warning
+
+       * gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
+       when we emit row_activated so that listeners of this signal can
+       grab the mouse, #75629
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
index 661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4..c004df72234f619ab025c5107503f98d76972585 100644 (file)
@@ -1,3 +1,14 @@
+Sun Mar 24 10:32:38 2002  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
+
+       * gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
+       a warning
+
+       * gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
+       when we emit row_activated so that listeners of this signal can
+       grab the mouse, #75629
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
index 661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4..c004df72234f619ab025c5107503f98d76972585 100644 (file)
@@ -1,3 +1,14 @@
+Sun Mar 24 10:32:38 2002  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
+
+       * gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
+       a warning
+
+       * gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
+       when we emit row_activated so that listeners of this signal can
+       grab the mouse, #75629
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
index 661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4..c004df72234f619ab025c5107503f98d76972585 100644 (file)
@@ -1,3 +1,14 @@
+Sun Mar 24 10:32:38 2002  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
+
+       * gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
+       a warning
+
+       * gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
+       when we emit row_activated so that listeners of this signal can
+       grab the mouse, #75629
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
index 661288f5a3e81d7b6c1a6bdc93533d6cb9f454a4..c004df72234f619ab025c5107503f98d76972585 100644 (file)
@@ -1,3 +1,14 @@
+Sun Mar 24 10:32:38 2002  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
+
+       * gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
+       a warning
+
+       * gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
+       when we emit row_activated so that listeners of this signal can
+       grab the mouse, #75629
+
 2002-03-23  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
index 6b9f2e91066a40b57bda334c929d0889b5a41dd7..6e5b402428ab6d45ed99bc706f1784be02a7a156 100644 (file)
@@ -773,9 +773,9 @@ gtk_font_selection_show_available_styles (GtkFontSelection *fontsel)
   fontsel->face = match_face;
   if (match_face)
     {
+#ifdef INCLUDE_FONT_ENTRIES        
       const gchar *str = pango_font_face_get_face_name (fontsel->face);
 
-#ifdef INCLUDE_FONT_ENTRIES        
       gtk_entry_set_text (GTK_ENTRY (fontsel->font_style_entry), str);
 #endif      
       set_cursor_to_iter (GTK_TREE_VIEW (fontsel->face_list), &match_row);
index b03824c143d37a1f40f9faf42a40d6e36e1a8022..9749a4ddb20b86984d0f4b301c0c448212e76e9a 100644 (file)
@@ -345,7 +345,7 @@ gtk_tree_path_free (GtkTreePath *path)
  * Return value: A new #GtkTreePath.
  **/
 GtkTreePath *
-gtk_tree_path_copy (GtkTreePath *path)
+gtk_tree_path_copy (const GtkTreePath *path)
 {
   GtkTreePath *retval;
 
index 09109a8a1bf42ada0655d4880f17b2a04d789568..e498a14605de34ff825a280505d7c38eeed00759 100644 (file)
@@ -126,7 +126,7 @@ void         gtk_tree_path_prepend_index    (GtkTreePath       *path,
 gint         gtk_tree_path_get_depth        (GtkTreePath       *path);
 gint        *gtk_tree_path_get_indices      (GtkTreePath       *path);
 void         gtk_tree_path_free             (GtkTreePath       *path);
-GtkTreePath *gtk_tree_path_copy             (GtkTreePath       *path);
+GtkTreePath *gtk_tree_path_copy             (const GtkTreePath *path);
 GType        gtk_tree_path_get_type         (void);
 gint         gtk_tree_path_compare          (const GtkTreePath *a,
                                             const GtkTreePath *b);
index ed8160e78c932d4bef8bdd2172921eb24487ecf8..ce8303c35c57f1d805f7548b77dad63c0f6365b0 100644 (file)
@@ -1709,6 +1709,7 @@ gtk_tree_view_button_press (GtkWidget      *widget,
       gint pre_val, aft_val;
       GtkTreeViewColumn *column = NULL;
       gint column_handled_click = FALSE;
+      gboolean emit_row_activated = FALSE;
 
       if (!GTK_WIDGET_HAS_FOCUS (widget))
        gtk_widget_grab_focus (widget);
@@ -1877,14 +1878,9 @@ gtk_tree_view_button_press (GtkWidget      *widget,
       if (event->button == 1 && event->type == GDK_2BUTTON_PRESS &&
          tree_view->priv->last_single_clicked)
        {
-         GtkTreePath *lsc = gtk_tree_row_reference_get_path (tree_view->priv->last_single_clicked);
+         GtkTreePath *lsc;
 
-         if (lsc)
-           {
-             if (!gtk_tree_path_compare (lsc, path))
-               gtk_tree_view_row_activated (tree_view, path, column);
-             gtk_tree_path_free (lsc);
-           }
+         lsc = gtk_tree_row_reference_get_path (tree_view->priv->last_single_clicked);
 
          if (tree_view->priv->last_single_clicked)
            gtk_tree_row_reference_free (tree_view->priv->last_single_clicked);
@@ -1892,6 +1888,13 @@ gtk_tree_view_button_press (GtkWidget      *widget,
            gtk_tree_row_reference_free (tree_view->priv->last_single_clicked_2);
          tree_view->priv->last_single_clicked = NULL;
          tree_view->priv->last_single_clicked_2 = NULL;
+
+         if (lsc)
+           {
+             if (!gtk_tree_path_compare (lsc, path))
+               emit_row_activated = TRUE;
+             gtk_tree_path_free (lsc);
+           }
        }
       else if (event->button == 1 && event->type == GDK_BUTTON_PRESS)
         {
@@ -1903,6 +1906,12 @@ gtk_tree_view_button_press (GtkWidget      *widget,
 
       GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
       gtk_tree_path_free (path);
+
+      if (emit_row_activated)
+       {
+         gtk_grab_remove (widget);
+         gtk_tree_view_row_activated (tree_view, path, column);
+       }
       return TRUE;
     }