summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@src.gnome.org>2001-04-24 14:58:33 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-04-24 14:58:33 +0000
commitc668063747cc787e6ae49c2a451bbc1a8ec24278 (patch)
treee322ad3c7b983f824fedec8d6183a1f57f79dc0e
parentb84d2f1234b6a6c1fd42cab2541b563f2ad66615 (diff)
downloadgdk-pixbuf-c668063747cc787e6ae49c2a451bbc1a8ec24278.tar.gz
i2001-04-24 Alexander Larsson <alexl@redhat.com>
* gtk/gtkclist.[ch]: * gtk/gtkctree.c: When there is a row highlighted for D'n'D it must alse be painted hightlighted on exposes. Otherwise exposes from the icon being dragged will mess up the hightlight. * gtk/gtkfontsel.c: Don't recenter selected font when exposing the font family clist. This means you can now actually scroll the font family list. * gtk/gtknotebook.c: Fix focus movement on scrolling tabs that are placed on the left and right.
-rw-r--r--gtk/gtkclist.c13
-rw-r--r--gtk/gtkclist.h3
-rw-r--r--gtk/gtkctree.c3
-rw-r--r--gtk/gtkfontsel.c3
-rw-r--r--gtk/gtknotebook.c11
5 files changed, 28 insertions, 5 deletions
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index f0a88877d..a32d4a452 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -990,6 +990,8 @@ gtk_clist_init (GtkCList *clist)
clist->compare = default_compare;
clist->sort_type = GTK_SORT_ASCENDING;
clist->sort_column = 0;
+
+ clist->drag_highlight_row = -1;
}
/* Constructor */
@@ -4799,6 +4801,13 @@ gtk_clist_expose (GtkWidget *widget,
/* exposure events on the list */
if (event->window == clist->clist_window)
draw_rows (clist, &event->area);
+
+ if (event->window == clist->clist_window &&
+ clist->drag_highlight_row >= 0)
+ GTK_CLIST_GET_CLASS (clist)->draw_drag_highlight
+ (clist, g_list_nth (clist->row_list,
+ clist->drag_highlight_row)->data,
+ clist->drag_highlight_row, clist->drag_highlight_pos);
}
return FALSE;
@@ -7483,6 +7492,7 @@ gtk_clist_drag_leave (GtkWidget *widget,
(clist,
g_list_nth (clist->row_list, dest_info->cell.row)->data,
dest_info->cell.row, dest_info->insert_pos);
+ clist->drag_highlight_row = -1;
break;
}
list = list->next;
@@ -7573,6 +7583,9 @@ gtk_clist_drag_motion (GtkWidget *widget,
(clist, g_list_nth (clist->row_list,
dest_info->cell.row)->data,
dest_info->cell.row, dest_info->insert_pos);
+
+ clist->drag_highlight_row = dest_info->cell.row;
+ clist->drag_highlight_pos = dest_info->insert_pos;
gdk_drag_status (context, context->suggested_action, time);
}
diff --git a/gtk/gtkclist.h b/gtk/gtkclist.h
index 568c31f32..ae7cbaed6 100644
--- a/gtk/gtkclist.h
+++ b/gtk/gtkclist.h
@@ -239,6 +239,9 @@ struct _GtkCList
GtkSortType sort_type;
GtkCListCompareFunc compare;
gint sort_column;
+
+ gint drag_highlight_row;
+ GtkCListDragPos drag_highlight_pos;
};
struct _GtkCListClass
diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c
index 2ea6d473c..b1f932a93 100644
--- a/gtk/gtkctree.c
+++ b/gtk/gtkctree.c
@@ -6084,6 +6084,9 @@ gtk_ctree_drag_motion (GtkWidget *widget,
g_list_nth (clist->row_list, dest_info->cell.row)->data,
dest_info->cell.row, dest_info->insert_pos);
+ clist->drag_highlight_row = dest_info->cell.row;
+ clist->drag_highlight_pos = dest_info->insert_pos;
+
gdk_drag_status (context, context->suggested_action, time);
}
return TRUE;
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index 86e6ea4f0..62e654d7b 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -288,9 +288,6 @@ gtk_font_selection_init(GtkFontSelection *fontsel)
gtk_signal_connect (GTK_OBJECT (fontsel->font_clist), "key_press_event",
GTK_SIGNAL_FUNC(gtk_font_selection_on_clist_key_press),
fontsel);
- gtk_signal_connect_after (GTK_OBJECT (fontsel->font_clist), "expose_event",
- GTK_SIGNAL_FUNC(gtk_font_selection_expose_list),
- fontsel);
gtk_font_selection_show_available_styles (fontsel);
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 96b3bd596..b86fcdbb8 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1005,12 +1005,19 @@ gtk_notebook_arrow_button_press (GtkNotebook *notebook,
if (event->button == 1)
{
+ GtkDirectionType dir;
if (!notebook->focus_tab ||
gtk_notebook_search_page (notebook, notebook->focus_tab,
arrow == GTK_ARROW_LEFT ? STEP_PREV : STEP_NEXT,
TRUE))
- gtk_container_focus (GTK_CONTAINER (notebook),
- arrow == GTK_ARROW_LEFT ? GTK_DIR_LEFT : GTK_DIR_RIGHT);
+ {
+ if (notebook->tab_pos == GTK_POS_LEFT ||
+ notebook->tab_pos == GTK_POS_RIGHT)
+ dir = (arrow == GTK_ARROW_LEFT) ? GTK_DIR_UP : GTK_DIR_DOWN;
+ else
+ dir = (arrow == GTK_ARROW_LEFT) ? GTK_DIR_LEFT : GTK_DIR_RIGHT;
+ gtk_container_focus (GTK_CONTAINER (notebook), dir);
+ }
if (!notebook->timer)
{